lkml.org 
[lkml]   [2020]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/2] irq-meson-gpio: make it possible to build as a module
On 2020-10-26 16:18, Kevin Hilman wrote:
> Marc Zyngier <maz@kernel.org> writes:
>
>> On Tue, 20 Oct 2020 08:25:30 +0100,
>> Neil Armstrong <narmstrong@baylibre.com> wrote:
>>>
>>> In order to reduce the kernel Image size on multi-platform
>>> distributions,
>>> make it possible to build the Amlogic GPIO IRQ controller as a module
>>> by switching it to a platform driver.
>>>
>>> The second patch removes MESON_IRQ_GPIO selection from ARCH_MESON to
>>> allow
>>> building the driver as module.
>>>
>>> Neil Armstrong (2):
>>> irqchip: irq-meson-gpio: make it possible to build as a module
>>> arm64: meson: remove MESON_IRQ_GPIO selection
>>>
>>> arch/arm64/Kconfig.platforms | 1 -
>>> drivers/irqchip/Kconfig | 5 +-
>>> drivers/irqchip/irq-meson-gpio.c | 89
>>> ++++++++++++++++++++------------
>>> 3 files changed, 59 insertions(+), 36 deletions(-)
>>
>> I've tried this series on my vim3l with the this driver compiled as a
>> module, and lost the Ethernet interface in the process, as the phy
>> wasn't able to resolve its interrupt and things fail later on:
>>
>> [ 72.238291] meson8b-dwmac ff3f0000.ethernet eth1: no phy at addr -1
>> [ 72.238917] meson8b-dwmac ff3f0000.ethernet eth1: stmmac_open:
>> Cannot attach to PHY (error: -19)
>>
>> This is a generic problem with making DT-based interrupt controllers
>> modular when not *all* the drivers can deal with probing deferral.
>
> Yes, but this series still keeps the default as built-in.
>
> If you build as a module, and you add `fw_devlink=on` to the kernel
> command-line, device-links will be created based on DT dependencies
> which will ensure the right module load order.

It doesn't work here. I get the exact same error (well, with eth0
instead
of eth1). In my experience, fw_devlink isn't reliable yet. Config on
request.

> I've tested this series with `fw_devlink=on` on several Amlogic
> platforms and it works just fine, but since it requires the extra
> cmdline option, I think the default should remain built-in.
>
> So, I'd still like to see this series merged so that at least it's an
> option to enable this as a module.

I have taken similar patches in 5.9 for other SoC families (qcomm, mtk),
and ended up reverting them in -rc2, because there is simply too much
breakage. Even keeping it as built in changes the init order, which
tons of drivers depend on. I proposed a middle-of-the-road approach
(modules can break, built-in stays the same) which Rob pushed back on.

So either we fix fw_devlink to work for everything and be on by default,
or we keep the current setup.

> Also, another reason to make it optional is that not all platforms need
> this feature at all, but right now we select it for all Amlogic SoCs.

I understand that, but I don't want another episode of widespread
breakages, and this series definitely breaks things.

Thanks,

M.
--
Jazz is not dead. It just smells funny...

\
 
 \ /
  Last update: 2020-10-26 18:00    [W:0.087 / U:0.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site