patches.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Gerald Schaefer <gerald.schaefer@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	linux-s390@vger.kernel.org, Sven Schnelle <svens@linux.ibm.com>,
	patches@lists.linux.dev, Niklas Schnelle <schnelle@linux.ibm.com>
Subject: Re: [PATCH rc] s390: Use the correct count for __iowrite64_copy()
Date: Mon, 19 Feb 2024 11:08:50 +0100	[thread overview]
Message-ID: <20240219100850.16287-B-hca@linux.ibm.com> (raw)
In-Reply-To: <0-v1-9223d11a7662+1d7785-s390_iowrite64_jgg@nvidia.com>

On Fri, Feb 16, 2024 at 08:48:14PM -0400, Jason Gunthorpe wrote:
> The signature for __iowrite64_copy() requires the number of 64 bit
> quantities, not bytes. Multiple by 8 to get to a byte length before
> invoking zpci_memcpy_toio()
> 
> Fixes: 87bc359b9822 ("s390/pci: speed up __iowrite64_copy by using pci store block insn")
> Acked-by: Niklas Schnelle <schnelle@linux.ibm.com>
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> ---
>  arch/s390/pci/pci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
> index 676ac74026a82b..52a44e353796c0 100644
> --- a/arch/s390/pci/pci.c
> +++ b/arch/s390/pci/pci.c
> @@ -252,7 +252,7 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res,
>  /* combine single writes by using store-block insn */
>  void __iowrite64_copy(void __iomem *to, const void *from, size_t count)
>  {
> -       zpci_memcpy_toio(to, from, count);
> +	zpci_memcpy_toio(to, from, count * 8);
>  }

Odd, this bug is 11 years old, and there was never any bug report.
Is this never called, or how is this possible?

Niklas, would you happen to have an idea?

  reply	other threads:[~2024-02-19 10:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-17  0:48 [PATCH rc] s390: Use the correct count for __iowrite64_copy() Jason Gunthorpe
2024-02-19 10:08 ` Heiko Carstens [this message]
2024-02-20 12:22   ` Niklas Schnelle
2024-02-20 13:03     ` Jason Gunthorpe
2024-02-20 13:09 ` Heiko Carstens

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=20240219100850.16287-B-hca@linux.ibm.com \
    --to=hca@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=gerald.schaefer@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=jgg@nvidia.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=schnelle@linux.ibm.com \
    --cc=svens@linux.ibm.com \
    /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 NNTP newsgroup(s).