Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=44136717e06b888c2d3129a80abf9ac79233f1eb
Commit:     44136717e06b888c2d3129a80abf9ac79233f1eb
Parent:     d9db847f29bec9957c53fbdc05d65c4286235005
Author:     Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 30 13:34:03 2008 +0100
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 13:34:03 2008 +0100

    x86: 64-bit pageattr.c, prepare for unification
    
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 arch/x86/mm/pageattr_64.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/x86/mm/pageattr_64.c b/arch/x86/mm/pageattr_64.c
index 34acbcd..190d4d3 100644
--- a/arch/x86/mm/pageattr_64.c
+++ b/arch/x86/mm/pageattr_64.c
@@ -123,14 +123,15 @@ int change_page_attr_addr(unsigned long address, int 
numpages, pgprot_t prot)
 {
        int err = 0, kernel_map = 0, i;
 
+#ifdef CONFIG_X86_64
        if (address >= __START_KERNEL_map &&
                        address < __START_KERNEL_map + KERNEL_TEXT_SIZE) {
 
                address = (unsigned long)__va(__pa(address));
                kernel_map = 1;
        }
+#endif
 
-       down_write(&init_mm.mmap_sem);
        for (i = 0; i < numpages; i++, address += PAGE_SIZE) {
                unsigned long pfn = __pa(address) >> PAGE_SHIFT;
 
@@ -139,8 +140,11 @@ int change_page_attr_addr(unsigned long address, int 
numpages, pgprot_t prot)
                        if (err)
                                break;
                }
-               /* Handle kernel mapping too which aliases part of the
-                * lowmem */
+#ifdef CONFIG_X86_64
+               /*
+                * Handle kernel mapping too which aliases part of
+                * lowmem:
+                */
                if (__pa(address) < KERNEL_TEXT_SIZE) {
                        unsigned long addr2;
                        pgprot_t prot2;
@@ -150,8 +154,8 @@ int change_page_attr_addr(unsigned long address, int 
numpages, pgprot_t prot)
                        prot2 = pte_pgprot(pte_mkexec(pfn_pte(0, prot)));
                        err = __change_page_attr(addr2, pfn_to_page(pfn), 
prot2);
                }
+#endif
        }
-       up_write(&init_mm.mmap_sem);
 
        return err;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to