patch-2.1.79 linux/include/asm-ppc/smp.h
Next file: linux/include/asm-ppc/smp_lock.h
Previous file: linux/include/asm-ppc/signal.h
Back to the patch index
Back to the overall index
- Lines: 61
- Date:
Mon Jan 12 15:18:13 1998
- Orig file:
v2.1.78/linux/include/asm-ppc/smp.h
- Orig date:
Thu Sep 4 17:07:31 1997
diff -u --recursive --new-file v2.1.78/linux/include/asm-ppc/smp.h linux/include/asm-ppc/smp.h
@@ -1,12 +1,13 @@
/* smp.h: PPC specific SMP stuff.
*
- * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
+ * Taken from asm-sparc/smp.h
*/
#ifndef _PPC_SMP_H
#define _PPC_SMP_H
#include <linux/kernel.h> /* for panic */
+#include <linux/tasks.h> /* for NR_CPUS */
#ifdef __SMP__
@@ -16,7 +17,8 @@
/* per processor PPC parameters we need. */
struct cpuinfo_PPC {
- unsigned long udelay_val;
+ unsigned long loops_per_sec;
+ unsigned long pvr;
};
extern struct cpuinfo_PPC cpu_data[NR_CPUS];
@@ -31,7 +33,7 @@
#define KLOCK_HELD 0xff
#define KLOCK_CLEAR 0x00
-#define PROC_CHANGE_PENALTY 20
+#define PROC_CHANGE_PENALTY 1000 /* don't change cpu's for now */
extern __volatile__ int cpu_number_map[NR_CPUS];
extern __volatile__ int cpu_logical_map[NR_CPUS];
@@ -39,21 +41,19 @@
extern __inline__ int hard_smp_processor_id(void)
{
- int cpuid;
- if ( ! have_of() ) /* assume prep */
- panic("hard_smp_processor_id()\n");
- else
- panic("hard_smp_processor_id()\n");
-
+ int cpuid = 0;
+ /* assume cpu # 0 for now */
return cpuid;
}
-#define smp_processor_id() hard_smp_processor_id()
+#define smp_processor_id() (current->processor)
#endif /* __ASSEMBLY__ */
#endif /* !(__SMP__) */
#define NO_PROC_ID 0xFF /* No processor magic marker */
+
+extern void smp_store_cpu_info(int id);
#endif /* !(_PPC_SMP_H) */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov