[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260120-openrisc-nop-v1-1-a29da65537c8@redhat.com>
Date: Tue, 20 Jan 2026 12:07:23 -0500
From: Brian Masney <bmasney@...hat.com>
To: Jonas Bonn <jonas@...thpole.se>,
Stefan Kristiansson <stefan.kristiansson@...nalahti.fi>,
Stafford Horne <shorne@...il.com>
Cc: linux-openrisc@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel test robot <lkp@...el.com>, Brian Masney <bmasney@...hat.com>
Subject: [PATCH] openrisc: define arch-specific version of nop()
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@...el.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202601180236.BVy480We-lkp@intel.com/
Signed-off-by: Brian Masney <bmasney@...hat.com>
---
arch/openrisc/include/asm/barrier.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/openrisc/include/asm/barrier.h b/arch/openrisc/include/asm/barrier.h
index 7538294721bed7bc8da3d08f3db89a408091f3f8..8e592c99090235423a9f4c9149da9822918afb13 100644
--- a/arch/openrisc/include/asm/barrier.h
+++ b/arch/openrisc/include/asm/barrier.h
@@ -4,6 +4,8 @@
#define mb() asm volatile ("l.msync" ::: "memory")
+#define nop() asm volatile ("l.nop")
+
#include <asm-generic/barrier.h>
#endif /* __ASM_BARRIER_H */
---
base-commit: d08c85ac8894995d4b0d8fb48d2f6a3e53cd79ab
change-id: 20260120-openrisc-nop-82b7f95dad7f
Best regards,
--
Brian Masney <bmasney@...hat.com>
Powered by blists - more mailing lists