Skip to contentSkip to conversation

x86: move max_pfn_mapped and max_low_pfn_mapped to setup.c

PATCH In review Pekka Enberg 1 participant 2 messages Apr 28, 2009 – Apr 30, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 x86: move max_pfn_mapped and max_low_pfn_mapped to setup.c

From: Pekka Enberg <[email protected]>

This patch moves the max_pfn_mapped and max_low_pfn_mapped global variables to kernel/setup.c where they're initialized.

[ Impact: cleanup ]
---
 arch/x86/kernel/setup.c |    8 ++++++++
 arch/x86/mm/init_32.c   |    4 +---
 arch/x86/mm/init_64.c   |    8 --------
 3 files changed, 9 insertions(+), 11 deletions(-)
arch/x86/kernel/setup.c +8 -0
index b415843..0d77e56 100644
@@ -112,6 +112,14 @@
 #define ARCH_SETUP
 #endif
 
+/*
+ * end_pfn only includes RAM, while max_pfn_mapped includes all e820 entries.
+ * The direct mapping extends to max_pfn_mapped, so that we can directly access
+ * apertures, ACPI and other tables without having to play with fixmaps.
+ */
+unsigned long max_low_pfn_mapped;
+unsigned long max_pfn_mapped;
+
 RESERVE_BRK(dmi_alloc, 65536);
 
 unsigned int boot_cpu_id __read_mostly;
arch/x86/mm/init_32.c +1 -3
index 749559e..ce2ec31 100644
@@ -49,11 +49,9 @@
 #include <asm/paravirt.h>
 #include <asm/setup.h>
 #include <asm/cacheflush.h>
+#include <asm/page_types.h>
 #include <asm/init.h>
 
-unsigned long max_low_pfn_mapped;
-unsigned long max_pfn_mapped;
-
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
 unsigned long highstart_pfn, highend_pfn;
 
arch/x86/mm/init_64.c +0 -8
index 1753e80..abb932f 100644
@@ -50,14 +50,6 @@
 #include <asm/cacheflush.h>
 #include <asm/init.h>
 
-/*
- * end_pfn only includes RAM, while max_pfn_mapped includes all e820 entries.
- * The direct mapping extends to max_pfn_mapped, so that we can directly access
- * apertures, ACPI and other tables without having to play with fixmaps.
- */
-unsigned long max_low_pfn_mapped;
-unsigned long max_pfn_mapped;
-
 static unsigned long dma_reserve __initdata;
 
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
Signature · 1 line
1.5.6.3
#1 lore raw
Commit-ID:  2b72394e4089643f11669d9610907a1442fe044a
Gitweb:     http://git.kernel.org/tip/2b72394e4089643f11669d9610907a1442fe044a
Author:     Pekka Enberg <[email protected]>
AuthorDate: Tue, 28 Apr 2009 16:00:49 +0300
Committer:  Ingo Molnar <[email protected]>
CommitDate: Thu, 30 Apr 2009 10:12:36 +0200

x86: move max_pfn_mapped and max_low_pfn_mapped to setup.c

This patch moves the max_pfn_mapped and max_low_pfn_mapped global variables to kernel/setup.c where they're initialized.

[ Impact: cleanup ]

LKML-Reference: <1240923649.1982.21.camel@penberg-laptop>

---
 arch/x86/kernel/setup.c |    8 ++++++++
 arch/x86/mm/init_32.c   |    4 +---
 arch/x86/mm/init_64.c   |    8 --------
 3 files changed, 9 insertions(+), 11 deletions(-)
arch/x86/kernel/setup.c +8 -0
index b415843..0d77e56 100644
@@ -112,6 +112,14 @@
 #define ARCH_SETUP
 #endif
 
+/*
+ * end_pfn only includes RAM, while max_pfn_mapped includes all e820 entries.
+ * The direct mapping extends to max_pfn_mapped, so that we can directly access
+ * apertures, ACPI and other tables without having to play with fixmaps.
+ */
+unsigned long max_low_pfn_mapped;
+unsigned long max_pfn_mapped;
+
 RESERVE_BRK(dmi_alloc, 65536);
 
 unsigned int boot_cpu_id __read_mostly;
arch/x86/mm/init_32.c +1 -3
index 2b27120..a640a7f 100644
@@ -49,11 +49,9 @@
 #include <asm/paravirt.h>
 #include <asm/setup.h>
 #include <asm/cacheflush.h>
+#include <asm/page_types.h>
 #include <asm/init.h>
 
-unsigned long max_low_pfn_mapped;
-unsigned long max_pfn_mapped;
-
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
 unsigned long highstart_pfn, highend_pfn;
 
arch/x86/mm/init_64.c +0 -8
index a4e7846..1016ea0 100644
@@ -50,14 +50,6 @@
 #include <asm/cacheflush.h>
 #include <asm/init.h>
 
-/*
- * end_pfn only includes RAM, while max_pfn_mapped includes all e820 entries.
- * The direct mapping extends to max_pfn_mapped, so that we can directly access
- * apertures, ACPI and other tables without having to play with fixmaps.
- */
-unsigned long max_low_pfn_mapped;
-unsigned long max_pfn_mapped;
-
 static unsigned long dma_reserve __initdata;
 
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);