From patchwork Fri Feb 9 09:05:07 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: 771307 Delivered-To: patch@linaro.org Received: by 2002:adf:9dca:0:b0:33b:4db1:f5b3 with SMTP id q10csp749968wre; Fri, 9 Feb 2024 01:07:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IFuSWy+S+DKwanXSFOqDepZWjce0vQ9qi6Kzrs1k1m3gQ49jux8dJwwaRas2lebe6oRbPWl X-Received: by 2002:ac8:5c0d:0:b0:42c:51e1:9b15 with SMTP id i13-20020ac85c0d000000b0042c51e19b15mr1196970qti.14.1707469622821; Fri, 09 Feb 2024 01:07:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707469622; cv=none; d=google.com; s=arc-20160816; b=j12nnRxzOeuYE+XvSQG1jXS3bKDuWSEQPr8w/QsEqVzKJEOFUkJSit7nxTd+q60W+z Cat53izlTUc8dYYXFFGsrQO6JfAUM6j5dMCoVVe+dJ8DF81SdCA8CslCPkErQUoweUIl EU9s6FEDb239Hil3bVvXe5Uts/YMxr+ZGsNpAyunoHbFFIDjo/ZAho8EqSBaBgU7Z1tH 8KEgahw9CpXxEwB/NrCGbm/K3VYdwolEWKa39lcTtxssYssZuSASVL3JC5RlkPYnE8px L+Kh9+kwIV1y++s0zuFri0jSiBdw3Qg2Pj56Yq6uP4vgnjCxbcNF0kTppMq3oYohCUb6 C13A== 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=ahGl576821/GPhzoaU/l92B3Gi9UsGeCtBiy/M2bP2c=; fh=dMwjZAYe5EARx7/Rw+0an66BmxFhm+UdfqrI8Wwe6EY=; b=hyUoQ24iHP9FPupsM8XbLotmoiCc39gOW2GN3nFPzjWQWyD2fSfbXHP8qeEdXpzDSt zXD2Wp01rADXAJAYNbizeSH5EgLFw0UTAr/ucZdGluuudBHLP2n1kLRroGBng6xDA84E PrMtWF7XkfMl+2Ha4G1pKcIYBNvsNXFUvqcPDKVMj5hnu60/QsCnnnxkB1Ic/zpNc9y9 pqG2X5medlGamuRbJv7gy2OlMsowXx0hbwipmrDcZ9p+3HncV8tD9fEubEakpdgPKoTI sioAiTsPzcvxzkIKut9e+HvHRAXT5Zgx6lfs7ZFHrWF3zVnfTzqdO7f31EBbxQ2R2fx2 Je7w==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zRAabjQh; 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 X-Forwarded-Encrypted: i=1; AJvYcCVEqycdT51x0fr8xJbTbsnL5hb+AW9xLbIvLUb1T8HOc5RzOacD+FuyByfmMRNZtJdaVJzfJakHWQio+HDpXTqa Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g16-20020ac85810000000b0042c2e7cec94si1439669qtg.219.2024.02.09.01.07.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Feb 2024 01:07:02 -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=zRAabjQh; 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 1rYMpY-0005RQ-7q; Fri, 09 Feb 2024 04:05:56 -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 1rYMpW-0005RI-CI for qemu-devel@nongnu.org; Fri, 09 Feb 2024 04:05:54 -0500 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rYMpU-0000gE-J2 for qemu-devel@nongnu.org; Fri, 09 Feb 2024 04:05:54 -0500 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-5114fa38434so740704e87.0 for ; Fri, 09 Feb 2024 01:05:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707469550; x=1708074350; 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=ahGl576821/GPhzoaU/l92B3Gi9UsGeCtBiy/M2bP2c=; b=zRAabjQh37izhSxFMEp0RgP2iVF3e9hKVSBjmDDaYlaxJfOd1aI5F7lLULGqfxpMba R3cQolo2N/W/7pLH0HEHRenHAn8k603bSP7NhlcE/JBvYkReTYJgIC8GisjG/cHyEbdY nHzfKlWUJ4Md0pG4Psth59PpSglaO/lQwqh6Doh4pXXRoEJhA/XaUH+VG/+z1NA1h4ML NvFbPxvcNdS/EEsx07xrIV1/gR6xmK8mSb5RTLKpZC79vAyT7mAl8D8G3xdGGmWSG97B +8/dyqsUYF6x8knEy+3w75RK64+cf0U8vaMCayTEx4iL4A3brlTmbhd8YIww66U59NPV m7rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707469550; x=1708074350; 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=ahGl576821/GPhzoaU/l92B3Gi9UsGeCtBiy/M2bP2c=; b=O/lhTWcmq5w+0xbXgY7ykCyN0Gq3KDYRgVLjO1kOcZ/GfsXYf2U+t0D4kz3QyqyLeP SA5LQ6liiSpujcBTwdmGrVj0JzeTYFNgPG7+wTf73ZEv6u65PErEOOjoUjjh+aAXe6zK 3ZJxRf8wzwSLEMhxDc8NeDHYOwSxfdZJ5cOI1hQ5NWq4jBqGTULt+EwJisc/nXYyxUNx TRtyyzjZHARqxggqz4KJ2t1ItVnM7WkR4KaSx80QzSoiEwnQkAcS5Ywzp/ygku6eWNDg ol4NOdHyz4gjQlUDiLXg520Os07aRtVb1Xe46dhmBnfD4+zbrbgPU4DD5XG2hKfTUAFP jPhg== X-Gm-Message-State: AOJu0Yzr6HjqBZmikcc/sckRw9O9XBcMHPvZqB1yIl3nZFMgAR9C9+8T TkiymOe1K/mwnbslm38XkZY6ax2vmnWUvgUc36Rm7+GUpFsJTogFRzlag1pGfn64YawK1jOQtSo Kkog= X-Received: by 2002:ac2:43ad:0:b0:511:62b4:2a03 with SMTP id t13-20020ac243ad000000b0051162b42a03mr651142lfl.62.1707469550547; Fri, 09 Feb 2024 01:05:50 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVPehQY/5wqZU8VfWtxvAs+2e61QqMGWPgCtdo+dml3sNmvpx1qFhBDj3DS9rFJBiT3DerPZ5HhG+UpXlw2wPB3D4EOsFA6YZUrRTEMwSeYD1Y4fXd1D7CfyqoVF/LGfOuIKOZJUDdNwjjpkxhFIiA8e8+5xTh2F0mZXdXFrWVNyvzhiuYnu6x4kSzgnjv0yrCEfN+RnYB/VRl5+4F14UJQAv5wsTPnA1nvHoAOkrdxsTXmQ5mKsMHaW6pqRvEGLKs0PEQmFwKH3eaKWB+kMLKtF7derysr5SsjkRLQb5UahqLxEoDobYfF9quopcj6eFpsezSOPOBNL1bXJjBaY5PBYD0uBhs= Received: from m1x-phil.lan ([176.187.218.105]) by smtp.gmail.com with ESMTPSA id n44-20020a05600c502c00b004104c42ad5asm1966194wmr.22.2024.02.09.01.05.49 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 09 Feb 2024 01:05:50 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Aurelien Jarno , Laurent Vivier , Jiaxun Yang , Paolo Bonzini , Peter Maydell , Huacai Chen , Richard Henderson , Aleksandar Rikalo Subject: [RFC PATCH 06/11] hw/misc/mips_itu: Remove MIPSITUState::saar field Date: Fri, 9 Feb 2024 10:05:07 +0100 Message-ID: <20240209090513.9401-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240209090513.9401-1-philmd@linaro.org> References: <20240209090513.9401-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=philmd@linaro.org; helo=mail-lf1-x135.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=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 This field is not set. Remove it along with the dead code it was guarding. Signed-off-by: Philippe Mathieu-Daudé --- 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);