From: "venkatesh.pallipadi@intel.com" <venkatesh.pallipadi@intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
venkatesh.pallipadi@intel.com, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:x86/mm] x86, CPA: Add a flag parameter to cpa set_clr()
Date: Fri, 20 Mar 2009 10:24:25 GMT [thread overview]
Message-ID: <tip-728c9518873de0bbb92b66daa1943b12e5b9f80f@git.kernel.org> (raw)
In-Reply-To: <20090319215358.611346000@intel.com>
Commit-ID: 728c9518873de0bbb92b66daa1943b12e5b9f80f
Gitweb: http://git.kernel.org/tip/728c9518873de0bbb92b66daa1943b12e5b9f80f
Author: venkatesh.pallipadi@intel.com <venkatesh.pallipadi@intel.com>
AuthorDate: Thu, 19 Mar 2009 14:51:13 -0700
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 20 Mar 2009 10:34:47 +0100
x86, CPA: Add a flag parameter to cpa set_clr()
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>
Cc: arjan@infradead.org
Cc: eric@anholt.net
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: airlied@redhat.com
LKML-Reference: <20090319215358.611346000@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/mm/pageattr.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 1280565..69009af 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -787,7 +787,7 @@ static inline int cache_attr(pgprot_t attr)
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;
@@ -802,7 +802,7 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
return 0;
/* Ensure we are PAGE_SIZE aligned */
- if (!array) {
+ if (!(in_flag & CPA_ARRAY)) {
if (*addr & ~PAGE_MASK) {
*addr &= PAGE_MASK;
/*
@@ -840,7 +840,7 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
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 */
@@ -889,14 +889,14 @@ static inline int change_page_attr_set(unsigned long *addr, int numpages,
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-20 10:25 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 ` [patch 1/3] x86, CPA: Add a flag parameter to cpa set_clr venkatesh.pallipadi
2009-03-20 10:24 ` venkatesh.pallipadi [this message]
2009-03-19 21:51 ` [patch 2/3] x86, PAT: Add support for struct page pointer array in " 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=tip-728c9518873de0bbb92b66daa1943b12e5b9f80f@git.kernel.org \
--to=venkatesh.pallipadi@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--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
Powered by JetHome