aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-07-08 18:06:27 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-16 04:54:39 -0400
commitcbcd79c2e5b496b84845618cef734b4c40736576 (patch)
tree3d791f7d472fd127f3f9958e27eadc93db0cdc0f
parent87b935a0ef9a1ddf62f2f0c0fc17b10654ff41cd (diff)
x86: use __page_aligned_data/bss
Update arch/x86's use of page-aligned variables. The change to arch/x86/xen/mmu.c fixes an actual bug, but the rest are cleanups and to set a precedent. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Stephen Tweedie <sct@redhat.com> Cc: Eduardo Habkost <ehabkost@redhat.com> Cc: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/kernel/cpu/common_64.c4
-rw-r--r--arch/x86/kernel/irq_32.c7
-rw-r--r--arch/x86/xen/mmu.c15
3 files changed, 10 insertions, 16 deletions
diff --git a/arch/x86/kernel/cpu/common_64.c b/arch/x86/kernel/cpu/common_64.c
index 7b8cc72feb40..15419cd3c5a4 100644
--- a/arch/x86/kernel/cpu/common_64.c
+++ b/arch/x86/kernel/cpu/common_64.c
@@ -16,6 +16,7 @@
16#include <asm/i387.h> 16#include <asm/i387.h>
17#include <asm/msr.h> 17#include <asm/msr.h>
18#include <asm/io.h> 18#include <asm/io.h>
19#include <asm/linkage.h>
19#include <asm/mmu_context.h> 20#include <asm/mmu_context.h>
20#include <asm/mtrr.h> 21#include <asm/mtrr.h>
21#include <asm/mce.h> 22#include <asm/mce.h>
@@ -517,8 +518,7 @@ void pda_init(int cpu)
517} 518}
518 519
519char boot_exception_stacks[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + 520char boot_exception_stacks[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ +
520 DEBUG_STKSZ] 521 DEBUG_STKSZ] __page_aligned_bss;
521__attribute__((section(".bss.page_aligned")));
522 522
523extern asmlinkage void ignore_sysret(void); 523extern asmlinkage void ignore_sysret(void);
524 524
diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c
index 47a6f6f12478..1cf8c1fcc088 100644
--- a/arch/x86/kernel/irq_32.c
+++ b/arch/x86/kernel/irq_32.c
@@ -83,11 +83,8 @@ union irq_ctx {
83static union irq_ctx *hardirq_ctx[NR_CPUS] __read_mostly; 83static union irq_ctx *hardirq_ctx[NR_CPUS] __read_mostly;
84static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly; 84static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly;
85 85
86static char softirq_stack[NR_CPUS * THREAD_SIZE] 86static char softirq_stack[NR_CPUS * THREAD_SIZE] __page_aligned_bss;
87 __attribute__((__section__(".bss.page_aligned"))); 87static char hardirq_stack[NR_CPUS * THREAD_SIZE] __page_aligned_bss;
88
89static char hardirq_stack[NR_CPUS * THREAD_SIZE]
90 __attribute__((__section__(".bss.page_aligned")));
91 88
92static void call_on_stack(void *func, void *stack) 89static void call_on_stack(void *func, void *stack)
93{ 90{
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index ebd6900e331c..4fca9d88bef0 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -46,6 +46,7 @@
46#include <asm/tlbflush.h> 46#include <asm/tlbflush.h>
47#include <asm/mmu_context.h> 47#include <asm/mmu_context.h>
48#include <asm/paravirt.h> 48#include <asm/paravirt.h>
49#include <asm/linkage.h>
49 50
50#include <asm/xen/hypercall.h> 51#include <asm/xen/hypercall.h>
51#include <asm/xen/hypervisor.h> 52#include <asm/xen/hypervisor.h>
@@ -60,22 +61,18 @@
60#define TOP_ENTRIES (MAX_DOMAIN_PAGES / P2M_ENTRIES_PER_PAGE) 61#define TOP_ENTRIES (MAX_DOMAIN_PAGES / P2M_ENTRIES_PER_PAGE)
61 62
62/* Placeholder for holes in the address space */ 63/* Placeholder for holes in the address space */
63static unsigned long p2m_missing[P2M_ENTRIES_PER_PAGE] 64static unsigned long p2m_missing[P2M_ENTRIES_PER_PAGE] __page_aligned_data =
64 __attribute__((section(".data.page_aligned"))) =
65 { [ 0 ... P2M_ENTRIES_PER_PAGE-1 ] = ~0UL }; 65 { [ 0 ... P2M_ENTRIES_PER_PAGE-1 ] = ~0UL };
66 66
67 /* Array of pointers to pages containing p2m entries */ 67 /* Array of pointers to pages containing p2m entries */
68static unsigned long *p2m_top[TOP_ENTRIES] 68static unsigned long *p2m_top[TOP_ENTRIES] __page_aligned_data =
69 __attribute__((section(".data.page_aligned"))) =
70 { [ 0 ... TOP_ENTRIES - 1] = &p2m_missing[0] }; 69 { [ 0 ... TOP_ENTRIES - 1] = &p2m_missing[0] };
71 70
72/* Arrays of p2m arrays expressed in mfns used for save/restore */ 71/* Arrays of p2m arrays expressed in mfns used for save/restore */
73static unsigned long p2m_top_mfn[TOP_ENTRIES] 72static unsigned long p2m_top_mfn[TOP_ENTRIES] __page_aligned_bss;
74 __attribute__((section(".bss.page_aligned")));
75 73
76static unsigned long p2m_top_mfn_list[ 74static unsigned long p2m_top_mfn_list[TOP_ENTRIES / P2M_ENTRIES_PER_PAGE]
77 PAGE_ALIGN(TOP_ENTRIES / P2M_ENTRIES_PER_PAGE)] 75 __page_aligned_bss;
78 __attribute__((section(".bss.page_aligned")));
79 76
80static inline unsigned p2m_top_index(unsigned long pfn) 77static inline unsigned p2m_top_index(unsigned long pfn)
81{ 78{