From patchwork Tue Jan 30 11:31:01 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: 768060 Delivered-To: patch@linaro.org Received: by 2002:adf:ee41:0:b0:33a:e5bd:fedd with SMTP id w1csp1321236wro; Tue, 30 Jan 2024 03:31:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IGbo4Rk+fXAJpZ6S2Ioe98S9KNwMz6xO87YEl5prwH+jhbHGxV7F9G5/q1JhkBW05w47xRJ X-Received: by 2002:a05:622a:1490:b0:42a:b09c:a8d2 with SMTP id t16-20020a05622a149000b0042ab09ca8d2mr2229754qtx.112.1706614311689; Tue, 30 Jan 2024 03:31:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706614311; cv=none; d=google.com; s=arc-20160816; b=tKMRG44AJqVGthApheT1IFEvnGrhUrVuZxGRHVzidkRZIJMov9vffDp2RUZA4ZfhSw eqIOnLZAS3bYFjXAO01jEGXiXmECnLFflVYx0Y2QDE2LdkeokE4Iwy22aWD/7sWsPRd4 2jMbimzoqWqyPK0YufVg3/+T7PuDiurZzud/T7ZnKgtSMPiijLr1TsyMLaEHwpxORPoY fKiY+onj1NuJFObmv4NKJlhSQ2QelcpmJPralzl0i3kXNfw2boxaGKF4E+mnY94NZzey 3vXGSEvwHLTF7g0ftP/7SFxZa1awNY73a56CIueoivQ/pPQgoun2OHl06ggtiPNuNMy7 RS7Q== 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=XcqZ31sxniLOzI3SY0/z0idfpzeqrHKXR2vxwlvPTP8=; fh=0deC4BA/7uizcg+1JFM8v082KNPTTjzdfiA6lSKXXcs=; b=DJyMa9TI3c6LbeaJpWEuXECn1cc4Ylbb39kpUYzzk7djuSlNQqp3XlTzEpcC/VWQ6p n4zk9forK8JWvvAPVu2aY0Zz+cD7muI3HdMM02c5NvXBKgR3hl+Dugzan1nWnZMwFTAu cupihFTfj3P+cO5AF5cvtKWAGLUtG5cT4C9nsT6lOWsNeu7NBk+i500UE0dfd/VS+0+9 7WnLVnt2In2euu6s6OgMUZVfZ511Y5BShdxNcO/I8KL1rGfGpYtwdQBjX00vsyTHTtCY lQKDpNbdkWrTRmjvR3PyatfhxTRs+APMlLcAqi7eV6WdaAYzo9uelD30sfrw3NQBvlCB c8+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CXIFYq8Z; 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 k15-20020a05622a03cf00b0042a1115649dsi9795030qtx.211.2024.01.30.03.31.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jan 2024 03:31:51 -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=CXIFYq8Z; 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 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) 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-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) 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) 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 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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Reviewed-by: Clément 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; - void *irq_manager; + /* Leon3 */ + DeviceState *irq_manager; void (*qemu_irq_ack)(CPUSPARCState *env, int intno); - - /* Leon3 cache control */ uint32_t cache_control; }; 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; } }