lkml.org 
[lkml]   [2023]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 03/13] cpu/hotplug, x86/acpi: Disable CPU hotplug for ACPI MADT wakeup
    Date

    > /* Physical address of the Multiprocessor Wakeup Structure mailbox */
    > @@ -74,6 +75,9 @@ int __init acpi_parse_mp_wake(union acpi_subtable_headers *header,
    >
    > acpi_mp_wake_mailbox_paddr = mp_wake->base_address;
    >
    > + /* Disable CPU onlining/offlining */
    > + cpu_hotplug_not_supported();
    > +

    Both onlining/offlining are prevented, or just offlining?

    The previous patch says:

    It does not prevent the initial bring up of the CPU, but it stops 
    subsequent offlining.

    And ...

    [...]


    > --- a/kernel/cpu.c
    > +++ b/kernel/cpu.c
    > @@ -1522,7 +1522,7 @@ static int cpu_down_maps_locked(unsigned int cpu, enum cpuhp_state target)
    > * If the platform does not support hotplug, report it explicitly to
    > * differentiate it from a transient offlining failure.
    > */
    > - if (cc_platform_has(CC_ATTR_HOTPLUG_DISABLED) || !cpu_hotplug_supported)
    > + if (!cpu_hotplug_supported)
    > return -EOPNOTSUPP;
    > if (cpu_hotplug_disabled)
    > return -EBUSY;

    ... here cpu_down_maps_locked() only prevents offlining if I am reading
    correctly.

    Also, can we rename cpu_hotplug_supported to cpu_offline_supported to match the
    behaviour better?

    Anyway, isn't it a little bit odd to have:

    if (!cpu_hotplug_supported)
    return -EOPNOTSUPP;
    if (cpu_hotplug_disabled)
    return -EBUSY;

    ?
    \
     
     \ /
      Last update: 2023-10-10 12:25    [W:2.250 / U:0.216 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site