summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/ds_selftest.h
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@intel.com>2009-03-13 10:45:07 +0100
committerIngo Molnar <mingo@elte.hu>2009-03-13 11:57:20 +0100
commit8a327f6d1b05f5ce16572b4413a5df1d0e872283 (patch)
tree7903a0b4725bea86dba942003d5f6048077271d0 /arch/x86/kernel/ds_selftest.h
parentbc44fb5f7d3e764ed7698c835a1a0f35aba2eb3d (diff)
x86, bts: add selftest for BTS
Perform a selftest of branch trace store when a cpu is initialized. WARN and disable branch trace store support if the selftest fails. Signed-off-by: Markus Metzger <markus.t.metzger@intel.com> LKML-Reference: <20090313104507.A30125@sedona.ch.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/ds_selftest.h')
-rw-r--r--arch/x86/kernel/ds_selftest.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/x86/kernel/ds_selftest.h b/arch/x86/kernel/ds_selftest.h
new file mode 100644
index 000000000000..0e6e19d4c7d2
--- /dev/null
+++ b/arch/x86/kernel/ds_selftest.h
@@ -0,0 +1,15 @@
+/*
+ * Debug Store support - selftest
+ *
+ *
+ * Copyright (C) 2009 Intel Corporation.
+ * Markus Metzger <markus.t.metzger@intel.com>, 2009
+ */
+
+#ifdef CONFIG_X86_DS_SELFTEST
+extern int ds_selftest_bts(void);
+extern int ds_selftest_pebs(void);
+#else
+static inline int ds_selftest_bts(void) { return 0; }
+static inline int ds_selftest_pebs(void) { return 0; }
+#endif /* CONFIG_X86_DS_SELFTEST */