Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp476242pxb; Wed, 18 Aug 2021 06:47:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJIqVN+WUZqhDq/VH1wDqpb5WWb4HX6xPveSWkF55jWTMoO+usLQkpZMxo56yWZJaUZ14K X-Received: by 2002:a50:e789:: with SMTP id b9mr10214362edn.101.1629294476841; Wed, 18 Aug 2021 06:47:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629294476; cv=none; d=google.com; s=arc-20160816; b=It8mU6V0Y1Oi2Q2Bkzkl4AEcCasNXldDzSqNRy7nV0yc1mxBKGxXJZDCBXJstywWUr o9EN41FjVshSY2aLd9X1zcUYMI3k1MDjpM09QqB2EKuT5QULnaXj/27PCIUFBnL6l0Rr Oj83cG+l3JH8mYTykZvnf31ABs/XVOhgqfZzAN89O1pBz0ORbkMro9sm/dQ6zvDPOl8d aAzwWgyl6eRwwpt4ah0OvWRVDySFVoW8FcV4yopZ4ONznTRWu4bVCk6mkggQT2S9lOC9 F0Z9U8kDhoWlcrmUZlQvRHymwlCSS/dj3WfBxgnxjKGOvIlGgWtMuF72JlN5om5vDu4w /4ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :message-id:subject:references:in-reply-to:cc:to:from; bh=ebbwYwfd6NxiRCNTUxMRRP+KNv6AHw2b2XjdngrKAv4=; b=skk5fXNJ2ZqHkxW1rb1O5ntiHGMQiUzPRCpBC0oYfXdFWezhzHM9kjH6UBPcq238A2 JIxn43kLATCgUqV0sewtr+rTK2efmhMu3agVy3iaXhcEhScgwZRyWrisaUElxlhBxZyi dFyJdL/Mbjo6MCvCiKNNmq29+y+ERk+Y4qCeg7yf87jF8gJlIZCCwEpHlNoO7eOxgZdp gf74RNuiJ4VS7vHrbdkcwL479i2Xz5yfaybFtwPMYtDb6FbBYD+YR8yLybDKt7rS/Ycu 6JRoV/Pg1+P/k8KWxY4zBIDt1aF1pIu0q3zSOHk23OoYfaq4EC0gmM8vOAzJS+xaxzFR BvzQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z7si5784612edq.54.2021.08.18.06.47.33; Wed, 18 Aug 2021 06:47:56 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237811AbhHRNqn (ORCPT + 99 others); Wed, 18 Aug 2021 09:46:43 -0400 Received: from ozlabs.org ([203.11.71.1]:53209 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237104AbhHRNqd (ORCPT ); Wed, 18 Aug 2021 09:46:33 -0400 Received: by ozlabs.org (Postfix, from userid 1034) id 4GqTgm5LQJz9sX3; Wed, 18 Aug 2021 23:45:56 +1000 (AEST) From: Michael Ellerman To: Christophe Leroy , Benjamin Herrenschmidt , Michael Ellerman , Paul Mackerras Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org In-Reply-To: References: Subject: Re: [PATCH v2 1/2] powerpc/bug: Remove specific powerpc BUG_ON() and WARN_ON() on PPC32 Message-Id: <162929393381.3619265.1023243092279572637.b4-ty@ellerman.id.au> Date: Wed, 18 Aug 2021 23:38:53 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 13 Apr 2021 16:38:09 +0000 (UTC), Christophe Leroy wrote: > powerpc BUG_ON() and WARN_ON() are based on using twnei instruction. > > For catching simple conditions like a variable having value 0, this > is efficient because it does the test and the trap at the same time. > But most conditions used with BUG_ON or WARN_ON are more complex and > forces GCC to format the condition into a 0 or 1 value in a register. > This will usually require 2 to 3 instructions. > > [...] Applied to powerpc/next. [1/2] powerpc/bug: Remove specific powerpc BUG_ON() and WARN_ON() on PPC32 https://git.kernel.org/powerpc/c/db87a7199229b75c9996bf78117eceb81854fce2 [2/2] powerpc/bug: Provide better flexibility to WARN_ON/__WARN_FLAGS() with asm goto https://git.kernel.org/powerpc/c/1e688dd2a3d6759d416616ff07afc4bb836c4213 cheers