From patchwork Wed Oct 11 12:43:12 2023 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: 731963 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp384360wrv; Wed, 11 Oct 2023 05:44:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG4iiPIgtwo7RndldCTzFTLh3dYoM+cXqcaNCmRq4pHYVbdcYep0wPii5SVP2hG3vdVBNVl X-Received: by 2002:a05:620a:4415:b0:775:9a30:f2d8 with SMTP id v21-20020a05620a441500b007759a30f2d8mr26348739qkp.24.1697028276962; Wed, 11 Oct 2023 05:44:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697028276; cv=none; d=google.com; s=arc-20160816; b=KkQ1udskTncy4ZQW125Rv+8RoSvLXLs4GMx5FzpQTfclJf5zxwYhiYFkviP8lqfZhX ItPsgxhWsRMSDslWah2aR7vAoRhgclX5CctI/7ZICv1e07LwwF7jD7RPVBBK+LBcMcnr QVBEOuqpO3ZUQSRmCp+Aaa4697WWTzB/oWtlYtSfHUUsRF5X+Ux7n0uxdWGlHkcoUvHz otY9MhppXm+iEydNvVfQiT6twW/gcIfQjebXdCCN9/Ap/Yj6quyb/j2T3Aa9/clAgJrc Ww2U2xdjX4INDFPwTBrhFE6DKrSWvUAB5BQ6micbN0PFfip2FFXShCgsyDeyfDIQQ50f f2gA== 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=vxaAINrq3Mze6vSSQ9tfijhvvCdKsip5zQTvkm9DzJo=; fh=NUepcibn3Ul1fs7bXML6Z4FkqQ6xf4q4E0+GyNLWzbg=; b=O2VGeyYx60QipEoW4xlRU+CKHsESk7cPpvww0sEnDx6cs636SKhTtSub4YeYezWqIi AhGBG4ZKzTq8A+Eo6oTRVfgVmaruFERwrjNPpvq3LkQ0I16IAC31sulr98Hmp2yRWSCs RDkxZ3M9uBeMZi3k1I0+d7oFRUGWLxdTmY/JmgHwlzojfkDKkz2ksO6S5t2lVTQwlQnL Qsag41KWZjIBrKzvlqxRbd0nVK+wh+f103ApT3ASJNvbKlnBfvKzfpU1dyOq+AEYxCtJ 0c/LuhKxxRoAqiC/pycngTHfty/yDoOrJ2hopInUT+rJ6ITCMHQFSit4bkeHxXJIYbug ifvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qsssc+Bh; 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 p9-20020a0ce189000000b0066cfb9d8039si2132337qvl.607.2023.10.11.05.44.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 05:44:36 -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=Qsssc+Bh; 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 1qqYYr-0006rS-0o; Wed, 11 Oct 2023 08:43:37 -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 1qqYYk-0006kv-TU for qemu-devel@nongnu.org; Wed, 11 Oct 2023 08:43:31 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqYYi-0003GR-0Z for qemu-devel@nongnu.org; Wed, 11 Oct 2023 08:43:30 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-405417465aaso65225775e9.1 for ; Wed, 11 Oct 2023 05:43:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697028206; x=1697633006; 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=vxaAINrq3Mze6vSSQ9tfijhvvCdKsip5zQTvkm9DzJo=; b=Qsssc+BhXy7W/dzZ3R8wjkCkR/jTqGoWD3aR5+nOr4xUiglKPFQp+q7KGOc83+iBCA m6LmLfdasyAwi9mWTuaJ7xSamGeFBvdr1JbVZr8qnZ57TRFEnbVz2UHZ1SS0ib724nx8 cjbqYsUu87VZ/mw/y0aFQ8B+pGQkspBeDZEwXJai9BFjkh0sdfprMxofvxpINk8pHUq+ sDEsxKM/SnaXW9+ca6uWYLhG21rdVwDzAJloo7ihSlJG1RgN317SUWkRxJTFmunJ6cDW 6+yOCVy5WM330I9rZpLw7akKtDyTiR8wqWPlPelflFTITFBqY8ec/Sz+QX8X4Gige1iY +rOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697028206; x=1697633006; 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=vxaAINrq3Mze6vSSQ9tfijhvvCdKsip5zQTvkm9DzJo=; b=axeuMQs2wXjxWSB0aE2EZpPC/BtH/sviIhe/xEVYW5/wSSQVRw6GfCcaBiDxPxI7cV 1Zq6w3V+DlKuMCPUv56xPYfyUppzNo9VbKL9862wikJ4ixyeBwQERV7+FkwJeoBqgYI0 t7aNI0kbIXLm+7obwEfYkr5cBlfhqrKVCf258l89L0DcMqi/0682qRBT4yGJCQw2r2JH MOz4zTg/5vK0MsDfq6oxLAqKwM6je3puCU/E3sIs0xWavJkQvWztrjVarAQwb++BVtSo 5dGaEeFkODpeJxM7H9gy2IGDFf7QyzknoUQ/Y/beB6/EfHZMrt478U77KvUSKvLVnOlQ y65w== X-Gm-Message-State: AOJu0YwgYKcFuLZOaVwiNbRLlyGNr/uPvw4yZgpPwNID/7nL9BeRuf98 nm9mQCCHXK/tl1LL4TWYEpNHRDsKcgcRthQnSpA= X-Received: by 2002:a05:600c:3b14:b0:407:4944:76e5 with SMTP id m20-20020a05600c3b1400b00407494476e5mr7745351wms.22.1697028206049; Wed, 11 Oct 2023 05:43:26 -0700 (PDT) Received: from m1x-phil.lan (mdq11-h01-176-173-161-48.dsl.sta.abo.bbox.fr. [176.173.161.48]) by smtp.gmail.com with ESMTPSA id t25-20020a1c7719000000b004065daba6casm19158429wmi.46.2023.10.11.05.43.24 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Oct 2023 05:43:25 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: BALATON Zoltan , qemu-ppc@nongnu.org, qemu-trivial@nongnu.org, Markus Armbruster , =?utf-8?q?P?= =?utf-8?q?hilippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 2/2] hw/ppc/ppc440_uc: Remove dead l2sram_update_mappings() Date: Wed, 11 Oct 2023 14:43:12 +0200 Message-ID: <20231011124312.60476-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231011124312.60476-1-philmd@linaro.org> References: <20231011124312.60476-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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=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 Apparently l2sram_update_mappings() bit-rotted over time, when defining MAP_L2SRAM we get: hw/ppc/ppc440_uc.c:83:17: error: no member named 'isarc' in 'struct ppc4xx_l2sram_t' if (l2sram->isarc != isarc || ~~~~~~ ^ hw/ppc/ppc440_uc.c:84:18: error: no member named 'isacntl' in 'struct ppc4xx_l2sram_t' (l2sram->isacntl & 0x80000000) != (isacntl & 0x80000000)) { ~~~~~~ ^ hw/ppc/ppc440_uc.c:85:21: error: no member named 'isacntl' in 'struct ppc4xx_l2sram_t' if (l2sram->isacntl & 0x80000000) { ~~~~~~ ^ hw/ppc/ppc440_uc.c:88:50: error: no member named 'isarc_ram' in 'struct ppc4xx_l2sram_t' &l2sram->isarc_ram); ~~~~~~ ^ hw/ppc/ppc440_uc.c:93:50: error: no member named 'isarc_ram' in 'struct ppc4xx_l2sram_t' &l2sram->isarc_ram); ~~~~~~ ^ hw/ppc/ppc440_uc.c:96:17: error: no member named 'dsarc' in 'struct ppc4xx_l2sram_t' if (l2sram->dsarc != dsarc || ~~~~~~ ^ hw/ppc/ppc440_uc.c:97:18: error: no member named 'dsacntl' in 'struct ppc4xx_l2sram_t' (l2sram->dsacntl & 0x80000000) != (dsacntl & 0x80000000)) { ~~~~~~ ^ hw/ppc/ppc440_uc.c:98:21: error: no member named 'dsacntl' in 'struct ppc4xx_l2sram_t' if (l2sram->dsacntl & 0x80000000) { ~~~~~~ ^ hw/ppc/ppc440_uc.c:100:52: error: no member named 'dsarc' in 'struct ppc4xx_l2sram_t' if (!(isacntl & 0x80000000) || l2sram->dsarc != isarc) { ~~~~~~ ^ hw/ppc/ppc440_uc.c:103:54: error: no member named 'dsarc_ram' in 'struct ppc4xx_l2sram_t' &l2sram->dsarc_ram); ~~~~~~ ^ hw/ppc/ppc440_uc.c:111:54: error: no member named 'dsarc_ram' in 'struct ppc4xx_l2sram_t' &l2sram->dsarc_ram); ~~~~~~ ^ Remove that dead code. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: BALATON Zoltan --- hw/ppc/ppc440_uc.c | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/hw/ppc/ppc440_uc.c b/hw/ppc/ppc440_uc.c index 4181c843a8..643a79e330 100644 --- a/hw/ppc/ppc440_uc.c +++ b/hw/ppc/ppc440_uc.c @@ -73,46 +73,6 @@ typedef struct ppc4xx_l2sram_t { uint32_t isram0[11]; } ppc4xx_l2sram_t; -#ifdef MAP_L2SRAM -static void l2sram_update_mappings(ppc4xx_l2sram_t *l2sram, - uint32_t isarc, uint32_t isacntl, - uint32_t dsarc, uint32_t dsacntl) -{ - if (l2sram->isarc != isarc || - (l2sram->isacntl & 0x80000000) != (isacntl & 0x80000000)) { - if (l2sram->isacntl & 0x80000000) { - /* Unmap previously assigned memory region */ - memory_region_del_subregion(get_system_memory(), - &l2sram->isarc_ram); - } - if (isacntl & 0x80000000) { - /* Map new instruction memory region */ - memory_region_add_subregion(get_system_memory(), isarc, - &l2sram->isarc_ram); - } - } - if (l2sram->dsarc != dsarc || - (l2sram->dsacntl & 0x80000000) != (dsacntl & 0x80000000)) { - if (l2sram->dsacntl & 0x80000000) { - /* Beware not to unmap the region we just mapped */ - if (!(isacntl & 0x80000000) || l2sram->dsarc != isarc) { - /* Unmap previously assigned memory region */ - memory_region_del_subregion(get_system_memory(), - &l2sram->dsarc_ram); - } - } - if (dsacntl & 0x80000000) { - /* Beware not to remap the region we just mapped */ - if (!(isacntl & 0x80000000) || dsarc != isarc) { - /* Map new data memory region */ - memory_region_add_subregion(get_system_memory(), dsarc, - &l2sram->dsarc_ram); - } - } - } -} -#endif - static uint32_t dcr_read_l2sram(void *opaque, int dcrn) { ppc4xx_l2sram_t *l2sram = opaque;