Skip to content

Commit 623ce34

Browse files
committed
Merge tag 'xtensa-20170807' of git://github.com/jcmvbkbc/linux-xtensa
Pull Xtensa fixes from Max Filippov: - use asm-generic instances of asm/param.h and asm/device.h instead of exact copies in arch/xtensa/include/asm; - fix build error for xtensa cores with aliasing WT cache: define cache flushing functions and copy_{to,from}_user_page; - add missing EXPORT_SYMBOLs for clear_user_highpage, copy_user_highpage, flush_dcache_page, local_flush_cache_range, local_flush_cache_page, csum_partial and csum_partial_copy_generic. * tag 'xtensa-20170807' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: mm/cache: add missing EXPORT_SYMBOLs xtensa: don't limit csum_partial export by CONFIG_NET xtensa: fix cache aliasing handling code for WT cache xtensa: remove wrapper header for asm/param.h xtensa: remove wrapper header for asm/device.h
2 parents d16b9d2 + bc652eb commit 623ce34

5 files changed

Lines changed: 10 additions & 43 deletions

File tree

‎arch/xtensa/include/asm/Kbuild‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
generic-y += bug.h
22
generic-y += clkdev.h
3+
generic-y += device.h
34
generic-y += div64.h
45
generic-y += dma-contiguous.h
56
generic-y += emergency-restart.h
@@ -17,6 +18,7 @@ generic-y += local.h
1718
generic-y += local64.h
1819
generic-y += mcs_spinlock.h
1920
generic-y += mm-arch-hooks.h
21+
generic-y += param.h
2022
generic-y += percpu.h
2123
generic-y += preempt.h
2224
generic-y += rwsem.h

‎arch/xtensa/include/asm/device.h‎

Lines changed: 0 additions & 15 deletions
This file was deleted.

‎arch/xtensa/include/asm/param.h‎

Lines changed: 0 additions & 18 deletions
This file was deleted.

‎arch/xtensa/kernel/xtensa_ksyms.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,11 @@ unsigned long __sync_fetch_and_or_4(unsigned long *p, unsigned long v)
9494
}
9595
EXPORT_SYMBOL(__sync_fetch_and_or_4);
9696

97-
#ifdef CONFIG_NET
9897
/*
9998
* Networking support
10099
*/
101100
EXPORT_SYMBOL(csum_partial);
102101
EXPORT_SYMBOL(csum_partial_copy_generic);
103-
#endif /* CONFIG_NET */
104102

105103
/*
106104
* Architecture-specific symbols

‎arch/xtensa/mm/cache.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ void clear_user_highpage(struct page *page, unsigned long vaddr)
103103
clear_page_alias(kvaddr, paddr);
104104
preempt_enable();
105105
}
106+
EXPORT_SYMBOL(clear_user_highpage);
106107

107108
void copy_user_highpage(struct page *dst, struct page *src,
108109
unsigned long vaddr, struct vm_area_struct *vma)
@@ -119,10 +120,7 @@ void copy_user_highpage(struct page *dst, struct page *src,
119120
copy_page_alias(dst_vaddr, src_vaddr, dst_paddr, src_paddr);
120121
preempt_enable();
121122
}
122-
123-
#endif /* DCACHE_WAY_SIZE > PAGE_SIZE */
124-
125-
#if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK
123+
EXPORT_SYMBOL(copy_user_highpage);
126124

127125
/*
128126
* Any time the kernel writes to a user page cache page, or it is about to
@@ -176,7 +174,7 @@ void flush_dcache_page(struct page *page)
176174

177175
/* There shouldn't be an entry in the cache for this page anymore. */
178176
}
179-
177+
EXPORT_SYMBOL(flush_dcache_page);
180178

181179
/*
182180
* For now, flush the whole cache. FIXME??
@@ -188,6 +186,7 @@ void local_flush_cache_range(struct vm_area_struct *vma,
188186
__flush_invalidate_dcache_all();
189187
__invalidate_icache_all();
190188
}
189+
EXPORT_SYMBOL(local_flush_cache_range);
191190

192191
/*
193192
* Remove any entry in the cache for this page.
@@ -207,8 +206,9 @@ void local_flush_cache_page(struct vm_area_struct *vma, unsigned long address,
207206
__flush_invalidate_dcache_page_alias(virt, phys);
208207
__invalidate_icache_page_alias(virt, phys);
209208
}
209+
EXPORT_SYMBOL(local_flush_cache_page);
210210

211-
#endif
211+
#endif /* DCACHE_WAY_SIZE > PAGE_SIZE */
212212

213213
void
214214
update_mmu_cache(struct vm_area_struct * vma, unsigned long addr, pte_t *ptep)
@@ -225,7 +225,7 @@ update_mmu_cache(struct vm_area_struct * vma, unsigned long addr, pte_t *ptep)
225225

226226
flush_tlb_page(vma, addr);
227227

228-
#if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK
228+
#if (DCACHE_WAY_SIZE > PAGE_SIZE)
229229

230230
if (!PageReserved(page) && test_bit(PG_arch_1, &page->flags)) {
231231
unsigned long phys = page_to_phys(page);
@@ -256,7 +256,7 @@ update_mmu_cache(struct vm_area_struct * vma, unsigned long addr, pte_t *ptep)
256256
* flush_dcache_page() on the page.
257257
*/
258258

259-
#if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK
259+
#if (DCACHE_WAY_SIZE > PAGE_SIZE)
260260

261261
void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
262262
unsigned long vaddr, void *dst, const void *src,

0 commit comments

Comments
 (0)