mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robert Richter <robert.richter@amd.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>,
	oprofile-list <oprofile-list@lists.sourceforge.net>,
	Robert Richter <robert.richter@amd.com>
Subject: [PATCH 03/15] oprofile/x86: remove OPROFILE_IBS config option
Date: Fri, 26 Feb 2010 18:29:55 +0100	[thread overview]
Message-ID: <1267205407-6523-4-git-send-email-robert.richter@amd.com> (raw)
In-Reply-To: <1267205407-6523-1-git-send-email-robert.richter@amd.com>

OProfile support for IBS is now for several versions in the
kernel. The feature is stable now and the code can be activated
permanently.

As a side effect IBS now works also on nosmp configs.

Signed-off-by: Robert Richter <robert.richter@amd.com>
---
 arch/Kconfig                     |   14 --------------
 arch/x86/oprofile/op_model_amd.c |   31 +------------------------------
 2 files changed, 1 insertions(+), 44 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index d677872..06a1372 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -15,20 +15,6 @@ config OPROFILE
 
 	  If unsure, say N.
 
-config OPROFILE_IBS
-	bool "OProfile AMD IBS support (EXPERIMENTAL)"
-	default n
-	depends on OPROFILE && SMP && X86
-	help
-          Instruction-Based Sampling (IBS) is a new profiling
-          technique that provides rich, precise program performance
-          information. IBS is introduced by AMD Family10h processors
-          (AMD Opteron Quad-Core processor "Barcelona") to overcome
-          the limitations of conventional performance counter
-          sampling.
-
-	  If unsure, say N.
-
 config OPROFILE_EVENT_MULTIPLEX
 	bool "OProfile multiplexing support (EXPERIMENTAL)"
 	default n
diff --git a/arch/x86/oprofile/op_model_amd.c b/arch/x86/oprofile/op_model_amd.c
index 39686c2..2b9c68d 100644
--- a/arch/x86/oprofile/op_model_amd.c
+++ b/arch/x86/oprofile/op_model_amd.c
@@ -22,6 +22,7 @@
 #include <asm/ptrace.h>
 #include <asm/msr.h>
 #include <asm/nmi.h>
+#include <asm/apic.h>
 
 #include "op_x86_model.h"
 #include "op_counter.h"
@@ -43,8 +44,6 @@
 
 static unsigned long reset_value[NUM_VIRT_COUNTERS];
 
-#ifdef CONFIG_OPROFILE_IBS
-
 /* IbsFetchCtl bits/masks */
 #define IBS_FETCH_RAND_EN		(1ULL<<57)
 #define IBS_FETCH_VAL			(1ULL<<49)
@@ -72,8 +71,6 @@ struct op_ibs_config {
 
 static struct op_ibs_config ibs_config;
 
-#endif
-
 #ifdef CONFIG_OPROFILE_EVENT_MULTIPLEX
 
 static void op_mux_fill_in_addresses(struct op_msrs * const msrs)
@@ -185,8 +182,6 @@ static void op_amd_setup_ctrs(struct op_x86_model_spec const *model,
 	}
 }
 
-#ifdef CONFIG_OPROFILE_IBS
-
 static inline void
 op_amd_handle_ibs(struct pt_regs * const regs,
 		  struct op_msrs const * const msrs)
@@ -272,15 +267,6 @@ static void op_amd_stop_ibs(void)
 		wrmsrl(MSR_AMD64_IBSOPCTL, 0);
 }
 
-#else
-
-static inline void op_amd_handle_ibs(struct pt_regs * const regs,
-				    struct op_msrs const * const msrs) { }
-static inline void op_amd_start_ibs(void) { }
-static inline void op_amd_stop_ibs(void) { }
-
-#endif
-
 static int op_amd_check_ctrs(struct pt_regs * const regs,
 			     struct op_msrs const * const msrs)
 {
@@ -355,8 +341,6 @@ static void op_amd_shutdown(struct op_msrs const * const msrs)
 	}
 }
 
-#ifdef CONFIG_OPROFILE_IBS
-
 static u8 ibs_eilvt_off;
 
 static inline void apic_init_ibs_nmi_per_cpu(void *arg)
@@ -507,19 +491,6 @@ static void op_amd_exit(void)
 	ibs_exit();
 }
 
-#else
-
-/* no IBS support */
-
-static int op_amd_init(struct oprofile_operations *ops)
-{
-	return 0;
-}
-
-static void op_amd_exit(void) {}
-
-#endif /* CONFIG_OPROFILE_IBS */
-
 struct op_x86_model_spec op_amd_spec = {
 	.num_counters		= NUM_COUNTERS,
 	.num_controls		= NUM_CONTROLS,
-- 
1.6.6



  parent reply	other threads:[~2010-02-26 17:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-26 17:29 [PATCH 00/15] oprofile fixes and updates for v2.6.34 Robert Richter
2010-02-26 17:29 ` [PATCH 01/15] oprofile: remove tracing build dependency Robert Richter
2010-02-26 17:29 ` [PATCH 02/15] oprofile: remove EXPERIMENTAL from the config option description Robert Richter
2010-02-26 17:29 ` Robert Richter [this message]
2010-02-26 17:29 ` [PATCH 04/15] oprofile/x86: remove node check in AMD IBS initialization Robert Richter
2010-02-26 17:29 ` [PATCH 05/15] oprofile/x86: implement IBS cpuid feature detection Robert Richter
2010-02-26 17:29 ` [PATCH 06/15] oprofile/x86: implement lsfr pseudo-random number generator for IBS Robert Richter
2010-02-26 17:29 ` [PATCH 07/15] oprofile/x86: implement randomization for IBS periodic op counter Robert Richter
2010-02-26 17:30 ` [PATCH 08/15] oprofile/x86: warn user if a counter is already active Robert Richter
2010-02-26 17:30 ` [PATCH 09/15] oprofile/x86: add comment to counter-in-use warning Robert Richter
2010-02-26 17:30 ` [PATCH 10/15] oprofile/x86: fix perfctr nmi reservation for mulitplexing Robert Richter
2010-02-26 17:30 ` [PATCH 11/15] oprofile/x86: use kzalloc() instead of kmalloc() Robert Richter
2010-02-26 17:30 ` [PATCH 12/15] oprofile/x86: fix msr access to reserved counters Robert Richter
2010-02-26 17:30 ` [PATCH 13/15] perf, x86: make IBS macros available in perf_event.h Robert Richter
2010-02-26 17:30 ` [PATCH 14/15] perf, x86: add some IBS macros to perf_event.h Robert Richter
2010-02-26 17:30 ` [PATCH 15/15] perf, x86: rename macro in ARCH_PERFMON_EVENTSEL_ENABLE Robert Richter
2010-02-27  9:03 ` [PATCH 00/15] oprofile fixes and updates for v2.6.34 Ingo Molnar
2010-03-01 14:39   ` Robert Richter
2010-03-02 10:01     ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1267205407-6523-4-git-send-email-robert.richter@amd.com \
    --to=robert.richter@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=oprofile-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome