diff options
Diffstat (limited to 'arch/x86_64/kernel')
-rw-r--r-- | arch/x86_64/kernel/irq.c | 4 | ||||
-rw-r--r-- | arch/x86_64/kernel/nmi.c | 6 | ||||
-rw-r--r-- | arch/x86_64/kernel/setup64.c | 8 | ||||
-rw-r--r-- | arch/x86_64/kernel/smpboot.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/traps.c | 11 | ||||
-rw-r--r-- | arch/x86_64/kernel/x8664_ksyms.c | 2 |
6 files changed, 16 insertions, 17 deletions
diff --git a/arch/x86_64/kernel/irq.c b/arch/x86_64/kernel/irq.c index 8bf57f78d923..30d2a1e545fe 100644 --- a/arch/x86_64/kernel/irq.c +++ b/arch/x86_64/kernel/irq.c | |||
@@ -70,13 +70,13 @@ skip: | |||
70 | seq_printf(p, "NMI: "); | 70 | seq_printf(p, "NMI: "); |
71 | for (j = 0; j < NR_CPUS; j++) | 71 | for (j = 0; j < NR_CPUS; j++) |
72 | if (cpu_online(j)) | 72 | if (cpu_online(j)) |
73 | seq_printf(p, "%10u ", cpu_pda[j].__nmi_count); | 73 | seq_printf(p, "%10u ", cpu_pda(j)->__nmi_count); |
74 | seq_putc(p, '\n'); | 74 | seq_putc(p, '\n'); |
75 | #ifdef CONFIG_X86_LOCAL_APIC | 75 | #ifdef CONFIG_X86_LOCAL_APIC |
76 | seq_printf(p, "LOC: "); | 76 | seq_printf(p, "LOC: "); |
77 | for (j = 0; j < NR_CPUS; j++) | 77 | for (j = 0; j < NR_CPUS; j++) |
78 | if (cpu_online(j)) | 78 | if (cpu_online(j)) |
79 | seq_printf(p, "%10u ", cpu_pda[j].apic_timer_irqs); | 79 | seq_printf(p, "%10u ", cpu_pda(j)->apic_timer_irqs); |
80 | seq_putc(p, '\n'); | 80 | seq_putc(p, '\n'); |
81 | #endif | 81 | #endif |
82 | seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); | 82 | seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); |
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index 39d445e16f22..40575d83d12f 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c | |||
@@ -155,19 +155,19 @@ int __init check_nmi_watchdog (void) | |||
155 | smp_call_function(nmi_cpu_busy, (void *)&endflag, 0, 0); | 155 | smp_call_function(nmi_cpu_busy, (void *)&endflag, 0, 0); |
156 | 156 | ||
157 | for (cpu = 0; cpu < NR_CPUS; cpu++) | 157 | for (cpu = 0; cpu < NR_CPUS; cpu++) |
158 | counts[cpu] = cpu_pda[cpu].__nmi_count; | 158 | counts[cpu] = cpu_pda(cpu)->__nmi_count; |
159 | local_irq_enable(); | 159 | local_irq_enable(); |
160 | mdelay((10*1000)/nmi_hz); // wait 10 ticks | 160 | mdelay((10*1000)/nmi_hz); // wait 10 ticks |
161 | 161 | ||
162 | for (cpu = 0; cpu < NR_CPUS; cpu++) { | 162 | for (cpu = 0; cpu < NR_CPUS; cpu++) { |
163 | if (!cpu_online(cpu)) | 163 | if (!cpu_online(cpu)) |
164 | continue; | 164 | continue; |
165 | if (cpu_pda[cpu].__nmi_count - counts[cpu] <= 5) { | 165 | if (cpu_pda(cpu)->__nmi_count - counts[cpu] <= 5) { |
166 | endflag = 1; | 166 | endflag = 1; |
167 | printk("CPU#%d: NMI appears to be stuck (%d->%d)!\n", | 167 | printk("CPU#%d: NMI appears to be stuck (%d->%d)!\n", |
168 | cpu, | 168 | cpu, |
169 | counts[cpu], | 169 | counts[cpu], |
170 | cpu_pda[cpu].__nmi_count); | 170 | cpu_pda(cpu)->__nmi_count); |
171 | nmi_active = 0; | 171 | nmi_active = 0; |
172 | lapic_nmi_owner &= ~LAPIC_NMI_WATCHDOG; | 172 | lapic_nmi_owner &= ~LAPIC_NMI_WATCHDOG; |
173 | nmi_perfctr_msr = 0; | 173 | nmi_perfctr_msr = 0; |
diff --git a/arch/x86_64/kernel/setup64.c b/arch/x86_64/kernel/setup64.c index 972f5d4ce823..66325a79ed53 100644 --- a/arch/x86_64/kernel/setup64.c +++ b/arch/x86_64/kernel/setup64.c | |||
@@ -30,7 +30,7 @@ char x86_boot_params[BOOT_PARAM_SIZE] __initdata = {0,}; | |||
30 | 30 | ||
31 | cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE; | 31 | cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE; |
32 | 32 | ||
33 | struct x8664_pda cpu_pda[NR_CPUS] __cacheline_aligned; | 33 | struct x8664_pda _cpu_pda[NR_CPUS] __cacheline_aligned; |
34 | 34 | ||
35 | struct desc_ptr idt_descr = { 256 * 16, (unsigned long) idt_table }; | 35 | struct desc_ptr idt_descr = { 256 * 16, (unsigned long) idt_table }; |
36 | 36 | ||
@@ -110,18 +110,18 @@ void __init setup_per_cpu_areas(void) | |||
110 | } | 110 | } |
111 | if (!ptr) | 111 | if (!ptr) |
112 | panic("Cannot allocate cpu data for CPU %d\n", i); | 112 | panic("Cannot allocate cpu data for CPU %d\n", i); |
113 | cpu_pda[i].data_offset = ptr - __per_cpu_start; | 113 | cpu_pda(i)->data_offset = ptr - __per_cpu_start; |
114 | memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start); | 114 | memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start); |
115 | } | 115 | } |
116 | } | 116 | } |
117 | 117 | ||
118 | void pda_init(int cpu) | 118 | void pda_init(int cpu) |
119 | { | 119 | { |
120 | struct x8664_pda *pda = &cpu_pda[cpu]; | 120 | struct x8664_pda *pda = cpu_pda(cpu); |
121 | 121 | ||
122 | /* Setup up data that may be needed in __get_free_pages early */ | 122 | /* Setup up data that may be needed in __get_free_pages early */ |
123 | asm volatile("movl %0,%%fs ; movl %0,%%gs" :: "r" (0)); | 123 | asm volatile("movl %0,%%fs ; movl %0,%%gs" :: "r" (0)); |
124 | wrmsrl(MSR_GS_BASE, cpu_pda + cpu); | 124 | wrmsrl(MSR_GS_BASE, pda); |
125 | 125 | ||
126 | pda->cpunumber = cpu; | 126 | pda->cpunumber = cpu; |
127 | pda->irqcount = -1; | 127 | pda->irqcount = -1; |
diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c index 994728564d6b..4884ca12444a 100644 --- a/arch/x86_64/kernel/smpboot.c +++ b/arch/x86_64/kernel/smpboot.c | |||
@@ -792,7 +792,7 @@ static int __cpuinit do_boot_cpu(int cpu, int apicid) | |||
792 | 792 | ||
793 | do_rest: | 793 | do_rest: |
794 | 794 | ||
795 | cpu_pda[cpu].pcurrent = c_idle.idle; | 795 | cpu_pda(cpu)->pcurrent = c_idle.idle; |
796 | 796 | ||
797 | start_rip = setup_trampoline(); | 797 | start_rip = setup_trampoline(); |
798 | 798 | ||
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index 8d21d87b0d77..0827b141c05e 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -70,7 +70,6 @@ asmlinkage void reserved(void); | |||
70 | asmlinkage void alignment_check(void); | 70 | asmlinkage void alignment_check(void); |
71 | asmlinkage void machine_check(void); | 71 | asmlinkage void machine_check(void); |
72 | asmlinkage void spurious_interrupt_bug(void); | 72 | asmlinkage void spurious_interrupt_bug(void); |
73 | asmlinkage void call_debug(void); | ||
74 | 73 | ||
75 | struct notifier_block *die_chain; | 74 | struct notifier_block *die_chain; |
76 | static DEFINE_SPINLOCK(die_notifier_lock); | 75 | static DEFINE_SPINLOCK(die_notifier_lock); |
@@ -139,7 +138,7 @@ static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack, | |||
139 | switch (k + 1) { | 138 | switch (k + 1) { |
140 | #if DEBUG_STKSZ > EXCEPTION_STKSZ | 139 | #if DEBUG_STKSZ > EXCEPTION_STKSZ |
141 | case DEBUG_STACK: | 140 | case DEBUG_STACK: |
142 | end = cpu_pda[cpu].debugstack + DEBUG_STKSZ; | 141 | end = cpu_pda(cpu)->debugstack + DEBUG_STKSZ; |
143 | break; | 142 | break; |
144 | #endif | 143 | #endif |
145 | default: | 144 | default: |
@@ -186,7 +185,7 @@ void show_trace(unsigned long *stack) | |||
186 | { | 185 | { |
187 | unsigned long addr; | 186 | unsigned long addr; |
188 | const unsigned cpu = safe_smp_processor_id(); | 187 | const unsigned cpu = safe_smp_processor_id(); |
189 | unsigned long *irqstack_end = (unsigned long *)cpu_pda[cpu].irqstackptr; | 188 | unsigned long *irqstack_end = (unsigned long *)cpu_pda(cpu)->irqstackptr; |
190 | int i; | 189 | int i; |
191 | unsigned used = 0; | 190 | unsigned used = 0; |
192 | 191 | ||
@@ -254,8 +253,8 @@ void show_stack(struct task_struct *tsk, unsigned long * rsp) | |||
254 | unsigned long *stack; | 253 | unsigned long *stack; |
255 | int i; | 254 | int i; |
256 | const int cpu = safe_smp_processor_id(); | 255 | const int cpu = safe_smp_processor_id(); |
257 | unsigned long *irqstack_end = (unsigned long *) (cpu_pda[cpu].irqstackptr); | 256 | unsigned long *irqstack_end = (unsigned long *) (cpu_pda(cpu)->irqstackptr); |
258 | unsigned long *irqstack = (unsigned long *) (cpu_pda[cpu].irqstackptr - IRQSTACKSIZE); | 257 | unsigned long *irqstack = (unsigned long *) (cpu_pda(cpu)->irqstackptr - IRQSTACKSIZE); |
259 | 258 | ||
260 | // debugging aid: "show_stack(NULL, NULL);" prints the | 259 | // debugging aid: "show_stack(NULL, NULL);" prints the |
261 | // back trace for this cpu. | 260 | // back trace for this cpu. |
@@ -303,7 +302,7 @@ void show_registers(struct pt_regs *regs) | |||
303 | int in_kernel = !user_mode(regs); | 302 | int in_kernel = !user_mode(regs); |
304 | unsigned long rsp; | 303 | unsigned long rsp; |
305 | const int cpu = safe_smp_processor_id(); | 304 | const int cpu = safe_smp_processor_id(); |
306 | struct task_struct *cur = cpu_pda[cpu].pcurrent; | 305 | struct task_struct *cur = cpu_pda(cpu)->pcurrent; |
307 | 306 | ||
308 | rsp = regs->rsp; | 307 | rsp = regs->rsp; |
309 | 308 | ||
diff --git a/arch/x86_64/kernel/x8664_ksyms.c b/arch/x86_64/kernel/x8664_ksyms.c index 3008b8339290..901f8b038dc7 100644 --- a/arch/x86_64/kernel/x8664_ksyms.c +++ b/arch/x86_64/kernel/x8664_ksyms.c | |||
@@ -96,7 +96,7 @@ EXPORT_SYMBOL(pci_mem_start); | |||
96 | EXPORT_SYMBOL(copy_page); | 96 | EXPORT_SYMBOL(copy_page); |
97 | EXPORT_SYMBOL(clear_page); | 97 | EXPORT_SYMBOL(clear_page); |
98 | 98 | ||
99 | EXPORT_SYMBOL(cpu_pda); | 99 | EXPORT_SYMBOL(_cpu_pda); |
100 | #ifdef CONFIG_SMP | 100 | #ifdef CONFIG_SMP |
101 | EXPORT_SYMBOL(cpu_data); | 101 | EXPORT_SYMBOL(cpu_data); |
102 | EXPORT_SYMBOL(__write_lock_failed); | 102 | EXPORT_SYMBOL(__write_lock_failed); |