On Tue, 2 Nov 2021 at 03:16, ChiaWei Wang <chiawei_w...@aspeedtech.com> wrote:
>
> Hi Jae,
>
> > From: linux-arm-kernel <linux-arm-kernel-boun...@lists.infradead.org> On
> >
> > From: Jae Hyun Yoo <jae.hyun....@linux.intel.com>
> >
> > If LPC KCS driver is registered ahead of lpc-ctrl module, LPC KCS block 
> > will be
> > enabled without heart beating of LCLK until lpc-ctrl enables the LCLK. This
> > issue causes improper handling on host interrupts when the host sends
> > interrupts in that time frame.
> > Then kernel eventually forcibly disables the interrupt with dumping stack 
> > and
> > printing a 'nobody cared this irq' message out.
> >
> > To prevent this issue, all LPC sub drivers should enable LCLK individually 
> > so this
> > patch adds clock control logic into the LPC KCS driver.
>
> Have all LPC sub drivers could result in entire LPC block down if any of them 
> disables the clock (e.g. driver unload).
> The LPC devices such as SIO can be used before kernel booting, even without 
> any BMC firmware.
> Thereby, we recommend to make LCLK critical or guarded by protected clock 
> instead of having all LPC sub drivers hold the LCLK control.
>
> The previous discussion for your reference:
> https://lkml.org/lkml/2020/9/28/153

Please read the entire thread. The conclusion:

https://lore.kernel.org/all/cacpk8xdbmkhz8mcsfmdafv8k7qj7ajbl8tvkfk8c+5aneum...@mail.gmail.com/

That is, for the devices that have a driver loaded can enable the
clock. When they are unloaded, they will reduce the reference count
until the last driver is unloaded. eg:

https://elixir.bootlin.com/linux/latest/source/drivers/clk/clk.c#L945

There was another fork to the thread, where we suggested that a
protected clocks binding could be added:

https://lore.kernel.org/all/160269577311.884498.8429245140509326...@swboyd.mtv.corp.google.com/

If you wish to use this mechanism for eg. SIO clocks, then I encourage
Aspeed to submit a patch to do that.

Cheers,

Joel


_______________________________________________
Openipmi-developer mailing list
Openipmi-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Reply via email to