X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fparisc%2Fkernel%2Fprocessor.c;h=99d7fca9310475c51e89520b64cffa1e63fecf58;hb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;hp=5b05759ac9d116b643115bb8b178650d0e82ec25;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c index 5b05759ac..99d7fca93 100644 --- a/arch/parisc/kernel/processor.c +++ b/arch/parisc/kernel/processor.c @@ -26,26 +26,27 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ -#include #include #include #include #include #include #include +#include #include #include /* for register_parisc_driver() stuff */ #include #include #include +#include #include /* for struct irq_region */ #include -struct system_cpuinfo_parisc boot_cpu_data; +struct system_cpuinfo_parisc boot_cpu_data __read_mostly; EXPORT_SYMBOL(boot_cpu_data); -struct cpuinfo_parisc cpu_data[NR_CPUS]; +struct cpuinfo_parisc cpu_data[NR_CPUS] __read_mostly; /* ** PARISC CPU driver - claim "device" and initialize CPU data structures. @@ -90,7 +91,7 @@ static int __init processor_probe(struct parisc_device *dev) * May get overwritten by PAT code. */ cpuid = boot_cpu_data.cpu_count; - txn_addr = dev->hpa; /* for legacy PDC */ + txn_addr = dev->hpa.start; /* for legacy PDC */ #ifdef __LP64__ if (is_pdc_pat()) { @@ -120,7 +121,7 @@ static int __init processor_probe(struct parisc_device *dev) * boot time (ie shutdown a CPU from an OS perspective). */ /* get the cpu number */ - status = pdc_pat_cpu_get_number(&cpu_info, dev->hpa); + status = pdc_pat_cpu_get_number(&cpu_info, dev->hpa.start); BUG_ON(PDC_OK != status); @@ -128,7 +129,7 @@ static int __init processor_probe(struct parisc_device *dev) printk(KERN_WARNING "IGNORING CPU at 0x%x," " cpu_slot_id > NR_CPUS" " (%ld > %d)\n", - dev->hpa, cpu_info.cpu_num, NR_CPUS); + dev->hpa.start, cpu_info.cpu_num, NR_CPUS); /* Ignore CPU since it will only crash */ boot_cpu_data.cpu_count--; return 1; @@ -147,11 +148,11 @@ static int __init processor_probe(struct parisc_device *dev) p->loops_per_jiffy = loops_per_jiffy; p->dev = dev; /* Save IODC data in case we need it */ - p->hpa = dev->hpa; /* save CPU hpa */ + p->hpa = dev->hpa.start; /* save CPU hpa */ p->cpuid = cpuid; /* save CPU id */ p->txn_addr = txn_addr; /* save CPU IRQ address */ #ifdef CONFIG_SMP - p->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&p->lock); /* ** FIXME: review if any other initialization is clobbered @@ -187,6 +188,17 @@ static int __init processor_probe(struct parisc_device *dev) cpu_irq_actions[cpuid] = actions; } #endif + + /* + * Bring this CPU up now! (ignore bootstrap cpuid == 0) + */ +#ifdef CONFIG_SMP + if (cpuid) { + cpu_set(cpuid, cpu_present_map); + cpu_up(cpuid); + } +#endif + return 0; } @@ -231,9 +243,7 @@ void __init collect_boot_cpu_data(void) boot_cpu_data.hversion = boot_cpu_data.pdc.model.hversion; boot_cpu_data.sversion = boot_cpu_data.pdc.model.sversion; - boot_cpu_data.cpu_type = - parisc_get_cpu_type(boot_cpu_data.hversion); - + boot_cpu_data.cpu_type = parisc_get_cpu_type(boot_cpu_data.hversion); boot_cpu_data.cpu_name = cpu_name_version[boot_cpu_data.cpu_type][0]; boot_cpu_data.family_name = cpu_name_version[boot_cpu_data.cpu_type][1]; } @@ -276,6 +286,7 @@ int __init init_per_cpu(int cpunum) int ret; struct pdc_coproc_cfg coproc_cfg; + set_firmware_width(); ret = pdc_coproc_cfg(&coproc_cfg); if(ret >= 0 && coproc_cfg.ccr_functional) { @@ -366,12 +377,12 @@ show_cpuinfo (struct seq_file *m, void *v) return 0; } -static struct parisc_device_id processor_tbl[] = { +static struct parisc_device_id processor_tbl[] __read_mostly = { { HPHW_NPROC, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, SVERSION_ANY_ID }, { 0, } }; -static struct parisc_driver cpu_driver = { +static struct parisc_driver cpu_driver __read_mostly = { .name = "CPU", .id_table = processor_tbl, .probe = processor_probe