patch-2.4.11-dontuse linux/include/asm-i386/smp.h
Next file: linux/include/asm-i386/smpboot.h
Previous file: linux/include/asm-i386/processor.h
Back to the patch index
Back to the overall index
- Lines: 78
- Date:
Tue Oct 9 15:22:14 2001
- Orig file:
v2.4.10/linux/include/asm-i386/smp.h
- Orig date:
Sun Aug 12 13:28:00 2001
diff -u --recursive --new-file v2.4.10/linux/include/asm-i386/smp.h linux/include/asm-i386/smp.h
@@ -4,14 +4,14 @@
/*
* We need the APIC definitions automatically as part of 'smp.h'
*/
-#ifndef ASSEMBLY
+#ifndef __ASSEMBLY__
#include <linux/config.h>
#include <linux/threads.h>
#include <linux/ptrace.h>
#endif
#ifdef CONFIG_X86_LOCAL_APIC
-#ifndef ASSEMBLY
+#ifndef __ASSEMBLY__
#include <asm/fixmap.h>
#include <asm/bitops.h>
#include <asm/mpspec.h>
@@ -23,7 +23,30 @@
#endif
#ifdef CONFIG_SMP
-#ifndef ASSEMBLY
+# ifdef CONFIG_MULTIQUAD
+# define TARGET_CPUS 0xf /* all CPUs in *THIS* quad */
+# define INT_DELIVERY_MODE 0 /* physical delivery on LOCAL quad */
+# else
+# define TARGET_CPUS cpu_online_map
+# define INT_DELIVERY_MODE 1 /* logical delivery broadcast to all procs */
+# endif
+#else
+# define INT_DELIVERY_MODE 0 /* physical delivery on LOCAL quad */
+# define TARGET_CPUS 0x01
+#endif
+
+#ifndef clustered_apic_mode
+ #ifdef CONFIG_MULTIQUAD
+ #define clustered_apic_mode (1)
+ #define esr_disable (1)
+ #else /* !CONFIG_MULTIQUAD */
+ #define clustered_apic_mode (0)
+ #define esr_disable (0)
+ #endif /* CONFIG_MULTIQUAD */
+#endif
+
+#ifdef CONFIG_SMP
+#ifndef __ASSEMBLY__
/*
* Private routines/data
@@ -59,8 +82,11 @@
* Some lowlevel functions might want to know about
* the real APIC ID <-> CPU # mapping.
*/
-extern volatile int x86_apicid_to_cpu[NR_CPUS];
-extern volatile int x86_cpu_to_apicid[NR_CPUS];
+#define MAX_APICID 256
+extern volatile int cpu_to_physical_apicid[NR_CPUS];
+extern volatile int physical_apicid_to_cpu[MAX_APICID];
+extern volatile int cpu_to_logical_apicid[NR_CPUS];
+extern volatile int logical_apicid_to_cpu[MAX_APICID];
/*
* General functions that each host system must provide.
@@ -83,7 +109,13 @@
return GET_APIC_ID(*(unsigned long *)(APIC_BASE+APIC_ID));
}
-#endif /* !ASSEMBLY */
+extern __inline int logical_smp_processor_id(void)
+{
+ /* we don't want to mark this access volatile - bad code generation */
+ return GET_APIC_LOGICAL_ID(*(unsigned long *)(APIC_BASE+APIC_LDR));
+}
+
+#endif /* !__ASSEMBLY__ */
#define NO_PROC_ID 0xFF /* No processor magic marker */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)