Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3801431ybi; Mon, 29 Jul 2019 12:54:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqz1uvi1W5xTTZ4m3ymMmUhevT6tlXPHBNhKliokohGD21B75zpYEtnQG4tkPuV9I+dNsmEk X-Received: by 2002:a62:2b81:: with SMTP id r123mr36994401pfr.108.1564430078553; Mon, 29 Jul 2019 12:54:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564430078; cv=none; d=google.com; s=arc-20160816; b=IHC+IwFTseRjYqnqeWc2ODxHPjjpTBqkW9AZcNdTYKEMPJi5X88DZKbyYnizyKzqR9 q4SnwuXMYGdLmvAIJ7OG94bWoeDuHTjdlgj5sshIzPITF4wwpAf7mS4+EE+lDjietrLy GE11tevk5grgzkzxHCmu3MpnLMTlAbeylzc/NSSnKVoUURDfCxX0RLXl3wvX3+P9HJXH +BRRlxvNJJdrSreNEyWTz8BbCmneWveBSMlObvd1HaOLQTP5NjCBdDbjne7B+dQnE+uV TdBRqtbixhnTE6Tvl9E9p1ikzehB42TpgOqpHhcwB9S9N87nxeYG2i/YcGq5UJhjxi6N Z69A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Fepz5zk2U64q597WTVdJDOLLCmM2kxjjP1QP8KuwHng=; b=FGV6xwyG+Nccms9RmHccUbmv2nnnTOY6Clcj7xirL7evwwl74b1eZnDNv5p7Ruug7d nbOK/M6nMeAX9hNeAFn+RMLI69c7je+80OCmdx2PemPloT1GfY2mcP13o9XB2aDp3Qgr hWJOIfQhUGVWdzHJ0EQtsLnYk/dekE9JFHfNrU2zFcTwlgc1Syd3AnPLjKWzW5h+MICt gKiybSh4hqaF7Xj58ll3plK/lgehAIZW1HHphAUjr7Vf0Ld6RpB1P0CxcZLxHDPlxbDD B3YTy7Crt5xE7PIY74OTsL/5D7VRIA0FUUONEEI/KW4x6DPRDRY4w9cuZ7W9tR7y5K4V L8Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VUAq4nZa; 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 j5si27531966pjf.60.2019.07.29.12.54.23; Mon, 29 Jul 2019 12:54:38 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=VUAq4nZa; 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 S2390594AbfG2TwA (ORCPT + 99 others); Mon, 29 Jul 2019 15:52:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:43640 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403902AbfG2Tv5 (ORCPT ); Mon, 29 Jul 2019 15:51:57 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 0AC9C21655; Mon, 29 Jul 2019 19:51:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429916; bh=D3Un3YhUUOKploS/ndUKvUAHVmkDxg0BX7hk5R9sXrk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VUAq4nZa5NZe2YmNRAp2T4NgvXqZ5fAguAaU9ZbOqF7s5D256sUs6nDyBq4ZB2koE N6qx5CtwoTD+4fiI2f8zxVhNdBAVb3bgiVI002qjvrx3JtDzMk4x1/Zc647QINm0XF AFdghZXTXyW2k3e0zFOAJNOg7WkDD2dv7sG6SUSs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Ellerman , Sasha Levin Subject: [PATCH 5.2 137/215] powerpc/irq: Dont WARN continuously in arch_local_irq_restore() Date: Mon, 29 Jul 2019 21:22:13 +0200 Message-Id: <20190729190803.318867604@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190739.971253303@linuxfoundation.org> References: <20190729190739.971253303@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 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 [ Upstream commit 0fc12c022ad25532b66bf6f6c818ee1c1d63e702 ] When CONFIG_PPC_IRQ_SOFT_MASK_DEBUG is enabled (uncommon), we have a series of WARN_ON's in arch_local_irq_restore(). These are "should never happen" conditions, but if they do happen they can flood the console and render the system unusable. So switch them to WARN_ON_ONCE(). Fixes: e2b36d591720 ("powerpc/64: Don't trace code that runs with the soft irq mask unreconciled") Fixes: 9b81c0211c24 ("powerpc/64s: make PACA_IRQ_HARD_DIS track MSR[EE] closely") Fixes: 7c0482e3d055 ("powerpc/irq: Fix another case of lazy IRQ state getting out of sync") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190708061046.7075-1-mpe@ellerman.id.au Signed-off-by: Sasha Levin --- arch/powerpc/kernel/irq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index bc68c53af67c..5645bc9cbc09 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c @@ -255,7 +255,7 @@ notrace void arch_local_irq_restore(unsigned long mask) irq_happened = get_irq_happened(); if (!irq_happened) { #ifdef CONFIG_PPC_IRQ_SOFT_MASK_DEBUG - WARN_ON(!(mfmsr() & MSR_EE)); + WARN_ON_ONCE(!(mfmsr() & MSR_EE)); #endif return; } @@ -268,7 +268,7 @@ notrace void arch_local_irq_restore(unsigned long mask) */ if (!(irq_happened & PACA_IRQ_HARD_DIS)) { #ifdef CONFIG_PPC_IRQ_SOFT_MASK_DEBUG - WARN_ON(!(mfmsr() & MSR_EE)); + WARN_ON_ONCE(!(mfmsr() & MSR_EE)); #endif __hard_irq_disable(); #ifdef CONFIG_PPC_IRQ_SOFT_MASK_DEBUG @@ -279,7 +279,7 @@ notrace void arch_local_irq_restore(unsigned long mask) * warn if we are wrong. Only do that when IRQ tracing * is enabled as mfmsr() can be costly. */ - if (WARN_ON(mfmsr() & MSR_EE)) + if (WARN_ON_ONCE(mfmsr() & MSR_EE)) __hard_irq_disable(); #endif } -- 2.20.1