patch-2.1.34 linux/include/asm-sparc64/smp_lock.h
Next file: linux/include/asm-sparc64/softirq.h
Previous file: linux/include/asm-sparc64/smp.h
Back to the patch index
Back to the overall index
- Lines: 60
- Date:
Fri Apr 11 10:47:40 1997
- Orig file:
v2.1.33/linux/include/asm-sparc64/smp_lock.h
- Orig date:
Thu Mar 27 14:40:09 1997
diff -u --recursive --new-file v2.1.33/linux/include/asm-sparc64/smp_lock.h linux/include/asm-sparc64/smp_lock.h
@@ -11,53 +11,14 @@
#include <asm/pgtable.h>
#ifndef __SMP__
-#define lock_kernel() do { } while(0)
-#define unlock_kernel() do { } while(0)
-#else
-
-extern __inline__ __volatile__ unsigned char ldstub(volatile unsigned char *lock)
-{
- volatile unsigned char retval;
-
- __asm__ __volatile__("ldstub [%1], %0" : "=&r" (retval) : "r" (lock));
- return retval;
-}
-
-/*
- * Locking the kernel
- */
-/* Knock knock... */
-extern __inline__ void lock_kernel(void)
-{
- int proc = smp_processor_id();
-
- while(ldstub(&kernel_flag)) {
- if(proc == active_kernel_processor)
- break;
- do {
-#ifdef __SMP_PROF__
- smp_spins[smp_processor_id()]++;
-#endif
- barrier();
- } while(kernel_flag); /* Don't lock the bus more than we have to. */
- }
- active_kernel_processor = proc;
- kernel_counter++;
-}
-
-/* I want out... */
-extern __inline__ void unlock_kernel(void)
-{
- if(kernel_counter == 0)
- panic("Bogus kernel counter.\n");
-
- if(!--kernel_counter) {
- active_kernel_processor = NO_PROC_ID;
- kernel_flag = KLOCK_CLEAR;
- }
-}
+#define lock_kernel() do { } while(0)
+#define unlock_kernel() do { } while(0)
+#define release_kernel_lock(task, cpu, depth) ((depth) = 1)
+#define reaquire_kernel_lock(task, cpu, depth) do { } while(0)
+#else
+#error SMP on sparc64 not supported yet
#endif /* (__SMP__) */
#endif /* !(__SPARC64_SMPLOCK_H) */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov