The code is now the same between i386 and x86_64. We already
know what happens when it reaches this point: They go away
from the arch-specific headers, and suddenly appears in the common
header.
Signed-off-by: Glauber Costa <gcosta@redhat.com>
---
include/asm-x86/smp.h | 27 +++++++++++++++++++++++++++
include/asm-x86/smp_32.h | 27 ---------------------------
include/asm-x86/smp_64.h | 27 ---------------------------
3 files changed, 27 insertions(+), 54 deletions(-)
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h
index 664f9c0..eb05804 100644
--- a/include/asm-x86/smp.h
+++ b/include/asm-x86/smp.h
@@ -128,6 +128,33 @@ void smp_store_cpu_info(int id);
# include "smp_64.h"
#endif
+#ifdef CONFIG_X86_LOCAL_APIC
+
+static inline int logical_smp_processor_id(void)
+{
+ /* we don't want to mark this access volatile - bad code generation */
+ return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR));
+}
+
+# ifdef APIC_DEFINITION
+extern int hard_smp_processor_id(void);
+# else
+# include <mach_apicdef.h>
+static inline int hard_smp_processor_id(void)
+{
+ /* we don't want to mark this access volatile - bad code generation */
+ return GET_APIC_ID(*(u32 *)(APIC_BASE + APIC_ID));
+}
+# endif /* APIC_DEFINITION */
+
+#else /* CONFIG_X86_LOCAL_APIC */
+
+# ifndef CONFIG_SMP
+# define hard_smp_processor_id() 0
+# endif
+
+#endif /* CONFIG_X86_LOCAL_APIC */
+
#ifdef CONFIG_HOTPLUG_CPU
extern void cpu_exit_clear(void);
extern void cpu_uninit(void);
diff --git a/include/asm-x86/smp_32.h b/include/asm-x86/smp_32.h
index cb3ada2..53432db 100644
--- a/include/asm-x86/smp_32.h
+++ b/include/asm-x86/smp_32.h
@@ -42,32 +42,5 @@ static inline int num_booting_cpus(void)
#define safe_smp_processor_id() 0
#endif /* !CONFIG_SMP */
-#ifdef CONFIG_X86_LOCAL_APIC
-
-static inline int logical_smp_processor_id(void)
-{
- /* we don't want to mark this access volatile - bad code generation */
- return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR));
-}
-
-# ifdef APIC_DEFINITION
-extern int hard_smp_processor_id(void);
-# else
-# include <mach_apicdef.h>
-static inline int hard_smp_processor_id(void)
-{
- /* we don't want to mark this access volatile - bad code generation */
- return GET_APIC_ID(*(u32 *)(APIC_BASE + APIC_ID));
-}
-# endif /* APIC_DEFINITION */
-
-#else /* CONFIG_X86_LOCAL_APIC */
-
-# ifndef CONFIG_SMP
-# define hard_smp_processor_id() 0
-# endif
-
-#endif /* CONFIG_X86_LOCAL_APIC */
-
#endif /* !ASSEMBLY */
#endif
diff --git a/include/asm-x86/smp_64.h b/include/asm-x86/smp_64.h
index c46585e..015d36e 100644
--- a/include/asm-x86/smp_64.h
+++ b/include/asm-x86/smp_64.h
@@ -46,32 +46,5 @@ static inline int num_booting_cpus(void)
#define safe_smp_processor_id() smp_processor_id()
-#ifdef CONFIG_X86_LOCAL_APIC
-
-static inline int logical_smp_processor_id(void)
-{
- /* we don't want to mark this access volatile - bad code generation */
- return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR));
-}
-
-# ifdef APIC_DEFINITION
-extern int hard_smp_processor_id(void);
-# else
-# include <mach_apicdef.h>
-static inline int hard_smp_processor_id(void)
-{
- /* we don't want to mark this access volatile - bad code generation */
- return GET_APIC_ID(*(u32 *)(APIC_BASE + APIC_ID));
-}
-# endif /* APIC_DEFINITION */
-
-#else /* CONFIG_X86_LOCAL_APIC */
-
-# ifndef CONFIG_SMP
-# define hard_smp_processor_id() 0
-# endif
-
-#endif /* CONFIG_X86_LOCAL_APIC */
-
#endif
--
1.5.0.6
--
| Thomas Gleixner | Re: Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series.. |
| Karl Meyer | PROBLEM: 2.6.23-rc "NETDEV WATCHDOG: eth0: transmit timed out" |
| Mark Weber | hdparm standby timeout not working for WD raptors? |
| Robin Lee Powell | NFS hang + umount -f: better behaviour requested. |
git: | |
| Adam Roben | Equivalent of `svn switch` for git-svn? |
| Linus Torvalds | Re: On Tabs and Spaces |
| Adam Mercer | git cvsimport error |
| Sam Song | Fwd: [OT] Re: Git via a proxy server? |
| Antti Harri | Re: wine question |
| Paul Pruett | anyone using zoneminder.com on OpenBSD? |
| Josh | Re: removing sendmail |
| Sevan / Venture37 | wpi(4) not working in -CURRENT |
| Bill Day | telnet: Unable to connect to remote host: Network is unreachable |
| Dong Liu | Re: CXterm for LINUX |
| Framstag | ftp-error: bind: Address already in use? |
| Theodore Ts'o | RESULT: comp.os.linux passes: 858: 5 |
| SMDK2410 LCD Framebuffer driver | 4 hours ago | Linux kernel |
| Resetting the bios password for Toshiba Laptop | 5 hours ago | Hardware |
| Problem booting a barebone kernel in VMWare | 8 hours ago | Linux kernel |
| IP layer send packet | 12 hours ago | Linux kernel |
| PID to ELF image full path | 15 hours ago | Linux kernel |
| types of kernel | 1 day ago | Linux kernel |
| magical mounts | 2 days ago | Linux kernel |
| Problem in scim in Fedora 9 | 2 days ago | Linux general |
| The new Western Digital power saving drives | 2 days ago | Hardware |
| Battery Maximizer Software | 3 days ago | Linux kernel |
