public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stafford Horne <shorne@gmail.com>
To: Brian Masney <bmasney@redhat.com>
Cc: Jonas Bonn <jonas@southpole.se>,
	Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>,
	linux-openrisc@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] openrisc: define arch-specific version of nop()
Date: Tue, 20 Jan 2026 19:23:45 +0000	[thread overview]
Message-ID: <aW_WQfaa4zzO6YR5@antec> (raw)
In-Reply-To: <20260120-openrisc-nop-v1-1-a29da65537c8@redhat.com>

On Tue, Jan 20, 2026 at 12:07:23PM -0500, Brian Masney wrote:
> 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>

This looks OK to me.  Queueing.

-Stafford

> ---
>  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@redhat.com>
> 

      reply	other threads:[~2026-01-20 19:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-20 17:07 [PATCH] openrisc: define arch-specific version of nop() Brian Masney
2026-01-20 19:23 ` Stafford Horne [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aW_WQfaa4zzO6YR5@antec \
    --to=shorne@gmail.com \
    --cc=bmasney@redhat.com \
    --cc=jonas@southpole.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-openrisc@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=stefan.kristiansson@saunalahti.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox