Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1557360 > unrolled thread

Re: [1/2] ath9k: ar9002_mac: kill off ACCESS_ONCE()

Started byKalle Valo <kvalo@qca.qualcomm.com>
First post2017-01-12 12:10 +0100
Last post2017-01-12 12:10 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [1/2] ath9k: ar9002_mac: kill off ACCESS_ONCE() Kalle Valo <kvalo@qca.qualcomm.com> - 2017-01-12 12:10 +0100

#1557360 — Re: [1/2] ath9k: ar9002_mac: kill off ACCESS_ONCE()

FromKalle Valo <kvalo@qca.qualcomm.com>
Date2017-01-12 12:10 +0100
SubjectRe: [1/2] ath9k: ar9002_mac: kill off ACCESS_ONCE()
Message-ID<sYLqx-3g8-1@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web