]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86, CPA: Add a flag parameter to cpa set_clr()
authorvenkatesh.pallipadi@intel.com <venkatesh.pallipadi@intel.com>
Thu, 19 Mar 2009 21:51:13 +0000 (14:51 -0700)
committerIngo Molnar <mingo@elte.hu>
Fri, 20 Mar 2009 09:34:47 +0000 (10:34 +0100)
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

index 1280565670e4c75736c823688f92e67015f5d8f4..69009afa98c074910b18d125bb2aad336aa4f6f1 100644 (file)
@@ -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)