Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5536974imu; Sat, 1 Dec 2018 20:18:13 -0800 (PST) X-Google-Smtp-Source: AFSGD/UbjTHdlSLGItLNi1rrZL9c3VWurDZPzTUGcpqhWPq4CY9Mgyg4bwiJp757Hhkwwrf908Y4 X-Received: by 2002:a63:f444:: with SMTP id p4mr9370309pgk.124.1543724293802; Sat, 01 Dec 2018 20:18:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543724293; cv=none; d=google.com; s=arc-20160816; b=FUs4U/JJfiqXNMJQhMXboPPzTTqwcR8toJkgtMCR4Xcko+PRkFcHnfYRiAyR5R7Z1/ y15Af1nTyQMEWOQJ6+fzHl3Slpr6rnkEyAlg1ws6CJUYZ8GuEGdNNd2RgOA1MtXUHs/o akfRrHXMWPfzlvYxnaeTO6defdeQXfTwSyWcDB1KL1C77i8BapdlZJu3rLI+Jtsi2wU/ b32YEM8ZFs3O+W0M5eVzLdKbhrQywZLX4tXEgEH06M5tnG3nWydHJLua6Pd9ZW5WP2RY ar1D0L9y9LSNtHGeYGEfAc2EUynMiw0eWnrGER6AryxKmQGhg5xBrkFmf3LhWtyN6Xpy s7jw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=AN/5h9/a6haLsDf7VFP9eulN1yOJxiXcxhW0eTBex04=; b=Zyqzht0ygBCQWGuoQYkKSELvIBOsHjrgrIqJv9r4YlsG/tf0CagBPEzQ+ysr2kJbjj Rjj1UBaGT2qukAOOx/cIn2rBWFQn3Z+axxEAKC9HlenCn24KRj+6wXVAzjsAJyMlP3zn bdIRmKyqXAmg08l7H4OnS902QRG34Wm41uARVzT+YSM+gKttmNjH9nGV4PUPDNfvYwtB ExheF6KZmsdgBQwQvTTnBKBSxR67lQY3RDykyHFr/+7Z2DQsY1HnoCO72VDbFYj+jag8 h9Bzo2DUSxdu4vFhLjyYfyeHbk6z19/sgP6gN6OXWrD0EE3ANf74NCcBB0ljcDPqfG8E V8SQ== 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 n78si10340968pfi.235.2018.12.01.20.17.59; Sat, 01 Dec 2018 20:18:13 -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 S1725767AbeLBEQU (ORCPT + 99 others); Sat, 1 Dec 2018 23:16:20 -0500 Received: from mout.gmx.net ([212.227.17.22]:37065 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725294AbeLBEQT (ORCPT ); Sat, 1 Dec 2018 23:16:19 -0500 Received: from ovpn-120-135.rdu2.redhat.com ([98.118.28.103]) by mail.gmx.com (mrgmx101 [212.227.17.174]) with ESMTPSA (Nemesis) id 0MLj5z-1gSUEE0KFH-000wih; Sun, 02 Dec 2018 05:16:09 +0100 Subject: Re: WARNING: CPU: 0 PID: 0 at drivers/irqchip/irq-gic-v3-its.c To: Marc Zyngier Cc: Sudeep Holla , open list , Thomas Gleixner , Ard Biesheuvel , Jason Cooper 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> <86lg5yelkx.wl-marc.zyngier@arm.com> From: Qian Cai Message-ID: <462ce651-4c10-9b76-3f51-6915f38b5158@gmx.us> Date: Sat, 1 Dec 2018 23:16:07 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.3.2 MIME-Version: 1.0 In-Reply-To: <86lg5yelkx.wl-marc.zyngier@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:vmNp4kL/5pd6CYs34lCPFbZ2LAKtXyU0qDHT59H0wylkRefTdDX XPXT6fKSTe/sKFQtA9wl5d2SoqsIm6P7Ah58uy5WWwDLSkvO0a8iIGmr6itUNil4Kg6eDIX ddgKgoazMTMoavq+FcGxZvNzyGzvRyr6/xHHOrTio4Qmvq5kj26jYmUWOmmdb3ijIPTXKZF d8cR4fuRkCBCNyCRa9elA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:hv52HW69+DE=:Sn1p+X/Y/9ymZ+7328Y2Sx IGFaUlCuS0CPwHxI4XOxMFEPJp2iLx7AMe54wnQTRIGYy1OQx2kvdRgpC6+PZWyNyRdq8sWXW deOGAhjNmvyMsC56avJaINibT1rWAvqfk4wGXq0pSZiQJfrc6AWffWG6lZewgeb1cyyOZe/Q8 XSq8pJzcMEivH0Vhm5vCTqmIvHQTGKJLErvp0jxAj4+kEoxqlTCL/mm+P4pWkCmhe1bINpNpN 62lBLs3avZIjA3+9xVDth0m5jQHAOffheTeXb0tON4gKk0UegnCbygkfvpsg9S0uxRYgY0Ncp JVsRvvXQRemSjNpyd1r1WMUrHLOCTEU89e9tUXsffGJu2sF1W0gswDQRmLOnciXZKohPRJAdH vP7SydMh/iKnr5844sXz65HanelHVZkwAFSb10HxBQNKT/yn0kTAPZbPW5183T82gd+4CMnfW O7np9iOPfwVHjJ2MTSJKB+ZbyOdi9Whq6qN/X3MhHTQ7xeJuNEMyXhCwWtE8deM/aXGzsuYHZ XjwnGlrEb7hj3u8UlCo+rH+e/fCdjcLQPktFDqVfrHh8pYjx04VYCYBT254mR/kDKK9M3bgw5 RShPo1J23y7Ghj7PLHqRi+gsyS4oCEBLHFJS9rmI1kHXJjTh3W8cuPz9UlmEuidd/4mEyjWex 4SXOZkQIdG+t0n05VNQdpW7RuIbaNpxjVbOZHUz9SjFORc/PqetNll/gXFck+bQAJJc/2PDqK 10iUHlmtNgRfFOUNJVgSzONmVU+3P1ivGGdJCWkynl2uieAQW/aJeS3urqa3Kme80aBRDV4rS ZfVjFPvhhzAS9nHCvbZTpkmeMIYoffHFXtCTtCUSL7OqGi7CuFJlk8UwM59pIf+SN7FSyACF0 oin/TgXFPlC0261eJ/q8Nropk8+yHrBVBRUAn+2hIjFekA9X4/TfQzhYQt1ToA Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/12/18 3:39 AM, Marc Zyngier wrote: > 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. > Marc, did you have a chance to investigate this further? I have still seen it in the latest mainline today. This is the only warning left on this Huawei TaiShan 2280 server now after confirmed that those GICv3 warnings were gone.