Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp774267iog; Mon, 13 Jun 2022 12:40:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmBiqv+m8MltuWsLMUNH1sYArodFLItjsFTd3tcPiy5+ETZlv3IwmjWS8fE8jWccFK+vxi X-Received: by 2002:a17:907:c21:b0:70b:735f:55aa with SMTP id ga33-20020a1709070c2100b0070b735f55aamr1207627ejc.332.1655149230872; Mon, 13 Jun 2022 12:40:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655149230; cv=none; d=google.com; s=arc-20160816; b=MfhzEOh9RvkAT8mq4ZgFqE5PPMIHDc/isBzyIFeFjQt3qUE1nUxLN1VqvAW5/acHs9 gvvvOTt94cFffpF+8g/7S6AMD7j3N43i5da57ofDT/d6/oV104ZhxDu5gdrswZn5lH1r Tr49qZ7PO/8FWtnKVWsGf3PVCNzMAdrxAzPdA6B28hUE3Ris/LsfaoK9q4Um+XCdcOlM SLPVftO0fAdEqbQ3rNrd5vHNCSItiW6yxGKoHoQ9863qQCs0BPorvjPQzdP7YDUykgKR pCIAAQ3wcGJsLCDtT+4FWDqO30EGjoRDFIKrJmpkLjF2vbchFYb/Ts3+qe8VskSuC4J8 ZXzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :dlp-version:dlp-reaction:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=XxsfHurYfgtl5B8eDXs3NdPaSjArXVczaB+F2Bn9Ek4=; b=wipXcfhrT9CkErPiLKJw8oX0y7zStPlYe1LlDFU/WVhs7EqsJnYIlLkAGXODQXD4/A PshJNWiAcljIl/zEtGdft67g5wDAAUvpICqGv4oBce4NT8TBDwmOiuHgJcQv5RA1W9Lh cSCkXCqN6tejiLdjc2du/o5VcovJx68hR+oMpjyzjZBDKpLY2BtcdUftbhMko37UfHsL b3c+vrtL4gxra1Vu098NVQ6qrJLOeBnuSjIJXgasuq/12xm9lAtDyPt4KBQgfyntp0qB m5PQUkyx/TO5jqW9wmfym/dSwu7r4MyyIEV2BBdfCOXNtCkFmgJnMgeAZBMwN1yXVvN5 yq7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HkYwqi5r; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he18-20020a1709073d9200b006fe7a59af8esi9312964ejc.432.2022.06.13.12.40.05; Mon, 13 Jun 2022 12:40:30 -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=@intel.com header.s=Intel header.b=HkYwqi5r; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242889AbiFMTB4 (ORCPT + 99 others); Mon, 13 Jun 2022 15:01:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346540AbiFMTAy (ORCPT ); Mon, 13 Jun 2022 15:00:54 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 588794D9C1; Mon, 13 Jun 2022 09:26:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655137612; x=1686673612; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=XxsfHurYfgtl5B8eDXs3NdPaSjArXVczaB+F2Bn9Ek4=; b=HkYwqi5rbxVLCa9DjzarYkrq7QLAZ9qJ+s2gNJJwnWp97qJXWFbwlbvj IgCLX29aH7yIYuWMl01dpUNPIDxsoDHK4/eQASqiKWGDvI7LVFYFOfpoZ g8qKp7GTjIwLLvVwojxp+7wVKL0jJf3q5LYQL07wmecV23KQqc7jHX9mj FEcLj7QyRIoInFaPDChRUQRrILOt9Vq3z6+jiYvoFTjl2qp74Svl0d3kW qsR2JrznwCwY6XBuyr1iQ89ASkG0udTU0SoUX6lbIM6ZwLEMi1NB0RSz8 uZYyXaT9sqqRa1ZQkBo7IDws7JCuI55fqO+uj+L+shaJqgZTeOOenbFo3 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10377"; a="303733996" X-IronPort-AV: E=Sophos;i="5.91,297,1647327600"; d="scan'208";a="303733996" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2022 09:26:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,297,1647327600"; d="scan'208";a="611858233" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga008.jf.intel.com with ESMTP; 13 Jun 2022 09:26:50 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 13 Jun 2022 09:26:49 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 13 Jun 2022 09:26:49 -0700 Received: from fmsmsx610.amr.corp.intel.com ([10.18.126.90]) by fmsmsx610.amr.corp.intel.com ([10.18.126.90]) with mapi id 15.01.2308.027; Mon, 13 Jun 2022 09:26:49 -0700 From: "Luck, Tony" To: "Lobakin, Alexandr" , Marco Elver CC: Andy Shevchenko , Arnd Bergmann , Yury Norov , Mark Rutland , Matt Turner , Brian Cain , Geert Uytterhoeven , "Yoshinori Sato" , Rich Felker , "David S. Miller" , Kees Cook , "Peter Zijlstra (Intel)" , Borislav Petkov , "Greg Kroah-Hartman" , "linux-alpha@vger.kernel.org" , "linux-hexagon@vger.kernel.org" , "linux-ia64@vger.kernel.org" , "linux-m68k@lists.linux-m68k.org" , "linux-sh@vger.kernel.org" , "sparclinux@vger.kernel.org" , "linux-arch@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v2 2/6] bitops: always define asm-generic non-atomic bitops Thread-Topic: [PATCH v2 2/6] bitops: always define asm-generic non-atomic bitops Thread-Index: AQHYfL4xWJEoq3eTcEeKREBjFjjrHK1JHg2A//+t5kCAAH9LAIAEkeOA//+tDzA= Date: Mon, 13 Jun 2022 16:26:49 +0000 Message-ID: References: <20220610113427.908751-1-alexandr.lobakin@intel.com> <20220610113427.908751-3-alexandr.lobakin@intel.com> <22042c14bc6a437d9c6b235fbfa32c8a@intel.com> <20220613141947.1176100-1-alexandr.lobakin@intel.com> In-Reply-To: <20220613141947.1176100-1-alexandr.lobakin@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.500.17 x-originating-ip: [10.1.200.100] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 >> It's listed in Documentation/atomic_bitops.txt. > > Oh, so my memory was actually correct that I saw it in the docs > somewhere. > WDYT, should I mention this here in the code (block comment) as well > that it's atomic and must not lose `volatile` as Andy suggested or > it's sufficient to have it in the docs (+ it's not underscored)? I think a comment that the "volatile" is required to prevent re-ordering is enough. But maybe others are sufficiently clear on the meaning? I once wasted time looking for the non-atomic __test_bit() version (to use in some code that was already protected by a spin lock, so didn't need the overhead of an "atomic" version) before realizing there wasn't a non-atomic one. -Tony