[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cd9310ab-6012-a410-2bfc-a2f8dd8d62f9@huawei.com>
Date: Fri, 17 Dec 2021 15:27:09 +0000
From: John Garry <john.garry@...wei.com>
To: Arnd Bergmann <arnd@...nel.org>
CC: Niklas Schnelle <schnelle@...ux.ibm.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-arch <linux-arch@...r.kernel.org>,
linux-pci <linux-pci@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [GIT PULL 1/2] asm-generic: rework PCI I/O space access
On 17/12/2021 14:32, Arnd Bergmann wrote:
>> I was interesting in the IOPORT_NATIVE flag (or whatever we call it) as
>> it solves the problem of drivers which "unconditionally do inb()/outb()
>> without checking the validity of the address using firmware or other
>> methods first" being built for (and loaded on and crashing) unsuitable
>> systems. Such a problem is in [0]
>>
>> So if we want to support that later, then it seems that someone would
>> need to go back and re-edit many same driver Kconfigs – like hwmon, for
>> example. I think it's better to avoid that and do it now.
>>
>> Arnd, any opinion on that?
>>
>> I'm happy to help with that effort.
> I looked at the options the other day and couldn't really find any that
> fell into this category, so I suggested that Niklas would skip that for the
> moment.
From looking at the patch Niklas directed us at, as I understand,
HAS_IOPORT is to decide whether the arch/platform may support PIO
accessors - inb et al. And on that basis I am confused why it is not
selected for arm64. And further compounded by:
config INDIRECT_PIO
bool "Access I/O in non-MMIO mode"
depends on ARM64
+ depends on HAS_IOPORT
If arm64 does not select, then why depend on it?
> If you have a better way of finding the affected drivers,
> that would be great.
Assuming arm64 should select HAS_IOPORT, I am talking about f71805f as
an example. According to that patch, this driver additionally depends on
HAS_IOPORT; however I would rather arm64, like powerpc, should not allow
that driver to be built at all.
Thanks,
John
Powered by blists - more mailing lists