[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1201858499.4051.19.camel@caritas-dev.intel.com>
Date: Fri, 01 Feb 2008 17:34:59 +0800
From: "Huang, Ying" <ying.huang@...el.com>
To: Ingo Molnar <mingo@...hat.com>, "H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>, Andi Kleen <ak@...e.de>
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH 3/4] x86: update usage of set_memory_xx
This patch updates the usage of set_memory_xx according to changes in
previous patch.
Signed-off-by: Huang Ying <ying.huang@...el.com>
---
arch/x86/kernel/pci-gart_64.c | 3 ++-
arch/x86/mm/init_32.c | 4 ++--
arch/x86/mm/init_64.c | 8 ++++----
arch/x86/mm/ioremap.c | 4 ++--
4 files changed, 10 insertions(+), 9 deletions(-)
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -91,10 +91,10 @@ static int ioremap_change_attr(unsigned
switch (mode) {
case IOR_MODE_UNCACHED:
default:
- err = set_memory_uc(vaddr, nrpages);
+ err = set_memory_uc(vaddr, paddr, nrpages);
break;
case IOR_MODE_CACHED:
- err = set_memory_wb(vaddr, nrpages);
+ err = set_memory_wb(vaddr, paddr, nrpages);
break;
}
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -570,7 +570,8 @@ static __init int init_k8_gatt(struct ag
gatt = (void *)__get_free_pages(GFP_KERNEL, get_order(gatt_size));
if (!gatt)
panic("Cannot allocate GATT table");
- if (set_memory_uc((unsigned long)gatt, gatt_size >> PAGE_SHIFT))
+ if (set_memory_uc((unsigned long)gatt, __pa(gatt),
+ gatt_size >> PAGE_SHIFT))
panic("Could not set GART PTEs to uncacheable pages");
memset(gatt, 0, gatt_size);
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -610,7 +610,7 @@ void free_init_pages(char *what, unsigne
#ifdef CONFIG_DEBUG_PAGEALLOC
printk(KERN_INFO "debug: unmapping init memory %08lx..%08lx\n",
begin, PAGE_ALIGN(end));
- set_memory_np(begin, (end - begin) >> PAGE_SHIFT);
+ set_memory_np(begin, __pa(begin), (end - begin) >> PAGE_SHIFT);
#else
printk(KERN_INFO "Freeing %s: %luk freed\n", what, (end - begin) >> 10);
@@ -656,7 +656,7 @@ void mark_rodata_ro(void)
if (end <= start)
return;
- set_memory_ro(start, (end - start) >> PAGE_SHIFT);
+ set_memory_ro(start, __pa(start), (end - start) >> PAGE_SHIFT);
printk(KERN_INFO "Write protecting the kernel read-only data: %luk\n",
(end - start) >> 10);
@@ -665,10 +665,10 @@ void mark_rodata_ro(void)
#ifdef CONFIG_CPA_DEBUG
printk(KERN_INFO "Testing CPA: undo %lx-%lx\n", start, end);
- set_memory_rw(start, (end-start) >> PAGE_SHIFT);
+ set_memory_rw(start, __pa(start), (end-start) >> PAGE_SHIFT);
printk(KERN_INFO "Testing CPA: again\n");
- set_memory_ro(start, (end-start) >> PAGE_SHIFT);
+ set_memory_ro(start, __pa(start), (end-start) >> PAGE_SHIFT);
#endif
}
#endif
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -788,7 +788,7 @@ void free_init_pages(char *what, unsigne
*/
printk(KERN_INFO "debug: unmapping init memory %08lx..%08lx\n",
begin, PAGE_ALIGN(end));
- set_memory_np(begin, (end - begin) >> PAGE_SHIFT);
+ set_memory_np(begin, __pa(begin), (end - begin) >> PAGE_SHIFT);
#else
unsigned long addr;
@@ -797,7 +797,7 @@ void free_init_pages(char *what, unsigne
* we are going to free part of that, we need to make that
* writeable first.
*/
- set_memory_rw(begin, (end - begin) >> PAGE_SHIFT);
+ set_memory_rw(begin, __pa(begin), (end - begin) >> PAGE_SHIFT);
for (addr = begin; addr < end; addr += PAGE_SIZE) {
ClearPageReserved(virt_to_page(addr));
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists