From: Khalid Aziz <khalid.aziz@oracle.com>
To: akpm@linux-foundation.org, davem@davemloft.net
Cc: Khalid Aziz <khalid.aziz@oracle.com>,
kstewart@linuxfoundation.org, pombredanne@nexb.com,
tglx@linutronix.de, anthony.yznaga@oracle.com,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
sparclinux@vger.kernel.org, linux-mm@kvack.org,
Khalid Aziz <khalid@gonehiking.org>
Subject: [PATCH v11 09/10] mm: Allow arch code to override copy_highpage()
Date: Thu, 1 Feb 2018 11:01:17 -0700 [thread overview]
Message-ID: <3e5949f4cedfdd499bd745135bd99f36cbb13503.1517497017.git.khalid.aziz@oracle.com> (raw)
In-Reply-To: <cover.1517497017.git.khalid.aziz@oracle.com>
In-Reply-To: <cover.1517497017.git.khalid.aziz@oracle.com>
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>
---
v9:
- new patch
include/linux/highmem.h | 4 ++++
1 file changed, 4 insertions(+)
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,
#endif
+#ifndef __HAVE_ARCH_COPY_HIGHPAGE
+
static inline void copy_highpage(struct page *to, struct page *from)
{
char *vfrom, *vto;
@@ -248,4 +250,6 @@ static inline void copy_highpage(struct page *to, struct page *from)
kunmap_atomic(vfrom);
}
+#endif
+
#endif /* _LINUX_HIGHMEM_H */
--
2.11.0
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2018-02-01 18:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-01 18:01 [PATCH v11 00/10] Application Data Integrity feature introduced by SPARC M7 Khalid Aziz
2018-02-01 18:01 ` [PATCH v11 02/10] mm, swap: Add infrastructure for saving page metadata on swap Khalid Aziz
2018-02-01 18:01 ` [PATCH v11 07/10] mm: Add address parameter to arch_validate_prot() Khalid Aziz
2018-02-01 18:01 ` [PATCH v11 08/10] mm: Clear arch specific VM flags on protection change Khalid Aziz
2018-02-01 18:01 ` Khalid Aziz [this message]
2018-02-01 18:01 ` [PATCH v11 10/10] sparc64: Add support for ADI (Application Data Integrity) Khalid Aziz
2018-02-02 2:29 ` [PATCH v11 00/10] Application Data Integrity feature introduced by SPARC M7 Eric W. Biederman
2018-02-02 14:13 ` Steven Sistare
2018-02-02 14:59 ` Khalid Aziz
2018-02-07 7:38 ` Eric W. Biederman
2018-02-07 16:04 ` Khalid Aziz
2018-02-07 17:42 ` Eric W. Biederman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3e5949f4cedfdd499bd745135bd99f36cbb13503.1517497017.git.khalid.aziz@oracle.com \
--to=khalid.aziz@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=anthony.yznaga@oracle.com \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=khalid@gonehiking.org \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pombredanne@nexb.com \
--cc=sparclinux@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox