LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pranith Kumar <bobby.prani@gmail.com>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	"supporter:S390" <linux390@de.ibm.com>,
	Lai Jiangshan <laijs@cn.fujitsu.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Josh Triplett <josh@joshtriplett.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Anton Blanchard <anton@samba.org>,
	Scott Wood <scottwood@freescale.com>,
	Andy Fleming <afleming@freescale.com>,
	Tiejun Chen <tiejun.chen@windriver.com>,
	Daniel Walter <dwalter@google.com>,
	Jens Freimann <jfrei@linux.vnet.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	"open list:LINUX FOR POWERPC..." <linuxppc-dev@lists.ozlabs.org>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:S390" <linux-s390@vger.kernel.org>
Subject: Re: [PATCH] srcu: Isolate srcu sections using CONFIG_SRCU
Date: Mon, 29 Dec 2014 23:32:10 -0500	[thread overview]
Message-ID: <CAJhHMCDan+qaaZjVUucA-sUS8A3vSTYuVHg8XQv4rsHXxAzKLw@mail.gmail.com> (raw)
In-Reply-To: <20141229110324.50f1339b@mschwide>

On Mon, Dec 29, 2014 at 5:03 AM, Martin Schwidefsky
<schwidefsky@de.ibm.com> wrote:
> On Sat, 27 Dec 2014 12:17:43 -0500
> Pranith Kumar <bobby.prani@gmail.com> wrote:
>
>> @@ -65,10 +65,13 @@
>>  #include <asm/kexec.h>
>>  #include <asm/mmu_context.h>
>>  #include <asm/code-patching.h>
>> -#include <asm/kvm_ppc.h>
>>  #include <asm/hugetlb.h>
>>  #include <asm/epapr_hcalls.h>
>>
>> +#if IS_ENABLED(CONFIG_KVM)
>> +#include <asm/kvm_ppc.h>
>> +#endif
>> +
>>  #ifdef DEBUG
>>  #define DBG(fmt...) udbg_printf(fmt)
>>  #else
>
> I always cringe when I see an include protected by an #ifdef.
> Is this really necessary? All that is done in asm-offsets.c is
> to calculate offsets, the code where the two offsets in question
> are used (entry64.S) does have the #ifdef for CONFIG_KVM.

I agree that this is not the ideal way to do this. But, it has been
the way things were already being done. If you see
arch/powerpc/kernel/asm-offsets.c, there are quite some includes which
are within ifdefs.

I've considered other alternatives (though not in-depth) and found
that they will require quite some refactoring. One simple idea is to
move this #ifdef to within kvm_ppc.h. That should make the inclusion
of this file a no-op in all the places where this is being included
without KVM being enabled. But I am not 100% sure of that approach.

Any suggestions are welcome.

-- 
Pranith

  reply	other threads:[~2014-12-30  4:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-27 17:17 Pranith Kumar
2014-12-27 17:17 ` [PATCH] powerpc/powernv: Select CONFIG_PRINTK to fix build failure Pranith Kumar
2014-12-29  9:01   ` Michael Ellerman
2014-12-30  5:46     ` Pranith Kumar
2014-12-29 10:03 ` [PATCH] srcu: Isolate srcu sections using CONFIG_SRCU Martin Schwidefsky
2014-12-30  4:32   ` Pranith Kumar [this message]
2014-12-30 19:44     ` Scott Wood
2014-12-29 23:05 ` Scott Wood
2014-12-30  5:06   ` Pranith Kumar
  -- strict thread matches above, loose matches on Subject: below --
2014-12-09 18:48 Pranith Kumar
2014-12-09 20:12 ` Mathieu Desnoyers
2014-12-10  0:41 ` Paul E. McKenney
2014-12-09 14:16 Pranith Kumar
2014-12-09 17:02 ` Paul E. McKenney
2014-12-08 20:23 Pranith Kumar
2014-12-08 15:55 Pranith Kumar
2014-12-08 18:10 ` Paul E. McKenney

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=CAJhHMCDan+qaaZjVUucA-sUS8A3vSTYuVHg8XQv4rsHXxAzKLw@mail.gmail.com \
    --to=bobby.prani@gmail.com \
    --cc=afleming@freescale.com \
    --cc=anton@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=borntraeger@de.ibm.com \
    --cc=dwalter@google.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=jfrei@linux.vnet.ibm.com \
    --cc=josh@joshtriplett.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux390@de.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mpe@ellerman.id.au \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=paulus@samba.org \
    --cc=rostedt@goodmis.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=scottwood@freescale.com \
    --cc=tiejun.chen@windriver.com \
    --subject='Re: [PATCH] srcu: Isolate srcu sections using CONFIG_SRCU' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).