Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp805576imw; Thu, 14 Jul 2022 11:05:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vv4ebdpZ2wv4Mw4mVcFGbbBI6IlghjxPsMGHj2h+2Uz5vUdKj8uiwkf/kqRw88kkN3NkR/ X-Received: by 2002:a17:907:3e86:b0:6f5:917:10cc with SMTP id hs6-20020a1709073e8600b006f5091710ccmr10180264ejc.53.1657821921296; Thu, 14 Jul 2022 11:05:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657821921; cv=none; d=google.com; s=arc-20160816; b=0/XXL2A9/ZWKx7H4E6F1bCO7PnUveNjBRyPByrAG0Z+sqqPTbZP6bzyQc82R5Ey1gt wfhuOuCBbQ+V57+a4iDjzcTFDMooJj0AIO4gbMZKicSiGXgFHjk8W6MpuYqRYbPPFIug /Dy8tMWIef5CCt0U06kJihAuimlH5C0ZTKbrWn+l/vxTALeePVQJYOMZD9nrmSxZVvQ/ 8oVownVEpVTzBttvdAjZU8a6SV89TAaxvHtBSP1+Earw1WpT4KwZ0LLhP5g6obpgSjJ6 YWcLc7Z4VixE7OGpLe0M55a1eyJZY9qAWhyBclLwOsv42ExZ3FLRvIimgsTCVSfdeUCH Wm5A== 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=htDFA1Y7dlEasSYr1rXrw+KJdNZ2vQTs/F4G7+dnxHc=; b=U6PuMOIge4nBRRqGQdR9h2TEt2xnu2mfi1u6Ken86+voJF2nJwv3dCH49RcCXuzp/x 1gojUOx1wyXWluAoxAtd6gOa6PHPHuNRkjyVnjITO666dSpc5R0HNqCkIiloTDyaQ2CH gZSun5x+TpV/HvvXBjX+rpk68kpLaMkweiBct3TxwoFlab9q8L7uYYXGCtUaauQsHj8s am/jvhfrvduZ2tLeHKCZjdZUDPDBsudrxmk/n6AwufuA4YGmc5ZwumKO0HRarSLxqC4K 0DBkvXmsYq0vd3vSXfdwupqhtXL+YAlay9Bv/4MQLzVxlbEk0Hdg3qFroaSY8LKokpZF vVeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="vF7uoe/s"; 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 hp27-20020a1709073e1b00b007120a60b38asi2023750ejc.1001.2022.07.14.11.04.55; Thu, 14 Jul 2022 11:05:21 -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="vF7uoe/s"; 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 S229986AbiGNRWg (ORCPT + 99 others); Thu, 14 Jul 2022 13:22:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229496AbiGNRWe (ORCPT ); Thu, 14 Jul 2022 13:22:34 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEBA54F642; Thu, 14 Jul 2022 10:22:33 -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=htDFA1Y7dlEasSYr1rXrw+KJdNZ2vQTs/F4G7+dnxHc=; b=vF7uoe/sCJwSIeJJcf4y6HPKM2 Q3yipjaZYv0Hmbou/nWc9Iy5EkFsMo+uDuFtNRjlgF9TyVfjrjcmF9BpPxq2VBZ5qauRgwsK8IrVi 83yuE0iiD52ag2wAsQdie4D8f+5aRmsf+ZGGjqIi/cmVrxCUVEB2hQREKYgCHcpjTr2fby2czP3rC W/V8zgXnXHl+hDE111cklWOQhqbKxMcFNBRzldUrIE2sfJMyre3XWmkSuiGpYvzcXljmNPBJCKB6k 3GsnI3G4n4h7z46pDkwqFMt5vZLUAr0WiAuPU9F1RdmUf4AY80A5pwqkSi1GK9LjfdgQxFAVpjDy5 ivJO228w==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=worktop.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oC2XM-009XzV-3L; Thu, 14 Jul 2022 17:22:04 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id AD80B980185; Thu, 14 Jul 2022 19:22:02 +0200 (CEST) Date: Thu, 14 Jul 2022 19:22:02 +0200 From: Peter Zijlstra To: Linus Torvalds Cc: Boris Petkov , Paolo Bonzini , Guenter Roeck , Thadeu Lima de Souza Cascardo , Greg Kroah-Hartman , Naresh Kamboju , Florian Fainelli , kvm list , Andrew Morton , Dave Hansen , stable , Linux Kernel Mailing List , Pavel Machek , Jon Hunter , Sudip Mukherjee , Slade Watkins , patches@kernelci.org, Sean Christopherson , Shuah Khan , Ingo Molnar , Thomas Gleixner , X86 ML , lkft-triage@lists.linaro.org, Alex =?iso-8859-1?Q?Benn=E9e?= , "H. Peter Anvin" , Anders Roxell Subject: Re: [PATCH 5.15 00/78] 5.15.55-rc1 review Message-ID: References: <20220712183238.844813653@linuxfoundation.org> <6b4337f4-d1de-7ba3-14e8-3ad0f9b18788@redhat.com> <8BEC3365-FC09-46C5-8211-518657C0308E@alien8.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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 Thu, Jul 14, 2022 at 10:02:57AM -0700, Linus Torvalds wrote: > I like Peter's more obvious use of FASTYOP_LENGTH, but this is just disgusting: > > #define FASTOP_SIZE (8 << ((FASTOP_LENGTH > 8) & 1) << > ((FASTOP_LENGTH > 16) & 1)) > > I mean, I understand what it's doing, but just two lines above it the > code has a "ilog2()" use that already depends on the fact that you can > use ilog2() as a constant compile-time expression. > > And guess what? The code could just use roundup_pow_of_two(), which is > designed exactly like ilog2() to be used for compile-time constant > values. But NR_FASTOP isn't used in ASM. > So the code should just use > > #define FASTOP_SIZE roundup_pow_of_two(FASTOP_LENGTH) > > and be a lot more legible, wouldn't it? If only :/ FASTOP_SIZE is used in ASM, which means we've got to play by GNU-as rules, and them are aweful.