Commit ddf9499b authored by James Bottomley's avatar James Bottomley Committed by H. Peter Anvin

x86, Voyager: fix compile by lifting the degeneracy of phys_cpu_present_map

This was changed to a physmap_t giving a clashing symbol redefinition,
but actually using a physmap_t consumes rather a lot of space on x86,
so stick with a private copy renamed with a voyager_ prefix and made
static.  Nothing outside of the Voyager code uses it, anyway.
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent 954a8b81
...@@ -65,7 +65,7 @@ static volatile unsigned long smp_invalidate_needed; ...@@ -65,7 +65,7 @@ static volatile unsigned long smp_invalidate_needed;
/* Bitmask of CPUs present in the system - exported by i386_syms.c, used /* Bitmask of CPUs present in the system - exported by i386_syms.c, used
* by scheduler but indexed physically */ * by scheduler but indexed physically */
cpumask_t phys_cpu_present_map = CPU_MASK_NONE; static cpumask_t voyager_phys_cpu_present_map = CPU_MASK_NONE;
/* The internal functions */ /* The internal functions */
static void send_CPI(__u32 cpuset, __u8 cpi); static void send_CPI(__u32 cpuset, __u8 cpi);
...@@ -366,19 +366,19 @@ void __init find_smp_config(void) ...@@ -366,19 +366,19 @@ void __init find_smp_config(void)
/* set up everything for just this CPU, we can alter /* set up everything for just this CPU, we can alter
* this as we start the other CPUs later */ * this as we start the other CPUs later */
/* now get the CPU disposition from the extended CMOS */ /* now get the CPU disposition from the extended CMOS */
cpus_addr(phys_cpu_present_map)[0] = cpus_addr(voyager_phys_cpu_present_map)[0] =
voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK); voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK);
cpus_addr(phys_cpu_present_map)[0] |= cpus_addr(voyager_phys_cpu_present_map)[0] |=
voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 1) << 8; voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 1) << 8;
cpus_addr(phys_cpu_present_map)[0] |= cpus_addr(voyager_phys_cpu_present_map)[0] |=
voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK +
2) << 16; 2) << 16;
cpus_addr(phys_cpu_present_map)[0] |= cpus_addr(voyager_phys_cpu_present_map)[0] |=
voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK +
3) << 24; 3) << 24;
init_cpu_possible(&phys_cpu_present_map); init_cpu_possible(&voyager_phys_cpu_present_map);
printk("VOYAGER SMP: phys_cpu_present_map = 0x%lx\n", printk("VOYAGER SMP: voyager_phys_cpu_present_map = 0x%lx\n",
cpus_addr(phys_cpu_present_map)[0]); cpus_addr(voyager_phys_cpu_present_map)[0]);
/* Here we set up the VIC to enable SMP */ /* Here we set up the VIC to enable SMP */
/* enable the CPIs by writing the base vector to their register */ /* enable the CPIs by writing the base vector to their register */
outb(VIC_DEFAULT_CPI_BASE, VIC_CPI_BASE_REGISTER); outb(VIC_DEFAULT_CPI_BASE, VIC_CPI_BASE_REGISTER);
...@@ -628,15 +628,15 @@ void __init smp_boot_cpus(void) ...@@ -628,15 +628,15 @@ void __init smp_boot_cpus(void)
/* now that the cat has probed the Voyager System Bus, sanity /* now that the cat has probed the Voyager System Bus, sanity
* check the cpu map */ * check the cpu map */
if (((voyager_quad_processors | voyager_extended_vic_processors) if (((voyager_quad_processors | voyager_extended_vic_processors)
& cpus_addr(phys_cpu_present_map)[0]) != & cpus_addr(voyager_phys_cpu_present_map)[0]) !=
cpus_addr(phys_cpu_present_map)[0]) { cpus_addr(voyager_phys_cpu_present_map)[0]) {
/* should panic */ /* should panic */
printk("\n\n***WARNING*** " printk("\n\n***WARNING*** "
"Sanity check of CPU present map FAILED\n"); "Sanity check of CPU present map FAILED\n");
} }
} else if (voyager_level == 4) } else if (voyager_level == 4)
voyager_extended_vic_processors = voyager_extended_vic_processors =
cpus_addr(phys_cpu_present_map)[0]; cpus_addr(voyager_phys_cpu_present_map)[0];
/* this sets up the idle task to run on the current cpu */ /* this sets up the idle task to run on the current cpu */
voyager_extended_cpus = 1; voyager_extended_cpus = 1;
...@@ -670,7 +670,7 @@ void __init smp_boot_cpus(void) ...@@ -670,7 +670,7 @@ void __init smp_boot_cpus(void)
/* loop over all the extended VIC CPUs and boot them. The /* loop over all the extended VIC CPUs and boot them. The
* Quad CPUs must be bootstrapped by their extended VIC cpu */ * Quad CPUs must be bootstrapped by their extended VIC cpu */
for (i = 0; i < nr_cpu_ids; i++) { for (i = 0; i < nr_cpu_ids; i++) {
if (i == boot_cpu_id || !cpu_isset(i, phys_cpu_present_map)) if (i == boot_cpu_id || !cpu_isset(i, voyager_phys_cpu_present_map))
continue; continue;
do_boot_cpu(i); do_boot_cpu(i);
/* This udelay seems to be needed for the Quad boots /* This udelay seems to be needed for the Quad boots
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment