All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: LABBE Corentin <clabbe@baylibre.com>
Cc: Gilles.Muller@lip6.fr, Julia.Lawall@lip6.fr, agust@denx.de,
	airlied@linux.ie, alexandre.torgue@st.com, alistair@popple.id.au,
	benh@kernel.crashing.org, carlo@caione.org, davem@davemloft.net,
	galak@kernel.crashing.org, joabreu@synopsys.com,
	khilman@baylibre.com, matthias.bgg@gmail.com,
	maxime.ripard@bootlin.com, michal.lkml@markovi.net,
	mpe@ellerman.id.au, mporter@kernel.crashing.org,
	narmstrong@baylibre.com, nicolas.palix@imag.fr, oss@buserror.net,
	paulus@samba.org, peppe.cavallaro@st.com, tj@kernel.org,
	vitb@kernel.crashing.org, wens@csie.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-ide@vger.kernel.org, linux-sunxi@googlegroups.com,
	linux-mediatek@lists.infradead.org,
	linux-amlogic@lists.infradead.org, linuxppc-dev@lists.ozlabs.
Subject: Re: [PATCH v3 0/7] include: add setbits32/clrbits32/clrsetbits32/setbits64/clrbits64/clrsetbits64
Date: Thu, 15 Nov 2018 09:33:48 +0000	[thread overview]
Message-ID: <20181115093348.GV30658@n2100.armlinux.org.uk> (raw)
In-Reply-To: <20181115093034.GB23965@Red>

On Thu, Nov 15, 2018 at 10:30:34AM +0100, LABBE Corentin wrote:
> On Wed, Oct 24, 2018 at 09:57:00AM +0100, Russell King - ARM Linux wrote:
> > On Wed, Oct 24, 2018 at 07:35:46AM +0000, Corentin Labbe wrote:
> > > This patchset adds a new set of functions which are open-coded in lot of
> > > place.
> > > Basicly the pattern is always the same, "read, modify a bit, write"
> > > some driver and the powerpc arch already have thoses pattern them as functions. (like ahci_sunxi.c or dwmac-meson8b)
> > 
> > The advantage of them being open-coded is that it's _obvious_ to the
> > reviewer that there is a read-modify-write going on which, in a multi-
> > threaded environment, may need some locking (so it should trigger a
> > review of the locking around that code.)
> > 
> > With it hidden inside a helper which has no locking itself, it becomes
> > much easier to pass over in review, which means that races are much
> > more likely to go unspotted - and that is bad news.
> > 
> 
> Hello
> 
> I understand your fear, but I think the benefit overhaul thoses.
> Furthermore, drivers which I have converted does not need such locking.
> 
> If you want I can rename the header to linux/setbits-non-atomic.h for making obvious the lack of locking.

It'd probably be better in the function name - it then doesn't get
"lost" that it's non-atomic when it's included via other headers.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

WARNING: multiple messages have this Message-ID (diff)
From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: LABBE Corentin <clabbe@baylibre.com>
Cc: Gilles.Muller@lip6.fr, Julia.Lawall@lip6.fr, agust@denx.de,
	airlied@linux.ie, alexandre.torgue@st.com, alistair@popple.id.au,
	benh@kernel.crashing.org, carlo@caione.org, davem@davemloft.net,
	galak@kernel.crashing.org, joabreu@synopsys.com,
	khilman@baylibre.com, matthias.bgg@gmail.com,
	maxime.ripard@bootlin.com, michal.lkml@markovi.net,
	mpe@ellerman.id.au, mporter@kernel.crashing.org,
	narmstrong@baylibre.com, nicolas.palix@imag.fr, oss@buserror.net,
	paulus@samba.org, peppe.cavallaro@st.com, tj@kernel.org,
	vitb@kernel.crashing.org, wens@csie.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-ide@vger.kernel.org, linux-sunxi@googlegroups.com,
	linux-mediatek@lists.infradead.org,
	linux-amlogic@lists.infradead.org, linuxppc-dev@lists.ozlabs.org,
	cocci@systeme.lip6.fr, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 0/7] include: add setbits32/clrbits32/clrsetbits32/setbits64/clrbits64/clrsetbits64
Date: Thu, 15 Nov 2018 09:33:48 +0000	[thread overview]
Message-ID: <20181115093348.GV30658@n2100.armlinux.org.uk> (raw)
In-Reply-To: <20181115093034.GB23965@Red>

On Thu, Nov 15, 2018 at 10:30:34AM +0100, LABBE Corentin wrote:
> On Wed, Oct 24, 2018 at 09:57:00AM +0100, Russell King - ARM Linux wrote:
> > On Wed, Oct 24, 2018 at 07:35:46AM +0000, Corentin Labbe wrote:
> > > This patchset adds a new set of functions which are open-coded in lot of
> > > place.
> > > Basicly the pattern is always the same, "read, modify a bit, write"
> > > some driver and the powerpc arch already have thoses pattern them as functions. (like ahci_sunxi.c or dwmac-meson8b)
> > 
> > The advantage of them being open-coded is that it's _obvious_ to the
> > reviewer that there is a read-modify-write going on which, in a multi-
> > threaded environment, may need some locking (so it should trigger a
> > review of the locking around that code.)
> > 
> > With it hidden inside a helper which has no locking itself, it becomes
> > much easier to pass over in review, which means that races are much
> > more likely to go unspotted - and that is bad news.
> > 
> 
> Hello
> 
> I understand your fear, but I think the benefit overhaul thoses.
> Furthermore, drivers which I have converted does not need such locking.
> 
> If you want I can rename the header to linux/setbits-non-atomic.h for making obvious the lack of locking.

It'd probably be better in the function name - it then doesn't get
"lost" that it's non-atomic when it's included via other headers.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

WARNING: multiple messages have this Message-ID (diff)
From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: LABBE Corentin <clabbe@baylibre.com>
Cc: Gilles.Muller@lip6.fr, maxime.ripard@bootlin.com,
	dri-devel@lists.freedesktop.org, linux-ide@vger.kernel.org,
	linux-sunxi@googlegroups.com, paulus@samba.org,
	linux-amlogic@lists.infradead.org, cocci@systeme.lip6.fr,
	narmstrong@baylibre.com, airlied@linux.ie, wens@csie.org,
	joabreu@synopsys.com, agust@denx.de, alexandre.torgue@st.com,
	alistair@popple.id.au, nicolas.palix@imag.fr, oss@buserror.net,
	Julia.Lawall@lip6.fr, linux-mediatek@lists.infradead.org,
	matthias.bgg@gmail.com, peppe.cavallaro@st.com,
	linux-arm-kernel@lists.infradead.org, michal.lkml@markovi.net,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	khilman@baylibre.com, carlo@caione.org, tj@kernel.org,
	linuxppc-dev@lists.ozlabs.org, davem@davemloft.net
Subject: Re: [PATCH v3 0/7] include: add setbits32/clrbits32/clrsetbits32/setbits64/clrbits64/clrsetbits64
Date: Thu, 15 Nov 2018 09:33:48 +0000	[thread overview]
Message-ID: <20181115093348.GV30658@n2100.armlinux.org.uk> (raw)
In-Reply-To: <20181115093034.GB23965@Red>

On Thu, Nov 15, 2018 at 10:30:34AM +0100, LABBE Corentin wrote:
> On Wed, Oct 24, 2018 at 09:57:00AM +0100, Russell King - ARM Linux wrote:
> > On Wed, Oct 24, 2018 at 07:35:46AM +0000, Corentin Labbe wrote:
> > > This patchset adds a new set of functions which are open-coded in lot of
> > > place.
> > > Basicly the pattern is always the same, "read, modify a bit, write"
> > > some driver and the powerpc arch already have thoses pattern them as functions. (like ahci_sunxi.c or dwmac-meson8b)
> > 
> > The advantage of them being open-coded is that it's _obvious_ to the
> > reviewer that there is a read-modify-write going on which, in a multi-
> > threaded environment, may need some locking (so it should trigger a
> > review of the locking around that code.)
> > 
> > With it hidden inside a helper which has no locking itself, it becomes
> > much easier to pass over in review, which means that races are much
> > more likely to go unspotted - and that is bad news.
> > 
> 
> Hello
> 
> I understand your fear, but I think the benefit overhaul thoses.
> Furthermore, drivers which I have converted does not need such locking.
> 
> If you want I can rename the header to linux/setbits-non-atomic.h for making obvious the lack of locking.

It'd probably be better in the function name - it then doesn't get
"lost" that it's non-atomic when it's included via other headers.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

WARNING: multiple messages have this Message-ID (diff)
From: linux@armlinux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 0/7] include: add setbits32/clrbits32/clrsetbits32/setbits64/clrbits64/clrsetbits64
Date: Thu, 15 Nov 2018 09:33:48 +0000	[thread overview]
Message-ID: <20181115093348.GV30658@n2100.armlinux.org.uk> (raw)
In-Reply-To: <20181115093034.GB23965@Red>

On Thu, Nov 15, 2018 at 10:30:34AM +0100, LABBE Corentin wrote:
> On Wed, Oct 24, 2018 at 09:57:00AM +0100, Russell King - ARM Linux wrote:
> > On Wed, Oct 24, 2018 at 07:35:46AM +0000, Corentin Labbe wrote:
> > > This patchset adds a new set of functions which are open-coded in lot of
> > > place.
> > > Basicly the pattern is always the same, "read, modify a bit, write"
> > > some driver and the powerpc arch already have thoses pattern them as functions. (like ahci_sunxi.c or dwmac-meson8b)
> > 
> > The advantage of them being open-coded is that it's _obvious_ to the
> > reviewer that there is a read-modify-write going on which, in a multi-
> > threaded environment, may need some locking (so it should trigger a
> > review of the locking around that code.)
> > 
> > With it hidden inside a helper which has no locking itself, it becomes
> > much easier to pass over in review, which means that races are much
> > more likely to go unspotted - and that is bad news.
> > 
> 
> Hello
> 
> I understand your fear, but I think the benefit overhaul thoses.
> Furthermore, drivers which I have converted does not need such locking.
> 
> If you want I can rename the header to linux/setbits-non-atomic.h for making obvious the lack of locking.

It'd probably be better in the function name - it then doesn't get
"lost" that it's non-atomic when it's included via other headers.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

WARNING: multiple messages have this Message-ID (diff)
From: linux@armlinux.org.uk (Russell King - ARM Linux)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH v3 0/7] include: add setbits32/clrbits32/clrsetbits32/setbits64/clrbits64/clrsetbits64
Date: Thu, 15 Nov 2018 09:33:48 +0000	[thread overview]
Message-ID: <20181115093348.GV30658@n2100.armlinux.org.uk> (raw)
In-Reply-To: <20181115093034.GB23965@Red>

On Thu, Nov 15, 2018 at 10:30:34AM +0100, LABBE Corentin wrote:
> On Wed, Oct 24, 2018 at 09:57:00AM +0100, Russell King - ARM Linux wrote:
> > On Wed, Oct 24, 2018 at 07:35:46AM +0000, Corentin Labbe wrote:
> > > This patchset adds a new set of functions which are open-coded in lot of
> > > place.
> > > Basicly the pattern is always the same, "read, modify a bit, write"
> > > some driver and the powerpc arch already have thoses pattern them as functions. (like ahci_sunxi.c or dwmac-meson8b)
> > 
> > The advantage of them being open-coded is that it's _obvious_ to the
> > reviewer that there is a read-modify-write going on which, in a multi-
> > threaded environment, may need some locking (so it should trigger a
> > review of the locking around that code.)
> > 
> > With it hidden inside a helper which has no locking itself, it becomes
> > much easier to pass over in review, which means that races are much
> > more likely to go unspotted - and that is bad news.
> > 
> 
> Hello
> 
> I understand your fear, but I think the benefit overhaul thoses.
> Furthermore, drivers which I have converted does not need such locking.
> 
> If you want I can rename the header to linux/setbits-non-atomic.h for making obvious the lack of locking.

It'd probably be better in the function name - it then doesn't get
"lost" that it's non-atomic when it's included via other headers.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

  reply	other threads:[~2018-11-15  9:33 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-24  7:35 [PATCH v3 0/7] include: add setbits32/clrbits32/clrsetbits32/setbits64/clrbits64/clrsetbits64 Corentin Labbe
2018-10-24  7:35 ` Corentin Labbe
2018-10-24  7:35 ` Corentin Labbe
2018-10-24  7:35 ` Corentin Labbe
2018-10-24  7:35 ` [PATCH v3 1/7] powerpc: rename setbits32/clrbits32 to setbits_be32/clrbits_be32 Corentin Labbe
2018-10-24  7:35   ` Corentin Labbe
2018-10-24  7:35   ` Corentin Labbe
2018-10-24  7:35   ` Corentin Labbe
2018-10-24  7:35 ` [PATCH v3 2/7] include: add setbits_leXX/clrbits_leXX/clrsetbits_leXX in linux/setbits.h Corentin Labbe
2018-10-24  7:35   ` Corentin Labbe
2018-10-24  7:35   ` Corentin Labbe
2018-10-24  7:35   ` Corentin Labbe
2018-10-24 22:46   ` Jakub Kicinski
2018-10-24 22:46     ` Jakub Kicinski
2018-10-24 22:46     ` Jakub Kicinski
2018-10-24 22:46     ` Jakub Kicinski
2018-10-24 22:46     ` Jakub Kicinski
2018-10-24  7:35 ` [PATCH v3 3/7 DONOTMERGE] coccinelle: add xxxsetbits_leXX converting spatch Corentin Labbe
2018-10-24  7:35   ` Corentin Labbe
2018-10-24  7:35   ` Corentin Labbe
2018-10-24  7:35   ` Corentin Labbe
2018-10-24  7:35 ` [PATCH v3 4/7] ata: ahci_sunxi: use xxxsetbitsi_le32 functions Corentin Labbe
2018-10-24  7:35   ` Corentin Labbe
2018-10-24  7:35   ` Corentin Labbe
2018-10-24  7:35   ` Corentin Labbe
     [not found]   ` <1540366553-18541-5-git-send-email-clabbe-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2018-10-24  7:57     ` Sergei Shtylyov
2018-10-24  7:57       ` Sergei Shtylyov
2018-10-24  7:57       ` Sergei Shtylyov
2018-10-24  7:57       ` Sergei Shtylyov
2018-10-24  7:57       ` Sergei Shtylyov
2018-10-24  7:35 ` [PATCH v3 5/7] net: ethernet: stmmac: dwmac-sun8i: use xxxsetbits_le32 Corentin Labbe
2018-10-24  7:35   ` Corentin Labbe
2018-10-24  7:35   ` Corentin Labbe
2018-10-24  7:35   ` Corentin Labbe
2018-10-24  7:35 ` [PATCH v3 6/7] drm: meson: " Corentin Labbe
2018-10-24  7:35   ` Corentin Labbe
2018-10-24  7:35   ` Corentin Labbe
2018-10-24  7:35   ` Corentin Labbe
2018-10-24  7:35 ` [PATCH v3 7/7] net: stmmac: dwmac-meson8b: " Corentin Labbe
2018-10-24  7:35   ` Corentin Labbe
2018-10-24  7:35   ` Corentin Labbe
2018-10-24  7:35   ` Corentin Labbe
2018-10-24  8:57 ` [PATCH v3 0/7] include: add setbits32/clrbits32/clrsetbits32/setbits64/clrbits64/clrsetbits64 Russell King - ARM Linux
2018-10-24  8:57   ` Russell King - ARM Linux
2018-10-24  8:57   ` Russell King - ARM Linux
2018-10-24  8:57   ` Russell King - ARM Linux
2018-10-24  8:57   ` Russell King - ARM Linux
2018-11-15  9:30   ` LABBE Corentin
2018-11-15  9:30     ` LABBE Corentin
2018-11-15  9:30     ` LABBE Corentin
2018-11-15  9:30     ` LABBE Corentin
2018-11-15  9:30     ` LABBE Corentin
2018-11-15  9:33     ` Russell King - ARM Linux [this message]
2018-11-15  9:33       ` Russell King - ARM Linux
2018-11-15  9:33       ` Russell King - ARM Linux
2018-11-15  9:33       ` Russell King - ARM Linux
2018-11-15  9:33       ` Russell King - ARM Linux
2018-11-15 12:24       ` LABBE Corentin
2018-11-15 12:24         ` LABBE Corentin
2018-11-15 12:24         ` LABBE Corentin
2018-11-15 12:24         ` LABBE Corentin
2018-11-15 12:24         ` LABBE Corentin

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=20181115093348.GV30658@n2100.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=Gilles.Muller@lip6.fr \
    --cc=Julia.Lawall@lip6.fr \
    --cc=agust@denx.de \
    --cc=airlied@linux.ie \
    --cc=alexandre.torgue@st.com \
    --cc=alistair@popple.id.au \
    --cc=benh@kernel.crashing.org \
    --cc=carlo@caione.org \
    --cc=clabbe@baylibre.com \
    --cc=davem@davemloft.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=galak@kernel.crashing.org \
    --cc=joabreu@synopsys.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=linuxppc-dev@lists.ozlabs. \
    --cc=matthias.bgg@gmail.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=michal.lkml@markovi.net \
    --cc=mpe@ellerman.id.au \
    --cc=mporter@kernel.crashing.org \
    --cc=narmstrong@baylibre.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.palix@imag.fr \
    --cc=oss@buserror.net \
    --cc=paulus@samba.org \
    --cc=peppe.cavallaro@st.com \
    --cc=tj@kernel.org \
    --cc=vitb@kernel.crashing.org \
    --cc=wens@csie.org \
    /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 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.