lkml.org 
[lkml]   [2022]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] RISC-V: Make port I/O string accessors actually work
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

\
 
 \ /
  Last update: 2022-09-23 12:33    [W:0.068 / U:2.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site