patch-2.1.44 linux/arch/sparc64/kernel/cpu.c
Next file: linux/arch/sparc64/kernel/devices.c
Previous file: linux/arch/sparc64/kernel/binfmt_elf32.c
Back to the patch index
Back to the overall index
- Lines: 34
- Date:
Mon Jul 7 08:18:54 1997
- Orig file:
v2.1.43/linux/arch/sparc64/kernel/cpu.c
- Orig date:
Mon Apr 14 16:28:08 1997
diff -u --recursive --new-file v2.1.43/linux/arch/sparc64/kernel/cpu.c linux/arch/sparc64/kernel/cpu.c
@@ -6,7 +6,9 @@
#include <linux/kernel.h>
#include <linux/init.h>
+#include <asm/asi.h>
#include <asm/system.h>
+#include <asm/fpumacro.h>
struct cpu_iu_info {
short manuf;
@@ -50,11 +52,20 @@
int manuf, impl;
unsigned i, cpuid;
long ver, fpu_vers;
-
- cpuid = get_cpuid();
+ long fprs;
- __asm__ __volatile__ ("rdpr %%ver, %0; stx %%fsr, [%1]" : "=r" (ver) : "r" (&fpu_vers));
+#ifndef __SMP__
+ cpuid = 0;
+#else
+#error SMP not supported on sparc64 yet
+ /* cpuid = get_cpuid(); */
+#endif
+ fprs = fprs_read ();
+ fprs_write (FPRS_FEF);
+ __asm__ __volatile__ ("rdpr %%ver, %0; stx %%fsr, [%1]" : "=r" (ver) : "r" (&fpu_vers));
+ fprs_write (fprs);
+
manuf = ((ver >> 48)&0xffff);
impl = ((ver >> 32)&0xffff);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov