Skip to contentSkip to conversation

x86, ds: add support for core i7

PATCH New Markus Metzger 1 participant 1 message Mar 16, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86, ds: add support for core i7

Add Debug Store support for Core i7.

---
 arch/x86/include/asm/ds.h |   10 ++++++++--
 arch/x86/kernel/ds.c      |   24 ++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 2 deletions(-)
arch/x86/include/asm/ds.h +11 -5
Index: git-tip/arch/x86/include/asm/ds.h
===================================================================
@@ -15,8 +15,8 @@
  * - buffer allocation (memory accounting)
  *
  *
- * Copyright (C) 2007-2008 Intel Corporation.
- * Markus Metzger <[email protected]>, 2007-2008
+ * Copyright (C) 2007-2009 Intel Corporation.
+ * Markus Metzger <[email protected]>, 2007-2009
  */
 
 #ifndef _ASM_X86_DS_H
@@ -201,8 +201,12 @@ struct bts_trace {
 struct pebs_trace {
 	struct ds_trace ds;
 
-	/* the PEBS reset value */
-	unsigned long long reset_value;
+	/* the number of valid counters in the below array */
+	unsigned int counters;
+
+#define MAX_PEBS_COUNTERS 4
+	/* the counter reset value */
+	unsigned long long counter_reset[MAX_PEBS_COUNTERS];
 };
 
 
@@ -237,9 +241,11 @@ extern int ds_reset_pebs(struct pebs_tra
  * Returns 0 on success; -Eerrno on error
  *
  * tracer: the tracer handle returned from ds_request_pebs()
+ * counter: the index of the counter
  * value: the new counter reset value
  */
-extern int ds_set_pebs_reset(struct pebs_tracer *tracer, u64 value);
+extern int ds_set_pebs_reset(struct pebs_tracer *tracer,
+			     unsigned int counter, u64 value);
 
 /*
  * Initialization
arch/x86/kernel/ds.c +62 -7

138 lines not on this page · raw message

---------------------------------------------------------------------
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen Germany
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
Registergericht: Muenchen HRB 47456 Ust.-IdNr.
VAT Registration No.: DE129385895
Citibank Frankfurt (BLZ 502 109 00) 600119052

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.