X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=arch%2Fparisc%2Fkernel%2Fprocessor.c;h=dd5d0cb6b347365e117aa13575b19d7107ba0324;hp=99d7fca9310475c51e89520b64cffa1e63fecf58;hb=b643b0fdbc59cf6bbb086974b29d2571e9e9f646;hpb=22a3e233ca08a2ddc949ba1ae8f6e16ec7ef1a13 diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c index 99d7fca93104..dd5d0cb6b347 100644 --- a/arch/parisc/kernel/processor.c +++ b/arch/parisc/kernel/processor.c @@ -48,6 +48,8 @@ EXPORT_SYMBOL(boot_cpu_data); struct cpuinfo_parisc cpu_data[NR_CPUS] __read_mostly; +extern int update_cr16_clocksource(void); /* from time.c */ + /* ** PARISC CPU driver - claim "device" and initialize CPU data structures. ** @@ -93,7 +95,7 @@ static int __init processor_probe(struct parisc_device *dev) cpuid = boot_cpu_data.cpu_count; txn_addr = dev->hpa.start; /* for legacy PDC */ -#ifdef __LP64__ +#ifdef CONFIG_64BIT if (is_pdc_pat()) { ulong status; unsigned long bytecnt; @@ -143,8 +145,9 @@ static int __init processor_probe(struct parisc_device *dev) p = &cpu_data[cpuid]; boot_cpu_data.cpu_count++; - /* initialize counters */ - memset(p, 0, sizeof(struct cpuinfo_parisc)); + /* initialize counters - CPU 0 gets it_value set in time_init() */ + if (cpuid) + memset(p, 0, sizeof(struct cpuinfo_parisc)); p->loops_per_jiffy = loops_per_jiffy; p->dev = dev; /* Save IODC data in case we need it */ @@ -152,8 +155,6 @@ static int __init processor_probe(struct parisc_device *dev) p->cpuid = cpuid; /* save CPU id */ p->txn_addr = txn_addr; /* save CPU IRQ address */ #ifdef CONFIG_SMP - spin_lock_init(&p->lock); - /* ** FIXME: review if any other initialization is clobbered ** for boot_cpu by the above memset(). @@ -199,6 +200,12 @@ static int __init processor_probe(struct parisc_device *dev) } #endif + /* If we've registered more than one cpu, + * we'll use the jiffies clocksource since cr16 + * is not synchronized between CPUs. + */ + update_cr16_clocksource(); + return 0; } @@ -310,11 +317,11 @@ int __init init_per_cpu(int cpunum) } else { printk(KERN_WARNING "WARNING: No FP CoProcessor?!" " (coproc_cfg.ccr_functional == 0x%lx, expected 0xc0)\n" -#ifdef __LP64__ +#ifdef CONFIG_64BIT "Halting Machine - FP required\n" #endif , coproc_cfg.ccr_functional); -#ifdef __LP64__ +#ifdef CONFIG_64BIT mdelay(100); /* previous chars get pushed to console */ panic("FP CoProc not reported"); #endif @@ -338,9 +345,6 @@ show_cpuinfo (struct seq_file *m, void *v) #ifdef CONFIG_SMP if (0 == cpu_data[n].hpa) continue; -#ifdef ENTRY_SYS_CPUS -#error iCOD support wants to show CPU state here -#endif #endif seq_printf(m, "processor\t: %d\n" "cpu family\t: PA-RISC %s\n",