aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/apic/io_apic.c5
-rw-r--r--arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c24
-rw-r--r--arch/x86/kernel/mpparse.c7
-rw-r--r--arch/x86/kernel/xsave.c2
4 files changed, 18 insertions, 20 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 767fe7e46d68..a2789e42e162 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -2524,7 +2524,6 @@ static void irq_complete_move(struct irq_desc **descp)
2524static inline void irq_complete_move(struct irq_desc **descp) {} 2524static inline void irq_complete_move(struct irq_desc **descp) {}
2525#endif 2525#endif
2526 2526
2527#ifdef CONFIG_X86_X2APIC
2528static void __eoi_ioapic_irq(unsigned int irq, struct irq_cfg *cfg) 2527static void __eoi_ioapic_irq(unsigned int irq, struct irq_cfg *cfg)
2529{ 2528{
2530 int apic, pin; 2529 int apic, pin;
@@ -2558,6 +2557,7 @@ eoi_ioapic_irq(struct irq_desc *desc)
2558 spin_unlock_irqrestore(&ioapic_lock, flags); 2557 spin_unlock_irqrestore(&ioapic_lock, flags);
2559} 2558}
2560 2559
2560#ifdef CONFIG_X86_X2APIC
2561static void ack_x2apic_level(unsigned int irq) 2561static void ack_x2apic_level(unsigned int irq)
2562{ 2562{
2563 struct irq_desc *desc = irq_to_desc(irq); 2563 struct irq_desc *desc = irq_to_desc(irq);
@@ -2634,6 +2634,9 @@ static void ack_apic_level(unsigned int irq)
2634 */ 2634 */
2635 ack_APIC_irq(); 2635 ack_APIC_irq();
2636 2636
2637 if (irq_remapped(irq))
2638 eoi_ioapic_irq(desc);
2639
2637 /* Now we can move and renable the irq */ 2640 /* Now we can move and renable the irq */
2638 if (unlikely(do_unmask_irq)) { 2641 if (unlikely(do_unmask_irq)) {
2639 /* Only migrate the irq if the ack has been received. 2642 /* Only migrate the irq if the ack has been received.
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
index 9d3af380c6bd..3e3cd3db7a0c 100644
--- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -153,7 +153,8 @@ struct drv_cmd {
153 u32 val; 153 u32 val;
154}; 154};
155 155
156static long do_drv_read(void *_cmd) 156/* Called via smp_call_function_single(), on the target CPU */
157static void do_drv_read(void *_cmd)
157{ 158{
158 struct drv_cmd *cmd = _cmd; 159 struct drv_cmd *cmd = _cmd;
159 u32 h; 160 u32 h;
@@ -170,10 +171,10 @@ static long do_drv_read(void *_cmd)
170 default: 171 default:
171 break; 172 break;
172 } 173 }
173 return 0;
174} 174}
175 175
176static long do_drv_write(void *_cmd) 176/* Called via smp_call_function_many(), on the target CPUs */
177static void do_drv_write(void *_cmd)
177{ 178{
178 struct drv_cmd *cmd = _cmd; 179 struct drv_cmd *cmd = _cmd;
179 u32 lo, hi; 180 u32 lo, hi;
@@ -192,23 +193,18 @@ static long do_drv_write(void *_cmd)
192 default: 193 default:
193 break; 194 break;
194 } 195 }
195 return 0;
196} 196}
197 197
198static void drv_read(struct drv_cmd *cmd) 198static void drv_read(struct drv_cmd *cmd)
199{ 199{
200 cmd->val = 0; 200 cmd->val = 0;
201 201
202 work_on_cpu(cpumask_any(cmd->mask), do_drv_read, cmd); 202 smp_call_function_single(cpumask_any(cmd->mask), do_drv_read, cmd, 1);
203} 203}
204 204
205static void drv_write(struct drv_cmd *cmd) 205static void drv_write(struct drv_cmd *cmd)
206{ 206{
207 unsigned int i; 207 smp_call_function_many(cmd->mask, do_drv_write, cmd, 1);
208
209 for_each_cpu(i, cmd->mask) {
210 work_on_cpu(i, do_drv_write, cmd);
211 }
212} 208}
213 209
214static u32 get_cur_val(const struct cpumask *mask) 210static u32 get_cur_val(const struct cpumask *mask)
@@ -252,15 +248,13 @@ struct perf_pair {
252 } aperf, mperf; 248 } aperf, mperf;
253}; 249};
254 250
255 251/* Called via smp_call_function_single(), on the target CPU */
256static long read_measured_perf_ctrs(void *_cur) 252static void read_measured_perf_ctrs(void *_cur)
257{ 253{
258 struct perf_pair *cur = _cur; 254 struct perf_pair *cur = _cur;
259 255
260 rdmsr(MSR_IA32_APERF, cur->aperf.split.lo, cur->aperf.split.hi); 256 rdmsr(MSR_IA32_APERF, cur->aperf.split.lo, cur->aperf.split.hi);
261 rdmsr(MSR_IA32_MPERF, cur->mperf.split.lo, cur->mperf.split.hi); 257 rdmsr(MSR_IA32_MPERF, cur->mperf.split.lo, cur->mperf.split.hi);
262
263 return 0;
264} 258}
265 259
266/* 260/*
@@ -283,7 +277,7 @@ static unsigned int get_measured_perf(struct cpufreq_policy *policy,
283 unsigned int perf_percent; 277 unsigned int perf_percent;
284 unsigned int retval; 278 unsigned int retval;
285 279
286 if (!work_on_cpu(cpu, read_measured_perf_ctrs, &readin)) 280 if (smp_call_function_single(cpu, read_measured_perf_ctrs, &cur, 1))
287 return 0; 281 return 0;
288 282
289 cur.aperf.whole = readin.aperf.whole - 283 cur.aperf.whole = readin.aperf.whole -
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index dce99dca6cf8..70fd7e414c15 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -679,7 +679,7 @@ void __init get_smp_config(void)
679 __get_smp_config(0); 679 __get_smp_config(0);
680} 680}
681 681
682static void smp_reserve_bootmem(struct mpf_intel *mpf) 682static void __init smp_reserve_bootmem(struct mpf_intel *mpf)
683{ 683{
684 unsigned long size = get_mpc_size(mpf->physptr); 684 unsigned long size = get_mpc_size(mpf->physptr);
685#ifdef CONFIG_X86_32 685#ifdef CONFIG_X86_32
@@ -838,7 +838,7 @@ static int __init get_MP_intsrc_index(struct mpc_intsrc *m)
838 838
839static struct mpc_intsrc __initdata *m_spare[SPARE_SLOT_NUM]; 839static struct mpc_intsrc __initdata *m_spare[SPARE_SLOT_NUM];
840 840
841static void check_irq_src(struct mpc_intsrc *m, int *nr_m_spare) 841static void __init check_irq_src(struct mpc_intsrc *m, int *nr_m_spare)
842{ 842{
843 int i; 843 int i;
844 844
@@ -866,7 +866,8 @@ static void check_irq_src(struct mpc_intsrc *m, int *nr_m_spare)
866 } 866 }
867} 867}
868#else /* CONFIG_X86_IO_APIC */ 868#else /* CONFIG_X86_IO_APIC */
869static inline void check_irq_src(struct mpc_intsrc *m, int *nr_m_spare) {} 869static
870inline void __init check_irq_src(struct mpc_intsrc *m, int *nr_m_spare) {}
870#endif /* CONFIG_X86_IO_APIC */ 871#endif /* CONFIG_X86_IO_APIC */
871 872
872static int check_slot(unsigned long mpc_new_phys, unsigned long mpc_new_length, 873static int check_slot(unsigned long mpc_new_phys, unsigned long mpc_new_length,
diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c
index 2b54fe002e94..0a5b04aa98f1 100644
--- a/arch/x86/kernel/xsave.c
+++ b/arch/x86/kernel/xsave.c
@@ -324,7 +324,7 @@ void __ref xsave_cntxt_init(void)
324 } 324 }
325 325
326 /* 326 /*
327 * for now OS knows only about FP/SSE 327 * Support only the state known to OS.
328 */ 328 */
329 pcntxt_mask = pcntxt_mask & XCNTXT_MASK; 329 pcntxt_mask = pcntxt_mask & XCNTXT_MASK;
330 xsave_init(); 330 xsave_init();