lkml.org 
[lkml]   [2011]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 09/10] x86: Add a test module for cpu loading
Date
From: Andi Kleen <ak@linux.intel.com>

Not for merging, but useful for testing.

Not-Signed-off: Andi Kleen <ak@linux.intel.com>
---
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


\
 
 \ /
  Last update: 2011-12-08 01:45    [from the cache]
©2003-2011 Jasper Spaans