mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Julian Vetter" <julian@outer-limits.org>,
	"David S . Miller" <davem@davemloft.net>,
	"Andreas Larsson" <andreas@gaisler.com>
Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sparc: Remove IO memcpy and memset from sparc code
Date: Fri, 30 Oct 2026 10:26:30 +0100	[thread overview]
Message-ID: <29541187-7232-48b9-86af-1cc4398713d3@app.fastmail.com> (raw)
In-Reply-To: <82307061-8bbb-4e42-89cf-cb0b5ab1442f@outer-limits.org>

On Fri, Oct 30, 2026, at 10:03, Julian Vetter wrote:
> On 10/29/26 16:13, Arnd Bergmann wrote:
>
> thank you for your reply! I'm not sure, but to me it seems unlikely that 
> the PCI host bridge swaps. On sparc64 readl()/readq() use the flag 
> ASI_PHYS_BYPASS_EC_E_L, so they work on little-endian data. The CPU does 
> the byte swap here. The __raw_*() accessors use ASI_PHYS_BYPASS_EC_E, 
> which does not swap (which are used in lib/io_memcpy.c as well), so they 
> return the data in address order. 

Ok, good. I missed the '_L' bit and assumed they were the same.

In this case your patch looks good.

> And other I/O functions, e.g., readsl()/writesl() and 
> ioread32_rep()/iowrite32_rep() end up in insl()/outsl() in 
> arch/sparc/lib/PeeCeeI.c, which copy buffers with 
> __raw_readl()/__raw_writel(). And __ioread32_copy()/__iowrite32_copy() 
> in lib/iomap_copy.c use the __raw_ accessors on sparc64 as well.
>
> But that's just from me looking at the code and compiling the 
> sparc32_defconfig and sparc64_defconfig. I have no sparc platform, so 
> can't test it. Maybe some sparc expert can comment.

I'm sure it's fine then. For your patch:

Reviewed-by: Arnd Bergman <arnd@arndb.de>

      reply	other threads:[~2026-10-30  9:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 14:53 Julian Vetter
2026-10-29 15:13 ` Arnd Bergmann
2026-10-30  9:03   ` Julian Vetter
2026-10-30  9:26     ` Arnd Bergmann [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=29541187-7232-48b9-86af-1cc4398713d3@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=andreas@gaisler.com \
    --cc=davem@davemloft.net \
    --cc=julian@outer-limits.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sparclinux@vger.kernel.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

all inboxes | Powered by JetHome®