Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2710447ybl; Mon, 19 Aug 2019 06:26:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqzsrqGZztLlLeeoKJp1pfClvX99x7jEKHS1tqTKf+hcGgJv7rMfulYk2EALiYGzvn6XAwRB X-Received: by 2002:a17:902:4401:: with SMTP id k1mr22525613pld.193.1566221198440; Mon, 19 Aug 2019 06:26:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566221198; cv=none; d=google.com; s=arc-20160816; b=h+VmkBvuPl5bRmkqrvJ+4umhNZHMby4TvwAEA4FGKqr7kRDULeCEZvsqmFISlmnmIm k+s2m0uV49maFby15j/NUOph30Bq7PmlQ/SYT8KqvXRpaqLCpoZvdD1r2ePSw97UH82M 9OyqoZnYYYqgb5JSjrhz+7rCP2NFvCI2V7lYpcJyssYkj7Xb9ISFst1cTZmU2joBYFFR P21dw9cxjuQbHAIkYgOXJ1P7VRc9MPViMezctb5jBun9XGTPD0ptLWst/Z1JdG4jDEen 97s4sY8obBRQ8HgihA9Kk8lSTt0F/9NsuBrwcjALqLrs6iO5bIF3L289wZUF9LQBf96b zflQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=4r+YZ1JTzLD8NKqp/qXzEyavInEqYBH0nVqmlpjbL/s=; b=aVT/HUbhQIaXvwmHf/DwAqqA+LA11Dh9x5sNreEB05VvXIUJ1ZHNIReQKm9KZwr6zs cf0fJOAWBwAWtPAcW1eHPClkRahJT6ywgbHdbuRVaE4j0nRfRZLv/UuH7CYNCaZQAYZT Uh6XrkUWbBwH5qr7+2hqEtJCauzQLyj+LSYsoW+o1dqAcDzxX+qWMMio1g1OU0D63w+D DCg3/XbtKQv01WkdWlsF8rPpiOKdzCv2GfeXntqJWpLnzmvboRPbvq9XDshVRNkV0R/y 2u+gxsEmeQTib8l+tFalBI1eh3hiI686q9LZhSALzneLmO0ZLNTjVploABDCCCR5YiC4 nyyA== 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 b5si10277144pfd.273.2019.08.19.06.26.23; Mon, 19 Aug 2019 06:26: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; 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 S1727895AbfHSNXs (ORCPT + 99 others); Mon, 19 Aug 2019 09:23:48 -0400 Received: from gate.crashing.org ([63.228.1.57]:38433 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727628AbfHSNXr (ORCPT ); Mon, 19 Aug 2019 09:23:47 -0400 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x7JDNEqX018624; Mon, 19 Aug 2019 08:23:14 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id x7JDND50018616; Mon, 19 Aug 2019 08:23:13 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 19 Aug 2019 08:23:13 -0500 From: Segher Boessenkool To: Christophe Leroy Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH 3/3] powerpc: use __builtin_trap() in BUG/WARN macros. Message-ID: <20190819132313.GH31406@gate.crashing.org> References: <20510ce03cc9463f1c9e743c1d93b939de501b53.1566219503.git.christophe.leroy@c-s.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20510ce03cc9463f1c9e743c1d93b939de501b53.1566219503.git.christophe.leroy@c-s.fr> User-Agent: Mutt/1.4.2.3i Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 19, 2019 at 01:06:31PM +0000, Christophe Leroy wrote: > Note that we keep using an assembly text using "twi 31, 0, 0" for > inconditional traps because GCC drops all code after > __builtin_trap() when the condition is always true at build time. As I said, it can also do this for conditional traps, if it can prove the condition is always true. Can you put the bug table asm *before* the __builtin_trap maybe? That should make it all work fine... If you somehow can tell what machine instruction is that trap, anyway. Segher