diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-05-06 17:51:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 15:13:03 -0400 |
commit | f9d6e5f83b40d8ff73a74d4bba2c5f51d6048b12 (patch) | |
tree | 284539aadd666adcfbe7cd79a1b3f8da0bacb3f3 /arch/um | |
parent | 7f0536f80cfbefd753eb123ed20940978f223900 (diff) |
uml: remove unused x86_64 code
It turns out that essentially none of the x86_64 bugs.c is needed. So, we can
delete most of it.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/sys-x86_64/bugs.c | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/arch/um/sys-x86_64/bugs.c b/arch/um/sys-x86_64/bugs.c index 9fa5392e3122..095478890371 100644 --- a/arch/um/sys-x86_64/bugs.c +++ b/arch/um/sys-x86_64/bugs.c | |||
@@ -4,12 +4,7 @@ | |||
4 | * Licensed under the GPL | 4 | * Licensed under the GPL |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include "linux/sched.h" | ||
8 | #include "linux/errno.h" | ||
9 | #include "asm/system.h" | ||
10 | #include "asm/pda.h" | ||
11 | #include "sysdep/ptrace.h" | 7 | #include "sysdep/ptrace.h" |
12 | #include "os.h" | ||
13 | 8 | ||
14 | void arch_init_thread(void) | 9 | void arch_init_thread(void) |
15 | { | 10 | { |
@@ -23,67 +18,3 @@ int arch_handle_signal(int sig, union uml_pt_regs *regs) | |||
23 | { | 18 | { |
24 | return 0; | 19 | return 0; |
25 | } | 20 | } |
26 | |||
27 | #define MAXTOKEN 64 | ||
28 | |||
29 | /* Set during early boot */ | ||
30 | int host_has_cmov = 1; | ||
31 | int host_has_xmm = 0; | ||
32 | |||
33 | static char token(int fd, char *buf, int len, char stop) | ||
34 | { | ||
35 | int n; | ||
36 | char *ptr, *end, c; | ||
37 | |||
38 | ptr = buf; | ||
39 | end = &buf[len]; | ||
40 | do { | ||
41 | n = os_read_file(fd, ptr, sizeof(*ptr)); | ||
42 | c = *ptr++; | ||
43 | if(n != sizeof(*ptr)){ | ||
44 | if(n == 0) | ||
45 | return 0; | ||
46 | printk("Reading /proc/cpuinfo failed, err = %d\n", -n); | ||
47 | if(n < 0) | ||
48 | return n; | ||
49 | else return -EIO; | ||
50 | } | ||
51 | } while((c != '\n') && (c != stop) && (ptr < end)); | ||
52 | |||
53 | if(ptr == end){ | ||
54 | printk("Failed to find '%c' in /proc/cpuinfo\n", stop); | ||
55 | return -1; | ||
56 | } | ||
57 | *(ptr - 1) = '\0'; | ||
58 | return c; | ||
59 | } | ||
60 | |||
61 | static int find_cpuinfo_line(int fd, char *key, char *scratch, int len) | ||
62 | { | ||
63 | int n; | ||
64 | char c; | ||
65 | |||
66 | scratch[len - 1] = '\0'; | ||
67 | while(1){ | ||
68 | c = token(fd, scratch, len - 1, ':'); | ||
69 | if(c <= 0) | ||
70 | return 0; | ||
71 | else if(c != ':'){ | ||
72 | printk("Failed to find ':' in /proc/cpuinfo\n"); | ||
73 | return 0; | ||
74 | } | ||
75 | |||
76 | if(!strncmp(scratch, key, strlen(key))) | ||
77 | return 1; | ||
78 | |||
79 | do { | ||
80 | n = os_read_file(fd, &c, sizeof(c)); | ||
81 | if(n != sizeof(c)){ | ||
82 | printk("Failed to find newline in " | ||
83 | "/proc/cpuinfo, err = %d\n", -n); | ||
84 | return 0; | ||
85 | } | ||
86 | } while(c != '\n'); | ||
87 | } | ||
88 | return 0; | ||
89 | } | ||