* [RFC] Is /dev/port useful on arm64?
@ 2016-04-25 22:35 Al Stone
2016-04-25 22:43 ` Arnd Bergmann
0 siblings, 1 reply; 3+ messages in thread
From: Al Stone @ 2016-04-25 22:35 UTC (permalink / raw)
To: linux-arm-kernel
In examining a bug report where lm_sensors fails on arm64 (and panics the
kernel, which is kind of annoying), it turns out it is trying to read
information from an ISA port using the /dev/port device.
It's easy enough to disable this; you can:
-- set CONFIG_DEVPORT=n for arm64 (in arch/arm64/Kconfig)
-- or, redefine the macro arch_has_dev_port() to:
#define arch_has_dev_port() (0)
in arch/arm64/include/asm/io.h
However, /dev/port is used for both ISA and PCI IO ports. So, this led me
to what may be a dumb question: is there really a need for PCI support in
/dev/port for arm64?
Supporting ISA just seems silly, at least from an ARMv8 server standpoint,
but PCI is less clear to me. Anyone have opinions one way or the other?
It seems like it would be a waste of time to do the work to make sure the
PCI ports work correctly only to find out they will never be used, but I
can't think of anyone that actually needs them.
Thanks.
--
ciao,
al
-----------------------------------
Al Stone
Software Engineer
Red Hat, Inc.
ahs3 at redhat.com
-----------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread* [RFC] Is /dev/port useful on arm64?
2016-04-25 22:35 [RFC] Is /dev/port useful on arm64? Al Stone
@ 2016-04-25 22:43 ` Arnd Bergmann
2016-04-26 16:02 ` Al Stone
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2016-04-25 22:43 UTC (permalink / raw)
To: linux-arm-kernel
On Monday 25 April 2016 16:35:04 Al Stone wrote:
>
> However, /dev/port is used for both ISA and PCI IO ports. So, this led me
> to what may be a dumb question: is there really a need for PCI support in
> /dev/port for arm64?
>
> Supporting ISA just seems silly, at least from an ARMv8 server standpoint,
> but PCI is less clear to me. Anyone have opinions one way or the other?
Hisilicon has an ISA-like bus in their system, in form of LPC.
> It seems like it would be a waste of time to do the work to make sure the
> PCI ports work correctly only to find out they will never be used, but I
> can't think of anyone that actually needs them.
I think we should change the /dev/port implementation to interact with
the architecture code so it knows which addresses have been registered
through pci_ioremap_io to ensure that accessing it at least doesn't
predictably crash the kernel.
Aside from that, most distros probably want to disable it anyway along
with /dev/mem, but an embedded user can access the two if they absolutely
need to.
Arnd
^ permalink raw reply [flat|nested] 3+ messages in thread
* [RFC] Is /dev/port useful on arm64?
2016-04-25 22:43 ` Arnd Bergmann
@ 2016-04-26 16:02 ` Al Stone
0 siblings, 0 replies; 3+ messages in thread
From: Al Stone @ 2016-04-26 16:02 UTC (permalink / raw)
To: linux-arm-kernel
On 04/25/2016 04:43 PM, Arnd Bergmann wrote:
> On Monday 25 April 2016 16:35:04 Al Stone wrote:
>>
>> However, /dev/port is used for both ISA and PCI IO ports. So, this led me
>> to what may be a dumb question: is there really a need for PCI support in
>> /dev/port for arm64?
>>
>> Supporting ISA just seems silly, at least from an ARMv8 server standpoint,
>> but PCI is less clear to me. Anyone have opinions one way or the other?
>
> Hisilicon has an ISA-like bus in their system, in form of LPC.
Right, I'd heard about that one.
>> It seems like it would be a waste of time to do the work to make sure the
>> PCI ports work correctly only to find out they will never be used, but I
>> can't think of anyone that actually needs them.
>
> I think we should change the /dev/port implementation to interact with
> the architecture code so it knows which addresses have been registered
> through pci_ioremap_io to ensure that accessing it at least doesn't
> predictably crash the kernel.
Yeah, agreed, but a more long term solution than I personally need today.
I'll look into it a bit more, though.
> Aside from that, most distros probably want to disable it anyway along
> with /dev/mem, but an embedded user can access the two if they absolutely
> need to.
>
> Arnd
This is what I was thinking, too, but I didn't want to cut anything
short if someone was actually using it.
--
ciao,
al
-----------------------------------
Al Stone
Software Engineer
Red Hat, Inc.
ahs3 at redhat.com
-----------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-26 16:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-25 22:35 [RFC] Is /dev/port useful on arm64? Al Stone
2016-04-25 22:43 ` Arnd Bergmann
2016-04-26 16:02 ` Al Stone
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox