Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1164587ybg; Thu, 4 Jun 2020 02:44:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3Q0TcsmmxffDy4pZo/RM+Dr/M44TM1uphkfWnsr/tOiuYqVfAWhWRg2exh/UD2kZZ2t/T X-Received: by 2002:a17:906:851:: with SMTP id f17mr2980694ejd.396.1591263852287; Thu, 04 Jun 2020 02:44:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591263852; cv=none; d=google.com; s=arc-20160816; b=V90O+byhPHawX2oHlSdDeArztBOe/WZ/P6NEjloeNxJhoJFmqK/39De4KskJH2gWYo AFSzIRWu7792HtY1Qh0M8ey/ZGfzJ5G55K08JV7mPFF1qx/xAesLvaWt3lzjlWPBztHU Iv5++oY81nWCVpks/O9VSnADtSYP3rsz0tW7vptlR3U/ReuRqRF/SKOrkbC0YmwfJxN6 y6vN0WtyrUzhlvIjaMltZkxw1GgifTa9T0EvDgv1nqhusjGYUchR5zOUTb2S6qT2zNzk DVuXFANZO5vmDQ+W9EjCyzTpi595FlilVZTaYIvBNZzW01KqwCy4T+t/kKCziqO8Fekq 2UuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=JF8XdVk3zohSbbxC+mMX8rKD/mYizjPEnmJVr63Fjv8=; b=Jg4WLXIPbz1c5lNdAmGLoj5ewRgvxAbv4v1yGXhik6O45dChPDyW+vGUiF5m6kbJqQ fPAV40yAGfVTu5yDeV/57RfTpeU1XELqoKiasENJy1p8rhwrAKTtm7s0Op1qGUrmJ3wX jcJiFsjEMpTiTCZu7CcJx4KAb5Zs93eUzexfIaU5Ik/YGFm7tYsoOBN1ko3BWprrpPz6 aVPMtcHV6zJXQ7GDksmMgeSA9yxHqvNGvSxd6FW6GlbO3cseFdA5tWTDG/cT1iyWiFHq 8/W9jBIaVR35A9OH5BQsk2Xz6JHI4vY/t9RFCa14vI8+Rgs7dPBYAXTrXv5x00nw6FJ7 nZlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=C4SWVhgk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g15si1181662ejx.146.2020.06.04.02.43.48; Thu, 04 Jun 2020 02:44:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=C4SWVhgk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727993AbgFDJlv (ORCPT + 99 others); Thu, 4 Jun 2020 05:41:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:47768 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726248AbgFDJlv (ORCPT ); Thu, 4 Jun 2020 05:41:51 -0400 Received: from kernel.org (unknown [87.71.78.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F3FDC206C3; Thu, 4 Jun 2020 09:41:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591263710; bh=1Q3d66uzBYSZVsxgnp/NnELnCNnx2g8D9fS4fWf1tZU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=C4SWVhgke8okNdSNThzzm+pvB0BBxC+L9XfiRpfWwdENE32NTRySuxE9r/7AGBN52 VQ5bSYln8QHw7vVdtvRzDfqt4APeQDd4kA7Xe8CNmHjvD48410i6h4eSQt1s7mqDXL qqxMB94j2dQ/XCuBIdXsQpiPRrpdWdkx5G8lu2ug= Date: Thu, 4 Jun 2020 12:41:33 +0300 From: Mike Rapoport To: Guenter Roeck Cc: Ira Weiny , Andrew Morton , linux-kernel@vger.kernel.org, Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Benjamin Herrenschmidt , Paul Mackerras , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Chris Zankel , Max Filippov , Dan Williams , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org, dri-devel@lists.freedesktop.org, Christian Koenig , Al Viro , Christoph Hellwig Subject: Re: [PATCH] arch/{mips,sparc,microblaze,powerpc}: Don't enable pagefault/preempt twice Message-ID: <20200604094133.GC202650@kernel.org> References: <20200518184843.3029640-1-ira.weiny@intel.com> <20200519165422.GA5838@roeck-us.net> <20200519184031.GB3356843@iweiny-DESK2.sc.intel.com> <20200519194215.GA71941@roeck-us.net> <20200520051315.GA3660833@iweiny-DESK2.sc.intel.com> <20200521174250.GB176262@iweiny-DESK2.sc.intel.com> <20200603135736.e7b5ded0082a81ae6d9067a0@linux-foundation.org> <20200603211416.GA1740285@iweiny-DESK2.sc.intel.com> <3538c8ad-674e-d310-d870-4ef6888092ed@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3538c8ad-674e-d310-d870-4ef6888092ed@roeck-us.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 03, 2020 at 04:44:17PM -0700, Guenter Roeck wrote: > > sparc32 smp images in next-20200603 still crash for me with a spinlock > recursion. s390 images hang early in boot. Several others (alpha, arm64, > various ppc) don't even compile. I can run some more bisects over time, > but this is becoming a full-time job :-(. I've been able to bisect s390 hang to commit b614345f52bc ("x86/entry: Clarify irq_{enter,exit}_rcu()"). After this commit, lockdep_hardirq_exit() is called twice on s390 (and others) - one time in irq_exit_rcu() and another one in irq_exit(): /** * irq_exit_rcu() - Exit an interrupt context without updating RCU * * Also processes softirqs if needed and possible. */ void irq_exit_rcu(void) { __irq_exit_rcu(); /* must be last! */ lockdep_hardirq_exit(); } /** * irq_exit - Exit an interrupt context, update RCU and lockdep * * Also processes softirqs if needed and possible. */ void irq_exit(void) { irq_exit_rcu(); rcu_irq_exit(); /* must be last! */ lockdep_hardirq_exit(); } Removing the call in irq_exit() make s390 boot again, and judgung by the x86 entry code, the comment /* must be last! */ is stale... @Peter, @Thomas, can you comment please? From e51d50ee6f4d1f446decf91c2c67230da14ff82c Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Thu, 4 Jun 2020 12:37:03 +0300 Subject: [PATCH] softirq: don't call lockdep_hardirq_exit() twice After commit b614345f52bc ("x86/entry: Clarify irq_{enter,exit}_rcu()") lockdep_hardirq_exit() is called twice on every architecture that uses irq_exit(): one time in irq_exit_rcu() and another one in irq_exit(). Remove the extra call in irq_exit(). Signed-off-by: Mike Rapoport --- kernel/softirq.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/kernel/softirq.c b/kernel/softirq.c index a3eb6eba8c41..7523f4ce4c1d 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -427,7 +427,6 @@ static inline void __irq_exit_rcu(void) void irq_exit_rcu(void) { __irq_exit_rcu(); - /* must be last! */ lockdep_hardirq_exit(); } @@ -440,8 +439,6 @@ void irq_exit(void) { irq_exit_rcu(); rcu_irq_exit(); - /* must be last! */ - lockdep_hardirq_exit(); } /* -- 2.26.2 > Guenter -- Sincerely yours, Mike.