[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1172733469.1498.270.camel@sebastian.intellilink.co.jp>
Date: Thu, 01 Mar 2007 16:17:49 +0900
From: Fernando Luis Vázquez Cao
<fernando@....ntt.co.jp>
To: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Cc: fastboot@...ts.osdl.org, ebiederm@...ssion.com, ak@...e.de,
akpm@...ux-foundation.org, judith@...ux-foundation.org
Subject: [PATCH 3/5] Use the APIC to determine the hardware processor id -
x86_64
Use the APIC to determine the hardware processor id in both UP and SMP
kernels.
Signed-off-by: Fernando Luis Vazquez Cao <fernando@....ntt.co.jp>
---
diff -urNp linux-2.6.21-rc2/include/asm-x86_64/smp.h linux-2.6.21-rc2-hwcpuid/include/asm-x86_64/smp.h
--- linux-2.6.21-rc2/include/asm-x86_64/smp.h 2007-02-05 03:44:54.000000000 +0900
+++ linux-2.6.21-rc2-hwcpuid/include/asm-x86_64/smp.h 2007-03-07 12:42:47.000000000 +0900
@@ -58,12 +58,6 @@ static inline int num_booting_cpus(void)
#define raw_smp_processor_id() read_pda(cpunumber)
-static inline int hard_smp_processor_id(void)
-{
- /* we don't want to mark this access volatile - bad code generation */
- return GET_APIC_ID(*(unsigned int *)(APIC_BASE+APIC_ID));
-}
-
extern int __cpu_disable(void);
extern void __cpu_die(unsigned int cpu);
extern void prefill_possible_map(void);
@@ -72,7 +66,13 @@ extern unsigned disabled_cpus;
#define NO_PROC_ID 0xFF /* No processor magic marker */
-#endif
+#endif /* CONFIG_SMP */
+
+static inline int hard_smp_processor_id(void)
+{
+ /* we don't want to mark this access volatile - bad code generation */
+ return GET_APIC_ID(*(unsigned int *)(APIC_BASE+APIC_ID));
+}
/*
* Some lowlevel functions might want to know about
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists