Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp853714rwe; Fri, 26 Aug 2022 16:29:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR4iTu5AdtGfey7xBo6c7c8iIG0T2Da9voDLvI9xC6Ql4oNZ07aXLHBh/Wj8PJQhIPVnq7gl X-Received: by 2002:a63:904c:0:b0:42b:404a:cc50 with SMTP id a73-20020a63904c000000b0042b404acc50mr5082838pge.559.1661556571904; Fri, 26 Aug 2022 16:29:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661556571; cv=none; d=google.com; s=arc-20160816; b=C3WGWUmmuihwKFJNNlDpF0V6HWlGavfKdra2rya8yegYXADoR0n3q2rNwBp8QlNTwM 1g0HAU9qZYRaQGjRQXhBu07A7jWSX5MbM/IAB2MF3RQRXBON8lsN2mGrc/M3trP2Qk4x PmEc1agKo/VLZe3uah7xEB6B2fE6s8+bjvWskFxPcMVp6661t+6S3iJhdPI7AqIWAqYt lFYNYHueXzFUXgp3rv6QYea1oZZppVfMPRUSLj74sYwfD3QgLd/k4lNQchEJCqymG+te sSiADw+3ruGs2Qb1uQjhr7hPDScP6oyZbscqgczuF8q6e3n3ewewuC78zceO+473ryR7 7ADA== 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=EchSFCFNESRMpkzf6LgfeMPqX9NRcEuB71WzS8HN7D8=; b=UwHhkOYqqMoGupyriQlMAynHXRrlgycq+q6OvPJEzPhDceOm48rh33KYEXgWU4sW87 wpoGdY52U+QrYObZIuZPFsMbUmP8QOlzft6v2zjGQVT8TSuUeaQI042Y2MqRF90sOKiK ViCvWwAv884arvcyK+1QZ2v8nI9zYxym1S0i9MBPF11Tes9MNUzxB9qF55j8MiCengIA fspTeflev3Y+xSVwlxUeaHH3Cgvman5VFwidzkhI8vM6XvXIoJdTDsEICfN1mWicL1Fj tOiQc+QJiUW0LsY4wp7/llcDg4BYsYAwjgR9VCZjFIe1VnWIas5zxPxXnH0cKQsijLm/ PqAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=fFXxOFb4; 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 y15-20020a17090a16cf00b001facd1e581dsi2925489pje.14.2022.08.26.16.29.21; Fri, 26 Aug 2022 16:29:31 -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=fFXxOFb4; 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 S234122AbiHZXKa (ORCPT + 99 others); Fri, 26 Aug 2022 19:10:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230416AbiHZXKZ (ORCPT ); Fri, 26 Aug 2022 19:10:25 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DE8B8B992 for ; Fri, 26 Aug 2022 16:10:23 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id p16so2593591ejb.9 for ; Fri, 26 Aug 2022 16:10:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=EchSFCFNESRMpkzf6LgfeMPqX9NRcEuB71WzS8HN7D8=; b=fFXxOFb4I403xbhy531yXT8u8qnCT6hOkiP/2jM4Zv81TC1p+0O50xRLVE70Gx9IHM rhSK1nbeWZ6V5/dxPLrsNIOpSsYF/cqSQcTjDQ92IZLO6kOp9BtiQqMDOigyGgxxuu5l NwuJw5OyNX1rmomXFegiTMi05iNP/gTP6eKhI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=EchSFCFNESRMpkzf6LgfeMPqX9NRcEuB71WzS8HN7D8=; b=VlzmMXKaq/jxPvPCjdHopQAiF3NpbrO2t5efPxNNhsQzDPpAiYQL03+2wcYj+E8rL0 YSVVkn4CFR7n445nFMzcjZqG/++2/xjP+5UpxlHJAJ4TA8Ee6Ds4NC/8b2lGD87lJ7A7 WHeqvXfWRvKToxWkDPUrjJsXOm96Q4XmNxbHnavBk6c0oj88l2XHRLK7uZKGOppggbIu Vbw+LsVvOj1lqM32wQHDh5PuzfjMsZFjJ4H8BwJHfeA0/NMiiWWv9GSPDV8uIPXEe2mi HTLcNdkqJyNiHR86eqp3QeV7l/OrWuzBWgMm3hHb2POlPmcjvviL6loFjuOJsDdPIiQ7 u9bw== X-Gm-Message-State: ACgBeo29iGBZhpwgfNM5S7SEkDQfvPl7jItYzIT94lj1N9vFqMqjnx7C BkwjX6FMnvB3KUGlPvYLGMJesfIxO56jId5impk= X-Received: by 2002:a17:906:cc16:b0:73d:d16c:609f with SMTP id ml22-20020a170906cc1600b0073dd16c609fmr6055608ejb.691.1661555421756; Fri, 26 Aug 2022 16:10:21 -0700 (PDT) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com. [209.85.128.43]) by smtp.gmail.com with ESMTPSA id g2-20020a17090604c200b0073c1e339a37sm1422437eja.149.2022.08.26.16.10.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Aug 2022 16:10:19 -0700 (PDT) Received: by mail-wm1-f43.google.com with SMTP id k18-20020a05600c0b5200b003a5dab49d0bso1538839wmr.3 for ; Fri, 26 Aug 2022 16:10:18 -0700 (PDT) X-Received: by 2002:a05:600c:2195:b0:3a6:b3c:c100 with SMTP id e21-20020a05600c219500b003a60b3cc100mr852564wme.8.1661555418236; Fri, 26 Aug 2022 16:10:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Fri, 26 Aug 2022 16:10:01 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] provide arch_test_bit_acquire for architectures that define test_bit To: Mikulas Patocka Cc: Brian Cain , linux-hexagon@vger.kernel.org, Geert Uytterhoeven , Alan Stern , Andrea Parri , Will Deacon , Peter Zijlstra , Boqun Feng , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , "Paul E. McKenney" , Akira Yokosawa , Daniel Lustig , Joel Fernandes , Linux Kernel Mailing List , Linux-Arch 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,T_SCC_BODY_TEXT_LINE 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 Fri, Aug 26, 2022 at 1:43 PM Mikulas Patocka wrote: > > I'm wondering why do the architectures redefine test_bit, if their > definition is equivalent to the generic one? We could just delete > arch_test_bit and use "#define arch_test_bit generic_test_bit" as well. I think generic_test_bit() came after many of them, and when it didn't, people copied earlier architectures where they had already done their own. > Another untested patch ... tomorrow, I'll try to compile it, at least for > architectures where Debian provides cross-compiling gcc. Looks good to me, except I'd just do #define arch_test_bit_acquire arch_test_bit on hexagon rather than duplicate that function. From my reading, Hexagon doesn't have any fancy memory ordering, it's just the usual UP with barriers basically for instruction cache coherence etc. Linus