diff options
author | Chris Zankel <chris@zankel.net> | 2012-11-28 19:53:51 -0500 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2012-12-19 00:10:25 -0500 |
commit | c4c4594b005d89b56964071bbbdeb07daac5bc76 (patch) | |
tree | 4c0b50ba3b87a53768bdd7161e90e9874b498127 /arch/xtensa | |
parent | 72100ed7efac290f24bd90a5e7c8bc9f231d167d (diff) |
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>
Diffstat (limited to 'arch/xtensa')
49 files changed, 160 insertions, 175 deletions
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile index 4a8a6ffb68ba..4276721f5ae1 100644 --- a/arch/xtensa/Makefile +++ b/arch/xtensa/Makefile | |||
@@ -106,4 +106,3 @@ zImage: vmlinux | |||
106 | define archhelp | 106 | define archhelp |
107 | @echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)' | 107 | @echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)' |
108 | endef | 108 | endef |
109 | |||
diff --git a/arch/xtensa/include/asm/bootparam.h b/arch/xtensa/include/asm/bootparam.h index 057077e96c98..0c25799facab 100644 --- a/arch/xtensa/include/asm/bootparam.h +++ b/arch/xtensa/include/asm/bootparam.h | |||
@@ -32,15 +32,15 @@ | |||
32 | /* All records are aligned to 4 bytes */ | 32 | /* All records are aligned to 4 bytes */ |
33 | 33 | ||
34 | typedef struct bp_tag { | 34 | typedef struct bp_tag { |
35 | unsigned short id; /* tag id */ | 35 | unsigned short id; /* tag id */ |
36 | unsigned short size; /* size of this record excluding the structure*/ | 36 | unsigned short size; /* size of this record excluding the structure*/ |
37 | unsigned long data[0]; /* data */ | 37 | unsigned long data[0]; /* data */ |
38 | } bp_tag_t; | 38 | } bp_tag_t; |
39 | 39 | ||
40 | typedef struct meminfo { | 40 | typedef struct meminfo { |
41 | unsigned long type; | 41 | unsigned long type; |
42 | unsigned long start; | 42 | unsigned long start; |
43 | unsigned long end; | 43 | unsigned long end; |
44 | } meminfo_t; | 44 | } meminfo_t; |
45 | 45 | ||
46 | #define SYSMEM_BANKS_MAX 5 | 46 | #define SYSMEM_BANKS_MAX 5 |
@@ -49,14 +49,11 @@ typedef struct meminfo { | |||
49 | #define MEMORY_TYPE_NONE 0x2000 | 49 | #define MEMORY_TYPE_NONE 0x2000 |
50 | 50 | ||
51 | typedef struct sysmem_info { | 51 | typedef struct sysmem_info { |
52 | int nr_banks; | 52 | int nr_banks; |
53 | meminfo_t bank[SYSMEM_BANKS_MAX]; | 53 | meminfo_t bank[SYSMEM_BANKS_MAX]; |
54 | } sysmem_info_t; | 54 | } sysmem_info_t; |
55 | 55 | ||
56 | extern sysmem_info_t sysmem; | 56 | extern sysmem_info_t sysmem; |
57 | 57 | ||
58 | #endif | 58 | #endif |
59 | #endif | 59 | #endif |
60 | |||
61 | |||
62 | |||
diff --git a/arch/xtensa/include/asm/cacheasm.h b/arch/xtensa/include/asm/cacheasm.h index 2c20a58f94cd..60e18773ecb8 100644 --- a/arch/xtensa/include/asm/cacheasm.h +++ b/arch/xtensa/include/asm/cacheasm.h | |||
@@ -174,4 +174,3 @@ | |||
174 | __loop_cache_page \ar \as ihi XCHAL_ICACHE_LINEWIDTH | 174 | __loop_cache_page \ar \as ihi XCHAL_ICACHE_LINEWIDTH |
175 | 175 | ||
176 | .endm | 176 | .endm |
177 | |||
diff --git a/arch/xtensa/include/asm/cacheflush.h b/arch/xtensa/include/asm/cacheflush.h index 569fec4f9a20..127cd48883c4 100644 --- a/arch/xtensa/include/asm/cacheflush.h +++ b/arch/xtensa/include/asm/cacheflush.h | |||
@@ -104,7 +104,8 @@ static inline void __invalidate_icache_page_alias(unsigned long virt, | |||
104 | #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1 | 104 | #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1 |
105 | extern void flush_dcache_page(struct page*); | 105 | extern void flush_dcache_page(struct page*); |
106 | extern void flush_cache_range(struct vm_area_struct*, ulong, ulong); | 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 | #else | 110 | #else |
110 | 111 | ||
diff --git a/arch/xtensa/include/asm/checksum.h b/arch/xtensa/include/asm/checksum.h index e4d831a30772..aed7ad68ca46 100644 --- a/arch/xtensa/include/asm/checksum.h +++ b/arch/xtensa/include/asm/checksum.h | |||
@@ -36,8 +36,9 @@ asmlinkage __wsum csum_partial(const void *buff, int len, __wsum sum); | |||
36 | * better 64-bit) boundary | 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, | 39 | asmlinkage __wsum csum_partial_copy_generic(const void *src, void *dst, |
40 | int *src_err_ptr, int *dst_err_ptr); | 40 | int len, __wsum sum, |
41 | int *src_err_ptr, int *dst_err_ptr); | ||
41 | 42 | ||
42 | /* | 43 | /* |
43 | * Note: when you get a NULL pointer exception here this means someone | 44 | * Note: when you get a NULL pointer exception here this means someone |
@@ -54,7 +55,7 @@ __wsum csum_partial_copy_nocheck(const void *src, void *dst, | |||
54 | 55 | ||
55 | static inline | 56 | static inline |
56 | __wsum csum_partial_copy_from_user(const void __user *src, void *dst, | 57 | __wsum csum_partial_copy_from_user(const void __user *src, void *dst, |
57 | int len, __wsum sum, int *err_ptr) | 58 | int len, __wsum sum, int *err_ptr) |
58 | { | 59 | { |
59 | return csum_partial_copy_generic((__force const void *)src, dst, | 60 | return csum_partial_copy_generic((__force const void *)src, dst, |
60 | len, sum, err_ptr, NULL); | 61 | len, sum, err_ptr, NULL); |
@@ -112,7 +113,8 @@ static __inline__ __sum16 ip_fast_csum(const void *iph, unsigned int ihl) | |||
112 | /* Since the input registers which are loaded with iph and ihl | 113 | /* Since the input registers which are loaded with iph and ihl |
113 | are modified, we must also specify them as outputs, or gcc | 114 | are modified, we must also specify them as outputs, or gcc |
114 | will assume they contain their original values. */ | 115 | will assume they contain their original values. */ |
115 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (tmp), "=&r" (endaddr) | 116 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (tmp), |
117 | "=&r" (endaddr) | ||
116 | : "1" (iph), "2" (ihl) | 118 | : "1" (iph), "2" (ihl) |
117 | : "memory"); | 119 | : "memory"); |
118 | 120 | ||
@@ -168,7 +170,7 @@ static __inline__ __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, | |||
168 | 170 | ||
169 | static __inline__ __sum16 ip_compute_csum(const void *buff, int len) | 171 | static __inline__ __sum16 ip_compute_csum(const void *buff, int len) |
170 | { | 172 | { |
171 | return csum_fold (csum_partial(buff, len, 0)); | 173 | return csum_fold (csum_partial(buff, len, 0)); |
172 | } | 174 | } |
173 | 175 | ||
174 | #define _HAVE_ARCH_IPV6_CSUM | 176 | #define _HAVE_ARCH_IPV6_CSUM |
@@ -238,11 +240,12 @@ static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr, | |||
238 | * Copy and checksum to user | 240 | * Copy and checksum to user |
239 | */ | 241 | */ |
240 | #define HAVE_CSUM_COPY_USER | 242 | #define HAVE_CSUM_COPY_USER |
241 | static __inline__ __wsum csum_and_copy_to_user(const void *src, void __user *dst, | 243 | static __inline__ __wsum csum_and_copy_to_user(const void *src, |
242 | int len, __wsum sum, int *err_ptr) | 244 | void __user *dst, int len, |
245 | __wsum sum, int *err_ptr) | ||
243 | { | 246 | { |
244 | if (access_ok(VERIFY_WRITE, dst, len)) | 247 | if (access_ok(VERIFY_WRITE, dst, len)) |
245 | return csum_partial_copy_generic(src, dst, len, sum, NULL, err_ptr); | 248 | return csum_partial_copy_generic(src,dst,len,sum,NULL,err_ptr); |
246 | 249 | ||
247 | if (len) | 250 | if (len) |
248 | *err_ptr = -EFAULT; | 251 | *err_ptr = -EFAULT; |
diff --git a/arch/xtensa/include/asm/cmpxchg.h b/arch/xtensa/include/asm/cmpxchg.h index 25869a190490..d9ab131bc1aa 100644 --- a/arch/xtensa/include/asm/cmpxchg.h +++ b/arch/xtensa/include/asm/cmpxchg.h | |||
@@ -134,7 +134,8 @@ static inline unsigned long xchg_u32(volatile int * m, unsigned long val) | |||
134 | #endif | 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 | * This only works if the compiler isn't horribly bad at optimizing. | 141 | * This only works if the compiler isn't horribly bad at optimizing. |
diff --git a/arch/xtensa/include/asm/current.h b/arch/xtensa/include/asm/current.h index 8d1eb5d78649..47e46dcf5d49 100644 --- a/arch/xtensa/include/asm/current.h +++ b/arch/xtensa/include/asm/current.h | |||
@@ -30,7 +30,7 @@ static inline struct task_struct *get_current(void) | |||
30 | 30 | ||
31 | #define GET_CURRENT(reg,sp) \ | 31 | #define GET_CURRENT(reg,sp) \ |
32 | GET_THREAD_INFO(reg,sp); \ | 32 | GET_THREAD_INFO(reg,sp); \ |
33 | l32i reg, reg, TI_TASK \ | 33 | l32i reg, reg, TI_TASK \ |
34 | 34 | ||
35 | #endif | 35 | #endif |
36 | 36 | ||
diff --git a/arch/xtensa/include/asm/delay.h b/arch/xtensa/include/asm/delay.h index 58c0a4fd4003..61fc5faeb46c 100644 --- a/arch/xtensa/include/asm/delay.h +++ b/arch/xtensa/include/asm/delay.h | |||
@@ -19,9 +19,9 @@ extern unsigned long loops_per_jiffy; | |||
19 | 19 | ||
20 | static inline void __delay(unsigned long loops) | 20 | static inline void __delay(unsigned long loops) |
21 | { | 21 | { |
22 | /* 2 cycles per loop. */ | 22 | /* 2 cycles per loop. */ |
23 | __asm__ __volatile__ ("1: addi %0, %0, -2; bgeui %0, 2, 1b" | 23 | __asm__ __volatile__ ("1: addi %0, %0, -2; bgeui %0, 2, 1b" |
24 | : "=r" (loops) : "0" (loops)); | 24 | : "=r" (loops) : "0" (loops)); |
25 | } | 25 | } |
26 | 26 | ||
27 | static __inline__ u32 xtensa_get_ccount(void) | 27 | static __inline__ u32 xtensa_get_ccount(void) |
@@ -46,4 +46,3 @@ static __inline__ void udelay (unsigned long usecs) | |||
46 | } | 46 | } |
47 | 47 | ||
48 | #endif | 48 | #endif |
49 | |||
diff --git a/arch/xtensa/include/asm/dma-mapping.h b/arch/xtensa/include/asm/dma-mapping.h index eb69743172b1..4acb5feba1fb 100644 --- a/arch/xtensa/include/asm/dma-mapping.h +++ b/arch/xtensa/include/asm/dma-mapping.h | |||
@@ -100,8 +100,8 @@ dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size, | |||
100 | } | 100 | } |
101 | 101 | ||
102 | static inline void | 102 | static inline void |
103 | dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size, | 103 | dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, |
104 | enum dma_data_direction direction) | 104 | size_t size, enum dma_data_direction direction) |
105 | { | 105 | { |
106 | consistent_sync((void *)bus_to_virt(dma_handle), size, direction); | 106 | consistent_sync((void *)bus_to_virt(dma_handle), size, direction); |
107 | } | 107 | } |
diff --git a/arch/xtensa/include/asm/elf.h b/arch/xtensa/include/asm/elf.h index 5293312bc6a4..264d5fa450d8 100644 --- a/arch/xtensa/include/asm/elf.h +++ b/arch/xtensa/include/asm/elf.h | |||
@@ -168,11 +168,11 @@ extern void xtensa_elf_core_copy_regs (xtensa_gregset_t *, struct pt_regs *); | |||
168 | */ | 168 | */ |
169 | 169 | ||
170 | #define ELF_PLAT_INIT(_r, load_addr) \ | 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; \ | 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; \ | 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; \ | 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; \ | 174 | _r->areg[12]=0; _r->areg[13]=0; _r->areg[14]=0; _r->areg[15]=0; \ |
175 | } while (0) | 175 | } while (0) |
176 | 176 | ||
177 | typedef struct { | 177 | typedef struct { |
178 | xtregs_opt_t opt; | 178 | xtregs_opt_t opt; |
diff --git a/arch/xtensa/include/asm/highmem.h b/arch/xtensa/include/asm/highmem.h index 0a046ca5a687..80be15124697 100644 --- a/arch/xtensa/include/asm/highmem.h +++ b/arch/xtensa/include/asm/highmem.h | |||
@@ -14,4 +14,3 @@ | |||
14 | extern void flush_cache_kmaps(void); | 14 | extern void flush_cache_kmaps(void); |
15 | 15 | ||
16 | #endif | 16 | #endif |
17 | |||
diff --git a/arch/xtensa/include/asm/mmu_context.h b/arch/xtensa/include/asm/mmu_context.h index feb10af96519..d43525a286bb 100644 --- a/arch/xtensa/include/asm/mmu_context.h +++ b/arch/xtensa/include/asm/mmu_context.h | |||
@@ -107,7 +107,7 @@ activate_mm(struct mm_struct *prev, struct mm_struct *next) | |||
107 | 107 | ||
108 | 108 | ||
109 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | 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 | unsigned long asid = asid_cache; | 112 | unsigned long asid = asid_cache; |
113 | 113 | ||
diff --git a/arch/xtensa/include/asm/nommu_context.h b/arch/xtensa/include/asm/nommu_context.h index 599e7a2e729d..3407cf7989b7 100644 --- a/arch/xtensa/include/asm/nommu_context.h +++ b/arch/xtensa/include/asm/nommu_context.h | |||
@@ -2,7 +2,7 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | |||
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 | return 0; | 7 | return 0; |
8 | } | 8 | } |
diff --git a/arch/xtensa/include/asm/page.h b/arch/xtensa/include/asm/page.h index 7a5591a71f85..47f582333f6b 100644 --- a/arch/xtensa/include/asm/page.h +++ b/arch/xtensa/include/asm/page.h | |||
@@ -29,19 +29,19 @@ | |||
29 | * PAGE_SHIFT determines the page size | 29 | * PAGE_SHIFT determines the page size |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #define PAGE_SHIFT 12 | 32 | #define PAGE_SHIFT 12 |
33 | #define PAGE_SIZE (__XTENSA_UL_CONST(1) << PAGE_SHIFT) | 33 | #define PAGE_SIZE (__XTENSA_UL_CONST(1) << PAGE_SHIFT) |
34 | #define PAGE_MASK (~(PAGE_SIZE-1)) | 34 | #define PAGE_MASK (~(PAGE_SIZE-1)) |
35 | 35 | ||
36 | #ifdef CONFIG_MMU | 36 | #ifdef CONFIG_MMU |
37 | #define PAGE_OFFSET XCHAL_KSEG_CACHED_VADDR | 37 | #define PAGE_OFFSET XCHAL_KSEG_CACHED_VADDR |
38 | #define MAX_MEM_PFN XCHAL_KSEG_SIZE | 38 | #define MAX_MEM_PFN XCHAL_KSEG_SIZE |
39 | #else | 39 | #else |
40 | #define PAGE_OFFSET 0 | 40 | #define PAGE_OFFSET 0 |
41 | #define MAX_MEM_PFN (PLATFORM_DEFAULT_MEM_START + PLATFORM_DEFAULT_MEM_SIZE) | 41 | #define MAX_MEM_PFN (PLATFORM_DEFAULT_MEM_START + PLATFORM_DEFAULT_MEM_SIZE) |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | #define PGTABLE_START 0x80000000 | 44 | #define PGTABLE_START 0x80000000 |
45 | 45 | ||
46 | /* | 46 | /* |
47 | * Cache aliasing: | 47 | * Cache aliasing: |
@@ -161,7 +161,9 @@ extern void copy_user_page(void*, void*, unsigned long, struct page*); | |||
161 | 161 | ||
162 | #define __pa(x) ((unsigned long) (x) - PAGE_OFFSET) | 162 | #define __pa(x) ((unsigned long) (x) - PAGE_OFFSET) |
163 | #define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET)) | 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 | #ifdef CONFIG_DISCONTIGMEM | 167 | #ifdef CONFIG_DISCONTIGMEM |
166 | # error CONFIG_DISCONTIGMEM not supported | 168 | # error CONFIG_DISCONTIGMEM not supported |
167 | #endif | 169 | #endif |
diff --git a/arch/xtensa/include/asm/pci-bridge.h b/arch/xtensa/include/asm/pci-bridge.h index 00fcbd7c534a..0b68c76ec1e6 100644 --- a/arch/xtensa/include/asm/pci-bridge.h +++ b/arch/xtensa/include/asm/pci-bridge.h | |||
@@ -35,7 +35,7 @@ struct pci_space { | |||
35 | struct pci_controller { | 35 | struct pci_controller { |
36 | int index; /* used for pci_controller_num */ | 36 | int index; /* used for pci_controller_num */ |
37 | struct pci_controller *next; | 37 | struct pci_controller *next; |
38 | struct pci_bus *bus; | 38 | struct pci_bus *bus; |
39 | void *arch_data; | 39 | void *arch_data; |
40 | 40 | ||
41 | int first_busno; | 41 | int first_busno; |
diff --git a/arch/xtensa/include/asm/pci.h b/arch/xtensa/include/asm/pci.h index 05244f07dd31..614be031a79a 100644 --- a/arch/xtensa/include/asm/pci.h +++ b/arch/xtensa/include/asm/pci.h | |||
@@ -53,7 +53,7 @@ struct pci_dev; | |||
53 | 53 | ||
54 | /* Map a range of PCI memory or I/O space for a device into user space */ | 54 | /* Map a range of PCI memory or I/O space for a device into user space */ |
55 | int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, | 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 | /* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */ | 58 | /* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */ |
59 | #define HAVE_PCI_MMAP 1 | 59 | #define HAVE_PCI_MMAP 1 |
diff --git a/arch/xtensa/include/asm/pgalloc.h b/arch/xtensa/include/asm/pgalloc.h index 40cf9bceda2c..cf914c8c249a 100644 --- a/arch/xtensa/include/asm/pgalloc.h +++ b/arch/xtensa/include/asm/pgalloc.h | |||
@@ -42,7 +42,7 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) | |||
42 | 42 | ||
43 | extern struct kmem_cache *pgtable_cache; | 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 | unsigned long address) | 46 | unsigned long address) |
47 | { | 47 | { |
48 | return kmem_cache_alloc(pgtable_cache, GFP_KERNEL|__GFP_REPEAT); | 48 | return kmem_cache_alloc(pgtable_cache, GFP_KERNEL|__GFP_REPEAT); |
diff --git a/arch/xtensa/include/asm/pgtable.h b/arch/xtensa/include/asm/pgtable.h index b03c043ce75b..c90ea5bfa1b4 100644 --- a/arch/xtensa/include/asm/pgtable.h +++ b/arch/xtensa/include/asm/pgtable.h | |||
@@ -284,7 +284,7 @@ struct vm_area_struct; | |||
284 | 284 | ||
285 | static inline int | 285 | static inline int |
286 | ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, | 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 | pte_t pte = *ptep; | 289 | pte_t pte = *ptep; |
290 | if (!pte_young(pte)) | 290 | if (!pte_young(pte)) |
@@ -304,8 +304,8 @@ ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | |||
304 | static inline void | 304 | static inline void |
305 | ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | 305 | ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) |
306 | { | 306 | { |
307 | pte_t pte = *ptep; | 307 | pte_t pte = *ptep; |
308 | update_pte(ptep, pte_wrprotect(pte)); | 308 | update_pte(ptep, pte_wrprotect(pte)); |
309 | } | 309 | } |
310 | 310 | ||
311 | /* to find an entry in a kernel page-table-directory */ | 311 | /* to find an entry in a kernel page-table-directory */ |
@@ -399,7 +399,7 @@ extern void update_mmu_cache(struct vm_area_struct * vma, | |||
399 | */ | 399 | */ |
400 | 400 | ||
401 | #define io_remap_pfn_range(vma,from,pfn,size,prot) \ | 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 | typedef pte_t *pte_addr_t; | 404 | typedef pte_t *pte_addr_t; |
405 | 405 | ||
diff --git a/arch/xtensa/include/asm/platform.h b/arch/xtensa/include/asm/platform.h index 7d936e58e9be..ec098b68fb9a 100644 --- a/arch/xtensa/include/asm/platform.h +++ b/arch/xtensa/include/asm/platform.h | |||
@@ -75,4 +75,3 @@ extern int platform_pcibios_fixup (void); | |||
75 | extern void platform_calibrate_ccount (void); | 75 | extern void platform_calibrate_ccount (void); |
76 | 76 | ||
77 | #endif /* _XTENSA_PLATFORM_H */ | 77 | #endif /* _XTENSA_PLATFORM_H */ |
78 | |||
diff --git a/arch/xtensa/include/asm/processor.h b/arch/xtensa/include/asm/processor.h index 2d630e7399ca..e5fb6b0abdf4 100644 --- a/arch/xtensa/include/asm/processor.h +++ b/arch/xtensa/include/asm/processor.h | |||
@@ -89,7 +89,7 @@ | |||
89 | #define MAKE_PC_FROM_RA(ra,sp) (((ra) & 0x3fffffff) | ((sp) & 0xc0000000)) | 89 | #define MAKE_PC_FROM_RA(ra,sp) (((ra) & 0x3fffffff) | ((sp) & 0xc0000000)) |
90 | 90 | ||
91 | typedef struct { | 91 | typedef struct { |
92 | unsigned long seg; | 92 | unsigned long seg; |
93 | } mm_segment_t; | 93 | } mm_segment_t; |
94 | 94 | ||
95 | struct thread_struct { | 95 | struct thread_struct { |
@@ -145,10 +145,10 @@ struct thread_struct { | |||
145 | * set_thread_state in signal.c depends on it. | 145 | * set_thread_state in signal.c depends on it. |
146 | */ | 146 | */ |
147 | #define USER_PS_VALUE ((1 << PS_WOE_BIT) | \ | 147 | #define USER_PS_VALUE ((1 << PS_WOE_BIT) | \ |
148 | (1 << PS_CALLINC_SHIFT) | \ | 148 | (1 << PS_CALLINC_SHIFT) | \ |
149 | (USER_RING << PS_RING_SHIFT) | \ | 149 | (USER_RING << PS_RING_SHIFT) | \ |
150 | (1 << PS_UM_BIT) | \ | 150 | (1 << PS_UM_BIT) | \ |
151 | (1 << PS_EXCM_BIT)) | 151 | (1 << PS_EXCM_BIT)) |
152 | 152 | ||
153 | /* Clearing a0 terminates the backtrace. */ | 153 | /* Clearing a0 terminates the backtrace. */ |
154 | #define start_thread(regs, new_pc, new_sp) \ | 154 | #define start_thread(regs, new_pc, new_sp) \ |
diff --git a/arch/xtensa/include/asm/ptrace.h b/arch/xtensa/include/asm/ptrace.h index 9fe249c8f90e..58bf6fd3f913 100644 --- a/arch/xtensa/include/asm/ptrace.h +++ b/arch/xtensa/include/asm/ptrace.h | |||
@@ -55,7 +55,7 @@ struct pt_regs { | |||
55 | 55 | ||
56 | # define arch_has_single_step() (1) | 56 | # define arch_has_single_step() (1) |
57 | # define task_pt_regs(tsk) ((struct pt_regs*) \ | 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 | # define user_mode(regs) (((regs)->ps & 0x00000020)!=0) | 59 | # define user_mode(regs) (((regs)->ps & 0x00000020)!=0) |
60 | # define instruction_pointer(regs) ((regs)->pc) | 60 | # define instruction_pointer(regs) ((regs)->pc) |
61 | 61 | ||
diff --git a/arch/xtensa/include/asm/regs.h b/arch/xtensa/include/asm/regs.h index 6aaf6d6a5fc4..76096a4e5b8d 100644 --- a/arch/xtensa/include/asm/regs.h +++ b/arch/xtensa/include/asm/regs.h | |||
@@ -109,4 +109,3 @@ | |||
109 | #define DEBUGCAUSE_ICOUNT_BIT 0 /* ICOUNT would incr. to zero */ | 109 | #define DEBUGCAUSE_ICOUNT_BIT 0 /* ICOUNT would incr. to zero */ |
110 | 110 | ||
111 | #endif /* _XTENSA_SPECREG_H */ | 111 | #endif /* _XTENSA_SPECREG_H */ |
112 | |||
diff --git a/arch/xtensa/include/asm/syscall.h b/arch/xtensa/include/asm/syscall.h index b00c928d4cce..8d5e47fad095 100644 --- a/arch/xtensa/include/asm/syscall.h +++ b/arch/xtensa/include/asm/syscall.h | |||
@@ -25,9 +25,10 @@ asmlinkage long xtensa_fadvise64_64(int, int, | |||
25 | /* Should probably move to linux/syscalls.h */ | 25 | /* Should probably move to linux/syscalls.h */ |
26 | struct pollfd; | 26 | struct pollfd; |
27 | asmlinkage long sys_pselect6(int n, fd_set __user *inp, fd_set __user *outp, | 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 | asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds, | 30 | asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds, |
30 | struct timespec __user *tsp, const sigset_t __user *sigmask, | 31 | struct timespec __user *tsp, |
31 | size_t sigsetsize); | 32 | const sigset_t __user *sigmask, |
32 | asmlinkage long sys_rt_sigsuspend(sigset_t __user *unewset, | 33 | size_t sigsetsize); |
33 | size_t sigsetsize); | 34 | asmlinkage long sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize); |
diff --git a/arch/xtensa/include/asm/uaccess.h b/arch/xtensa/include/asm/uaccess.h index 6e4bb3b791ab..fd686dc45d1a 100644 --- a/arch/xtensa/include/asm/uaccess.h +++ b/arch/xtensa/include/asm/uaccess.h | |||
@@ -180,7 +180,8 @@ | |||
180 | #define segment_eq(a,b) ((a).seg == (b).seg) | 180 | #define segment_eq(a,b) ((a).seg == (b).seg) |
181 | 181 | ||
182 | #define __kernel_ok (segment_eq(get_fs(), KERNEL_DS)) | 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 | #define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size))) | 185 | #define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size))) |
185 | #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size)) | 186 | #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size)) |
186 | 187 | ||
@@ -234,10 +235,10 @@ do { \ | |||
234 | int __cb; \ | 235 | int __cb; \ |
235 | retval = 0; \ | 236 | retval = 0; \ |
236 | switch (size) { \ | 237 | switch (size) { \ |
237 | case 1: __put_user_asm(x,ptr,retval,1,"s8i",__cb); break; \ | 238 | 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 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 4: __put_user_asm(x,ptr,retval,4,"s32i",__cb); break; \ |
240 | case 8: { \ | 241 | case 8: { \ |
241 | __typeof__(*ptr) __v64 = x; \ | 242 | __typeof__(*ptr) __v64 = x; \ |
242 | retval = __copy_to_user(ptr,&__v64,8); \ | 243 | retval = __copy_to_user(ptr,&__v64,8); \ |
243 | break; \ | 244 | break; \ |
@@ -291,7 +292,7 @@ do { \ | |||
291 | * __check_align_* macros still work. | 292 | * __check_align_* macros still work. |
292 | */ | 293 | */ |
293 | #define __put_user_asm(x, addr, err, align, insn, cb) \ | 294 | #define __put_user_asm(x, addr, err, align, insn, cb) \ |
294 | __asm__ __volatile__( \ | 295 | __asm__ __volatile__( \ |
295 | __check_align_##align \ | 296 | __check_align_##align \ |
296 | "1: "insn" %2, %3, 0 \n" \ | 297 | "1: "insn" %2, %3, 0 \n" \ |
297 | "2: \n" \ | 298 | "2: \n" \ |
@@ -301,8 +302,8 @@ do { \ | |||
301 | " .long 2b \n" \ | 302 | " .long 2b \n" \ |
302 | "5: \n" \ | 303 | "5: \n" \ |
303 | " l32r %1, 4b \n" \ | 304 | " l32r %1, 4b \n" \ |
304 | " movi %0, %4 \n" \ | 305 | " movi %0, %4 \n" \ |
305 | " jx %1 \n" \ | 306 | " jx %1 \n" \ |
306 | " .previous \n" \ | 307 | " .previous \n" \ |
307 | " .section __ex_table,\"a\" \n" \ | 308 | " .section __ex_table,\"a\" \n" \ |
308 | " .long 1b, 5b \n" \ | 309 | " .long 1b, 5b \n" \ |
@@ -334,13 +335,13 @@ extern long __get_user_bad(void); | |||
334 | do { \ | 335 | do { \ |
335 | int __cb; \ | 336 | int __cb; \ |
336 | retval = 0; \ | 337 | retval = 0; \ |
337 | switch (size) { \ | 338 | switch (size) { \ |
338 | case 1: __get_user_asm(x,ptr,retval,1,"l8ui",__cb); break; \ | 339 | 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 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 4: __get_user_asm(x,ptr,retval,4,"l32i",__cb); break; \ |
341 | case 8: retval = __copy_from_user(&x,ptr,8); break; \ | 342 | case 8: retval = __copy_from_user(&x,ptr,8); break; \ |
342 | default: (x) = __get_user_bad(); \ | 343 | default: (x) = __get_user_bad(); \ |
343 | } \ | 344 | } \ |
344 | } while (0) | 345 | } while (0) |
345 | 346 | ||
346 | 347 | ||
@@ -349,7 +350,7 @@ do { \ | |||
349 | * __check_align_* macros still work. | 350 | * __check_align_* macros still work. |
350 | */ | 351 | */ |
351 | #define __get_user_asm(x, addr, err, align, insn, cb) \ | 352 | #define __get_user_asm(x, addr, err, align, insn, cb) \ |
352 | __asm__ __volatile__( \ | 353 | __asm__ __volatile__( \ |
353 | __check_align_##align \ | 354 | __check_align_##align \ |
354 | "1: "insn" %2, %3, 0 \n" \ | 355 | "1: "insn" %2, %3, 0 \n" \ |
355 | "2: \n" \ | 356 | "2: \n" \ |
@@ -360,8 +361,8 @@ do { \ | |||
360 | "5: \n" \ | 361 | "5: \n" \ |
361 | " l32r %1, 4b \n" \ | 362 | " l32r %1, 4b \n" \ |
362 | " movi %2, 0 \n" \ | 363 | " movi %2, 0 \n" \ |
363 | " movi %0, %4 \n" \ | 364 | " movi %0, %4 \n" \ |
364 | " jx %1 \n" \ | 365 | " jx %1 \n" \ |
365 | " .previous \n" \ | 366 | " .previous \n" \ |
366 | " .section __ex_table,\"a\" \n" \ | 367 | " .section __ex_table,\"a\" \n" \ |
367 | " .long 1b, 5b \n" \ | 368 | " .long 1b, 5b \n" \ |
@@ -421,8 +422,10 @@ __generic_copy_from_user(void *to, const void *from, unsigned long n) | |||
421 | 422 | ||
422 | #define copy_to_user(to,from,n) __generic_copy_to_user((to),(from),(n)) | 423 | #define copy_to_user(to,from,n) __generic_copy_to_user((to),(from),(n)) |
423 | #define copy_from_user(to,from,n) __generic_copy_from_user((to),(from),(n)) | 424 | #define copy_from_user(to,from,n) __generic_copy_from_user((to),(from),(n)) |
424 | #define __copy_to_user(to,from,n) __generic_copy_to_user_nocheck((to),(from),(n)) | 425 | #define __copy_to_user(to,from,n) \ |
425 | #define __copy_from_user(to,from,n) __generic_copy_from_user_nocheck((to),(from),(n)) | 426 | __generic_copy_to_user_nocheck((to),(from),(n)) |
427 | #define __copy_from_user(to,from,n) \ | ||
428 | __generic_copy_from_user_nocheck((to),(from),(n)) | ||
426 | #define __copy_to_user_inatomic __copy_to_user | 429 | #define __copy_to_user_inatomic __copy_to_user |
427 | #define __copy_from_user_inatomic __copy_from_user | 430 | #define __copy_from_user_inatomic __copy_from_user |
428 | 431 | ||
diff --git a/arch/xtensa/kernel/Makefile b/arch/xtensa/kernel/Makefile index f36cef5a62ff..c3a59d992ac0 100644 --- a/arch/xtensa/kernel/Makefile +++ b/arch/xtensa/kernel/Makefile | |||
@@ -23,13 +23,13 @@ obj-$(CONFIG_MODULES) += xtensa_ksyms.o module.o | |||
23 | # | 23 | # |
24 | # Replicate rules in scripts/Makefile.build | 24 | # Replicate rules in scripts/Makefile.build |
25 | 25 | ||
26 | sed-y = -e 's/\*(\(\.[a-z]*it\|\.ref\|\)\.text)/*(\1.literal \1.text)/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' \ | 27 | -e 's/\.text\.unlikely/.literal.unlikely .text.unlikely/g' \ |
28 | -e 's/\*(\(\.text\.[a-z]*\))/*(\1.literal \1)/g' | 28 | -e 's/\*(\(\.text\.[a-z]*\))/*(\1.literal \1)/g' |
29 | 29 | ||
30 | quiet_cmd__cpp_lds_S = LDS $@ | 30 | quiet_cmd__cpp_lds_S = LDS $@ |
31 | cmd__cpp_lds_S = $(CPP) $(cpp_flags) -P -C -Uxtensa -D__ASSEMBLY__ $< \ | 31 | cmd__cpp_lds_S = $(CPP) $(cpp_flags) -P -C -Uxtensa -D__ASSEMBLY__ $< \ |
32 | | sed $(sed-y) >$@ | 32 | | sed $(sed-y) >$@ |
33 | 33 | ||
34 | $(obj)/vmlinux.lds: $(src)/vmlinux.lds.S FORCE | 34 | $(obj)/vmlinux.lds: $(src)/vmlinux.lds.S FORCE |
35 | $(call if_changed_dep,_cpp_lds_S) | 35 | $(call if_changed_dep,_cpp_lds_S) |
diff --git a/arch/xtensa/kernel/align.S b/arch/xtensa/kernel/align.S index 39d2f597382d..aa2e87b8566a 100644 --- a/arch/xtensa/kernel/align.S +++ b/arch/xtensa/kernel/align.S | |||
@@ -442,7 +442,7 @@ ENTRY(fast_unaligned) | |||
442 | mov a1, a2 | 442 | mov a1, a2 |
443 | 443 | ||
444 | rsr a0, ps | 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 | movi a0, _kernel_exception | 447 | movi a0, _kernel_exception |
448 | jx a0 | 448 | jx a0 |
@@ -453,4 +453,3 @@ ENTRY(fast_unaligned) | |||
453 | ENDPROC(fast_unaligned) | 453 | ENDPROC(fast_unaligned) |
454 | 454 | ||
455 | #endif /* XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION */ | 455 | #endif /* XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION */ |
456 | |||
diff --git a/arch/xtensa/kernel/asm-offsets.c b/arch/xtensa/kernel/asm-offsets.c index 845475afc683..0701fad170db 100644 --- a/arch/xtensa/kernel/asm-offsets.c +++ b/arch/xtensa/kernel/asm-offsets.c | |||
@@ -92,7 +92,8 @@ int main(void) | |||
92 | #endif | 92 | #endif |
93 | DEFINE(THREAD_XTREGS_USER, offsetof (struct thread_info, xtregs_user)); | 93 | DEFINE(THREAD_XTREGS_USER, offsetof (struct thread_info, xtregs_user)); |
94 | DEFINE(XTREGS_USER_SIZE, sizeof(xtregs_user_t)); | 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 | /* struct mm_struct */ | 98 | /* struct mm_struct */ |
98 | DEFINE(MM_USERS, offsetof(struct mm_struct, mm_users)); | 99 | DEFINE(MM_USERS, offsetof(struct mm_struct, mm_users)); |
@@ -109,4 +110,3 @@ int main(void) | |||
109 | 110 | ||
110 | return 0; | 111 | return 0; |
111 | } | 112 | } |
112 | |||
diff --git a/arch/xtensa/kernel/coprocessor.S b/arch/xtensa/kernel/coprocessor.S index 60bb13589249..647657484866 100644 --- a/arch/xtensa/kernel/coprocessor.S +++ b/arch/xtensa/kernel/coprocessor.S | |||
@@ -172,7 +172,7 @@ ENTRY(coprocessor_load) | |||
172 | ENDPROC(coprocessor_load) | 172 | ENDPROC(coprocessor_load) |
173 | 173 | ||
174 | /* | 174 | /* |
175 | * coprocessor_flush(struct task_info*, index) | 175 | * coprocessor_flush(struct task_info*, index) |
176 | * a2 a3 | 176 | * a2 a3 |
177 | * coprocessor_restore(struct task_info*, index) | 177 | * coprocessor_restore(struct task_info*, index) |
178 | * a2 a3 | 178 | * a2 a3 |
@@ -354,4 +354,3 @@ ENTRY(coprocessor_owner) | |||
354 | END(coprocessor_owner) | 354 | END(coprocessor_owner) |
355 | 355 | ||
356 | #endif /* XTENSA_HAVE_COPROCESSORS */ | 356 | #endif /* XTENSA_HAVE_COPROCESSORS */ |
357 | |||
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S index 4c2f2706ad5b..3777fec85e7c 100644 --- a/arch/xtensa/kernel/entry.S +++ b/arch/xtensa/kernel/entry.S | |||
@@ -874,7 +874,7 @@ ENTRY(fast_alloca) | |||
874 | 874 | ||
875 | _bnei a0, 1, 1f # no 'movsp a1, ax': jump | 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 | * and S32E instructions, because this move must be done with | 878 | * and S32E instructions, because this move must be done with |
879 | * the user's PS.RING privilege levels, not with ring 0 | 879 | * the user's PS.RING privilege levels, not with ring 0 |
880 | * (kernel's) privileges currently active with PS.EXCM | 880 | * (kernel's) privileges currently active with PS.EXCM |
@@ -1008,15 +1008,15 @@ ENDPROC(fast_syscall_user) | |||
1008 | 1008 | ||
1009 | ENTRY(fast_syscall_unrecoverable) | 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 | 1013 | l32i a0, a2, PT_AREG0 # restore a0 |
1014 | xsr a2, depc # restore a2, depc | 1014 | xsr a2, depc # restore a2, depc |
1015 | rsr a3, excsave1 | 1015 | rsr a3, excsave1 |
1016 | 1016 | ||
1017 | wsr a0, excsave1 | 1017 | wsr a0, excsave1 |
1018 | movi a0, unrecoverable_exception | 1018 | movi a0, unrecoverable_exception |
1019 | callx0 a0 | 1019 | callx0 a0 |
1020 | 1020 | ||
1021 | ENDPROC(fast_syscall_unrecoverable) | 1021 | ENDPROC(fast_syscall_unrecoverable) |
1022 | 1022 | ||
@@ -1253,9 +1253,9 @@ fast_syscall_spill_registers_fixup: | |||
1253 | 1253 | ||
1254 | movi a3, exc_table | 1254 | movi a3, exc_table |
1255 | rsr a0, exccause | 1255 | rsr a0, exccause |
1256 | addx4 a0, a0, a3 # find entry in table | 1256 | addx4 a0, a0, a3 # find entry in table |
1257 | l32i a0, a0, EXC_TABLE_FAST_USER # load handler | 1257 | l32i a0, a0, EXC_TABLE_FAST_USER # load handler |
1258 | jx a0 | 1258 | jx a0 |
1259 | 1259 | ||
1260 | fast_syscall_spill_registers_fixup_return: | 1260 | fast_syscall_spill_registers_fixup_return: |
1261 | 1261 | ||
@@ -1457,7 +1457,7 @@ ENTRY(_spill_registers) | |||
1457 | rsr a0, ps | 1457 | rsr a0, ps |
1458 | _bbci.l a0, PS_UM_BIT, 1f | 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 | * Note: We assume EXC_TABLE_KSTK contains a valid stack pointer. | 1461 | * Note: We assume EXC_TABLE_KSTK contains a valid stack pointer. |
1462 | */ | 1462 | */ |
1463 | 1463 | ||
diff --git a/arch/xtensa/kernel/module.c b/arch/xtensa/kernel/module.c index 451dda928c93..b715237bae61 100644 --- a/arch/xtensa/kernel/module.c +++ b/arch/xtensa/kernel/module.c | |||
@@ -53,7 +53,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, | |||
53 | struct module *mod) | 53 | struct module *mod) |
54 | { | 54 | { |
55 | unsigned int i; | 55 | unsigned int i; |
56 | Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; | 56 | Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; |
57 | Elf32_Sym *sym; | 57 | Elf32_Sym *sym; |
58 | unsigned char *location; | 58 | unsigned char *location; |
59 | uint32_t value; | 59 | uint32_t value; |
diff --git a/arch/xtensa/kernel/platform.c b/arch/xtensa/kernel/platform.c index 97230e46cbe7..44bf21c3769a 100644 --- a/arch/xtensa/kernel/platform.c +++ b/arch/xtensa/kernel/platform.c | |||
@@ -44,4 +44,3 @@ _F(void, calibrate_ccount, (void), | |||
44 | ccount_per_jiffy = 10 * (1000000UL/HZ); | 44 | ccount_per_jiffy = 10 * (1000000UL/HZ); |
45 | }); | 45 | }); |
46 | #endif | 46 | #endif |
47 | |||
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c index 1accf28da5f5..0dd5784416d3 100644 --- a/arch/xtensa/kernel/process.c +++ b/arch/xtensa/kernel/process.c | |||
@@ -108,7 +108,7 @@ void coprocessor_flush_all(struct thread_info *ti) | |||
108 | 108 | ||
109 | void cpu_idle(void) | 109 | void cpu_idle(void) |
110 | { | 110 | { |
111 | local_irq_enable(); | 111 | local_irq_enable(); |
112 | 112 | ||
113 | /* endless idle loop with no priority at all */ | 113 | /* endless idle loop with no priority at all */ |
114 | while (1) { | 114 | while (1) { |
diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c index 33eea4c16f12..61fb2e9e9035 100644 --- a/arch/xtensa/kernel/ptrace.c +++ b/arch/xtensa/kernel/ptrace.c | |||
@@ -154,7 +154,7 @@ int ptrace_setxregs(struct task_struct *child, void __user *uregs) | |||
154 | coprocessor_flush_all(ti); | 154 | coprocessor_flush_all(ti); |
155 | coprocessor_release_all(ti); | 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 | sizeof(xtregs_coprocessor_t)); | 158 | sizeof(xtregs_coprocessor_t)); |
159 | #endif | 159 | #endif |
160 | ret |= __copy_from_user(®s->xtregs_opt, &xtregs->opt, | 160 | ret |= __copy_from_user(®s->xtregs_opt, &xtregs->opt, |
@@ -343,4 +343,3 @@ void do_syscall_trace_leave(struct pt_regs *regs) | |||
343 | && (current->ptrace & PT_PTRACED)) | 343 | && (current->ptrace & PT_PTRACED)) |
344 | do_syscall_trace(); | 344 | do_syscall_trace(); |
345 | } | 345 | } |
346 | |||
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 64d80e4b0bd4..24c1a57abb40 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c | |||
@@ -284,7 +284,7 @@ void __init init_arch(bp_tag_t *bp_start) | |||
284 | 284 | ||
285 | /* Parse boot parameters */ | 285 | /* Parse boot parameters */ |
286 | 286 | ||
287 | if (bp_start) | 287 | if (bp_start) |
288 | parse_bootparam(bp_start); | 288 | parse_bootparam(bp_start); |
289 | 289 | ||
290 | #ifdef CONFIG_OF | 290 | #ifdef CONFIG_OF |
@@ -460,7 +460,7 @@ void __init setup_arch(char **cmdline_p) | |||
460 | initrd_is_mapped = mem_reserve(__pa(initrd_start), | 460 | initrd_is_mapped = mem_reserve(__pa(initrd_start), |
461 | __pa(initrd_end), 0); | 461 | __pa(initrd_end), 0); |
462 | initrd_below_start_ok = 1; | 462 | initrd_below_start_ok = 1; |
463 | } else { | 463 | } else { |
464 | initrd_start = 0; | 464 | initrd_start = 0; |
465 | } | 465 | } |
466 | #endif | 466 | #endif |
@@ -539,7 +539,7 @@ c_show(struct seq_file *f, void *slot) | |||
539 | "core ID\t\t: " XCHAL_CORE_ID "\n" | 539 | "core ID\t\t: " XCHAL_CORE_ID "\n" |
540 | "build ID\t: 0x%x\n" | 540 | "build ID\t: 0x%x\n" |
541 | "byte order\t: %s\n" | 541 | "byte order\t: %s\n" |
542 | "cpu MHz\t\t: %lu.%02lu\n" | 542 | "cpu MHz\t\t: %lu.%02lu\n" |
543 | "bogomips\t: %lu.%02lu\n", | 543 | "bogomips\t: %lu.%02lu\n", |
544 | XCHAL_BUILD_UNIQUE_ID, | 544 | XCHAL_BUILD_UNIQUE_ID, |
545 | XCHAL_HAVE_BE ? "big" : "little", | 545 | XCHAL_HAVE_BE ? "big" : "little", |
@@ -681,4 +681,3 @@ const struct seq_operations cpuinfo_op = | |||
681 | }; | 681 | }; |
682 | 682 | ||
683 | #endif /* CONFIG_PROC_FS */ | 683 | #endif /* CONFIG_PROC_FS */ |
684 | |||
diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c index 63c566f627bc..de34d6be91cd 100644 --- a/arch/xtensa/kernel/signal.c +++ b/arch/xtensa/kernel/signal.c | |||
@@ -212,7 +212,7 @@ restore_sigcontext(struct pt_regs *regs, struct rt_sigframe __user *frame) | |||
212 | if (err) | 212 | if (err) |
213 | return err; | 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 | * case they are still enabled. We disable them to force a | 216 | * case they are still enabled. We disable them to force a |
217 | * reloading of the original task's CP state by the lazy | 217 | * reloading of the original task's CP state by the lazy |
218 | * context-switching mechanisms of CP exception handling. | 218 | * context-switching mechanisms of CP exception handling. |
@@ -396,7 +396,7 @@ static int setup_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
396 | */ | 396 | */ |
397 | 397 | ||
398 | /* Set up registers for signal handler */ | 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 | (unsigned long) frame); | 400 | (unsigned long) frame); |
401 | 401 | ||
402 | /* Set up a stack frame for a call4 | 402 | /* Set up a stack frame for a call4 |
@@ -424,9 +424,9 @@ give_sigsegv: | |||
424 | return -EFAULT; | 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 | stack_t __user *uoss, | 428 | stack_t __user *uoss, |
429 | long a2, long a3, long a4, long a5, | 429 | long a2, long a3, long a4, long a5, |
430 | struct pt_regs *regs) | 430 | struct pt_regs *regs) |
431 | { | 431 | { |
432 | return do_sigaltstack(uss, uoss, regs->areg[1]); | 432 | return do_sigaltstack(uss, uoss, regs->areg[1]); |
diff --git a/arch/xtensa/kernel/syscall.c b/arch/xtensa/kernel/syscall.c index 5702065f472a..54fa8425cee2 100644 --- a/arch/xtensa/kernel/syscall.c +++ b/arch/xtensa/kernel/syscall.c | |||
@@ -52,4 +52,3 @@ asmlinkage long xtensa_fadvise64_64(int fd, int advice, | |||
52 | { | 52 | { |
53 | return sys_fadvise64_64(fd, offset, len, advice); | 53 | return sys_fadvise64_64(fd, offset, len, advice); |
54 | } | 54 | } |
55 | |||
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c index 691a792b01d3..01e0111bf787 100644 --- a/arch/xtensa/kernel/traps.c +++ b/arch/xtensa/kernel/traps.c | |||
@@ -408,7 +408,8 @@ static inline void spill_registers(void) | |||
408 | "wsr a13, sar\n\t" | 408 | "wsr a13, sar\n\t" |
409 | "wsr a14, ps\n\t" | 409 | "wsr a14, ps\n\t" |
410 | :: "a" (&a0), "a" (&ps) | 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 | void show_trace(struct task_struct *task, unsigned long *sp) | 415 | void show_trace(struct task_struct *task, unsigned long *sp) |
@@ -463,7 +464,7 @@ void show_stack(struct task_struct *task, unsigned long *sp) | |||
463 | 464 | ||
464 | if (!sp) | 465 | if (!sp) |
465 | sp = stack_pointer(task); | 466 | sp = stack_pointer(task); |
466 | stack = sp; | 467 | stack = sp; |
467 | 468 | ||
468 | printk("\nStack: "); | 469 | printk("\nStack: "); |
469 | 470 | ||
@@ -534,5 +535,3 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
534 | 535 | ||
535 | do_exit(err); | 536 | do_exit(err); |
536 | } | 537 | } |
537 | |||
538 | |||
diff --git a/arch/xtensa/kernel/vectors.S b/arch/xtensa/kernel/vectors.S index 9365ee5064d3..68df35f66ce3 100644 --- a/arch/xtensa/kernel/vectors.S +++ b/arch/xtensa/kernel/vectors.S | |||
@@ -485,5 +485,3 @@ ENTRY_ALIGN64(_WindowUnderflow12) | |||
485 | ENDPROC(_WindowUnderflow12) | 485 | ENDPROC(_WindowUnderflow12) |
486 | 486 | ||
487 | .text | 487 | .text |
488 | |||
489 | |||
diff --git a/arch/xtensa/lib/checksum.S b/arch/xtensa/lib/checksum.S index 0470ca21a359..4eb573d2720e 100644 --- a/arch/xtensa/lib/checksum.S +++ b/arch/xtensa/lib/checksum.S | |||
@@ -41,10 +41,11 @@ | |||
41 | 41 | ||
42 | .text | 42 | .text |
43 | ENTRY(csum_partial) | 43 | ENTRY(csum_partial) |
44 | /* | 44 | |
45 | * Experiments with Ethernet and SLIP connections show that buf | 45 | /* |
46 | * is aligned on either a 2-byte or 4-byte boundary. | 46 | * Experiments with Ethernet and SLIP connections show that buf |
47 | */ | 47 | * is aligned on either a 2-byte or 4-byte boundary. |
48 | */ | ||
48 | entry sp, 32 | 49 | entry sp, 32 |
49 | extui a5, a2, 0, 2 | 50 | extui a5, a2, 0, 2 |
50 | bnez a5, 8f /* branch if 2-byte aligned */ | 51 | bnez a5, 8f /* branch if 2-byte aligned */ |
@@ -409,4 +410,3 @@ ENDPROC(csum_partial_copy_generic) | |||
409 | retw | 410 | retw |
410 | 411 | ||
411 | .previous | 412 | .previous |
412 | |||
diff --git a/arch/xtensa/lib/memcopy.S b/arch/xtensa/lib/memcopy.S index c48b80acb5f0..b1c219acabe7 100644 --- a/arch/xtensa/lib/memcopy.S +++ b/arch/xtensa/lib/memcopy.S | |||
@@ -210,8 +210,10 @@ memcpy: | |||
210 | _beqz a4, .Ldone # avoid loading anything for zero-length copies | 210 | _beqz a4, .Ldone # avoid loading anything for zero-length copies |
211 | # copy 16 bytes per iteration for word-aligned dst and unaligned src | 211 | # copy 16 bytes per iteration for word-aligned dst and unaligned src |
212 | ssa8 a3 # set shift amount from byte offset | 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 | 213 | |
214 | lint or ferret client, or 0 to save a few cycles */ | 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 | #if XCHAL_UNALIGNED_LOAD_EXCEPTION || SIM_CHECKS_ALIGNMENT | 217 | #if XCHAL_UNALIGNED_LOAD_EXCEPTION || SIM_CHECKS_ALIGNMENT |
216 | and a11, a3, a8 # save unalignment offset for below | 218 | and a11, a3, a8 # save unalignment offset for below |
217 | sub a3, a3, a11 # align a3 | 219 | sub a3, a3, a11 # align a3 |
diff --git a/arch/xtensa/lib/pci-auto.c b/arch/xtensa/lib/pci-auto.c index a71733ae1193..34d05abbd921 100644 --- a/arch/xtensa/lib/pci-auto.c +++ b/arch/xtensa/lib/pci-auto.c | |||
@@ -241,8 +241,8 @@ int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus) | |||
241 | unsigned char header_type; | 241 | unsigned char header_type; |
242 | struct pci_dev *dev = &pciauto_dev; | 242 | struct pci_dev *dev = &pciauto_dev; |
243 | 243 | ||
244 | pciauto_dev.bus = &pciauto_bus; | 244 | pciauto_dev.bus = &pciauto_bus; |
245 | pciauto_dev.sysdata = pci_ctrl; | 245 | pciauto_dev.sysdata = pci_ctrl; |
246 | pciauto_bus.ops = pci_ctrl->ops; | 246 | pciauto_bus.ops = pci_ctrl->ops; |
247 | 247 | ||
248 | /* | 248 | /* |
@@ -345,8 +345,3 @@ int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus) | |||
345 | } | 345 | } |
346 | return sub_bus; | 346 | return sub_bus; |
347 | } | 347 | } |
348 | |||
349 | |||
350 | |||
351 | |||
352 | |||
diff --git a/arch/xtensa/lib/strncpy_user.S b/arch/xtensa/lib/strncpy_user.S index 9f603cdaaa68..1ad0ecf45368 100644 --- a/arch/xtensa/lib/strncpy_user.S +++ b/arch/xtensa/lib/strncpy_user.S | |||
@@ -166,7 +166,7 @@ __strncpy_user: | |||
166 | retw | 166 | retw |
167 | .Lz1: # byte 1 is zero | 167 | .Lz1: # byte 1 is zero |
168 | #ifdef __XTENSA_EB__ | 168 | #ifdef __XTENSA_EB__ |
169 | extui a9, a9, 16, 16 | 169 | extui a9, a9, 16, 16 |
170 | #endif /* __XTENSA_EB__ */ | 170 | #endif /* __XTENSA_EB__ */ |
171 | EX(s16i, a9, a11, 0, fixup_s) | 171 | EX(s16i, a9, a11, 0, fixup_s) |
172 | addi a11, a11, 1 # advance dst pointer | 172 | addi a11, a11, 1 # advance dst pointer |
@@ -174,7 +174,7 @@ __strncpy_user: | |||
174 | retw | 174 | retw |
175 | .Lz2: # byte 2 is zero | 175 | .Lz2: # byte 2 is zero |
176 | #ifdef __XTENSA_EB__ | 176 | #ifdef __XTENSA_EB__ |
177 | extui a9, a9, 16, 16 | 177 | extui a9, a9, 16, 16 |
178 | #endif /* __XTENSA_EB__ */ | 178 | #endif /* __XTENSA_EB__ */ |
179 | EX(s16i, a9, a11, 0, fixup_s) | 179 | EX(s16i, a9, a11, 0, fixup_s) |
180 | movi a9, 0 | 180 | movi a9, 0 |
diff --git a/arch/xtensa/lib/strnlen_user.S b/arch/xtensa/lib/strnlen_user.S index 23f2a89816a1..4c03b1e581e9 100644 --- a/arch/xtensa/lib/strnlen_user.S +++ b/arch/xtensa/lib/strnlen_user.S | |||
@@ -145,4 +145,3 @@ __strnlen_user: | |||
145 | lenfixup: | 145 | lenfixup: |
146 | movi a2, 0 | 146 | movi a2, 0 |
147 | retw | 147 | retw |
148 | |||
diff --git a/arch/xtensa/lib/usercopy.S b/arch/xtensa/lib/usercopy.S index 46d60314bb16..ace1892a875e 100644 --- a/arch/xtensa/lib/usercopy.S +++ b/arch/xtensa/lib/usercopy.S | |||
@@ -318,4 +318,3 @@ l_fixup: | |||
318 | /* Ignore memset return value in a6. */ | 318 | /* Ignore memset return value in a6. */ |
319 | /* a2 still contains bytes not copied. */ | 319 | /* a2 still contains bytes not copied. */ |
320 | retw | 320 | retw |
321 | |||
diff --git a/arch/xtensa/mm/cache.c b/arch/xtensa/mm/cache.c index 85df4655d326..81edeab82d17 100644 --- a/arch/xtensa/mm/cache.c +++ b/arch/xtensa/mm/cache.c | |||
@@ -118,7 +118,7 @@ void flush_dcache_page(struct page *page) | |||
118 | * For now, flush the whole cache. FIXME?? | 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 | unsigned long start, unsigned long end) | 122 | unsigned long start, unsigned long end) |
123 | { | 123 | { |
124 | __flush_invalidate_dcache_all(); | 124 | __flush_invalidate_dcache_all(); |
@@ -133,7 +133,7 @@ void flush_cache_range(struct vm_area_struct* vma, | |||
133 | */ | 133 | */ |
134 | 134 | ||
135 | void flush_cache_page(struct vm_area_struct* vma, unsigned long address, | 135 | void flush_cache_page(struct vm_area_struct* vma, unsigned long address, |
136 | unsigned long pfn) | 136 | unsigned long pfn) |
137 | { | 137 | { |
138 | /* Note that we have to use the 'alias' address to avoid multi-hit */ | 138 | /* Note that we have to use the 'alias' address to avoid multi-hit */ |
139 | 139 | ||
@@ -166,14 +166,14 @@ update_mmu_cache(struct vm_area_struct * vma, unsigned long addr, pte_t *ptep) | |||
166 | 166 | ||
167 | if (!PageReserved(page) && test_bit(PG_arch_1, &page->flags)) { | 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 | unsigned long paddr = (unsigned long) page_address(page); | 169 | unsigned long paddr = (unsigned long) page_address(page); |
171 | unsigned long phys = page_to_phys(page); | 170 | unsigned long phys = page_to_phys(page); |
171 | unsigned long tmp = TLBTEMP_BASE_1 + (addr & DCACHE_ALIAS_MASK); | ||
172 | 172 | ||
173 | __flush_invalidate_dcache_page(paddr); | 173 | __flush_invalidate_dcache_page(paddr); |
174 | 174 | ||
175 | __flush_invalidate_dcache_page_alias(vaddr, phys); | 175 | __flush_invalidate_dcache_page_alias(tmp, phys); |
176 | __invalidate_icache_page_alias(vaddr, phys); | 176 | __invalidate_icache_page_alias(tmp, phys); |
177 | 177 | ||
178 | clear_bit(PG_arch_1, &page->flags); | 178 | clear_bit(PG_arch_1, &page->flags); |
179 | } | 179 | } |
@@ -195,7 +195,7 @@ update_mmu_cache(struct vm_area_struct * vma, unsigned long addr, pte_t *ptep) | |||
195 | 195 | ||
196 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK | 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 | unsigned long vaddr, void *dst, const void *src, | 199 | unsigned long vaddr, void *dst, const void *src, |
200 | unsigned long len) | 200 | unsigned long len) |
201 | { | 201 | { |
@@ -205,8 +205,8 @@ void copy_to_user_page(struct vm_area_struct *vma, struct page *page, | |||
205 | /* Flush and invalidate user page if aliased. */ | 205 | /* Flush and invalidate user page if aliased. */ |
206 | 206 | ||
207 | if (alias) { | 207 | if (alias) { |
208 | unsigned long temp = TLBTEMP_BASE_1 + (vaddr & DCACHE_ALIAS_MASK); | 208 | unsigned long t = TLBTEMP_BASE_1 + (vaddr & DCACHE_ALIAS_MASK); |
209 | __flush_invalidate_dcache_page_alias(temp, phys); | 209 | __flush_invalidate_dcache_page_alias(t, phys); |
210 | } | 210 | } |
211 | 211 | ||
212 | /* Copy data */ | 212 | /* Copy data */ |
@@ -219,12 +219,11 @@ void copy_to_user_page(struct vm_area_struct *vma, struct page *page, | |||
219 | */ | 219 | */ |
220 | 220 | ||
221 | if (alias) { | 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 | __flush_invalidate_dcache_range((unsigned long) dst, len); | 224 | __flush_invalidate_dcache_range((unsigned long) dst, len); |
225 | if ((vma->vm_flags & VM_EXEC) != 0) { | 225 | if ((vma->vm_flags & VM_EXEC) != 0) |
226 | __invalidate_icache_page_alias(temp, phys); | 226 | __invalidate_icache_page_alias(t, phys); |
227 | } | ||
228 | 227 | ||
229 | } else if ((vma->vm_flags & VM_EXEC) != 0) { | 228 | } else if ((vma->vm_flags & VM_EXEC) != 0) { |
230 | __flush_dcache_range((unsigned long)dst,len); | 229 | __flush_dcache_range((unsigned long)dst,len); |
@@ -245,8 +244,8 @@ extern void copy_from_user_page(struct vm_area_struct *vma, struct page *page, | |||
245 | */ | 244 | */ |
246 | 245 | ||
247 | if (alias) { | 246 | if (alias) { |
248 | unsigned long temp = TLBTEMP_BASE_1 + (vaddr & DCACHE_ALIAS_MASK); | 247 | unsigned long t = TLBTEMP_BASE_1 + (vaddr & DCACHE_ALIAS_MASK); |
249 | __flush_invalidate_dcache_page_alias(temp, phys); | 248 | __flush_invalidate_dcache_page_alias(t, phys); |
250 | } | 249 | } |
251 | 250 | ||
252 | memcpy(dst, src, len); | 251 | memcpy(dst, src, len); |
diff --git a/arch/xtensa/mm/fault.c b/arch/xtensa/mm/fault.c index 245b08f7eaf4..4b7bc8db170f 100644 --- a/arch/xtensa/mm/fault.c +++ b/arch/xtensa/mm/fault.c | |||
@@ -254,4 +254,3 @@ bad_page_fault(struct pt_regs *regs, unsigned long address, int sig) | |||
254 | die("Oops", regs, sig); | 254 | die("Oops", regs, sig); |
255 | do_exit(sig); | 255 | do_exit(sig); |
256 | } | 256 | } |
257 | |||
diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c index db955179da2d..7a5156ffebb6 100644 --- a/arch/xtensa/mm/init.c +++ b/arch/xtensa/mm/init.c | |||
@@ -75,15 +75,15 @@ int __init mem_reserve(unsigned long start, unsigned long end, int must_exist) | |||
75 | sysmem.nr_banks++; | 75 | sysmem.nr_banks++; |
76 | } | 76 | } |
77 | sysmem.bank[i].end = start; | 77 | sysmem.bank[i].end = start; |
78 | |||
79 | } else if (end < sysmem.bank[i].end) { | ||
80 | sysmem.bank[i].start = end; | ||
81 | |||
78 | } else { | 82 | } else { |
79 | if (end < sysmem.bank[i].end) | 83 | /* remove entry */ |
80 | sysmem.bank[i].start = end; | 84 | sysmem.nr_banks--; |
81 | else { | 85 | sysmem.bank[i].start = sysmem.bank[sysmem.nr_banks].start; |
82 | /* remove entry */ | 86 | sysmem.bank[i].end = sysmem.bank[sysmem.nr_banks].end; |
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 | } | ||
87 | } | 87 | } |
88 | return -1; | 88 | return -1; |
89 | } | 89 | } |
diff --git a/arch/xtensa/mm/misc.S b/arch/xtensa/mm/misc.S index 7f7078f57c41..d97ed1ba7b0a 100644 --- a/arch/xtensa/mm/misc.S +++ b/arch/xtensa/mm/misc.S | |||
@@ -180,7 +180,7 @@ ENDPROC(clear_user_page) | |||
180 | 180 | ||
181 | ENTRY(copy_user_page) | 181 | ENTRY(copy_user_page) |
182 | 182 | ||
183 | entry a1, 32 | 183 | entry a1, 32 |
184 | 184 | ||
185 | /* Mark page dirty and determine alias for destination. */ | 185 | /* Mark page dirty and determine alias for destination. */ |
186 | 186 | ||
diff --git a/arch/xtensa/mm/tlb.c b/arch/xtensa/mm/tlb.c index 070fb7a25231..5411aa67c68e 100644 --- a/arch/xtensa/mm/tlb.c +++ b/arch/xtensa/mm/tlb.c | |||
@@ -82,7 +82,7 @@ void flush_tlb_mm(struct mm_struct *mm) | |||
82 | #endif | 82 | #endif |
83 | 83 | ||
84 | void flush_tlb_range (struct vm_area_struct *vma, | 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 | struct mm_struct *mm = vma->vm_mm; | 87 | struct mm_struct *mm = vma->vm_mm; |
88 | unsigned long flags; | 88 | unsigned long flags; |
@@ -100,7 +100,7 @@ void flush_tlb_range (struct vm_area_struct *vma, | |||
100 | int oldpid = get_rasid_register(); | 100 | int oldpid = get_rasid_register(); |
101 | set_rasid_register (ASID_INSERT(mm->context)); | 101 | set_rasid_register (ASID_INSERT(mm->context)); |
102 | start &= PAGE_MASK; | 102 | start &= PAGE_MASK; |
103 | if (vma->vm_flags & VM_EXEC) | 103 | if (vma->vm_flags & VM_EXEC) |
104 | while(start < end) { | 104 | while(start < end) { |
105 | invalidate_itlb_mapping(start); | 105 | invalidate_itlb_mapping(start); |
106 | invalidate_dtlb_mapping(start); | 106 | invalidate_dtlb_mapping(start); |
@@ -130,7 +130,7 @@ void flush_tlb_page (struct vm_area_struct *vma, unsigned long page) | |||
130 | 130 | ||
131 | local_save_flags(flags); | 131 | local_save_flags(flags); |
132 | 132 | ||
133 | oldpid = get_rasid_register(); | 133 | oldpid = get_rasid_register(); |
134 | 134 | ||
135 | if (vma->vm_flags & VM_EXEC) | 135 | if (vma->vm_flags & VM_EXEC) |
136 | invalidate_itlb_mapping(page); | 136 | invalidate_itlb_mapping(page); |
@@ -140,4 +140,3 @@ void flush_tlb_page (struct vm_area_struct *vma, unsigned long page) | |||
140 | 140 | ||
141 | local_irq_restore(flags); | 141 | local_irq_restore(flags); |
142 | } | 142 | } |
143 | |||