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]
Message-ID: <CALNFmy02rq76r6PJ6De1pavvAFOfUvB8XjY8Vydepcoi=G0Whw@mail.gmail.com>
Date: Thu, 12 Sep 2024 08:52:25 +0200
From: Patrick Rudolph <patrick.rudolph@...ements.com>
To: Simon Glass <sjg@...omium.org>
Cc: u-boot@...ts.denx.de, linux-kernel@...r.kernel.org, 
	Tom Rini <trini@...sulko.com>
Subject: Re: [PATCH v3 19/30] arm: gic-v3-its: Rename objects

On Thu, Sep 12, 2024 at 2:59 AM Simon Glass <sjg@...omium.org> wrote:
>
> Hi Patrick,
>
> On Wed, 11 Sept 2024 at 00:29, Patrick Rudolph
> <patrick.rudolph@...ements.com> wrote:
> >
> > The code accesses the gic-v3 node, but not the gic-v3-its node,
> > thus rename the objects to clarify which node it operates on.
> >
> > The following commit will make use of the gic-v3-its node for real.
> >
> > Signed-off-by: Patrick Rudolph <patrick.rudolph@...ements.com>
> > ---
> >  arch/arm/lib/gic-v3-its.c | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
>
> Reviewed-by: Simon Glass <sjg@...omium.org>
>
> But how many interrupt controllers are there? Would
> uclass_first_device_err(UCLASS_IRQ) work?
On most GICv2 compatible SBCs there's just one.
With GICv3+ you can have an additional GIC ITS as well, which would
also use class UCLASS_IRQ.
But on servers there even more than two...

I'd prefer the current code as it would work with the follow up commit
that adds another
UCLASS_IRQ driver.

>
> >
> > diff --git a/arch/arm/lib/gic-v3-its.c b/arch/arm/lib/gic-v3-its.c
> > index 2cc0a32f9d..22fa46a341 100644
> > --- a/arch/arm/lib/gic-v3-its.c
> > +++ b/arch/arm/lib/gic-v3-its.c
> > @@ -35,10 +35,10 @@ static int gic_v3_its_get_gic_addr(struct gic_v3_its_priv *priv)
> >         int ret;
> >
> >         ret = uclass_get_device_by_driver(UCLASS_IRQ,
> > -                                         DM_DRIVER_GET(arm_gic_v3_its), &dev);
> > +                                         DM_DRIVER_GET(arm_gic_v3), &dev);
> >         if (ret) {
> >                 pr_err("%s: failed to get %s irq device\n", __func__,
> > -                      DM_DRIVER_GET(arm_gic_v3_its)->name);
> > +                      DM_DRIVER_GET(arm_gic_v3)->name);
> >                 return ret;
> >         }
> >
> > @@ -158,13 +158,13 @@ int gic_lpi_tables_init(u64 base, u32 num_redist)
> >         return 0;
> >  }
> >
> > -static const struct udevice_id gic_v3_its_ids[] = {
> > +static const struct udevice_id gic_v3_ids[] = {
> >         { .compatible = "arm,gic-v3" },
> >         {}
> >  };
> >
> > -U_BOOT_DRIVER(arm_gic_v3_its) = {
> > +U_BOOT_DRIVER(arm_gic_v3) = {
> >         .name           = "gic-v3",
> >         .id             = UCLASS_IRQ,
> > -       .of_match       = gic_v3_its_ids,
> > +       .of_match       = gic_v3_ids,
> >  };
> > --
> > 2.46.0
> >
>
> Regards,
> Simon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ