Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3821134imu; Mon, 12 Nov 2018 00:41:51 -0800 (PST) X-Google-Smtp-Source: AJdET5co0GP4tlXP0YiNiLM/tpXZ9QGMGQsbwV98KW0DzjLA+72/Z7hX2yI27lcT/hFowO+Oka+0 X-Received: by 2002:a63:88c7:: with SMTP id l190mr70948pgd.110.1542012111437; Mon, 12 Nov 2018 00:41:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542012111; cv=none; d=google.com; s=arc-20160816; b=Xug40R5BQFfF1wVLMJtysbnHiwTRrBLW+xj3H7cR3VvNWTkLfH8h1dqoXg2r0sIQ5R o8wx4910Ex9QkJVZAf+mr12ikTUdyEi/aulEk0VUWt3BNn+S/wk9Qv0GCJA4wbhZRxP6 HeRVHcY0yVfjmnL9W/YybJTkMBkLlxsd0gtHkPxGw7Lz1DIEYY3Ql5smNlvkBkImJC8H 0e3PIiZHqBdpXClnW6DhvNtbda/egIDYqkqqDqA6PJt83pa0Jldsp5yf0OltrOmLXSCt xS2wObPyToapgiAWtse+/kzVHqTbf5az4zUU87BKZtxzLExL+SYyXPYs5VNih3u/i41o GbQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:user-agent:references:in-reply-to:subject:cc:to:from :message-id:date; bh=hoAFYHwtp9aPb71SU3Dd+24Yn4dDGN7jdGAGg0Q5LEg=; b=Sdzyq0JtpdVcydJ0fTuyOgFEHalqJbnmzUu4nDI7bJ37+WvhIvOw0d/PyhbwLNIGi6 saU/SCXTM/9kWCgFnSMSdQAfP2CaEkFQCz7dNEObDQO968IMi6boRvqt+U2GARcdQsng YGUM5BQaPbmYXdckFDBZvqQr3nNDcCkkeG1kM+7H+VckzrwZhmyPZAVVS6tGQ7rtwOCf qQihGOgRKZzyOKPS5bbE9lalMVyJXocbPwJDxMIcsgRTbrs9qjA2gaM2r2XblI/N6Jc9 X+SXWrd5bmI3+ktkD2dDDbKQRfcg8yr5C+yukki9kle2CEZrXbS/XymC/BWNsMeoIK7Z lwYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u28-v6si16895843pfi.175.2018.11.12.00.41.35; Mon, 12 Nov 2018 00:41:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728638AbeKLSbl convert rfc822-to-8bit (ORCPT + 99 others); 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.