0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <linux/bitops.h>
0010 #include <linux/mm.h>
0011
0012 #include <asm/page.h>
0013 #include <asm/cacheflush.h>
0014 #include <asm/cpufeature.h>
0015 #include <asm/mte.h>
0016
0017 void copy_highpage(struct page *to, struct page *from)
0018 {
0019 void *kto = page_address(to);
0020 void *kfrom = page_address(from);
0021
0022 copy_page(kto, kfrom);
0023
0024 if (system_supports_mte() && test_bit(PG_mte_tagged, &from->flags)) {
0025 set_bit(PG_mte_tagged, &to->flags);
0026 mte_copy_page_tags(kto, kfrom);
0027 }
0028 }
0029 EXPORT_SYMBOL(copy_highpage);
0030
0031 void copy_user_highpage(struct page *to, struct page *from,
0032 unsigned long vaddr, struct vm_area_struct *vma)
0033 {
0034 copy_highpage(to, from);
0035 flush_dcache_page(to);
0036 }
0037 EXPORT_SYMBOL_GPL(copy_user_highpage);