lkml.org 
[lkml]   [2023]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH v2 30/35] irqchip/gic-v3: Add support for ACPI's disabled but 'online capable' CPUs
From


On 9/14/23 18:10, Russell King (Oracle) wrote:
> On Wed, Sep 13, 2023 at 04:38:18PM +0000, James Morse wrote:
>> static inline bool acpi_gicc_is_usable(struct acpi_madt_generic_interrupt *gicc)
>> {
>> - return (gicc->flags & ACPI_MADT_ENABLED);
>> + return ((gicc->flags & ACPI_MADT_ENABLED ||
>> + gicc->flags & ACPI_MADT_GICC_CPU_CAPABLE));
>
> ... and this starts getting silly with the number of parens.
>
> return gicc->flags & ACPI_MADT_ENABLED ||
> gicc->flags & ACPI_MADT_GICC_CPU_CAPABLE;
>
> is entirely sufficient. Also:
>
> return gicc->flags & (ACPI_MADT_ENABLED | ACPI_MADT_GICC_CPU_CAPABLE);
>
> also works.
>

vote for the second one, which is: gicc->flags & (ACPI_MADT_ENABLED | ACPI_MADT_GICC_CPU_CAPABLE)

Thanks,
Gavin

\
 
 \ /
  Last update: 2023-09-19 10:57    [W:0.846 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site