From: venkatesh.pallipadi@intel.com
To: mingo@elte.hu, tglx@linutronix.de, hpa@zytor.com, airlied@redhat.com
Cc: arjan@infradead.org, eric@anholt.net,
linux-kernel@vger.kernel.org,
Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Subject: [patch 1/3] x86, CPA: Add a flag parameter to cpa set_clr
Date: Thu, 19 Mar 2009 14:51:13 -0700 [thread overview]
Message-ID: <20090319215358.611346000@intel.com> (raw)
In-Reply-To: 20090319215112.636641000@intel.com
[-- Attachment #1: cpa_array_param_to_flag.patch --]
[-- Type: text/plain, Size: 1874 bytes --]
Change change_page_attr_set_clr() array parameter to a flag. This helps
following patches which adds an interface to change attr to uc/wb over a
set of pages referred by struct page.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
---
arch/x86/mm/pageattr.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
Index: tip/arch/x86/mm/pageattr.c
===================================================================
--- tip.orig/arch/x86/mm/pageattr.c 2009-03-13 11:51:31.000000000 -0700
+++ tip/arch/x86/mm/pageattr.c 2009-03-17 11:03:31.000000000 -0700
@@ -786,7 +786,7 @@ static inline int cache_attr(pgprot_t at
static int change_page_attr_set_clr(unsigned long *addr, int numpages,
pgprot_t mask_set, pgprot_t mask_clr,
- int force_split, int array)
+ int force_split, int in_flag)
{
struct cpa_data cpa;
int ret, cache, checkalias;
@@ -801,7 +801,7 @@ static int change_page_attr_set_clr(unsi
return 0;
/* Ensure we are PAGE_SIZE aligned */
- if (!array) {
+ if (!(in_flag & CPA_ARRAY)) {
if (*addr & ~PAGE_MASK) {
*addr &= PAGE_MASK;
/*
@@ -839,7 +839,7 @@ static int change_page_attr_set_clr(unsi
cpa.curpage = 0;
cpa.force_split = force_split;
- if (array)
+ if (in_flag & CPA_ARRAY)
cpa.flags |= CPA_ARRAY;
/* No alias checking for _NX bit modifications */
@@ -888,14 +888,14 @@ static inline int change_page_attr_set(u
pgprot_t mask, int array)
{
return change_page_attr_set_clr(addr, numpages, mask, __pgprot(0), 0,
- array);
+ (array ? CPA_ARRAY : 0));
}
static inline int change_page_attr_clear(unsigned long *addr, int numpages,
pgprot_t mask, int array)
{
return change_page_attr_set_clr(addr, numpages, __pgprot(0), mask, 0,
- array);
+ (array ? CPA_ARRAY : 0));
}
int _set_memory_uc(unsigned long addr, int numpages)
--
next prev parent reply other threads:[~2009-03-19 21:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-19 21:51 [patch 0/3] x86, CPA: Introduce new APIs set_pages_array[uc|wb] venkatesh.pallipadi
2009-03-19 21:51 ` venkatesh.pallipadi [this message]
2009-03-20 10:24 ` [tip:x86/mm] x86, CPA: Add a flag parameter to cpa set_clr() venkatesh.pallipadi
2009-03-19 21:51 ` [patch 2/3] x86, PAT: Add support for struct page pointer array in cpa set_clr venkatesh.pallipadi
2009-03-20 10:24 ` [tip:x86/mm] " venkatesh.pallipadi
2009-03-19 21:51 ` [patch 3/3] x86, CPA: Add set_pages_arrayuc and set_pages_array_wb venkatesh.pallipadi
2009-03-20 10:24 ` [tip:x86/mm] " venkatesh.pallipadi
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=20090319215358.611346000@intel.com \
--to=venkatesh.pallipadi@intel.com \
--cc=airlied@redhat.com \
--cc=arjan@infradead.org \
--cc=eric@anholt.net \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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