From patchwork Thu Feb 15 17:57:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 772954 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp963592wre; Thu, 15 Feb 2024 10:00:11 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW50ysTL4iiGwDdt0+bXHoPGOu67abL3jAF+TGfI6dBVm8vwULJejlELm0DeHZSIb6xXoCl8tof4GVhFUPrrReV X-Google-Smtp-Source: AGHT+IFCbCYbBaKw/3/ea0Q1r3ofdt8VZvsvrRdP+zIri3UBniFORB0SZSwdxO5sUatOAXB6wmPs X-Received: by 2002:a05:6830:18ef:b0:6e4:323a:29ae with SMTP id d15-20020a05683018ef00b006e4323a29aemr885195otf.30.1708020011176; Thu, 15 Feb 2024 10:00:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020011; cv=none; d=google.com; s=arc-20160816; b=xsGg1uFwjsmLj4nRWla+oLKK5gkkjyfUzwHsqgw4M/tSn8wvvWXNmaG/zr3WzEEdM8 zHtM4NCM8iibCJT+G710HH0PjAjTelWpnSKzVwkU1sj9knWaApKwAYneshExqiQ0EetY qCXaIiXgnXAsKiqVipWCiLyJNjoVQhShFhh6+AqHQXGHPRDoks94my/sOF1zf4Vj0Ved +Xjv+I1Kvu6STii1qwWdSPP5KfT2YjZWzyAECrBqVuCFc5gTEs6Le15KmPn7plOMvUdX yOScDzrW/fWGpXuEbIzcY8jfwh1mbk4pPUOXvoYuNIbsYcpz/hJh87zzVvlBUWxIjXBP 1RKw== 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:cc:to :from:dkim-signature; bh=hD8QAEO8EbU5eNO1CRG3i0Yg3oXr277vzzBLMpE0y8U=; fh=lRC2ncmChQypkkJJdtc0mbB9VdPI1vHsLj93b9zwgOM=; b=cBKBsRlsmbxHMphdDSt8vzozbuaDCj22lS2kfUnC3mJG4zUrBwxwV/PQxITy93k1pQ nIsUf8+NAdG+uCPNWtN/v6XrR/Ove6HE9WN2AZt2kGu87VZHi1DgirXYSmwXiJwqDrec Y52Eo6Y/zP2E5n/hU62Xr4qOLv07NIN44SqyzCjALKPr5vQIuinI+gatJqB5AeNmGSyI nvwwmvekT7zG3Cq+bGcv4E6dNLAHWUjucjJHSA27NgJOg/sEU/geeqXosYt0K4wkcCBn WQmTS9TbE/dP+BuOOaTXYKUMkmltOklupjniCg2kQB6wVEL+CvVt4LADVFvRY6dD0Zz6 riAw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=scyoVn6H; 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 h14-20020a05622a170e00b0042dd90fb5d0si473112qtk.710.2024.02.15.10.00.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:00:11 -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=scyoVn6H; 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 1rag0h-000310-T2; Thu, 15 Feb 2024 12:58:59 -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 1rag0f-0002uu-6y for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:58:57 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag0d-0001dy-BC for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:58:56 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-41223e0777dso5683345e9.2 for ; Thu, 15 Feb 2024 09:58:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019933; x=1708624733; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hD8QAEO8EbU5eNO1CRG3i0Yg3oXr277vzzBLMpE0y8U=; b=scyoVn6Ham4tZol/QCpB1xrrnDs/nLkG3EBS7sOoEp9dhb9kSY1TS6/EDoiNAiaW4h bwsKDZdQKMF1ywawiHVSU33SGBuHoVu/QVeY+EnMleVk34UtXyR7aoeczBV7SCSewqQQ 6vetTpj5AQfMUr+lGrWXJw3VRfUceIn8RGgVgIOCu2sDKoRU1fCZSbCxTIz9PPSo/ba6 VT5OM2CKTfwGU+cQ0JucKwzig29qOV7H1Y+ZxD7QUvS7Q+b7lHjQUa957zklMIGsE20m NE08a1aKeG7XsnfJGmabR0raWHaYXaxXdJt7CPJDyYdcitxXYGlgR4ZoRASJUcJNfAbS Hc2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019933; x=1708624733; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hD8QAEO8EbU5eNO1CRG3i0Yg3oXr277vzzBLMpE0y8U=; b=K7ywZj2YgT+Qcs6Bj36bqFS2x4HGPcad8GuRRgv+HKPbaYRM6uj1DTMgI005k2FBvw awwicLKW1nVlAsJml1nB6ijs4zt47xS+jQxUueAn0SMcI2Q3qCqPNN+4Na4vMrWL2ZwZ J0KRCsU/j0GcRrGhYrs1vWsFu8PGAPhY+iscJ75MhWUdrdto1bp4j9v7dyd9EEVufGXd R6ZwVXxr1NjEAGPnv+uq/FQz61S9XVxPayZqq+AR9OjvERjFwUGCaGaMZt6F4JWiHB7T +QwizROZGnAMATUN6SNeo3f/yJZLqEzFWQdLbNyNxSPmv4wW+IHHdOocW7ZJx8sB0cbt tj0w== X-Gm-Message-State: AOJu0YyRXpCRk94wi96ijAufPy/wXPANNpfk6PPDU6jHUy4uFodCP5PM ypumDp33VRHnHKY0LDPyw6OdqjZRYzLHcXGx1liTOiimUsFkPNYbmGfnCddsemU++aDxzB643Xc BfN4= X-Received: by 2002:a05:600c:46cd:b0:410:cf60:d857 with SMTP id q13-20020a05600c46cd00b00410cf60d857mr1896947wmo.18.1708019933682; Thu, 15 Feb 2024 09:58:53 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id by7-20020a056000098700b0033b684d6d5csm2601836wrb.20.2024.02.15.09.58.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:58:53 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Jiaxun Yang Subject: [PULL 09/56] hw/misc/mips_itu: Remove MIPSITUState::saar field Date: Thu, 15 Feb 2024 18:57:03 +0100 Message-ID: <20240215175752.82828-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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 This field is not set. Remove it along with the dead code it was guarding. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240209090513.9401-7-philmd@linaro.org> --- include/hw/misc/mips_itu.h | 3 --- hw/misc/mips_itu.c | 22 +++------------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/include/hw/misc/mips_itu.h b/include/hw/misc/mips_itu.h index de7400c1fe..27c9a1090d 100644 --- a/include/hw/misc/mips_itu.h +++ b/include/hw/misc/mips_itu.h @@ -70,9 +70,6 @@ struct MIPSITUState { /* ITU Control Register */ uint64_t icr0; - - /* SAAR */ - uint64_t *saar; }; /* Get ITC Configuration Tag memory region. */ diff --git a/hw/misc/mips_itu.c b/hw/misc/mips_itu.c index 9705efeafe..f8acfb3ee2 100644 --- a/hw/misc/mips_itu.c +++ b/hw/misc/mips_itu.c @@ -94,12 +94,6 @@ static void itc_reconfigure(MIPSITUState *tag) uint64_t size = (1 * KiB) + (am[1] & ITC_AM1_ADDR_MASK_MASK); bool is_enabled = (am[0] & ITC_AM0_EN_MASK) != 0; - if (tag->saar) { - address = (tag->saar[0] & 0xFFFFFFFFE000ULL) << 4; - size = 1ULL << ((tag->saar[0] >> 1) & 0x1f); - is_enabled = tag->saar[0] & 1; - } - memory_region_transaction_begin(); if (!(size & (size - 1))) { memory_region_set_size(mr, size); @@ -158,12 +152,7 @@ static inline ITCView get_itc_view(hwaddr addr) static inline int get_cell_stride_shift(const MIPSITUState *s) { /* Minimum interval (for EntryGain = 0) is 128 B */ - if (s->saar) { - return 7 + ((s->icr0 >> ITC_ICR0_BLK_GRAIN) & - ITC_ICR0_BLK_GRAIN_MASK); - } else { - return 7 + (s->ITCAddressMap[1] & ITC_AM1_ENTRY_GRAIN_MASK); - } + return 7 + (s->ITCAddressMap[1] & ITC_AM1_ENTRY_GRAIN_MASK); } static inline ITCStorageCell *get_cell(MIPSITUState *s, @@ -535,15 +524,10 @@ static void mips_itu_reset(DeviceState *dev) { MIPSITUState *s = MIPS_ITU(dev); - if (s->saar) { - s->saar[0] = 0x11 << 1; - s->icr0 = get_num_cells(s) << ITC_ICR0_CELL_NUM; - } else { - s->ITCAddressMap[0] = 0; - s->ITCAddressMap[1] = + s->ITCAddressMap[0] = 0; + s->ITCAddressMap[1] = ((ITC_STORAGE_ADDRSPACE_SZ - 1) & ITC_AM1_ADDR_MASK_MASK) | (get_num_cells(s) << ITC_AM1_NUMENTRIES_OFS); - } itc_reconfigure(s); itc_reset_cells(s);