linux-alpha.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Richard Henderson <richard.henderson@linaro.org>,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	Matt Turner <mattst88@gmail.com>, Arnd Bergmann <arnd@arndb.de>,
	linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org
Subject: Re: [PATCH] alpha: Fix ioread64/iowrite64 helpers
Date: Mon, 3 Oct 2022 09:07:24 -0700	[thread overview]
Message-ID: <20221003160724.GA654712@roeck-us.net> (raw)

On Mon, Oct 03, 2022 at 02:13:16PM +0200, Linus Walleij wrote:
> When doing allmod builds it turns out some modules are using
> ioread64() and iowrite64() that the alpha does not implement,
> as it is using <asm-generic/iomap.h> without selecting
> GENERIC_IOMAP.
> 
> Fix this by implementing the ioread64()/iowrite64() stubs
> as well, using readq() and writeq() respectively.
> 
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Fixes: 7e772dad9913 ("alpha: Use generic <asm-generic/io.h>")
> Link: https://lore.kernel.org/linux-arch/20221002224521.GA968453@roeck-us.net/
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Richard Henderson <richard.henderson@linaro.org>
> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
> Cc: Matt Turner <mattst88@gmail.com>
> Cc: linux-arch@vger.kernel.org
> Cc: linux-alpha@vger.kernel.org
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Tested-by: Guenter Roeck <linux@roeck-us.net>

Note that I don't have a preference about the two suggested patches.
Both fix the problem I had observed.

Thanks,
Guenter

> ---
> Arnd if this looks OK then please apply it on linux-arch
> for fixes.
> ---
>  arch/alpha/kernel/io.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/arch/alpha/kernel/io.c b/arch/alpha/kernel/io.c
> index 838586abb1e0..5f3e75a945c1 100644
> --- a/arch/alpha/kernel/io.c
> +++ b/arch/alpha/kernel/io.c
> @@ -41,6 +41,11 @@ unsigned int ioread32(const void __iomem *addr)
>  	return ret;
>  }
>  
> +u64 ioread64(const void __iomem *addr)
> +{
> +	return readq(addr);
> +}
> +
>  void iowrite8(u8 b, void __iomem *addr)
>  {
>  	mb();
> @@ -59,12 +64,19 @@ void iowrite32(u32 b, void __iomem *addr)
>  	IO_CONCAT(__IO_PREFIX,iowrite32)(b, addr);
>  }
>  
> +void iowrite64(u64 b, void __iomem *addr)
> +{
> +	writeq(b, addr);
> +}
> +
>  EXPORT_SYMBOL(ioread8);
>  EXPORT_SYMBOL(ioread16);
>  EXPORT_SYMBOL(ioread32);
> +EXPORT_SYMBOL(ioread64);
>  EXPORT_SYMBOL(iowrite8);
>  EXPORT_SYMBOL(iowrite16);
>  EXPORT_SYMBOL(iowrite32);
> +EXPORT_SYMBOL(iowrite64);
>  
>  u8 inb(unsigned long port)
>  {
> -- 
> 2.34.1
> 

             reply	other threads:[~2022-10-03 16:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-03 16:07 Guenter Roeck [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-10-03 12:13 [PATCH] alpha: Fix ioread64/iowrite64 helpers Linus Walleij
2022-10-03 13:04 ` Arnd Bergmann
2022-10-03 18:47   ` Linus Walleij

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=20221003160724.GA654712@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=arnd@arndb.de \
    --cc=ink@jurassic.park.msu.ru \
    --cc=linus.walleij@linaro.org \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=mattst88@gmail.com \
    --cc=richard.henderson@linaro.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).