Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7399156rwd; Tue, 20 Jun 2023 00:15:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ58MUSDYeekgW0U3i/40Int9RG45NUb1/Yfhvq5bSAzMXnFKOjBFn+DvQA25VZzuPKEzFxR X-Received: by 2002:a05:6808:1455:b0:39a:a880:50dc with SMTP id x21-20020a056808145500b0039aa88050dcmr17362825oiv.52.1687245355087; Tue, 20 Jun 2023 00:15:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687245355; cv=none; d=google.com; s=arc-20160816; b=kvYLyjQv8hYdUutUGq1cvTSEC9BK9iQ3SnGhJ0S8DxTFQGGETwj3ahD6VDb7RWW8Px RiUW3QRdzKZc79vvgM0QwwAJo10w9hkWmCmAZ2MB62IRXA/jeEwauq4PoN1pnpO2LS4I ntRUpAq1Jtdmev5f5SN9iIVt7yc8UTWHFIP7jW+XA/bwQ4aE8Cii4uC1cNSk+0pjXb7k RthHvzeGutDjq7PzbCEUbP7xHkc7JA4L6XHxEtCDDoiHz+Z4Baq/6nBqa/PQeNRE7uuI o6C4a5DgsjYWRfrEH91/CCdgZpYPtznfna/fEvYyvaJ78XHloRD/U8fFLrTrQP7YAm6p 9FOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Ak1na8GbY5x4+XXN0A9MfARgJ99cd/S+45Z1mbNGHDM=; b=g8ohVEGMjr6qim+F6sHva4FsqshYbNDmTi9hXI8ZcqclJ1YKYhzIlmHYRpUAeQmQ/u dFYh6alt6X9KW3EfB4bTNrI3HQSIoGW19pK4sSUNB3jIGko3ovgrJEM41O0UrQyv44n1 KEuhPKL7TT9IzzrZiZB7+cYJlPGsVpAIRcoMNGhC4cZ38yR8sN45xYNW7Eff7bpzUuEL WhwoYvLhW/T9bUDr3oLLTxhIIIi6LYy1oB32UvN1nQfVWJKmsWSacRAHQUa8aIZVjmDU a1h2vCo+OoOP2O5cmT1dlsO8mOJY/6apjtZI921wB06E1A970goCqP59sP+tWrNyLvgo Wppw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Qfx4iSwm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y21-20020a17090ad71500b0025c2b482234si8776869pju.150.2023.06.20.00.15.43; Tue, 20 Jun 2023 00:15:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Qfx4iSwm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229849AbjFTHKr (ORCPT + 99 others); Tue, 20 Jun 2023 03:10:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229579AbjFTHKp (ORCPT ); Tue, 20 Jun 2023 03:10:45 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1CD0CC for ; Tue, 20 Jun 2023 00:10:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Ak1na8GbY5x4+XXN0A9MfARgJ99cd/S+45Z1mbNGHDM=; b=Qfx4iSwmEU0wrndFg+bhUU71CJ WSXMR57xcYsp6J6A7JG8bhxgS0nfDiM5r14j5FCwTdRXWA+cUIKyuUluush1FZfpWkBCK/4H3nV8e w2xrI+cVdgeF0M7Ht04eo2mQkHYb+5cBq1Bgm3wZsoNUfhdbPVkBvp03mBWyKOFBJSgqYecTk9RKK 7NVnLCb0VhPirp26pVVSa3FJOfGAdIp30vUyCXQqFkakQsdA1WYjCRREQ2cdRS1AEcEHVXZ311am5 BNW8zWbFCdnDc1+a+dvOmVG7bYbTiz1vp8ccQWLXpuqvhOqvt1d5fF1jeUM7Kl5PPwBYitEJTqqJI mTq8IMlw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qBVVB-00CmmP-QS; Tue, 20 Jun 2023 07:10:09 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 1D673300137; Tue, 20 Jun 2023 09:10:06 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0237D20A3B6D3; Tue, 20 Jun 2023 09:10:05 +0200 (CEST) Date: Tue, 20 Jun 2023 09:10:05 +0200 From: Peter Zijlstra To: Naveen N Rao Cc: Christophe Leroy , Josh Poimboeuf , Michael Ellerman , Nicholas Piggin , Sathvika Vasireddy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, "Aneesh Kumar K.V" Subject: Re: [RFC PATCH v1 1/3] Revert "powerpc/bug: Provide better flexibility to WARN_ON/__WARN_FLAGS() with asm goto" Message-ID: <20230620071005.GR4253@hirez.programming.kicks-ass.net> References: <8dd72199549e76e0e9c2aba1c89d5fe2b0cb1663.1686922583.git.christophe.leroy@csgroup.eu> <1687237941.1wok7iiqm0.naveen@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1687237941.1wok7iiqm0.naveen@kernel.org> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 20, 2023 at 10:51:25AM +0530, Naveen N Rao wrote: > Christophe Leroy wrote: > > This reverts commit 1e688dd2a3d6759d416616ff07afc4bb836c4213. > > > > That commit aimed at optimising the code around generation of > > WARN_ON/BUG_ON but this leads to a lot of dead code erroneously > > generated by GCC. > > > > text data bss dec hex filename > > 9551585 3627834 224376 13403795 cc8693 vmlinux.before > > 9535281 3628358 224376 13388015 cc48ef vmlinux.after > > > > Once this change is reverted, in a standard configuration (pmac32 + > > function tracer) the text is reduced by 16k which is around 1.7% > > Aneesh recently reported a build failure due to the use of 'asm goto' in > WARN_ON(). We were able to root-cause it to the use of 'asm goto' with two > config options: CONFIG_CC_OPTIMIZE_FOR_SIZE and > CONFIG_DEBUG_SECTION_MISMATCH. FWIW; I recently had clang-powerpc report a very dodgy build error that was due to a combination of these asm-goto and the usage of __cleanup__. For some reason the label of the asm-goto crossed over the __cleanup__ variable declaration -- which is not valid, but also was completely insane for that's not what the code called for. https://lkml.kernel.org/r/20230610082005.GB1370249@hirez.programming.kicks-ass.net But in my book that's a compiler issue, not a kernel issue and I'd be hesitant to pull the asm-goto use just for that.