On 12/01/2021 21:54, Song Bao Hua (Barry Song) wrote:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/dr ivers/hwmon/Kconfig?h=v5.11-rc3#n551
But not a great solution.
Yep. It looks buggy as powerpc and arm64 could have the device literally though practically people might not use them.
I tried to guard against it in this series, but never got it over the line: https://lore.kernel.org/linux-pci/1560262374-67875-1-git-send-email-john.g arry@huawei.com/
Cool. I didn't realize you have tried to figure out a patchset to fix it in common code. It seems it is worth revisiting the patchset?
So that patchset would stop the system crashing when there is no IO port mapped upon access. But I still did not like how those drivers unconditionally access those ports, which could have side-effects when some PCI IO port is mapped to the same IO port address.
Anyway, I'll look again at it.
Thanks, John