Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2689228ybl; Mon, 19 Aug 2019 06:09:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqzM2hbLMc9CZpmkN9fmELmofi+0Q0/cnOf/e7XxNRRi6GyFmkOQmSTJQQQMOooi7PnXJ6Cf X-Received: by 2002:a17:90a:aa98:: with SMTP id l24mr20388263pjq.64.1566220148285; Mon, 19 Aug 2019 06:09:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566220148; cv=none; d=google.com; s=arc-20160816; b=P1s/KAXH6td11L86nsWMjzUaEJEDshNjg/2OHennRLoz/oOPlPR3NG/LWmk43vNfOZ jfPr7Nzt1HG6J2vXcP1SXi2hcX/2KWKfh8HKQfmiFtNb6Mwi57mMiXqCnUWg/Xu0NlFf BWdkuh8WoNr55Nl3cFggKtY3wfqDX6YB25pzF7gVUnQN/ZTuhgxseILqg9V3FKx9iXLb Rr52jQqafnIDxw3uLL9IB1aLMyl/wyUnx/qzAY2D863c6BPSNaBHNgUnGdJfQg688D7V Vha6YDNNgyCB6C3QjNkNiEtgYwAw49nQk4uqOFNMbGfqtnnrvaDWT0mk2jO4ZATNlX8q kBnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:message-id :dkim-signature; bh=WQuwx7YlnB93+CPuHKoWP9rgc1cSC0MKUZb/xbdrYeg=; b=NNVWzWUz+5VwRlfxMIIK5HKFBmbZS4aJzu2RimKgAFTQaeYR3qYsf4rmzOwGYpAE+D G8YKeA0r2/MZsyhWgRtQ8l90orCxCzDQe/knJc4ajR3G9ViXbRh12vG1DzWMHxMgnA44 a690SsdUli2aOBkhiUbK0Nca+ZO5pf5z5FRVTXY6MI9cOY6V8c4/W5DtA1n54FD9vpL/ u9hcsCCJgmcbvo6jCVjq3gp97LfocsQEr+PsxDmKD9kcd9JQ5dZRiIsZRV34NLB0Zts0 HTMDxYnZN/NFSk/FbUQ6tj4QqcJPYopqM3qd9grOteTeAPVaesbWka51W19dkprNmV5m 7PZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=YW6lay7c; 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 d1si6380024pjv.53.2019.08.19.06.08.49; Mon, 19 Aug 2019 06:09:08 -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=@c-s.fr header.s=mail header.b=YW6lay7c; 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 S1727584AbfHSNGb (ORCPT + 99 others); Mon, 19 Aug 2019 09:06:31 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:36145 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727172AbfHSNGa (ORCPT ); Mon, 19 Aug 2019 09:06:30 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 46BvM41JzHz9v0nT; Mon, 19 Aug 2019 15:06:24 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=YW6lay7c; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id CBp78g9ItGyf; Mon, 19 Aug 2019 15:06:24 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 46BvM402DHz9v0nR; Mon, 19 Aug 2019 15:06:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1566219984; bh=WQuwx7YlnB93+CPuHKoWP9rgc1cSC0MKUZb/xbdrYeg=; h=From:Subject:To:Cc:Date:From; b=YW6lay7cttRTenTWMU/GDgf3hMaryTq2zo/YiEUrnqPyr5hcZmzHB5PYNOCKPM03T UqoDRjWE9SK7iV+efC1jRVQ/wa3Xs9X10hVnTwuUkoy3efzCsI4mlkPXTqNlYTTTz+ yCUpJLcq5SPhNrD0P3Gcb8V53LOxAju++4g0P0vQ= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 5CD168B7B7; Mon, 19 Aug 2019 15:06:29 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id sBAC9x2uK6nf; Mon, 19 Aug 2019 15:06:29 +0200 (CEST) Received: from pc17473vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.230.101]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 3D1328B7B6; Mon, 19 Aug 2019 15:06:29 +0200 (CEST) Received: by pc17473vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 125006B708; Mon, 19 Aug 2019 13:06:28 +0000 (UTC) Message-Id: From: Christophe Leroy Subject: [PATCH 1/3] powerpc: don't use __WARN() for WARN_ON() To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , segher@kernel.crashing.org, Drew Davenport , Kees Cook , Andrew Morton Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Mon, 19 Aug 2019 13:06:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org __WARN() used to just call __WARN_TAINT(TAINT_WARN) But a call to printk() has been added in the commit identified below to print a "---- cut here ----" line. This change only applies to warnings using __WARN(), which means WARN_ON() where the condition is constant at compile time. For WARN_ON() with a non constant condition, the additional line is not printed. In addition, adding a call to printk() forces GCC to add a stack frame and save volatile registers. Powerpc has been using traps to implement warnings in order to avoid that. So, call __WARN_TAINT(TAINT_WARN) directly instead of using __WARN() in order to restore the previous behaviour. If one day powerpc wants the decorative "---- cut here ----" line, it has to be done in the trap handler, not in the WARN_ON() macro. Fixes: 6b15f678fb7d ("include/asm-generic/bug.h: fix "cut here" for WARN_ON for __WARN_TAINT architectures") Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/bug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/bug.h b/arch/powerpc/include/asm/bug.h index fed7e6241349..3928fdaebb71 100644 --- a/arch/powerpc/include/asm/bug.h +++ b/arch/powerpc/include/asm/bug.h @@ -99,7 +99,7 @@ int __ret_warn_on = !!(x); \ if (__builtin_constant_p(__ret_warn_on)) { \ if (__ret_warn_on) \ - __WARN(); \ + __WARN_TAINT(TAINT_WARN); \ } else { \ __asm__ __volatile__( \ "1: "PPC_TLNEI" %4,0\n" \ -- 2.13.3