From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: <linux-kernel@vger.kernel.org>, <ath9k-devel@qca.qualcomm.com>,
<kvalo@codeaurora.org>, <linux-wireless@vger.kernel.org>,
<ath9k-devel@venema.h4ckr.net>, <netdev@vger.kernel.org>,
Mark Rutland <mark.rutland@arm.com>
Subject: Re: [1/2] ath9k: ar9002_mac: kill off ACCESS_ONCE()
Date: Thu, 12 Jan 2017 12:00:25 +0100 [thread overview]
Message-ID: <35e1ad24f23d41c7956d82b5ca9fc0e6@euamsexm01a.eu.qualcomm.com> (raw)
In-Reply-To: <1482864599-19995-2-git-send-email-mark.rutland@arm.com>
Mark Rutland <mark.rutland@arm.com> wrote:
> For several reasons, it is desirable to use {READ,WRITE}_ONCE() in
> preference to ACCESS_ONCE(), and new code is expected to use one of the
> former. So far, there's been no reason to change most existing uses of
> ACCESS_ONCE(), as these aren't currently harmful.
>
> However, for some new features (e.g. KTSAN / Kernel Thread Sanitizer),
> it is necessary to instrument reads and writes separately, which is not
> possible with ACCESS_ONCE(). This distinction is critical to correct
> operation.
>
> It's possible to transform the bulk of kernel code using the Coccinelle
> script below. However, for some files (including the ath9k ar9002 mac
> driver), this mangles the formatting. As a preparatory step, this patch
> converts the driver to use {READ,WRITE}_ONCE() without said mangling.
>
> ----
> virtual patch
>
> @ depends on patch @
> expression E1, E2;
> @@
>
> - ACCESS_ONCE(E1) = E2
> + WRITE_ONCE(E1, E2)
>
> @ depends on patch @
> expression E;
> @@
>
> - ACCESS_ONCE(E)
> + READ_ONCE(E)
> ----
>
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: ath9k-devel@qca.qualcomm.com
> Cc: Kalle Valo <kvalo@codeaurora.org>
> Cc: linux-wireless@vger.kernel.org
> Cc: ath9k-devel@lists.ath9k.org
> Cc: netdev@vger.kernel.org
2 patches applied to ath-next branch of ath.git, thanks.
d5a3a76a9cb8 ath9k: ar9002_mac: kill off ACCESS_ONCE()
50f3818196f5 ath9k: ar9003_mac: kill off ACCESS_ONCE()
--
https://patchwork.kernel.org/patch/9489799/
Documentation about submitting wireless patches and checking status
from patchwork:
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2017-01-12 11:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-27 18:49 [PATCH 0/2] ath9k: kill of ACCESS_ONCE() in MAC drivers Mark Rutland
2016-12-27 18:49 ` [PATCH 1/2] ath9k: ar9002_mac: kill off ACCESS_ONCE() Mark Rutland
2017-01-12 11:00 ` Kalle Valo [this message]
2016-12-27 18:49 ` [PATCH 2/2] ath9k: ar9003_mac: " Mark Rutland
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=35e1ad24f23d41c7956d82b5ca9fc0e6@euamsexm01a.eu.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=ath9k-devel@qca.qualcomm.com \
--cc=ath9k-devel@venema.h4ckr.net \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=netdev@vger.kernel.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
all inboxes | Powered by JetHome®