mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: David Laight <david.laight.linux@gmail.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Sven Schnelle <svens@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Mete Durlu <meted@linux.ibm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juergen Christ <jchrist@linux.ibm.com>,
	Ilya Leoshkevich <iii@linux.ibm.com>,
	linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [PATCH v3 11/11] s390/percpu: Rework to simplify percpu_entry() and percpu_exit()
Date: Mon, 21 Sep 2026 12:17:57 +0200	[thread overview]
Message-ID: <20260921101757.9433Bc4-hca@linux.ibm.com> (raw)
In-Reply-To: <arEByH7VvkEvy9Fk@J2N7QTR9R3>

On Mon, Sep 21, 2026 at 11:07:04AM +0100, Mark Rutland wrote:
> On Mon, Sep 21, 2026 at 10:55:18AM +0100, David Laight wrote:
> > On Mon, 21 Sep 2026 10:40:05 +0200
> > Heiko Carstens <hca@linux.ibm.com> wrote:
> 
> > > +	regpcp = FIELD_GET(PCPU_REG_PCP, regval);
> > > +	regoff = FIELD_GET(PCPU_REG_OFF, regval);
> > ...
> > > +#define PCPU_REG_PCP_SHIFT		0
> > > +#define PCPU_REG_PCP			GENMASK(3, 0)
> > > +#define PCPU_REG_OFF_SHIFT		4
> > > +#define PCPU_REG_OFF			GENMASK(7, 4)
> > ...
> > > +#define __PCPU_CALC_REGVAL(regpcp, regoff)					\
> > > +	"(" regpcp " << " __stringify(PCPU_REG_PCP_SHIFT) ") |"			\
> > > +	"(" regoff " << " __stringify(PCPU_REG_OFF_SHIFT) ")"
> > 
> > I'm not a big fan of GENMASK() + FIELD_GET() and I'm not at all sure it
> > really helps here.
> 
> It's the same pattern already used by the extable code. 
> 
> While _you_ don't like it, that's not a universal opinion (and FWIW, I
> prefer the FIELD_GET() approach).
> 
> I'll leave it to Heiko and co to choose whatever style they prefer, as
> it's their architecture port...

As Mark said: it is already used, and in addition I would like to have s390
architecture code quite similar to other architectures whenever possible.

This simplifies cross architecture changes, even though it seems unlikely that
somebody would ever touch this particular code across architectures.

  reply	other threads:[~2026-09-21 10:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21  8:39 [PATCH v3 00/11] s390: More this_cpu_*() changes Heiko Carstens
2026-09-21  8:39 ` [PATCH v3 01/11] s390/percpu: Fix comment typo Heiko Carstens
2026-09-21  8:39 ` [PATCH v3 02/11] s390/percpu: Add sanity check to GEN_MVIY macro Heiko Carstens
2026-09-21  8:39 ` [PATCH v3 03/11] s390/lowcore: Remove _AC() from LOWCORE_ALT_ADDRESS Heiko Carstens
2026-09-21  8:39 ` [PATCH v3 04/11] s390/percpu: Let MVIY_PERCPU() calculate alternative displacement Heiko Carstens
2026-09-21  8:39 ` [PATCH v3 05/11] s390/percpu/lowcore: Add and use LC_PERCPU lowcore offset defines Heiko Carstens
2026-09-21  8:40 ` [PATCH v3 06/11] s390/percpu: Rename inline assembly symbolic names Heiko Carstens
2026-09-21  8:40 ` [PATCH v3 07/11] s390/percpu: Use __PCPU_BEGIN() and __PCPU_END() for inline assemblies Heiko Carstens
2026-09-21  8:40 ` [PATCH v3 08/11] s390/percpu: Use percpu code section for this_cpu_cmpxchg128() Heiko Carstens
2026-09-21  8:40 ` [PATCH v3 09/11] s390/percpu: Use percpu code section for this_cpu_xchg() Heiko Carstens
2026-09-21  8:40 ` [PATCH v3 10/11] s390/percpu: Use percpu code section for this_cpu_cmpxchg() Heiko Carstens
2026-09-21  8:40 ` [PATCH v3 11/11] s390/percpu: Rework to simplify percpu_entry() and percpu_exit() Heiko Carstens
2026-09-21  9:55   ` David Laight
2026-09-21 10:07     ` Mark Rutland
2026-09-21 10:17       ` Heiko Carstens [this message]
2026-09-21  9:15 ` [PATCH v3 00/11] s390: More this_cpu_*() changes Heiko Carstens

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=20260921101757.9433Bc4-hca@linux.ibm.com \
    --to=hca@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=david.laight.linux@gmail.com \
    --cc=gor@linux.ibm.com \
    --cc=iii@linux.ibm.com \
    --cc=jchrist@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=meted@linux.ibm.com \
    --cc=peterz@infradead.org \
    --cc=svens@linux.ibm.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: 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

all inboxes | Powered by JetHome®