From aa8bd81ff5f6279dee10df193b03f68d94ccb9c6 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 30 Jan 2008 13:34:05 +0100 Subject: [PATCH] --- yaml --- r: 80511 b: refs/heads/master c: 74ff2857f099951020a47420872f5c1460f32c27 h: refs/heads/master i: 80509: d0462c73a06924066b31b78d56a8e1963c4bd9d3 80507: 2c8fe5e15087b16ed66cf8d23ed2a3326d7dd75e 80503: 2813fc9af1b7d1da12691ceb071feac9b76f8ed4 80495: 3ff01ccadad051b5056072bd74ed594fc1ac38e9 80479: b621ed8018b184355fe9e225fae1263f1c7d1741 80447: ab401c154c04f1e89dafe9ef9d1f198cea9feeca 80383: e13e23c6e7cdde50b1ecc2e62f8eb5ff2d816170 v: v3 --- [refs] | 2 +- trunk/arch/x86/mm/ioremap_32.c | 4 ++-- trunk/arch/x86/mm/ioremap_64.c | 14 ++++++-------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index a42ecca3260c..689a724a67f3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f87519e8f4f1de9b39a40e56479a7ad2443169dd +refs/heads/master: 74ff2857f099951020a47420872f5c1460f32c27 diff --git a/trunk/arch/x86/mm/ioremap_32.c b/trunk/arch/x86/mm/ioremap_32.c index d43251c9c1c6..213ace58a188 100644 --- a/trunk/arch/x86/mm/ioremap_32.c +++ b/trunk/arch/x86/mm/ioremap_32.c @@ -74,7 +74,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, /* * Ok, go for it.. */ - area = get_vm_area(size, VM_IOREMAP | (flags << 20)); + area = get_vm_area(size, VM_IOREMAP); if (!area) return NULL; area->phys_addr = phys_addr; @@ -189,7 +189,7 @@ void iounmap(volatile void __iomem *addr) } /* Reset the direct mapping. Can block */ - if ((p->flags >> 20) && p->phys_addr < virt_to_phys(high_memory) - 1) { + if (p->phys_addr < virt_to_phys(high_memory) - 1) { change_page_attr(virt_to_page(__va(p->phys_addr)), get_vm_area_size(p) >> PAGE_SHIFT, PAGE_KERNEL); diff --git a/trunk/arch/x86/mm/ioremap_64.c b/trunk/arch/x86/mm/ioremap_64.c index 8862a19f39c8..bb9246c4a07b 100644 --- a/trunk/arch/x86/mm/ioremap_64.c +++ b/trunk/arch/x86/mm/ioremap_64.c @@ -31,7 +31,7 @@ EXPORT_SYMBOL(__phys_addr); * conflicts. */ static int ioremap_change_attr(unsigned long phys_addr, unsigned long size, - unsigned long flags) + pgprot_t prot) { int err = 0; if (phys_addr + size - 1 < (end_pfn_map << PAGE_SHIFT)) { @@ -50,8 +50,8 @@ static int ioremap_change_attr(unsigned long phys_addr, unsigned long size, * the phys addr can be a in hole between nodes and * not have an memmap entry. */ - err = change_page_attr_addr(vaddr,npages, - MAKE_GLOBAL(__PAGE_KERNEL|flags)); + err = change_page_attr_addr(vaddr, npages, prot); + if (!err) global_flush_tlb(); } @@ -97,7 +97,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, /* * Ok, go for it.. */ - area = get_vm_area(size, VM_IOREMAP | (flags << 20)); + area = get_vm_area(size, VM_IOREMAP); if (!area) return NULL; area->phys_addr = phys_addr; @@ -107,8 +107,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, remove_vm_area((void *)(PAGE_MASK & (unsigned long) addr)); return NULL; } - if (flags && ioremap_change_attr(phys_addr, size, flags) < 0) { - area->flags &= 0xffffff; + if (ioremap_change_attr(phys_addr, size, pgprot) < 0) { vunmap(addr); return NULL; } @@ -180,8 +179,7 @@ void iounmap(volatile void __iomem *addr) } /* Reset the direct mapping. Can block */ - if (p->flags >> 20) - ioremap_change_attr(p->phys_addr, p->size, 0); + ioremap_change_attr(p->phys_addr, p->size, PAGE_KERNEL); /* Finally remove it */ o = remove_vm_area((void *)addr);