linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: clabbe@baylibre.com (LABBE Corentin)
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 10:30:34 +0100	[thread overview]
Message-ID: <20181115093034.GB23965@Red> (raw)
In-Reply-To: <20181024085700.GR30658@n2100.armlinux.org.uk>

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.

Regards

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

Thread overview: 14+ 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 ` [PATCH v3 1/7] powerpc: rename setbits32/clrbits32 to setbits_be32/clrbits_be32 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 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 ` [PATCH v3 4/7] ata: ahci_sunxi: use xxxsetbitsi_le32 functions Corentin Labbe
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 ` [PATCH v3 6/7] drm: meson: " Corentin Labbe
2018-10-24  7:35 ` [PATCH v3 7/7] net: stmmac: dwmac-meson8b: " Corentin Labbe
2018-10-24  8:57 ` [PATCH v3 0/7] include: add setbits32/clrbits32/clrsetbits32/setbits64/clrbits64/clrsetbits64 Russell King - ARM Linux
2018-11-15  9:30   ` LABBE Corentin [this message]
2018-11-15  9:33     ` Russell King - ARM Linux
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=20181115093034.GB23965@Red \
    --to=clabbe@baylibre.com \
    --cc=linux-arm-kernel@lists.infradead.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 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).