summaryrefslogtreecommitdiffstats
path: root/include/linux/highmem.h
diff options
context:
space:
mode:
authorKhalid Aziz <khalid.aziz@oracle.com>2018-02-21 12:15:51 -0500
committerDavid S. Miller <davem@davemloft.net>2018-03-18 10:38:48 -0400
commita4602b62d9fdea41412ba765bbf32ecfc2b6a94c (patch)
tree252aef98382894012c18032ca17c92a4c1951195 /include/linux/highmem.h
parent2c2d57b5e769956fb36581e0d3cccdb5ea68038f (diff)
mm: Allow arch code to override copy_highpage()
Some architectures can support metadata for memory pages and when a page is copied, its metadata must also be copied. Sparc processors from M7 onwards support metadata for memory pages. This metadata provides tag based protection for access to memory pages. To maintain this protection, the tag data must be copied to the new page when a page is migrated across NUMA nodes. This patch allows arch specific code to override default copy_highpage() and copy metadata along with page data upon migration. Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com> Cc: Khalid Aziz <khalid@gonehiking.org> Reviewed-by: Anthony Yznaga <anthony.yznaga@oracle.com> Acked-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/highmem.h')
-rw-r--r--include/linux/highmem.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/highmem.h b/include/linux/highmem.h
index 776f90f3a1cd..0690679832d4 100644
--- a/include/linux/highmem.h
+++ b/include/linux/highmem.h
@@ -237,6 +237,8 @@ static inline void copy_user_highpage(struct page *to, struct page *from,
237 237
238#endif 238#endif
239 239
240#ifndef __HAVE_ARCH_COPY_HIGHPAGE
241
240static inline void copy_highpage(struct page *to, struct page *from) 242static inline void copy_highpage(struct page *to, struct page *from)
241{ 243{
242 char *vfrom, *vto; 244 char *vfrom, *vto;
@@ -248,4 +250,6 @@ static inline void copy_highpage(struct page *to, struct page *from)
248 kunmap_atomic(vfrom); 250 kunmap_atomic(vfrom);
249} 251}
250 252
253#endif
254
251#endif /* _LINUX_HIGHMEM_H */ 255#endif /* _LINUX_HIGHMEM_H */