atomics,cmpxchg: Privatize the inclusion of asm/cmpxchg.h
Subsystems (6)
PATCH v2 1/1 atomics,cmpxchg: Privatize the inclusion of asm/cmpxchg.h
After commit:
atomics: add acquire/release/relaxed variants of some atomic operations
Architectures may only provide {cmp,}xchg_relaxed definitions in asm/cmpxchg.h. Other variants, such as {cmp,}xchg, may be built in linux/atomic.h, which means simply including asm/cmpxchg.h may not get the definitions of all the{cmp,}xchg variants. Therefore, we should privatize the inclusions of asm/cmpxchg.h to keep it only included in arch/* and replace the inclusions outside with linux/atomic.h
---
v1 --> v2:
1. rebase on current master branch of tip tree
2. remove documentation modification
drivers/net/ethernet/sfc/mcdi.c | 2 +- drivers/phy/phy-rcar-gen2.c | 3 +-- drivers/staging/speakup/selection.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-)
drivers/net/ethernet/sfc/mcdi.c +1 -1
@@ -9,7 +9,7 @@#include <linux/delay.h> #include <linux/moduleparam.h> -#include <asm/cmpxchg.h> +#include <linux/atomic.h> #include "net_driver.h" #include "nic.h" #include "io.h"
drivers/phy/phy-rcar-gen2.c +1 -2
@@ -17,8 +17,7 @@#include <linux/phy/phy.h> #include <linux/platform_device.h> #include <linux/spinlock.h> - -#include <asm/cmpxchg.h> +#include <linux/atomic.h> #define USBHS_LPSTS 0x02#define USBHS_UGCTRL 0x80
drivers/staging/speakup/selection.c +1 -1
@@ -7,7 +7,7 @@#include <linux/workqueue.h> #include <linux/tty.h> #include <linux/tty_flip.h> -#include <asm/cmpxchg.h> +#include <linux/atomic.h> #include "speakup.h"
Signature · 1 line
2.5.1
Quoted 11 lines · Boqun Feng
After commit:
atomics: add acquire/release/relaxed variants of some atomic operations
Architectures may only provide {cmp,}xchg_relaxed definitions in
asm/cmpxchg.h. Other variants, such as {cmp,}xchg, may be built inlinux/atomic.h, which means simply includingasm/cmpxchg.hmay not get the definitions of all the{cmp,}xchg variants. Therefore, we should privatize the inclusions ofasm/cmpxchg.hto keep it only included inarch/*and replace the inclusions outside withlinux/atomic.h
Quoted 7 lines
Acked-by Will Deacon <[email protected]>Signed-off-by Boqun Feng <[email protected]>---
v1 --> v2:
1. rebase on current master branch of tip tree
2. remove documentation modification
Quoted 11 lines · Boqun Feng
After commit:
atomics: add acquire/release/relaxed variants of some atomic operations
Architectures may only provide {cmp,}xchg_relaxed definitions in
asm/cmpxchg.h. Other variants, such as {cmp,}xchg, may be built inlinux/atomic.h, which means simply includingasm/cmpxchg.hmay not get the definitions of all the{cmp,}xchg variants. Therefore, we should privatize the inclusions ofasm/cmpxchg.hto keep it only included inarch/*and replace the inclusions outside withlinux/atomic.h
Quoted 2 lines
Acked-by Will Deacon <[email protected]>Signed-off-by Boqun Feng <[email protected]>
fwiw,