]> err.no Git - linux-2.6/commitdiff
[PARISC] Prevent processor_probe() from clobbering cpu_data[0]
authorGrant Grundler <grundler@gsyprf11.external.hp.com>
Fri, 1 Sep 2006 21:18:39 +0000 (14:18 -0700)
committerMatthew Wilcox <willy@parisc-linux.org>
Wed, 4 Oct 2006 12:47:57 +0000 (06:47 -0600)
processor_probe() shouldn't clobber cpu_data[0]
cpu_data[0].it_value (used by timer_interrupt()) is already set.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
arch/parisc/kernel/processor.c

index 99d7fca9310475c51e89520b64cffa1e63fecf58..fb81e5687e7c8a69c456a816c179cc26840d3239 100644 (file)
@@ -143,8 +143,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 */