[kernel] bug#153: First cut at a fix
Matthew Wilcox <willy@ldl.fc.hp.com>,
153@bugs.parisc-linux.org
Matthew Wilcox <willy@ldl.fc.hp.com>,
153@bugs.parisc-linux.org
X-PA-RISC Linux-PR-Message: report 153
X-PA-RISC Linux-PR-Package: kernel
X-Loop: daniel_frazier@hp.com
Received: via spool by 153-bugs@bugs.parisc-linux.org id=B153.100664019925508
(code B ref 153); Sat, 24 Nov 2001 22:18:01 GMT
To: 153@bugs.parisc-linux.org
Message-Id: <E167l69-0003jA-00@chrysl>
From: Matthew Wilcox <willy@ldl.fc.hp.com>
Date: Sat, 24 Nov 2001 15:16:33 -0700
i don't think this is the _right_ fix, and after applying this patch,
a non-SMP kernel won't link. but the point is we need to call
smp_setup_percpu_timer at some point for each CPU.
Index: arch/parisc/kernel/processor.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/processor.c,v
retrieving revision 1.5
diff -u -p -r1.5 processor.c
--- arch/parisc/kernel/processor.c 2001/10/22 21:38:05 1.5
+++ arch/parisc/kernel/processor.c 2001/11/24 22:13:27
@@ -257,6 +257,7 @@ int __init init_per_cpu(int cpuid)
panic("FP CoProc not reported");
#endif
}
+ smp_setup_percpu_timer(cpuid);
/* FUTURE: Enable Performance Monitor : ccr bit 0x20 */
Index: arch/parisc/kernel/smp.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/smp.c,v
retrieving revision 1.14
diff -u -p -r1.14 smp.c
--- arch/parisc/kernel/smp.c 2001/11/17 07:39:12 1.14
+++ arch/parisc/kernel/smp.c 2001/11/24 22:13:29
@@ -419,7 +419,7 @@ smp_flush_tlb_all(void)
/*
* Ideally sets up per-cpu profiling hooks. Doesn't do much now...
*/
-static inline void __init
+void __init
smp_setup_percpu_timer(int cpunum)
{
cpu_data[cpunum].prof_counter = 1;