lkml.org 
[lkml]   [2018]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RESEND PATCH v2] clocksource/arm_arch_timer: fix a lockdep warning
    On Mon, 10 Dec 2018, Peter Zijlstra wrote:
    > On Mon, Dec 10, 2018 at 08:52:28AM -0500, Qian Cai wrote:
    > > Booting this Huawei TaiShan 2280 arm64 server generated this lockdep
    > > warning.
    > >
    > > [ 0.000000] lockdep_assert_cpus_held+0x50/0x60
    > > [ 0.000000] static_key_enable_cpuslocked+0x30/0xe8
    > > [ 0.000000] arch_timer_check_ool_workaround+0x128/0x2d0
    > > [ 0.000000] arch_timer_acpi_init+0x274/0x6ac
    > > [ 0.000000] acpi_table_parse+0x1ac/0x218
    > > [ 0.000000] __acpi_probe_device_table+0x164/0x1ec
    > > [ 0.000000] timer_probe+0x1bc/0x254
    > > [ 0.000000] time_init+0x44/0x98
    > > [ 0.000000] start_kernel+0x4ec/0x7d4
    >
    > It seems to me we want something like:
    >
    > ---
    > kernel/cpu.c | 2 ++
    > 1 file changed, 2 insertions(+)
    >
    > diff --git a/kernel/cpu.c b/kernel/cpu.c
    > index 91d5c38eb7e5..e1ee8caf28b5 100644
    > --- a/kernel/cpu.c
    > +++ b/kernel/cpu.c
    > @@ -313,6 +313,8 @@ void cpus_write_unlock(void)
    >
    > void lockdep_assert_cpus_held(void)
    > {
    > + if (system_state < SYSTEM_RUNNING)
    > + return;
    > percpu_rwsem_assert_held(&cpu_hotplug_lock);
    > }

    Hmm, no. SYSTEM_SCHEDULING is what you want because RUNNING is set way too
    late.

    Thanks,

    tglx

    \
     
     \ /
      Last update: 2018-12-10 22:32    [W:2.949 / U:0.164 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site