diff options
author | venkatesh.pallipadi@intel.com <venkatesh.pallipadi@intel.com> | 2009-03-19 17:51:13 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-20 05:34:47 -0400 |
commit | 728c9518873de0bbb92b66daa1943b12e5b9f80f (patch) | |
tree | cc15bfda861da15e33a9f885e99f58f04d8b92c6 /arch | |
parent | 7f00a2495bf5b98b097c47be5d6e2d4114ec39bf (diff) |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | 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 1280565670e4..69009afa98c0 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) | |||
787 | 787 | ||
788 | static int change_page_attr_set_clr(unsigned long *addr, int numpages, | 788 | static int change_page_attr_set_clr(unsigned long *addr, int numpages, |
789 | pgprot_t mask_set, pgprot_t mask_clr, | 789 | pgprot_t mask_set, pgprot_t mask_clr, |
790 | int force_split, int array) | 790 | int force_split, int in_flag) |
791 | { | 791 | { |
792 | struct cpa_data cpa; | 792 | struct cpa_data cpa; |
793 | int ret, cache, checkalias; | 793 | int ret, cache, checkalias; |
@@ -802,7 +802,7 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages, | |||
802 | return 0; | 802 | return 0; |
803 | 803 | ||
804 | /* Ensure we are PAGE_SIZE aligned */ | 804 | /* Ensure we are PAGE_SIZE aligned */ |
805 | if (!array) { | 805 | if (!(in_flag & CPA_ARRAY)) { |
806 | if (*addr & ~PAGE_MASK) { | 806 | if (*addr & ~PAGE_MASK) { |
807 | *addr &= PAGE_MASK; | 807 | *addr &= PAGE_MASK; |
808 | /* | 808 | /* |
@@ -840,7 +840,7 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages, | |||
840 | cpa.curpage = 0; | 840 | cpa.curpage = 0; |
841 | cpa.force_split = force_split; | 841 | cpa.force_split = force_split; |
842 | 842 | ||
843 | if (array) | 843 | if (in_flag & CPA_ARRAY) |
844 | cpa.flags |= CPA_ARRAY; | 844 | cpa.flags |= CPA_ARRAY; |
845 | 845 | ||
846 | /* No alias checking for _NX bit modifications */ | 846 | /* No alias checking for _NX bit modifications */ |
@@ -889,14 +889,14 @@ static inline int change_page_attr_set(unsigned long *addr, int numpages, | |||
889 | pgprot_t mask, int array) | 889 | pgprot_t mask, int array) |
890 | { | 890 | { |
891 | return change_page_attr_set_clr(addr, numpages, mask, __pgprot(0), 0, | 891 | return change_page_attr_set_clr(addr, numpages, mask, __pgprot(0), 0, |
892 | array); | 892 | (array ? CPA_ARRAY : 0)); |
893 | } | 893 | } |
894 | 894 | ||
895 | static inline int change_page_attr_clear(unsigned long *addr, int numpages, | 895 | static inline int change_page_attr_clear(unsigned long *addr, int numpages, |
896 | pgprot_t mask, int array) | 896 | pgprot_t mask, int array) |
897 | { | 897 | { |
898 | return change_page_attr_set_clr(addr, numpages, __pgprot(0), mask, 0, | 898 | return change_page_attr_set_clr(addr, numpages, __pgprot(0), mask, 0, |
899 | array); | 899 | (array ? CPA_ARRAY : 0)); |
900 | } | 900 | } |
901 | 901 | ||
902 | int _set_memory_uc(unsigned long addr, int numpages) | 902 | int _set_memory_uc(unsigned long addr, int numpages) |