powerpc: remove CONFIG_PCI_QSPAN
[linux/fpc-iii.git] / arch / csky / abiv1 / inc / abi / page.h
blob6336e92a103ae9aaf2c2f62e1203341cf005a175
1 /* SPDX-License-Identifier: GPL-2.0 */
2 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
4 extern unsigned long shm_align_mask;
5 extern void flush_dcache_page(struct page *page);
7 static inline unsigned long pages_do_alias(unsigned long addr1,
8 unsigned long addr2)
10 return (addr1 ^ addr2) & shm_align_mask;
13 static inline void clear_user_page(void *addr, unsigned long vaddr,
14 struct page *page)
16 clear_page(addr);
17 if (pages_do_alias((unsigned long) addr, vaddr & PAGE_MASK))
18 flush_dcache_page(page);
21 static inline void copy_user_page(void *to, void *from, unsigned long vaddr,
22 struct page *page)
24 copy_page(to, from);
25 if (pages_do_alias((unsigned long) to, vaddr & PAGE_MASK))
26 flush_dcache_page(page);