diff options
| author | Robert Richter <robert.richter@amd.com> | 2010-07-21 13:03:58 -0400 |
|---|---|---|
| committer | H. Peter Anvin <hpa@linux.intel.com> | 2010-08-12 17:01:38 -0400 |
| commit | f6e9456c9272bb570df6e217cdbe007e270b1c4e (patch) | |
| tree | 3ca098c924e8abf7231ab89e9f02ba9b3494fddb /arch/x86/kernel | |
| parent | ad41a1e0cab07c5125456e8d38e5b1ab148d04aa (diff) | |
x86, cleanup: Remove obsolete boot_cpu_id variable
boot_cpu_id is there for historical reasons and was renamed to
boot_cpu_physical_apicid in patch:
c70dcb7 x86: change boot_cpu_id to boot_cpu_physical_apicid
However, there are some remaining occurrences of boot_cpu_id that are
never touched in the kernel and thus its value is always 0.
This patch removes boot_cpu_id completely.
Signed-off-by: Robert Richter <robert.richter@amd.com>
LKML-Reference: <1279731838-1522-8-git-send-email-robert.richter@amd.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/kernel')
| -rw-r--r-- | arch/x86/kernel/apb_timer.c | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 12 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/amd.c | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/common.c | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/intel.c | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/reboot.c | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/setup.c | 1 | ||||
| -rw-r--r-- | arch/x86/kernel/setup_percpu.c | 2 |
8 files changed, 12 insertions, 13 deletions
diff --git a/arch/x86/kernel/apb_timer.c b/arch/x86/kernel/apb_timer.c index 8dd77800ff5d..08f75fb4f509 100644 --- a/arch/x86/kernel/apb_timer.c +++ b/arch/x86/kernel/apb_timer.c | |||
| @@ -343,7 +343,7 @@ void apbt_setup_secondary_clock(void) | |||
| 343 | 343 | ||
| 344 | /* Don't register boot CPU clockevent */ | 344 | /* Don't register boot CPU clockevent */ |
| 345 | cpu = smp_processor_id(); | 345 | cpu = smp_processor_id(); |
| 346 | if (cpu == boot_cpu_id) | 346 | if (!cpu) |
| 347 | return; | 347 | return; |
| 348 | /* | 348 | /* |
| 349 | * We need to calculate the scaled math multiplication factor for | 349 | * We need to calculate the scaled math multiplication factor for |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 4dc0084ec1b1..8884928d7bc1 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
| @@ -162,7 +162,7 @@ int __init arch_early_irq_init(void) | |||
| 162 | 162 | ||
| 163 | cfg = irq_cfgx; | 163 | cfg = irq_cfgx; |
| 164 | count = ARRAY_SIZE(irq_cfgx); | 164 | count = ARRAY_SIZE(irq_cfgx); |
| 165 | node= cpu_to_node(boot_cpu_id); | 165 | node = cpu_to_node(0); |
| 166 | 166 | ||
| 167 | for (i = 0; i < count; i++) { | 167 | for (i = 0; i < count; i++) { |
| 168 | desc = irq_to_desc(i); | 168 | desc = irq_to_desc(i); |
| @@ -1483,7 +1483,7 @@ static void __init setup_IO_APIC_irqs(void) | |||
| 1483 | int notcon = 0; | 1483 | int notcon = 0; |
| 1484 | struct irq_desc *desc; | 1484 | struct irq_desc *desc; |
| 1485 | struct irq_cfg *cfg; | 1485 | struct irq_cfg *cfg; |
| 1486 | int node = cpu_to_node(boot_cpu_id); | 1486 | int node = cpu_to_node(0); |
| 1487 | 1487 | ||
| 1488 | apic_printk(APIC_VERBOSE, KERN_DEBUG "init IO_APIC IRQs\n"); | 1488 | apic_printk(APIC_VERBOSE, KERN_DEBUG "init IO_APIC IRQs\n"); |
| 1489 | 1489 | ||
| @@ -1548,7 +1548,7 @@ static void __init setup_IO_APIC_irqs(void) | |||
| 1548 | void setup_IO_APIC_irq_extra(u32 gsi) | 1548 | void setup_IO_APIC_irq_extra(u32 gsi) |
| 1549 | { | 1549 | { |
| 1550 | int apic_id = 0, pin, idx, irq; | 1550 | int apic_id = 0, pin, idx, irq; |
| 1551 | int node = cpu_to_node(boot_cpu_id); | 1551 | int node = cpu_to_node(0); |
| 1552 | struct irq_desc *desc; | 1552 | struct irq_desc *desc; |
| 1553 | struct irq_cfg *cfg; | 1553 | struct irq_cfg *cfg; |
| 1554 | 1554 | ||
| @@ -2925,7 +2925,7 @@ static inline void __init check_timer(void) | |||
| 2925 | { | 2925 | { |
| 2926 | struct irq_desc *desc = irq_to_desc(0); | 2926 | struct irq_desc *desc = irq_to_desc(0); |
| 2927 | struct irq_cfg *cfg = desc->chip_data; | 2927 | struct irq_cfg *cfg = desc->chip_data; |
| 2928 | int node = cpu_to_node(boot_cpu_id); | 2928 | int node = cpu_to_node(0); |
| 2929 | int apic1, pin1, apic2, pin2; | 2929 | int apic1, pin1, apic2, pin2; |
| 2930 | unsigned long flags; | 2930 | unsigned long flags; |
| 2931 | int no_pin1 = 0; | 2931 | int no_pin1 = 0; |
| @@ -3279,7 +3279,7 @@ unsigned int create_irq_nr(unsigned int irq_want, int node) | |||
| 3279 | 3279 | ||
| 3280 | int create_irq(void) | 3280 | int create_irq(void) |
| 3281 | { | 3281 | { |
| 3282 | int node = cpu_to_node(boot_cpu_id); | 3282 | int node = cpu_to_node(0); |
| 3283 | unsigned int irq_want; | 3283 | unsigned int irq_want; |
| 3284 | int irq; | 3284 | int irq; |
| 3285 | 3285 | ||
| @@ -3901,7 +3901,7 @@ static int __io_apic_set_pci_routing(struct device *dev, int irq, | |||
| 3901 | if (dev) | 3901 | if (dev) |
| 3902 | node = dev_to_node(dev); | 3902 | node = dev_to_node(dev); |
| 3903 | else | 3903 | else |
| 3904 | node = cpu_to_node(boot_cpu_id); | 3904 | node = cpu_to_node(0); |
| 3905 | 3905 | ||
| 3906 | desc = irq_to_desc_alloc_node(irq, node); | 3906 | desc = irq_to_desc_alloc_node(irq, node); |
| 3907 | if (!desc) { | 3907 | if (!desc) { |
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 60a57b13082d..3a7c852f021d 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
| @@ -148,7 +148,7 @@ static void __cpuinit amd_k7_smp_check(struct cpuinfo_x86 *c) | |||
| 148 | { | 148 | { |
| 149 | #ifdef CONFIG_SMP | 149 | #ifdef CONFIG_SMP |
| 150 | /* calling is from identify_secondary_cpu() ? */ | 150 | /* calling is from identify_secondary_cpu() ? */ |
| 151 | if (c->cpu_index == boot_cpu_id) | 151 | if (!c->cpu_index) |
| 152 | return; | 152 | return; |
| 153 | 153 | ||
| 154 | /* | 154 | /* |
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 490dac63c2d2..787b3c7c6625 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
| @@ -665,7 +665,7 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c) | |||
| 665 | this_cpu->c_early_init(c); | 665 | this_cpu->c_early_init(c); |
| 666 | 666 | ||
| 667 | #ifdef CONFIG_SMP | 667 | #ifdef CONFIG_SMP |
| 668 | c->cpu_index = boot_cpu_id; | 668 | c->cpu_index = 0; |
| 669 | #endif | 669 | #endif |
| 670 | filter_cpuid_features(c, false); | 670 | filter_cpuid_features(c, false); |
| 671 | } | 671 | } |
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 85f69cdeae10..3a683ea5267e 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c | |||
| @@ -169,7 +169,7 @@ static void __cpuinit intel_smp_check(struct cpuinfo_x86 *c) | |||
| 169 | { | 169 | { |
| 170 | #ifdef CONFIG_SMP | 170 | #ifdef CONFIG_SMP |
| 171 | /* calling is from identify_secondary_cpu() ? */ | 171 | /* calling is from identify_secondary_cpu() ? */ |
| 172 | if (c->cpu_index == boot_cpu_id) | 172 | if (!c->cpu_index) |
| 173 | return; | 173 | return; |
| 174 | 174 | ||
| 175 | /* | 175 | /* |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index e3af342fe83a..7a4cf14223ba 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
| @@ -84,7 +84,7 @@ static int __init reboot_setup(char *str) | |||
| 84 | } | 84 | } |
| 85 | /* we will leave sorting out the final value | 85 | /* we will leave sorting out the final value |
| 86 | when we are ready to reboot, since we might not | 86 | when we are ready to reboot, since we might not |
| 87 | have set up boot_cpu_id or smp_num_cpu */ | 87 | have detected BSP APIC ID or smp_num_cpu */ |
| 88 | break; | 88 | break; |
| 89 | #endif /* CONFIG_SMP */ | 89 | #endif /* CONFIG_SMP */ |
| 90 | 90 | ||
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index b008e7883207..dede5c4bae4b 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
| @@ -125,7 +125,6 @@ unsigned long max_pfn_mapped; | |||
| 125 | RESERVE_BRK(dmi_alloc, 65536); | 125 | RESERVE_BRK(dmi_alloc, 65536); |
| 126 | #endif | 126 | #endif |
| 127 | 127 | ||
| 128 | unsigned int boot_cpu_id __read_mostly; | ||
| 129 | 128 | ||
| 130 | static __initdata unsigned long _brk_start = (unsigned long)__brk_base; | 129 | static __initdata unsigned long _brk_start = (unsigned long)__brk_base; |
| 131 | unsigned long _brk_end = (unsigned long)__brk_base; | 130 | unsigned long _brk_end = (unsigned long)__brk_base; |
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c index a60df9ae6454..2335c15c93a4 100644 --- a/arch/x86/kernel/setup_percpu.c +++ b/arch/x86/kernel/setup_percpu.c | |||
| @@ -253,7 +253,7 @@ void __init setup_per_cpu_areas(void) | |||
| 253 | * Up to this point, the boot CPU has been using .init.data | 253 | * Up to this point, the boot CPU has been using .init.data |
| 254 | * area. Reload any changed state for the boot CPU. | 254 | * area. Reload any changed state for the boot CPU. |
| 255 | */ | 255 | */ |
| 256 | if (cpu == boot_cpu_id) | 256 | if (!cpu) |
| 257 | switch_to_new_gdt(cpu); | 257 | switch_to_new_gdt(cpu); |
| 258 | } | 258 | } |
| 259 | 259 | ||
