From patchwork Thu Oct 19 13:35:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 735585 Delivered-To: patch@linaro.org Received: by 2002:adf:f0cd:0:b0:32d:baff:b0ca with SMTP id x13csp1522428wro; Thu, 19 Oct 2023 06:42:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGsZj0phdxkmdC7Zblx7GRbQdOT98Oe8ARSCCRW82+Oy5AXfRqlsrsXL37SpC7PZ72oPpmt X-Received: by 2002:a05:6214:2021:b0:66c:fcfc:9174 with SMTP id 1-20020a056214202100b0066cfcfc9174mr2572685qvf.41.1697722957727; Thu, 19 Oct 2023 06:42:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697722957; cv=none; d=google.com; s=arc-20160816; b=iwFey61TM440Me22bLmri0QPDcQM29lL/NFgih1fBUXsm8JwnDYc5g6hGC/MHSGnqB gh8xK05dbwPiReflCZLsfg+nOrw19jn3sf6wGB0kdeFsO1SqndjC+BeP1NG4puXZ6fnH syY81C0LsfEy4ecUNTOlUs8L4Vrjofzy3xTMxtFrqrXDDZHwBiiGxWEwxdVxj2CgjwGK Epjo38SsbRVoH7JoxB7ZyGDFNnu7E5zEIysBtmJL4u6ksAPVeIhVfSxiB8IL+hboTgNe IEZmDG+N/2XHJJ5dDZEYVPb18qzmrCFpJ2eIgH1dTUSraab/GYJoBbQ7aCxGbWekjrtz 0kBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=j1tM+l52FnQrUD9wyepjhR0Rex/I2IZngyzPJkref1s=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=0uTD4r7D5GTCBsGA383pc4GPt8NfoePXFoh9bDOHF+jOOQXrxla5lnkxjeyX1Rr1cL YpnNXNneK2OzwTyfBzyMwUR9dKCsoOdSJ/IU4AkiBa5Vw/h+WYgPcdujDZ4R4xvf9b/Q KyN8FGaCoNWs06J1XkJ2kTUcv8OJ+d8U/jnl1TqgcnHQqRXvTZy5fH4Q0TsmHdTmZIC6 VJvIdhLOBjAOQ+dwOfOysNvsI0eTCt/HN3pzcU8uzKCXmEXZctfjT+txvo5wPGgLHe9J 7jgkRBYwHEeIL13z2lYhVmEJOrLpwuny26NQ+GYkVke0qHs/35ZSqgFg67DEWwRhsceQ MQ0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Dp+OcxpN; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id mv3-20020a056214338300b006588c7b52a1si1603942qvb.303.2023.10.19.06.42.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Oct 2023 06:42:37 -0700 (PDT) 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=Dp+OcxpN; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtTCT-0002XG-6G; Thu, 19 Oct 2023 09:36:33 -0400 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 1qtTBw-0001zM-8z for qemu-devel@nongnu.org; Thu, 19 Oct 2023 09:36:02 -0400 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtTBq-0001EF-T5 for qemu-devel@nongnu.org; Thu, 19 Oct 2023 09:35:59 -0400 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-507cee17b00so1303952e87.2 for ; Thu, 19 Oct 2023 06:35:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697722546; x=1698327346; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=j1tM+l52FnQrUD9wyepjhR0Rex/I2IZngyzPJkref1s=; b=Dp+OcxpNWjSL2Pk8wGLQab1wINoxX25lPkIec2Fo4NALdq3lKsMgW1lMp4PcJvC4GX mvoPl1VjDKF/ZyH2/mSdY4Jvmp58eHObCcqVfESt2TdgJD35ZYsfrTQf+6N8zv8Iodeu qfw0tCWxB/trmsjc3Ctv6zyFrNLcJM9FE1fAk3Ikq/sPeOF8hHJNF8m2q7WqUo3tPTcx /GYC+APwMf5afsQtj3jlKWBch2C/eSY9qjSCZ9uRdDVsY2WJfolGox9m+FmEwpqqheB8 VVZAHHpZhbZ81tesEdOfdRphavztkRMRTZhzbsGbq00SQEIgH8P7VNGaNyTGTltFJejR GUbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697722546; x=1698327346; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=j1tM+l52FnQrUD9wyepjhR0Rex/I2IZngyzPJkref1s=; b=OFk0Ga2s0Oqx8XTOJ90GcR6esMrNDlB0wA9qmBSdyyY3Yg6plRMFWd5cOFo8W5IN9E xfKc9tQhTOUYYj9jkIZa3S06iOU2SinabOul9l7wxTKfTPfzaFbsH7asot0DHzoJb+1e p2Yy8smDAIkzDL0gshjGUKMz6CuL2wQ/ldtoo1mavTcn4mBlyVr4C3Ypbye46on0GJDd OSMy6iYQ71q67J75cpSbY+6umK9W5hIP4Ivrj35cFTdPHFQIoBHU4clci3vy9HagvzLZ bKK2UIMnovJ1WayU//WoOJBFk4YxxfKqXBBJotD6ij5e57JL/MOQMajebVyz+vqWeKWQ cZfg== X-Gm-Message-State: AOJu0Yz4caHjpT2MoudQ7wznYzmiIClZhQHhWHZkUdpxX3Ef7eU7l8l8 OVsxlKc3kVKp7YxjdQB3S/ijdUv/wwS+8A+cKG4= X-Received: by 2002:a19:5509:0:b0:500:9a45:63b with SMTP id n9-20020a195509000000b005009a45063bmr1430942lfe.13.1697722546661; Thu, 19 Oct 2023 06:35:46 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id d28-20020adf9b9c000000b0031f3ad17b2csm4512690wrc.52.2023.10.19.06.35.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 06:35:46 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 17/24] hw/arm/smmuv3: Sort ID register setting into field order Date: Thu, 19 Oct 2023 14:35:30 +0100 Message-Id: <20231019133537.2114929-18-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019133537.2114929-1-peter.maydell@linaro.org> References: <20231019133537.2114929-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=peter.maydell@linaro.org; helo=mail-lf1-x131.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 In smmuv3_init_regs() when we set the various bits in the ID registers, we do this almost in order of the fields in the registers, but not quite. Move the initialization of SMMU_IDR3.RIL and SMMU_IDR5.OAS into their correct places. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Mostafa Saleh Reviewed-by: Eric Auger Message-id: 20230914145705.1648377-3-peter.maydell@linaro.org --- hw/arm/smmuv3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c index 6f2b2bd45f9..f03d58300fa 100644 --- a/hw/arm/smmuv3.c +++ b/hw/arm/smmuv3.c @@ -278,15 +278,15 @@ static void smmuv3_init_regs(SMMUv3State *s) s->idr[1] = FIELD_DP32(s->idr[1], IDR1, EVENTQS, SMMU_EVENTQS); s->idr[1] = FIELD_DP32(s->idr[1], IDR1, CMDQS, SMMU_CMDQS); - s->idr[3] = FIELD_DP32(s->idr[3], IDR3, RIL, 1); s->idr[3] = FIELD_DP32(s->idr[3], IDR3, HAD, 1); + s->idr[3] = FIELD_DP32(s->idr[3], IDR3, RIL, 1); s->idr[3] = FIELD_DP32(s->idr[3], IDR3, BBML, 2); + s->idr[5] = FIELD_DP32(s->idr[5], IDR5, OAS, SMMU_IDR5_OAS); /* 44 bits */ /* 4K, 16K and 64K granule support */ s->idr[5] = FIELD_DP32(s->idr[5], IDR5, GRAN4K, 1); s->idr[5] = FIELD_DP32(s->idr[5], IDR5, GRAN16K, 1); s->idr[5] = FIELD_DP32(s->idr[5], IDR5, GRAN64K, 1); - s->idr[5] = FIELD_DP32(s->idr[5], IDR5, OAS, SMMU_IDR5_OAS); /* 44 bits */ s->cmdq.base = deposit64(s->cmdq.base, 0, 5, SMMU_CMDQS); s->cmdq.prod = 0;