From nobody Thu Sep 3 07:03:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1788349444; cv=none; d=zohomail.com; s=zohoarc; b=MntNIS+VoEj5XboU8Ds9VqXuzZIhkbugQhZXWhXJwZKm54RpgaCrZoAXnpqQn1ZMKOf0Z5cujlnPAhUQN1vKKl1yYUrkiuKlFyskKWDi7KbnCE061hF3B7WOBHkOXqF77KOYTJjpEvXtsw17Uq+tEgbU7WjcZGQ8jJe+Y0kdXQY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1788349444; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=9GFfQbIk/OgSpRvploWqTdOJSAjJQBjidS2m4ZMLgpE=; b=kgeFAcMHVbxkekOgQrB8FAHku20X8KuutTtxxFIjqDfTVmd2q6hFpsqBRMFXCOGChI+9tc/2xsEKDiXPwjLEbbT6AuRq6Ijy+yapnSKRJspBM2oCxlxJ+ytL2GXSyFHyE0iZbELnmJ6MHWabePoO8FBraiK1SkUScP//9xJ5kWY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1788349444459662.9380263687033; Wed, 2 Sep 2026 04:44:04 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1405697.1639162 (Exim 4.92) (envelope-from ) id 1x1jNb-0006ZM-Av; Wed, 02 Sep 2026 11:43:47 +0000 Received: by outflank-mailman (output) from mailman id 1405697.1639162; Wed, 02 Sep 2026 11:43:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1x1jNb-0006Yj-5q; Wed, 02 Sep 2026 11:43:47 +0000 Received: by outflank-mailman (input) for mailman id 1405697; Wed, 02 Sep 2026 11:43:45 +0000 Received: from mx.expurgate.net ([194.145.224.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1x1jNZ-00069P-T4 for xen-devel@lists.xenproject.org; Wed, 02 Sep 2026 11:43:45 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1x1jNY-009O8V-TU for xen-devel@lists.xenproject.org; Wed, 02 Sep 2026 13:43:44 +0200 Received: from [10.42.69.10] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a980bec-e002-0a2a0a5209dd-0a2a450ad538-22 for ; Wed, 02 Sep 2026 13:43:44 +0200 Received: from [209.85.128.44] (helo=mail-wm1-f44.google.com) by tlsNG-4011c0.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6a980bf0-f2d2-0a2a450a0019-d155802cac44-3 for ; Wed, 02 Sep 2026 13:43:44 +0200 Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-495590dde14so9372785e9.0 for ; Wed, 02 Sep 2026 04:43:44 -0700 (PDT) Received: from andrew-laptop.. ([185.110.61.35]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49ce46422desm61190055e9.1.2026.09.02.04.43.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2026 04:43:42 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=google header.d=citrix.com header.i="@citrix.com" header.h="Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1788349424; x=1788954224; darn=lists.xenproject.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=9GFfQbIk/OgSpRvploWqTdOJSAjJQBjidS2m4ZMLgpE=; b=FUbQZ9kVMeSRf9hz+iOjy1HIp4jJks83SWl79NsJk4SGofm7fwaZUhRsaNqaeHG+SR MAIXJ/+AfrJWqfk7DWxzrG8w0D/gs6+QlgCk5d1DIZuFZGJLvdjvyiNU1YLlGWQ/EbGq 94p+LgkxqFd8CfU4Q462KRo4pCfhcUV21ai1w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788349424; x=1788954224; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=9GFfQbIk/OgSpRvploWqTdOJSAjJQBjidS2m4ZMLgpE=; b=lZ469Awtf+6/XSwSTodoT/qbSQXMAP937OoRCa+NCFCHMSLiPtlfnK7PMwMuZJUJVk 4dyLaGur5zqAFGvKBXOwn1gVw4y6WjUGqBD/oC5MzqMzLTuJEORrBZZ9Xkihp6hoA8Zn 2k2LsL+sgBGMwYK24CZS/2dNpIJsffm8Sf0vuEM8j58N2fdzGHAcgdO2ZrBUl6cmClVt jwD4HhN21SAmz+8sd6WEr3NpGOgRN0ivHvZq0aYGGlV26AXUmaPa0W8QBYwaFzd+8kJN zqYg4lHjxKItA8NqghGLuBjzuH/rkyy9cTKvKXj/rHMhhyU/Mo5x+5hLajgtVBOHTJH1 DDvw== X-Gm-Message-State: AFuF++nvf3VP2XDxEKBejk5dss+zhatSPdfJ69/2rcu7HkkGmDjUHAYg 9H0KgLaPKKXpRAoEpv2bvrAoHtiweepSuHERc7D322FrV8UwAbWrzOgFSZ5/uMczsnPDMU1mL2c 7b7bFnMQ= X-Gm-Gg: AR+sD12hg5C8ZL343OUXEKwqSJZ/sT5wAXUARud889puV9hJZw3Ffvc/HBWhX8r/Jqx MKB6yBdIQPbNZH+aCy0n722kYRKpcMdFublgHyuIFF37Ya4rZFAAkIDMZ6pRRn6G4UntogRzt30 UOuIKNnXtNFQZyUM51HzDIx4jvlSv6LAIPjUngamrOyEdBnBpFmMFNza/5R/Zd7/E5xOZpOQtlD Cw5HB+v0dv6txId6f4DcIXUGvteH3xSRtaCr5fwxpVFsU35fG09EC4DGRV1IGurMkY5eUGuKOUT LIAf0qX6GQrJRk1gLrO8dWhHLNSpJwV9qCyuQnVivBkbzn9bF4HbB653+rlZdCbafJfWftzptxu AIEH6ACjf/dhBH23XUReRb6RRkfr70urJGGAZV4ZPBcsTBqdmgRBC1Pf3dyJrvZ0OW9Vqc/a62z atI9k7TzPDIfJdTcjw6NYIhh9Zc0/qIWl+VYaL/VyWDT6TqZF2qgthboQLiqdRTeXE4KkQ+8OHl YvWMLLyAw== X-Received: by 2002:a05:600c:524f:b0:49b:8c63:dfdf with SMTP id 5b1f17b1804b1-49ce584c87bmr71173625e9.15.1788349422844; Wed, 02 Sep 2026 04:43:42 -0700 (PDT) From: Andrew Cooper To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk Subject: [PATCH 1/4] arm/bitops: Drop unused ADDR macros Date: Wed, 2 Sep 2026 12:43:36 +0100 Message-Id: <20260902114339.62043-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260902114339.62043-1-andrew.cooper3@citrix.com> References: <20260902114339.62043-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-purgate-ID: tlsNG-4011c0/1788349424-518C5CFC-7727E496/0/0 X-purgate-type: clean X-purgate-size: 1086 X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1788349446900158500 These are unused and do not want new users to appear. Signed-off-by: Andrew Cooper Reviewed-by: Michal Orzel Reviewed-by: Teddy Astie --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Teddy Astie CC: Stefano Stabellini CC: Julien Grall CC: Bertrand Marquis CC: Michal Orzel CC: Volodymyr Babchuk --- xen/arch/arm/include/asm/bitops.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/xen/arch/arm/include/asm/bitops.h b/xen/arch/arm/include/asm/b= itops.h index 60686a3a5503..52131892b1f1 100644 --- a/xen/arch/arm/include/asm/bitops.h +++ b/xen/arch/arm/include/asm/bitops.h @@ -22,9 +22,6 @@ #define __set_bit(n,p) set_bit(n,p) #define __clear_bit(n,p) clear_bit(n,p) =20 -#define ADDR (*(volatile int *) addr) -#define CONST_ADDR (*(const volatile int *) addr) - #if defined(CONFIG_ARM_32) # include #elif defined(CONFIG_ARM_64) --=20 2.34.1 From nobody Thu Sep 3 07:03:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1788349445; cv=none; d=zohomail.com; s=zohoarc; b=bXC4IQ9asDa9YMYiBWcRprs2znMzzbGhzSAJTIkkc+b1Dci/KJyoFjrg5dLctzLMLo+bYmFIBrKDjUHwkgl8vEkAryYi1jHgWgoPxhVxa9Zptk7z9Yc+d7qnwYbPawnzb0/6Lx+eLeMRwN2/qG7my+zD+zehBtZSwuGFPP6ydMA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1788349445; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=WoMupA15p1j9FxYGosrZSTQl8rtEPyPBGX/n1/nILow=; b=iB9v39T54MBY+LJZ73kv1urhkFFFre+dYU4PCroCmzpdN+hqqWT+mtM587F9WoSbbI4//woQq/oLxEHS2zwzxeB1vTDfZPbmFwoTuQKNQSTouj+eU6MHMzwSB099DhOolWqcA9JOQC0XB38ApPoGiQKJcl20/saeF7vLFwNV+VI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1788349445107389.1277829751708; Wed, 2 Sep 2026 04:44:05 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1405696.1639150 (Exim 4.92) (envelope-from ) id 1x1jNa-0006Be-4k; Wed, 02 Sep 2026 11:43:46 +0000 Received: by outflank-mailman (output) from mailman id 1405696.1639150; Wed, 02 Sep 2026 11:43:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1x1jNZ-0006Al-Up; Wed, 02 Sep 2026 11:43:45 +0000 Received: by outflank-mailman (input) for mailman id 1405696; Wed, 02 Sep 2026 11:43:45 +0000 Received: from mx.expurgate.net ([195.190.135.20]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1x1jNZ-00069Q-KF for xen-devel@lists.xenproject.org; Wed, 02 Sep 2026 11:43:45 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1x1jNZ-002dmo-0z for xen-devel@lists.xenproject.org; Wed, 02 Sep 2026 13:43:45 +0200 Received: from [10.42.69.3] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a980beb-2eae-0a2a0a5409dd-0a2a4503ab4c-14 for ; Wed, 02 Sep 2026 13:43:45 +0200 Received: from [209.85.128.54] (helo=mail-wm1-f54.google.com) by tlsNG-33051d.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6a980bf0-fae8-0a2a45030019-d1558036cd0d-3 for ; Wed, 02 Sep 2026 13:43:44 +0200 Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-498028b3d5eso9892545e9.1 for ; Wed, 02 Sep 2026 04:43:44 -0700 (PDT) Received: from andrew-laptop.. ([185.110.61.35]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49ce46422desm61190055e9.1.2026.09.02.04.43.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2026 04:43:43 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=google header.d=citrix.com header.i="@citrix.com" header.h="Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1788349424; x=1788954224; darn=lists.xenproject.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=WoMupA15p1j9FxYGosrZSTQl8rtEPyPBGX/n1/nILow=; b=ohB6gVGaTZvHaF+oH49vT6DipN7SqGCBy+eueKm9vYnm3VDAsabsN40bMdSTetWgGk hutr1tUdac6SwIpY6yK2RUsOLGauFm4PikPPPyvYn4jORPu4ctmz5RyIHDyve+XlZIRP P1105ArUUe2wrx9uSzXeJeuviuUVXDdm0nSsM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788349424; x=1788954224; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=WoMupA15p1j9FxYGosrZSTQl8rtEPyPBGX/n1/nILow=; b=PjdrHAdH6RYv1nn6KRqPJK6rGjDBInyX1ueea9sok6JF0noj+L6GSBwspHS1/VAEH8 RFVsy251o0lX4HWnRWp3ke1fYdlFILF/baHI855K/tY5TqH3HFr0u81C+l1eXlVNP2xG N6z/snEOouEUtvA2MpxER9LbcIhhtSN/HgJf8/pTIw13tbPQtYHvFoXwtzgGcNKHDIoe yZEqcyENGLoDfvRyGTwhz4HojdhO5VN3Et8s6XvjaT+OqYywRNSNkZwIQGDCw2DqoUrT OnQEps0nkJR5jG5ZmAnYUvN6jLM6UKMCwMqLc0CrVfam+42g1NmMHQgHegpIfL2O0a2H Ryig== X-Gm-Message-State: AFuF++kClMw8/lMGP32GZCQj4WOiRoLIfKzJvAel+VTmJyGYQuD72y9v MjdX+UwlY3m2q8EJ1C6uFKQTYVXVuLH1cRrr70ni3+1+XzsnneF5vVwzsFemRW+qVkeLccM066D PAv2hpyU= X-Gm-Gg: AR+sD12IvLMlwTDzNs7tah0dIVwgC45TdvV1VPIxyx65MTnjmO98NTs83shzh1ryzoS jPOpfxam6fKcH4axcoHx14Qiky4WpzWR75ak16otUqaDCZXlwFqkfAoPoqVgjdz3och5JBuw6Av UpKH97zgjj121Bk1P5TNTcw9E5P6A5GTfYlaibiazXJ7/W7Z45Kgev+vpj0UTG+GRjBbOpzFfAz s5CrV8Bcr9A97YXsBSkgaG4TFsPKi3KdBieenGOaJoXh3VuW/SwS0AehkNg6ZaGsvEcZOyGMOIx iJwXViZlq9o05UgPinI0rebrOPtbfPB8aQSXqkcx8FoVl4CtmwqBG84X7liFX+83rzC9TKT8hXn 84hj7gogrVQiksZkOAsS5q2Sdep+gKOHiDYuzQbYEPdTBTLomXt+eeJ5WC+hikuO25GLPMxPfes 2QXXeDeOIvsp9B+se7W4HT3aDJ5kFzOmhBTpFcmDHS5OGlyQM+X/kfv4lbZGNPshxPN6h9kJkAA gwBSenKIQ== X-Received: by 2002:a05:600c:8b88:b0:49c:e1cd:536 with SMTP id 5b1f17b1804b1-49ce584b899mr75422905e9.12.1788349424249; Wed, 02 Sep 2026 04:43:44 -0700 (PDT) From: Andrew Cooper To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk Subject: [PATCH 2/4] x86/bitops: Remove CONST_ADDR Date: Wed, 2 Sep 2026 12:43:37 +0100 Message-Id: <20260902114339.62043-3-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260902114339.62043-1-andrew.cooper3@citrix.com> References: <20260902114339.62043-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-purgate-ID: tlsNG-33051d/1788349424-7488A4E9-A9FA11DC/0/0 X-purgate-type: clean X-purgate-size: 1467 X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1788349446900158501 All this does is obfuscate the usage sites. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Teddy Astie --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Teddy Astie CC: Stefano Stabellini CC: Julien Grall CC: Bertrand Marquis CC: Michal Orzel CC: Volodymyr Babchuk --- xen/arch/x86/include/asm/bitops.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/include/asm/bitops.h b/xen/arch/x86/include/asm/b= itops.h index 69ffed510c0a..fbcab32fd239 100644 --- a/xen/arch/x86/include/asm/bitops.h +++ b/xen/arch/x86/include/asm/bitops.h @@ -18,7 +18,6 @@ */ =20 #define ADDR (*(volatile int *) addr) -#define CONST_ADDR (*(const volatile int *) addr) =20 /** * set_bit - Atomically set a bit in memory @@ -285,7 +284,9 @@ static inline int variable_test_bit(int nr, const volat= ile void *addr) asm volatile ( "btl %[nr], %[addr]\n\t" ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t") : [old] ASM_FLAG_OUT("=3D@ccc", "=3Dr") (oldbit) - : [addr] "m" (CONST_ADDR), [nr] "Ir" (nr) : "memory" ); + : [addr] "m" (*(const volatile int *)addr), + [nr] "Ir" (nr) + : "memory" ); =20 return oldbit; } --=20 2.34.1 From nobody Thu Sep 3 07:03:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1788349449; cv=none; d=zohomail.com; s=zohoarc; b=ao5QqIMCrnfV0EFK0t/p0gEHpPpd1Zv5bAo7g/OXXYMT26+JmAvM8yuS7PJs7LHQu3ECGa6raCSuWjFODYx5WRHW/t8IZustnLBxAMJQaJMm9MH3U1crQ8Ny25nXnQGZLNhbo9PjUJ9d7510MjLmbYm3ik1Iz7QX1lL3SEv40cQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1788349449; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=V2J37vG8ht9VCq82ApqJLmvWX3G+XIBcAFjZqFJr6yg=; b=PJl2JP0cWza8TE1SyvFA2a4xXF3VBXPGw/DEoGkl6x2Odtm+gzuPB3EZsK0XldeQg5dy0DlfXWR1qhJTeQqz5cx/BoK/LrQpl49qdPuDnzbIbpb13ibJVGmZkcHcxcV17lVaUas5rRlT7LX9fNuSKYAyuqSxKhrv36QnN4iL+tA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1788349449527217.58640077882262; Wed, 2 Sep 2026 04:44:09 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1405698.1639171 (Exim 4.92) (envelope-from ) id 1x1jNc-0006nT-IC; Wed, 02 Sep 2026 11:43:48 +0000 Received: by outflank-mailman (output) from mailman id 1405698.1639171; Wed, 02 Sep 2026 11:43:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1x1jNc-0006nK-Dg; Wed, 02 Sep 2026 11:43:48 +0000 Received: by outflank-mailman (input) for mailman id 1405698; Wed, 02 Sep 2026 11:43:46 +0000 Received: from mx.expurgate.net ([195.190.135.20]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1x1jNa-0006M9-JD for xen-devel@lists.xenproject.org; Wed, 02 Sep 2026 11:43:46 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1x1jNa-002dpt-01 for xen-devel@lists.xenproject.org; Wed, 02 Sep 2026 13:43:46 +0200 Received: from [10.42.69.12] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a980bf1-2eae-0a2a0a5409dd-0a2a450c86b0-0 for ; Wed, 02 Sep 2026 13:43:45 +0200 Received: from [209.85.128.42] (helo=mail-wm1-f42.google.com) by tlsNG-d25034.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6a980bf1-f479-0a2a450c0019-d155802ad0e9-3 for ; Wed, 02 Sep 2026 13:43:45 +0200 Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-49b392ccaacso13565075e9.2 for ; Wed, 02 Sep 2026 04:43:45 -0700 (PDT) Received: from andrew-laptop.. ([185.110.61.35]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49ce46422desm61190055e9.1.2026.09.02.04.43.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2026 04:43:44 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=google header.d=citrix.com header.i="@citrix.com" header.h="Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1788349425; x=1788954225; darn=lists.xenproject.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=V2J37vG8ht9VCq82ApqJLmvWX3G+XIBcAFjZqFJr6yg=; b=JA/2f/Fwp2hwdQ0X50xymNlO7nG/nx2b8guoL0RRHSoGf+ZqRNwXt7kFCwmbyr7N52 Q4kaWflS13d/t4IUsu9Gx8Mw84ONpGC+PiYfdmiwYT4K/Z3qHZ6ZSMs0rsXnunDRbTk7 QiMshU9TQCr7YbASV6WvmSdLeABRrXWQGcLdY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788349425; x=1788954225; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=V2J37vG8ht9VCq82ApqJLmvWX3G+XIBcAFjZqFJr6yg=; b=sGGRljf685u1zhquKViOT01vdKJ6bT7/nHlgWTdKAXlHLmR5uHKVSV30jhfjyEBENL RffPfKCUn4nbBAZnGCzSoJ09uBPPpt7PNyItkRzipjcPIwnRv3XL58H0YS8nKGo97lUv x6irLLU3eDdIirt85v37kgsn8Q6K17/FLczLLSeTJLhpOV1LkEnt70zpO+B8bZue/FRu oXk0r57Et1pfZ/CQDX6mADQwA4LJddQaTqVgFiTh/ujk6yHLF/yOA99uhdiiFXhSNbeJ 05msodqhXUqa467PNSwb6TaaCIh25VCT1DeEWkOOOMTOmjCRBmvlRd5yVyRpKAIcjQ85 jDxQ== X-Gm-Message-State: AFuF++kZd5kDtLxx/NVzKgOZn05WZJf8ETKuCSFMOj2yXiyeI8Fg6dS8 jP3u3J30tVRhOXpbBp/rBbPJjqLG5Ir31axHPvyPfzCrgECfTOJ6LeycxZoY9uFWKrRgIsrGhhi 7cLb2aZA= X-Gm-Gg: AR+sD12Hp38EI5556RLdPWRF9cF1jAGZ3fsiKtLQ9inie+iAb3XnUhy5s4dAmDkuC9S gdQJ3WWDfW7aGlmk9kngyz4MI2CQm+/ml/PwNk9RtdfW8ccrX3XQ8zAs1C2fTrZihP4qfAqxgnQ unPnHZaydy1DYrNA/zhgY1bnFDkG59TH6qyRfjfQrrvTtEfWheo+ufKVjGP7cXtG4I8VISj1KXP txax380oWH6VVQ3FqZqHQwW9nlucYwA/E840I5EuBXflmGAD5WZmuznNtb/pLmM5GdqSenCyFFz FGRRjbm104VgwYHM9GlS6mpTDej/XK7gmVb2GHi/wlXjF9U7SW7MxFmzA4qTwkK4yB1xu6FKkYW sLpAcBFDFEnyjKxcaBo/KVeUceqOn4JnKk5r7QORuUJ+NbPKJrgkRuuamUdY8keD6rhyWp9v92Z XWwBWxuKVVHkGRpHc/s5PxSfTBdvGCas3Nu2qwmYTIFjFTV846sUolPNQRCnHv/GMYkzZQNKQ= X-Received: by 2002:a05:600c:530e:b0:49c:d618:e341 with SMTP id 5b1f17b1804b1-49ce584bb4amr83885245e9.14.1788349425011; Wed, 02 Sep 2026 04:43:45 -0700 (PDT) From: Andrew Cooper To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk Subject: [PATCH 3/4] x86/bitops: Remove ADDR Date: Wed, 2 Sep 2026 12:43:38 +0100 Message-Id: <20260902114339.62043-4-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260902114339.62043-1-andrew.cooper3@citrix.com> References: <20260902114339.62043-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-purgate-ID: tlsNG-d25034/1788349425-020C1A5B-99BEC875/0/0 X-purgate-type: clean X-purgate-size: 4833 X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1788349451328154100 All this does is obfuscate the usage sites. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Teddy Astie CC: Stefano Stabellini CC: Julien Grall CC: Bertrand Marquis CC: Michal Orzel CC: Volodymyr Babchuk --- docs/misra/rules.rst | 3 ++- xen/arch/x86/include/asm/bitops.h | 34 ++++++++++++++++--------------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index b3e929307d51..d6be4b0c5d43 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -212,7 +212,8 @@ maintainers if you want to suggest a change. static inline void set_bit(int nr, volatile void *addr) { asm volatile ( "lock btsl %1,%0" - : "+m" (ADDR) : "Ir" (nr) : "memory"); + : "+m" (*(volatile int *)addr) + : "Ir" (nr) : "memory" ); } #define set_bit(nr, addr) ({ \ if ( bitop_bad_size(addr) ) __bitop_bad_size(); \ diff --git a/xen/arch/x86/include/asm/bitops.h b/xen/arch/x86/include/asm/b= itops.h index fbcab32fd239..45fc64474344 100644 --- a/xen/arch/x86/include/asm/bitops.h +++ b/xen/arch/x86/include/asm/bitops.h @@ -9,16 +9,6 @@ #include #include =20 -/* - * We specify the memory operand as both input and output because the memo= ry - * operand is both read from and written to. Since the operand is in fact a - * word array, we also specify "memory" in the clobbers list to indicate t= hat - * words other than the one directly addressed by the memory operand may be - * modified. - */ - -#define ADDR (*(volatile int *) addr) - /** * set_bit - Atomically set a bit in memory * @nr: the bit to set @@ -32,7 +22,9 @@ static inline void set_bit(int nr, volatile void *addr) { asm volatile ( "lock btsl %1,%0" - : "+m" (ADDR) : "Ir" (nr) : "memory"); + : "+m" (*(volatile int *)addr) + : "Ir" (nr) + : "memory" ); } #define set_bit(nr, addr) ({ \ if ( bitop_bad_size(addr) ) __bitop_bad_size(); \ @@ -73,7 +65,9 @@ static inline void constant_set_bit(int nr, void *addr) static inline void clear_bit(int nr, volatile void *addr) { asm volatile ( "lock btrl %1,%0" - : "+m" (ADDR) : "Ir" (nr) : "memory"); + : "+m" (*(volatile int *)addr) + : "Ir" (nr) + : "memory" ); } #define clear_bit(nr, addr) ({ \ if ( bitop_bad_size(addr) ) __bitop_bad_size(); \ @@ -140,7 +134,9 @@ static inline void constant_change_bit(int nr, void *ad= dr) static inline void change_bit(int nr, volatile void *addr) { asm volatile ( "lock btcl %1,%0" - : "+m" (ADDR) : "Ir" (nr) : "memory"); + : "+m" (*(volatile int *)addr) + : "Ir" (nr) + : "memory" ); } #define change_bit(nr, addr) ({ \ if ( bitop_bad_size(addr) ) __bitop_bad_size(); \ @@ -162,7 +158,9 @@ static inline int test_and_set_bit(int nr, volatile voi= d *addr) asm volatile ( "lock btsl %[nr], %[addr]\n\t" ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t") : [old] ASM_FLAG_OUT("=3D@ccc", "=3Dr") (oldbit), - [addr] "+m" (ADDR) : [nr] "Ir" (nr) : "memory" ); + [addr] "+m" (*(volatile int *)addr) + : [nr] "Ir" (nr) + : "memory" ); =20 return oldbit; } @@ -208,7 +206,9 @@ static inline int test_and_clear_bit(int nr, volatile v= oid *addr) asm volatile ( "lock btrl %[nr], %[addr]\n\t" ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t") : [old] ASM_FLAG_OUT("=3D@ccc", "=3Dr") (oldbit), - [addr] "+m" (ADDR) : [nr] "Ir" (nr) : "memory" ); + [addr] "+m" (*(volatile int *)addr) + : [nr] "Ir" (nr) + : "memory" ); =20 return oldbit; } @@ -268,7 +268,9 @@ static inline int test_and_change_bit(int nr, volatile = void *addr) asm volatile ( "lock btcl %[nr], %[addr]\n\t" ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t") : [old] ASM_FLAG_OUT("=3D@ccc", "=3Dr") (oldbit), - [addr] "+m" (ADDR) : [nr] "Ir" (nr) : "memory" ); + [addr] "+m" (*(volatile int *)addr) + : [nr] "Ir" (nr) + : "memory" ); =20 return oldbit; } --=20 2.34.1 From nobody Thu Sep 3 07:03:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1788349450; cv=none; d=zohomail.com; s=zohoarc; b=n7bXGORoAu2C+IYGdHGuggxywveLscf6uEB2W61s2zDRmJZpIS+gkS+QIKE3rzDM1+AiaT7foI2sW81U4+gcJx648frIljutjLZXLkj3mXa87Be7yptGo5uqTAYQbM7BMkjIxjzc+3MKN4KuhFHY6k/I0wHyNy2flo1hyHZHsTc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1788349450; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=UPYy19A3VYnJ024xk3KSPpW7Iy5omW83P4l1qm8dQF8=; b=ZYzXA5bi2CC1iR5rmr1YjWEPA4B974jb9433jquvLcc0kY8gDCk9WGjPBa9/MxoaqTf9AIXKjfSus1Ne7czGmDhv1nadO2xUNlYYL1XqlL4izosmtyIqGO+LIFw+bGWFCAQI/vo/R+jqp8db3X34S9l5xhlAgBDjDf+glDU2WiM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1788349450735224.84741967310765; Wed, 2 Sep 2026 04:44:10 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1405699.1639175 (Exim 4.92) (envelope-from ) id 1x1jNc-0006po-Ox; Wed, 02 Sep 2026 11:43:48 +0000 Received: by outflank-mailman (output) from mailman id 1405699.1639175; Wed, 02 Sep 2026 11:43:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1x1jNc-0006pE-LF; Wed, 02 Sep 2026 11:43:48 +0000 Received: by outflank-mailman (input) for mailman id 1405699; Wed, 02 Sep 2026 11:43:47 +0000 Received: from mx.expurgate.net ([195.190.135.20]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1x1jNb-0006XK-6f for xen-devel@lists.xenproject.org; Wed, 02 Sep 2026 11:43:47 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1x1jNa-002dpt-JZ for xen-devel@lists.xenproject.org; Wed, 02 Sep 2026 13:43:46 +0200 Received: from [10.42.69.12] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a980bf1-2eae-0a2a0a5409dd-0a2a450c86b0-4 for ; Wed, 02 Sep 2026 13:43:46 +0200 Received: from [209.85.128.44] (helo=mail-wm1-f44.google.com) by tlsNG-d25034.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6a980bf2-f479-0a2a450c0019-d155802ced19-3 for ; Wed, 02 Sep 2026 13:43:46 +0200 Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4998b5a63e2so9470345e9.1 for ; Wed, 02 Sep 2026 04:43:46 -0700 (PDT) Received: from andrew-laptop.. ([185.110.61.35]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49ce46422desm61190055e9.1.2026.09.02.04.43.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2026 04:43:45 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=google header.d=citrix.com header.i="@citrix.com" header.h="Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1788349426; x=1788954226; darn=lists.xenproject.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=UPYy19A3VYnJ024xk3KSPpW7Iy5omW83P4l1qm8dQF8=; b=IO6uFrMWviobIVYavFcstMOKvicLVopc8qCNhnPgWraK5QuVGVB4jCehrAfbKY+o1I zoqVmyEGT3MgrZ47YgssqqCkZuA0p/+F4bwI8W14JjWonKpcdzfmiNRkX30sh8ymQ5ms lBVhYLtCFFe5NckXzMa9FI0qR0P2/Q0+BVdPc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788349426; x=1788954226; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=UPYy19A3VYnJ024xk3KSPpW7Iy5omW83P4l1qm8dQF8=; b=C9gRq8VrmS6oPi1nEguj4aUyQBX/oRzNmbIRp0kxQy6NsUhOmxdHzR0uBwyciWndhB drzvcgvD5rDIi0sTMi94LNHEgHEOBnw+ig8ARjWiRujBKz4GE5gRNszkz7VANlyCBEl1 a0XvuY8OMhVbRj+AxBVyC5uHp5ObFN7oWXByRdnWaFOXu0XcrgVnQVb9F4qC3T3OYmz0 J/o0TiIuLL1LRTiwn/5exDTFZ1CxN5QlJh/FI/Da5/7jcAmkmS0FiM3kX4idJQvlR8zr QpQ2P5XBbSqa+Z0ysElzfJAc1AQgLhg6GKIiMfM5SSwId3IiqUujr51fudEnXsLeuZRi dB2Q== X-Gm-Message-State: AFuF++lHNqHEeQREgQoIW+lkI6WyMY+Ro+sTWd/EQryvPt2U7wDH8Zk4 YmmvEF+tvuUG3sFw0vNIzK1g3uBloZT1IPRViV5vsuu34BeTUsqqA84qZ+9yUA64DJlrcnD2cD9 oRQbXMRg= X-Gm-Gg: AR+sD12ignx7cKVomi4oOlW5loU8HJEIsASsu+HBT35qqcqVnLIQV9xQOrZ8INujhJm Ggk53+ptOkgiPaJ3RWP3E5UrE0eqD7r4Wglh4yuTh9VJO+/be2njWWhkGyWbfSPXbHQ5wuq1ghv fTvemrzd5kQ/ON8P1C6aWV3a5VOZUloTnwzjv09W/rEqxT1A4NpU6IB4J5LzRwxe/6h1HWQyB+b sEq3BlgAiCFfTdzNeUw+t/lXEIECyaDG2psIiZxm5TVGC0Fspw8dfEddVMQcSMFTtk0bvHG3Xzw a31Y6vZ3P9Bb0vYjwBihj5nbFylzgGCPgUg11GWv+oxBNDnSQ6tRafq+PBeaq7fRQ7YqTmMAzIG lxJozXuLWqPnThY26f7G+nV63UJJYzsaN9CK4kAWMAYlK1E3PM2jvhiKRGVzHvy6hp1Yx+fsJhK 8y09xnD8wbyLs8Eu7qOj7AoT1w7zr0H/B2InoMhvuCOZe8aMss27i9NxtX+FdVOLeCLaI+M3Aj X-Received: by 2002:a05:600c:1906:b0:499:8b13:3a98 with SMTP id 5b1f17b1804b1-49ce57e7a9dmr68340755e9.4.1788349425726; Wed, 02 Sep 2026 04:43:45 -0700 (PDT) From: Andrew Cooper To: xen-devel@lists.xenproject.org Cc: Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk Subject: [PATCH 4/4] x86/bitops: don't cast away volatile-ness Date: Wed, 2 Sep 2026 12:43:39 +0100 Message-Id: <20260902114339.62043-5-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260902114339.62043-1-andrew.cooper3@citrix.com> References: <20260902114339.62043-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-purgate-ID: tlsNG-d25034/1788349426-5270FA5B-662980E7/0/0 X-purgate-type: clean X-purgate-size: 2542 X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1788349453386154100 From: Jan Beulich Doing so, besides being a bad idea in general, violates Misra rule 11.8. Use the helper macro we have available anyway. No functional change intended. Fixes: f1879b2c2584 ("xen: introduce generic non-atomic test_*bit()") Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Teddy Astie CC: Stefano Stabellini CC: Julien Grall CC: Bertrand Marquis CC: Michal Orzel CC: Volodymyr Babchuk Rebase over removal of ADDR. --- xen/arch/x86/include/asm/bitops.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/include/asm/bitops.h b/xen/arch/x86/include/asm/b= itops.h index 45fc64474344..8f6bea388035 100644 --- a/xen/arch/x86/include/asm/bitops.h +++ b/xen/arch/x86/include/asm/bitops.h @@ -185,7 +185,9 @@ static inline int arch__test_and_set_bit(int nr, volati= le void *addr) asm volatile ( "btsl %[nr], %[addr]\n\t" ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t") : [old] ASM_FLAG_OUT("=3D@ccc", "=3Dr") (oldbit), - [addr] "+m" (*(int *)addr) : [nr] "Ir" (nr) : "memory= " ); + [addr] "+m" (*(volatile int *)addr) + : [nr] "Ir" (nr) + : "memory" ); =20 return oldbit; } @@ -233,7 +235,9 @@ static inline int arch__test_and_clear_bit(int nr, vola= tile void *addr) asm volatile ( "btrl %[nr], %[addr]\n\t" ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t") : [old] ASM_FLAG_OUT("=3D@ccc", "=3Dr") (oldbit), - [addr] "+m" (*(int *)addr) : [nr] "Ir" (nr) : "memory= " ); + [addr] "+m" (*(volatile int *)addr) + : [nr] "Ir" (nr) + : "memory" ); =20 return oldbit; } @@ -247,7 +251,9 @@ static inline int arch__test_and_change_bit(int nr, vol= atile void *addr) asm volatile ( "btcl %[nr], %[addr]\n\t" ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t") : [old] ASM_FLAG_OUT("=3D@ccc", "=3Dr") (oldbit), - [addr] "+m" (*(int *)addr) : [nr] "Ir" (nr) : "memory= " ); + [addr] "+m" (*(volatile int *)addr) + : [nr] "Ir" (nr) + : "memory" ); =20 return oldbit; } --=20 2.34.1