help needed: merging the per-cpu arrays into a structure

Manfred Spraul (manfreds@colorfullife.com)
Fri, 29 Oct 1999 17:07:26 +0200


I'm merging the per-cpu arrays (local_bh_count, local_irq_count,...)
into a cache-line aligned per-cpu array, but I'm stuck in
arch/i386/kernel/smpboot.c:

/*
* Scan the memory blocks for an SMP configuration block.
*/
static int __init smp_get_mpf(struct intel_mp_floating *mpf)
{
[...]
if (mpf->mpf_feature1 > 4) {
printk("Bus #1 is PCI\n");

/*
* Set local APIC version to the integrated form.
* It's initialized to zero otherwise, representing
* a discrete 82489DX.
*/
apic_version[0] = 0x10;
apic_version[1] = 0x10;
}
[...]
}
why only apic_version[{0,1}]?
Can I replace it with this line, or will it break on some hardware?
for(i=0;i<NR_CPUS;i++) cpu_data[i].apic_version=0x10;

AFAICS, the function is called before the secondary cpu's are started,
and the apic_version is overwritten later.

Thanks,
Manfred

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/