summaryrefslogtreecommitdiffstats
path: root/include/asm-x86/processor_32.h
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-01-30 13:31:03 +0100
committerIngo Molnar <mingo@elte.hu>2008-01-30 13:31:03 +0100
commitc758ecf62ad94ddfeb4e7d8a5498bdcb2e3c85db (patch)
tree6a7b8b629bbe935c78cf3933b0cfe25253c563a9 /include/asm-x86/processor_32.h
parentx86: split get_cycles_sync (diff)
downloadlinux-c758ecf62ad94ddfeb4e7d8a5498bdcb2e3c85db.tar.xz
linux-c758ecf62ad94ddfeb4e7d8a5498bdcb2e3c85db.zip
x86: unify cpuid functions
cpuid is not very different between i386 and x86_64. We move away the x86_64 version from msr.h, and unify them at processor.h, where they belong. cpuid() paravirt then comes for free. Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/processor_32.h')
-rw-r--r--include/asm-x86/processor_32.h69
1 files changed, 0 insertions, 69 deletions
diff --git a/include/asm-x86/processor_32.h b/include/asm-x86/processor_32.h
index 6846cc346400..0d83da198127 100644
--- a/include/asm-x86/processor_32.h
+++ b/include/asm-x86/processor_32.h
@@ -133,18 +133,6 @@ extern void detect_ht(struct cpuinfo_x86 *c);
static inline void detect_ht(struct cpuinfo_x86 *c) {}
#endif
-static inline void native_cpuid(unsigned int *eax, unsigned int *ebx,
- unsigned int *ecx, unsigned int *edx)
-{
- /* ecx is often an input as well as an output. */
- __asm__("cpuid"
- : "=a" (*eax),
- "=b" (*ebx),
- "=c" (*ecx),
- "=d" (*edx)
- : "0" (*eax), "2" (*ecx));
-}
-
#define load_cr3(pgdir) write_cr3(__pa(pgdir))
/*
@@ -580,7 +568,6 @@ static inline void native_set_iopl_mask(unsigned mask)
#include <asm/paravirt.h>
#else
#define paravirt_enabled() 0
-#define __cpuid native_cpuid
static inline void load_sp0(struct tss_struct *tss, struct thread_struct *thread)
{
@@ -598,62 +585,6 @@ static inline void load_sp0(struct tss_struct *tss, struct thread_struct *thread
#define set_iopl_mask native_set_iopl_mask
#endif /* CONFIG_PARAVIRT */
-/*
- * Generic CPUID function
- * clear %ecx since some cpus (Cyrix MII) do not set or clear %ecx
- * resulting in stale register contents being returned.
- */
-static inline void cpuid(unsigned int op,
- unsigned int *eax, unsigned int *ebx,
- unsigned int *ecx, unsigned int *edx)
-{
- *eax = op;
- *ecx = 0;
- __cpuid(eax, ebx, ecx, edx);
-}
-
-/* Some CPUID calls want 'count' to be placed in ecx */
-static inline void cpuid_count(unsigned int op, int count,
- unsigned int *eax, unsigned int *ebx,
- unsigned int *ecx, unsigned int *edx)
-{
- *eax = op;
- *ecx = count;
- __cpuid(eax, ebx, ecx, edx);
-}
-
-/*
- * CPUID functions returning a single datum
- */
-static inline unsigned int cpuid_eax(unsigned int op)
-{
- unsigned int eax, ebx, ecx, edx;
-
- cpuid(op, &eax, &ebx, &ecx, &edx);
- return eax;
-}
-static inline unsigned int cpuid_ebx(unsigned int op)
-{
- unsigned int eax, ebx, ecx, edx;
-
- cpuid(op, &eax, &ebx, &ecx, &edx);
- return ebx;
-}
-static inline unsigned int cpuid_ecx(unsigned int op)
-{
- unsigned int eax, ebx, ecx, edx;
-
- cpuid(op, &eax, &ebx, &ecx, &edx);
- return ecx;
-}
-static inline unsigned int cpuid_edx(unsigned int op)
-{
- unsigned int eax, ebx, ecx, edx;
-
- cpuid(op, &eax, &ebx, &ecx, &edx);
- return edx;
-}
-
/* generic versions from gas */
#define GENERIC_NOP1 ".byte 0x90\n"
#define GENERIC_NOP2 ".byte 0x89,0xf6\n"