diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/e820.h | 2 | ||||
-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 | ||||
-rw-r--r-- | arch/x86/mm/ioremap.c | 2 |
6 files changed, 27 insertions, 39 deletions
diff --git a/arch/x86/include/asm/e820.h b/arch/x86/include/asm/e820.h index 00d41ce4c844..7ecba4d85089 100644 --- a/arch/x86/include/asm/e820.h +++ b/arch/x86/include/asm/e820.h | |||
@@ -72,7 +72,7 @@ extern int e820_all_mapped(u64 start, u64 end, unsigned type); | |||
72 | extern void e820_add_region(u64 start, u64 size, int type); | 72 | extern void e820_add_region(u64 start, u64 size, int type); |
73 | extern void e820_print_map(char *who); | 73 | extern void e820_print_map(char *who); |
74 | extern int | 74 | extern int |
75 | sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, int *pnr_map); | 75 | sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, u32 *pnr_map); |
76 | extern u64 e820_update_range(u64 start, u64 size, unsigned old_type, | 76 | extern u64 e820_update_range(u64 start, u64 size, unsigned old_type, |
77 | unsigned new_type); | 77 | unsigned new_type); |
78 | extern u64 e820_remove_range(u64 start, u64 size, unsigned old_type, | 78 | extern u64 e820_remove_range(u64 start, u64 size, unsigned old_type, |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index d990408ca06f..da99ffcdfde6 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -1430,7 +1430,6 @@ void __setup_vector_irq(int cpu) | |||
1430 | 1430 | ||
1431 | static struct irq_chip ioapic_chip; | 1431 | static struct irq_chip ioapic_chip; |
1432 | static struct irq_chip ir_ioapic_chip; | 1432 | static struct irq_chip ir_ioapic_chip; |
1433 | static struct irq_chip msi_ir_chip; | ||
1434 | 1433 | ||
1435 | #define IOAPIC_AUTO -1 | 1434 | #define IOAPIC_AUTO -1 |
1436 | #define IOAPIC_EDGE 0 | 1435 | #define IOAPIC_EDGE 0 |
@@ -2665,20 +2664,20 @@ static struct irq_chip ioapic_chip __read_mostly = { | |||
2665 | .retrigger = ioapic_retrigger_irq, | 2664 | .retrigger = ioapic_retrigger_irq, |
2666 | }; | 2665 | }; |
2667 | 2666 | ||
2668 | #ifdef CONFIG_INTR_REMAP | ||
2669 | static struct irq_chip ir_ioapic_chip __read_mostly = { | 2667 | static struct irq_chip ir_ioapic_chip __read_mostly = { |
2670 | .name = "IR-IO-APIC", | 2668 | .name = "IR-IO-APIC", |
2671 | .startup = startup_ioapic_irq, | 2669 | .startup = startup_ioapic_irq, |
2672 | .mask = mask_IO_APIC_irq, | 2670 | .mask = mask_IO_APIC_irq, |
2673 | .unmask = unmask_IO_APIC_irq, | 2671 | .unmask = unmask_IO_APIC_irq, |
2672 | #ifdef CONFIG_INTR_REMAP | ||
2674 | .ack = ack_x2apic_edge, | 2673 | .ack = ack_x2apic_edge, |
2675 | .eoi = ack_x2apic_level, | 2674 | .eoi = ack_x2apic_level, |
2676 | #ifdef CONFIG_SMP | 2675 | #ifdef CONFIG_SMP |
2677 | .set_affinity = set_ir_ioapic_affinity_irq, | 2676 | .set_affinity = set_ir_ioapic_affinity_irq, |
2678 | #endif | 2677 | #endif |
2678 | #endif | ||
2679 | .retrigger = ioapic_retrigger_irq, | 2679 | .retrigger = ioapic_retrigger_irq, |
2680 | }; | 2680 | }; |
2681 | #endif | ||
2682 | 2681 | ||
2683 | static inline void init_IO_APIC_traps(void) | 2682 | static inline void init_IO_APIC_traps(void) |
2684 | { | 2683 | { |
@@ -3393,18 +3392,18 @@ static struct irq_chip msi_chip = { | |||
3393 | .retrigger = ioapic_retrigger_irq, | 3392 | .retrigger = ioapic_retrigger_irq, |
3394 | }; | 3393 | }; |
3395 | 3394 | ||
3396 | #ifdef CONFIG_INTR_REMAP | ||
3397 | static struct irq_chip msi_ir_chip = { | 3395 | static struct irq_chip msi_ir_chip = { |
3398 | .name = "IR-PCI-MSI", | 3396 | .name = "IR-PCI-MSI", |
3399 | .unmask = unmask_msi_irq, | 3397 | .unmask = unmask_msi_irq, |
3400 | .mask = mask_msi_irq, | 3398 | .mask = mask_msi_irq, |
3399 | #ifdef CONFIG_INTR_REMAP | ||
3401 | .ack = ack_x2apic_edge, | 3400 | .ack = ack_x2apic_edge, |
3402 | #ifdef CONFIG_SMP | 3401 | #ifdef CONFIG_SMP |
3403 | .set_affinity = ir_set_msi_irq_affinity, | 3402 | .set_affinity = ir_set_msi_irq_affinity, |
3404 | #endif | 3403 | #endif |
3404 | #endif | ||
3405 | .retrigger = ioapic_retrigger_irq, | 3405 | .retrigger = ioapic_retrigger_irq, |
3406 | }; | 3406 | }; |
3407 | #endif | ||
3408 | 3407 | ||
3409 | /* | 3408 | /* |
3410 | * Map the PCI dev to the corresponding remapping hardware unit | 3409 | * 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 | ||
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index 83ed74affba9..0dfa09d69e80 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c | |||
@@ -516,7 +516,7 @@ void __init early_ioremap_init(void) | |||
516 | printk(KERN_INFO "early_ioremap_init()\n"); | 516 | printk(KERN_INFO "early_ioremap_init()\n"); |
517 | 517 | ||
518 | for (i = 0; i < FIX_BTMAPS_SLOTS; i++) | 518 | for (i = 0; i < FIX_BTMAPS_SLOTS; i++) |
519 | slot_virt[i] = fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*i); | 519 | slot_virt[i] = __fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*i); |
520 | 520 | ||
521 | pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN)); | 521 | pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN)); |
522 | memset(bm_pte, 0, sizeof(bm_pte)); | 522 | memset(bm_pte, 0, sizeof(bm_pte)); |