diff options
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 9 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpu.h | 20 | ||||
-rw-r--r-- | arch/x86/kernel/e820.c | 10 | ||||
-rw-r--r-- | arch/x86/kernel/irq.c | 23 |
4 files changed, 25 insertions, 37 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 86827d85488a..55e8f851f711 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -1428,7 +1428,6 @@ void __setup_vector_irq(int cpu) | |||
1428 | 1428 | ||
1429 | static struct irq_chip ioapic_chip; | 1429 | static struct irq_chip ioapic_chip; |
1430 | static struct irq_chip ir_ioapic_chip; | 1430 | static struct irq_chip ir_ioapic_chip; |
1431 | static struct irq_chip msi_ir_chip; | ||
1432 | 1431 | ||
1433 | #define IOAPIC_AUTO -1 | 1432 | #define IOAPIC_AUTO -1 |
1434 | #define IOAPIC_EDGE 0 | 1433 | #define IOAPIC_EDGE 0 |
@@ -2663,20 +2662,20 @@ static struct irq_chip ioapic_chip __read_mostly = { | |||
2663 | .retrigger = ioapic_retrigger_irq, | 2662 | .retrigger = ioapic_retrigger_irq, |
2664 | }; | 2663 | }; |
2665 | 2664 | ||
2666 | #ifdef CONFIG_INTR_REMAP | ||
2667 | static struct irq_chip ir_ioapic_chip __read_mostly = { | 2665 | static struct irq_chip ir_ioapic_chip __read_mostly = { |
2668 | .name = "IR-IO-APIC", | 2666 | .name = "IR-IO-APIC", |
2669 | .startup = startup_ioapic_irq, | 2667 | .startup = startup_ioapic_irq, |
2670 | .mask = mask_IO_APIC_irq, | 2668 | .mask = mask_IO_APIC_irq, |
2671 | .unmask = unmask_IO_APIC_irq, | 2669 | .unmask = unmask_IO_APIC_irq, |
2670 | #ifdef CONFIG_INTR_REMAP | ||
2672 | .ack = ack_x2apic_edge, | 2671 | .ack = ack_x2apic_edge, |
2673 | .eoi = ack_x2apic_level, | 2672 | .eoi = ack_x2apic_level, |
2674 | #ifdef CONFIG_SMP | 2673 | #ifdef CONFIG_SMP |
2675 | .set_affinity = set_ir_ioapic_affinity_irq, | 2674 | .set_affinity = set_ir_ioapic_affinity_irq, |
2676 | #endif | 2675 | #endif |
2676 | #endif | ||
2677 | .retrigger = ioapic_retrigger_irq, | 2677 | .retrigger = ioapic_retrigger_irq, |
2678 | }; | 2678 | }; |
2679 | #endif | ||
2680 | 2679 | ||
2681 | static inline void init_IO_APIC_traps(void) | 2680 | static inline void init_IO_APIC_traps(void) |
2682 | { | 2681 | { |
@@ -3391,18 +3390,18 @@ static struct irq_chip msi_chip = { | |||
3391 | .retrigger = ioapic_retrigger_irq, | 3390 | .retrigger = ioapic_retrigger_irq, |
3392 | }; | 3391 | }; |
3393 | 3392 | ||
3394 | #ifdef CONFIG_INTR_REMAP | ||
3395 | static struct irq_chip msi_ir_chip = { | 3393 | static struct irq_chip msi_ir_chip = { |
3396 | .name = "IR-PCI-MSI", | 3394 | .name = "IR-PCI-MSI", |
3397 | .unmask = unmask_msi_irq, | 3395 | .unmask = unmask_msi_irq, |
3398 | .mask = mask_msi_irq, | 3396 | .mask = mask_msi_irq, |
3397 | #ifdef CONFIG_INTR_REMAP | ||
3399 | .ack = ack_x2apic_edge, | 3398 | .ack = ack_x2apic_edge, |
3400 | #ifdef CONFIG_SMP | 3399 | #ifdef CONFIG_SMP |
3401 | .set_affinity = ir_set_msi_irq_affinity, | 3400 | .set_affinity = ir_set_msi_irq_affinity, |
3402 | #endif | 3401 | #endif |
3402 | #endif | ||
3403 | .retrigger = ioapic_retrigger_irq, | 3403 | .retrigger = ioapic_retrigger_irq, |
3404 | }; | 3404 | }; |
3405 | #endif | ||
3406 | 3405 | ||
3407 | /* | 3406 | /* |
3408 | * Map the PCI dev to the corresponding remapping hardware unit | 3407 | * Map the PCI dev to the corresponding remapping hardware unit |
diff --git a/arch/x86/kernel/cpu/cpu.h b/arch/x86/kernel/cpu/cpu.h index 9469ecb5aeb8..6de9a908e400 100644 --- a/arch/x86/kernel/cpu/cpu.h +++ b/arch/x86/kernel/cpu/cpu.h | |||
@@ -3,25 +3,25 @@ | |||
3 | #define ARCH_X86_CPU_H | 3 | #define ARCH_X86_CPU_H |
4 | 4 | ||
5 | struct cpu_model_info { | 5 | struct cpu_model_info { |
6 | int vendor; | 6 | int vendor; |
7 | int family; | 7 | int family; |
8 | const char *model_names[16]; | 8 | const char *model_names[16]; |
9 | }; | 9 | }; |
10 | 10 | ||
11 | /* attempt to consolidate cpu attributes */ | 11 | /* attempt to consolidate cpu attributes */ |
12 | struct cpu_dev { | 12 | struct cpu_dev { |
13 | const char * c_vendor; | 13 | const char *c_vendor; |
14 | 14 | ||
15 | /* some have two possibilities for cpuid string */ | 15 | /* some have two possibilities for cpuid string */ |
16 | const char * c_ident[2]; | 16 | const char *c_ident[2]; |
17 | 17 | ||
18 | struct cpu_model_info c_models[4]; | 18 | struct cpu_model_info c_models[4]; |
19 | 19 | ||
20 | void (*c_early_init)(struct cpuinfo_x86 *c); | 20 | void (*c_early_init)(struct cpuinfo_x86 *); |
21 | void (*c_init)(struct cpuinfo_x86 * c); | 21 | void (*c_init)(struct cpuinfo_x86 *); |
22 | void (*c_identify)(struct cpuinfo_x86 * c); | 22 | void (*c_identify)(struct cpuinfo_x86 *); |
23 | unsigned int (*c_size_cache)(struct cpuinfo_x86 * c, unsigned int size); | 23 | unsigned int (*c_size_cache)(struct cpuinfo_x86 *, unsigned int); |
24 | int c_x86_vendor; | 24 | int c_x86_vendor; |
25 | }; | 25 | }; |
26 | 26 | ||
27 | #define cpu_dev_register(cpu_devX) \ | 27 | #define cpu_dev_register(cpu_devX) \ |
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index fb638d9ce6d2..ef2c3563357d 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c | |||
@@ -233,7 +233,7 @@ void __init e820_print_map(char *who) | |||
233 | */ | 233 | */ |
234 | 234 | ||
235 | int __init sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, | 235 | int __init sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, |
236 | int *pnr_map) | 236 | u32 *pnr_map) |
237 | { | 237 | { |
238 | struct change_member { | 238 | struct change_member { |
239 | struct e820entry *pbios; /* pointer to original bios entry */ | 239 | struct e820entry *pbios; /* pointer to original bios entry */ |
@@ -552,7 +552,7 @@ u64 __init e820_remove_range(u64 start, u64 size, unsigned old_type, | |||
552 | 552 | ||
553 | void __init update_e820(void) | 553 | void __init update_e820(void) |
554 | { | 554 | { |
555 | int nr_map; | 555 | u32 nr_map; |
556 | 556 | ||
557 | nr_map = e820.nr_map; | 557 | nr_map = e820.nr_map; |
558 | if (sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &nr_map)) | 558 | if (sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &nr_map)) |
@@ -563,7 +563,7 @@ void __init update_e820(void) | |||
563 | } | 563 | } |
564 | static void __init update_e820_saved(void) | 564 | static void __init update_e820_saved(void) |
565 | { | 565 | { |
566 | int nr_map; | 566 | u32 nr_map; |
567 | 567 | ||
568 | nr_map = e820_saved.nr_map; | 568 | nr_map = e820_saved.nr_map; |
569 | if (sanitize_e820_map(e820_saved.map, ARRAY_SIZE(e820_saved.map), &nr_map)) | 569 | if (sanitize_e820_map(e820_saved.map, ARRAY_SIZE(e820_saved.map), &nr_map)) |
@@ -1303,7 +1303,7 @@ early_param("memmap", parse_memmap_opt); | |||
1303 | void __init finish_e820_parsing(void) | 1303 | void __init finish_e820_parsing(void) |
1304 | { | 1304 | { |
1305 | if (userdef) { | 1305 | if (userdef) { |
1306 | int nr = e820.nr_map; | 1306 | u32 nr = e820.nr_map; |
1307 | 1307 | ||
1308 | if (sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &nr) < 0) | 1308 | if (sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &nr) < 0) |
1309 | early_panic("Invalid user supplied memory map"); | 1309 | early_panic("Invalid user supplied memory map"); |
@@ -1386,7 +1386,7 @@ void __init e820_reserve_resources_late(void) | |||
1386 | char *__init default_machine_specific_memory_setup(void) | 1386 | char *__init default_machine_specific_memory_setup(void) |
1387 | { | 1387 | { |
1388 | char *who = "BIOS-e820"; | 1388 | char *who = "BIOS-e820"; |
1389 | int new_nr; | 1389 | u32 new_nr; |
1390 | /* | 1390 | /* |
1391 | * Try to copy the BIOS-supplied E820-map. | 1391 | * Try to copy the BIOS-supplied E820-map. |
1392 | * | 1392 | * |
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index b8ac3b6cf776..3aaf7b9e3a8b 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c | |||
@@ -58,6 +58,11 @@ static int show_other_interrupts(struct seq_file *p, int prec) | |||
58 | for_each_online_cpu(j) | 58 | for_each_online_cpu(j) |
59 | seq_printf(p, "%10u ", irq_stats(j)->apic_timer_irqs); | 59 | seq_printf(p, "%10u ", irq_stats(j)->apic_timer_irqs); |
60 | seq_printf(p, " Local timer interrupts\n"); | 60 | seq_printf(p, " Local timer interrupts\n"); |
61 | |||
62 | seq_printf(p, "%*s: ", prec, "SPU"); | ||
63 | for_each_online_cpu(j) | ||
64 | seq_printf(p, "%10u ", irq_stats(j)->irq_spurious_count); | ||
65 | seq_printf(p, " Spurious interrupts\n"); | ||
61 | #endif | 66 | #endif |
62 | if (generic_interrupt_extension) { | 67 | if (generic_interrupt_extension) { |
63 | seq_printf(p, "PLT: "); | 68 | seq_printf(p, "PLT: "); |
@@ -91,12 +96,6 @@ static int show_other_interrupts(struct seq_file *p, int prec) | |||
91 | seq_printf(p, " Threshold APIC interrupts\n"); | 96 | seq_printf(p, " Threshold APIC interrupts\n"); |
92 | # endif | 97 | # endif |
93 | #endif | 98 | #endif |
94 | #ifdef CONFIG_X86_LOCAL_APIC | ||
95 | seq_printf(p, "%*s: ", prec, "SPU"); | ||
96 | for_each_online_cpu(j) | ||
97 | seq_printf(p, "%10u ", irq_stats(j)->irq_spurious_count); | ||
98 | seq_printf(p, " Spurious interrupts\n"); | ||
99 | #endif | ||
100 | seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count)); | 99 | seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count)); |
101 | #if defined(CONFIG_X86_IO_APIC) | 100 | #if defined(CONFIG_X86_IO_APIC) |
102 | seq_printf(p, "%*s: %10u\n", prec, "MIS", atomic_read(&irq_mis_count)); | 101 | seq_printf(p, "%*s: %10u\n", prec, "MIS", atomic_read(&irq_mis_count)); |
@@ -133,23 +132,15 @@ int show_interrupts(struct seq_file *p, void *v) | |||
133 | return 0; | 132 | return 0; |
134 | 133 | ||
135 | spin_lock_irqsave(&desc->lock, flags); | 134 | spin_lock_irqsave(&desc->lock, flags); |
136 | #ifndef CONFIG_SMP | ||
137 | any_count = kstat_irqs(i); | ||
138 | #else | ||
139 | for_each_online_cpu(j) | 135 | for_each_online_cpu(j) |
140 | any_count |= kstat_irqs_cpu(i, j); | 136 | any_count |= kstat_irqs_cpu(i, j); |
141 | #endif | ||
142 | action = desc->action; | 137 | action = desc->action; |
143 | if (!action && !any_count) | 138 | if (!action && !any_count) |
144 | goto out; | 139 | goto out; |
145 | 140 | ||
146 | seq_printf(p, "%*d: ", prec, i); | 141 | seq_printf(p, "%*d: ", prec, i); |
147 | #ifndef CONFIG_SMP | ||
148 | seq_printf(p, "%10u ", kstat_irqs(i)); | ||
149 | #else | ||
150 | for_each_online_cpu(j) | 142 | for_each_online_cpu(j) |
151 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); | 143 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); |
152 | #endif | ||
153 | seq_printf(p, " %8s", desc->chip->name); | 144 | seq_printf(p, " %8s", desc->chip->name); |
154 | seq_printf(p, "-%-8s", desc->name); | 145 | seq_printf(p, "-%-8s", desc->name); |
155 | 146 | ||
@@ -174,6 +165,7 @@ u64 arch_irq_stat_cpu(unsigned int cpu) | |||
174 | 165 | ||
175 | #ifdef CONFIG_X86_LOCAL_APIC | 166 | #ifdef CONFIG_X86_LOCAL_APIC |
176 | sum += irq_stats(cpu)->apic_timer_irqs; | 167 | sum += irq_stats(cpu)->apic_timer_irqs; |
168 | sum += irq_stats(cpu)->irq_spurious_count; | ||
177 | #endif | 169 | #endif |
178 | if (generic_interrupt_extension) | 170 | if (generic_interrupt_extension) |
179 | sum += irq_stats(cpu)->generic_irqs; | 171 | sum += irq_stats(cpu)->generic_irqs; |
@@ -188,9 +180,6 @@ u64 arch_irq_stat_cpu(unsigned int cpu) | |||
188 | sum += irq_stats(cpu)->irq_threshold_count; | 180 | sum += irq_stats(cpu)->irq_threshold_count; |
189 | #endif | 181 | #endif |
190 | #endif | 182 | #endif |
191 | #ifdef CONFIG_X86_LOCAL_APIC | ||
192 | sum += irq_stats(cpu)->irq_spurious_count; | ||
193 | #endif | ||
194 | return sum; | 183 | return sum; |
195 | } | 184 | } |
196 | 185 | ||