From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC57BC43441 for ; Mon, 12 Nov 2018 08:39:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7CB332175B for ; Mon, 12 Nov 2018 08:39:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7CB332175B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728698AbeKLSbl convert rfc822-to-8bit (ORCPT ); Mon, 12 Nov 2018 13:31:41 -0500 Received: from foss.arm.com ([217.140.101.70]:60020 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726207AbeKLSbk (ORCPT ); Mon, 12 Nov 2018 13:31:40 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 48CBD80D; Mon, 12 Nov 2018 00:39:31 -0800 (PST) Received: from big-swifty.misterjones.org (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 951473F5A0; Mon, 12 Nov 2018 00:39:29 -0800 (PST) Date: Mon, 12 Nov 2018 08:39:26 +0000 Message-ID: <86lg5yelkx.wl-marc.zyngier@arm.com> From: Marc Zyngier To: Qian Cai Cc: Sudeep Holla , open list , Thomas Gleixner , Ard Biesheuvel , Jason Cooper Subject: Re: WARNING: CPU: 0 PID: 0 at drivers/irqchip/irq-gic-v3-its.c In-Reply-To: <960D7493-0D43-40A3-9441-CF7F0D76A534@gmx.us> References: <1541710771.12945.7.camel@gmx.us> <13A11479-97FB-4EFD-A182-61DA63CB64D6@gmx.us> <930d61db-6e44-8501-983d-09cd3759d153@arm.com> <0e926f4b-1148-289b-39a1-ef76baa8cf9d@arm.com> <960D7493-0D43-40A3-9441-CF7F0D76A534@gmx.us> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: ARM Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 09 Nov 2018 18:41:03 +0000, Qian Cai wrote: > > > > > On Nov 9, 2018, at 12:41 PM, Marc Zyngier wrote: > > > > On 09/11/18 17:28, Sudeep Holla wrote: > >> On Fri, Nov 9, 2018 at 4:10 PM Marc Zyngier wrote: > >>> > >> [...] > >> > >>> > >>> See bb42ca474010 and d003d029cea8 for details. > >>> > >>> Now, activating this workaround leads to lockdep being really angry, > >>> most likely because the cpus_read_lock is not taken, which is a change > >>> in behaviour... > >>> > >>> I'm trying to dig into this now. > >>> > >> > >> Yes we found similar issue in kernel/sched/core.c sched_init_smp > >> There's a fix with detailed description in -next > >> (Commit 40fa3780bac2 ("sched/core: Take the hotplug lock in sched_init_smp()") > >> > >> The behaviour changed since commit cb538267ea1e ("jump_label/lockdep: > >> Assert we hold the hotplug lock for _cpuslocked() operations") > > > > I indeed came to the same conclusion, but the fix is slightly less than > > obvious. I have the following arm64-specific crap, but it is pretty > > terrible: > > > > diff --git a/arch/arm64/kernel/time.c b/arch/arm64/kernel/time.c > > index f258636273c9..9e96e9eaca9b 100644 > > --- a/arch/arm64/kernel/time.c > > +++ b/arch/arm64/kernel/time.c > > @@ -36,6 +36,7 @@ > > #include > > #include > > #include > > +#include > > > > #include > > > > @@ -69,7 +70,9 @@ void __init time_init(void) > > u32 arch_timer_rate; > > > > of_clk_init(NULL); > > + cpus_read_lock(); > > timer_probe(); > > + cpus_read_unlock(); > > > > tick_setup_hrtimer_broadcast(); > > > > Qian, can you please let me know if this helps? If it does, we'll have > > to think of something a bit better… > After applied the above patch, the original warning is gone but there > Is now a new warning. [...] Which was ful;ly expected, given that I've taken the cpu lock at some semi-random location. I'll try to talk to PeterZ this week to try and solve this. Thanks, M. -- Jazz is not dead, it just smell funny.