diff options
Diffstat (limited to 'arch/x86/kernel/cpu/match.c')
-rw-r--r-- | arch/x86/kernel/cpu/match.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/arch/x86/kernel/cpu/match.c b/arch/x86/kernel/cpu/match.c index 36565373af87..afa9f0d487ea 100644 --- a/arch/x86/kernel/cpu/match.c +++ b/arch/x86/kernel/cpu/match.c | |||
@@ -47,45 +47,3 @@ const struct x86_cpu_id *x86_match_cpu(const struct x86_cpu_id *match) | |||
47 | return NULL; | 47 | return NULL; |
48 | } | 48 | } |
49 | EXPORT_SYMBOL(x86_match_cpu); | 49 | EXPORT_SYMBOL(x86_match_cpu); |
50 | |||
51 | ssize_t arch_print_cpu_modalias(struct device *dev, | ||
52 | struct device_attribute *attr, | ||
53 | char *bufptr) | ||
54 | { | ||
55 | int size = PAGE_SIZE; | ||
56 | int i, n; | ||
57 | char *buf = bufptr; | ||
58 | |||
59 | n = snprintf(buf, size, "x86cpu:vendor:%04X:family:%04X:" | ||
60 | "model:%04X:feature:", | ||
61 | boot_cpu_data.x86_vendor, | ||
62 | boot_cpu_data.x86, | ||
63 | boot_cpu_data.x86_model); | ||
64 | size -= n; | ||
65 | buf += n; | ||
66 | size -= 1; | ||
67 | for (i = 0; i < NCAPINTS*32; i++) { | ||
68 | if (boot_cpu_has(i)) { | ||
69 | n = snprintf(buf, size, ",%04X", i); | ||
70 | if (n >= size) { | ||
71 | WARN(1, "x86 features overflow page\n"); | ||
72 | break; | ||
73 | } | ||
74 | size -= n; | ||
75 | buf += n; | ||
76 | } | ||
77 | } | ||
78 | *buf++ = '\n'; | ||
79 | return buf - bufptr; | ||
80 | } | ||
81 | |||
82 | int arch_cpu_uevent(struct device *dev, struct kobj_uevent_env *env) | ||
83 | { | ||
84 | char *buf = kzalloc(PAGE_SIZE, GFP_KERNEL); | ||
85 | if (buf) { | ||
86 | arch_print_cpu_modalias(NULL, NULL, buf); | ||
87 | add_uevent_var(env, "MODALIAS=%s", buf); | ||
88 | kfree(buf); | ||
89 | } | ||
90 | return 0; | ||
91 | } | ||