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] [thread-next>] [day] [month] [year] [list]
Date: Fri, 2 Feb 2024 11:33:05 +0100
From: Clément Léger <cleger@...osinc.com>
To: Anup Patel <apatel@...tanamicro.com>
Cc: 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>,
 devicetree@...r.kernel.org, Saravana Kannan <saravanak@...gle.com>,
 Marc Zyngier <maz@...nel.org>, Anup Patel <anup@...infault.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 v12 22/25] irqchip: Add RISC-V advanced PLIC driver for
 direct-mode



On 02/02/2024 11:30, Anup Patel wrote:
>>> +int aplic_setup_priv(struct aplic_priv *priv, struct device *dev,
>>> +                  void __iomem *regs)
>>> +{
>>> +     struct of_phandle_args parent;
>>> +     int rc;
>>> +
>>> +     /*
>>> +      * Currently, only OF fwnode is supported so extend this
>>> +      * function for ACPI support.
>>> +      */
>>> +     if (!is_of_node(dev->fwnode))
>>> +             return -EINVAL;
>>> +
>>> +     /* Save device pointer and register base */
>>> +     priv->dev = dev;
>>> +     priv->regs = regs;
>>> +
>>> +     /* Find out number of interrupt sources */
>>> +     rc = of_property_read_u32(to_of_node(dev->fwnode),
>>> +                                          "riscv,num-sources",
>>> +                                          &priv->nr_irqs);
>>
>> Use device_property_read_u32() which works for both ACPI and OF.
> 
> In the previous versions, we did try to unify property reading for
> both ACPI and OF but MarcZ suggested to keep th ACPI and
> OF probe paths totally separate hence we use OF APIs over
> here because we should reach here only for OF probing.

Ok, indeed it makes sense. Discard that comment then !

Thanks,

Clément

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ