patch-2.1.129 linux/include/asm-sparc/smp.h

Next file: linux/include/asm-sparc/spinlock.h
Previous file: linux/include/asm-sparc/namei.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.128/linux/include/asm-sparc/smp.h linux/include/asm-sparc/smp.h
@@ -150,11 +150,12 @@
 #else
 extern __inline__ int hard_smp_processor_id(void)
 {
-	int cpuid __asm__ ("g2");
+	int cpuid;
 	
 	__asm__ __volatile__("mov %%o7, %%g1\n\t"
 			     "call ___f___smp_processor_id\n\t"
-			     " nop\n\t" : "=r"(cpuid) : : "g1");
+			     " nop\n\t"
+			     "mov %%g2, %0\n\t" : "=r"(cpuid) : : "g1", "g2");
 	return cpuid;
 }
 #endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov