From patchwork Fri Feb 28 10:32:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 869285 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:1561:b0:38f:210b:807b with SMTP id 1csp716322wrz; Fri, 28 Feb 2025 02:33:57 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVO1Mqb/fKNdG18ChUeak79bvqfzqmIIV1aFJVErrqgVupOvHRrXE5kDoLs6e8VBL05dGpneQ==@linaro.org X-Google-Smtp-Source: AGHT+IEvdii9kWb1Bsyl0Ku641Gkxrvt9WKArwXwY+V3qkUvIOGIEXwts/RMRK5izemowD92XBys X-Received: by 2002:a05:6214:248f:b0:6d1:7433:3670 with SMTP id 6a1803df08f44-6e8a0c80216mr40581766d6.4.1740738836871; Fri, 28 Feb 2025 02:33:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740738836; cv=none; d=google.com; s=arc-20240605; b=fuepxF5KYOUsgTgjWnB/5J8aqIKHOSWAyPtMz/ilfmTrdUoH29Jz6gGegFMfurk0ra IEtVBQpsZnWNY6GLHl94MOWz1/KK84qbo6x49VSJdpTvPPc2MorDC0mCzHdBO52jXJHP 9Ta6SK9xUohaxfME/m3rGJpkcjt9TVydp96McJ04K4PIdXfu5AW/uv140NGD4VspUhAW 2Lf8PCC+3inr6l1w/aK0A9X0TB3Xokb+0BydbSJVVN0pCQIPnIWVgr9z76k6tIbGYPRu Md7IaZkK5Djfemhea2RPMtldRYIVXrNQIbPGKxJHbvpD67QEiOWa1WNAO4TVU7/it/Oz DSJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=BVzkFSgjMBDDzRoiVaiSW3Wxe54Mxry7NDIS4okWF2g=; fh=mN+7zamMqtxpbv5qGNGIO/QHsXnjUAqHW/yN5gisKlY=; b=H8oduxyB7KDGUJszawO8LiWjjWsB7UQEF0Dysde1LFUCrCg5suk5OWmYAJmisKMLr2 jlLSZnZnPqfvx4ar7YiSwfmXYFsjNtDR4pTi4dXBY2O3YGTXVnz2GYh+C6UHIn9+5qnj GYR8qWkRH1WqVNbmx8CpSkeYBPpegwR0SMs5iJ+X94uF8DJG8C4qYo01NIIN5Dago5ll wfwsTs1FG7iJtMFYrImSD9d+Gw2ZogAP9U9IeJa3YmKOr0STlQR2cWDlKBH1BuIvyWkx 8hhJFZGL876a0jqsGT51q4fvxOkGH6pXmKtZnNLp05S5kOzJnrWoyMw+vMdaUDWwOzP8 31Og==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XSPjy0RD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4747243bfaasi29913151cf.595.2025.02.28.02.33.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Feb 2025 02:33:56 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XSPjy0RD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tnxg4-00071N-Hh; Fri, 28 Feb 2025 05:33:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tnxfS-0006gT-1g for qemu-devel@nongnu.org; Fri, 28 Feb 2025 05:32:33 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tnxfP-0003rE-Om for qemu-devel@nongnu.org; Fri, 28 Feb 2025 05:32:29 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-439a4fc2d65so19950095e9.3 for ; Fri, 28 Feb 2025 02:32:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740738745; x=1741343545; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=BVzkFSgjMBDDzRoiVaiSW3Wxe54Mxry7NDIS4okWF2g=; b=XSPjy0RDOrZIW3cd7fkkyucFGSHgvt8mTMbCh9UZlXHZGfi0CM+KKOJrPIcw4h+m/r 3k2L67tEI0EXMP+8tA7hoyqOWF0JT6cZ3CXUymvxLbYILXeaUrLvGpDMYZa8byEHuyO9 HWMwmUjoJWJw+b/1vP72uJqm35i3nfPuR7giq5s8ccEsIN3bX3SE0VELjNNH6cfqwyiB 4KEBh8JUNrjH9Bs2Nbx8clUr32TcGAd5wYOimp7GlnvmNJbD8qxJE/uEt3xnuuYAdj8l u47h0wSyqjvqv7G2tG6qia474JtXG4XTAUsMLmhPXI+tsTeilPXr8Y1a78vzhS7+OejL enag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740738745; x=1741343545; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BVzkFSgjMBDDzRoiVaiSW3Wxe54Mxry7NDIS4okWF2g=; b=aGg3J/TU/e9acAW/ijCs5vJ55fstXOhDEnaNfmI1oKZEykG6XeXnnIoGIcnABCsyS7 woy42KoIKBL4noy3iUZf7dSttZK1v4t8fYBru/uxEUsNxq8onPXhjCWW4VsIktuhuq00 uRxaescF7H8InZOd8pt2xbrmS2d0Lbz4a4TjEG8h5FAx0R3IZa6mAvjsOxZCaEUaPjJI DdEZhvmRmQLIv/9D4t7Cd0LWvIULkq73K3M08h4fhqpD0bjXPiAnmQHMrBFBfXK4gVRC 3Va2MkZCv7oauSBLpc8HHbguEq6vOOjNM+JEiAGjvUPczltg1IFhXWOBLReMPN6GZgSS GtzQ== X-Gm-Message-State: AOJu0YzGSiOhq3zuPYSlDzydiGK6AXT4ppPkyVhGp8JR83VjyvjjcYi9 ItcjH/LAdkZcH3N4sGVmbkrtL0ROuEgyzFWvFF47jRsv+5uS2dj46Cg4Hm/1zeFgLiImQw9Qsbj S X-Gm-Gg: ASbGnctK9QA4aUtAxffOWGiV2T3OQA7ah7NcpCmeiQ5MYChe1SNa8RK4TQ4yoH9v3qz uaVDhA1UIySDirX543V75s6vbBBfWGYA3Zrq5pW6tVnRR5dxBSTZsiDLWnN0xdELVutcp9a0sV1 c5W5WhLYzX4greNN8JyNA5M6JCer4fiD2mCCPg8Q0neVvdYY0++bpMYUyWFegzoVDbscpHbnMt6 wZLzJ/Y8B+qvGOvg15KK3lWk5p9QAEOiuS0SV+X1UlWE+nb/ctrhoha/PWvkGZVzJXM2Dhzdx77 I3EKulW9bje6oMy18n0EfwfSwSFNxNvl X-Received: by 2002:a05:600c:3ca8:b0:439:9424:1b70 with SMTP id 5b1f17b1804b1-43ba675caafmr27924355e9.30.1740738744709; Fri, 28 Feb 2025 02:32:24 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43aba571274sm83514305e9.31.2025.02.28.02.32.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Feb 2025 02:32:23 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PATCH] include/exec/memop.h: Expand comment for MO_ATOM_SUBALIGN Date: Fri, 28 Feb 2025 10:32:22 +0000 Message-ID: <20250228103222.1838913-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Expand the example in the comment documenting MO_ATOM_SUBALIGN, to be clearer about the atomicity guarantees it represents. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- include/exec/memop.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/exec/memop.h b/include/exec/memop.h index acdb40a9b3b..407a47d82c7 100644 --- a/include/exec/memop.h +++ b/include/exec/memop.h @@ -91,8 +91,12 @@ typedef enum MemOp { * Depending on alignment, one or both will be single-copy atomic. * This is the atomicity e.g. of Arm FEAT_LSE2 LDP. * MO_ATOM_SUBALIGN: the operation is single-copy atomic by parts - * by the alignment. E.g. if the address is 0 mod 4, then each - * 4-byte subobject is single-copy atomic. + * by the alignment. E.g. if an 8-byte value is accessed at an + * address which is 0 mod 8, then the whole 8-byte access is + * single-copy atomic; otherwise, if it is accessed at 0 mod 4 + * then each 4-byte subobject is single-copy atomic; otherwise + * if it is accessed at 0 mod 2 then the four 2-byte subobjects + * are single-copy atomic. * This is the atomicity e.g. of IBM Power. * MO_ATOM_NONE: the operation has no atomicity requirements. *