Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2041188iof; Tue, 7 Jun 2022 17:53:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5sj+ULviQNsEE3psYT+GzxDMX7OmcrZD6zg3DtdjyXarpfJXlGUXUW31Pa4zXt0CHEqwH X-Received: by 2002:a17:90b:4a92:b0:1e8:2c09:d008 with SMTP id lp18-20020a17090b4a9200b001e82c09d008mr28137460pjb.169.1654649600303; Tue, 07 Jun 2022 17:53:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654649600; cv=none; d=google.com; s=arc-20160816; b=lEaHRkUIcAs0YOFcxxHMGLiHMtzj6bZcQq/5Y8K6jmhFNKYASWY9U36FGeoCMBDDhj ZwQmsENbqr6u7dBqzJ5VR6wYA9e0a1OMapvUu0gxLeOhBseYRbQ5+JE3krfGCDdSq32t BNwzpKmSp+/RfkJIXt1fKrInte93FZsRf/h4LkQkstEdRJPCXzAjsNe/n5BNkyKGP0jl QXom3T6uWpNa0elFCklKuC6JGc77VpvYZM3Suxym65P+zlJJE65u72KGZacxGoYdpdyI UcB9//6J1LYxTxHPMk48xwK5jD9hjiXp9QhxxE+NPlsbIKnWBLVVVs6sBCU0siCxv3qp 7Hkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eExYHlKTv1gaNVJH1hbQTq3Rm/zCTXRnmEXZg/g7TjA=; b=DLMS+iO2+ZDavy+U7GXYyxmSNYfHunC+vv9cEtdT8vI7h81sLxdPu1Qz9gRK4o5j8h TRvOUd4elciaTlvJXQFXOPr9DAZzf0LS3VLBlIUM5Phu1cblNYN9glorS0thz/TpCCrz It2ESpXfEcIkdEGufeEQvezaN+iUeJl5z3Gm6lTeHeGo4lRVYSbXMz35lFg/qrMCR0ge mfDJwu8FHa9c45EEujH0k916pHcRS+/WQZiRFkDkmdDBLWWNsF6nm8jWuQfGX+nICJj4 3aeJ4+tqKkQBaJ/l5TxWODg4bLZfmx49hxXsfX3xnDos1qVbelZvrFaR646Fp7QCpMtA iV+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Hxe0iItb; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b12-20020a17090a800c00b001c6d5497bb9si26880224pjn.28.2022.06.07.17.53.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 17:53:20 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Hxe0iItb; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5120321F9E8; Tue, 7 Jun 2022 17:49:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242627AbiFGLMC (ORCPT + 99 others); Tue, 7 Jun 2022 07:12:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242887AbiFGLKS (ORCPT ); Tue, 7 Jun 2022 07:10:18 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD09B2D1E1; Tue, 7 Jun 2022 04:08:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654600093; x=1686136093; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LehJpdli2K1kf6xsEwsX5oR/25DuYLSpUF31DPXQGNU=; b=Hxe0iItbIGbxHeLqEenzuHtMgUYwsX+vSY59uBIU2y6sY/JpwJetD+rF lnOXsnA99+RuqBeQLIao9cJXcDDKF4CyLphIbQl+Jej7/zLBlsB2j48Pm lodzC+HOWaNSB4ZPb7ZWsRBUIe6hBndIq4CY+UFolzmyMWdSEZIWBMuwO ZmVe0u1Ypueglv72qyh4a8FEI6O6fhFMuD35ZA1EnEPIPW7Vxrq7nmQ1W FKLybDrCUmw3Od5F8WU+Z2FupIJEgMN7/yVfE6075VL6+u80rmvzVdGYj p+CtZGTYWn5LZnix4t8iiXgEnbzgZiOQb0lhphZkR+zAdwI7G/RSyvXpn w==; X-IronPort-AV: E=McAfee;i="6400,9594,10370"; a="276758945" X-IronPort-AV: E=Sophos;i="5.91,283,1647327600"; d="scan'208";a="276758945" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2022 04:08:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,283,1647327600"; d="scan'208";a="584155731" Received: from irvmail001.ir.intel.com ([10.43.11.63]) by fmsmga007.fm.intel.com with ESMTP; 07 Jun 2022 04:08:08 -0700 Received: from newjersey.igk.intel.com (newjersey.igk.intel.com [10.102.20.203]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id 257B86Ft021369; Tue, 7 Jun 2022 12:08:06 +0100 From: Alexander Lobakin To: Mark Rutland Cc: Alexander Lobakin , Arnd Bergmann , Yury Norov , Andy Shevchenko , Richard Henderson , Matt Turner , Brian Cain , "Geert Uytterhoeven" , Yoshinori Sato , Rich Felker , "David S. Miller" , Kees Cook , "Peter Zijlstra (Intel)" , Marco Elver , Borislav Petkov , Tony Luck , "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 5/6] bitops: wrap non-atomic bitops with a transparent macro Date: Tue, 7 Jun 2022 13:07:05 +0200 Message-Id: <20220607110705.72887-1-alexandr.lobakin@intel.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607105718.72434-1-alexandr.lobakin@intel.com> References: <20220606114908.962562-1-alexandr.lobakin@intel.com> <20220606114908.962562-6-alexandr.lobakin@intel.com> <20220607105718.72434-1-alexandr.lobakin@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_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 From: Alexander Lobakin Date: Tue, 7 Jun 2022 12:57:18 +0200 > From: Mark Rutland > Date: Mon, 6 Jun 2022 17:27:16 +0100 > > > On Mon, Jun 06, 2022 at 01:49:06PM +0200, Alexander Lobakin wrote: > > > In preparation for altering the non-atomic bitops with a macro, wrap > > > them in a transparent definition. This requires prepending one more > > > '_' to their names in order to be able to do that seamlessly. > > > sparc32 already has the triple-underscored functions, so I had to > > > rename them ('___' -> 'sp32_'). > > > > Could we use an 'arch_' prefix here, like we do for the atomics, or is that > > already overloaded? > > Yeah it is, for example, x86 has 'arch_' functions defined in its > architecture headers[0] and at the same time uses generic > instrumented '__' helpers[1], so on x86 both underscored and 'arch_' > are defined and they are not the same. Oh well, forgot to attach the links. Can be found at the bottom of this mail. > Same with those sparc32 triple-underscored, sparc32 at the same time > uses generic non-instrumented, so it has underscored, 'arch_' and > triple-underscored. > > In general, bitops are overloaded with tons of prefixes already :) > I'm not really glad that I introduced one more level, but not that > we have many options here. > > > > > Thanks, > > Mark. > > > > > > > > Signed-off-by: Alexander Lobakin > > > --- > > [...] > > > > -- > > > 2.36.1 > > Thanks, > Olek [0] https://elixir.bootlin.com/linux/v5.19-rc1/source/arch/x86/include/asm/bitops.h#L136 [1] https://elixir.bootlin.com/linux/v5.19-rc1/source/include/asm-generic/bitops/instrumented-non-atomic.h#L93 Thanks, Olek