Skip to content

Commit

Permalink
x86: generalize boot_cpu_id
Browse files Browse the repository at this point in the history
x86/Voyager can boot on non-zero processors. While that can probably
be fixed by properly remapping the physical CPU IDs, keep boot_cpu_id
for now for easier transition - and expand it to all of x86.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed Jan 29, 2009
1 parent 3e5095d commit c0b5842
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 21 deletions.
4 changes: 0 additions & 4 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,6 @@ config SMP

If you don't know what to do here, say N.

config X86_HAS_BOOT_CPU_ID
def_bool y
depends on X86_VOYAGER

config SPARSE_IRQ
bool "Support sparse irq numbering"
depends on PCI_MSI || HT_IRQ
Expand Down
6 changes: 1 addition & 5 deletions arch/x86/include/asm/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ extern void arch_unregister_cpu(int);

DECLARE_PER_CPU(int, cpu_state);

#ifdef CONFIG_X86_HAS_BOOT_CPU_ID
extern unsigned char boot_cpu_id;
#else
#define boot_cpu_id 0
#endif
extern unsigned int boot_cpu_id;

#endif /* _ASM_X86_CPU_H */
14 changes: 14 additions & 0 deletions arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,20 @@
#define ARCH_SETUP
#endif

unsigned int boot_cpu_id __read_mostly;

#ifdef CONFIG_X86_64
int default_cpu_present_to_apicid(int mps_cpu)
{
return __default_cpu_present_to_apicid(mps_cpu);
}

int default_check_phys_apicid_present(int boot_cpu_physical_apicid)
{
return __default_check_phys_apicid_present(boot_cpu_physical_apicid);
}
#endif

#ifndef CONFIG_DEBUG_BOOT_PARAMS
struct boot_params __initdata boot_params;
#else
Expand Down
12 changes: 0 additions & 12 deletions arch/x86/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -905,18 +905,6 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu)
return boot_error;
}

#ifdef CONFIG_X86_64
int default_cpu_present_to_apicid(int mps_cpu)
{
return __default_cpu_present_to_apicid(mps_cpu);
}

int default_check_phys_apicid_present(int boot_cpu_physical_apicid)
{
return __default_check_phys_apicid_present(boot_cpu_physical_apicid);
}
#endif

int __cpuinit native_cpu_up(unsigned int cpu)
{
int apicid = apic->cpu_present_to_apicid(cpu);
Expand Down

0 comments on commit c0b5842

Please sign in to comment.