[PATCH 09/10] x86: Add a test module for cpu loading

From: Andi Kleen
Date: Wed Dec 07 2011 - 19:41:51 EST


From: Andi Kleen <ak@xxxxxxxxxxxxxxx>

Not for merging, but useful for testing.

Not-Signed-off: Andi Kleen <ak@xxxxxxxxxxxxxxx>
---
arch/x86/kernel/cpu/Makefile | 2 ++
arch/x86/kernel/cpu/test-cpu-load.c | 19 +++++++++++++++++++
2 files changed, 21 insertions(+), 0 deletions(-)
create mode 100644 arch/x86/kernel/cpu/test-cpu-load.c

diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index 6ab6aa2..1af7e7b 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -48,3 +48,5 @@ cpufeature = $(src)/../../include/asm/cpufeature.h
targets += capflags.c
$(obj)/capflags.c: $(cpufeature) $(src)/mkcapflags.pl FORCE
$(call if_changed,mkcapflags)
+
+obj-m += test-cpu-load.o
diff --git a/arch/x86/kernel/cpu/test-cpu-load.c b/arch/x86/kernel/cpu/test-cpu-load.c
new file mode 100644
index 0000000..497a764
--- /dev/null
+++ b/arch/x86/kernel/cpu/test-cpu-load.c
@@ -0,0 +1,19 @@
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <asm/cpu_device_id.h>
+
+static struct x86_cpu_id microcode_id[] = {
+ { X86_VENDOR_INTEL, X86_FAMILY_ANY, X86_MODEL_ANY, },
+ {}
+};
+MODULE_DEVICE_TABLE(x86cpu, microcode_id);
+
+static int start(void)
+{
+ printk("test-cpu-load loaded\n");
+ return 0;
+}
+
+module_init(start);
+
+
--
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/