Skip to content
/ linux Public

Commit a729596

Browse files
masneybSasha Levin
authored andcommitted
openrisc: define arch-specific version of nop()
[ Upstream commit 0dfffa5 ] When compiling a driver written for MIPS on OpenRISC that uses the nop() function, it fails due to the following error: drivers/watchdog/pic32-wdt.c: Assembler messages: drivers/watchdog/pic32-wdt.c:125: Error: unrecognized instruction `nop' The driver currently uses the generic version of nop() from include/asm-generic/barrier.h: #ifndef nop #define nop() asm volatile ("nop") #endif Let's fix this on OpenRISC by defining an architecture-specific version of nop(). This was tested by performing an allmodconfig openrisc cross compile on an aarch64 host. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202601180236.BVy480We-lkp@intel.com/ Signed-off-by: Brian Masney <bmasney@redhat.com> Signed-off-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 5e13d0a commit a729596

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/openrisc/include/asm/barrier.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
#define mb() asm volatile ("l.msync" ::: "memory")
66

7+
#define nop() asm volatile ("l.nop")
8+
79
#include <asm-generic/barrier.h>
810

911
#endif /* __ASM_BARRIER_H */

0 commit comments

Comments
 (0)