aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/mm/cache.c
diff options
context:
space:
mode:
authorChris Zankel <chris@zankel.net>2012-11-28 19:53:51 -0500
committerChris Zankel <chris@zankel.net>2012-12-19 00:10:25 -0500
commitc4c4594b005d89b56964071bbbdeb07daac5bc76 (patch)
tree4c0b50ba3b87a53768bdd7161e90e9874b498127 /arch/xtensa/mm/cache.c
parent72100ed7efac290f24bd90a5e7c8bc9f231d167d (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/mm/cache.c')
-rw-r--r--arch/xtensa/mm/cache.c27
1 files changed, 13 insertions, 14 deletions
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
121void flush_cache_range(struct vm_area_struct* vma, 121void 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
135void flush_cache_page(struct vm_area_struct* vma, unsigned long address, 135void 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
198void copy_to_user_page(struct vm_area_struct *vma, struct page *page, 198void 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);