From: Khalid Aziz <khalid.aziz@oracle.com>
To: akpm@linux-foundation.org, davem@davemloft.net,
dave.hansen@linux.intel.com
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,
linux-mm@kvack.org, sparclinux@vger.kernel.org,
Khalid Aziz <khalid@gonehiking.org>
Subject: [PATCH v12 09/11] mm: Allow arch code to override copy_highpage()
Date: Wed, 21 Feb 2018 10:15:51 -0700 [thread overview]
Message-ID: <ecbafa2bfcc05f22183be2e7784ed11943b1d5b2.1519227112.git.khalid.aziz@oracle.com> (raw)
In-Reply-To: <cover.1519227112.git.khalid.aziz@oracle.com>
In-Reply-To: <cover.1519227112.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-21 17:17 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 17:15 [PATCH v12 00/11] Application Data Integrity feature introduced by SPARC M7 Khalid Aziz
2018-02-21 17:15 ` [PATCH v12 02/11] mm, swap: Add infrastructure for saving page metadata on swap Khalid Aziz
2018-03-05 19:20 ` Dave Hansen
2018-03-05 19:29 ` Khalid Aziz
2018-03-05 19:35 ` Dave Hansen
2018-03-05 20:28 ` Khalid Aziz
2018-03-05 21:04 ` Dave Hansen
2018-03-05 21:14 ` Khalid Aziz
2018-03-06 22:47 ` Andrew Morton
2018-02-21 17:15 ` [PATCH v12 07/11] mm: Add address parameter to arch_validate_prot() Khalid Aziz
2018-02-26 5:54 ` Michael Ellerman
2018-03-06 22:48 ` Andrew Morton
2018-02-21 17:15 ` [PATCH v12 08/11] mm: Clear arch specific VM flags on protection change Khalid Aziz
2018-03-05 19:23 ` Dave Hansen
2018-03-05 20:38 ` Khalid Aziz
2018-03-06 22:48 ` Andrew Morton
2018-02-21 17:15 ` Khalid Aziz [this message]
2018-03-05 19:24 ` [PATCH v12 09/11] mm: Allow arch code to override copy_highpage() Dave Hansen
2018-03-05 20:42 ` Khalid Aziz
2018-03-05 20:56 ` Dave Hansen
2018-03-06 22:48 ` Andrew Morton
2018-02-21 17:15 ` [PATCH v12 10/11] sparc64: Add support for ADI (Application Data Integrity) Khalid Aziz
2018-02-23 2:50 ` kbuild test robot
2018-02-23 18:51 ` Khalid Aziz
2018-02-23 18:57 ` David Miller
2018-02-23 22:11 ` Khalid Aziz
2018-03-05 19:22 ` Dave Hansen
2018-03-05 21:14 ` Khalid Aziz
2018-03-05 21:26 ` Dave Hansen
2018-03-05 21:31 ` Dave Hansen
2018-03-05 22:55 ` Khalid Aziz
2018-03-05 21:26 ` Dave Hansen
2018-03-05 21:37 ` Khalid Aziz
2018-03-05 21:50 ` Dave Hansen
2018-03-18 15:08 ` [PATCH v12 00/11] Application Data Integrity feature introduced by SPARC M7 David Miller
2018-03-19 15:19 ` Khalid Aziz
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=ecbafa2bfcc05f22183be2e7784ed11943b1d5b2.1519227112.git.khalid.aziz@oracle.com \
--to=khalid.aziz@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=anthony.yznaga@oracle.com \
--cc=dave.hansen@linux.intel.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