summaryrefslogtreecommitdiff
path: root/arch/x86/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-19 15:56:05 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-19 15:56:05 -0800
commitcf8c0d1dbcfaba56adde85b63190a8bceda0cd04 (patch)
tree870e47b308d77527d3e161f86832b66f44dfd45a /arch/x86/mm
parentd5c67bac833c6c9cc713f6a27daa77dcba898dd8 (diff)
parent156fbc3fbe4ab640297b1ae2092821363840aeb6 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: (32 commits) x86: fix page_is_ram() thinko x86: fix WARN_ON() message: teach page_is_ram() about the special 4Kb bios data page x86: i8259A: remove redundant irq_descinitialization x86: fix vdso_install breaks user "make install" x86: change IO delay back to 0x80 x86: lds - Use THREAD_SIZE instead of numeric constant x86: lds - Use PAGE_SIZE instead of numeric constant x86 cleanup: suspend_asm_64.S - use X86_CR4_PGE instead of numeric value x86: docs fixes to Documentation/i386/IO-APIC.txt x86: fix printout ugliness in cpu info printk x86: clean up csum-wrappers_64.c some more x86: coding style fixes in arch/x86/lib/csum-wrappers_64.c x86: coding style fixes in arch/x86/lib/io_64.c x86: exclude vsyscall files from stackprotect x86: add pgd_large() on 64-bit, for consistency x86: minor cleanup of comments in processor.h x86: annotate pci/common.s:pci_scan_bus_with_sysdata with __devinit x86: fix section mismatch in head_64.S:initial_code x86: fix section mismatch in srat_64.c:reserve_hotadd x86: fix section mismatch warning in topology.c:arch_register_cpu ...
Diffstat (limited to 'arch/x86/mm')
-rw-r--r--arch/x86/mm/ioremap.c24
-rw-r--r--arch/x86/mm/pageattr.c5
-rw-r--r--arch/x86/mm/srat_64.c3
3 files changed, 18 insertions, 14 deletions
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 9f42d7e9c158..f4c95aec5acb 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -42,6 +42,22 @@ int page_is_ram(unsigned long pagenr)
unsigned long addr, end;
int i;
+ /*
+ * A special case is the first 4Kb of memory;
+ * This is a BIOS owned area, not kernel ram, but generally
+ * not listed as such in the E820 table.
+ */
+ if (pagenr == 0)
+ return 0;
+
+ /*
+ * Second special case: Some BIOSen report the PC BIOS
+ * area (640->1Mb) as ram even though it is not.
+ */
+ if (pagenr >= (BIOS_BEGIN >> PAGE_SHIFT) &&
+ pagenr < (BIOS_END >> PAGE_SHIFT))
+ return 0;
+
for (i = 0; i < e820.nr_map; i++) {
/*
* Not usable memory:
@@ -51,14 +67,6 @@ int page_is_ram(unsigned long pagenr)
addr = (e820.map[i].addr + PAGE_SIZE-1) >> PAGE_SHIFT;
end = (e820.map[i].addr + e820.map[i].size) >> PAGE_SHIFT;
- /*
- * Sanity check: Some BIOSen report areas as RAM that
- * are not. Notably the 640->1Mb area, which is the
- * PCI BIOS area.
- */
- if (addr >= (BIOS_BEGIN >> PAGE_SHIFT) &&
- end < (BIOS_END >> PAGE_SHIFT))
- continue;
if ((pagenr >= addr) && (pagenr < end))
return 1;
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 3ee14996c829..e2a74ea11a53 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -513,7 +513,6 @@ static int __change_page_attr(struct cpa_data *cpa, int primary)
unsigned long address = cpa->vaddr;
int do_split, err;
unsigned int level;
- struct page *kpte_page;
pte_t *kpte, old_pte;
repeat:
@@ -532,10 +531,6 @@ repeat:
return -EINVAL;
}
- kpte_page = virt_to_page(kpte);
- BUG_ON(PageLRU(kpte_page));
- BUG_ON(PageCompound(kpte_page));
-
if (level == PG_LEVEL_4K) {
pte_t new_pte;
pgprot_t new_prot = pte_pgprot(old_pte);
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c
index ecd91ea8a8ae..845001c617cc 100644
--- a/arch/x86/mm/srat_64.c
+++ b/arch/x86/mm/srat_64.c
@@ -166,7 +166,8 @@ static inline int save_add_info(void) {return 0;}
* Both SPARSE and RESERVE need nodes_add information.
* This code supports one contiguous hot add area per node.
*/
-static int reserve_hotadd(int node, unsigned long start, unsigned long end)
+static int __init
+reserve_hotadd(int node, unsigned long start, unsigned long end)
{
unsigned long s_pfn = start >> PAGE_SHIFT;
unsigned long e_pfn = end >> PAGE_SHIFT;