patch-2.1.97 linux/include/asm-ppc/smp.h

Next file: linux/include/asm-ppc/socket.h
Previous file: linux/include/asm-ppc/ptrace.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.96/linux/include/asm-ppc/smp.h linux/include/asm-ppc/smp.h
@@ -19,26 +19,34 @@
 struct cpuinfo_PPC {
 	unsigned long loops_per_sec;
 	unsigned long pvr;
+	unsigned long *pgd_quick;
+	unsigned long *pte_quick;
+	unsigned long pgtable_cache_sz;
 };
 
 extern struct cpuinfo_PPC cpu_data[NR_CPUS];
 
-struct klock_info {
-	unsigned char kernel_flag;
+struct klock_info_struct {
+	unsigned long kernel_flag;
 	unsigned char akp;
 };
 
-extern struct klock_info klock_info;
+extern struct klock_info_struct klock_info;
 
-#define KLOCK_HELD       0xff
-#define KLOCK_CLEAR      0x00
+#define KLOCK_HELD       0xffffffff
+#define KLOCK_CLEAR      0x0
 
-#define PROC_CHANGE_PENALTY     1000 /* don't change cpu's for now */
+#define PROC_CHANGE_PENALTY     20
 
 extern __volatile__ int cpu_number_map[NR_CPUS];
-extern __volatile__ int cpu_logical_map[NR_CPUS];
+extern __volatile__ int __cpu_logical_map[NR_CPUS];
 extern unsigned long smp_proc_in_lock[NR_CPUS];
 
+extern __inline__ int cpu_logical_map(int cpu)
+{
+	return __cpu_logical_map[cpu];
+}
+
 extern __inline__ int hard_smp_processor_id(void)
 {
 	int cpuid = 0;
@@ -48,8 +56,17 @@
 
 #define smp_processor_id() (current->processor)
 
+extern void smp_message_pass(int target, int msg, unsigned long data, int wait);
+
 #endif /* __ASSEMBLY__ */
 
+#else /* !(__SMP__) */
+#ifndef __ASSEMBLY__
+extern __inline__ int cpu_logical_map(int cpu)
+{
+	return cpu;
+}
+#endif
 #endif /* !(__SMP__) */
 
 #define NO_PROC_ID               0xFF            /* No processor magic marker */

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