mirror of
https://github.com/torvalds/linux.git
synced 2026-12-04 12:24:18 +00:00
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 <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Brian Masney <[email protected]>
Signed-off-by: Stafford Horne <[email protected]>
12 lines
241 B
C
12 lines
241 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __ASM_BARRIER_H
|
|
#define __ASM_BARRIER_H
|
|
|
|
#define mb() asm volatile ("l.msync" ::: "memory")
|
|
|
|
#define nop() asm volatile ("l.nop")
|
|
|
|
#include <asm-generic/barrier.h>
|
|
|
|
#endif /* __ASM_BARRIER_H */
|