From patchwork Wed Oct 11 14:07:20 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: 1846781 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=iLKg3bSo; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S5F4Z5hWpz1ypX for ; Thu, 12 Oct 2023 01:09:02 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqZsa-0000DH-PE; Wed, 11 Oct 2023 10:08:05 -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 1qqZsP-0008Re-AG for qemu-ppc@nongnu.org; Wed, 11 Oct 2023 10:07:53 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqZsM-0007FC-Q8 for qemu-ppc@nongnu.org; Wed, 11 Oct 2023 10:07:53 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-406650da82bso63705485e9.3 for ; Wed, 11 Oct 2023 07:07:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697033268; x=1697638068; 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=KoDUpCbTedzPU30CQb9d9uvflh1nTk1L9uLqEJ+jbds=; b=iLKg3bSopm2nhrNM8L1r2ItPIhTXalwhpy/uFBwIZiov/5866RyzSJqyNyiwTO2qKC ULOXhhXCHGkLru4/CZbuJ1E/1ezVmYayZm4tWwcIJfTuxdm/8ZYhvn1aO2lDVp83LqZJ 1N0Z9a9fO8jYLRhyamDYO1zdXoq8TRL3hkGJPKNcHOsgY2fAfCmZxrU5CZGVGJfcmVsg 5ZVMcmiAPh1xewS1ylZ3laCAxQtTeaOHcOG9xJuXLCnaWO1x7rwtwIurDP/jeLgH+1RS GFxNokI6O7FcH/XQGlogYqaRmOO72+Mr6Xkw0ksOIQmvONG22Kt6pCMZbHK6FJ/stzXs NBzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697033268; x=1697638068; 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=KoDUpCbTedzPU30CQb9d9uvflh1nTk1L9uLqEJ+jbds=; b=AmffVMuHtogmnKZFQ9vwdPACpX8Cg9TXH7OcS2/vpad16St6w44qvxjxWDZP7Zemz1 A3yfavKw+V0ae1Cp5sY/LdBIdDiu/Xe6UrA1gNj1JPULAtvefuw4er15VWGhqPlKhjyc jNqX5kDqFvgVGq0mae6k8Ze6iinC7brEKPC5OPL9B+kA/kbsYduFkYNfSDlO+ktxI6DR Jy9Z4eoQbPyoMFtfjqwsCK2tgu+NvdFJ59yw0qKC5300eJDfiNKK02nbK/TTm9YBGmSF 7vcq88vWNsxe8WSakVAXyv6hIrcE+GA3lm3hkaXBK3z4DtV1amFoTZgUeSve8qRlZCOn QFlA== X-Gm-Message-State: AOJu0Yx7ET6U1yVekU1qGo7WAm5PMbnUJZ2FU+nS7JqgPQnmhd8Pvm9j VIgQEO01Xv0HByZxyiL/jSLK1w== X-Google-Smtp-Source: AGHT+IHG8C+TqNC8Dic+04CcGJ7nl+DUuX+FlcIogEE0TXokQFlgx18gYzvShoAVRRz5wv2PW8C9WA== X-Received: by 2002:a05:600c:231a:b0:405:3a14:aa1a with SMTP id 26-20020a05600c231a00b004053a14aa1amr18051202wmo.18.1697033268480; Wed, 11 Oct 2023 07:07:48 -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 z19-20020a7bc7d3000000b0040641a9d49bsm16646145wmk.17.2023.10.11.07.07.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Oct 2023 07:07:48 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Markus Armbruster , BALATON Zoltan , qemu-trivial@nongnu.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 1/2] MAINTAINERS: Cover hw/ppc/ppc440_uc.c with Sam460ex board Date: Wed, 11 Oct 2023 16:07:20 +0200 Message-ID: <20231011140721.3469-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231011140721.3469-1-philmd@linaro.org> References: <20231011140721.3469-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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-ppc@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-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org hw/ppc/ppc440_uc.c implements the TYPE_PPC460EX_PCIE_HOST device, which is used by the aCube Sam460ex board. Signed-off-by: Philippe Mathieu-Daudé Acked-by: BALATON Zoltan --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9e7dec4a58..8c07d07927 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1482,6 +1482,7 @@ M: BALATON Zoltan L: qemu-ppc@nongnu.org S: Maintained F: hw/ppc/sam460ex.c +F: hw/ppc/ppc440_uc.c F: hw/ppc/ppc440_pcix.c F: hw/display/sm501* F: hw/ide/sii3112.c From patchwork Wed Oct 11 14:07:21 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: 1846780 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ADxQmNiQ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S5F4T4sf1z1ypX for ; Thu, 12 Oct 2023 01:08:57 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqZsb-0000Ds-PK; Wed, 11 Oct 2023 10:08:06 -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 1qqZsX-0000AM-C1 for qemu-ppc@nongnu.org; Wed, 11 Oct 2023 10:08:01 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqZsU-0007GM-0d for qemu-ppc@nongnu.org; Wed, 11 Oct 2023 10:08:01 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40537481094so64570655e9.0 for ; Wed, 11 Oct 2023 07:07:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697033275; x=1697638075; 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=usve4PUujmMl+yMklSEmrKUgOD9wFrihCQZTy1/EuhY=; b=ADxQmNiQFcEO00e+80m2JT63capjTnnspS7C3dekT7hrjde8ZZq3hWMBs5prFHQo93 CV8y5BTeNj+y84SXmguySa8bA+/fB5A5EoOjwTrPLIFXGPDMuzX1x86NEpwtGwhnuOkC RB1uqKs9Ms5+j86OZT420ytnM0QSmnoSx5qyUQUJt6R4zpa6p/aOnfYy9veVhJ4aDKUb h+MeKKaCAJctVNCviJxZMJJbebcghprQc7L30ZKGgEaWB9bohbnJigmTvjNvHHm1Vc4e 7iBNoVuXOD06K/+5oCrL36/fLzvEYwDO0Tl38G5CLajwyfEapJRgvfIY311DQP+fnze4 zW+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697033275; x=1697638075; 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=usve4PUujmMl+yMklSEmrKUgOD9wFrihCQZTy1/EuhY=; b=eQ8pouK26sdVx9NlRAM3673t+43cfypqI93oqY7oW4Husy4Wmf2FRtAtQtGBuWHjax TxrwPK3efaZa7JMOa4858ytu7kCOaIWHqChohLpD88S2BPoPtWtJ8cGvlWNi+oiCCxu4 EEy+dm1CpGFKFC5Itss1Vj3M8vt6XfHcZufzvvjuoP4kzzZPaNGDmdq0jKEyA5Q6j5Ez lV9sZdy9n3uP9Cz9armFiztpRUpt+RXgQrlML/Q8IF2bWLCC2n4MxzwdLKdq3LkqMg0L v2Q9G6xcTllLpy9iIvIUBuwN1tMQYdTxokZxrW3V+nIG0eHO7k7bx78+hMOmt16HHgz1 qrzA== X-Gm-Message-State: AOJu0YwGxRE+bE45m3kXQeiEvTmYgQQdGMoTr+SlE2wkeoB32xHMC+xu Ll4in28BYqcF5ecWe97wZR6faw== X-Google-Smtp-Source: AGHT+IHFTdwstWPuYaLjKJv36aoGe0CiU+W+okuR3KgbnHSYjLUfQplwnOC/KDWAsbK5bjbnwx3jOQ== X-Received: by 2002:a7b:c394:0:b0:406:51a0:17fd with SMTP id s20-20020a7bc394000000b0040651a017fdmr17468739wmj.18.1697033275133; Wed, 11 Oct 2023 07:07:55 -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 4-20020a05600c248400b004060f0a0fd5sm16912521wms.13.2023.10.11.07.07.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Oct 2023 07:07:54 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Markus Armbruster , BALATON Zoltan , qemu-trivial@nongnu.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 2/2] hw/ppc/ppc440_uc: Remove dead l2sram_update_mappings() Date: Wed, 11 Oct 2023 16:07:21 +0200 Message-ID: <20231011140721.3469-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231011140721.3469-1-philmd@linaro.org> References: <20231011140721.3469-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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-ppc@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-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-ppc-bounces+incoming=patchwork.ozlabs.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. Reviewed-by: BALATON Zoltan Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/ppc440_uc.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/hw/ppc/ppc440_uc.c b/hw/ppc/ppc440_uc.c index 4181c843a8..7d6ca70387 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; @@ -193,7 +153,6 @@ static void dcr_write_l2sram(void *opaque, int dcrn, uint32_t val) /*l2sram->isram1[dcrn - DCR_L2CACHE_BASE] = val;*/ break; } - /*l2sram_update_mappings(l2sram, isarc, isacntl, dsarc, dsacntl);*/ } static void l2sram_reset(void *opaque) @@ -203,7 +162,6 @@ static void l2sram_reset(void *opaque) memset(l2sram->l2cache, 0, sizeof(l2sram->l2cache)); l2sram->l2cache[DCR_L2CACHE_STAT - DCR_L2CACHE_BASE] = 0x80000000; memset(l2sram->isram0, 0, sizeof(l2sram->isram0)); - /*l2sram_update_mappings(l2sram, isarc, isacntl, dsarc, dsacntl);*/ } void ppc4xx_l2sram_init(CPUPPCState *env)