Commit 60a26e6c authored by Khalid Aziz's avatar Khalid Aziz Committed by Bernhard Thoben
Browse files

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: default avatarKhalid Aziz <khalid.aziz@oracle.com>
Cc: Khalid Aziz <khalid@gonehiking.org>
Reviewed-by: default avatarAnthony Yznaga <anthony.yznaga@oracle.com>
Acked-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
(cherry picked from commit a4602b62d9fdea41412ba765bbf32ecfc2b6a94c)
parent 30029f69
......@@ -281,6 +281,8 @@ static inline void copy_user_highpage(struct page *to, struct page *from,
#endif
#ifndef __HAVE_ARCH_COPY_HIGHPAGE
static inline void copy_highpage(struct page *to, struct page *from)
{
char *vfrom, *vto;
......@@ -292,4 +294,6 @@ static inline void copy_highpage(struct page *to, struct page *from)
kunmap_atomic(vfrom);
}
#endif
#endif /* _LINUX_HIGHMEM_H */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment