From patchwork Tue Jan 30 11:31:02 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: 768061 Delivered-To: patch@linaro.org Received: by 2002:adf:ee41:0:b0:33a:e5bd:fedd with SMTP id w1csp1321249wro; Tue, 30 Jan 2024 03:31:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IF2rri3Mnk65tvnNItD/29hv2/gWJIj+BPtVsUbsSpTy2XkvrUrcJuUnvd3WVnSG6yADhYZ X-Received: by 2002:a0d:ea92:0:b0:5ff:62b8:f41c with SMTP id t140-20020a0dea92000000b005ff62b8f41cmr7061960ywe.69.1706614313717; Tue, 30 Jan 2024 03:31:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706614313; cv=none; d=google.com; s=arc-20160816; b=Ci0rUXilABYBt12pQe5oGX4a/cG/qPMvbJ3TwVGnpAY7eMfXZRotrj2JYwJQMW84bE RS03g8BKYFzzkw5LRbBooRvv//eTiCaujLyHdEMSQz3rsWf0dAekTaY9fghEg91lgb5I amqmSudfHEnKPKGMso5RmlKfbG3luBZqurNM1dkUqysZ7yI3bCQvPGnnPt7Fo0bxqgTZ 8IRt1joNQmJcD4mQUL5IUPPsMDSQGDq7riKro/KZQFNi9vD0DpbrIDzHgWcfIpjED/w7 CLbtPUjiKClNSfvqFT874eid7MY52j8GoGMdk5nl5DHM+E5nCv2w/I5dKEL64LBxsu/x rswg== 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=9KrXeN10E4XsxZLxA1TMdRw66dElQqMYKHUX/+flIDU=; fh=0deC4BA/7uizcg+1JFM8v082KNPTTjzdfiA6lSKXXcs=; b=GauP3mAd5LTXX88P+2vuJ51+dR/NGKrqaEyb35v+w9YASsv+iZabXWy4h+fe3EGapG MlM+1ane+YhRbm/ullaEgxKgFxxmHoygeW8eSCsCH/z6V88pSnVkvN3OcC28fDNYcU9x /8twxxzXhVe8qBMADr8fe1ipi+459sGX3kVjsGpz7MVlRw76d2u/E6tW/FxGjt7R52PZ lE9VsgcSD7vb1MuVL3bpTYG2yZYLK7XoerDg0I/gW9GF0cAVyqOx+34Rwv9lGLIZa/zS FPSOFlwNAG7dpji7xgXhOzxSjx00qZZi4dRf5lKXSITK6CDeWOyYzdkJcoOs/QuIHlkv 6fCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SyIzsRTo; 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 d18-20020a0cc692000000b0068c35a7f285si8379607qvj.596.2024.01.30.03.31.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jan 2024 03:31:53 -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=SyIzsRTo; 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 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Artyom Tarasenko , Fabien Chouteau , Frederic Konrad , =?utf-8?q?Cl=C3=A9ment_Chigot?= , Mark Cave-Ayland , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Reviewed-by: Clément 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) bootloader_entry = memory_region_get_ram_ptr(prom); write_bootloader(env, bootloader_entry, entry); - env->pc = LEON3_PROM_OFFSET; - env->npc = LEON3_PROM_OFFSET + 4; reset_info->entry = LEON3_PROM_OFFSET; } }