From: Frederic Weisbecker <fweisbec@gmail.com> To: LKML <linux-kernel@vger.kernel.org> Cc: LKML <linux-kernel@vger.kernel.org>, Frederic Weisbecker <fweisbec@gmail.com>, linuxppc-dev@lists.ozlabs.org, Ingo Molnar <mingo@elte.hu>, Peter Zijlstra <a.p.zijlstra@chello.nl>, Will Deacon <will.deacon@arm.com>, Prasad <prasad@linux.vnet.ibm.com>, Paul Mundt <lethal@linux-sh.org> Subject: [PATCH 1/6] hw_breakpoints: Split hardware breakpoints config Date: Tue, 24 May 2011 23:52:22 +0200 [thread overview] Message-ID: <1306273947-8410-2-git-send-email-fweisbec@gmail.com> (raw) In-Reply-To: <1306273947-8410-1-git-send-email-fweisbec@gmail.com> The hardware breakpoint config is only made of an ability. An arch that support this feature selects HAVE_HW_BREAKPOINT. If so, the feature is definetly built-in, the user can't decide to turn it off. As hw_breakpoints depend on perf, it also makes perf a mandatory feature. The whole is quite a piece of code and may not be desired on some embedded systems. In order to prepare to make this optable by the user, split the config into the more traditional couple (ability, user choice) by providing a new HW_BREAKPOINT config. It is default on and depends on CONFIG_EXPERT because breakpoint ptrace requests are part of the usual user ABI. The user must know what he's doing before turning that off. For now, only the archs that already implemented a conditional HAVE_HW_BREAKPOINT can turn off HW_BREAKPOINT. x86 and sh have it always selected because they need more background work to support this new modularity. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Will Deacon <will.deacon@arm.com> Cc: Prasad <prasad@linux.vnet.ibm.com> Cc: Paul Mundt <lethal@linux-sh.org> --- arch/sh/Kconfig | 1 + arch/x86/Kconfig | 1 + init/Kconfig | 10 ++++++++++ 3 files changed, 12 insertions(+), 0 deletions(-) diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 4b89da2..0d4d124 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -44,6 +44,7 @@ config SUPERH32 select HAVE_FUNCTION_GRAPH_TRACER select HAVE_ARCH_KGDB select HAVE_HW_BREAKPOINT + select HW_BREAKPOINT select HAVE_MIXED_BREAKPOINTS_REGS select PERF_EVENTS select ARCH_HIBERNATION_POSSIBLE if MMU diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index cc6c53a..8b49bff 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -54,6 +54,7 @@ config X86 select HAVE_KERNEL_XZ select HAVE_KERNEL_LZO select HAVE_HW_BREAKPOINT + select HW_BREAKPOINT select HAVE_MIXED_BREAKPOINTS_REGS select PERF_EVENTS select HAVE_PERF_EVENTS_NMI diff --git a/init/Kconfig b/init/Kconfig index d886b1e..76ae53e 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -924,6 +924,16 @@ menuconfig EXPERT environments which can tolerate a "non-standard" kernel. Only use this if you really know what you are doing. +config HW_BREAKPOINT + bool "Hardware breakpoints" if EXPERT + depends on HAVE_HW_BREAKPOINT + default y + help + Hardware breakpoints are a feature implemented by most CPUs + to trigger an event when an instruction or data fetch + matches a given pattern. This is typically used by ptrace + and perf events. + config UID16 bool "Enable 16-bit UID system calls" if EXPERT depends on ARM || BLACKFIN || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && COMPAT) || UML || (X86_64 && IA32_EMULATION) -- 1.7.3.2
WARNING: multiple messages have this Message-ID (diff)
From: Frederic Weisbecker <fweisbec@gmail.com> To: LKML <linux-kernel@vger.kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>, Frederic Weisbecker <fweisbec@gmail.com>, Will Deacon <will.deacon@arm.com>, LKML <linux-kernel@vger.kernel.org>, Paul Mundt <lethal@linux-sh.org>, Prasad <prasad@linux.vnet.ibm.com>, Ingo Molnar <mingo@elte.hu>, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 1/6] hw_breakpoints: Split hardware breakpoints config Date: Tue, 24 May 2011 23:52:22 +0200 [thread overview] Message-ID: <1306273947-8410-2-git-send-email-fweisbec@gmail.com> (raw) In-Reply-To: <1306273947-8410-1-git-send-email-fweisbec@gmail.com> The hardware breakpoint config is only made of an ability. An arch that support this feature selects HAVE_HW_BREAKPOINT. If so, the feature is definetly built-in, the user can't decide to turn it off. As hw_breakpoints depend on perf, it also makes perf a mandatory feature. The whole is quite a piece of code and may not be desired on some embedded systems. In order to prepare to make this optable by the user, split the config into the more traditional couple (ability, user choice) by providing a new HW_BREAKPOINT config. It is default on and depends on CONFIG_EXPERT because breakpoint ptrace requests are part of the usual user ABI. The user must know what he's doing before turning that off. For now, only the archs that already implemented a conditional HAVE_HW_BREAKPOINT can turn off HW_BREAKPOINT. x86 and sh have it always selected because they need more background work to support this new modularity. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Will Deacon <will.deacon@arm.com> Cc: Prasad <prasad@linux.vnet.ibm.com> Cc: Paul Mundt <lethal@linux-sh.org> --- arch/sh/Kconfig | 1 + arch/x86/Kconfig | 1 + init/Kconfig | 10 ++++++++++ 3 files changed, 12 insertions(+), 0 deletions(-) diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 4b89da2..0d4d124 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -44,6 +44,7 @@ config SUPERH32 select HAVE_FUNCTION_GRAPH_TRACER select HAVE_ARCH_KGDB select HAVE_HW_BREAKPOINT + select HW_BREAKPOINT select HAVE_MIXED_BREAKPOINTS_REGS select PERF_EVENTS select ARCH_HIBERNATION_POSSIBLE if MMU diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index cc6c53a..8b49bff 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -54,6 +54,7 @@ config X86 select HAVE_KERNEL_XZ select HAVE_KERNEL_LZO select HAVE_HW_BREAKPOINT + select HW_BREAKPOINT select HAVE_MIXED_BREAKPOINTS_REGS select PERF_EVENTS select HAVE_PERF_EVENTS_NMI diff --git a/init/Kconfig b/init/Kconfig index d886b1e..76ae53e 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -924,6 +924,16 @@ menuconfig EXPERT environments which can tolerate a "non-standard" kernel. Only use this if you really know what you are doing. +config HW_BREAKPOINT + bool "Hardware breakpoints" if EXPERT + depends on HAVE_HW_BREAKPOINT + default y + help + Hardware breakpoints are a feature implemented by most CPUs + to trigger an event when an instruction or data fetch + matches a given pattern. This is typically used by ptrace + and perf events. + config UID16 bool "Enable 16-bit UID system calls" if EXPERT depends on ARM || BLACKFIN || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && COMPAT) || UML || (X86_64 && IA32_EMULATION) -- 1.7.3.2
next prev parent reply other threads:[~2011-05-24 21:52 UTC|newest] Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-05-24 21:52 [PATCH v2] hw_breakpoint: Let the user choose not to build it (and perf too) Frederic Weisbecker 2011-05-24 21:52 ` Frederic Weisbecker 2011-05-24 21:52 ` Frederic Weisbecker [this message] 2011-05-24 21:52 ` [PATCH 1/6] hw_breakpoints: Split hardware breakpoints config Frederic Weisbecker 2011-05-24 21:52 ` [PATCH 2/6] hw_breakpoints: Migrate breakpoint conditional build under new config Frederic Weisbecker 2011-05-24 21:52 ` Frederic Weisbecker 2011-07-04 13:27 ` K.Prasad 2011-07-04 13:27 ` K.Prasad 2011-07-04 13:29 ` Frederic Weisbecker 2011-07-04 13:29 ` Frederic Weisbecker 2011-07-04 17:44 ` K.Prasad 2011-07-05 13:49 ` Frederic Weisbecker 2011-05-24 21:52 ` [PATCH 3/6] x86: Allow the user not to build hw_breakpoints Frederic Weisbecker 2011-05-24 21:52 ` Frederic Weisbecker 2011-05-24 21:52 ` [PATCH 4/6] hw_breakpoints: Breakpoints arch ability don't need perf events Frederic Weisbecker 2011-05-24 21:52 ` Frederic Weisbecker 2011-07-04 13:32 ` K.Prasad 2011-07-04 13:32 ` K.Prasad 2011-07-04 13:37 ` Frederic Weisbecker 2011-07-04 13:37 ` Frederic Weisbecker 2011-05-24 21:52 ` [PATCH 5/6] hw_breakpoints: Only force perf events if breakpoints are selected Frederic Weisbecker 2011-05-24 21:52 ` Frederic Weisbecker 2011-05-24 21:52 ` [PATCH 6/6] hw_breakpoints: Drop remaining misplaced dependency on perf Frederic Weisbecker 2011-05-24 21:52 ` Frederic Weisbecker 2011-05-25 2:27 ` [PATCH v2] hw_breakpoint: Let the user choose not to build it (and perf too) Paul Mundt 2011-05-25 2:27 ` Paul Mundt -- strict thread matches above, loose matches on Subject: below -- 2011-07-14 15:03 [GIT PULL] hw_breakpoints updates Frederic Weisbecker 2011-07-14 15:03 ` [PATCH 1/6] hw_breakpoints: Split hardware breakpoints config Frederic Weisbecker 2011-04-27 16:59 [PATCH 0/6] hw_breakpoint: Let the user choose not to build it (and perf too) Frederic Weisbecker 2011-04-27 16:59 ` [PATCH 1/6] hw_breakpoints: Split hardware breakpoints config Frederic Weisbecker
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=1306273947-8410-2-git-send-email-fweisbec@gmail.com \ --to=fweisbec@gmail.com \ --cc=a.p.zijlstra@chello.nl \ --cc=lethal@linux-sh.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linuxppc-dev@lists.ozlabs.org \ --cc=mingo@elte.hu \ --cc=prasad@linux.vnet.ibm.com \ --cc=will.deacon@arm.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.