From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josh Triplett Subject: Re: [PATCH v2 6/7] x86: Allow disabling HW_BREAKPOINTS, PERF_EVENTS, INSTRUCTION_DECODER, IRQ_WORK Date: Mon, 10 Mar 2014 13:50:17 -0700 Message-ID: <20140310205017.GA32613@leaf> References: <5a5942a0cdb0914ecd81d2880190c19abb228511.1394418994.git.josh@joshtriplett.org> <20140310161408.GF14639@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Suravee Suthikulpanit , David Herrmann , Stephane Eranian , linux-kernel@vger.kernel.org, Paul Gortmaker , Paul Mackerras , "H. Peter Anvin" , Thomas Gleixner , Andi Kleen , x86@kernel.org, Ingo Molnar , oprofile-list@lists.sf.net, Mel Gorman , Arnaldo Carvalho de Melo , Borislav Petkov , Dave Young , Peter Zijlstra , Gleb Natapov , Steven Rostedt , Bin Gao , Matt Fleming , Jacob Shin , Oleg Nesterov , Torsten Kaiser Return-path: Content-Disposition: inline In-Reply-To: <20140310161408.GF14639@localhost.localdomain> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: oprofile-list-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org On Mon, Mar 10, 2014 at 05:14:11PM +0100, Frederic Weisbecker wrote: > On Sun, Mar 09, 2014 at 08:12:53PM -0700, Josh Triplett wrote: > > --- a/arch/x86/Kconfig > > +++ b/arch/x86/Kconfig > > @@ -70,9 +70,6 @@ config X86 > > select HAVE_KERNEL_XZ > > select HAVE_KERNEL_LZO > > select HAVE_KERNEL_LZ4 > > - select HAVE_HW_BREAKPOINT > > - select HAVE_MIXED_BREAKPOINTS_REGS > > - select PERF_EVENTS > > select HAVE_PERF_EVENTS_NMI > > select HAVE_PERF_REGS > > select HAVE_PERF_USER_STACK_DUMP > > @@ -587,6 +584,15 @@ config SCHED_OMIT_FRAME_POINTER > > > > If in doubt, say "Y". > > > > +config HW_BREAKPOINTS > > + bool "Enable hardware breakpoints support" if EXPERT > > + default y > > + select HAVE_HW_BREAKPOINT > > + select HAVE_MIXED_BREAKPOINTS_REGS > > + ---help--- > > + Enable support for x86 hardware breakpoints for debuggers > > + and perf. This will implicitly enable perf-events. > > + > > HW_BREAKPOINTS must depend on HAVE_HW_BREAKPOINT, not the other way round. > HAVE_* Kconfig symbols must only express constant backend support, not a variable user choice... > > ie, that's what I did in this patchset > https://lkml.org/lkml/2011/7/14/163 So, the converse of that is that makefiles and code should never depend on HAVE_* symbols; they should only be used in Kconfig as dependencies. Right now, piles of things use HAVE_HW_BREAKPOINT to select things to build. So, the biggest chunk of this change is introducing a new dummy symbol HW_BREAKPOINTS depending on HAVE_HW_BREAKPOINT and HAVE_MIXED_BREAKPOINTS_REGS, and changing almost all the references to HAVE_HW_BREAKPOINT to HW_BREAKPOINTS. That's effectively patch 2/6 of your series. Would you consider reviving that patch, or should I pull that patch into this series instead? - Josh Triplett ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech