From: "Arnd Bergmann" <arnd@arndb.de>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>
Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RISC-V: Make port I/O string accessors actually work
Date: Fri, 23 Sep 2022 12:31:39 +0200 [thread overview]
Message-ID: <c4ee195a-cf1f-44f6-b3b6-241d04e01fb9@www.fastmail.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2209220223080.29493@angie.orcam.me.uk>
On Thu, Sep 22, 2022, at 11:56 PM, Maciej W. Rozycki wrote:
> Fix port I/O string accessors such as `insb', `outsb', etc. which use
> the physical PCI port I/O address rather than the corresponding memory
> mapping to get at the requested location, which in turn breaks at least
> accesses made by our parport driver to a PCIe parallel port such as:
>
> PCI parallel port detected: 1415:c118, I/O at 0x1000(0x1008), IRQ 20
> parport0: PC-style at 0x1000 (0x1008), irq 20, using FIFO
> [PCSPP,TRISTATE,COMPAT,EPP,ECP]
The patch looks correct to me, but I'm curious: Are you actually
using a parport device on your system, or just testing it to
make it work?
> +#define outsb(addr, buffer, count) __outsb(PCI_IOBASE + (addr),
> buffer, count)
> +#define outsw(addr, buffer, count) __outsw(PCI_IOBASE + (addr),
> buffer, count)
> +#define outsl(addr, buffer, count) __outsl(PCI_IOBASE + (addr),
> buffer, count)
>
I don't see anything actually risc-v specific in these definitions,
and it would be great to make the asm-generic version do the
right thing here. As far as I can tell, the only difference is
the barriers in the risc-v version, and we should really have the
same in the generic code anyway.
Arnd
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2022-09-23 10:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 21:56 [PATCH] RISC-V: Make port I/O string accessors actually work Maciej W. Rozycki
2022-09-23 10:31 ` Arnd Bergmann [this message]
2022-09-23 11:38 ` Maciej W. Rozycki
2022-10-10 15:41 ` Björn Töpel
2022-10-10 17:53 ` Arnd Bergmann
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=c4ee195a-cf1f-44f6-b3b6-241d04e01fb9@www.fastmail.com \
--to=arnd@arndb.de \
--cc=aou@eecs.berkeley.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=macro@orcam.me.uk \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.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).