diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-08-25 09:12:35 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-08-25 09:12:35 +0000 |
commit | c7fc24dc4420057f103afe8fc64524ebc25c5d37 (patch) | |
tree | 3682407a599b8f9f03fc096298134cafba1c9b2f /drivers/char/hfmodem | |
parent | 1d793fade8b063fde3cf275bf1a5c2d381292cd9 (diff) |
o Merge with Linux 2.1.116.
o New Newport console code.
o New G364 console code.
Diffstat (limited to 'drivers/char/hfmodem')
-rw-r--r-- | drivers/char/hfmodem/Makefile | 2 | ||||
-rw-r--r-- | drivers/char/hfmodem/refclock.c | 41 |
2 files changed, 4 insertions, 39 deletions
diff --git a/drivers/char/hfmodem/Makefile b/drivers/char/hfmodem/Makefile index 42629693b..2219cd52e 100644 --- a/drivers/char/hfmodem/Makefile +++ b/drivers/char/hfmodem/Makefile @@ -25,7 +25,7 @@ all: all_targets .PHONY: all gentbl: gentbl.c - $(HOSTCC) -Wall $< -o $@ -lm + $(HOSTCC) $(HOSTCFLAGS) $< -o $@ -lm TBLHDR := tables.h diff --git a/drivers/char/hfmodem/refclock.c b/drivers/char/hfmodem/refclock.c index 6617673ca..2ca829fbf 100644 --- a/drivers/char/hfmodem/refclock.c +++ b/drivers/char/hfmodem/refclock.c @@ -30,6 +30,7 @@ #include <linux/sched.h> #include <linux/time.h> #include <linux/hfmodem.h> +#include <asm/processor.h> /* --------------------------------------------------------------------- */ @@ -65,49 +66,13 @@ static int rdtsc_ok = 1; /* --------------------------------------------------------------------- */ #ifdef __i386__ - __initfunc(static void i386_capability(void)) { - unsigned long flags; - unsigned long fl1; - union { - struct { - unsigned int ebx, edx, ecx; - } r; - unsigned char s[13]; - } id; - unsigned int eax; - unsigned int x86_capability; - - save_flags(flags); - flags |= 0x200000; - restore_flags(flags); - save_flags(flags); - fl1 = flags; - flags &= ~0x200000; - restore_flags(flags); - save_flags(flags); - if (!(fl1 & 0x200000) || (flags & 0x200000)) { - printk(KERN_WARNING "%s: cpu does not support CPUID\n", hfmodem_drvname); - return; - } - __asm__ ("cpuid" : "=a" (eax), "=b" (id.r.ebx), "=c" (id.r.ecx), "=d" (id.r.edx) : - "0" (0)); - id.s[12] = 0; - if (eax < 1) { - printk(KERN_WARNING "%s: cpu (vendor string %s) does not support capability " - "list\n", hfmodem_drvname, id.s); - return; - } - printk(KERN_INFO "%s: cpu: vendor string %s ", hfmodem_drvname, id.s); - __asm__ ("cpuid" : "=a" (eax), "=d" (x86_capability) : "0" (1) : "ebx", "ecx"); - printk("fam %d mdl %d step %d cap 0x%x\n", (eax >> 8) & 15, (eax >> 4) & 15, eax & 15, - x86_capability); - if (x86_capability & 0x10) + if (boot_cpu_data.x86_capability & X86_FEATURE_TSC) rdtsc_ok = 1; else printk(KERN_INFO "%s: cpu does not support the rdtsc instruction\n", hfmodem_drvname); -} +} #endif /* __i386__ */ /* --------------------------------------------------------------------- */ |