Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xtensa: clean up files to make them code-style compliant

Remove heading and trailing spaces, trim trailing lines, and wrap lines
that are longer than 80 characters.

Signed-off-by: Chris Zankel <chris@zankel.net>

+160 -175
-1
arch/xtensa/Makefile
··· 106 106 define archhelp 107 107 @echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)' 108 108 endef 109 -
+8 -11
arch/xtensa/include/asm/bootparam.h
··· 32 32 /* All records are aligned to 4 bytes */ 33 33 34 34 typedef struct bp_tag { 35 - unsigned short id; /* tag id */ 36 - unsigned short size; /* size of this record excluding the structure*/ 37 - unsigned long data[0]; /* data */ 35 + unsigned short id; /* tag id */ 36 + unsigned short size; /* size of this record excluding the structure*/ 37 + unsigned long data[0]; /* data */ 38 38 } bp_tag_t; 39 39 40 40 typedef struct meminfo { 41 - unsigned long type; 42 - unsigned long start; 43 - unsigned long end; 41 + unsigned long type; 42 + unsigned long start; 43 + unsigned long end; 44 44 } meminfo_t; 45 45 46 46 #define SYSMEM_BANKS_MAX 5 ··· 49 49 #define MEMORY_TYPE_NONE 0x2000 50 50 51 51 typedef struct sysmem_info { 52 - int nr_banks; 53 - meminfo_t bank[SYSMEM_BANKS_MAX]; 52 + int nr_banks; 53 + meminfo_t bank[SYSMEM_BANKS_MAX]; 54 54 } sysmem_info_t; 55 55 56 56 extern sysmem_info_t sysmem; 57 57 58 58 #endif 59 59 #endif 60 - 61 - 62 -
-1
arch/xtensa/include/asm/cacheasm.h
··· 174 174 __loop_cache_page \ar \as ihi XCHAL_ICACHE_LINEWIDTH 175 175 176 176 .endm 177 -
+2 -1
arch/xtensa/include/asm/cacheflush.h
··· 104 104 #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1 105 105 extern void flush_dcache_page(struct page*); 106 106 extern void flush_cache_range(struct vm_area_struct*, ulong, ulong); 107 - extern void flush_cache_page(struct vm_area_struct*, unsigned long, unsigned long); 107 + extern void flush_cache_page(struct vm_area_struct*, 108 + unsigned long, unsigned long); 108 109 109 110 #else 110 111
+11 -8
arch/xtensa/include/asm/checksum.h
··· 36 36 * better 64-bit) boundary 37 37 */ 38 38 39 - asmlinkage __wsum csum_partial_copy_generic(const void *src, void *dst, int len, __wsum sum, 40 - int *src_err_ptr, int *dst_err_ptr); 39 + asmlinkage __wsum csum_partial_copy_generic(const void *src, void *dst, 40 + int len, __wsum sum, 41 + int *src_err_ptr, int *dst_err_ptr); 41 42 42 43 /* 43 44 * Note: when you get a NULL pointer exception here this means someone ··· 55 54 56 55 static inline 57 56 __wsum csum_partial_copy_from_user(const void __user *src, void *dst, 58 - int len, __wsum sum, int *err_ptr) 57 + int len, __wsum sum, int *err_ptr) 59 58 { 60 59 return csum_partial_copy_generic((__force const void *)src, dst, 61 60 len, sum, err_ptr, NULL); ··· 113 112 /* Since the input registers which are loaded with iph and ihl 114 113 are modified, we must also specify them as outputs, or gcc 115 114 will assume they contain their original values. */ 116 - : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (tmp), "=&r" (endaddr) 115 + : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (tmp), 116 + "=&r" (endaddr) 117 117 : "1" (iph), "2" (ihl) 118 118 : "memory"); 119 119 ··· 170 168 171 169 static __inline__ __sum16 ip_compute_csum(const void *buff, int len) 172 170 { 173 - return csum_fold (csum_partial(buff, len, 0)); 171 + return csum_fold (csum_partial(buff, len, 0)); 174 172 } 175 173 176 174 #define _HAVE_ARCH_IPV6_CSUM ··· 240 238 * Copy and checksum to user 241 239 */ 242 240 #define HAVE_CSUM_COPY_USER 243 - static __inline__ __wsum csum_and_copy_to_user(const void *src, void __user *dst, 244 - int len, __wsum sum, int *err_ptr) 241 + static __inline__ __wsum csum_and_copy_to_user(const void *src, 242 + void __user *dst, int len, 243 + __wsum sum, int *err_ptr) 245 244 { 246 245 if (access_ok(VERIFY_WRITE, dst, len)) 247 - return csum_partial_copy_generic(src, dst, len, sum, NULL, err_ptr); 246 + return csum_partial_copy_generic(src,dst,len,sum,NULL,err_ptr); 248 247 249 248 if (len) 250 249 *err_ptr = -EFAULT;
+2 -1
arch/xtensa/include/asm/cmpxchg.h
··· 134 134 #endif 135 135 } 136 136 137 - #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) 137 + #define xchg(ptr,x) \ 138 + ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) 138 139 139 140 /* 140 141 * This only works if the compiler isn't horribly bad at optimizing.
+1 -1
arch/xtensa/include/asm/current.h
··· 30 30 31 31 #define GET_CURRENT(reg,sp) \ 32 32 GET_THREAD_INFO(reg,sp); \ 33 - l32i reg, reg, TI_TASK \ 33 + l32i reg, reg, TI_TASK \ 34 34 35 35 #endif 36 36
+3 -4
arch/xtensa/include/asm/delay.h
··· 19 19 20 20 static inline void __delay(unsigned long loops) 21 21 { 22 - /* 2 cycles per loop. */ 23 - __asm__ __volatile__ ("1: addi %0, %0, -2; bgeui %0, 2, 1b" 24 - : "=r" (loops) : "0" (loops)); 22 + /* 2 cycles per loop. */ 23 + __asm__ __volatile__ ("1: addi %0, %0, -2; bgeui %0, 2, 1b" 24 + : "=r" (loops) : "0" (loops)); 25 25 } 26 26 27 27 static __inline__ u32 xtensa_get_ccount(void) ··· 46 46 } 47 47 48 48 #endif 49 -
+2 -2
arch/xtensa/include/asm/dma-mapping.h
··· 100 100 } 101 101 102 102 static inline void 103 - dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size, 104 - enum dma_data_direction direction) 103 + dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, 104 + size_t size, enum dma_data_direction direction) 105 105 { 106 106 consistent_sync((void *)bus_to_virt(dma_handle), size, direction); 107 107 }
+5 -5
arch/xtensa/include/asm/elf.h
··· 168 168 */ 169 169 170 170 #define ELF_PLAT_INIT(_r, load_addr) \ 171 - do { _r->areg[0]=0; /*_r->areg[1]=0;*/ _r->areg[2]=0; _r->areg[3]=0; \ 172 - _r->areg[4]=0; _r->areg[5]=0; _r->areg[6]=0; _r->areg[7]=0; \ 173 - _r->areg[8]=0; _r->areg[9]=0; _r->areg[10]=0; _r->areg[11]=0; \ 174 - _r->areg[12]=0; _r->areg[13]=0; _r->areg[14]=0; _r->areg[15]=0; \ 175 - } while (0) 171 + do { _r->areg[0]=0; /*_r->areg[1]=0;*/ _r->areg[2]=0; _r->areg[3]=0; \ 172 + _r->areg[4]=0; _r->areg[5]=0; _r->areg[6]=0; _r->areg[7]=0; \ 173 + _r->areg[8]=0; _r->areg[9]=0; _r->areg[10]=0; _r->areg[11]=0; \ 174 + _r->areg[12]=0; _r->areg[13]=0; _r->areg[14]=0; _r->areg[15]=0; \ 175 + } while (0) 176 176 177 177 typedef struct { 178 178 xtregs_opt_t opt;
-1
arch/xtensa/include/asm/highmem.h
··· 14 14 extern void flush_cache_kmaps(void); 15 15 16 16 #endif 17 -
+1 -1
arch/xtensa/include/asm/mmu_context.h
··· 107 107 108 108 109 109 static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, 110 - struct task_struct *tsk) 110 + struct task_struct *tsk) 111 111 { 112 112 unsigned long asid = asid_cache; 113 113
+1 -1
arch/xtensa/include/asm/nommu_context.h
··· 2 2 { 3 3 } 4 4 5 - static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) 5 + static inline int init_new_context(struct task_struct *tsk,struct mm_struct *mm) 6 6 { 7 7 return 0; 8 8 }
+11 -9
arch/xtensa/include/asm/page.h
··· 29 29 * PAGE_SHIFT determines the page size 30 30 */ 31 31 32 - #define PAGE_SHIFT 12 33 - #define PAGE_SIZE (__XTENSA_UL_CONST(1) << PAGE_SHIFT) 34 - #define PAGE_MASK (~(PAGE_SIZE-1)) 32 + #define PAGE_SHIFT 12 33 + #define PAGE_SIZE (__XTENSA_UL_CONST(1) << PAGE_SHIFT) 34 + #define PAGE_MASK (~(PAGE_SIZE-1)) 35 35 36 36 #ifdef CONFIG_MMU 37 - #define PAGE_OFFSET XCHAL_KSEG_CACHED_VADDR 38 - #define MAX_MEM_PFN XCHAL_KSEG_SIZE 37 + #define PAGE_OFFSET XCHAL_KSEG_CACHED_VADDR 38 + #define MAX_MEM_PFN XCHAL_KSEG_SIZE 39 39 #else 40 - #define PAGE_OFFSET 0 41 - #define MAX_MEM_PFN (PLATFORM_DEFAULT_MEM_START + PLATFORM_DEFAULT_MEM_SIZE) 40 + #define PAGE_OFFSET 0 41 + #define MAX_MEM_PFN (PLATFORM_DEFAULT_MEM_START + PLATFORM_DEFAULT_MEM_SIZE) 42 42 #endif 43 43 44 - #define PGTABLE_START 0x80000000 44 + #define PGTABLE_START 0x80000000 45 45 46 46 /* 47 47 * Cache aliasing: ··· 161 161 162 162 #define __pa(x) ((unsigned long) (x) - PAGE_OFFSET) 163 163 #define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET)) 164 - #define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr) 164 + #define pfn_valid(pfn) \ 165 + ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr) 166 + 165 167 #ifdef CONFIG_DISCONTIGMEM 166 168 # error CONFIG_DISCONTIGMEM not supported 167 169 #endif
+1 -1
arch/xtensa/include/asm/pci-bridge.h
··· 35 35 struct pci_controller { 36 36 int index; /* used for pci_controller_num */ 37 37 struct pci_controller *next; 38 - struct pci_bus *bus; 38 + struct pci_bus *bus; 39 39 void *arch_data; 40 40 41 41 int first_busno;
+1 -1
arch/xtensa/include/asm/pci.h
··· 53 53 54 54 /* Map a range of PCI memory or I/O space for a device into user space */ 55 55 int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, 56 - enum pci_mmap_state mmap_state, int write_combine); 56 + enum pci_mmap_state mmap_state, int write_combine); 57 57 58 58 /* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */ 59 59 #define HAVE_PCI_MMAP 1
+1 -1
arch/xtensa/include/asm/pgalloc.h
··· 42 42 43 43 extern struct kmem_cache *pgtable_cache; 44 44 45 - static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, 45 + static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, 46 46 unsigned long address) 47 47 { 48 48 return kmem_cache_alloc(pgtable_cache, GFP_KERNEL|__GFP_REPEAT);
+4 -4
arch/xtensa/include/asm/pgtable.h
··· 284 284 285 285 static inline int 286 286 ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, 287 - pte_t *ptep) 287 + pte_t *ptep) 288 288 { 289 289 pte_t pte = *ptep; 290 290 if (!pte_young(pte)) ··· 304 304 static inline void 305 305 ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) 306 306 { 307 - pte_t pte = *ptep; 308 - update_pte(ptep, pte_wrprotect(pte)); 307 + pte_t pte = *ptep; 308 + update_pte(ptep, pte_wrprotect(pte)); 309 309 } 310 310 311 311 /* to find an entry in a kernel page-table-directory */ ··· 399 399 */ 400 400 401 401 #define io_remap_pfn_range(vma,from,pfn,size,prot) \ 402 - remap_pfn_range(vma, from, pfn, size, prot) 402 + remap_pfn_range(vma, from, pfn, size, prot) 403 403 404 404 typedef pte_t *pte_addr_t; 405 405
-1
arch/xtensa/include/asm/platform.h
··· 75 75 extern void platform_calibrate_ccount (void); 76 76 77 77 #endif /* _XTENSA_PLATFORM_H */ 78 -
+5 -5
arch/xtensa/include/asm/processor.h
··· 89 89 #define MAKE_PC_FROM_RA(ra,sp) (((ra) & 0x3fffffff) | ((sp) & 0xc0000000)) 90 90 91 91 typedef struct { 92 - unsigned long seg; 92 + unsigned long seg; 93 93 } mm_segment_t; 94 94 95 95 struct thread_struct { ··· 145 145 * set_thread_state in signal.c depends on it. 146 146 */ 147 147 #define USER_PS_VALUE ((1 << PS_WOE_BIT) | \ 148 - (1 << PS_CALLINC_SHIFT) | \ 149 - (USER_RING << PS_RING_SHIFT) | \ 150 - (1 << PS_UM_BIT) | \ 151 - (1 << PS_EXCM_BIT)) 148 + (1 << PS_CALLINC_SHIFT) | \ 149 + (USER_RING << PS_RING_SHIFT) | \ 150 + (1 << PS_UM_BIT) | \ 151 + (1 << PS_EXCM_BIT)) 152 152 153 153 /* Clearing a0 terminates the backtrace. */ 154 154 #define start_thread(regs, new_pc, new_sp) \
+1 -1
arch/xtensa/include/asm/ptrace.h
··· 55 55 56 56 # define arch_has_single_step() (1) 57 57 # define task_pt_regs(tsk) ((struct pt_regs*) \ 58 - (task_stack_page(tsk) + KERNEL_STACK_SIZE - (XCHAL_NUM_AREGS-16)*4) - 1) 58 + (task_stack_page(tsk) + KERNEL_STACK_SIZE - (XCHAL_NUM_AREGS-16)*4) - 1) 59 59 # define user_mode(regs) (((regs)->ps & 0x00000020)!=0) 60 60 # define instruction_pointer(regs) ((regs)->pc) 61 61
-1
arch/xtensa/include/asm/regs.h
··· 109 109 #define DEBUGCAUSE_ICOUNT_BIT 0 /* ICOUNT would incr. to zero */ 110 110 111 111 #endif /* _XTENSA_SPECREG_H */ 112 -
+6 -5
arch/xtensa/include/asm/syscall.h
··· 25 25 /* Should probably move to linux/syscalls.h */ 26 26 struct pollfd; 27 27 asmlinkage long sys_pselect6(int n, fd_set __user *inp, fd_set __user *outp, 28 - fd_set __user *exp, struct timespec __user *tsp, void __user *sig); 28 + fd_set __user *exp, struct timespec __user *tsp, 29 + void __user *sig); 29 30 asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds, 30 - struct timespec __user *tsp, const sigset_t __user *sigmask, 31 - size_t sigsetsize); 32 - asmlinkage long sys_rt_sigsuspend(sigset_t __user *unewset, 33 - size_t sigsetsize); 31 + struct timespec __user *tsp, 32 + const sigset_t __user *sigmask, 33 + size_t sigsetsize); 34 + asmlinkage long sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize);
+23 -20
arch/xtensa/include/asm/uaccess.h
··· 180 180 #define segment_eq(a,b) ((a).seg == (b).seg) 181 181 182 182 #define __kernel_ok (segment_eq(get_fs(), KERNEL_DS)) 183 - #define __user_ok(addr,size) (((size) <= TASK_SIZE)&&((addr) <= TASK_SIZE-(size))) 183 + #define __user_ok(addr,size) \ 184 + (((size) <= TASK_SIZE)&&((addr) <= TASK_SIZE-(size))) 184 185 #define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size))) 185 186 #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size)) 186 187 ··· 235 234 int __cb; \ 236 235 retval = 0; \ 237 236 switch (size) { \ 238 - case 1: __put_user_asm(x,ptr,retval,1,"s8i",__cb); break; \ 239 - case 2: __put_user_asm(x,ptr,retval,2,"s16i",__cb); break; \ 240 - case 4: __put_user_asm(x,ptr,retval,4,"s32i",__cb); break; \ 241 - case 8: { \ 237 + case 1: __put_user_asm(x,ptr,retval,1,"s8i",__cb); break; \ 238 + case 2: __put_user_asm(x,ptr,retval,2,"s16i",__cb); break; \ 239 + case 4: __put_user_asm(x,ptr,retval,4,"s32i",__cb); break; \ 240 + case 8: { \ 242 241 __typeof__(*ptr) __v64 = x; \ 243 242 retval = __copy_to_user(ptr,&__v64,8); \ 244 243 break; \ ··· 292 291 * __check_align_* macros still work. 293 292 */ 294 293 #define __put_user_asm(x, addr, err, align, insn, cb) \ 295 - __asm__ __volatile__( \ 294 + __asm__ __volatile__( \ 296 295 __check_align_##align \ 297 296 "1: "insn" %2, %3, 0 \n" \ 298 297 "2: \n" \ ··· 302 301 " .long 2b \n" \ 303 302 "5: \n" \ 304 303 " l32r %1, 4b \n" \ 305 - " movi %0, %4 \n" \ 306 - " jx %1 \n" \ 304 + " movi %0, %4 \n" \ 305 + " jx %1 \n" \ 307 306 " .previous \n" \ 308 307 " .section __ex_table,\"a\" \n" \ 309 308 " .long 1b, 5b \n" \ ··· 335 334 do { \ 336 335 int __cb; \ 337 336 retval = 0; \ 338 - switch (size) { \ 339 - case 1: __get_user_asm(x,ptr,retval,1,"l8ui",__cb); break; \ 340 - case 2: __get_user_asm(x,ptr,retval,2,"l16ui",__cb); break; \ 341 - case 4: __get_user_asm(x,ptr,retval,4,"l32i",__cb); break; \ 342 - case 8: retval = __copy_from_user(&x,ptr,8); break; \ 343 - default: (x) = __get_user_bad(); \ 344 - } \ 337 + switch (size) { \ 338 + case 1: __get_user_asm(x,ptr,retval,1,"l8ui",__cb); break; \ 339 + case 2: __get_user_asm(x,ptr,retval,2,"l16ui",__cb); break; \ 340 + case 4: __get_user_asm(x,ptr,retval,4,"l32i",__cb); break; \ 341 + case 8: retval = __copy_from_user(&x,ptr,8); break; \ 342 + default: (x) = __get_user_bad(); \ 343 + } \ 345 344 } while (0) 346 345 347 346 ··· 350 349 * __check_align_* macros still work. 351 350 */ 352 351 #define __get_user_asm(x, addr, err, align, insn, cb) \ 353 - __asm__ __volatile__( \ 352 + __asm__ __volatile__( \ 354 353 __check_align_##align \ 355 354 "1: "insn" %2, %3, 0 \n" \ 356 355 "2: \n" \ ··· 361 360 "5: \n" \ 362 361 " l32r %1, 4b \n" \ 363 362 " movi %2, 0 \n" \ 364 - " movi %0, %4 \n" \ 365 - " jx %1 \n" \ 363 + " movi %0, %4 \n" \ 364 + " jx %1 \n" \ 366 365 " .previous \n" \ 367 366 " .section __ex_table,\"a\" \n" \ 368 367 " .long 1b, 5b \n" \ ··· 422 421 423 422 #define copy_to_user(to,from,n) __generic_copy_to_user((to),(from),(n)) 424 423 #define copy_from_user(to,from,n) __generic_copy_from_user((to),(from),(n)) 425 - #define __copy_to_user(to,from,n) __generic_copy_to_user_nocheck((to),(from),(n)) 426 - #define __copy_from_user(to,from,n) __generic_copy_from_user_nocheck((to),(from),(n)) 424 + #define __copy_to_user(to,from,n) \ 425 + __generic_copy_to_user_nocheck((to),(from),(n)) 426 + #define __copy_from_user(to,from,n) \ 427 + __generic_copy_from_user_nocheck((to),(from),(n)) 427 428 #define __copy_to_user_inatomic __copy_to_user 428 429 #define __copy_from_user_inatomic __copy_from_user 429 430
+4 -4
arch/xtensa/kernel/Makefile
··· 23 23 # 24 24 # Replicate rules in scripts/Makefile.build 25 25 26 - sed-y = -e 's/\*(\(\.[a-z]*it\|\.ref\|\)\.text)/*(\1.literal \1.text)/g' \ 27 - -e 's/\.text\.unlikely/.literal.unlikely .text.unlikely/g' \ 26 + sed-y = -e 's/\*(\(\.[a-z]*it\|\.ref\|\)\.text)/*(\1.literal \1.text)/g' \ 27 + -e 's/\.text\.unlikely/.literal.unlikely .text.unlikely/g' \ 28 28 -e 's/\*(\(\.text\.[a-z]*\))/*(\1.literal \1)/g' 29 29 30 30 quiet_cmd__cpp_lds_S = LDS $@ 31 - cmd__cpp_lds_S = $(CPP) $(cpp_flags) -P -C -Uxtensa -D__ASSEMBLY__ $< \ 32 - | sed $(sed-y) >$@ 31 + cmd__cpp_lds_S = $(CPP) $(cpp_flags) -P -C -Uxtensa -D__ASSEMBLY__ $< \ 32 + | sed $(sed-y) >$@ 33 33 34 34 $(obj)/vmlinux.lds: $(src)/vmlinux.lds.S FORCE 35 35 $(call if_changed_dep,_cpp_lds_S)
+1 -2
arch/xtensa/kernel/align.S
··· 442 442 mov a1, a2 443 443 444 444 rsr a0, ps 445 - bbsi.l a2, PS_UM_BIT, 1f # jump if user mode 445 + bbsi.l a2, PS_UM_BIT, 1f # jump if user mode 446 446 447 447 movi a0, _kernel_exception 448 448 jx a0 ··· 453 453 ENDPROC(fast_unaligned) 454 454 455 455 #endif /* XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION */ 456 -
+2 -2
arch/xtensa/kernel/asm-offsets.c
··· 92 92 #endif 93 93 DEFINE(THREAD_XTREGS_USER, offsetof (struct thread_info, xtregs_user)); 94 94 DEFINE(XTREGS_USER_SIZE, sizeof(xtregs_user_t)); 95 - DEFINE(THREAD_CURRENT_DS, offsetof (struct task_struct, thread.current_ds)); 95 + DEFINE(THREAD_CURRENT_DS, offsetof (struct task_struct, \ 96 + thread.current_ds)); 96 97 97 98 /* struct mm_struct */ 98 99 DEFINE(MM_USERS, offsetof(struct mm_struct, mm_users)); ··· 110 109 111 110 return 0; 112 111 } 113 -
+1 -2
arch/xtensa/kernel/coprocessor.S
··· 172 172 ENDPROC(coprocessor_load) 173 173 174 174 /* 175 - * coprocessor_flush(struct task_info*, index) 175 + * coprocessor_flush(struct task_info*, index) 176 176 * a2 a3 177 177 * coprocessor_restore(struct task_info*, index) 178 178 * a2 a3 ··· 354 354 END(coprocessor_owner) 355 355 356 356 #endif /* XTENSA_HAVE_COPROCESSORS */ 357 -
+12 -12
arch/xtensa/kernel/entry.S
··· 874 874 875 875 _bnei a0, 1, 1f # no 'movsp a1, ax': jump 876 876 877 - /* Move the save area. This implies the use of the L32E 877 + /* Move the save area. This implies the use of the L32E 878 878 * and S32E instructions, because this move must be done with 879 879 * the user's PS.RING privilege levels, not with ring 0 880 880 * (kernel's) privileges currently active with PS.EXCM ··· 1008 1008 1009 1009 ENTRY(fast_syscall_unrecoverable) 1010 1010 1011 - /* Restore all states. */ 1011 + /* Restore all states. */ 1012 1012 1013 - l32i a0, a2, PT_AREG0 # restore a0 1014 - xsr a2, depc # restore a2, depc 1015 - rsr a3, excsave1 1013 + l32i a0, a2, PT_AREG0 # restore a0 1014 + xsr a2, depc # restore a2, depc 1015 + rsr a3, excsave1 1016 1016 1017 - wsr a0, excsave1 1018 - movi a0, unrecoverable_exception 1019 - callx0 a0 1017 + wsr a0, excsave1 1018 + movi a0, unrecoverable_exception 1019 + callx0 a0 1020 1020 1021 1021 ENDPROC(fast_syscall_unrecoverable) 1022 1022 ··· 1253 1253 1254 1254 movi a3, exc_table 1255 1255 rsr a0, exccause 1256 - addx4 a0, a0, a3 # find entry in table 1257 - l32i a0, a0, EXC_TABLE_FAST_USER # load handler 1258 - jx a0 1256 + addx4 a0, a0, a3 # find entry in table 1257 + l32i a0, a0, EXC_TABLE_FAST_USER # load handler 1258 + jx a0 1259 1259 1260 1260 fast_syscall_spill_registers_fixup_return: 1261 1261 ··· 1457 1457 rsr a0, ps 1458 1458 _bbci.l a0, PS_UM_BIT, 1f 1459 1459 1460 - /* User space: Setup a dummy frame and kill application. 1460 + /* User space: Setup a dummy frame and kill application. 1461 1461 * Note: We assume EXC_TABLE_KSTK contains a valid stack pointer. 1462 1462 */ 1463 1463
+1 -1
arch/xtensa/kernel/module.c
··· 53 53 struct module *mod) 54 54 { 55 55 unsigned int i; 56 - Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; 56 + Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; 57 57 Elf32_Sym *sym; 58 58 unsigned char *location; 59 59 uint32_t value;
-1
arch/xtensa/kernel/platform.c
··· 44 44 ccount_per_jiffy = 10 * (1000000UL/HZ); 45 45 }); 46 46 #endif 47 -
+1 -1
arch/xtensa/kernel/process.c
··· 108 108 109 109 void cpu_idle(void) 110 110 { 111 - local_irq_enable(); 111 + local_irq_enable(); 112 112 113 113 /* endless idle loop with no priority at all */ 114 114 while (1) {
+1 -2
arch/xtensa/kernel/ptrace.c
··· 154 154 coprocessor_flush_all(ti); 155 155 coprocessor_release_all(ti); 156 156 157 - ret |= __copy_from_user(&ti->xtregs_cp, &xtregs->cp0, 157 + ret |= __copy_from_user(&ti->xtregs_cp, &xtregs->cp0, 158 158 sizeof(xtregs_coprocessor_t)); 159 159 #endif 160 160 ret |= __copy_from_user(&regs->xtregs_opt, &xtregs->opt, ··· 343 343 && (current->ptrace & PT_PTRACED)) 344 344 do_syscall_trace(); 345 345 } 346 -
+3 -4
arch/xtensa/kernel/setup.c
··· 284 284 285 285 /* Parse boot parameters */ 286 286 287 - if (bp_start) 287 + if (bp_start) 288 288 parse_bootparam(bp_start); 289 289 290 290 #ifdef CONFIG_OF ··· 460 460 initrd_is_mapped = mem_reserve(__pa(initrd_start), 461 461 __pa(initrd_end), 0); 462 462 initrd_below_start_ok = 1; 463 - } else { 463 + } else { 464 464 initrd_start = 0; 465 465 } 466 466 #endif ··· 539 539 "core ID\t\t: " XCHAL_CORE_ID "\n" 540 540 "build ID\t: 0x%x\n" 541 541 "byte order\t: %s\n" 542 - "cpu MHz\t\t: %lu.%02lu\n" 542 + "cpu MHz\t\t: %lu.%02lu\n" 543 543 "bogomips\t: %lu.%02lu\n", 544 544 XCHAL_BUILD_UNIQUE_ID, 545 545 XCHAL_HAVE_BE ? "big" : "little", ··· 681 681 }; 682 682 683 683 #endif /* CONFIG_PROC_FS */ 684 -
+4 -4
arch/xtensa/kernel/signal.c
··· 212 212 if (err) 213 213 return err; 214 214 215 - /* The signal handler may have used coprocessors in which 215 + /* The signal handler may have used coprocessors in which 216 216 * case they are still enabled. We disable them to force a 217 217 * reloading of the original task's CP state by the lazy 218 218 * context-switching mechanisms of CP exception handling. ··· 396 396 */ 397 397 398 398 /* Set up registers for signal handler */ 399 - start_thread(regs, (unsigned long) ka->sa.sa_handler, 399 + start_thread(regs, (unsigned long) ka->sa.sa_handler, 400 400 (unsigned long) frame); 401 401 402 402 /* Set up a stack frame for a call4 ··· 424 424 return -EFAULT; 425 425 } 426 426 427 - asmlinkage long xtensa_sigaltstack(const stack_t __user *uss, 427 + asmlinkage long xtensa_sigaltstack(const stack_t __user *uss, 428 428 stack_t __user *uoss, 429 - long a2, long a3, long a4, long a5, 429 + long a2, long a3, long a4, long a5, 430 430 struct pt_regs *regs) 431 431 { 432 432 return do_sigaltstack(uss, uoss, regs->areg[1]);
-1
arch/xtensa/kernel/syscall.c
··· 52 52 { 53 53 return sys_fadvise64_64(fd, offset, len, advice); 54 54 } 55 -
+3 -4
arch/xtensa/kernel/traps.c
··· 408 408 "wsr a13, sar\n\t" 409 409 "wsr a14, ps\n\t" 410 410 :: "a" (&a0), "a" (&ps) 411 - : "a2", "a3", "a4", "a7", "a11", "a12", "a13", "a14", "a15", "memory"); 411 + : "a2", "a3", "a4", "a7", "a11", "a12", "a13", "a14", "a15", 412 + "memory"); 412 413 } 413 414 414 415 void show_trace(struct task_struct *task, unsigned long *sp) ··· 464 463 465 464 if (!sp) 466 465 sp = stack_pointer(task); 467 - stack = sp; 466 + stack = sp; 468 467 469 468 printk("\nStack: "); 470 469 ··· 535 534 536 535 do_exit(err); 537 536 } 538 - 539 -
-2
arch/xtensa/kernel/vectors.S
··· 485 485 ENDPROC(_WindowUnderflow12) 486 486 487 487 .text 488 - 489 -
+5 -5
arch/xtensa/lib/checksum.S
··· 41 41 42 42 .text 43 43 ENTRY(csum_partial) 44 - /* 45 - * Experiments with Ethernet and SLIP connections show that buf 46 - * is aligned on either a 2-byte or 4-byte boundary. 47 - */ 44 + 45 + /* 46 + * Experiments with Ethernet and SLIP connections show that buf 47 + * is aligned on either a 2-byte or 4-byte boundary. 48 + */ 48 49 entry sp, 32 49 50 extui a5, a2, 0, 2 50 51 bnez a5, 8f /* branch if 2-byte aligned */ ··· 410 409 retw 411 410 412 411 .previous 413 -
+4 -2
arch/xtensa/lib/memcopy.S
··· 210 210 _beqz a4, .Ldone # avoid loading anything for zero-length copies 211 211 # copy 16 bytes per iteration for word-aligned dst and unaligned src 212 212 ssa8 a3 # set shift amount from byte offset 213 - #define SIM_CHECKS_ALIGNMENT 1 /* set to 1 when running on ISS (simulator) with the 214 - lint or ferret client, or 0 to save a few cycles */ 213 + 214 + /* set to 1 when running on ISS (simulator) with the 215 + lint or ferret client, or 0 to save a few cycles */ 216 + #define SIM_CHECKS_ALIGNMENT 1 215 217 #if XCHAL_UNALIGNED_LOAD_EXCEPTION || SIM_CHECKS_ALIGNMENT 216 218 and a11, a3, a8 # save unalignment offset for below 217 219 sub a3, a3, a11 # align a3
+2 -7
arch/xtensa/lib/pci-auto.c
··· 241 241 unsigned char header_type; 242 242 struct pci_dev *dev = &pciauto_dev; 243 243 244 - pciauto_dev.bus = &pciauto_bus; 245 - pciauto_dev.sysdata = pci_ctrl; 244 + pciauto_dev.bus = &pciauto_bus; 245 + pciauto_dev.sysdata = pci_ctrl; 246 246 pciauto_bus.ops = pci_ctrl->ops; 247 247 248 248 /* ··· 345 345 } 346 346 return sub_bus; 347 347 } 348 - 349 - 350 - 351 - 352 -
+2 -2
arch/xtensa/lib/strncpy_user.S
··· 166 166 retw 167 167 .Lz1: # byte 1 is zero 168 168 #ifdef __XTENSA_EB__ 169 - extui a9, a9, 16, 16 169 + extui a9, a9, 16, 16 170 170 #endif /* __XTENSA_EB__ */ 171 171 EX(s16i, a9, a11, 0, fixup_s) 172 172 addi a11, a11, 1 # advance dst pointer ··· 174 174 retw 175 175 .Lz2: # byte 2 is zero 176 176 #ifdef __XTENSA_EB__ 177 - extui a9, a9, 16, 16 177 + extui a9, a9, 16, 16 178 178 #endif /* __XTENSA_EB__ */ 179 179 EX(s16i, a9, a11, 0, fixup_s) 180 180 movi a9, 0
-1
arch/xtensa/lib/strnlen_user.S
··· 145 145 lenfixup: 146 146 movi a2, 0 147 147 retw 148 -
-1
arch/xtensa/lib/usercopy.S
··· 318 318 /* Ignore memset return value in a6. */ 319 319 /* a2 still contains bytes not copied. */ 320 320 retw 321 -
+13 -14
arch/xtensa/mm/cache.c
··· 118 118 * For now, flush the whole cache. FIXME?? 119 119 */ 120 120 121 - void flush_cache_range(struct vm_area_struct* vma, 121 + void flush_cache_range(struct vm_area_struct* vma, 122 122 unsigned long start, unsigned long end) 123 123 { 124 124 __flush_invalidate_dcache_all(); ··· 133 133 */ 134 134 135 135 void flush_cache_page(struct vm_area_struct* vma, unsigned long address, 136 - unsigned long pfn) 136 + unsigned long pfn) 137 137 { 138 138 /* Note that we have to use the 'alias' address to avoid multi-hit */ 139 139 ··· 166 166 167 167 if (!PageReserved(page) && test_bit(PG_arch_1, &page->flags)) { 168 168 169 - unsigned long vaddr = TLBTEMP_BASE_1 + (addr & DCACHE_ALIAS_MASK); 170 169 unsigned long paddr = (unsigned long) page_address(page); 171 170 unsigned long phys = page_to_phys(page); 171 + unsigned long tmp = TLBTEMP_BASE_1 + (addr & DCACHE_ALIAS_MASK); 172 172 173 173 __flush_invalidate_dcache_page(paddr); 174 174 175 - __flush_invalidate_dcache_page_alias(vaddr, phys); 176 - __invalidate_icache_page_alias(vaddr, phys); 175 + __flush_invalidate_dcache_page_alias(tmp, phys); 176 + __invalidate_icache_page_alias(tmp, phys); 177 177 178 178 clear_bit(PG_arch_1, &page->flags); 179 179 } ··· 195 195 196 196 #if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK 197 197 198 - void copy_to_user_page(struct vm_area_struct *vma, struct page *page, 198 + void copy_to_user_page(struct vm_area_struct *vma, struct page *page, 199 199 unsigned long vaddr, void *dst, const void *src, 200 200 unsigned long len) 201 201 { ··· 205 205 /* Flush and invalidate user page if aliased. */ 206 206 207 207 if (alias) { 208 - unsigned long temp = TLBTEMP_BASE_1 + (vaddr & DCACHE_ALIAS_MASK); 209 - __flush_invalidate_dcache_page_alias(temp, phys); 208 + unsigned long t = TLBTEMP_BASE_1 + (vaddr & DCACHE_ALIAS_MASK); 209 + __flush_invalidate_dcache_page_alias(t, phys); 210 210 } 211 211 212 212 /* Copy data */ ··· 219 219 */ 220 220 221 221 if (alias) { 222 - unsigned long temp = TLBTEMP_BASE_1 + (vaddr & DCACHE_ALIAS_MASK); 222 + unsigned long t = TLBTEMP_BASE_1 + (vaddr & DCACHE_ALIAS_MASK); 223 223 224 224 __flush_invalidate_dcache_range((unsigned long) dst, len); 225 - if ((vma->vm_flags & VM_EXEC) != 0) { 226 - __invalidate_icache_page_alias(temp, phys); 227 - } 225 + if ((vma->vm_flags & VM_EXEC) != 0) 226 + __invalidate_icache_page_alias(t, phys); 228 227 229 228 } else if ((vma->vm_flags & VM_EXEC) != 0) { 230 229 __flush_dcache_range((unsigned long)dst,len); ··· 244 245 */ 245 246 246 247 if (alias) { 247 - unsigned long temp = TLBTEMP_BASE_1 + (vaddr & DCACHE_ALIAS_MASK); 248 - __flush_invalidate_dcache_page_alias(temp, phys); 248 + unsigned long t = TLBTEMP_BASE_1 + (vaddr & DCACHE_ALIAS_MASK); 249 + __flush_invalidate_dcache_page_alias(t, phys); 249 250 } 250 251 251 252 memcpy(dst, src, len);
-1
arch/xtensa/mm/fault.c
··· 254 254 die("Oops", regs, sig); 255 255 do_exit(sig); 256 256 } 257 -
+8 -8
arch/xtensa/mm/init.c
··· 75 75 sysmem.nr_banks++; 76 76 } 77 77 sysmem.bank[i].end = start; 78 + 79 + } else if (end < sysmem.bank[i].end) { 80 + sysmem.bank[i].start = end; 81 + 78 82 } else { 79 - if (end < sysmem.bank[i].end) 80 - sysmem.bank[i].start = end; 81 - else { 82 - /* remove entry */ 83 - sysmem.nr_banks--; 84 - sysmem.bank[i].start = sysmem.bank[sysmem.nr_banks].start; 85 - sysmem.bank[i].end = sysmem.bank[sysmem.nr_banks].end; 86 - } 83 + /* remove entry */ 84 + sysmem.nr_banks--; 85 + sysmem.bank[i].start = sysmem.bank[sysmem.nr_banks].start; 86 + sysmem.bank[i].end = sysmem.bank[sysmem.nr_banks].end; 87 87 } 88 88 return -1; 89 89 }
+1 -1
arch/xtensa/mm/misc.S
··· 180 180 181 181 ENTRY(copy_user_page) 182 182 183 - entry a1, 32 183 + entry a1, 32 184 184 185 185 /* Mark page dirty and determine alias for destination. */ 186 186
+3 -4
arch/xtensa/mm/tlb.c
··· 82 82 #endif 83 83 84 84 void flush_tlb_range (struct vm_area_struct *vma, 85 - unsigned long start, unsigned long end) 85 + unsigned long start, unsigned long end) 86 86 { 87 87 struct mm_struct *mm = vma->vm_mm; 88 88 unsigned long flags; ··· 100 100 int oldpid = get_rasid_register(); 101 101 set_rasid_register (ASID_INSERT(mm->context)); 102 102 start &= PAGE_MASK; 103 - if (vma->vm_flags & VM_EXEC) 103 + if (vma->vm_flags & VM_EXEC) 104 104 while(start < end) { 105 105 invalidate_itlb_mapping(start); 106 106 invalidate_dtlb_mapping(start); ··· 130 130 131 131 local_save_flags(flags); 132 132 133 - oldpid = get_rasid_register(); 133 + oldpid = get_rasid_register(); 134 134 135 135 if (vma->vm_flags & VM_EXEC) 136 136 invalidate_itlb_mapping(page); ··· 140 140 141 141 local_irq_restore(flags); 142 142 } 143 -