mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 13:03:48 +00:00
Merge tag 'arc-fixes-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
Pull ARC fix from Vineet Gupta:
- workaround a GCC bug which has been causing upstream build fails
* tag 'arc-fixes-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
ARC: io: work around GCC PR127718 in __raw_write{w,l}()
This commit is contained in:
@@ -133,10 +133,14 @@ static inline void __raw_writeb(u8 b, volatile void __iomem *addr)
|
||||
#define __raw_writew __raw_writew
|
||||
static inline void __raw_writew(u16 s, volatile void __iomem *addr)
|
||||
{
|
||||
/*
|
||||
* Not an "m" operand: GCC can pick a register-indexed address for it,
|
||||
* which ST doesn't support (GCC PR target/127718).
|
||||
*/
|
||||
__asm__ __volatile__(
|
||||
" stw%U1 %0, %1 \n"
|
||||
" stw %0, [%1] \n"
|
||||
:
|
||||
: "r" (s), "m" (*(volatile u16 __force *)addr)
|
||||
: "r" (s), "r" (addr)
|
||||
: "memory");
|
||||
|
||||
}
|
||||
@@ -144,10 +148,11 @@ static inline void __raw_writew(u16 s, volatile void __iomem *addr)
|
||||
#define __raw_writel __raw_writel
|
||||
static inline void __raw_writel(u32 w, volatile void __iomem *addr)
|
||||
{
|
||||
/* See __raw_writew() above for why this doesn't use an "m" operand. */
|
||||
__asm__ __volatile__(
|
||||
" st%U1 %0, %1 \n"
|
||||
" st %0, [%1] \n"
|
||||
:
|
||||
: "r" (w), "m" (*(volatile u32 __force *)addr)
|
||||
: "r" (w), "r" (addr)
|
||||
: "memory");
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user