lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 20 Jun 2024 20:38:09 +0530
From: Anup Patel <apatel@...tanamicro.com>
To: Emil Renner Berthing <emil.renner.berthing@...onical.com>
Cc: Anup Patel <anup@...infault.org>, Palmer Dabbelt <palmer@...belt.com>, 
	Paul Walmsley <paul.walmsley@...ive.com>, Thomas Gleixner <tglx@...utronix.de>, 
	Rob Herring <robh+dt@...nel.org>, 
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Frank Rowand <frowand.list@...il.com>, 
	Conor Dooley <conor+dt@...nel.org>, Samuel Holland <samuel@...lland.org>, devicetree@...r.kernel.org, 
	Saravana Kannan <saravanak@...gle.com>, Marc Zyngier <maz@...nel.org>, linux-kernel@...r.kernel.org, 
	Björn Töpel <bjorn@...nel.org>, 
	Atish Patra <atishp@...shpatra.org>, linux-riscv@...ts.infradead.org, 
	linux-arm-kernel@...ts.infradead.org, Andrew Jones <ajones@...tanamicro.com>
Subject: Re: [PATCH v14 01/18] irqchip/sifive-plic: Convert PLIC driver into a
 platform driver

On Thu, Jun 20, 2024 at 6:40 PM Emil Renner Berthing
<emil.renner.berthing@...onical.com> wrote:
>
> Anup Patel wrote:
> > On Wed, Jun 19, 2024 at 11:16 PM Emil Renner Berthing
> > <emil.renner.berthing@...onical.com> wrote:
> > >
> > > Anup Patel wrote:
> > > > On Tue, Jun 18, 2024 at 7:00 PM Emil Renner Berthing
> > > > <emil.renner.berthing@...onical.com> wrote:
> > > > >
> > > > > Anup Patel wrote:
> > > > > > The PLIC driver does not require very early initialization so convert
> > > > > > it into a platform driver.
> > > > > >
> > > > > > After conversion, the PLIC driver is probed after CPUs are brought-up
> > > > > > so setup cpuhp state after context handler of all online CPUs are
> > > > > > initialized otherwise PLIC driver crashes for platforms with multiple
> > > > > > PLIC instances.
> > > > > >
> > > > > > Signed-off-by: Anup Patel <apatel@...tanamicro.com>
> > > > >
> > > > > Hi Anup,
> > > > >
> > > > > Sorry for the late reply to the mailing list, but ever since 6.9 where this was
> > > > > applied my Allwinner D1 based boards no longer boot. This is the log of my
> > > > > LicheeRV Dock booting plain 6.10-rc4, locking up and then rebooting due to the
> > > > > the watchdog timing out:
> > > > >
> > > > > https://pastebin.com/raw/nsbzgEKW
> > > > >
> > > > > On 6.10-rc4 I can bring the same board to boot by reverting this patch and all
> > > > > patches building on it. Eg.:
> > > > >
> > > > >   git revert e306a894bd51 a7fb69ffd7ce abb720579490 \
> > > > >              956521064780 a15587277a24 6c725f33d67b \
> > > > >              b68d0ff529a9 25d862e183d4 8ec99b033147
> > > >
> > > > Does your board boot with only SBI timer driver enabled ?
> > >
> > > I'm not 100% sure this is what you mean, but with this change I can disable
> > > CONFIG_SUN4I_TIMER:
> > >
> > > diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs
> > > index f51bb24bc84c..0143545348eb 100644
> > > --- a/arch/riscv/Kconfig.socs
> > > +++ b/arch/riscv/Kconfig.socs
> > > @@ -39,7 +39,6 @@ config ARCH_SUNXI
> > >         bool "Allwinner sun20i SoCs"
> > >         depends on MMU && !XIP_KERNEL
> > >         select ERRATA_THEAD
> > > -       select SUN4I_TIMER
> > >         help
> > >           This enables support for Allwinner sun20i platform hardware,
> > >           including boards based on the D1 and D1s SoCs.
> > >
> > >
> > > But unfortunately the board still doesn't boot:
> > > https://pastebin.com/raw/AwRxcfeu
> >
> > I think we should enable debug prints in DD core and see
> > which device is not getting probed due to lack of a provider.
> >
> > Just add "#define DEBUG" at the top in drivers/base/core.c
> > and boot again with "loglevel=8" kernel parameter (along with
> > the above change).
>
> With the above changes this is what I get:
> https://pastebin.com/raw/JfRrEahT

You should see prints like below which show producer consumer
relation:

[    0.214589] /soc/rtc@...000 Linked as a fwnode consumer to /soc/plic@...0000
[    0.214966] /soc/serial@...00000 Linked as a fwnode consumer to
/soc/plic@...0000
[    0.215443] /soc/virtio_mmio@...08000 Linked as a fwnode consumer
to /soc/plic@...0000
[    0.216041] /soc/virtio_mmio@...07000 Linked as a fwnode consumer
to /soc/plic@...0000
[    0.216482] /soc/virtio_mmio@...06000 Linked as a fwnode consumer
to /soc/plic@...0000
[    0.216868] /soc/virtio_mmio@...05000 Linked as a fwnode consumer
to /soc/plic@...0000
[    0.217477] /soc/virtio_mmio@...04000 Linked as a fwnode consumer
to /soc/plic@...0000
[    0.217949] /soc/virtio_mmio@...03000 Linked as a fwnode consumer
to /soc/plic@...0000
[    0.218595] /soc/virtio_mmio@...02000 Linked as a fwnode consumer
to /soc/plic@...0000
[    0.219280] /soc/virtio_mmio@...01000 Linked as a fwnode consumer
to /soc/plic@...0000
[    0.219908] /soc/plic@...0000 Linked as a fwnode consumer to
/cpus/cpu@...nterrupt-controller
[    0.220800] /soc/plic@...0000 Linked as a fwnode consumer to
/cpus/cpu@...nterrupt-controller
[    0.221323] /soc/plic@...0000 Linked as a fwnode consumer to
/cpus/cpu@...nterrupt-controller
[    0.221838] /soc/plic@...0000 Linked as a fwnode consumer to
/cpus/cpu@...nterrupt-controller
[    0.222347] /soc/clint@...0000 Linked as a fwnode consumer to
/cpus/cpu@...nterrupt-controller
[    0.222769] /soc/clint@...0000 Linked as a fwnode consumer to
/cpus/cpu@...nterrupt-controller
[    0.223864] /soc/clint@...0000 Linked as a fwnode consumer to
/cpus/cpu@...nterrupt-controller
[    0.224370] /soc/clint@...0000 Linked as a fwnode consumer to
/cpus/cpu@...nterrupt-controller
[    0.225217] /soc/pci@...00000 Linked as a fwnode consumer to
/soc/plic@...0000

To get further prints, I suggest enabling SBI_HVC console and use
"console=hvc0" as kernel parameter.

Regards,
Anup

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ