Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp212826imn; Mon, 25 Jul 2022 14:16:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sA6OsEGMcbW2aEd3AGQVD+vlmao3X9yGxd2dkrs/ARt1agyx+VAiNMfkbL0ogHWvIW3z3h X-Received: by 2002:a17:907:271b:b0:72b:64f0:e508 with SMTP id w27-20020a170907271b00b0072b64f0e508mr11965400ejk.275.1658783814854; Mon, 25 Jul 2022 14:16:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658783814; cv=none; d=google.com; s=arc-20160816; b=Yfl3CZf9frQvbX4ZB1B3025n04c/KbFljujrAl9buC4JWV8vfCgLEfd77vPtmYgnJ/ 23NNzrJuLiLS/auB8hz49x9OTwBw0Ejz+YIdxsNXpb4e0cg4gTr4FvHRRgwCcVp+ptsH vnHj8lcCbFesEVqADKLNZu2iLhuaUltOXRuaNNdDrbCrC5Zy97dbnMATTCmQK22tKZXg iB0NvIhWZO0fyi9ui2d8ZuwECVagwBmrneyXpGpPycKj+mJ270PWC6xfCLtK11hLU/v6 IX8HvNDcJ0S9z7XjMOtHX9DT5Gvhy4zQNAxP/F3APaEDJYIrN3CPcPPYGMWxAYznKwFF rmeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=FZom5onWB4/D1hB5gtNREa3jGNLAjEikzJFm8hKoPD0=; b=Wll7tYlGSgGDRk2CjthRBBTU2EWERc83lhabKg4R5cFuP8R6zQgYxCRDLZ/nKxouB1 L6AuhJolKALcxJaX2ExpSPThJqw6oQ9UEybpxT9Rkkmu4/lrRATunFvPTa4T1oubJ0N5 FHqA0QGor8L7c2G1/3YpfASGUaMX6QWC1X+Gl/i3OdyCqxX1xgphTYIgxODAJhJwxG7c XuJCfnKCFNmz6TgDcZvgzK9hleLcjw+IGVWfBQK0hpFzowEaF03qzJJNOjva5GEULnAV UQMWeRweRH850hYaCY+hdJ1684FMyH1ffjSUGm7w4MOpbpYXqPSOVxLfgQllAX5QMxTI I8zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=JrYQ1Msb; 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 k21-20020a17090632d500b007269615d162si13145024ejk.236.2022.07.25.14.16.30; Mon, 25 Jul 2022 14:16:54 -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=@linux-foundation.org header.s=google header.b=JrYQ1Msb; 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 S237204AbiGYUlU (ORCPT + 99 others); Mon, 25 Jul 2022 16:41:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235916AbiGYUlS (ORCPT ); Mon, 25 Jul 2022 16:41:18 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34EE413DEA for ; Mon, 25 Jul 2022 13:41:17 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id m8so15448904edd.9 for ; Mon, 25 Jul 2022 13:41:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FZom5onWB4/D1hB5gtNREa3jGNLAjEikzJFm8hKoPD0=; b=JrYQ1MsbBhAWbnaL4bCij1Z+c5wDkvvYdK/PM2IEUDz7HvTomeAn+WSNJzMkgCy13b EgrIXpYySyaMWbLxouqnE+66vsESWi1xYmrXXjwGjSyGP3XC1acrXDW7ZHHBF0j7gDG3 0TvsT1JhnAFNTi/QJSeb9SeoqJaAD3nciEmLw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FZom5onWB4/D1hB5gtNREa3jGNLAjEikzJFm8hKoPD0=; b=KGoT09JugTTHZz+CtBCDbcz/NwCoVZ4pLvCHWPMu3zzfMJvjJquH53Ua1yyttG1d1S S3kyRELhsh+fYhWcOheYHihw1iXENUMZXL0WU1qixeYycShFA7jLWJ71vq77Xf9AmPbI Pv5k919H+rAtQFnvcZplmM/gKQMA2IhnJphAaXyr21w+wYFy4NcbxPjz9i0Ay3yBRjEe pVzXL6V7L0ey5mAMxjtBYcJBfM+pNKt4vpewusUr3h4H1aDYfZ1gSm3f+K3ZdzZdVwbp JsPkCLkEhL9fvxiaqXWM8bBxWh2t3dqxRFB9fICTOUpuYshllqWIedccn4v54NgYd3nm S41w== X-Gm-Message-State: AJIora99Imef97gEm9uXFJSih/Q9JBE118/XIzQ8GxnpGfW1VnjUEF2X nrz9Dpk3B4v0beWvZeA1bya+63/Pp3TRcVpe X-Received: by 2002:a05:6402:1e8c:b0:43c:2032:7d98 with SMTP id f12-20020a0564021e8c00b0043c20327d98mr4510879edf.297.1658781675475; Mon, 25 Jul 2022 13:41:15 -0700 (PDT) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com. [209.85.128.47]) by smtp.gmail.com with ESMTPSA id b2-20020a1709063ca200b0072ee79bb8ebsm5728438ejh.126.2022.07.25.13.41.14 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Jul 2022 13:41:14 -0700 (PDT) Received: by mail-wm1-f47.google.com with SMTP id a18-20020a05600c349200b003a30de68697so73072wmq.0 for ; Mon, 25 Jul 2022 13:41:14 -0700 (PDT) X-Received: by 2002:a05:600c:4ed0:b0:3a3:3ef3:c8d1 with SMTP id g16-20020a05600c4ed000b003a33ef3c8d1mr12441864wmq.154.1658781674109; Mon, 25 Jul 2022 13:41:14 -0700 (PDT) MIME-Version: 1.0 References: <20220725161141.GA1306881@roeck-us.net> In-Reply-To: From: Linus Torvalds Date: Mon, 25 Jul 2022 13:40:58 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Linux 5.19-rc8 To: Yury Norov Cc: Guenter Roeck , Dennis Zhou , Russell King - ARM Linux , Catalin Marinas , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no 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 Mon, Jul 25, 2022 at 1:35 PM Yury Norov wrote: > > Here we have 2 ugly options - having pairs of almost identical > functions, or passing dummy variables. I decided that copy-pasting is > worse than abusing branch predictor. The thing is, we have solutions for this - just use a single inline function, and make it *see* the constant. That way the compiler can DTRT, either generating two copies (with the constant elided) or depending on the branch predictor. That's particularly true in a case like this, when there is only *one* case for the normal situation (ie little-endian). Because let's face it, big-endian is completely dead and legacy model. Linus