Re: [RFC PATCH v2 1/3] resource: Request IO port regions from children of ioport_resource

From: John Garry
Date: Tue Apr 02 2019 - 05:51:09 EST


On 29/03/2019 12:22, Lorenzo Pieralisi wrote:
> >Side note: these drivers can't be compiled on PPC, it would be
> >good to understand why, I have a hunch it can be related.
>
> I mentioned this earlier:
>
> I saw that in commits like 746cdfbf01c0 ("hwmon: Avoid building drivers
> forpowerpc that read/write ISA addresses"), PPC would not build these
> drivers, as, like arm, it has no native ISA.
>
> However I still don't think just avoiding compiling these drivers for
> certain archs solves the problem.
No it does not but I would like to understand how relevant is fixing
those drivers (that should not use ISA IO space without first claiming
their resources, for the records) given that PPC did not even try and
apparently that's not a problem.


Hi Lorenzo,

Those drivers should still be fixed up separately.

The tricky part in this series is making the resource claim fail if there is no IO space mapped/accessible at the addresses requested.

However I would still like to fix up the low level IO port accessors to discard accesses when no IO space is mapped.

Thanks,
John

>
> [...]
>
> >>>>>[1] https://www.spinics.net/lists/linux-pci