]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
openrisc: define arch-specific version of nop()
authorBrian Masney <bmasney@redhat.com>
Tue, 20 Jan 2026 17:07:23 +0000 (12:07 -0500)
committerSasha Levin <sashal@kernel.org>
Wed, 4 Mar 2026 12:20:26 +0000 (07:20 -0500)
commitb0915d5ccd0a82c4a4288f4d84435c3bc5d4da2a
tree7417918070e2e03d57dc6fa8d7569243ffb16244
parentf6c412dcfd76b0516d51aa847d8f4c7b70381b09
openrisc: define arch-specific version of nop()

[ Upstream commit 0dfffa5479d6260d04d021f69203b1926f73d889 ]

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>
arch/openrisc/include/asm/barrier.h