From nobody Tue Nov 26 14:30:48 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1706614312; cv=none; d=zohomail.com; s=zohoarc; b=UnEFb4EpA+DcOH6y9q9Ckc+MVCANTKuxSP1lGFHRlyw7wdknqmYS4lKDItu3zi2ufYS1SULa/RSulFOmcHF69YjPJCI4sV8p6U7cDOZE615RdAM5DhfeVtH/dOrY6oF77FW8jpH1A3GKX3eAIgXItMphB0vB4YWwOVbSpdPQZro= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706614312; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=XcqZ31sxniLOzI3SY0/z0idfpzeqrHKXR2vxwlvPTP8=; b=BZhLK1XaqWnuAVqaYXG2c8H0LOSC0sWvAUec+rvBwxVQvUkd/jrdBVitojAeWqI1w+Um4w04tDR0Kl1MsgtjWj8EGpj5AHUGPOm/rBDQ/Dq/GO6Y8YnkZoUoEk3HI46nsoql0nCH6qThBtDSkMhq6ybYYsldfwSoc3tPhjBNwWU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1706614312086725.1583559280106; Tue, 30 Jan 2024 03:31:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rUmL2-0006RE-9r; Tue, 30 Jan 2024 06:31:36 -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 1rUmKo-0006H7-0f for qemu-devel@nongnu.org; Tue, 30 Jan 2024 06:31:22 -0500 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 1rUmKe-0005Oo-01 for qemu-devel@nongnu.org; Tue, 30 Jan 2024 06:31:16 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40e9101b5f9so42775345e9.3 for ; Tue, 30 Jan 2024 03:31:11 -0800 (PST) Received: from m1x-phil.lan ([176.187.218.134]) by smtp.gmail.com with ESMTPSA id h13-20020a05600c314d00b0040efb445698sm3937420wmo.5.2024.01.30.03.31.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 30 Jan 2024 03:31:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706614270; x=1707219070; 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=XcqZ31sxniLOzI3SY0/z0idfpzeqrHKXR2vxwlvPTP8=; b=CXIFYq8ZZnLuzdCp3s/q6Lc4uagJiP1FvPKC82t//zoTuNoIvMYS3j+7PH1fEObg2V 7vEvFaqUm9YBNXDsVkW+w1iKbp5rrVMgwJbo0o+HIPcU/0x1TiV8VezzRFerZ5FD4WD1 TBJd6URmJZOkB8pmLKm2d5SXQd7rARh4531NDQERaQoVFF1RGZckY4fao/mg8ji4d1QL Sk+5NMds5vlGZE0jdy6yGADTlN9+Erx+qFHGAUe8iOOfwXFeo6b9jzNiA5NBhkR/8g06 N6TPOcu3O5HUOFloJgxUBpbr7/rQeBxGJzs1I8wCthRLm9PJ7FbgIStIAaruzJeDHHK8 c3Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706614270; x=1707219070; 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=XcqZ31sxniLOzI3SY0/z0idfpzeqrHKXR2vxwlvPTP8=; b=KNxGkzpsIrU/LGW+YGNmsEpja3N4hIkUnKNQ+AiHgChC4aKXzAp0JANM5ekSVbiybw /0IC9sOd5DkKieLa/H/oZywRFA8uAjZI7LmMuk2E9S6Zm3B4zMMOu53o3Nzx+O+AtKcZ sEgKBik0FJyqk/TH18mVvIOfZ6/HcDbaBZKXb19/K7E8NdNYxd778Z4ZuaaP5QexOxPQ IyYcvpA/OrkKylaIx8E3t+Scn8QYjpID3pKQi6biSiF6tB5Q4y6j+/gzS9FqDz52rr1q H+TC8U4i+IaUVjeMryLAppkNv3lZnm1espxHlhbmHy0xwzKn8sVSS2gwRyA5QUH25oLp Ol3A== X-Gm-Message-State: AOJu0Yz2EqUS8Fu3WiqeGye/yewbU/aTlHx9RQ4zO38glDkVWh/cZI1x jCJUSQ3Iv9IzPLqlB907OZqL155wJpFws2Pqwx2PtgCpWsXarRIwul0w6AQbljtdCx9DgnHudLG k X-Google-Smtp-Source: AGHT+IGTRTlV5tJ2vqnH0C66VusvvAuoNIPvu1+ybBeRUSp0hkL+Pfylnt0R+zAm34U3IUJhWDqnXg== X-Received: by 2002:a05:600c:1396:b0:40e:d425:85a with SMTP id u22-20020a05600c139600b0040ed425085amr7573143wmf.17.1706614270186; Tue, 30 Jan 2024 03:31:10 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Artyom Tarasenko , Fabien Chouteau , Frederic Konrad , =?UTF-8?q?Cl=C3=A9ment=20Chigot?= , Mark Cave-Ayland , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 1/2] target/sparc: Provide hint about CPUSPARCState::irq_manager member Date: Tue, 30 Jan 2024 12:31:01 +0100 Message-ID: <20240130113102.6732-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240130113102.6732-1-philmd@linaro.org> References: <20240130113102.6732-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1706614313257100001 CPUSPARCState::irq_manager holds a pointer to a QDev, so declare it as DeviceState instead of void. Move the comment about Leon3 fields. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cl=C3=A9ment Chigot --- target/sparc/cpu.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index 12a11ecb26..d02684569a 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -548,10 +548,9 @@ struct CPUArchState { #endif sparc_def_t def; =20 - void *irq_manager; + /* Leon3 */ + DeviceState *irq_manager; void (*qemu_irq_ack)(CPUSPARCState *env, int intno); - - /* Leon3 cache control */ uint32_t cache_control; }; =20 --=20 2.41.0 From nobody Tue Nov 26 14:30:48 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1706614314; cv=none; d=zohomail.com; s=zohoarc; b=iLhmS2jjOcKHtnsYkBqPO0kUPeKjDDx4VNXd7vMmcJRCwYDlvgSTPx+Qa4G39RILklft3hvyQ24+PtoYoKe7tEsqJWlfADV+leoQ2IXAKLQ2QtQM3g78X0BIoygSi1d/nph+yzK1Ra+OAqR5GYV3sUjejZH1Sp5+eCVECZFtejQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706614314; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=9KrXeN10E4XsxZLxA1TMdRw66dElQqMYKHUX/+flIDU=; b=XpBeLJPE0n8No3LTCABuG8h/fH5Zc4w82tY1WJpRaon1d1UXvvyt7veyvAa+4A7AeKvzZtwb1+UL6DMpPYFVwPc9xXd7QZS9cu1kcXcrXGSrI5jfRzD/CKmTG0uiUDLLuFHPaYw97OvZIcnx71cW6UlwLFx0sWVU7/dt92Ji7Rc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1706614314223321.2438585840981; Tue, 30 Jan 2024 03:31:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rUmL3-0006VA-Pv; Tue, 30 Jan 2024 06:31:37 -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 1rUmKu-0006Kz-CB for qemu-devel@nongnu.org; Tue, 30 Jan 2024 06:31:29 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rUmKk-0005Pb-H4 for qemu-devel@nongnu.org; Tue, 30 Jan 2024 06:31:26 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40fafc8bd6dso1075245e9.0 for ; Tue, 30 Jan 2024 03:31:16 -0800 (PST) Received: from m1x-phil.lan ([176.187.218.134]) by smtp.gmail.com with ESMTPSA id r18-20020a05600c35d200b0040f44b5c847sm1148598wmq.45.2024.01.30.03.31.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 30 Jan 2024 03:31:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706614275; x=1707219075; 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=9KrXeN10E4XsxZLxA1TMdRw66dElQqMYKHUX/+flIDU=; b=SyIzsRTo27b2e6YMBOKQvA18NXcVg31QgoamvJ6NpLVkxYtUkEpMi1lk13IEQNX61e 7hykys5Eg2b93i2L1+eQ5jjry/Ttb56LBJ7MEvhk2PUZrZcTSVR0S7Y74CFcTkoQTRLl fkZUKoqrAYJ3e/OwCW+Q/oANwnRde+jZkfljS6XwlbxnLPWZUcg0VnuPdF7Z/LTsyQK4 GD6Md1t0reWORWUhvam4oqvGEBO2vcRpIgqPYt8UyH9V95llGvx4nKn72CPVGKMDcesp L1BI+oc5ZNUQvFQPiid8y5CsZnIc5OxSZTB+4YV0pxN8S5O0zJQaNOeKRfEf1sL37DUY XP0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706614275; x=1707219075; 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=9KrXeN10E4XsxZLxA1TMdRw66dElQqMYKHUX/+flIDU=; b=PRlyZpa0DfZWdp9NlUqE8j/+cyG8lp0UoyZ4KBvsu5LUkvAjSDrX9wlLzvBxikt4eQ 0RhkjYRWz3540MwCq+KglGPsHxuE6lvzIbCCcy/NnMYC6TufiA0dXxhxG6ZB0BiAyYt5 nQ1fZCxH2w4f9PLMLq3S0OAu6UUdSXLHUoyl36QK/eJVM1o7SNfDlfZ0/l+/xQXp2w0v hLDuAdkGzsYeu57khIdXg3YugGNRVJeUi34s+jF+Nw25YGydJ1w/yEHan7E20gzlOVXF P/O2Y8qnVh32sws2FGoA7z0msGGDMg3QQNmqbijdQbOucBDOFcT1guucrVLD0bB1KfnA n1oA== X-Gm-Message-State: AOJu0YykE+J93zwA7WNc6ok7msJJ29xrvCzY9Aqytx2sKPZrUFQRzdqY XI+rbB2j4CQ4nbtuxEZizYyRtiIUnN+jyGmMQUxDnLXSEzF51agpKfW7I7UqZvvJElBbXSNYwv7 m X-Google-Smtp-Source: AGHT+IGSsWciT1l+AcxCNFwMBzQpacXgSAsSVOpBba2f9elq9ajyDYnf4VVk9FS3LM093C6LwKh1DA== X-Received: by 2002:a05:600c:1c81:b0:40e:622e:7449 with SMTP id k1-20020a05600c1c8100b0040e622e7449mr6317366wms.22.1706614275486; Tue, 30 Jan 2024 03:31:15 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Artyom Tarasenko , Fabien Chouteau , Frederic Konrad , =?UTF-8?q?Cl=C3=A9ment=20Chigot?= , Mark Cave-Ayland , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/2] hw/sparc/leon3: Remove duplicated code Date: Tue, 30 Jan 2024 12:31:02 +0100 Message-ID: <20240130113102.6732-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240130113102.6732-1-philmd@linaro.org> References: <20240130113102.6732-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1706614315230100005 Since commit b04d989054 ("SPARC: Emulation of Leon3") the main_cpu_reset() handler sets both pc/npc when the CPU is reset, after the machine is realized. It is pointless to set it in leon3_generic_hw_init(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cl=C3=A9ment Chigot --- hw/sparc/leon3.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 2dfb742566..1ae9a37583 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -343,8 +343,6 @@ static void leon3_generic_hw_init(MachineState *machine) =20 bootloader_entry =3D memory_region_get_ram_ptr(prom); write_bootloader(env, bootloader_entry, entry); - env->pc =3D LEON3_PROM_OFFSET; - env->npc =3D LEON3_PROM_OFFSET + 4; reset_info->entry =3D LEON3_PROM_OFFSET; } } --=20 2.41.0