From patchwork Thu Feb 15 17:56:55 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: 772944 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp962824wre; Thu, 15 Feb 2024 09:58:26 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWFFeFwUuJva5Zii+1uyPQao3Kw78BlSgFmKo9F5GvVZmFj9XXdDvSGSValfrQgy+qrwSPlFV6G+PsjsfC0oqIC X-Google-Smtp-Source: AGHT+IHuH5Kc25ndPanCG1zUlwiuup5wAAGnsKa/cU46vIryJRXL/hYSdqllRxcZnecuVqPAEwBz X-Received: by 2002:a25:ae85:0:b0:dc7:4671:8ae8 with SMTP id b5-20020a25ae85000000b00dc746718ae8mr1962936ybj.65.1708019905964; Thu, 15 Feb 2024 09:58:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708019905; cv=none; d=google.com; s=arc-20160816; b=U9CYrWCIcvYNXjpHr7Psb2+7vvaQDmIRObtaBTsFqaFdSXN/TyLjbqjFKtYgjsIl8N WEH2iJKhqOJkV+6uZXW/hBukLWC5TRwlmevltg8sLzCYWqjzed8/WhwMi1iS4S82nj0U w/lk48XPedF6ikZKaZHlHJvAucKOzGWALAOeNZYCSIUfxbTiDAUIXGQOunhqPyzW/dwu kyD1lni/C0I5l7Xa3FmRSVP2b/POKir+6DYDv+ZZtGVlAa4GADhQIDuZmieNfJ73qDTj PkDGPKDphCETOk3SM1c1gKRJBv7I2Zy6GauWAF664LEQQ1GFB2nT+2Y/MUZc9P/SAX1j g/WA== 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=H+IRUZ5jWxcqPuMBnPz4ZPr8dlbjAv9aNyQYimjXdkc=; fh=YRAcCXxPYIj4vA9zz1cLAHYbCQlGADf6quVpmkGrFnw=; b=WB91f0F1c+C59h8wjgf76TlkzeDQuKcSlTb21GjiemyDx+PAgXk6agf1PwG1kkTGxv 09dhA0L844FUZb7WKUALe0Bvz7l/MunGleSZsuvuU0KGWfu3rkRcCrDko0Tg4hi/qjOM yfc94ao+2jp/s4ndbZka4dTnuc4fqb8Yd4MpNdQGopsxlZQy2rvFAQmwiwKETxpCpCob YbZXw1bTtpJgdP6MfcDtmLF34qFZKLn7iGub+paSi76Q9BZqzLkMAP/mFNKVmw+/JknE jUdstQ0ZemXpNZtrBEIVhD2qNP1GwBkavpSAKai0PYwyELC2G8/QTHciymhh1+6CGUrZ nvgA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WUxqx0ZF; 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 u5-20020a05620a022500b00785c1c5d203si1898448qkm.183.2024.02.15.09.58.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 09:58:25 -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=WUxqx0ZF; 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 1rafzr-0001CJ-NN; Thu, 15 Feb 2024 12:58:07 -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 1rafzq-0001AJ-J4 for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:58:06 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rafzo-0001Pq-Sw for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:58:06 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-41223e0777dso5675385e9.2 for ; Thu, 15 Feb 2024 09:58:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019882; x=1708624682; 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=H+IRUZ5jWxcqPuMBnPz4ZPr8dlbjAv9aNyQYimjXdkc=; b=WUxqx0ZFvEEJ3erOLv7hFlEQMe6iGuRr1JjHhULd1hD64AyCifWg5fC8uvFO8er7b9 oHza77w0dL92X57JPMALYVhIpBHSzQ/4CmCNQqahEemaJKhhKxuM+6HN8TqFn2sMmglh MKUfPrGq+nIx1koUY3Cdq2cnWDRd/lJ1r7N9z0BB58RM/dZOf1WBs4oMOsF7iBf6ZWX7 OluZb6ucg+hnZX6/tMEOiEDbr14fW3L+hM7QCACmghjlPH6sCOwGg5NuHNyOe5GemdjO CrfvNZzegHwETp27HIXefOWYuuOpRZO22lPjo3+rqo/C0CMkJm8e8ENBIi4FHfdE1gFf d44A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019882; x=1708624682; 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=H+IRUZ5jWxcqPuMBnPz4ZPr8dlbjAv9aNyQYimjXdkc=; b=R4WeXUeWpNjzlvuFtxKuflcE7d/T4//WHgScLkxpEcLfIbz4Ad5LwJVTuUqY4+kJ1Q EMnlKXJki3zykIFV1jtyw1R0Jd+AAONEFXovBdkR+pc6hLY+YKKHbNqXR0sObdX7liUV sNz4/Oq0s1JS7bqRCPdixtgL50A6e/p5Cz8tAaKwAe63FhdggU46qZ3h9GkAws1okTOw CIZzTSfbOLQUkJJT1cOIjxHol2IrRrnks7KdAZlYXCzUzwmFni4lWeb1M3ar7GCStzAy uZcbO2+UW4mvBkf/mvLJ2D4dQ2H0kfJWbgsVG/bLUKNjHqDKxUU0rzBIJ5e+q5Eob6gC oNgQ== X-Gm-Message-State: AOJu0YxqApgfqANE3paCgY+X+F1dGAuhXGJMmw4GjbhtX9QBNKYcc1ch xWLCScTNL+VtrgYKTuhsAxjg3we7NMsv94g6zy2UYTmp/gucrW5CLtEB2gNJPAgFCMlpsd0m8Pw TZRc= X-Received: by 2002:a05:600c:45c8:b0:412:2b7a:67fa with SMTP id s8-20020a05600c45c800b004122b7a67famr968825wmo.0.1708019882504; Thu, 15 Feb 2024 09:58:02 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id z11-20020a1c4c0b000000b0040d5ae2906esm5644695wmf.30.2024.02.15.09.58.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:58:02 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Yoshinori Sato , Magnus Damm , Kevin Wolf , Hanna Reitz Subject: [PULL 01/56] hw/block/tc58128: Don't emit deprecation warning under qtest Date: Thu, 15 Feb 2024 18:56:55 +0100 Message-ID: <20240215175752.82828-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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=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 From: Peter Maydell Suppress the deprecation warning when we're running under qtest, to avoid "make check" including warning messages in its output. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240206154151.155620-1-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- hw/block/tc58128.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/block/tc58128.c b/hw/block/tc58128.c index 6944cf58fa..0984e37417 100644 --- a/hw/block/tc58128.c +++ b/hw/block/tc58128.c @@ -202,7 +202,9 @@ static sh7750_io_device tc58128 = { int tc58128_init(struct SH7750State *s, const char *zone1, const char *zone2) { - warn_report_once("The TC58128 flash device is deprecated"); + if (!qtest_enabled()) { + warn_report_once("The TC58128 flash device is deprecated"); + } init_dev(&tc58128_devs[0], zone1); init_dev(&tc58128_devs[1], zone2); return sh7750_register_io_device(s, &tc58128); From patchwork Thu Feb 15 17:56:56 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: 772946 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp963005wre; Thu, 15 Feb 2024 09:58:53 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUUkd9n11FOHRCyhDw1MyhnNcXbq6rX7cr3NOZRuCXHoN4YsjXp8vaKy9w7vu2VX1W28J64k2rU/l1NPmgUJG6s X-Google-Smtp-Source: AGHT+IFKJQaRjT2uSA7epifDdmoQUpRVCH63eb3riLFSRn6odAWClDVyiV9bqscSo0KLTgNM6Evd X-Received: by 2002:a05:6102:559d:b0:46e:d980:1c6f with SMTP id dc29-20020a056102559d00b0046ed9801c6fmr2538808vsb.15.1708019932846; Thu, 15 Feb 2024 09:58:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708019932; cv=none; d=google.com; s=arc-20160816; b=jQbYvhc71nEHZgQX+Pllo+7zKLZAeE91PnAEUA2w3UZ7kdZIM/6MHu6FnucigSDUQX wmWVTzWtQZSjFpw0RBVFMfO5gXvB3nIqXbsb8jmYeiXH7lMkNMggQM0XOSTw+vdsywsj Ydtg6QHM+QSCQbvpVAMQMTTiLB/Gl0Tw743DmsM93CTU0ZcnZw1gbtGQafrJ88JGVvNG J6d9nf+KW6ICUHZ8BFx7TzB/qTu58b1f+JUoHQHAboh8kIozbJbj/rI9RAKjWhOBjWLy 1ggfZo+mN+0pzMXAW9pET8cJNuQTB9SjxuwDEMu+Bdoic/NPsobcBD3Rurr7tiiRzcXA 2YvA== 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=CUafXRAhN727LPu8aV7JxhjZQNzC7SOPem4FLXSz2oI=; fh=Sr/Qwk+B2JLAlswuYzl0W84+SKQBHzpG8KbKLs2AjEI=; b=g8IBnBoQv+7nRtiR7i1k40byDo1wOu28ObaStXybQtoxJzQq5t/RfXeJ+zrrBcJQEt Czf59QgV5H4cuOlhgP30NUf9VpWhH2Qt9pfeis1HZQYENV8YT/czXLgCr58Skni46TVw eMoJkadZ38VgU1pBVURjpK5aITUioHzSMa4CdTekdzleDqxMIEm8fMryD7JeACMBKZuH dLuXMJX9vNYNe75sQt02AtcPE+GYC7M3Whn5yS0JLiYWRPwq/faRDu79fpfB8nK1S61T 3vcEAqQiE33/NejEPQA1hUOHm+xKRxyQOm5QIzoqYXlghEjvMHh2ZEuZlHJaHoMRPyV5 bmEw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L8T7thl9; 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 19-20020ac84e93000000b0042a9cfcbdbbsi2087816qtp.201.2024.02.15.09.58.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 09:58:52 -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=L8T7thl9; 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 1rag01-0001R8-UO; Thu, 15 Feb 2024 12:58:18 -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 1rafzy-0001Kj-Py for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:58:15 -0500 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rafzw-0001U4-3r for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:58:14 -0500 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2d109e7bed2so15220381fa.2 for ; Thu, 15 Feb 2024 09:58:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019889; x=1708624689; 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=CUafXRAhN727LPu8aV7JxhjZQNzC7SOPem4FLXSz2oI=; b=L8T7thl9epGi8oF1MWrVN2UTh7SuL01GqbFe61kdJ5xegyPRcUFpO2iCM0AaMvW6aR IpJkvBI2PjNJ59VPMadvaZKDd4l3Mob18cxzCogqmM/LZ+7xR93vfSfauLp+8w23w9nJ UDokqFe+y5Jp/o8u1CcuY23XAJerzSWwVkYUeqOLhm7y8JKjkf/5J+Gqi7M0a38VqFmM eOZoltQXMoGfPmx9j0C10BIxELvvgyk58aLraJumT395JvMe2INrp3AH6iFIFz+Liqyt EeFc6ILXk9mOV+hWLMtt8SoYjfF61k4DCH0Sks6r4l66R2JIJLRl+xzp9QfsjKaAC2eF VJOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019889; x=1708624689; 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=CUafXRAhN727LPu8aV7JxhjZQNzC7SOPem4FLXSz2oI=; b=hr0jEiGU7Olc5XfJ0w5YO1cNcwrJTDkNTCcvPCpICITaLgbVkxiblnxnvjrY1CeoAQ Vqi/U4T4cWTKj6Qlw+VAIZvQzg1RVx9FJy5XW3mkIPQ7Eq6bGJAQUPpmQpCLj9/ZOkW+ ShuNrUMaEWuY7tGoDCt0+CXEVXETfDGew36Q5zzNe76G32R1zHXv94G//JsDqTAGsFpu egs6NGn8yx6azXcQCYSQT8QPy6sx7RpCQ2kDcuvspo0dwqJMM8rkq79lmEvrMUCHVp3q DhyuEGNr7gv34lHIqGpXdNJPzhf1xhihEM8avWbOVTyLJGwN3qwqEH3/TBf8UzNAXyrd HkUg== X-Gm-Message-State: AOJu0Yxf8dYafAI95V48O4cahYb9snzMFQeaWobQoW0HFlwCxM77L6um x2gxk+AwvETM1MbtYJXBIDiE0JthUpBetc4FMyOj9CyGQeyFe6IDNKRIl04p/9byRLkMZRAGRzX QWNE= X-Received: by 2002:a2e:331a:0:b0:2d0:e2aa:24d4 with SMTP id d26-20020a2e331a000000b002d0e2aa24d4mr1745440ljc.9.1708019888851; Thu, 15 Feb 2024 09:58:08 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id ba3-20020a0560001c0300b0033b406bc689sm2495039wrb.75.2024.02.15.09.58.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:58:08 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Jiaxun Yang Subject: [PULL 02/56] hw/mips: remove unnecessary "select PTIMER" Date: Thu, 15 Feb 2024 18:56:56 +0100 Message-ID: <20240215175752.82828-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22b; envelope-from=philmd@linaro.org; helo=mail-lj1-x22b.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=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 From: Paolo Bonzini There is no use of ptimer functions in mips_cps.c or any other related code. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240129115811.1039965-1-pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/mips/Kconfig b/hw/mips/Kconfig index 505381a0bb..ab61af209a 100644 --- a/hw/mips/Kconfig +++ b/hw/mips/Kconfig @@ -50,7 +50,6 @@ config LOONGSON3V config MIPS_CPS bool - select PTIMER select MIPS_ITU config MIPS_BOSTON From patchwork Thu Feb 15 17:56:57 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: 772947 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp963103wre; Thu, 15 Feb 2024 09:59:12 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVCxT3+9JbrW1KJ0cqXPgFs1rSGxpC5BTsyzMjToGAbYSD7zeIeMFXn3R3M8o7CYL8kUQ+5nqB/zXTiY95i6mMj X-Google-Smtp-Source: AGHT+IFlzrYI8MdyiqAzJTDVa2tUR4ce12O7cmW3UzlW/DhvWqRf6T0xbqc5SJCqViDMyMqhim8I X-Received: by 2002:ae9:e716:0:b0:787:2cc1:455f with SMTP id m22-20020ae9e716000000b007872cc1455fmr2715853qka.57.1708019952605; Thu, 15 Feb 2024 09:59:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708019952; cv=none; d=google.com; s=arc-20160816; b=r0dBaqlVqglu7XbLcdSs2FCgvtvSPUQ+zdaMh9wJb6KMRKhXb4/pFeT/AwDz/mx4Bp 5PBCasvZQhmFtZV3tLjQ5+cytAYS+6Mb3Q2kBdmKhZm4uRtCCAv+iB7rCwcfW4f67M1m BI80kjfMnn5MIubyaVafCjoyfdST22a9wP0DtrCDJVWqwEhuIktxAcjSUE2I7gEBGRYW KLU5xuq1/dEb0NRs3w1+tj1sDvk2bLRx5i2aM8qeRQHQ9BWl30daKSGVqqlHTBENtqSF xrkZ3Y3oHCdQ6rFzi9bhLpNkabFTkAi1ajtlWb+edVO7olZJSduznCeEOwmZ+5FDrKIJ pGrA== 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=Agls286qrzGsJ1hJI9sraTA4L0NishS8JrZlDzd0umA=; fh=3Va2DX6mn6UKvJ7V374keiuwIgZeq1l4mUPk/iX+KwU=; b=O8+ahHpeYoyTCxHHGT533JhO5CV8QIVdT0iC5ln+COaOdj+sjPp1aET3sqz9t2h0sp pbHp/YeMLzmAzXEXG3tnF0ptF9CUyJ936oh+X6mBcQTEjB9shqYDy4n5qKDHn4lvVZkX HH5kFQQNPnyntcybkpv7bJrRaSnf39Ru07Gkc6NDnd3snhel2g21OvivITl6FuyiKz1R VSVJx0pKaPqW0v3c1ZqoCbwTEjqwCSRm48XjikuOIPBa5CchqgKSIVqP0vpajEPewsGJ eL4jtm8GJm29jnGO+RJI0vrBq5twDF15GooUDnqe32Z3wwkNO31XZ8HrZABOuugu43+I Ty+w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PEBm7ceI; 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 vz6-20020a05620a494600b00785d68e7bdcsi1951142qkn.205.2024.02.15.09.59.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 09:59:12 -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=PEBm7ceI; 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 1rag0N-00021T-Kx; Thu, 15 Feb 2024 12:58:39 -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 1rag0H-0001pe-Ej for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:58:33 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag00-0001Vb-N0 for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:58:33 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-41211097adcso7851755e9.3 for ; Thu, 15 Feb 2024 09:58:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019895; x=1708624695; 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=Agls286qrzGsJ1hJI9sraTA4L0NishS8JrZlDzd0umA=; b=PEBm7ceI9Zkgz5uGcjKzBbZdycx+pLIsToFToiqLsmvKBSbpLkwMeeegi4RZIocsUF WJv1RM/RjYTXPf5JfyjG1qTTV0O7CslAGWIR5uH3LQB56LySJLeBEHF4BdflAKr17sCw eIl3U1zjMv/dWjkr1mTL8hcJBnmVFrROeIX0LoIpYhXuIQmR/jGRFZ3kqB/H24WEE4nz 6rNUGpYvRRW6YXLgXrofOvXz43QbU/CrngAxiigdmSk+9S4OfOqX1oJLwglPS/VLjs7x QHgG8YTan02QUSZHJwDxb4l9Oyj2oFQC+sGrbw+kkF8jR5YyHB5Is9a9IvciNmzCYmAv 8xlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019895; x=1708624695; 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=Agls286qrzGsJ1hJI9sraTA4L0NishS8JrZlDzd0umA=; b=VOZFJSmaMITTlTgQpj/nmKlO+NhvvF8rzjYUYadqJg93t6828aT3lGQAE3698gLpX9 BVUE9I/T95Vw1BuY25QiSJN2lgbDNLpyT8SNkjJLzxi9f0YbLu9tS3PqXyXKw7p/rurM 2bqHMTfOL/vqS4wVMLEql6YxaPZcTeBiWWe42Wi7kbQV+cndu9SMFD/HMVMha8sa6/M4 EFKk7/NmlML/vM98gpn+p8pqXO6AqwZd2xaqC+Xsgk5EBttycz1xdoBkSAgqtNeYY10H QQybPDeFmdCtMXOwYoS/5rvpuRAC8RIKvd91z2HThebEzh1Uq2WNXgBd7Fy67wpEfpgV SK1g== X-Gm-Message-State: AOJu0YzwvD4PCWSnIE0iaJx+TQr2rpCIdH2m+mncp+ngSBgfTT4tN93w rs48z0nogYViJxQVC+jiuZNbOi6WgYpp/6ifGP1O+PwWJrf+8h65DuWpvcf8fhwb5Ze73WBY11g DWAo= X-Received: by 2002:adf:a446:0:b0:33d:4e5:b1f2 with SMTP id e6-20020adfa446000000b0033d04e5b1f2mr1479996wra.38.1708019895026; Thu, 15 Feb 2024 09:58:15 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id ci3-20020a5d5d83000000b0033d10bd6612sm1315244wrb.81.2024.02.15.09.58.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:58:14 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , Aurelien Jarno , Jiaxun Yang , Aleksandar Rikalo Subject: [PULL 03/56] target/mips: Use qemu_irq typedef for CPUMIPSState::irq member Date: Thu, 15 Feb 2024 18:56:57 +0100 Message-ID: <20240215175752.82828-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 Missed during commit d537cf6c86 ("Unify IRQ handling") when qemu_irq typedef was introduced for IRQState. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Message-Id: <20240130111111.6372-1-philmd@linaro.org> --- target/mips/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/mips/cpu.h b/target/mips/cpu.h index ef26fe03c7..b4788e1af2 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -1183,7 +1183,7 @@ typedef struct CPUArchState { CPUMIPSMVPContext *mvp; #if !defined(CONFIG_USER_ONLY) CPUMIPSTLBContext *tlb; - void *irq[8]; + qemu_irq irq[8]; struct MIPSITUState *itu; MemoryRegion *itc_tag; /* ITC Configuration Tags */ From patchwork Thu Feb 15 17:56:58 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: 772951 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp963334wre; Thu, 15 Feb 2024 09:59:46 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWAywHKMnCtUFZUq/AXpnFgA4vdIYuG8iNYfgyIaAtTEdhvCbLcc9PIbvEJMNeVi5SjPUwk6c/ux2AX7XY6hbSK X-Google-Smtp-Source: AGHT+IG9Uxs1qsEDDpm1AiaYXqC9QXKPzUghSTXphfWZHNxMrCpZXGXfvM21Nde9JV9SzwuKLnTe X-Received: by 2002:a05:620a:1446:b0:787:1649:e074 with SMTP id i6-20020a05620a144600b007871649e074mr2378524qkl.77.1708019985775; Thu, 15 Feb 2024 09:59:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708019985; cv=none; d=google.com; s=arc-20160816; b=bGIEd3szbpUYCxdorqHPVP5cJ/3G8Eh7qXXf5BaBOpIefOPCnP0EUMxiGExXe2pSO+ QQ6/Pkib7dp4fY3zzLvTqCXnNCsZSI0N4miIVgBiPZ0fEYUfBOLnsS9eoFA+dhaW24/v MmYLNugVmwfKaf6bVx/rbQOXCA1pKAvhciYIkcODEl9aqpyDHWKID4xYXGGWu0CbOLBo rA/9h6aH2U7xl0aLJKyhRCYU2wt8GXLiGKFkuddFbnEEhsx8DWWaU/gjxlXTgeibp94d E3TvVO8fAG0lLVTx1xkKSVq98+ww6OfgTFyhsw95kFslgYq2V55KDD+4MBSWLROmR/oo L4yg== 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=lxUYbRglPJnZ4TffGBHIWw40wYoW0NPrXDzHGmrcbes=; fh=lFbaFE9CCURXS2ZRFy5xEQEZPoERQGZgvMk0cqzTFRw=; b=S+tx83C0VdP2asMN0+oWTag76vQYyq4XRvFH54SohhLysj69WroEfnRwhbJxbqe3Tb v7C7qinNhKGqVzxOMH4uLIYwCim5q9AlIfXG4uIfqf/ay23QlqyuWwhfVemeYleOQnLF koLACLe4xrzJGpLKzW4GXUj2ibxv3LdkuV8BEQNWFe2J4QSerYQGkJnrOyKYGmz42cYq I2rMZ/tQ2YkSUp9GklB4KDw4RqROFGxE7hO+St5rSlxboWT9D89ye/mxT5W/apyo9fKs 1hGZhZnB3O4jqnmYGaKizpwARP+YhVbHCO1AlvXf+QVSP8QhH3zrEsWgJFOyphHuI41N DaYQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="JZC/gNUp"; 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 c3-20020a05620a0ce300b00787188f78afsi1833615qkj.383.2024.02.15.09.59.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 09:59:45 -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="JZC/gNUp"; 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 1rag0D-0001j3-SZ; Thu, 15 Feb 2024 12:58:31 -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 1rag0A-0001hU-PR for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:58:26 -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 1rag07-0001Wm-Jl for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:58:26 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-41211097adcso7852645e9.3 for ; Thu, 15 Feb 2024 09:58:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019902; x=1708624702; 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=lxUYbRglPJnZ4TffGBHIWw40wYoW0NPrXDzHGmrcbes=; b=JZC/gNUp46M0PUNcvyvK9KsxoHL8BZTuhB1azH+bhI7QQQiKdAR4eiGKGX9VwTRvwp Qy62iBZWftc9pDLYELNAkUtdGXzPdbIQLzQNRamNZprUotGG3lmeGcDi8PjLkKr4g61F szcvhjJf9PsbFYH4x7X0F0mv2jk+oyuULOA/1jD0Pic5AL1u5ZN3YHmFXuOjaakbQtPM FBrzrvZ53bdp9rKuxjeaIuyzV1XZ4CvcH9F9+J1PRymvB3AMoTj23hlJkyNhleOuwafR ldsBhsULNkj4K+kEbMpWApYxxbY6vDeAU4edyS/FQggItDdJSaCo7AlR+ZVc6rY4Yizu BCJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019902; x=1708624702; 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=lxUYbRglPJnZ4TffGBHIWw40wYoW0NPrXDzHGmrcbes=; b=hYuOTP3xdRVP9x8jv6hjk/iamXTQsYzlEzxdtcHXj6TcXHRgcC1/Z/pTi6UwNNCgBX moDDoV3Btz8BPqsdCs9mqQ4Le9iGvY7LicWauisWeJMSyTJxzxyRu9HNHha9TnpwzvOR K1PXg+T8Npai1bb1mdySkCbDbzpuPcabd9AFghtJzIdQbK+j6D7nRpvGHsmMrqjvywFN ztFu6o/Kwbh6qlO88xCFB1kkNYtKz/QnQF0oojCEeVzMFlXFtiN5bTfCPQYX0RLceh0U Wqrmv8eC2diNeLSSlWP2JietYixEofM70VLgkeUcp3+Q0pEQD+26MA8F6yDAoLVqYb74 4eJg== X-Gm-Message-State: AOJu0Yy/f9Jd3jHym+VjNxsi9ZEXF8mdfCjsctwheNGYInYyZIrd2EhW JuhtACVXlqaOzqbaKSrmzBoAkP/xJjKhbk6Sj/tDI09NSBqQtJBltXSzubCwo16y+AaGhdHcE6n bG6U= X-Received: by 2002:a5d:49d1:0:b0:33c:e2d9:ad36 with SMTP id t17-20020a5d49d1000000b0033ce2d9ad36mr1967022wrs.20.1708019901832; Thu, 15 Feb 2024 09:58:21 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id k2-20020adff282000000b0033b8808355fsm2424533wro.28.2024.02.15.09.58.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:58:21 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Aurelien Jarno , Jiaxun Yang , Aleksandar Rikalo Subject: [PULL 04/56] target/mips: Remove helpers accessing SAAR registers Date: Thu, 15 Feb 2024 18:56:58 +0100 Message-ID: <20240215175752.82828-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-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=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 DisasContext::saar boolean is never set, so this code is not reachable. Remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240209090513.9401-2-philmd@linaro.org> --- target/mips/tcg/sysemu_helper.h.inc | 5 --- target/mips/tcg/sysemu/cp0_helper.c | 55 ----------------------------- target/mips/tcg/translate.c | 42 ---------------------- 3 files changed, 102 deletions(-) diff --git a/target/mips/tcg/sysemu_helper.h.inc b/target/mips/tcg/sysemu_helper.h.inc index f163af1eac..78f7272208 100644 --- a/target/mips/tcg/sysemu_helper.h.inc +++ b/target/mips/tcg/sysemu_helper.h.inc @@ -31,8 +31,6 @@ DEF_HELPER_1(mftc0_tcschedule, tl, env) DEF_HELPER_1(mfc0_tcschefback, tl, env) DEF_HELPER_1(mftc0_tcschefback, tl, env) DEF_HELPER_1(mfc0_count, tl, env) -DEF_HELPER_1(mfc0_saar, tl, env) -DEF_HELPER_1(mfhc0_saar, tl, env) DEF_HELPER_1(mftc0_entryhi, tl, env) DEF_HELPER_1(mftc0_status, tl, env) DEF_HELPER_1(mftc0_cause, tl, env) @@ -57,7 +55,6 @@ DEF_HELPER_1(dmfc0_lladdr, tl, env) DEF_HELPER_1(dmfc0_maar, tl, env) DEF_HELPER_2(dmfc0_watchlo, tl, env, i32) DEF_HELPER_2(dmfc0_watchhi, tl, env, i32) -DEF_HELPER_1(dmfc0_saar, tl, env) #endif /* TARGET_MIPS64 */ DEF_HELPER_2(mtc0_index, void, env, tl) @@ -104,8 +101,6 @@ DEF_HELPER_2(mtc0_hwrena, void, env, tl) DEF_HELPER_2(mtc0_pwctl, void, env, tl) DEF_HELPER_2(mtc0_count, void, env, tl) DEF_HELPER_2(mtc0_saari, void, env, tl) -DEF_HELPER_2(mtc0_saar, void, env, tl) -DEF_HELPER_2(mthc0_saar, void, env, tl) DEF_HELPER_2(mtc0_entryhi, void, env, tl) DEF_HELPER_2(mttc0_entryhi, void, env, tl) DEF_HELPER_2(mtc0_compare, void, env, tl) diff --git a/target/mips/tcg/sysemu/cp0_helper.c b/target/mips/tcg/sysemu/cp0_helper.c index 62f6fb4bf6..f8883a3515 100644 --- a/target/mips/tcg/sysemu/cp0_helper.c +++ b/target/mips/tcg/sysemu/cp0_helper.c @@ -371,22 +371,6 @@ target_ulong helper_mfc0_count(CPUMIPSState *env) return (int32_t)cpu_mips_get_count(env); } -target_ulong helper_mfc0_saar(CPUMIPSState *env) -{ - if ((env->CP0_SAARI & 0x3f) < 2) { - return (int32_t) env->CP0_SAAR[env->CP0_SAARI & 0x3f]; - } - return 0; -} - -target_ulong helper_mfhc0_saar(CPUMIPSState *env) -{ - if ((env->CP0_SAARI & 0x3f) < 2) { - return env->CP0_SAAR[env->CP0_SAARI & 0x3f] >> 32; - } - return 0; -} - target_ulong helper_mftc0_entryhi(CPUMIPSState *env) { int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); @@ -514,13 +498,6 @@ target_ulong helper_dmfc0_watchhi(CPUMIPSState *env, uint32_t sel) return env->CP0_WatchHi[sel]; } -target_ulong helper_dmfc0_saar(CPUMIPSState *env) -{ - if ((env->CP0_SAARI & 0x3f) < 2) { - return env->CP0_SAAR[env->CP0_SAARI & 0x3f]; - } - return 0; -} #endif /* TARGET_MIPS64 */ void helper_mtc0_index(CPUMIPSState *env, target_ulong arg1) @@ -1108,38 +1085,6 @@ void helper_mtc0_saari(CPUMIPSState *env, target_ulong arg1) } } -void helper_mtc0_saar(CPUMIPSState *env, target_ulong arg1) -{ - uint32_t target = env->CP0_SAARI & 0x3f; - if (target < 2) { - env->CP0_SAAR[target] = arg1 & 0x00000ffffffff03fULL; - switch (target) { - case 0: - if (env->itu) { - itc_reconfigure(env->itu); - } - break; - } - } -} - -void helper_mthc0_saar(CPUMIPSState *env, target_ulong arg1) -{ - uint32_t target = env->CP0_SAARI & 0x3f; - if (target < 2) { - env->CP0_SAAR[target] = - (((uint64_t) arg1 << 32) & 0x00000fff00000000ULL) | - (env->CP0_SAAR[target] & 0x00000000ffffffffULL); - switch (target) { - case 0: - if (env->itu) { - itc_reconfigure(env->itu); - } - break; - } - } -} - void helper_mtc0_entryhi(CPUMIPSState *env, target_ulong arg1) { target_ulong old, val, mask; diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index 12094cc1e7..173b19a090 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -5151,17 +5151,6 @@ static void gen_mfhc0(DisasContext *ctx, TCGv arg, int reg, int sel) goto cp0_unimplemented; } break; - case CP0_REGISTER_09: - switch (sel) { - case CP0_REG09__SAAR: - CP0_CHECK(ctx->saar); - gen_helper_mfhc0_saar(arg, tcg_env); - register_name = "SAAR"; - break; - default: - goto cp0_unimplemented; - } - break; case CP0_REGISTER_17: switch (sel) { case CP0_REG17__LLADDR: @@ -5252,17 +5241,6 @@ static void gen_mthc0(DisasContext *ctx, TCGv arg, int reg, int sel) goto cp0_unimplemented; } break; - case CP0_REGISTER_09: - switch (sel) { - case CP0_REG09__SAAR: - CP0_CHECK(ctx->saar); - gen_helper_mthc0_saar(tcg_env, arg); - register_name = "SAAR"; - break; - default: - goto cp0_unimplemented; - } - break; case CP0_REGISTER_17: switch (sel) { case CP0_REG17__LLADDR: @@ -5680,11 +5658,6 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel) gen_mfc0_load32(arg, offsetof(CPUMIPSState, CP0_SAARI)); register_name = "SAARI"; break; - case CP0_REG09__SAAR: - CP0_CHECK(ctx->saar); - gen_helper_mfc0_saar(arg, tcg_env); - register_name = "SAAR"; - break; default: goto cp0_unimplemented; } @@ -6406,11 +6379,6 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel) gen_helper_mtc0_saari(tcg_env, arg); register_name = "SAARI"; break; - case CP0_REG09__SAAR: - CP0_CHECK(ctx->saar); - gen_helper_mtc0_saar(tcg_env, arg); - register_name = "SAAR"; - break; default: goto cp0_unimplemented; } @@ -7180,11 +7148,6 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, int reg, int sel) gen_mfc0_load32(arg, offsetof(CPUMIPSState, CP0_SAARI)); register_name = "SAARI"; break; - case CP0_REG09__SAAR: - CP0_CHECK(ctx->saar); - gen_helper_dmfc0_saar(arg, tcg_env); - register_name = "SAAR"; - break; default: goto cp0_unimplemented; } @@ -7892,11 +7855,6 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel) gen_helper_mtc0_saari(tcg_env, arg); register_name = "SAARI"; break; - case CP0_REG09__SAAR: - CP0_CHECK(ctx->saar); - gen_helper_mtc0_saar(tcg_env, arg); - register_name = "SAAR"; - break; default: goto cp0_unimplemented; } From patchwork Thu Feb 15 17:56:59 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: 772950 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp963169wre; Thu, 15 Feb 2024 09:59:21 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU0B4m5LpMjiFMMylj7PYqsQAok/noc8mrTKd67wFOSUup9t0Oy9olXeT+6AaoRFABzenMyBoscGFw6DI8xqOou X-Google-Smtp-Source: AGHT+IGl65NFXoMwUmt7VzsdmibpUdyvo4vaBaQjnBNEvNW/44JQ6mqhURnLofstsRQsneGDtVqF X-Received: by 2002:ae9:e30f:0:b0:787:3307:1258 with SMTP id v15-20020ae9e30f000000b0078733071258mr3410972qkf.8.1708019961046; Thu, 15 Feb 2024 09:59:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708019961; cv=none; d=google.com; s=arc-20160816; b=yOh9l+7FNTN2rPteQXbCSe/wlh1IZLXIaCD7a8B38ZUbfg6CAgwpnCwCIw3xElOUVy Ju5mfBXvZY5cS2WVuG6QRZb2HAhUPLHPPmih72JfM+mPe1ApIuc1+ZxLK8ji2Rt3pVHB CxZ8v48JfKqsJskHnz8oL8IBl0wPPIzTHM7uMlVImB7/Esxu3XwgABOI4/rbMhzsK4/L PpM8SKweqcbkkDCybBDOdIxl11gKPxXIs4i7TumnfI59fF4MMcnRxOxntyiNRICLyQEz QE55G2rmX6PjQoEC7GMnPe7mXiYBlPhubthC0mfvRq6ZYeWpr/DrzYltCKAHPdYdt8d1 LRhQ== 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=q3zPvVIMcLhE7BLwqgmHZIk2g3tz5ma+i24zz6Qyo/c=; fh=lRC2ncmChQypkkJJdtc0mbB9VdPI1vHsLj93b9zwgOM=; b=a/C3vapmdEQ3jM6mCyReM8A5il71d2+5nxQHmKjf8bGApL41+zy4z5mpcAslGNBVxe zup8lJiKFbIi+IlitSau7cUJSz3x5bkc+0VhNBcsdwS1z1sDnc5BoaArcBy/QgFJmXKs SaGxRiSmssjkqumJ5mSVXGYJeR1AIzmh+TkPZZvwqciNFpifCcmRSQ+JjB2bJUUsZuM9 rOrbWT5xpUOZRE9B+TgdSbxZmSnJ8qdEL5WOT1xUtRamwtp5x/wtfAckSVuZL4UkFaUt tjWEC7SI+opPxLA4VOxJ7X0Yst1B6wSvKjUHii9QZVVOM7yT26kihXT3X0uo6fy0uSyl r3PQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W4QhkEQx; 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 b9-20020a05620a088900b00785dad6dc54si1994135qka.15.2024.02.15.09.59.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 09:59:21 -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=W4QhkEQx; 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 1rag0O-00026F-PG; Thu, 15 Feb 2024 12:58:40 -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 1rag0H-0001pf-Ep for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:58:33 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag0D-0001Xm-Sk for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:58:32 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-411a5b8765bso7195585e9.1 for ; Thu, 15 Feb 2024 09:58:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019908; x=1708624708; 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=q3zPvVIMcLhE7BLwqgmHZIk2g3tz5ma+i24zz6Qyo/c=; b=W4QhkEQxiPRlxEH5qhQ11n83Bcx417vXOO6suJ9noFNTocaJDAFJCQhhEJGiwoHlJh FV6dEfVf7kJCPZnapToNKBD4AKuhmuLsZ+roBexUB1KACZXvnug74YLphH9UYENgU4oy Pj9Ma8YvJiFXN0Aadt50LrPKokXw3VHRblbj7czalpZki0RUGR2rzCMYviao3oBbIKv0 R9p4HNZbps4BhkJhsldt+FF/aqnlGFvCYmGjMuQj5NpR8UkCX8WFR5wjiZ7tS89qsXtx 9W/vV6JK0MSznGpv14WQ1LhJVtNnm4NcVeo68LqW/TdTiQ+Txmod2igldmtEDnKjgnM0 ozYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019908; x=1708624708; 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=q3zPvVIMcLhE7BLwqgmHZIk2g3tz5ma+i24zz6Qyo/c=; b=CsDWW0zLP3SahxjwFRVdmt6IyPpBOBChBLUJgDjoQPVm7EMkW3z1wWVCFCHckm8qo5 HScOvzpxQboWn22ay9nYrF7OSJyb6T8LVWyvePZGsEX0LZ5IuHkXpv8YSgOGGmJQpdT8 gsbU1/Z4cn8dj9Er90osGNYVamExI8ti3zuY9Xasxxx4fw75f8Tt94iiWEMUrCDasALD 6ijRlB3wPlbH3uO/GkNS/YAlIozBApBvOa0jKZHLhWLYHjfgo7ll35EEws7frVIDyNZA A96ZL3v1BkUIMq/Xw8hVl4BwiIZerp8YMD3fhYo+l1TN8Hr1PTDNIIxOt+LLD38CXUue 51Ew== X-Gm-Message-State: AOJu0YyRQzI3B+CYAvoq8QSASjVqp4HRixEle+gYOMVspNOCpVGnhLOh WPxPyI1rS+j42WWByFhs8qk5hFXpZb4aPBJBjg2zxlSXLv6FrGY9yl36KXhCJFQtzAqYZ2Y9JkT Yoko= X-Received: by 2002:a05:600c:358c:b0:411:e0cd:9916 with SMTP id p12-20020a05600c358c00b00411e0cd9916mr5451880wmq.0.1708019907978; Thu, 15 Feb 2024 09:58:27 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id y5-20020a7bcd85000000b00410ab50f70fsm5602288wmj.15.2024.02.15.09.58.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:58:27 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Jiaxun Yang Subject: [PULL 05/56] hw/misc/mips: Reduce itc_reconfigure() scope Date: Thu, 15 Feb 2024 18:56:59 +0100 Message-ID: <20240215175752.82828-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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=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 Previous commit removed the MT*C0(SAAR) helpers which were the only calls to itc_reconfigure() out of hw/, we can reduce its scope and declare it statically. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240209090513.9401-3-philmd@linaro.org> --- include/hw/misc/mips_itu.h | 2 -- hw/misc/mips_itu.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/hw/misc/mips_itu.h b/include/hw/misc/mips_itu.h index 5caed6cc36..3a7330ac07 100644 --- a/include/hw/misc/mips_itu.h +++ b/include/hw/misc/mips_itu.h @@ -79,6 +79,4 @@ struct MIPSITUState { /* Get ITC Configuration Tag memory region. */ MemoryRegion *mips_itu_get_tag_region(MIPSITUState *itu); -void itc_reconfigure(struct MIPSITUState *tag); - #endif /* MIPS_ITU_H */ diff --git a/hw/misc/mips_itu.c b/hw/misc/mips_itu.c index 37aea0e737..db1220f8e0 100644 --- a/hw/misc/mips_itu.c +++ b/hw/misc/mips_itu.c @@ -86,7 +86,7 @@ static uint64_t itc_tag_read(void *opaque, hwaddr addr, unsigned size) return tag->ITCAddressMap[index]; } -void itc_reconfigure(MIPSITUState *tag) +static void itc_reconfigure(MIPSITUState *tag) { uint64_t *am = &tag->ITCAddressMap[0]; MemoryRegion *mr = &tag->storage_io; From patchwork Thu Feb 15 17:57:00 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: 772948 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp963159wre; Thu, 15 Feb 2024 09:59:20 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWl6mJD0PSloVdX37P+yUVurEs0dQZ+ilkAYqg2h/YhtoAlmjr8Qcy4WhVnG7YizOb7/w8Itr0qL1RHrubI4xlh X-Google-Smtp-Source: AGHT+IHXjFzXkjxTESMPjZCp6ll0u/VDz2u8HFfLGGr47XVwjW/z7tOtW8eh0UeFe9J85uJtEoa+ X-Received: by 2002:a1f:ec41:0:b0:4b6:ea01:f1ce with SMTP id k62-20020a1fec41000000b004b6ea01f1cemr2296364vkh.5.1708019959931; Thu, 15 Feb 2024 09:59:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708019959; cv=none; d=google.com; s=arc-20160816; b=PrNn3YByNozJrO6DVSQQnXhW/34qZ5K7PKbeAp1+GLoSC10NJJRAJwRYyRUHFznknw vQRueOjee2w6uARmfT/bYRGWk5o+5xVTtsPGribgp6tyrT5fYqZoFs1i5rn6CO/kQ4jE rpBVxyYiBdC0j2CsqDCNeFpr72daPD6K4zE2EEMkJZM4k1iP3mtHk8nKQlk/iMggNn+9 FDYh9UnKdwvVbFNBy59LzN4VD6nNYKIugIHUSOK7aZIUujF8UhLwFq+de04KNq8mdZVo rJh7WAml4rp7d7yyzl1N5iJH5kvf58M/00x0q2lnxSMDr3w1p/k4u5QJvVKWW9qR2jS4 m8Kg== 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=i5xwpltx5l7qD+BagWyDh/IKXIed1E1E2CgPvP162Y0=; fh=lFbaFE9CCURXS2ZRFy5xEQEZPoERQGZgvMk0cqzTFRw=; b=yea9uuokort9MfZlL4WtBYsZtx/Iy9PT4r+5iK/JHje0EEt+BQxXGUG9iA2b1RHr7y +OspgFRcc/lJW6bdPeajb5LgViTC75VMbzwGvcSLhXPGwvuaZoGUP3ocsX7+5pVrhuYJ BVwHRU+tKIX7C1MglopI95x8vmGRDxNEZpk9MtAHwEn2QtVNz6Rk3D/X/6ZCsJVMb1Yi LWQ8FmaqEwGP/LuxcfwSbKbzVmNcLfzfTVi04t2QUs/vZEzDfoPCBHD+zUyMQdQ3b6uz aUyqI6P6IqpYrWX2NxUpwbGP8jJhqJ7vm2LZQzVJq7llxbBeIJCSjm3JgWjQBNUYiFek bWhw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OmHmB1Pk; 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 jr3-20020a0562142a8300b0068d12a32744si1906879qvb.215.2024.02.15.09.59.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 09:59:19 -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=OmHmB1Pk; 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 1rag0U-0002Jm-WA; Thu, 15 Feb 2024 12:58:47 -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 1rag0R-0002Dc-JT for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:58:44 -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 1rag0L-0001ZG-MW for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:58:43 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-411de7c6b3dso9091535e9.3 for ; Thu, 15 Feb 2024 09:58:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019914; x=1708624714; 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=i5xwpltx5l7qD+BagWyDh/IKXIed1E1E2CgPvP162Y0=; b=OmHmB1Pk3FatWh83WmWD2/UXfGP1uXw52nNZBzOOT8HmWx3biWJcx5vgzMUaKezvAy guTrvaDwkBSCq4Yln8IJLSy+AXjoK3K1qS2gkNG6UH8iSLSYO/B0jwVapbtO7CuUH9fH o5nXBEb4PxrRuM93ElDWDKMUP9p9YW2y5lBdHcmKNkoR3zsaBCYFCNmkBSqSmf2cTqXB KMnoklHB1zLwJ7B+loEijEYFzrNHFRE26bF4SwVpraNRiG/CyWgnYSdOmv7PC4B0336/ n4MgIZFeK0v5LiHIaZQGDj31Xaz03OA0vXtleLEahhNcUXgKftACx4QIngFvHEAoKkF9 k6Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019914; x=1708624714; 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=i5xwpltx5l7qD+BagWyDh/IKXIed1E1E2CgPvP162Y0=; b=invfnKFGrOLDpQLOQT6tMw7C8/+hIqiwovRO1HrKMSC0SE6aLLzgwBWSbujVbuoRmo BgCKgFx55cpgJHlb1hma5T/zSX2Gismqx8/bz/YA+dirueNLKcAN2XvQSBmrHgYTwFqh chZvAZeOFBSVTK08eOOYGW1eLnqWHpydNDwj4aAQZ4PPLs2JeS3R8WPiG6BheOiNZpY9 ZZr9RbIqI9VL541fgBsO00VpA+VZ7zuN48Qc5fuA2l1NYPt0gYa+dSdYNSFIKfcHqNV6 0864YoG+H/bZsSpG79B3fuJlguv63Iad4lv7TWuwTdqELw8xBZ44wqB0LURJQo2GXYbt zWtw== X-Gm-Message-State: AOJu0YxAl+3JAAnyBnuqPVTFlaAu1da23277qa29hp/gjoXsmWvvajJn EstJ0jIivlwL1973ryoDYg219K4MEYeC1s9Ky8O6VY2KsBwIdzWGTOiBbBS6TgGQn1CLTYuMZYY gbbY= X-Received: by 2002:a05:600c:3ca6:b0:40f:c404:e2d1 with SMTP id bg38-20020a05600c3ca600b0040fc404e2d1mr2735850wmb.19.1708019914626; Thu, 15 Feb 2024 09:58:34 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id a1-20020a05600c224100b00412260889d9sm1614375wmm.1.2024.02.15.09.58.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:58:34 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Aurelien Jarno , Jiaxun Yang , Aleksandar Rikalo Subject: [PULL 06/56] target/mips: Remove MIPSITUState::itu field Date: Thu, 15 Feb 2024 18:57:00 +0100 Message-ID: <20240215175752.82828-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-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=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 Previous commits removed the MT*C0(SAAR) helpers which were using CPUMIPSState::itu, we can now remove it too. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240209090513.9401-4-philmd@linaro.org> --- target/mips/cpu.h | 1 - hw/mips/cps.c | 1 - 2 files changed, 2 deletions(-) diff --git a/target/mips/cpu.h b/target/mips/cpu.h index b4788e1af2..d54e9a4a1c 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -1184,7 +1184,6 @@ typedef struct CPUArchState { #if !defined(CONFIG_USER_ONLY) CPUMIPSTLBContext *tlb; qemu_irq irq[8]; - struct MIPSITUState *itu; MemoryRegion *itc_tag; /* ITC Configuration Tags */ /* Loongson IOCSR memory */ diff --git a/hw/mips/cps.c b/hw/mips/cps.c index 4f12e23ab5..988ceaa0b9 100644 --- a/hw/mips/cps.c +++ b/hw/mips/cps.c @@ -96,7 +96,6 @@ static void mips_cps_realize(DeviceState *dev, Error **errp) itu_present = true; /* Attach ITC Tag to the VP */ env->itc_tag = mips_itu_get_tag_region(&s->itu); - env->itu = &s->itu; } qemu_register_reset(main_cpu_reset, cpu); } From patchwork Thu Feb 15 17:57: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: 772956 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp964369wre; Thu, 15 Feb 2024 10:01:21 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWgR1mypHs57CYklN4902+5Xo5Brnj9uxTnB4nB2WA6C44uNs1bhyES+O7BzggvyPv8ZJQ5Gqt3kmwz9274+P+4 X-Google-Smtp-Source: AGHT+IHGAmHltPFpKcZQhRzLgtabP8leuPBj+7zTsAUeSHeu8JRJSPg2mxRTdUdH9ssEk8D1CzFF X-Received: by 2002:a05:6102:9c4:b0:46d:49ac:6ec5 with SMTP id g4-20020a05610209c400b0046d49ac6ec5mr2349730vsi.14.1708020081734; Thu, 15 Feb 2024 10:01:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020081; cv=none; d=google.com; s=arc-20160816; b=I6fWyMsDfl6rmg0p1wW1+D3kzvM+dnSeDka+guCCclzkKGZxb14ZsMUSiNup9o8grd VLMlIMbnlbxYGoGgBWhKToF9DJjmyhRZz3An957RZlgBC0kYRVMauyR2zYASZwOCFouc hbBBiNJLNk0eh6oOFWqCkMflbJDsfLFINgqBippM9UEcmKnSjtaHx+z5iOOZoooSPbP+ 7aJC5iQ5wCv7kS/b8rnp7pdJ0/pCvcaUm/HdwDjow0GGYelSbF9UVeirTtVpblfsvgD1 Fnzqa5hYz41gkOkBP1nIRlY1Ff4aOUzqJYJacvuOBlnAGHbdgJMU5BzESs/Q3N9vrMZQ O1gQ== 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=g8Q7JMG8zjBMQCOseTC/pxZZVdCkiwcgzQoWO2YHIuA=; fh=lFbaFE9CCURXS2ZRFy5xEQEZPoERQGZgvMk0cqzTFRw=; b=oTXKj+GziY0Amh0H/Dg8hxDM3lrJlKW8ZhjOuiHWX3j+y+C4BBhUKxCe639ZN3FiKV JpcOuxBm22qEBhmsiMoNJTBH3OEve+rKvfVQrVJT0pBn2hWYQewiIm7mGbuUUVoWMxxs 1NNi8b/JpyV2Q23y7PkmzvwYJfZTfvKPyv9FNyO/bwhW8IqGYE1ly1JVSJsoObD+Rjgs NFhk66UBvW6Do3rzosXM1x1kyUCp2+HVJwiXV3rI7Y4yDUJRNNuV3n4Np0zcaTX6iyzy 5CDeFghVfWKcI05Wt6oHF4V5QbwuIWFWKqhdNcvji4076tFNgJVYoEWAGIenk1BJ7sDM EBew==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iLO5hOgo; 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 l6-20020a67ba06000000b0046d2c4b7f02si341162vsn.386.2024.02.15.10.01.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:01:20 -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=iLO5hOgo; 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 1rag0V-0002Nx-VR; Thu, 15 Feb 2024 12:58:47 -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 1rag0T-0002Gh-IW for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:58:45 -0500 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag0R-0001aU-GZ for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:58:45 -0500 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2d1094b549cso16234121fa.3 for ; Thu, 15 Feb 2024 09:58:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019921; x=1708624721; 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=g8Q7JMG8zjBMQCOseTC/pxZZVdCkiwcgzQoWO2YHIuA=; b=iLO5hOgoUCOpbTwFk1j/T5TF48CUbqBz1hEGjSNTN1CAQi0WbqRsOiL98u+4nZq2EA EpFeZH7ZJ1tnI7wgk4J/DmPGI5bHzd/yWJQLZc/ED6MYuaMK6tHg2stVZDumIYF4Lpb0 zZfdXm2oadS6mEBHuQyjuAAOKaOI0e6ijcCyYvPfi7auhRHfndxwiBt41ZqVB5sXODGP Yrw0iT3qH7PY3Ufy4Lqv5407Dl4wgAc4ed9UxUjm0dH5PWuiumB0Kkci7W9vth9SvbpC syNZVEcaJfLvehkZdsqUxC7SLG+JmOhwPD45m6VoGlEBhe7fXMXJN7hIu+og8gglDWKK ChRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019921; x=1708624721; 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=g8Q7JMG8zjBMQCOseTC/pxZZVdCkiwcgzQoWO2YHIuA=; b=PbZSFFFe95FgbQfRhU+YMeiUG4JXWxsTLboUApjgMJ2dWujHlB+Z5wws5YmwizNvzk XKiXri+rMr6ovpbH1OOhRKn1j5EahV4NjpdVG8hvuK9jYIWwK8QqcihscCrbOIWWX2dc 91xvpqHpjRDTHbo/Y2jyTfuWrCyo6XZdXAyaih6akhxJcMlPKQZKdJ5SXEzJV2Fn5Rvy 1zIOPKXGxBcCjo3fYUpZUXb1ir/J8mekSwIIUzZKROb5Z7YFs7LlGHl5mKo9VMWk3Mrl lAjqhmewVyhxhzKFBeUa8JNYyQtmv6900zWxKThYMUVl5b8v05N5XguMb+NWfyPRXJtU laBQ== X-Gm-Message-State: AOJu0YyF56RdiFm6aJsPj+qI1K9Bct6u8R7+fg0mDHBgSB0kCB0mr73W o79hISJX92KKqwoD1uwPY2wGgwITcrgOioO3TRPSYpuy1KnC6hHRrcqh5JFzKEGlC8ovbo6g9uS o2UY= X-Received: by 2002:a2e:9dc5:0:b0:2d1:788:60ff with SMTP id x5-20020a2e9dc5000000b002d1078860ffmr1968176ljj.16.1708019921454; Thu, 15 Feb 2024 09:58:41 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id j12-20020a05600c190c00b00410bca333b7sm5913132wmq.27.2024.02.15.09.58.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:58:41 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Aurelien Jarno , Jiaxun Yang , Aleksandar Rikalo Subject: [PULL 07/56] target/mips: Remove CPUMIPSState::saarp field Date: Thu, 15 Feb 2024 18:57:01 +0100 Message-ID: <20240215175752.82828-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::235; envelope-from=philmd@linaro.org; helo=mail-lj1-x235.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=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 This field is never set, so remove the unreachable code. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240209090513.9401-5-philmd@linaro.org> --- target/mips/cpu.h | 1 - hw/misc/mips_itu.c | 6 ------ 2 files changed, 7 deletions(-) diff --git a/target/mips/cpu.h b/target/mips/cpu.h index d54e9a4a1c..ef1d9f279c 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -1174,7 +1174,6 @@ typedef struct CPUArchState { uint32_t CP0_Status_rw_bitmask; /* Read/write bits in CP0_Status */ uint32_t CP0_TCStatus_rw_bitmask; /* Read/write bits in CP0_TCStatus */ uint64_t insn_flags; /* Supported instruction set */ - int saarp; /* Fields up to this point are cleared by a CPU reset */ struct {} end_reset_fields; diff --git a/hw/misc/mips_itu.c b/hw/misc/mips_itu.c index db1220f8e0..d259a88d22 100644 --- a/hw/misc/mips_itu.c +++ b/hw/misc/mips_itu.c @@ -516,7 +516,6 @@ static void mips_itu_init(Object *obj) static void mips_itu_realize(DeviceState *dev, Error **errp) { MIPSITUState *s = MIPS_ITU(dev); - CPUMIPSState *env; if (s->num_fifo > ITC_FIFO_NUM_MAX) { error_setg(errp, "Exceed maximum number of FIFO cells: %d", @@ -533,11 +532,6 @@ static void mips_itu_realize(DeviceState *dev, Error **errp) return; } - env = &MIPS_CPU(s->cpu0)->env; - if (env->saarp) { - s->saar = env->CP0_SAAR; - } - s->cell = g_new(ITCStorageCell, get_num_cells(s)); } From patchwork Thu Feb 15 17:57: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: 772949 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp963167wre; Thu, 15 Feb 2024 09:59:21 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVf3SWJ58/gYqIY5FqJLKKeUjT/My/yOLQmZOEWNeLrxUpxB45ZaJbhzSKkQpzHTLJ8FJ3Wto+6bEHlzT4B6pXn X-Google-Smtp-Source: AGHT+IECw7nyYZKDPLD0UA4FYx8UUWMxNOVRUaDu2ojt98yImo+KE45/FACGhv3E1wW5Pmf+iJD1 X-Received: by 2002:a05:622a:84:b0:42a:6d5d:18ac with SMTP id o4-20020a05622a008400b0042a6d5d18acmr8302009qtw.22.1708019960860; Thu, 15 Feb 2024 09:59:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708019960; cv=none; d=google.com; s=arc-20160816; b=WEBB5SI5pqfJ1HSEjmfeOvFYI5FuF6snUR+MZI1r3BETT0SCRdailEPRGrEnGsZ3AV dKOe6cEGwVXJ7mIdkdkHawTXEVu/p7cqtsD+S3CrPE3o0cmH0wZr8rr0omA9Eyoza4Pd eNY/3BRSCz/eQbLIzG0EWzfDtJHbjepIe3PlHOjOQ+fFAviPzWRpJZkGZ26SXOhukgsU vuw40WB9rLJOAm/UPjrdyJuAjy2IRpzdBlkQq2oYY2tE5X6N2IhnFgbc6yzen4xeXFS6 lgvtXRKvg2PwkcbcaaGzZrmaHRWM2u7WYb5xTelG/lM5wZrRPXUPlUHu7iQCaDt3Cy5f z3IA== 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=dqF/h4b+bAkBGCkEQ2mmapUdtDBHzstE/FcKUqg3JE0=; fh=lRC2ncmChQypkkJJdtc0mbB9VdPI1vHsLj93b9zwgOM=; b=jQjsAWZJpzlKxMwva0vZclvJhKadpBuyeFWakB0wcqR3tpBC/GD58qzDf0gshKDTCO jjsk1cvoHHjVpYGKnVGxnEfDsZE8n7Q0UHoQcjK3KetyOagQGQtxSZObbGdwG7SpPWIT tEKEVKpF7FtEkEvrSSNTNv6zRGr0P4gK1sz2miM91KYX9Od50ljbd2sUtVw+uUHZhvrm CAfPWtsZblQRdxzCSSwOOBHJpiL9ktMaeEK5CMHurpAVFuXbTgF7VUqm0AJvNgz9Q5Zx /++OQA/zVaKUQ4GJesLAkJhnFjwP03FXWtf+zyM5+58T1Blbm8A6s938gqOXXQZNzv52 A98g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VWB0F8qP; 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 v21-20020ac85795000000b0042c7bef8823si2043216qta.146.2024.02.15.09.59.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 09:59:20 -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=VWB0F8qP; 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 1rag0d-0002la-Dl; Thu, 15 Feb 2024 12:58:55 -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 1rag0a-0002Ul-8J for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:58:52 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag0X-0001cJ-BN for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:58:51 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-41205e19660so8277415e9.2 for ; Thu, 15 Feb 2024 09:58:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019927; x=1708624727; 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=dqF/h4b+bAkBGCkEQ2mmapUdtDBHzstE/FcKUqg3JE0=; b=VWB0F8qP7WsXDHhyNPZLICbOchqETj//++eQAdxI4EGlOhonU4Uq2PQDBzYBIm+xJZ PXbg7gO7VV6QtxRlAQ9WfG3/myANVVhyDurwo56v2AUYl43YfgZJFyPCn640Gqbkc/9H Mg4uLWI6lA34ElGdKIhYgAK0IZeSqqbjLzjWDbzgcSab3XXnpRtH9ZFtON/NuXpRItMh wOtL1RpfA23hoXNcuKTgyIaRl2DpeJCNQTkuaXbxrVEDqLLHiZWE93ygevYKNkbW9D0/ TaDQOtCK0MrIB8eyKgOvqu3HgaFZtKtgKBEWNlqWjdTvhRLipDFXEGYKdMsSI0MvfWXE YZuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019927; x=1708624727; 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=dqF/h4b+bAkBGCkEQ2mmapUdtDBHzstE/FcKUqg3JE0=; b=oDdKJJzZzUNwxcbqxhAeFFjyf8iY6Y6/GLFq8l0DQISVkAmCMmgcQlX63Iq3kB+o4N fcaOeFZQQittNj1+oXGeJfNBghiFoGZSMKOYuBcAoXEburlQtTfam1k4IXNLzJOCmnKN zn+5A32D+lU3oJ2CtVW3IAqzqSi7uCT2SAJs195b2Hcs1XckF1F4mYiUaidaIaPWqVY+ uzhGNoAH99tgYxqPTiINDZ6PMB0eY9h/xwToEBpf5h+ugnwqKIw3rSDssy4cMYc1wA4j lapryin+0MmG036DfKVbgywNtIqEff034dlX0PZdaJtB5KoAGI5/ZTOEnzOd77Ztp3f2 2T2w== X-Gm-Message-State: AOJu0Yzjbrl6Yo33VIDTfyk9M0xvL3s0ZlTejx/hauW+2Hwr6a7vobXl 1vNx7DAbzYXTA3gf8t08zW88RhNellSCTdTQ2gwqs7fn2QWTFdUJw6YWIP7AIK9p8WgLD5BKN7y f5K0= X-Received: by 2002:adf:fd4e:0:b0:33b:4838:a23 with SMTP id h14-20020adffd4e000000b0033b48380a23mr1761902wrs.29.1708019927683; Thu, 15 Feb 2024 09:58:47 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id bh8-20020a05600005c800b0033b888a0a63sm2640261wrb.0.2024.02.15.09.58.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:58:47 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Jiaxun Yang Subject: [PULL 08/56] hw/misc/mips_itu: Remove MIPSITUState::cpu0 field Date: Thu, 15 Feb 2024 18:57:02 +0100 Message-ID: <20240215175752.82828-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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=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 Since previous commit the MIPSITUState::cpu0 field is not used anymore. Remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240209090513.9401-6-philmd@linaro.org> --- include/hw/misc/mips_itu.h | 1 - hw/mips/cps.c | 2 -- hw/misc/mips_itu.c | 5 ----- 3 files changed, 8 deletions(-) diff --git a/include/hw/misc/mips_itu.h b/include/hw/misc/mips_itu.h index 3a7330ac07..de7400c1fe 100644 --- a/include/hw/misc/mips_itu.h +++ b/include/hw/misc/mips_itu.h @@ -73,7 +73,6 @@ struct MIPSITUState { /* SAAR */ uint64_t *saar; - ArchCPU *cpu0; }; /* Get ITC Configuration Tag memory region. */ diff --git a/hw/mips/cps.c b/hw/mips/cps.c index 988ceaa0b9..07b73b0a1f 100644 --- a/hw/mips/cps.c +++ b/hw/mips/cps.c @@ -103,8 +103,6 @@ static void mips_cps_realize(DeviceState *dev, Error **errp) /* Inter-Thread Communication Unit */ if (itu_present) { object_initialize_child(OBJECT(dev), "itu", &s->itu, TYPE_MIPS_ITU); - object_property_set_link(OBJECT(&s->itu), "cpu[0]", - OBJECT(first_cpu), &error_abort); object_property_set_uint(OBJECT(&s->itu), "num-fifo", 16, &error_abort); object_property_set_uint(OBJECT(&s->itu), "num-semaphores", 16, diff --git a/hw/misc/mips_itu.c b/hw/misc/mips_itu.c index d259a88d22..9705efeafe 100644 --- a/hw/misc/mips_itu.c +++ b/hw/misc/mips_itu.c @@ -527,10 +527,6 @@ static void mips_itu_realize(DeviceState *dev, Error **errp) s->num_semaphores); return; } - if (!s->cpu0) { - error_setg(errp, "Missing 'cpu[0]' property"); - return; - } s->cell = g_new(ITCStorageCell, get_num_cells(s)); } @@ -558,7 +554,6 @@ static Property mips_itu_properties[] = { ITC_FIFO_NUM_MAX), DEFINE_PROP_UINT32("num-semaphores", MIPSITUState, num_semaphores, ITC_SEMAPH_NUM_MAX), - DEFINE_PROP_LINK("cpu[0]", MIPSITUState, cpu0, TYPE_MIPS_CPU, ArchCPU *), DEFINE_PROP_END_OF_LIST(), }; From patchwork Thu Feb 15 17:57:03 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: 772954 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp963592wre; Thu, 15 Feb 2024 10:00:11 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW50ysTL4iiGwDdt0+bXHoPGOu67abL3jAF+TGfI6dBVm8vwULJejlELm0DeHZSIb6xXoCl8tof4GVhFUPrrReV X-Google-Smtp-Source: AGHT+IFCbCYbBaKw/3/ea0Q1r3ofdt8VZvsvrRdP+zIri3UBniFORB0SZSwdxO5sUatOAXB6wmPs X-Received: by 2002:a05:6830:18ef:b0:6e4:323a:29ae with SMTP id d15-20020a05683018ef00b006e4323a29aemr885195otf.30.1708020011176; Thu, 15 Feb 2024 10:00:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020011; cv=none; d=google.com; s=arc-20160816; b=xsGg1uFwjsmLj4nRWla+oLKK5gkkjyfUzwHsqgw4M/tSn8wvvWXNmaG/zr3WzEEdM8 zHtM4NCM8iibCJT+G710HH0PjAjTelWpnSKzVwkU1sj9knWaApKwAYneshExqiQ0EetY qCXaIiXgnXAsKiqVipWCiLyJNjoVQhShFhh6+AqHQXGHPRDoks94my/sOF1zf4Vj0Ved +Xjv+I1Kvu6STii1qwWdSPP5KfT2YjZWzyAECrBqVuCFc5gTEs6Le15KmPn7plOMvUdX yOScDzrW/fWGpXuEbIzcY8jfwh1mbk4pPUOXvoYuNIbsYcpz/hJh87zzVvlBUWxIjXBP 1RKw== 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=hD8QAEO8EbU5eNO1CRG3i0Yg3oXr277vzzBLMpE0y8U=; fh=lRC2ncmChQypkkJJdtc0mbB9VdPI1vHsLj93b9zwgOM=; b=cBKBsRlsmbxHMphdDSt8vzozbuaDCj22lS2kfUnC3mJG4zUrBwxwV/PQxITy93k1pQ nIsUf8+NAdG+uCPNWtN/v6XrR/Ove6HE9WN2AZt2kGu87VZHi1DgirXYSmwXiJwqDrec Y52Eo6Y/zP2E5n/hU62Xr4qOLv07NIN44SqyzCjALKPr5vQIuinI+gatJqB5AeNmGSyI nvwwmvekT7zG3Cq+bGcv4E6dNLAHWUjucjJHSA27NgJOg/sEU/geeqXosYt0K4wkcCBn WQmTS9TbE/dP+BuOOaTXYKUMkmltOklupjniCg2kQB6wVEL+CvVt4LADVFvRY6dD0Zz6 riAw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=scyoVn6H; 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 h14-20020a05622a170e00b0042dd90fb5d0si473112qtk.710.2024.02.15.10.00.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:00:11 -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=scyoVn6H; 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 1rag0h-000310-T2; Thu, 15 Feb 2024 12:58:59 -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 1rag0f-0002uu-6y for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:58:57 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag0d-0001dy-BC for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:58:56 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-41223e0777dso5683345e9.2 for ; Thu, 15 Feb 2024 09:58:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019933; x=1708624733; 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=hD8QAEO8EbU5eNO1CRG3i0Yg3oXr277vzzBLMpE0y8U=; b=scyoVn6Ham4tZol/QCpB1xrrnDs/nLkG3EBS7sOoEp9dhb9kSY1TS6/EDoiNAiaW4h bwsKDZdQKMF1ywawiHVSU33SGBuHoVu/QVeY+EnMleVk34UtXyR7aoeczBV7SCSewqQQ 6vetTpj5AQfMUr+lGrWXJw3VRfUceIn8RGgVgIOCu2sDKoRU1fCZSbCxTIz9PPSo/ba6 VT5OM2CKTfwGU+cQ0JucKwzig29qOV7H1Y+ZxD7QUvS7Q+b7lHjQUa957zklMIGsE20m NE08a1aKeG7XsnfJGmabR0raWHaYXaxXdJt7CPJDyYdcitxXYGlgR4ZoRASJUcJNfAbS Hc2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019933; x=1708624733; 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=hD8QAEO8EbU5eNO1CRG3i0Yg3oXr277vzzBLMpE0y8U=; b=K7ywZj2YgT+Qcs6Bj36bqFS2x4HGPcad8GuRRgv+HKPbaYRM6uj1DTMgI005k2FBvw awwicLKW1nVlAsJml1nB6ijs4zt47xS+jQxUueAn0SMcI2Q3qCqPNN+4Na4vMrWL2ZwZ J0KRCsU/j0GcRrGhYrs1vWsFu8PGAPhY+iscJ75MhWUdrdto1bp4j9v7dyd9EEVufGXd R6ZwVXxr1NjEAGPnv+uq/FQz61S9XVxPayZqq+AR9OjvERjFwUGCaGaMZt6F4JWiHB7T +QwizROZGnAMATUN6SNeo3f/yJZLqEzFWQdLbNyNxSPmv4wW+IHHdOocW7ZJx8sB0cbt tj0w== X-Gm-Message-State: AOJu0YyRXpCRk94wi96ijAufPy/wXPANNpfk6PPDU6jHUy4uFodCP5PM ypumDp33VRHnHKY0LDPyw6OdqjZRYzLHcXGx1liTOiimUsFkPNYbmGfnCddsemU++aDxzB643Xc BfN4= X-Received: by 2002:a05:600c:46cd:b0:410:cf60:d857 with SMTP id q13-20020a05600c46cd00b00410cf60d857mr1896947wmo.18.1708019933682; Thu, 15 Feb 2024 09:58:53 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id by7-20020a056000098700b0033b684d6d5csm2601836wrb.20.2024.02.15.09.58.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:58:53 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Jiaxun Yang Subject: [PULL 09/56] hw/misc/mips_itu: Remove MIPSITUState::saar field Date: Thu, 15 Feb 2024 18:57:03 +0100 Message-ID: <20240215175752.82828-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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=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 This field is not set. Remove it along with the dead code it was guarding. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240209090513.9401-7-philmd@linaro.org> --- include/hw/misc/mips_itu.h | 3 --- hw/misc/mips_itu.c | 22 +++------------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/include/hw/misc/mips_itu.h b/include/hw/misc/mips_itu.h index de7400c1fe..27c9a1090d 100644 --- a/include/hw/misc/mips_itu.h +++ b/include/hw/misc/mips_itu.h @@ -70,9 +70,6 @@ struct MIPSITUState { /* ITU Control Register */ uint64_t icr0; - - /* SAAR */ - uint64_t *saar; }; /* Get ITC Configuration Tag memory region. */ diff --git a/hw/misc/mips_itu.c b/hw/misc/mips_itu.c index 9705efeafe..f8acfb3ee2 100644 --- a/hw/misc/mips_itu.c +++ b/hw/misc/mips_itu.c @@ -94,12 +94,6 @@ static void itc_reconfigure(MIPSITUState *tag) uint64_t size = (1 * KiB) + (am[1] & ITC_AM1_ADDR_MASK_MASK); bool is_enabled = (am[0] & ITC_AM0_EN_MASK) != 0; - if (tag->saar) { - address = (tag->saar[0] & 0xFFFFFFFFE000ULL) << 4; - size = 1ULL << ((tag->saar[0] >> 1) & 0x1f); - is_enabled = tag->saar[0] & 1; - } - memory_region_transaction_begin(); if (!(size & (size - 1))) { memory_region_set_size(mr, size); @@ -158,12 +152,7 @@ static inline ITCView get_itc_view(hwaddr addr) static inline int get_cell_stride_shift(const MIPSITUState *s) { /* Minimum interval (for EntryGain = 0) is 128 B */ - if (s->saar) { - return 7 + ((s->icr0 >> ITC_ICR0_BLK_GRAIN) & - ITC_ICR0_BLK_GRAIN_MASK); - } else { - return 7 + (s->ITCAddressMap[1] & ITC_AM1_ENTRY_GRAIN_MASK); - } + return 7 + (s->ITCAddressMap[1] & ITC_AM1_ENTRY_GRAIN_MASK); } static inline ITCStorageCell *get_cell(MIPSITUState *s, @@ -535,15 +524,10 @@ static void mips_itu_reset(DeviceState *dev) { MIPSITUState *s = MIPS_ITU(dev); - if (s->saar) { - s->saar[0] = 0x11 << 1; - s->icr0 = get_num_cells(s) << ITC_ICR0_CELL_NUM; - } else { - s->ITCAddressMap[0] = 0; - s->ITCAddressMap[1] = + s->ITCAddressMap[0] = 0; + s->ITCAddressMap[1] = ((ITC_STORAGE_ADDRSPACE_SZ - 1) & ITC_AM1_ADDR_MASK_MASK) | (get_num_cells(s) << ITC_AM1_NUMENTRIES_OFS); - } itc_reconfigure(s); itc_reset_cells(s); From patchwork Thu Feb 15 17:57:04 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: 772952 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp963377wre; Thu, 15 Feb 2024 09:59:51 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWdiA77hj1V45Wgl6kxx5qTAL1itrcG8Y+indnY9Ue7qcEqLb7fM37bnisG65Hz+OHynI3SLAUMNzeuLxM/vv1d X-Google-Smtp-Source: AGHT+IE8rGM4N7OTgi5mWSAmdKB7oPBtUaP5MW5IIFXUGRbQe6yLB6T8YDDlgtL6T/p8oEaq+55S X-Received: by 2002:a0c:df0d:0:b0:68c:92ea:c5ed with SMTP id g13-20020a0cdf0d000000b0068c92eac5edmr2828970qvl.34.1708019991294; Thu, 15 Feb 2024 09:59:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708019991; cv=none; d=google.com; s=arc-20160816; b=XC+ZvzLUy/uFnoRkZ+Vv4sGY0ahStPAuMnmETR9ZknltWL8mWFXhxmkwgXq3Ksh0Xy 5xiZiScz8rGYZzKn+Yhw6ucmn+vtgA5VQ+z/NiXz2/2KpX53qcVIy0ByD5XGOTcnUkk5 gKsDS2v0Lvc5rEx9EImmJ/4N6pUh4tm1iG1QlbkxX1+f9AD7/JiXYlEN3uiR7R3hWmVS MVpb3qwb1I5HkqXKr/YBB8s3uMuKV/s8NOl5T9j6+vqVFqpPMdzPuKq78srFDwfrWIZ5 juaBs7ZBbEw1PkzrlNxc6UqbBcsVujZZUOqkjgnIOdvv095D4AR4k+nti8gckctVGNCZ Eq/Q== 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=QwNGEAWw3MyWyJMilDfJbOdNttpJtHg5vNKPkajCNqM=; fh=lFbaFE9CCURXS2ZRFy5xEQEZPoERQGZgvMk0cqzTFRw=; b=jZbx7K/bR+WxxgAq2fr6fbz8bPy1hYUehe5Xb3C7RS5pR5iEu+jywDGbuvhksg+hl6 jDlnZzK0b3EsJ4+OVt2C39WbIYWkb4KhHE6OpYqgZIK1Z3J+kLONHMZATvIE6VOy+2Sf 1Bi7oJXprwN5NQ9XszDd+4a0lEeuXi4qC+xlBbn7wRw2aCtIWLqXtBBkOMrQ6ioc6cAs ZjO58lh++FHMvdHcCUGK+eF1+viQzNJxlYHrRw0YraE4HmCkvuxb7I5BUdYtlgRKGJY3 7fSu+/MB8dTEkFiYn9E/u5Vg6mGLtpIbCMp/41AC0tV3vEXxugHHmLn4qXP6HHSnjerW mJzw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ca0UodNf; 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 f10-20020a0562141d2a00b0068cccd6088asi2032452qvd.247.2024.02.15.09.59.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 09:59: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=Ca0UodNf; 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 1rag0o-0003PZ-0H; Thu, 15 Feb 2024 12:59:06 -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 1rag0m-0003Ec-5j for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:59:04 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag0j-0001fc-JR for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:59:03 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4121b1aad00so5988365e9.1 for ; Thu, 15 Feb 2024 09:59:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019940; x=1708624740; 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=QwNGEAWw3MyWyJMilDfJbOdNttpJtHg5vNKPkajCNqM=; b=Ca0UodNf9gv1AhxCnlyu9vDQPUvpYlgXNkaQnP3ndXISz9wV6Ic10bT6wk68zb/Lfi e7bsp1z5Sgbq44SjhVVuGiV83l+df/VRuxO5zVXMbtyjLd/NMuFWGuvlDSTtrbCnxVpO LjwB6Evk6Roan9Ph9wVDE/P9T9rSh8PK2T8fS9xz47X5w1yQAROxJMhShH/n+U+xCF0o OOmCnIWIyqg5hNggYov1/K0DkAtwwkWkWO7+aGRb9uiK8b350b6O03XtbYwsjQ/bIICR CeNI//H59sI0KErEuHP0vwwLiIFGM/tV8YtpvxWDQNZbl77HvZ5MWSxZdyTopVHo5zSm CEeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019940; x=1708624740; 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=QwNGEAWw3MyWyJMilDfJbOdNttpJtHg5vNKPkajCNqM=; b=iUAr0rV5bQ6pfZFV/EwVolT7ULDEN9N1HlVi1LIkC52xGWepvzyLJavcsQD3MLe9/e O4RbrV1iTLNXv7Kb58MStiPSkBkTG1wTtF+oLHnvWRefyGzeRz4QLj2y6quK2W7yQPvS Ba4wsegxep3gzlEGZyyrkeTOT56cRhfiD0gUFs+451w9h5M3Wvf4kSsTTRl6gx9UuNT4 OlNzhh/l1hbwD4YqZldD7riDX8/6A78SNRyLxkdU/7DFOAd3aUifCbI7qFliLcXxrKiP ykU+Dynn4xam+yFl+jWDObnTOoogJbX2Lm99Lr9Eg8W7QbONjkgxX0rki2PiUyN1Ry79 VyPA== X-Gm-Message-State: AOJu0YzgjHS4PeOFIjBH4qzwm/BiHMcfzKAh8Dp4GWDVf1SHiany5Bd0 o8q4xbN9s+RNA5CUeWg3t9szwuf+pLKkoDTCeFL5sQeXrDP6cvIjQY7+oakegpOZGU1Sve5pD57 GZIo= X-Received: by 2002:a05:600c:35c2:b0:412:37f4:4a3b with SMTP id r2-20020a05600c35c200b0041237f44a3bmr120956wmq.34.1708019939901; Thu, 15 Feb 2024 09:58:59 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id fl16-20020a05600c0b9000b0040fd3121c4asm2801783wmb.46.2024.02.15.09.58.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:58:59 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Aurelien Jarno , Jiaxun Yang , Aleksandar Rikalo Subject: [PULL 10/56] target/mips: Remove unused mips_def_t::SAARP field Date: Thu, 15 Feb 2024 18:57:04 +0100 Message-ID: <20240215175752.82828-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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=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 The SAARP field added in commit 5fb2dcd179 ("target/mips: Provide R/W access to SAARI and SAAR CP0 registers") has never been used, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240215080629.51190-1-philmd@linaro.org> --- target/mips/internal.h | 1 - 1 file changed, 1 deletion(-) diff --git a/target/mips/internal.h b/target/mips/internal.h index 1d0c026c7d..a9a22ea00e 100644 --- a/target/mips/internal.h +++ b/target/mips/internal.h @@ -83,7 +83,6 @@ struct mips_def_t { uint32_t lcsr_cpucfg2; uint64_t insn_flags; enum mips_mmu_types mmu_type; - int32_t SAARP; }; extern const char regnames[32][3]; From patchwork Thu Feb 15 17:57:05 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: 772953 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp963388wre; Thu, 15 Feb 2024 09:59:52 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWjNPkQyEHBYiLv73E25ZqHwxIIfj8yNYnUkITZLBriBwavLRJhaB7AquMhDCR4eJGlMIP/8Ac0sAFJl6H+RV9x X-Google-Smtp-Source: AGHT+IHNohcJXFnprdF2MUAYURSfhfbSBhRBYvVi161pquNSs9YwUCCgb2vPqmpfRn/nmiFCSs9q X-Received: by 2002:a05:6808:1390:b0:3c0:4580:6919 with SMTP id c16-20020a056808139000b003c045806919mr2628247oiw.56.1708019992465; Thu, 15 Feb 2024 09:59:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708019992; cv=none; d=google.com; s=arc-20160816; b=QdJDPQJJl2+ZRtDMPFeOS2AyCwrWmpYqPa1pXR6DuB9bmDJobhzsR0zL96jFeorh+f ell59QGpFfLoRPYuIhyOhQ/roQpDujLrtU/EjmueI9m5f7rGLZQT0D/UH90+rmbykcqQ QaL7K7A6nXIGFXJ1R8a3XKjqrqU/MsN3MeqpVwgMiU7c6XbE2/SEXZZnbM5aPO+/b4Bu q+cc25miTtyBqgCbQGwD3d6rePj1qlfeNrVCzu80QgRmnkmrvSHytzl/N74Gt/p+Zp1E P2oUTC7ausGYGTAwi0Zy33ObwzLQmO5sNG3Hgc64YrzXahtaLAvfL69sS7K+lCCYswOO u+Jg== 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=yChT06qqS/oR/UqktZBd9s/sYDht+XeML6XM2cVxcUo=; fh=oIVSme7tV/XnlSdNJVx6ntV6O9vzW2cth5GattuCJok=; b=fcJddkhdXvNoSjPEfofze1DnuIDwWG/WyLJE7CTCLhHcai28FHLhzSmvmtP8NlkcmL YPpUgiqNvzjPSnJ/yISizWueAOEzKeifVucqYZkW56YYgBKqmGkcdk+n/ROxM+jYZJZE p/IqPjj5iTINeYxyyyE8n9+7LPnJ7XxDO0kXiPlFzaAr7Za6O1CRtsZe6GboBiYT7kXs x/Tzegi0XmBHyEai7Pn6Vsj+jl88fEzeDUmKu+xwv85L4bwcTeoecZs++UUMO0hcfvs/ 0LFdkAsor6XKaJXGUN6KFhYzLR9I80pyTwcpla6xpSsbPAwAlb/cEfCN/Fn8BfBbzS0a xPXg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s0LTadxW; 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 2-20020a056214202200b0068c938c5548si2009628qvf.39.2024.02.15.09.59.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 09:59:52 -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=s0LTadxW; 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 1rag0v-00043n-3w; Thu, 15 Feb 2024 12:59:13 -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 1rag0t-0003wn-AJ for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:59:11 -0500 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag0q-0001gv-Df for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:59:11 -0500 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2d109e7bed2so15233951fa.2 for ; Thu, 15 Feb 2024 09:59:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019946; x=1708624746; 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=yChT06qqS/oR/UqktZBd9s/sYDht+XeML6XM2cVxcUo=; b=s0LTadxWgdGGcm4OR5WqSXjeZB3fvYXLUVhq9E8nnUdLPqmvAGEAWLR8S3+GY+cju1 Jub++tGYY6pTMCGPn2WXNAdSH3Ve5YAvEM2Z/aQ2GlZTJcmw4oHL0cKn6LWcbHIXZoWn 8eUNA9tLCqrcLML/lOziAxohLVxnJKKXMsdN3lvRDqca0oipj/hdK/dY/JKq1ay4slXk 2aZnCtGV0uhvOTwENeaTOLK8wCsO9hdQh6dYunXXno54fvSpRET476MhH14qkD8eCJie CETFALxFEUdjInuzbrWniL5iAPPMqA9X2dHOE75p4QA4mPXfjVa2CuktBDEFrf0dmDXe 0iuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019946; x=1708624746; 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=yChT06qqS/oR/UqktZBd9s/sYDht+XeML6XM2cVxcUo=; b=Se5YTZts8eE9J7fpH3quveXNJw0zlCLJc001BY+1I5dRg+HaLl3U0xQ/Cq+adfnm4+ 5N7/PFWNwK0EzSd7OzocdFD9HAi2KMspGsLunhKdiZEGzxJfB9wj1VJSALI7MSuEGXKJ bfx8fodBXSvz7gZMF3L2nKfKxT5cwf/maC8XVATfT+5PZtIAHYWPiPwHhfrwrmf8EDKB N7zqRtIbOzt9yv4C8VTGMb5swFKjRveoaKxtA3p3T0UVWKYU1IxC501VDyQieWuWTFdr ROPuQoelR0co+SAHqnxaJ4lLZ533f1EPfQAzY5448dcQNdnB/kO8PvjiwIAV6dHJreLV VXUw== X-Gm-Message-State: AOJu0YxjUreAaGYjwY2jrOMO9NzPqdiX5ord324kG46SoCIfOFG7p+Ai /oie6D5pZtCvEdeKeZJzi8DudBxKgyZ++3+dSPfxFnCqq9pkFFTp87ZgecbgQLcqOmTparXWoMp szBA= X-Received: by 2002:a2e:7a12:0:b0:2d0:b003:95b7 with SMTP id v18-20020a2e7a12000000b002d0b00395b7mr1959454ljc.13.1708019946401; Thu, 15 Feb 2024 09:59:06 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id m22-20020a7bcb96000000b0040fafd84095sm5636762wmi.41.2024.02.15.09.59.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:59:05 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Aurelien Jarno , Jiaxun Yang , Aleksandar Rikalo , Huacai Chen Subject: [PULL 11/56] target/mips: Remove CPUMIPSState::CP0_SAAR[2] field Date: Thu, 15 Feb 2024 18:57:05 +0100 Message-ID: <20240215175752.82828-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::235; envelope-from=philmd@linaro.org; helo=mail-lj1-x235.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=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 Remove the unused CP0_SAAR[2] registers. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240209090513.9401-8-philmd@linaro.org> --- target/mips/cpu.h | 1 - target/mips/sysemu/machine.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/target/mips/cpu.h b/target/mips/cpu.h index ef1d9f279c..5e97b5b422 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -749,7 +749,6 @@ typedef struct CPUArchState { int32_t CP0_Count; uint32_t CP0_SAARI; #define CP0SAARI_TARGET 0 /* 5..0 */ - uint64_t CP0_SAAR[2]; #define CP0SAAR_BASE 12 /* 43..12 */ #define CP0SAAR_SIZE 1 /* 5..1 */ #define CP0SAAR_EN 0 diff --git a/target/mips/sysemu/machine.c b/target/mips/sysemu/machine.c index 218f4c3a67..6d1299a89e 100644 --- a/target/mips/sysemu/machine.c +++ b/target/mips/sysemu/machine.c @@ -282,7 +282,7 @@ const VMStateDescription vmstate_mips_cpu = { VMSTATE_UINT32(env.CP0_BadInstrX, MIPSCPU), VMSTATE_INT32(env.CP0_Count, MIPSCPU), VMSTATE_UINT32(env.CP0_SAARI, MIPSCPU), - VMSTATE_UINT64_ARRAY(env.CP0_SAAR, MIPSCPU, 2), + VMSTATE_UNUSED(2 * sizeof(uint64_t)), /* was CP0_SAAR[2] */ VMSTATE_UINTTL(env.CP0_EntryHi, MIPSCPU), VMSTATE_INT32(env.CP0_Compare, MIPSCPU), VMSTATE_INT32(env.CP0_Status, MIPSCPU), From patchwork Thu Feb 15 17:57:06 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: 772996 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp968850wre; Thu, 15 Feb 2024 10:08:19 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUptKDypfIcERByE9U037FYHQvhAMpMK6K13z54OtQ+0b64E5SsM6mkf8whHW6VE4l2M1pMfrrQ97lRPG0ele61 X-Google-Smtp-Source: AGHT+IFdjUx2TJ6Hx0/b+dkuZl+6jleHduDEBR/+Z7HjEOAyEXbw2v4cQ2Uu66L4DNfGA0DJik4P X-Received: by 2002:a05:620a:45a3:b0:787:19b4:b8f8 with SMTP id bp35-20020a05620a45a300b0078719b4b8f8mr3097857qkb.75.1708020499789; Thu, 15 Feb 2024 10:08:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020499; cv=none; d=google.com; s=arc-20160816; b=FbWDMGMwCk0pF19ZhW5CIH4AnirwSpcYZ24iOzREingAR6v8oqMf3Z7DdNbKeXdPXx /4vLWB6SsfzIkUfiifFGmEGtku9iyFa2oKDpKGFdUn+KaikCOOJiIwwWnatpe1DIWUDz +0lQ40US0pptpCSk4eN5Z+wNWlAR1A10ypYMOgDPRKLxhOuu+TP/3E1fFAFBW9GjJKfe qa27yrzOpAeNMlTzDUQPJcQJH64mUruP9qfnIhqxYb/ilxYi0PVDpxEXeUBnuJVzbm5e CWdklJ50BVdfrp328ZBV34DwcLpiAhTwL6kAyzdmlwrpW61NFml5goOogJrT5r0kcmuZ 5uFQ== 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=8KRNAN7J6jVrW+a5YkWZvl2JIbNfjxd3JGHRrNe6AUc=; fh=lFbaFE9CCURXS2ZRFy5xEQEZPoERQGZgvMk0cqzTFRw=; b=N1sg9JP+m1UT4EPIB/rgpDz2eBnPdYKYtVwOpCYssSDMTkXweeOqBrRVvskfgXLiYZ FG7cLlqUWQ3qfZBZzWsiH2pTkc2b4OkISAPxvYBKz8JwVi3bG7ws2mldnCZz1hEQ+wlu ey3/c+fEYxnjHRcLTxAFwAY9G6zVtew+obrMXSTUi/10b2Uxqck+jVxrsMfN2vv87l8R NJ492u2sA5djQGgISA8CSpJYKZcDfs3sSbeKu6fk2FDaDkoVxJCsz5SqQkcNntUBwmBZ 5sBrq3W0ICbXL8Rf/0xzuhypmWNb1jJyEf9pUQJQncXCbwVLLOdmXJVUrQYS7j2GOjhD C0TA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XwckSceF; 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 e15-20020a05620a12cf00b00783f2ad9a46si1947892qkl.305.2024.02.15.10.08.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:08:19 -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=XwckSceF; 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 1rag1R-0004yH-Qb; Thu, 15 Feb 2024 12:59:45 -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 1rag14-0004Wv-Hz for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:59:23 -0500 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag0w-0001jy-Mt for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:59:22 -0500 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2d0fd07ba8bso13657991fa.1 for ; Thu, 15 Feb 2024 09:59:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019952; x=1708624752; 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=8KRNAN7J6jVrW+a5YkWZvl2JIbNfjxd3JGHRrNe6AUc=; b=XwckSceFGVkZ5LLhJ+dnl+6hw9goj7dHawTxXt8MhWaOJ/0EVV/R7XCVpeRzEja8+D uMVxDtGZooeYAR71+3Mj13ETEbwG9eRyEGs5byjkJGV7x8XS5X5H9kT8W0YOR79GFMdS ZdQ+bOAm3bzA82my1ye1Ov8jq7TM8aJve9QhDtqnRmlKU1iqHlhmJ594aQw0Ye1+XbXn viVA2/P6s0T0SIzftbff8Oyj0aomOn2i8QmHjA5IcK4hpqVV6rL8x3Q+runs1FIJmWk1 ezwElO45+IcNVzm8hbaddoAUkJYs8+drb9BWcqNchvGzscf3mkuztvJ96HXPqDvx0i5N 2sWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019952; x=1708624752; 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=8KRNAN7J6jVrW+a5YkWZvl2JIbNfjxd3JGHRrNe6AUc=; b=u48TqCNgALL9didzSrLo0JAZo/sEH5FUhffdLUINWPoGm6ylXqZZNH55TuK0JLA8fS Xn71FH03/mKaPnezD9+o/ZsAzgnibf4m4IhJD9QbWp1CnGHMj+pqpsvwf8/EKxBkE04w HPPzoxoWdJcX054nbvQVJC/97HttSyavlrhSaJop01XhQ0Ag78vikelw5KnV4NbODgcZ Hx5p3x8qRrYtWEbMhZmENbwsJTMVBjREo1F4CzOE/5xmhVgknod5v9W36JH5KglHTqvE dMHLtfhPs4+FmVcoc4yLzguqa1wNZYUyaycOLNrsJe02EV/jDKykdf48Dd0R7dLdTnXD F7wQ== X-Gm-Message-State: AOJu0YxoxoJCQvZOtei5GDN8lLVjgGJekiFUJO40f1nS2pb4IxnwgJdf HGMi0MX/CcANlnJ2dsB/Kk4zLLq/s3H6PvoUEw5c7DXRtdyaM5lSUVO0TcU4wTeVH8N+vhwsv7x 3nVU= X-Received: by 2002:a2e:8018:0:b0:2d0:d3ec:a545 with SMTP id j24-20020a2e8018000000b002d0d3eca545mr1850052ljg.50.1708019952746; Thu, 15 Feb 2024 09:59:12 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id y5-20020a7bcd85000000b00410ab50f70fsm5604008wmj.15.2024.02.15.09.59.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:59:12 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Aurelien Jarno , Jiaxun Yang , Aleksandar Rikalo Subject: [PULL 12/56] target/mips: Remove helpers accessing SAARI register Date: Thu, 15 Feb 2024 18:57:06 +0100 Message-ID: <20240215175752.82828-13-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::232; envelope-from=philmd@linaro.org; helo=mail-lj1-x232.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=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 DisasContext::saar boolean is never set, so this code is not reachable. Remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240209090513.9401-9-philmd@linaro.org> --- target/mips/tcg/sysemu_helper.h.inc | 1 - target/mips/tcg/sysemu/cp0_helper.c | 8 -------- target/mips/tcg/translate.c | 20 -------------------- 3 files changed, 29 deletions(-) diff --git a/target/mips/tcg/sysemu_helper.h.inc b/target/mips/tcg/sysemu_helper.h.inc index 78f7272208..1861d538de 100644 --- a/target/mips/tcg/sysemu_helper.h.inc +++ b/target/mips/tcg/sysemu_helper.h.inc @@ -100,7 +100,6 @@ DEF_HELPER_2(mtc0_srsconf4, void, env, tl) DEF_HELPER_2(mtc0_hwrena, void, env, tl) DEF_HELPER_2(mtc0_pwctl, void, env, tl) DEF_HELPER_2(mtc0_count, void, env, tl) -DEF_HELPER_2(mtc0_saari, void, env, tl) DEF_HELPER_2(mtc0_entryhi, void, env, tl) DEF_HELPER_2(mttc0_entryhi, void, env, tl) DEF_HELPER_2(mtc0_compare, void, env, tl) diff --git a/target/mips/tcg/sysemu/cp0_helper.c b/target/mips/tcg/sysemu/cp0_helper.c index f8883a3515..ded6c78e9a 100644 --- a/target/mips/tcg/sysemu/cp0_helper.c +++ b/target/mips/tcg/sysemu/cp0_helper.c @@ -1077,14 +1077,6 @@ void helper_mtc0_count(CPUMIPSState *env, target_ulong arg1) cpu_mips_store_count(env, arg1); } -void helper_mtc0_saari(CPUMIPSState *env, target_ulong arg1) -{ - uint32_t target = arg1 & 0x3f; - if (target <= 1) { - env->CP0_SAARI = target; - } -} - void helper_mtc0_entryhi(CPUMIPSState *env, target_ulong arg1) { target_ulong old, val, mask; diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index 173b19a090..3ba2101647 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -5653,11 +5653,6 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel) ctx->base.is_jmp = DISAS_EXIT; register_name = "Count"; break; - case CP0_REG09__SAARI: - CP0_CHECK(ctx->saar); - gen_mfc0_load32(arg, offsetof(CPUMIPSState, CP0_SAARI)); - register_name = "SAARI"; - break; default: goto cp0_unimplemented; } @@ -6374,11 +6369,6 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel) gen_helper_mtc0_count(tcg_env, arg); register_name = "Count"; break; - case CP0_REG09__SAARI: - CP0_CHECK(ctx->saar); - gen_helper_mtc0_saari(tcg_env, arg); - register_name = "SAARI"; - break; default: goto cp0_unimplemented; } @@ -7143,11 +7133,6 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, int reg, int sel) ctx->base.is_jmp = DISAS_EXIT; register_name = "Count"; break; - case CP0_REG09__SAARI: - CP0_CHECK(ctx->saar); - gen_mfc0_load32(arg, offsetof(CPUMIPSState, CP0_SAARI)); - register_name = "SAARI"; - break; default: goto cp0_unimplemented; } @@ -7850,11 +7835,6 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel) gen_helper_mtc0_count(tcg_env, arg); register_name = "Count"; break; - case CP0_REG09__SAARI: - CP0_CHECK(ctx->saar); - gen_helper_mtc0_saari(tcg_env, arg); - register_name = "SAARI"; - break; default: goto cp0_unimplemented; } From patchwork Thu Feb 15 17:57:07 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: 772957 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp964475wre; Thu, 15 Feb 2024 10:01:30 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV7oyWPLOIrCdWFAfWNWEZepNIgJA3RMNBmXExY3UkKKWq+bDta9FVaAa06tkg1Hm+gQG4dQT17vjRtgl1Xp/Tp X-Google-Smtp-Source: AGHT+IF+WVzfZZBiLSSetoKVyY8dU/WwDW9BreqLqnTsfaAKzY+livIZxXU9DPMv/8IJHvNO57Wu X-Received: by 2002:a05:622a:1991:b0:42c:39b2:a7c5 with SMTP id u17-20020a05622a199100b0042c39b2a7c5mr3690963qtc.26.1708020089457; Thu, 15 Feb 2024 10:01:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020089; cv=none; d=google.com; s=arc-20160816; b=ahVsKA1vrwrr+tG/zRsZFYYiBPG9RCoWC0dt5jwqS2zKXBjpa2OsK57o1xXw8PjEC4 xiq9D+tDHlYtm3E7mXeHfK5T7M5wcyUz1RYi86eE8a16oGU6DAHewyxE99R1u051GpKn t1SMH1ewna/muSNXcALlmhDYalFbkYAZTkW74za6tKuBO1NFzscQ+wIg4WsFgnQGKBmD CfK7L00CQ7yYcRmkDIroA1jhjBVnkvNh9TJtcOz1qYijd+vxyJuLdYhZWPeOHUDC8n2G ObutkCfGX6AoxiXyhUxdqbGftOBpkjMDVdG1EOTrqyNJ+DO2m/4PeU85qHKqIaQUjsl4 bQvw== 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=sZSw2YzJ/MkCqct1l1ey2O6+43vCJeEZUqJNCv27UXQ=; fh=oIVSme7tV/XnlSdNJVx6ntV6O9vzW2cth5GattuCJok=; b=YqkNmQuP9JXN4MDgs2khc8k1NUQ8EJi0aU8tHa0ktxP/nHvDZz1BaL3D6EJys3eazT 1Y3UnPlCuG71WsTSIz/qNMygOFsaTWCOnWX9KYkVlFQZHmDDji4GDCtt64ZV/05NDSc0 q8O1QkXAFy9lVKS44Mc1yjkDez3/I4MrgfKKPYn9hN9E4aflGNXwqCtjITsTy024xWS/ meqis8E9XwlVFYdUxq/1ec8MdEjaqUmKcaUQyPO1qMHgh1vtH0n3LDvWoNZJV2Sduc65 i2bT+DQJwcKk1hpVbtI/wEwZQ+Oom0VlCar2zCaHGkx2mFlmB1EMGLpfmMnNVoo+UNeI zhpQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qZ+2VOCF; 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 b11-20020ac87fcb000000b0042c501f89a1si2092777qtk.436.2024.02.15.10.01.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:01:29 -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=qZ+2VOCF; 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 1rag1W-0005fH-KX; Thu, 15 Feb 2024 12:59:50 -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 1rag1J-0004lj-9S for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:59:40 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag13-0001lD-4V for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:59:23 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-411fc61a03dso9909935e9.3 for ; Thu, 15 Feb 2024 09:59:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019959; x=1708624759; 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=sZSw2YzJ/MkCqct1l1ey2O6+43vCJeEZUqJNCv27UXQ=; b=qZ+2VOCFyAL6TebQt2/Cq8snCNo1d5stp7M2EkQofuXexC4QQNx5biV7jWG+1kK/Zr bTxqYqj0vHRkhiBWKcIQa0NjoRQbgteHH7tKohkA8eoowGEdSINAihe5JynFKFkOpPTN 2aOo3gFVTXE22Lfr2xeaSZOtjT68SSOVNIo4Ygla4cRFFd+gvLDuBMu/3/Hhxf3lS3s0 I6MHK36hJYTyjKnbErSUuDGOGJzta6Mwmf65aDsIwQx0NkXPDb6RCwhWiFFsZcDM9GwD kSKEMNbqQLB2HOJOsEh7EbSCkIPcCBS7M7zYqrFD6bfH/WS7b8YfNUl/P7H+vvRTALR9 NqNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019959; x=1708624759; 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=sZSw2YzJ/MkCqct1l1ey2O6+43vCJeEZUqJNCv27UXQ=; b=hOp6dUBrlnRPZj0UgA7uCC3WwTlpzcHBuKLWSSA1lErv4W6DP4KfuREH9bxln+XKTo 412KosNVoOzcg0Uo6WCMLDHuyB+PUdDDVNSjytkY/H7elyHZLPIY4ce7GpN4/MK62mmN Zu7bvvF2aNhNq55E3iPbNPfUjo3DBveYM4sDB1ngQZYFy9DWrhcebDoodCBRmGlEXeep bYhgKD+IfGqtRIFhkg6u+LMdmi0mNQQlD+ZJ03EcezOu1g/P4wpypdbHqPg4Uu5eJUNm HeXwKZn5sKxRGDQb+MgcI8DGU5QWuESkIJzIKhpALC2bTZrqtY48F/+g3s0z9T4uk1Np zloA== X-Gm-Message-State: AOJu0YwD7tL52xFQbG87lpy4Jc0oDNOicz89P+icOh/vPyPoNESse/3n x38OF67EfgI3+1LNuUdgdOwQO9IWIaNdQFmrCiFZI32lVQY8UiKS/xglk2bztcK2HrOsvuDqzcj Bz2g= X-Received: by 2002:a5d:644b:0:b0:33c:e392:14c3 with SMTP id d11-20020a5d644b000000b0033ce39214c3mr1887111wrw.47.1708019959294; Thu, 15 Feb 2024 09:59:19 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id az7-20020adfe187000000b0033d01fe1f04sm2519246wrb.55.2024.02.15.09.59.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:59:18 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Aurelien Jarno , Jiaxun Yang , Aleksandar Rikalo , Huacai Chen Subject: [PULL 13/56] target/mips: Remove CPUMIPSState::CP0_SAARI field Date: Thu, 15 Feb 2024 18:57:07 +0100 Message-ID: <20240215175752.82828-14-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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=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 Remove the unused CP0_SAARI register. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240209090513.9401-10-philmd@linaro.org> --- target/mips/cpu.h | 1 - target/mips/sysemu/machine.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/target/mips/cpu.h b/target/mips/cpu.h index 5e97b5b422..7329226d39 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -747,7 +747,6 @@ typedef struct CPUArchState { * CP0 Register 9 */ int32_t CP0_Count; - uint32_t CP0_SAARI; #define CP0SAARI_TARGET 0 /* 5..0 */ #define CP0SAAR_BASE 12 /* 43..12 */ #define CP0SAAR_SIZE 1 /* 5..1 */ diff --git a/target/mips/sysemu/machine.c b/target/mips/sysemu/machine.c index 6d1299a89e..213fd637fc 100644 --- a/target/mips/sysemu/machine.c +++ b/target/mips/sysemu/machine.c @@ -281,7 +281,7 @@ const VMStateDescription vmstate_mips_cpu = { VMSTATE_UINT32(env.CP0_BadInstrP, MIPSCPU), VMSTATE_UINT32(env.CP0_BadInstrX, MIPSCPU), VMSTATE_INT32(env.CP0_Count, MIPSCPU), - VMSTATE_UINT32(env.CP0_SAARI, MIPSCPU), + VMSTATE_UNUSED(sizeof(uint32_t)), /* was CP0_SAARI */ VMSTATE_UNUSED(2 * sizeof(uint64_t)), /* was CP0_SAAR[2] */ VMSTATE_UINTTL(env.CP0_EntryHi, MIPSCPU), VMSTATE_INT32(env.CP0_Compare, MIPSCPU), From patchwork Thu Feb 15 17:57:08 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: 772980 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp967307wre; Thu, 15 Feb 2024 10:05:37 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXLeeYNmH4YEGMHm0OxY2Nj6t8kBUGKImPpupVo46vTXtKxsCtGRbTwayner3NDlMiw+ZtP54BuFFaEu7VejZQd X-Google-Smtp-Source: AGHT+IHLFcjjKJqI7pS6zoP+0bqLcV2Jn58CJ2N8vh3eCShvEWNuPQzKW+BXNtGhNbP4p+qWC08M X-Received: by 2002:a05:6102:54a0:b0:46d:2287:c950 with SMTP id bk32-20020a05610254a000b0046d2287c950mr3486052vsb.26.1708020337297; Thu, 15 Feb 2024 10:05:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020337; cv=none; d=google.com; s=arc-20160816; b=uqI2yJSd7K3w8x9YL7fUprcIxCP/RacnMmRw1AO7Poe/oKWm/O7m17UZXGXwWbd8d1 xPlzXXA54JEeQLu6A0sEiPX9piLxGvbUBoZgmAFtwRKkAX0AmQMgCOuYStxLYdmTdDnb iNin4P2MAt+bxCzqLq3R75aQm4ScV1CGHEkStzWC7dsmyyn39+ATyrZlzK9MaXl90yIP zm544cd8hy3n44vZd0UrFy+QcgX6YzHhjDYVaxO3S8sP7Yz8IQKDOvpDvUpV6FrMSGYU OpBdJA4MXGGvhrZvqPhiNX2UTseqLVNs6NRY/2xoRBYt50IgUrpbmPshqlyl7xTzLTZ4 xsKQ== 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=KrBuPLAGG1fZ7WY06/YseND2NQgtprdQWY9GN68xHfA=; fh=HNShFUrKey4v9VnuHHXCh+zzsM7B+1vM+dkKLDTv3z8=; b=Dnjbk43pzP/lX9v742BKZHAxfvfmSbTzlyDWO0hvXsomOjtSqFqhT22AZ0npgYcrJy PEE9Mz0zq2fAP/oBQo+Es24IGhciw77M+7Y1apU032vH8o3k8eAbD7nptQnUrWSCbU64 6KxkmhuOfJcqJxQufgTvqzeD2fUgCfr9MC4+xoB0/ufmoFT1vyLkWcgHhy4xMTFelpMy p433aeNBFrbiCJoW9H6KHN7VJsL4M45ifb/GYQQ9vOswOFIjncKm8nAQ5+xJweq/fDeD odfhrajCb+T0zGsrDUN2wJGOROl96SUWKJ1I4mybywPSJnC0fgefVYOBQU/HHEkky4bR r6JA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dD1co8Gf; 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 h1-20020a67c581000000b0046d2b00ac8csi364126vsk.18.2024.02.15.10.05.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:05:37 -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=dD1co8Gf; 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 1rag1g-0006ZQ-1c; Thu, 15 Feb 2024 13:00:00 -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 1rag1e-0006QL-Sy for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:59:59 -0500 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag1J-0001mp-3f for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:59:54 -0500 Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2d107900457so16707871fa.1 for ; Thu, 15 Feb 2024 09:59:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019966; x=1708624766; 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=KrBuPLAGG1fZ7WY06/YseND2NQgtprdQWY9GN68xHfA=; b=dD1co8GfEXj0QHU8vIP+Tjmsw935ORzWvqoEFBSOUlajuMKHEWIkCSCsZc2nmQ80Wi diByG00YRVFF7bnkHFlQ8AYBk+2+iSkGIt5Zif5mZyKExc0AQUhIoU1/GgHy40MzvCTR FEWhp0MfqR6ceEHgyDwDRyd9Rto7lOTfSHDbbYHi97UuJiCJK73gp9/EQgSgFoKQYozG ZsiFK2APJ24M9QP8WPzAnKbpMlABJsSGRItWQjZLf18zfhv1eVAUK3lLo+N9h1xBZxfr qYFUYSR/maY78Ez8csgUTQluNoqJAT43KRFZzmE04fZoI6K+2nOjdbUNlUM2p6uF/qmQ 70sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019966; x=1708624766; 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=KrBuPLAGG1fZ7WY06/YseND2NQgtprdQWY9GN68xHfA=; b=ecPkAqy5yu5MhT8dQ5K4ahGsNCery9mdgmsxqj7+S+GUJ7AbtLRFy8Z4uMTHdLPFca /El8yt4xKuqgunPgTvOojMt5HBcta/B3Xu+UTWqwNE/6HJNhnyv29T5QdLIckSZFURI1 uV+U2guA4zXpWH+ADX7IpaiIb1AxkhCx9EZHqu87utyqTr3KNVlwWtngdi3y3EEF56jo bWgMgfngU1ytrt8b5/rx/8VObRhLiGZXJg0LWcUOR2kSk40zg+XixXCeu+r6ajm3ubHv AoU11N+xcQq5C4xhe+75AUnZXEbaZsFiYgamiNupwO8d8zQWUE8kbfHSSYL2DCngf3bF jprw== X-Gm-Message-State: AOJu0Yw8KMTPFJeXxZ0N+f+ZtWM8IjL+tt48mFb7tjPkEjy9AU3SZd5B vsoM1a43iePJNkCE+mq2ro2n2iMHa9HPIKh886lVICtngxHoJ1AVfkyEd2tPxdpY68DyY438YrB 4gx4= X-Received: by 2002:a2e:a54b:0:b0:2d2:fdc:8813 with SMTP id e11-20020a2ea54b000000b002d20fdc8813mr1374145ljn.50.1708019966234; Thu, 15 Feb 2024 09:59:26 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id fl16-20020a05600c0b9000b0040fd3121c4asm2802873wmb.46.2024.02.15.09.59.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:59:25 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Richard Henderson , Aurelien Jarno , Jiaxun Yang , Aleksandar Rikalo Subject: [PULL 14/56] target/mips: Remove the unused DisasContext::saar field Date: Thu, 15 Feb 2024 18:57:08 +0100 Message-ID: <20240215175752.82828-15-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::229; envelope-from=philmd@linaro.org; helo=mail-lj1-x229.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 DisasContext::saar is not used, remove it. Reported-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240209090513.9401-11-philmd@linaro.org> --- target/mips/tcg/translate.h | 1 - 1 file changed, 1 deletion(-) diff --git a/target/mips/tcg/translate.h b/target/mips/tcg/translate.h index 93a78b8121..2b6646b339 100644 --- a/target/mips/tcg/translate.h +++ b/target/mips/tcg/translate.h @@ -49,7 +49,6 @@ typedef struct DisasContext { bool mrp; bool nan2008; bool abs2008; - bool saar; bool mi; int gi; } DisasContext; From patchwork Thu Feb 15 17:57:09 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: 772985 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp967890wre; Thu, 15 Feb 2024 10:06:34 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW9tYxjIBENIF9ErUxlZK6mpYtYySM/jAJ3sSsfasAtAEoYNp4SYRZUUGXfPdsLBXFckdiNfbPcdGL2uzR/2BNQ X-Google-Smtp-Source: AGHT+IEJsZJ0mw/4/yNBOe8gb5sN8YThljLVRdLiIOfj7QNr6YAz7nPzo8hJ2Qeki1nZ+kJ88z/j X-Received: by 2002:a05:6102:a4c:b0:46d:263a:31ae with SMTP id i12-20020a0561020a4c00b0046d263a31aemr2840333vss.1.1708020394149; Thu, 15 Feb 2024 10:06:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020394; cv=none; d=google.com; s=arc-20160816; b=jJB5QJtve1qN+9U/mOt/orQKmzVn0DLD3/RVtPCh3dtSGXxfAGvqqUz+twLyy2JkQW YT/nW+3rvDbDER+BgdKQbrXfnbQASuQQPRjIImh/JcKbHfuUOFf3RJ03fPkaJAR+6k/Q giTIVtH2Dibb2E2RgjOYFH3E2v+F1acVbK9y1JAIEjAKiE28hshPmSutfvmBYfXhkHij UwjWgMkg3lIc6/3IKjrUwQTpgEyWYgmYXxuaKBiFMzMZ9zYFC26EXJzQQMBiQXlcqVRh OmXwdzrc/dN34gsDTLASOEsoZCSQ+KRy3AkXwAEsS1sXIufhkY7alA1YMnTzp7E3mdpJ DLWA== 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=AtVnVdwlMQuIF8ap5e3PdkZeedjV1hEn+tIJt0DtjLY=; fh=svPu9Furwf93hCXrswhtxL8aEnkEPDXN++x4vooyuxs=; b=ZVRgvmHySrytjQndkY+kHijn6BpsLoceQ13xKH7Up5kW1BqOmwttbalqACJYDnH+2q KLLx1zWCS/kT1QBwLsD+3JOcOx0Fg8IRzdJcpY/t3HIphhNx9fLCRnN0Kc6xNql0BQtw kYAnbZwqbJRpDoFyOis2MXzkx6KcfKSnVvQ+dPCmZY33smZ1QFgfMNgMJGXrqx/oq6c2 lsCbD6geac+klg/FufyeYzy7b00tUGV/x5VpMSYNyJY+Pmnl8EQTjzLodPNaPv5yx0Xo r7SNsBsrVPsRqAVW/IkYTJ9ZsADDB1ZJku9Lq0eLRBIqRpGp2MeFCb1cMCE3gPTVARIe NrKQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fNq53Dww; 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 o17-20020a0561020e1100b0046d132b2c64si406845vst.623.2024.02.15.10.06.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:06:34 -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=fNq53Dww; 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 1rag1U-0005HY-8F; Thu, 15 Feb 2024 12:59:48 -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 1rag1N-0004qO-Vp for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:59:44 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag1J-0001nf-1p for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:59:41 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-411d3c75026so9345805e9.0 for ; Thu, 15 Feb 2024 09:59:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019973; x=1708624773; 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=AtVnVdwlMQuIF8ap5e3PdkZeedjV1hEn+tIJt0DtjLY=; b=fNq53DwwyozzifM4fusy9oRP3ZNj0d5/ACedKnJ044ajwG57b55IEnGXx/ffhGobOl kUVZb4Ku0ezhM0pqZpxkRlFY0k1Ex0U8Vbjm9swbi3n1FfwA719dh9k+bxyIx+RE7Mbk u+XtgXTLy48LqIaIfJrG0XTU14k/jPf7U4WzqTsipg6rkv3x3e4f/CF6mTTv0R4XjgYw /kKiQIktqYaTVu2rOULaRP6gNXSMB14eYCswdoQ0cHKVvS47JFwicYCpjWarKfHvnMfR j5mmw5uYZkdksp4Vztb1xUgeWXD3bu3bOwOAP4YwMPYIwgXnrPGUrOAvWvIDh0UKGdW4 uQIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019973; x=1708624773; 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=AtVnVdwlMQuIF8ap5e3PdkZeedjV1hEn+tIJt0DtjLY=; b=XkQxQckpfA+WDqZq3ccMXZKQqq6+abrvEqZc+apQle5n2kGiK9xzXwErnRZBv6/2t0 Cgq/JJ3XaiML8O1/eogboXQAJ51BUbv7rkQkwjW25ng2EbKvV+fnIXgjA0Cc8xXSjyLG 8dQZJ5lzx6zPSFdB/PKhTvw9aik6Tc+B9jYi8v8TNEJn35w7VStFo/6b6NNKUuv8ouE9 s4kDizOifBgUXNgh7Wqba62SKs5Ud/L/rwCUi3OGJd2eAVc0IKQO3qm6RkvOneVnT8YU mqMq/3eunCNpmVTLjBwHfJVjgco2bxMOD8ZZeXD7D3V/OFDPTZIgKRjzdrHQOLo4DGZF utKQ== X-Gm-Message-State: AOJu0YyVMvke3rd6GFQaz5KsGu8h3NTVxkBu7Zvh6XIcpf0Il6HaorAx CSzJxSMUjM3hKUjIAMRnT1k/jyTL71fDBjWsRgomB3LJy8Q52DVr6/0EYdg2u9lMwK5ar8lQ6bV TxB0= X-Received: by 2002:a5d:5591:0:b0:33b:2835:a1fe with SMTP id i17-20020a5d5591000000b0033b2835a1femr1891387wrv.47.1708019972776; Thu, 15 Feb 2024 09:59:32 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id o1-20020a5d4081000000b0033b6e26f0f9sm2427415wrp.42.2024.02.15.09.59.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:59:32 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PULL 15/56] hw/isa: clean up Kconfig selections for ISA_SUPERIO Date: Thu, 15 Feb 2024 18:57:09 +0100 Message-ID: <20240215175752.82828-16-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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 From: Paolo Bonzini All users of ISA_SUPERIO include a floppy disk controller, serial port and parallel port via the automatic creation mechanism of isa-superio.c. Select the symbol and remove it from the dependents. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini Message-ID: <20240213155005.109954-3-pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/Kconfig | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig index 040a18c070..7884179d08 100644 --- a/hw/isa/Kconfig +++ b/hw/isa/Kconfig @@ -17,7 +17,11 @@ config ISA_SUPERIO bool select ISA_BUS select PCKBD + select PARALLEL + select SERIAL_ISA select FDC_ISA + # Some users of ISA_SUPERIO do not use it + #select IDE_ISA config PC87312 bool @@ -26,9 +30,6 @@ config PC87312 select I8254 select I8257 select MC146818RTC - select SERIAL_ISA - select PARALLEL - select FDC_ISA select IDE_ISA config PIIX @@ -49,8 +50,6 @@ config VT82C686 select ISA_SUPERIO select ACPI select ACPI_SMBUS - select SERIAL_ISA - select FDC_ISA select USB_UHCI select APM select I8254 @@ -58,14 +57,10 @@ config VT82C686 select I8259 select IDE_VIA select MC146818RTC - select PARALLEL config SMC37C669 bool select ISA_SUPERIO - select SERIAL_ISA - select PARALLEL - select FDC_ISA config LPC_ICH9 bool From patchwork Thu Feb 15 17:57:10 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: 772955 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp963625wre; Thu, 15 Feb 2024 10:00:15 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXzq3eb08z2Uollqw7bMXgkWfjmpyAJdgMinFhP3/WAG1eINF/HSf/M0OVHtL25TrQcYTAjQMJxwpzHz748ptmo X-Google-Smtp-Source: AGHT+IEf87+1KTIv9ZSjDQYnniifSqmRCAmwozV5rMcLFNuRVai2wRK14nnZz1tdus9n8zkpWTf7 X-Received: by 2002:a05:6102:304d:b0:46e:dde4:a92f with SMTP id w13-20020a056102304d00b0046edde4a92fmr3330213vsa.7.1708020015462; Thu, 15 Feb 2024 10:00:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020015; cv=none; d=google.com; s=arc-20160816; b=HEp7aV7krQSLJk4LpSRgbncUBjHrWEdhCRcNbMjbCDgxZJGYU2zxTLNDtOSiTqdADn QO/j5gmqQIE8AKGhGauNhFyv1m4b5Lv+jvfWnAFDIg2pDnHfH+sVdivn1h3S9ZHNuC38 0gSFaKGtevpN/5ysY/57p1negDs9rDQjS4fJdTjevlimkgFoIIwDE5pAzEPfCBbqyK3N 0yHnxJ4Ijxyj9puN6B7JrAEnnSRGhApnFgyY/RpUER1Z5QohDhA3RDtsW3tDdatw2RoX CRhoKTFksNf4y2ExUq6fWlS84I1XwnDusrP0WVR+E+mLVgreO9+ciMgLd7U5Qd83pv0l R3FA== 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=+yletPVGxCa3h+9fKZJUuwx/+JgKNE8xagr9A+vDkAQ=; fh=szmDqIezPzJP777khqWWvTd1GtfJJ/M1Lvp1a85mMY4=; b=VCu2DwGs1vFarTDdKqvuzw/CWQLuJIUHYthjPzQGMSgI+MdZ3or/IwC0CGkImkTb8N qPpKmmBJDiVndSJroM+4fTp/C808VZz//KzJ4gW12S6NQmsdpGSRLouZQl573FmxWpT4 ZAu2qx2dPjmNKuIVRYh7LsG2fURU9CNtjsKAubileH0DWpy6e7dq61Jq2eFZ1nI9MnfL BFu0o9efl7OxFltTQn2txyJ29vvrS/u2Pd1gTmW3udGQ+LJu6M8/Yo/7NC+KxlQwwqr6 KriElbFNTa33Vp5WZNf8ZclidIwhOnW7gQkTP1kWmX3ZLs3dcQpuVTNxf6OuhgF4H/3G p8ZA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nXcj+rQM; 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 h12-20020a056102208c00b0046b5c752327si342138vsr.323.2024.02.15.10.00.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:00:14 -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=nXcj+rQM; 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 1rag1a-00064r-EN; Thu, 15 Feb 2024 12:59:55 -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 1rag1P-0004tx-VB for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:59:44 -0500 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag1N-0001ou-NG for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:59:43 -0500 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2d0e5212559so14438451fa.0 for ; Thu, 15 Feb 2024 09:59:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019979; x=1708624779; 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=+yletPVGxCa3h+9fKZJUuwx/+JgKNE8xagr9A+vDkAQ=; b=nXcj+rQMG6vw+E98opsk+Hg+m0ph7Y5vJ78Z88k50ciCUvb3ckWc8bgYIQYGeInMg1 8sJgMYPM+1I2mTviW0A19IRVSXnGynd8CmN7pWVmUlaINhyGkJz7GnMjERNCZfeePLkb iA/6BpqjdJ8o/LEQaPnjW+/LNKRNy3n+Ud9jFWAREWKmfCmakaquvsFWvM9zYzQzSyxu ka6wyQtn4BXFB3D5UPtPAm2WSxRJi2PycXhJMJV8nGffX4DYsFrrHeb6ceH+X9dvgdJI ikY4E6f3zwDiQuHaFppf8PZsc9No30OUelFpltwPicGzRoSgIwUSel5z/76UycGxjpP7 OrIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019979; x=1708624779; 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=+yletPVGxCa3h+9fKZJUuwx/+JgKNE8xagr9A+vDkAQ=; b=uUYj2rIUSw2YHI39EN5PuTd6LhVasdPknQRE8pU/4Gja0ngbsWe0EdLABUobKSnQtW TDYo5WTId1DdLjybqHzL/Gscr/ZowZBSSr6Hvg7F4XNja5dbK0VawUAZWd0NWoAhr9M4 F2JF+qRj5ILmaq4n4g0TuM954VwQnNFxef6UG3OJFgF6BJnOYhGH47HRdkp/tNLHxBs9 Er79WCaoYmGQ40eF+oneuP80wPCgbcHjucJDhumI+vLQLwbl/Te0RW5pUbZ3e6kzkrpK DH+5Uos6R/YiJEEt0x0f5fJqzj/fBDely8oUwHWkSmwRS9hxprb2KGuxw+ytoRoXoX2d 3lkw== X-Gm-Message-State: AOJu0YyRUQTppSlwLxR1Wm9Y2d5wxU+NxAPNvUXesdqzCOZDPXUJvwGL Wr3DuMKIZNKqb/ZS6ZDJDpwmBf3vk20jsY/xCd7C6K9NeYusfrcynGgqdQ9AMHsKasYRMgLg5/U NIDM= X-Received: by 2002:a2e:7e0e:0:b0:2d0:9902:16 with SMTP id z14-20020a2e7e0e000000b002d099020016mr1744614ljc.17.1708019979263; Thu, 15 Feb 2024 09:59:39 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id b20-20020a05600c4e1400b00411a595d56bsm2868021wmq.14.2024.02.15.09.59.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:59:38 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, Bernhard Beschow , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Aleksandar Rikalo , Jiaxun Yang Subject: [PULL 16/56] hw/mips/Kconfig: Remove ISA dependencies from MIPSsim board Date: Thu, 15 Feb 2024 18:57:10 +0100 Message-ID: <20240215175752.82828-17-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::230; envelope-from=philmd@linaro.org; helo=mail-lj1-x230.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=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 From: Bernhard Beschow The board doesn't have a working ISA bus, only some I/O space. Selecting ISA_BUS and including hw/isa/isa.h is not necessary. Signed-off-by: Bernhard Beschow Message-ID: <20230109204124.102592-3-shentey@gmail.com> Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240213155005.109954-4-pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/mipssim.c | 7 +++++-- hw/mips/Kconfig | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/mips/mipssim.c b/hw/mips/mipssim.c index 16af31648e..a12427b6c8 100644 --- a/hw/mips/mipssim.c +++ b/hw/mips/mipssim.c @@ -31,7 +31,6 @@ #include "hw/clock.h" #include "hw/mips/mips.h" #include "hw/char/serial.h" -#include "hw/isa/isa.h" #include "net/net.h" #include "sysemu/sysemu.h" #include "hw/boards.h" @@ -206,7 +205,11 @@ mips_mipssim_init(MachineState *machine) cpu_mips_irq_init_cpu(cpu); cpu_mips_clock_init(cpu); - /* Register 64 KB of ISA IO space at 0x1fd00000. */ + /* + * Register 64 KB of ISA IO space at 0x1fd00000. But without interrupts + * (except for the hardcoded serial port interrupt) -device cannot work, + * so do not expose the ISA bus to the user. + */ memory_region_init_alias(isa, NULL, "isa_mmio", get_system_io(), 0, 0x00010000); memory_region_add_subregion(get_system_memory(), 0x1fd00000, isa); diff --git a/hw/mips/Kconfig b/hw/mips/Kconfig index ab61af209a..afcfb2b8ec 100644 --- a/hw/mips/Kconfig +++ b/hw/mips/Kconfig @@ -6,8 +6,7 @@ config MALTA config MIPSSIM bool - select ISA_BUS - select SERIAL_ISA + select SERIAL select MIPSNET config JAZZ From patchwork Thu Feb 15 17:57:11 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: 772981 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp967430wre; Thu, 15 Feb 2024 10:05:50 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW2XJGmFFJViGyAh2laTHwIKp5FLUv3Y2S2fovn6Zg0zhlNG6DKr0nou+JD5OdQ3Atk+kqYJ+r2yi/RnJTDVtGR X-Google-Smtp-Source: AGHT+IGzxA8N2JqrYyTIcp1WfO+hC2zQqI6zNgHm6DVbR6JHiL6Qn/fKZCWV2jRhmiWwghKLSrVp X-Received: by 2002:a05:6102:11ea:b0:46d:221c:b596 with SMTP id e10-20020a05610211ea00b0046d221cb596mr2380712vsg.5.1708020350337; Thu, 15 Feb 2024 10:05:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020350; cv=none; d=google.com; s=arc-20160816; b=plGGryUH7acjgEKzdkdYULGqWP2HrULgC43XIPKf5E9MfHYwuY/B+r8bRj1kV3IF+S J0aMaV/I817KsQRIR3KRVkFTzzYOybbn5XfzAlfdnLzPzJ7YWs3pUfKijPnN/NEDW7hT tNczRHylFrDtjB83C+NL32vZ1YvwUpfBquGPwyrufsFy4K+v6TehTN0o3OEbk0uBlJ0x +ibF8WeqGgQaWQipIPosAEYeHIv5LOxurVFpFdi5MnXSHOBAGcKpuHR64LN9rDrLzy0L R5lUfpBKn90g+HCp38iZwtKZRLPbWvdF3voCzGkpByOIm4cgosCktFKenlqzPSVfZ8cy LOWQ== 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=nD0xGIx0jqih+wWIcjwEtsdSIF+Dav0OUaDGYWjSMEc=; fh=lQbHj+pSAke7bAeKO4l5FDnFbacv8UDRBNdzicJbGvI=; b=uEdYxtgwKQAw3Diba064oJkW2mniijaOTPwiekcz8TUmCqu2Lj73HGysfdubw2Ggel ivsvEEUtvyb/fmy3MFzzxKiHN7U4uhTUuMs2u4TWTZ/SN60NgVlHKX1yfNgYyKEcroyD orXQPtVKDMYpyUtKSTYSIp8iOrCM6iJIIouz68ogFCpaDeJw86uQRtvDji3/iXI1xMY3 ODCVYsqkEki9TWLOJyAtQUWr0OxxgvJz5HgNejWKIiNviFuEjbYHSoVhqFRPhBn6Bxxk sG99+MTtMPhJIT2CGoz6wEPw66w4n8UrFajhsUwPt1tMKyivkJrfn+yJyiAEgGhohR0o uDoA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wmG7tInv; 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 g25-20020a05610209d900b0046ee2d825fcsi403951vsi.313.2024.02.15.10.05.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:05:49 -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=wmG7tInv; 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 1rag1g-0006ZH-1L; Thu, 15 Feb 2024 13:00:00 -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 1rag1X-0005mp-9d for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:59:51 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag1U-0001rJ-DK for qemu-devel@nongnu.org; Thu, 15 Feb 2024 12:59:50 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-411d231ea71so9176725e9.1 for ; Thu, 15 Feb 2024 09:59:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019986; x=1708624786; 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=nD0xGIx0jqih+wWIcjwEtsdSIF+Dav0OUaDGYWjSMEc=; b=wmG7tInvbLWeQWiGXclknJ8uGy7wGrv+C0Rog8fq208kPEDbR73c10QDA1/CQ/PLo5 6byUI8IoeJTC0lyq4Vg8zNlwqWq9yRLCrlq5guaxNzLHV1Rh6v0D0MKXqMz2Kluuz+c4 2aXYqtDm5cjXBZGSHddORzt3kEu9+3ZHRmuYX3tO2pjI6dPqDhs+4JeqTWQ/u+rtbHqw cFfibHIWAc0b1E6T5YrvvFO7ZYfsJQrFaGnQIhUg+4ZnrQUR5Pt7YQcyPFexibK/NI/Z FoUSGqHP1EVohod9Hu6V0w5QMrzGmCCQpG1aXP7QuwQaG5mYrmLpihzXPZT5OoS9E5Xz nmrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019986; x=1708624786; 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=nD0xGIx0jqih+wWIcjwEtsdSIF+Dav0OUaDGYWjSMEc=; b=cudACjo3rkbF5S0dywgN7J/UTQK2PzHTdekEmMjBjVYXkgi0TkIavnQ5nzxMl5ifBc 5GtSfhXpOWMMgr+pQ8XSzIowZSjjZrV9y2cbjluWU/9A+RYcS5++rQuFJ23kYLJU+jWC AM5ls5xfZOKa27jADQmEJK37lLqJ8Czjv4KRvbpTiMntg9AYqmsdvm+nbbVS4MBtJgfW dVMoQZmpOgYjckiUKdVMi4v9nG4np6F+97LF49o3JJMgKXVhYLbQzet+AxCLuMBeqR5S KxJXkEvi1kFDc3CDcep1dYKTwR/cPjJxYtd8Shggq3opJz/B5vZjMw9yOV1v0lbj5Yxv OxOQ== X-Gm-Message-State: AOJu0YzcdfVpR2nz4WlVvS+hTGpNI+vSJZu48Uk9M24P7u8hAiA9HTXy yhCKyFxm3x/aGnfobHKHx0doJOPWQfEl8TI50dUywgBgx/+d6BJmpYfbBlJ1to+gFgRd4vsgs3t XAOQ= X-Received: by 2002:a05:600c:5586:b0:411:ba7c:99a with SMTP id jp6-20020a05600c558600b00411ba7c099amr2126769wmb.38.1708019986191; Thu, 15 Feb 2024 09:59:46 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id fa25-20020a05600c519900b0041228b2e179sm1436839wmb.39.2024.02.15.09.59.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:59:45 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, Paolo Bonzini , BALATON Zoltan , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Bernhard Beschow Subject: [PULL 17/56] hw/isa: fix ISA_SUPERIO dependencies Date: Thu, 15 Feb 2024 18:57:11 +0100 Message-ID: <20240215175752.82828-18-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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=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 From: Paolo Bonzini ISA_SUPERIO does not provide an ISA bus, so it should not select the symbol: instead it requires one. Among its users, VT82C686 is the only one that is a PCI-ISA bridge and does not already select ISA_BUS. Reviewed-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Bernhard Beschow Signed-off-by: Paolo Bonzini Message-ID: <20240213155005.109954-5-pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig index 7884179d08..5df3c09cd5 100644 --- a/hw/isa/Kconfig +++ b/hw/isa/Kconfig @@ -15,7 +15,7 @@ config I82378 config ISA_SUPERIO bool - select ISA_BUS + depends on ISA_BUS select PCKBD select PARALLEL select SERIAL_ISA @@ -47,6 +47,7 @@ config PIIX config VT82C686 bool + select ISA_BUS select ISA_SUPERIO select ACPI select ACPI_SMBUS From patchwork Thu Feb 15 17:57:12 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: 772997 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp968899wre; Thu, 15 Feb 2024 10:08:25 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXAalEjHuv57m4TMOElQxvVA5agGPCqwVKmBx4s9OxVdu8O6BIAEepp4VxROmuYBmgN76hL9fscD8Ya7EArUItt X-Google-Smtp-Source: AGHT+IFO8UhBCH1zhp3hR/5loxan+M0fMPxj7uCxM8bxjYxZhjTAWQMyPJWsD+hUJBqe/hsJv8Kw X-Received: by 2002:ac8:5a86:0:b0:42d:c831:6a3f with SMTP id c6-20020ac85a86000000b0042dc8316a3fmr3245619qtc.26.1708020505240; Thu, 15 Feb 2024 10:08:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020505; cv=none; d=google.com; s=arc-20160816; b=R1cDNUbOtCO5rPdmG8zWlLP9KvpQDn7+uOTjPq1Y5HHixbCXXGuIGwjiFyferZBQIi Jh+BuaOQ3XC2T1NWXH7gvsT2eHBExWAbWk+phlNAtEGDs23SO/cFenGkzO9jgY3gADo7 geW95DeU2mMJvqqRZoHxSPZVDZWvM/6RHq71HalBFpZSYWV18+wtTQ3+p496abHL4oAl EAdINjeNkOGSj5M4Lk49n9aUb9rbCZwo9aGRpZP6FRXBSXAHJRoS/dFaKPH4ciDMxohx UKIPp34dHJRexAC4LgL4taaHbX02nA05iFTurUQfeHZEadG9zNr1LptwymE963qwJqIX xTPA== 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=KrDWAyGRgS7V1HXGadIwipz2b43fHU+C3C1ocsMbGSU=; fh=79jo8uS4F5heQbBnxscZE6Qo9A1nC2fFGGPXbDqkpMA=; b=Kxjs/cp8z8ASC3JbeEWKinK/x7D2mAva0HQRX8uwxI67G8+1FZs0p82polkdTEdaE9 M4SyzWJt0DIU/jq8oWmF3gIjpXRsRRB8Tjeu6+jaD59LBIhEXVQk2SvNHWjmMg3YMyzk Y3sIN5q7Y7FYlWl8GmjxXioBcirNx38vLmdgdoPec8ukdx8PirZXRgVx5goAScsWRSZW zmlMs/FJscq59O1WO/nK6gd2Cuhw04BUMjwvn+3Ci/GL54XUPzh8+CbxsCMLEUbTtymQ XM2SrKK0sErOU6wtYDI0m6YXbDmeGsxVC3ckG5RfBM0zVsTwePxA0jXL4Ni+Ry0Y7B46 M/hQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eSLdhUi4; 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 m14-20020ac866ce000000b0042c5fb0e278si1866440qtp.597.2024.02.15.10.08.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:08:25 -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=eSLdhUi4; 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 1rag1m-00079Y-9U; Thu, 15 Feb 2024 13:00:06 -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 1rag1i-0006pZ-Cx for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:02 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag1e-0001tC-Gm for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:01 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-412345cca4eso1641045e9.2 for ; Thu, 15 Feb 2024 09:59:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019992; x=1708624792; 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=KrDWAyGRgS7V1HXGadIwipz2b43fHU+C3C1ocsMbGSU=; b=eSLdhUi4QXO3Q4APHbiB67wLcgis0wcTKvILLJ6Aw1XL43jad83bipoBhnWZaakNxK InhpHO0sXjpyZIAMIPcNbX3dQxzitCiveCWYq/96L1aHH3N/rwkUbvwEavL13a8P+Y5q bxBDw4Tvw05plZ0t+vfnPbx7lm1XfWS+qFxYBLy4ARdO1Q8yRLtE3ZaVJwTSX8156sk9 AHXJjXWkashzsb5nsjSVvCqdxjsqA0ePxiD5hXORPJZjGoDoMlT2G371BoRzI3jbAbaX GpkPeNRvAM5LGvIC9x+FPCbskY+pxFmuzEwHzkt4rZiiyGK411jXS5lmei5Bp4tal3Hp +RDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019992; x=1708624792; 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=KrDWAyGRgS7V1HXGadIwipz2b43fHU+C3C1ocsMbGSU=; b=r6M+HJSUDcKxlvpAreGwXyssoEvhsMAqlpJLAS5H5pcFMYAPc1CczkP585ddc6gWdV sR0l0p2DpnQjTbn0QvVvJKq51kOec3VWUQ6lUHKif2CRP4NKJ7ytW3a/nbrWElsYEI5M ZT0BaZ8vVaf+gt6eJ7r/LzPm0/+i8UUBL09EJZzW4M3FUqxiH02V5q9RoBFINix7Trf5 YGZAQuGvC3McFDF97kDjh5B5rGzp+5vUeQmKnpGAn3DANtTatfWFYvZPOxc2UjfIObm7 4u9NNNMppLd5jubVlXtn7IzlhYUgDJQNT+fnsIWBROvj7j7ceSSliod0NJhx7yRHYD6Y NqYw== X-Gm-Message-State: AOJu0Yw0RMAU2cFx3eLEu/PFY1L8vS+2eNu5vI4iyzwex2LZ7wSz/uQG KgU3tQR+fGh+WuSqTib9BD9HGL8uet5Vz8Rw5X0rJ+Yso5A2QPCZ+Pf20zC7BG2G5/i6Cs3yLCn B3BA= X-Received: by 2002:a05:600c:91a:b0:40e:f46d:ad35 with SMTP id m26-20020a05600c091a00b0040ef46dad35mr2161791wmp.36.1708019992628; Thu, 15 Feb 2024 09:59:52 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id z11-20020a7bc7cb000000b00411b7c91470sm5630301wmk.12.2024.02.15.09.59.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:59:52 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Bernhard Beschow , "Michael S. Tsirkin" , Richard Henderson Subject: [PULL 18/56] hw/isa: specify instance_size in isa_superio_type_info Date: Thu, 15 Feb 2024 18:57:12 +0100 Message-ID: <20240215175752.82828-19-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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=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 From: Paolo Bonzini Right now all subclasses of TYPE_ISA_SUPERIO have to specify an instance_size, because the ISASuperIODevice struct adds fields to ISADevice but the type does not include the increased instance size. Failure to do so results in an access past the bounds of struct ISADevice as soon as isa_superio_realize is called. Fix this by specifying the instance_size already in the superclass. Fixes: 4c3119a6e3 ("hw/isa/superio: Factor out the parallel code from pc87312.c") Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Bernhard Beschow Signed-off-by: Paolo Bonzini Message-ID: <20240213155005.109954-6-pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/isa-superio.c | 2 +- hw/isa/smc37c669-superio.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/isa/isa-superio.c b/hw/isa/isa-superio.c index 7dbfc374da..d85f22db1a 100644 --- a/hw/isa/isa-superio.c +++ b/hw/isa/isa-superio.c @@ -185,6 +185,7 @@ static const TypeInfo isa_superio_type_info = { .abstract = true, .class_size = sizeof(ISASuperIOClass), .class_init = isa_superio_class_init, + .instance_size = sizeof(ISASuperIODevice), }; /* SMS FDC37M817 Super I/O */ @@ -201,7 +202,6 @@ static void fdc37m81x_class_init(ObjectClass *klass, void *data) static const TypeInfo fdc37m81x_type_info = { .name = TYPE_FDC37M81X_SUPERIO, .parent = TYPE_ISA_SUPERIO, - .instance_size = sizeof(ISASuperIODevice), .class_init = fdc37m81x_class_init, }; diff --git a/hw/isa/smc37c669-superio.c b/hw/isa/smc37c669-superio.c index 18287741cb..9e59dc1603 100644 --- a/hw/isa/smc37c669-superio.c +++ b/hw/isa/smc37c669-superio.c @@ -103,7 +103,6 @@ static void smc37c669_class_init(ObjectClass *klass, void *data) static const TypeInfo smc37c669_type_info = { .name = TYPE_SMC37C669_SUPERIO, .parent = TYPE_ISA_SUPERIO, - .instance_size = sizeof(ISASuperIODevice), .class_size = sizeof(ISASuperIOClass), .class_init = smc37c669_class_init, }; From patchwork Thu Feb 15 17:57:13 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: 772994 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp968672wre; Thu, 15 Feb 2024 10:08:01 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUF2XfoAwCsVP36HYumAnj51z4tmjLgAIzaWh94UkgxSh5c39r2Wv9xUwy1rkXjwTaT5UUKJ6008gBaAprcyMHF X-Google-Smtp-Source: AGHT+IG3gk1r7+yg81I6AidMr9HlFiixitYLG1dCnl8HrxsvKJZsbxx9QxBjXzZ556BWzCuP2w/k X-Received: by 2002:a9d:774d:0:b0:6e2:e6ca:9b59 with SMTP id t13-20020a9d774d000000b006e2e6ca9b59mr2480885otl.18.1708020481189; Thu, 15 Feb 2024 10:08:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020481; cv=none; d=google.com; s=arc-20160816; b=LWYUe76UoihxuMmUE17SiriP4/LeIrPYIEEgTm8QuTUH+xUEQEGuBAovekjxKGWygk EwYbw8HbmzwFuGtjEcJNQWZeUO4b2DyrfcWkRYFQghU51umJDgrssIOC1JFbILrK/6YV fKmgniz4treuMGMPZDXCXyY/pfqJsgSHm04TOWaGJRMNRrCp5uDdKLFl807mf0C+8KLf +yvMmrkvG8glck/YXTFDIa9V6+MwY+dR7LLoFjgwMvL/971UZc15L1KQYwPjmM+MKNPi c0BBUL5zYAhtAHkfgQOasWD5WboLbxaD2J8Br65iWCvz5JHdSzimk6Az9J6ICRbTJgA1 Dn4g== 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=M0JMLTzOASp2LTXmqUnI4wsUaudt2sBVolvQqLJvM14=; fh=4aDdsONPFs8DYs7YMDFHyq4VSeUGabesgfzvMZvYkAo=; b=IQyq0WakzVKhagw5awhrOqGcBHJkST+36YbOUJBm/xdehZrZuRyCW2DmxkXw57Jild kzVo2HxczUoZ2PBBu3LxNPd8uqYC/ox8Sbfpa3pepMU4PWk+oFEVh53gbsqKInMKDRhb u72nkLrn+idQHqRVxPdhsD4e7kaUtL/J1NaRmmE3ZuDuwuA5gkUTihM72hKtvAQfzRqt hIEITwSJZUxvCLslDibUYf+oNYuQtvuDNOW5nKdA4QXDh+Uan741DFjA+fwcCEk3NLJC 5oxgh65Zqg4WHCyMLr8vi8tWwxgxr7eZ3ysjicQcc1XlKwS6jUrGvTOU/WaVrAEbfUzq MLFA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jSGPEJYF; 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 q2-20020a056102100200b0046d12f0e6c6si329694vsp.770.2024.02.15.10.08.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:08:01 -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=jSGPEJYF; 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 1rag1m-0007B5-Ud; Thu, 15 Feb 2024 13:00:07 -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 1rag1k-00071y-Bs for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:04 -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 1rag1h-0001un-J3 for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:03 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-411d3c75026so9349195e9.0 for ; Thu, 15 Feb 2024 10:00:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019999; x=1708624799; 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=M0JMLTzOASp2LTXmqUnI4wsUaudt2sBVolvQqLJvM14=; b=jSGPEJYFXQXuoE8+uoZaEdxJEMWYzAwLV17uIA0JOCVXIZ4vxQykpXCbZmZwvm7pKC 7I3YOm43dG9cHfzU/pbJbDTB8GmwLsIawO6OODp6c94g9m5VEEwh+adTOnv3gDybchuf uUaaVo/8FTfa6AkNxQO/pcjlkBXBjReCDU6FqCTzJ8H0eqYHJYXWojzupo2whBXSUKUn 2DArFN7dlJ3Xxxeajzfz3GpkeklPEtHs0WTwbchCP71bgeRQ1ir9d2EeW8gmnAvC+8Nc hTbaidSaahl6ReT1IgLSbwBJ6mVdQP0FZtKoYBS7cAUz5NToOwgRg/4gO4HwWCrtC5kW tI/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019999; x=1708624799; 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=M0JMLTzOASp2LTXmqUnI4wsUaudt2sBVolvQqLJvM14=; b=oiK4RmWS5oNpHuqE4/mA95N7MBpVuyaMM8k16kzt1WLlgz0Ix8jcupK7vdKyF/d254 1U6TfcytapphFlFkjzFaitL946V/PdHPufmpdxLkqgVmC+P1/wJg8+Q+ZexcnHycPSPF LdV/MyHAupTlZWvbxnAeT7oFRURwRxxXOw+T4BtqYRpj+a4+J6JLYxvOg97/7I+iUN47 SJhp7apFcfoKmtFindpinsLt/tnPozeN+oup5pttthU3kwbYu97T+kvSiD1NpXpabxET AFiIWolU3xOtv1P4vYvXULB9LHjaymMWiiYlIGS55cUlGXKjJuNBcyQSWpZAr+htY9m/ jnuw== X-Gm-Message-State: AOJu0Yz/NT1DbiW0vA03+a1sdVfwN05MVutYYkx53zoxYhjap/L6P9r8 PSu1YeodDcowwOUnLII+c5SlMZBoPT0/p9nSr5E9Uv7oE5P/xueZIVvnpy4xIinb99GeY53Lf+v T9Xk= X-Received: by 2002:a05:600c:218:b0:411:e27d:522e with SMTP id 24-20020a05600c021800b00411e27d522emr1957903wmi.33.1708019999176; Thu, 15 Feb 2024 09:59:59 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id k2-20020adff282000000b0033b8808355fsm2427810wro.28.2024.02.15.09.59.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:59:58 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, Paolo Bonzini , Bernhard Beschow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Aurelien Jarno , "Michael S. Tsirkin" Subject: [PULL 19/56] hw/isa: extract FDC37M81X to a separate file Date: Thu, 15 Feb 2024 18:57:13 +0100 Message-ID: <20240215175752.82828-20-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-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=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 From: Paolo Bonzini isa-superio.c currently defines a SuperIO chip that is not used by any other user of the file. Extract the chip to a separate file. Reviewed-by: Bernhard Beschow Signed-off-by: Paolo Bonzini Message-ID: <20240213155005.109954-7-pbonzini@redhat.com> [PMD: Update MAINTAINERS] Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + hw/isa/fdc37m81x-superio.c | 32 ++++++++++++++++++++++++++++++++ hw/isa/isa-superio.c | 18 ------------------ hw/isa/Kconfig | 4 ++++ hw/isa/meson.build | 1 + hw/mips/Kconfig | 2 +- 6 files changed, 39 insertions(+), 19 deletions(-) create mode 100644 hw/isa/fdc37m81x-superio.c diff --git a/MAINTAINERS b/MAINTAINERS index a24c2b51b6..8920ba403d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1357,6 +1357,7 @@ M: Philippe Mathieu-Daudé R: Aurelien Jarno S: Odd Fixes F: hw/isa/piix.c +F: hw/isa/fdc37m81x-superio.c F: hw/acpi/piix4.c F: hw/mips/malta.c F: hw/pci-host/gt64120.c diff --git a/hw/isa/fdc37m81x-superio.c b/hw/isa/fdc37m81x-superio.c new file mode 100644 index 0000000000..55e91fbca1 --- /dev/null +++ b/hw/isa/fdc37m81x-superio.c @@ -0,0 +1,32 @@ +/* + * SMS FDC37M817 Super I/O + * + * Copyright (c) 2018 Philippe Mathieu-Daudé + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "hw/isa/superio.h" + +static void fdc37m81x_class_init(ObjectClass *klass, void *data) +{ + ISASuperIOClass *sc = ISA_SUPERIO_CLASS(klass); + + sc->serial.count = 2; /* NS16C550A */ + sc->parallel.count = 1; + sc->floppy.count = 1; /* SMSC 82077AA Compatible */ + sc->ide.count = 0; +} + +static const TypeInfo types[] = { + { + .name = TYPE_FDC37M81X_SUPERIO, + .parent = TYPE_ISA_SUPERIO, + .class_init = fdc37m81x_class_init, + }, +}; + +DEFINE_TYPES(types) diff --git a/hw/isa/isa-superio.c b/hw/isa/isa-superio.c index d85f22db1a..ad9cd129af 100644 --- a/hw/isa/isa-superio.c +++ b/hw/isa/isa-superio.c @@ -188,27 +188,9 @@ static const TypeInfo isa_superio_type_info = { .instance_size = sizeof(ISASuperIODevice), }; -/* SMS FDC37M817 Super I/O */ -static void fdc37m81x_class_init(ObjectClass *klass, void *data) -{ - ISASuperIOClass *sc = ISA_SUPERIO_CLASS(klass); - - sc->serial.count = 2; /* NS16C550A */ - sc->parallel.count = 1; - sc->floppy.count = 1; /* SMSC 82077AA Compatible */ - sc->ide.count = 0; -} - -static const TypeInfo fdc37m81x_type_info = { - .name = TYPE_FDC37M81X_SUPERIO, - .parent = TYPE_ISA_SUPERIO, - .class_init = fdc37m81x_class_init, -}; - static void isa_superio_register_types(void) { type_register_static(&isa_superio_type_info); - type_register_static(&fdc37m81x_type_info); } type_init(isa_superio_register_types) diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig index 5df3c09cd5..73c6470805 100644 --- a/hw/isa/Kconfig +++ b/hw/isa/Kconfig @@ -23,6 +23,10 @@ config ISA_SUPERIO # Some users of ISA_SUPERIO do not use it #select IDE_ISA +config FDC37M81X + bool + select ISA_SUPERIO + config PC87312 bool select ISA_SUPERIO diff --git a/hw/isa/meson.build b/hw/isa/meson.build index 2ab99ce0c6..f650b39507 100644 --- a/hw/isa/meson.build +++ b/hw/isa/meson.build @@ -4,6 +4,7 @@ system_ss.add(when: 'CONFIG_ISA_BUS', if_true: files('isa-bus.c')) system_ss.add(when: 'CONFIG_ISA_SUPERIO', if_true: files('isa-superio.c')) system_ss.add(when: 'CONFIG_PC87312', if_true: files('pc87312.c')) system_ss.add(when: 'CONFIG_PIIX', if_true: files('piix.c')) +system_ss.add(when: 'CONFIG_FDC37M81X', if_true: files('fdc37m81x-superio.c')) system_ss.add(when: 'CONFIG_SMC37C669', if_true: files('smc37c669-superio.c')) system_ss.add(when: 'CONFIG_VT82C686', if_true: files('vt82c686.c')) diff --git a/hw/mips/Kconfig b/hw/mips/Kconfig index afcfb2b8ec..e57db4f641 100644 --- a/hw/mips/Kconfig +++ b/hw/mips/Kconfig @@ -1,7 +1,7 @@ config MALTA bool + select FDC37M81X select GT64120 - select ISA_SUPERIO select PIIX config MIPSSIM From patchwork Thu Feb 15 17:57:14 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: 772961 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp965368wre; Thu, 15 Feb 2024 10:02:41 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUFjXfQNYqp+RLou7DFfGLTZMCmgU1u3sI/8wh20P0QIGFUQSQ/+CeAXuw810en3Pd6PzM1tJdpBeC5ASq5L0Th X-Google-Smtp-Source: AGHT+IHdoFFINjye5WWYE6TBR00sfvybTfr8uZ8L6BUd4gGPMLQFBUle8G0pdLFf4kpJQ5hj2KMc X-Received: by 2002:a05:600c:3554:b0:411:fc94:ac99 with SMTP id i20-20020a05600c355400b00411fc94ac99mr2195223wmq.9.1708020161809; Thu, 15 Feb 2024 10:02:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020161; cv=none; d=google.com; s=arc-20160816; b=I4iqG1CGBtoKVDvqnNJpqsy4qMfyEH25CKB/TVlH/jqx0EeCeXZCcM59N/nRnZmnre Fo+1pO4hPgm1CQ3i+smcznU+i4xJCA09Lk+IPT0LyXO1iEuxzqjm+YulFo2aOiQmYgIw Kc1jzm1JRCP37FQKynVHZ8aqUuNkBLTcp5y8k3a7+ZbSeOTb73KqCxIcYDxKljd/Z2dH WEsi5xd3SHRQJBPQhlFrGLze+0mJ7XCjMPMyvGm7L7wRCe8C0T2NqFzdnQrYbVxW7Kq1 +KSnlTGRjYQ+g79f3K/DX0RX2CF7C93xkUMhp7UQ2MlIGChj/ITLt6FqWnmAvz9KHTii OBxQ== 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=DEY5Q9cN6dyZ6ENA20XPMsBoCTRW9qgX5vERomv9BCU=; fh=3qOqTLcNT0VRN1uvEMCfMPI8wWbn1qzYcF6MahaL2ZY=; b=Phwn1+Q5MxscnRq6TUN8XDL9FBQqsD76EOiWzcs1dYxMVaEx5JHpWIy07JGHr7Z/Q4 7cNhTfznFLewdpGhlYxgZqkjYrbLlKGpvE9kCR4aQS8Z96IJ3t9pyAg4uQcYxr3IMoU0 O+gwM8a+4gLhOuuzj6pfseHdGOsb8V2U1g98mn3gBIbcokJuJawP4yku5uE/a/+WLz/u UVzLwWcvE63uefu+9cxiWDTnGzpPdGpLQ1YZKBBotbBo+qcADCGJ1k/FP2FAYjJDRcEb F0nOoDSfzRGLlKrkOHOazJpxa+6Z5kmr7DBZA33lXe7xa+HG16E478oOwkfzwdceLDdz UNHw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gISc223v; 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 d17-20020a5d4f91000000b0033cfd422825si970233wru.1055.2024.02.15.10.02.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:02:41 -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=gISc223v; 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 1rag1y-00083i-Gp; Thu, 15 Feb 2024 13:00:18 -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 1rag1q-0007Ym-BB for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:10 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag1n-00023i-8O for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:09 -0500 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-33cf7812777so639139f8f.0 for ; Thu, 15 Feb 2024 10:00:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020005; x=1708624805; 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=DEY5Q9cN6dyZ6ENA20XPMsBoCTRW9qgX5vERomv9BCU=; b=gISc223vv85RqmfTBjyHfX7Yom02HvnP7aeXJ3DB+LkJqz/bV/lDqZnLcMZHFNsjAB 3ee73owj8x3OvCgjLKTcYo/0gXio8znOqtEZyiqjXT4fhSBSJf0Lr6xWay1idF4v7XpM FfH+S2fPMmaJTSe8HytSPvPV9Nm7KahG2Ky2A4tuYw01Kh0dVJ75r0NKGMjn6KUjWkCU QjuOLBtbBSCrNmLK3N7TJ/WXAqhf1+nG7OZ/HTaPeHoKyRePKuM4xrdBzboR1WaRz9/v 8uViySEbLk41gd+h9nmii+sIfXkMhT6EXUwtcSdUfPtGV9DAdyNtvFyz1AjJDg4oW1FP mMFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020005; x=1708624805; 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=DEY5Q9cN6dyZ6ENA20XPMsBoCTRW9qgX5vERomv9BCU=; b=TlZZhjzWCKfza0PBg7R2btQzKCx4bHAX+lkJ5bY9qez/2DwUjvfWrRFkYNjW+mkUop orotFUcNMs1Rj4JjfiNic5r98Y3YkGWEctXkJRJvpsH6u5J6Tm5Ih2VoJH+RuHgf9Tfy fnRzf7ElkDk/L4zP0HjB+pdGZMz0LfkH2+10YYa7mVBmGylHIOArsy9FCy/LFAbG3xLs bM+XbhA9dVNclB6vJ6FY0WuJfbHZExyEyZSKzZDnV78mI7sVblhg+1iaE9BbXWgR/N93 trSHKzqIbS+b/m8oRyuwuvLexZ0tNMQbhsm4fUn160RwX927QuhZcZA4Rt8Bd3b06/hz 3pjA== X-Gm-Message-State: AOJu0Yziq3VSKzAnZ+/DIOddoY4K7onBK4TmMs0HLcD1d7YDkL7qKh75 +0QotM86gCx+OUWg+FK2fj1XgMVup7SF4Ul5ybzxR+3GNcwq6Xc1g4sxt4ihL3EqLYFJ19E3xfN aVL8= X-Received: by 2002:adf:e7cb:0:b0:33b:6773:1481 with SMTP id e11-20020adfe7cb000000b0033b67731481mr1883493wrn.56.1708020005318; Thu, 15 Feb 2024 10:00:05 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id v9-20020a5d43c9000000b0033afc81fc00sm2374790wrr.41.2024.02.15.10.00.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:00:04 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Yoshinori Sato , Richard Henderson Subject: [PULL 20/56] hw/rx/rx62n: Reduce inclusion of 'qemu/units.h' Date: Thu, 15 Feb 2024 18:57:14 +0100 Message-ID: <20240215175752.82828-21-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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=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 "qemu/units.h" is not used in the "hw/rx/rx62n.h" header, include it in the source where it is. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Yoshinori Sato Reviewed-by: Richard Henderson Message-Id: <20240213130341.1793-3-philmd@linaro.org> --- include/hw/rx/rx62n.h | 1 - hw/rx/rx-gdbsim.c | 1 + hw/rx/rx62n.c | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hw/rx/rx62n.h b/include/hw/rx/rx62n.h index 73ceeb58e5..bcda583ab3 100644 --- a/include/hw/rx/rx62n.h +++ b/include/hw/rx/rx62n.h @@ -29,7 +29,6 @@ #include "hw/timer/renesas_tmr.h" #include "hw/timer/renesas_cmt.h" #include "hw/char/renesas_sci.h" -#include "qemu/units.h" #include "qom/object.h" #define TYPE_RX62N_MCU "rx62n-mcu" diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c index 47c17026c7..bb4746c556 100644 --- a/hw/rx/rx-gdbsim.c +++ b/hw/rx/rx-gdbsim.c @@ -20,6 +20,7 @@ #include "qemu/cutils.h" #include "qemu/error-report.h" #include "qemu/guest-random.h" +#include "qemu/units.h" #include "qapi/error.h" #include "hw/loader.h" #include "hw/rx/rx62n.h" diff --git a/hw/rx/rx62n.c b/hw/rx/rx62n.c index 4dc44afd9d..d3f61a6837 100644 --- a/hw/rx/rx62n.c +++ b/hw/rx/rx62n.c @@ -23,6 +23,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/error-report.h" +#include "qemu/units.h" #include "hw/rx/rx62n.h" #include "hw/loader.h" #include "hw/sysbus.h" From patchwork Thu Feb 15 17:57:15 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: 772993 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp968664wre; Thu, 15 Feb 2024 10:08:00 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUKIKUieOKtcMeUhq7dPIeS085RN5I3whropA5Ju2pb5wzurJ9Mot32I/2ihvcD2Fg5ZvJHx5/gjaXfrCGmfpec X-Google-Smtp-Source: AGHT+IGwQeoJjmZe+P7VBVLrodZl5gTaZmWsZ3JmZwWCNs4WkcrZ8xpu0TmfxJj3+OHxmOy3Us8e X-Received: by 2002:a05:620a:2906:b0:787:2994:9193 with SMTP id m6-20020a05620a290600b0078729949193mr2849237qkp.21.1708020480276; Thu, 15 Feb 2024 10:08:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020480; cv=none; d=google.com; s=arc-20160816; b=W7N3TQAsY+/AebpJosHYrjQaC6AXTIuTp15qNGWC8Uvx7xRKrhtCkpX+CbtDdWnios yBiBQ6DTUNpRxc3Ae0HPiwmL+loPL+ObVCZPd7oTKGPHVH0WsQBDFCuYYDfKwK7LEBjm sRBlcyj36VSiebd40p90TglblCFk+MHBGUhVJd/Ux67Ksx6wMTKY/TCEn+DeUJIHKZiO yey0/ZJgh4RdA3RproOr/fCHJshrsnAfMlbL28F8xHHxSUWsKbdvz+cJS39kxqiQuU6Y CPl3BIf/OBoxPOzKlMwDciZ3xv1cC1Pi7dqRg2FfFD9lWVj0v7ZD+eDjGd21ODsNyYWU 9sHQ== 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=qpxuOXpE/IReVLTC/yU2rQlOGnVVc7L2PdtnHDAApI4=; fh=3qOqTLcNT0VRN1uvEMCfMPI8wWbn1qzYcF6MahaL2ZY=; b=xiW4ckXl1ssycvbXoItLcpSDNSnREmq8B5ocxcp+GThIomtA/N9MXtNtJC8/mGkY2b FNi5On+bmmBOpgah3YdhTME3U91PH31qRx+q7uiGivb7bKizQgVtTCHeR4qXaTn4y7sU TgeC2qgjf83FruKoOppI3QBh8ywjSvXY2Pam6tV4J+fMNJvhyw987OTFgnK+RLXF3i3M 74zVoszqej2u+X7MPhFdYAfgfBCu3mN0ReYKmeKF2Q/ihqAm8Hc2oghSpGaecERipDtR FuGj16Q6dVfOpsJWK1RL8vfWfv8VkwLL2u15U41fBZ9UgiWqj5CQVtsgGLFWD6may0Az Dj8Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=caVifrBx; 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 p24-20020a05620a22b800b007872c0f9d83si1972403qkh.622.2024.02.15.10.08.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:08:00 -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=caVifrBx; 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 1rag2P-0000i8-Ra; Thu, 15 Feb 2024 13:00:46 -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 1rag26-000059-Kr for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:30 -0500 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag1x-0002CO-3z for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:23 -0500 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-55a179f5fa1so1735375a12.0 for ; Thu, 15 Feb 2024 10:00:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020012; x=1708624812; 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=qpxuOXpE/IReVLTC/yU2rQlOGnVVc7L2PdtnHDAApI4=; b=caVifrBxtaanOdRzfmGMH+SaYh7OnjsskI7CnEhJoH7NCE7vZmgVhER0HKeB0k+5ot rkYDJW2l73mXsq3FPjOyhXDjAIr9nKiRNKDaQeBkpq71PAOzbghtU8wr7zd734dKOsmB Eecs+Ek2qm5hVEdxEZH/M/cm2OZmuLBXH+g5s1YVSeUvNDSKGfEPtoSR+YGas7z3ty/R 3jpXobzoyrwe2yzjDi13qQ0t023zHWAAqpBTcQPf8dWHMGggaJ2/rH1UViVj/lFH0Kx6 krPtBcdyM1sE3RO0biRQ2D5cTM3b1r4Chf2422U0oaP9HG4fq7xcO3mAEkz+0tfr8/Hu r5Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020012; x=1708624812; 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=qpxuOXpE/IReVLTC/yU2rQlOGnVVc7L2PdtnHDAApI4=; b=Hd67/oy5dIsat0vxOiAJDKqaIBHxzt8y4pFpso4l8oSR+uLSeV1UROBGIdfN1dTcdX nuRF7znyjwbK4wEBHZdfYVCPNaJ+t/5uVvBiBYOxCqKonM6LQVBvmTeABEdKq7FKONm0 MatNgA+9Y1a+srN5LAjwRZzlVEnkE4RqKER5yPjfoFy0eUv1/oqaVdtsNxnzUxDvVj+C osro0ABGixzqA3Y3Y1SPrmSHxr/11e9wO7Mz7DuSW8glF54QX3dhqon57Ho4LOqHF+FA Y7z6x4D7waKugC949qaypaqKM98TrPYvj4YiIV5tKJSb8IHSIIwX+oZ1rHHnMz5BpPdH w4yQ== X-Gm-Message-State: AOJu0YyUMmFBZfUMrxKnxKvARlhFPk7tSk36/QWZ2+GxIEBGf5yQsazc BIMJZnA3wn8B1AKejPzbGZmBfuYGedW+MpLqjFWw5BDBAFsX8odMLoPxgQjdG/XDr+bzeNrFNPV lXyw= X-Received: by 2002:aa7:c445:0:b0:55f:1728:3b33 with SMTP id n5-20020aa7c445000000b0055f17283b33mr1699734edr.40.1708020011889; Thu, 15 Feb 2024 10:00:11 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id x6-20020a056402414600b00563c179b993sm465926eda.11.2024.02.15.10.00.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:00:11 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Yoshinori Sato , Richard Henderson Subject: [PULL 21/56] hw/rx/rx62n: Only call qdev_get_gpio_in() when necessary Date: Thu, 15 Feb 2024 18:57:15 +0100 Message-ID: <20240215175752.82828-22-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=philmd@linaro.org; helo=mail-ed1-x52d.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 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 Instead of filling an array of all the possible IRQs, only call qdev_get_gpio_in() when an IRQ is used. Remove the array from RX62NState. Doing so we avoid calling qdev_get_gpio_in() on an unrealized device. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Yoshinori Sato Reviewed-by: Richard Henderson Message-Id: <20240213130341.1793-4-philmd@linaro.org> --- include/hw/rx/rx62n.h | 1 - hw/rx/rx62n.c | 16 ++++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/include/hw/rx/rx62n.h b/include/hw/rx/rx62n.h index bcda583ab3..766fe0e435 100644 --- a/include/hw/rx/rx62n.h +++ b/include/hw/rx/rx62n.h @@ -67,7 +67,6 @@ struct RX62NState { MemoryRegion iomem2; MemoryRegion iomem3; MemoryRegion c_flash; - qemu_irq irq[NR_IRQS]; /* Input Clock (XTAL) frequency */ uint32_t xtal_freq_hz; diff --git a/hw/rx/rx62n.c b/hw/rx/rx62n.c index d3f61a6837..560f53a58a 100644 --- a/hw/rx/rx62n.c +++ b/hw/rx/rx62n.c @@ -148,14 +148,11 @@ static void register_icu(RX62NState *s) qlist_append_int(trigger_level, levelirq[i]); } qdev_prop_set_array(DEVICE(icu), "trigger-level", trigger_level); - - for (i = 0; i < NR_IRQS; i++) { - s->irq[i] = qdev_get_gpio_in(DEVICE(icu), i); - } sysbus_realize(icu, &error_abort); + sysbus_connect_irq(icu, 0, qdev_get_gpio_in(DEVICE(&s->cpu), RX_CPU_IRQ)); sysbus_connect_irq(icu, 1, qdev_get_gpio_in(DEVICE(&s->cpu), RX_CPU_FIR)); - sysbus_connect_irq(icu, 2, s->irq[SWI]); + sysbus_connect_irq(icu, 2, qdev_get_gpio_in(DEVICE(&s->icu), SWI)); sysbus_mmio_map(icu, 0, RX62N_ICU_BASE); } @@ -172,7 +169,8 @@ static void register_tmr(RX62NState *s, int unit) irqbase = RX62N_TMR_IRQ + TMR_NR_IRQ * unit; for (i = 0; i < TMR_NR_IRQ; i++) { - sysbus_connect_irq(tmr, i, s->irq[irqbase + i]); + sysbus_connect_irq(tmr, i, + qdev_get_gpio_in(DEVICE(&s->icu), irqbase + i)); } sysbus_mmio_map(tmr, 0, RX62N_TMR_BASE + unit * 0x10); } @@ -190,7 +188,8 @@ static void register_cmt(RX62NState *s, int unit) irqbase = RX62N_CMT_IRQ + CMT_NR_IRQ * unit; for (i = 0; i < CMT_NR_IRQ; i++) { - sysbus_connect_irq(cmt, i, s->irq[irqbase + i]); + sysbus_connect_irq(cmt, i, + qdev_get_gpio_in(DEVICE(&s->icu), irqbase + i)); } sysbus_mmio_map(cmt, 0, RX62N_CMT_BASE + unit * 0x10); } @@ -209,7 +208,8 @@ static void register_sci(RX62NState *s, int unit) irqbase = RX62N_SCI_IRQ + SCI_NR_IRQ * unit; for (i = 0; i < SCI_NR_IRQ; i++) { - sysbus_connect_irq(sci, i, s->irq[irqbase + i]); + sysbus_connect_irq(sci, i, + qdev_get_gpio_in(DEVICE(&s->icu), irqbase + i)); } sysbus_mmio_map(sci, 0, RX62N_SCI_BASE + unit * 0x08); } From patchwork Thu Feb 15 17:57:16 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: 772976 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp967119wre; Thu, 15 Feb 2024 10:05:24 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUAdSzgGpCtbvj1BR3XlXANgRcgcaXp6wiTwSX7WhRgiPJMP3mYVzU4x0q00WL4uwB28GYuWZImJw98Gad9w/X6 X-Google-Smtp-Source: AGHT+IFuCh6lrJBlL0Zv5z/L2SKHN7JaP+FHXxM097XKWC0yP10vqIpD6MZo7OPVpCKgZCk622wV X-Received: by 2002:a05:6102:c8f:b0:46e:d972:e39c with SMTP id f15-20020a0561020c8f00b0046ed972e39cmr3074883vst.25.1708020323792; Thu, 15 Feb 2024 10:05:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020323; cv=none; d=google.com; s=arc-20160816; b=M1AIoASlTB7qiMFQWeVXZstlcvHhx5ESNwqRnuoUjwoW/s82P2gK28r7YnoKjpFQFB W66vVD+hnfYRPYUVejF5WguR6VjaI+VTCHIG/JNBMuW3wARFrKjQTBkD32Acf8jIeYhl DZknftfm4PVo2rPdHGWFF9Tb2T0EVZ0LrpHKVQ2nDpRRxtfC3cVIvCe5WAMad31SSPz/ mPLZ1IPDKEiLXQ+mjM5NRc5uaDeuiJU/T9WeG0DDXuD1kKoRYkDyBKBGbmZaNGNfwCVC U4I+OnMRlDdaE7q02AfIWtYR1j2UTzIlngP/Z3rwcDN8mtYaD+NyKIGPg520VxH7Nu1M Wxqg== 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=9jS+9vp6/zBeUdjn9j7q2jb24zwJ4YAirnAR4bT5ORs=; fh=EP2aAwzD7ulcRjKUeDfIlVi6IpfQt9319LuAFyd8WJg=; b=ljtqug1Bus/jrOXYFOrAVMoZQ5LTStB2pI/3ndYPD8TgVMoU8bxmWEikB6fl6WSCN7 N5prZ1KUE2rXr3s3j9sFJlWw1h/FxsTR0EUr1WT4+YBksrZPTRRbSrmjOzW2orft/m5x 5rPwXMoSzJ34V9enGyUnlD3GFohPWV+uFQgWvBycMBosuucWbIP/jCbOHrQf+E1SiAxL te3fknmI1Lmt597Fg76yQaW1B5bTGmSBLJkCpkZP/BdaeZ4WGC0hMlTb+MBG+Y2kH1dz n0zteMlGOX7B3CjlSldd0D6gWXThvYGzm3z6+doKkYW/utC/m2AjG5kZDP2KeZB0NEP4 8lwA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fPWoS6An; 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 dd8-20020a056102568800b0047018a0822bsi357233vsb.554.2024.02.15.10.05.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:05:23 -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=fPWoS6An; 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 1rag2O-0000Wp-Cj; Thu, 15 Feb 2024 13:00:44 -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 1rag26-00005A-Lg for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:30 -0500 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag20-0002Dy-SI for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:23 -0500 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a3c1a6c10bbso148263066b.3 for ; Thu, 15 Feb 2024 10:00:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020019; x=1708624819; 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=9jS+9vp6/zBeUdjn9j7q2jb24zwJ4YAirnAR4bT5ORs=; b=fPWoS6AnkQX2JTFUYhgQplZi8YIj2apSlqRRgo5MU8Gyn91qhFWeW7UcuMJt9cd2iI i74EiJb+4vpZc+RcYAPJmarNUWyB0xv08rbuD/iUujq2bb0VI1f+xrz/IMgsbb33gr/5 TK8HVN74MCJ093RYlURpC0T52puRQKT29cEjUhrQl2Z/Nb+/fihAILhbeSeGzbt4ZoPF W+QOpWi/5RvcmFvZgn6rWdXN0bSZUewp8Ei1cqMcakHgH6uQWB/wnBKmuhK2I1mlfhAc Tqg5oJq2GukvmDBfAjZmFwDIAs4gj1607qZPIajmPdSYhqoMuq97j/h8Gp+oNYiecdXm C/BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020019; x=1708624819; 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=9jS+9vp6/zBeUdjn9j7q2jb24zwJ4YAirnAR4bT5ORs=; b=T/0EwzxiL+bFuSnfUtYOzhEpI6N9ToklrpHx3aNyZmcFEXPSWBQwDRDj6VL1oHsFVx d5Y/DaQrSQM8eLwTB5Hpnm7Kx30RX78XTpwAzJtwkW2zr04YrNRdHBD6ALu9c5byzNXM UqkQXQXazqUpopaJNXnHlM2yezxHBffKe+M6JctUV9x8MJWE+XajNf8EMuPkHPoIG8jG 80hWAVLxE3BBF8WEwkkT1632MaYk//k3Bf8DwuC1HN/3e5uz5mZGtvgDOm5oFe9wpluz EplsOjY1V5bDB4xcUOLUtd0xYvB/5PMcRlFWYXy2ItmqmCRFUyWjYrobCJqPJkKJ9H4e xiaw== X-Gm-Message-State: AOJu0YzLeX0jvUa6B3aDomW3NInfYwxJ9LXxI1+9p2Uq9937WujsVJ1s AkM8GPWhKNL22NNyoCE12jLqYByG7UgjW+UCZyeIewL1/Ga6aEHZpRH0q2LfG+7vjSP+tvRuI7C Ihgs= X-Received: by 2002:a17:906:4544:b0:a3d:abd1:6909 with SMTP id s4-20020a170906454400b00a3dabd16909mr1221760ejq.1.1708020018932; Thu, 15 Feb 2024 10:00:18 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id pj7-20020a170906d78700b00a3d1b41bb48sm787064ejb.130.2024.02.15.10.00.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:00:18 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Damien Hedde , BALATON Zoltan , Richard Henderson , "Michael S. Tsirkin" , Marcel Apfelbaum , Paolo Bonzini , Eduardo Habkost Subject: [PULL 22/56] hw/i386/q35: Realize LPC PCI function before accessing it Date: Thu, 15 Feb 2024 18:57:16 +0100 Message-ID: <20240215175752.82828-23-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=philmd@linaro.org; helo=mail-ej1-x633.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=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 We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Damien Hedde Reviewed-by: BALATON Zoltan Reviewed-by: Richard Henderson Message-Id: <20240213130341.1793-5-philmd@linaro.org> --- hw/i386/pc_q35.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 7ca3f465e0..b7c69d55d6 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -248,13 +248,13 @@ static void pc_q35_init(MachineState *machine) /* create ISA bus */ lpc = pci_new_multifunction(PCI_DEVFN(ICH9_LPC_DEV, ICH9_LPC_FUNC), TYPE_ICH9_LPC_DEVICE); - qdev_prop_set_bit(DEVICE(lpc), "smm-enabled", - x86_machine_is_smm_enabled(x86ms)); lpc_dev = DEVICE(lpc); + qdev_prop_set_bit(lpc_dev, "smm-enabled", + x86_machine_is_smm_enabled(x86ms)); + pci_realize_and_unref(lpc, host_bus, &error_fatal); for (i = 0; i < IOAPIC_NUM_PINS; i++) { qdev_connect_gpio_out_named(lpc_dev, ICH9_GPIO_GSI, i, x86ms->gsi[i]); } - pci_realize_and_unref(lpc, host_bus, &error_fatal); rtc_state = ISA_DEVICE(object_resolve_path_component(OBJECT(lpc), "rtc")); From patchwork Thu Feb 15 17:57:17 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: 772965 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp966184wre; Thu, 15 Feb 2024 10:03:56 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUjTYBBe9IjQPCGjMX76ojEo11tYOj5XBf2Hv+yCJ3HD5/j4uUeRuj7ce1r8RZIzoRglL1CeElvg27snd9dp43R X-Google-Smtp-Source: AGHT+IEQEa7N+0OUkBwq7cnAacSM93cdt0YEds0j4QUlBlnDJeqYGnUt+ImU9ZPUpKxaMI+ZGvaf X-Received: by 2002:a05:620a:572:b0:785:c7e6:3be5 with SMTP id p18-20020a05620a057200b00785c7e63be5mr2406756qkp.53.1708020236270; Thu, 15 Feb 2024 10:03:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020236; cv=none; d=google.com; s=arc-20160816; b=TUjXk8DbS8ElXPhSiDMpNcOQACPmPAKotfZS2AtBamfiIhbj0biqSFrdqvUcnI9OB4 duvNT1vceZtev7+p41AvTd0yGfCdgix7xXemQUjvrjHUYpI9yRzZN3ckaLbNSQed7cgI qLY9p/7rEuDqNOO3yzjFfhgRO1FcWyE+sQ0C5R76qyRuckDGbMTuaC11OYVmIiwzHxuP y4+N+nrA0aa12kMdWXsY/8aRdHBf5h0M4u8MD36SDqWuwRPLM7iIaI0xoCjw6mO0hBjk X2Thcn4APtLeWgbO70nNT/mFNgF3/sqK4ADa/AYUb8kuUT93s/8hp1GZhR+tvLkRS2+G vPZQ== 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=xZUd6/1kYGen5lB4knuCMVyKmswwesM/uAr4O9mJTQg=; fh=uhqcddVP/QtwGuF7loBHzLylvHL3XamZwGBLUgsC7tI=; b=D4eQ3reY1nr++MzmgAaxm4qZsNSFkeckdojIbBCcYMNGYmo0V1V98+XWJhTSVUf0zP R6hKiiOlDNKy47NG/GFXXNJbElX9iW4oRyu97V3KtJ/+2ZZdAYDoqSlFnlHVjvrZSGPO C01BK9S1b0rJetPgvz4sYMf9aMGKhcVyl2eo8DpVBWTX0lkm91pg68yMw3zD8OYymqUD L83KCN2GpeVmMS4gPVITUyRl2uzbLsTUI3IKXHaw/xbuGhwZfURTREIc9Od9WR5LY2Lj /HhjvxUJf12o6VA7Tumt/7qqBuIigaAjvrK2LR3j9jazWonfZW+cAMIOCXQoaf723FRx 2fUA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SA8G65Y5; 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 d6-20020a67ec06000000b0046b34ae6114si324865vso.795.2024.02.15.10.03.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:03:55 -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=SA8G65Y5; 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 1rag2W-0001Xh-GK; Thu, 15 Feb 2024 13:00:52 -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 1rag2N-0000NS-Fq for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:43 -0500 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag28-0002GS-9K for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:42 -0500 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-55ee686b5d5so1531361a12.0 for ; Thu, 15 Feb 2024 10:00:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020026; x=1708624826; 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=xZUd6/1kYGen5lB4knuCMVyKmswwesM/uAr4O9mJTQg=; b=SA8G65Y56wRAXmO8A3ICXug6xEnHY33sCFEVViJl38c0ble3TU4JxypZw23y6zocIX 4WIttb148q42pR/nJ+J4Vmi11lLEqdDU++ZypVvkpMdb0IC6qWrRXNALRnJOsTjLVrUH sMxTDw0XPkTYOOGt9KHlhrxf+jgZQk15wqZ5ojyuf3x0v39EzlL7fqkPv2Lps8FABWRS 1slz8/7wxgZXXf0fw/qSUe+0q85d9Y5NDM8TnA+r9BzXRElOcsKgRLrJ0UYO7rmm6Kwj YYN3vz0xpSEykW2rc77yTGiiBuEFgbARdNHP5Mc9M15yC/7wWmDMFWf9PifAmfAegSmo hb+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020026; x=1708624826; 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=xZUd6/1kYGen5lB4knuCMVyKmswwesM/uAr4O9mJTQg=; b=kL/JYaC2CScRyercQZsYf8GMQlC7Rtna2YjsQvxCVPFM7bRjJMpFAjttdo8gaJoEZv y6to4ny5+ZLc3pWCZ3Q1bfCiRyeOmLaiEWZNTvJkOvuoGLd3hZbLYS1mh+Ftv+O2py65 uEbdT4BeM10HLPFfEWrOe7fVH3/vJkXz6ZtBsQ1sXrKVHmI+FuWQ+K1mrtUZ1F1qB8Fj IlQE7PPYF65u0Chhb80sEdIqPdzJoJ6lFpvTWRwK4zR1ApiKguHM7jYv6xvptMz1Jfxy WlGVt6DiChjPgMdoz52dMsdoor3ScW8wx68QWVRrnEFIvg5Bsiaz7ctOPCZVhq7zafXE 7P5g== X-Gm-Message-State: AOJu0YyumqnziS/iEP4PbIJTUrive/F5MBVHmhnnMloF65uztgEVLTW2 esYXHE8TAvpkiuJUotHuBCaj+eR17kJVEndvSAdhyfEtsJWO9bD5TkOecd22Q4ObePEOR04PrLt 4L8k= X-Received: by 2002:a17:906:eb4a:b0:a3d:302e:268 with SMTP id mc10-20020a170906eb4a00b00a3d302e0268mr2001781ejb.45.1708020026223; Thu, 15 Feb 2024 10:00:26 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id t21-20020a1709060c5500b00a3d29f0afeasm782742ejf.2.2024.02.15.10.00.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:00:25 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Mark Cave-Ayland , Richard Henderson , =?utf-8?q?Herv=C3=A9_Pous?= =?utf-8?q?sineau?= Subject: [PULL 23/56] hw/ppc/prep: Realize ISA bridge before accessing it Date: Thu, 15 Feb 2024 18:57:17 +0100 Message-ID: <20240215175752.82828-24-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=philmd@linaro.org; helo=mail-ed1-x533.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Mark Cave-Ayland Reviewed-by: Richard Henderson Message-Id: <20240213130341.1793-6-philmd@linaro.org> --- hw/ppc/prep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 1a6cd05c61..4eb5477069 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -278,9 +278,9 @@ static void ibm_40p_init(MachineState *machine) /* PCI -> ISA bridge */ i82378_dev = DEVICE(pci_new(PCI_DEVFN(11, 0), "i82378")); + qdev_realize_and_unref(i82378_dev, BUS(pci_bus), &error_fatal); qdev_connect_gpio_out(i82378_dev, 0, qdev_get_gpio_in(DEVICE(cpu), PPC6xx_INPUT_INT)); - qdev_realize_and_unref(i82378_dev, BUS(pci_bus), &error_fatal); sysbus_connect_irq(pcihost, 0, qdev_get_gpio_in(i82378_dev, 15)); isa_bus = ISA_BUS(qdev_get_child_bus(i82378_dev, "isa.0")); From patchwork Thu Feb 15 17:57:18 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: 772987 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp967953wre; Thu, 15 Feb 2024 10:06:41 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWsQvz1rbp7SFBXFz2CTqch0yUcLiOecxkggCoLvOWWf21EVXFGTszCXkkXHBoUsDEaHWLdCkmzW++OV+jrNmON X-Google-Smtp-Source: AGHT+IG/r6IfawjyoDLO1UpnAnFBVbbeVxSrz/U84HmkYuyRKJTqahorQ60An34Xc3gZy6/hv5/E X-Received: by 2002:a1f:ea82:0:b0:4c0:2c31:f7ab with SMTP id i124-20020a1fea82000000b004c02c31f7abmr2517736vkh.11.1708020401549; Thu, 15 Feb 2024 10:06:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020401; cv=none; d=google.com; s=arc-20160816; b=KDGVBH66S5KAWsicfxSWxOCd1FaxPnHgMEozfYk44OlzDIwUHanYvDwq+idI61Dnz9 yTfNljDhYf4UKq2BaJLujusUt9E9yV18XGIkaA37oK3XkxUbfQ4pbukDvOLa5BGKMmyC jUCbwYuqvP3QZNXg5So7rK1bj8Y28Pf9xQB0SP5cFC6Od9JQhXuEBsdqJ2eDFz2ZDu// fL2Xwq14vrXH3ufd7H3NdPp0ThzRg0vQhyxMNlz94O5sB5MaZqdCBprIZPyC+m55c1Mw yPgIBzNZW8KGuiqC7D6vgiBytogLX0+35vV3EmmQ/zts8GQXaZ7nnS1UHrCTYy933CAm MRPw== 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=BXfzEOj0hY/4x5MiiqGGaWqtsIu6euoUBioh29pYX9I=; fh=pN+nSQ21JDCG2fuiyFl1gwROpFeVZbiMACONSGg/7n8=; b=ChuSEebRhthZM+ZB0e6yrvdEVzqiiX0htnyqkma6u6GOgS4ZANBuysECKDjpyPhi32 m5anmU4Uc5juJvVHHesoxQiq4yQaxrlgntOSMnE7ywuYcfGQ+UkofPbLhjAwZIRN53Tn KXY7QYEHvgdRlTq2u0MST47XgwtwbOdbArcmKH/xDUFPh6zjjmYAQKhhoKxOSpL7Q+0E qe/kFos+S6SwRicThclx7rruBuVAJ8CTQFifpfGmx4U5iHam1Lb+4ssPrSMsSmWDWEtu RlsHk2cpXWhJWBWPhAq7BR+TX6HBUbNWNqvhaptT8TLjZmWwnGFT7deF805ezNeYfrf/ 6BKQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xHbrDOkq; 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 gg17-20020a0561221d9100b004b4bc97d03fsi447477vkb.247.2024.02.15.10.06.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:06:41 -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=xHbrDOkq; 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 1rag2R-0000x2-Uv; Thu, 15 Feb 2024 13:00:48 -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 1rag2K-00007t-PP for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:41 -0500 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag2F-0002IQ-Vi for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:39 -0500 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5600c43caddso1403496a12.2 for ; Thu, 15 Feb 2024 10:00:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020034; x=1708624834; 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=BXfzEOj0hY/4x5MiiqGGaWqtsIu6euoUBioh29pYX9I=; b=xHbrDOkqODeWueV0VkFu97pTrV6wGWnI+WNPWo64qHXEcDBlG8mxeTKsixoglCKYld IIYLiaQAgXwSRYIrWLNHdtEaTTcyjlN/ZYEaMzC5dh7LCJEBn5csR3gULM9o00K5cB9B wcp1OlyACoAwOj3MUS54PZUhUzzMLYIJUnCADp8hdPq4cc1Wb3Ag4X3/6pNYpSDHIbm+ lnGCfKSP+pZBOhfP7KnWy5RfOc5DhLJt43Z1MuM8X8Jmfx16OrlC8X6o5s//9/l4aoGv paoprbcHKLiX+sfC8g0o34r/AszSCv4ZUdEv0lKIwBU7EddD5U1b985PphsSq0DXmEma FFWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020034; x=1708624834; 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=BXfzEOj0hY/4x5MiiqGGaWqtsIu6euoUBioh29pYX9I=; b=KzCV8eVGp9tmAMAAKt/zKbCzkbe0lzwA3EAE1KEmImxbhK5JJeH+e6qGeCDWl7Vd9N KEnTfQ9lAnNx3kQbTealCuHIv5bVUPZ8v/o9Blrv/cuVlbQCMHDEHrZDQRDICYwFUKsC 6h8pfy1F11wfLyEZxGAK9liceCegpEpOKcS9MnFEtXOnA0OvyEL8o5mivYyVH47ktq9r n/3I6Qu7Fi8zdXDgML8GO87Z5+ztkuCklgcuXSEMdW9rUJqdUmWOj2NoHrTHvGRfi/7m iTEfoEJpejyl+RQJ635sIHTxfYPnGn8fGNYZYz/ydVV9QmMwuQgIizgfaDrEaWgOo+sH fdyQ== X-Gm-Message-State: AOJu0YylHqkVFgCKSo66sbFHFPYK0g3lFMQEocdxxu7OOxPsBY1jDbFy lm6eGOX8IwFgsa4xz0xjgvBh1c7cu+vlEK3zNufvgLIl2LV0rdjaGAxKJPep5w7GHMq05ugJsH/ pda8= X-Received: by 2002:a17:906:b0d9:b0:a3d:2243:29da with SMTP id bk25-20020a170906b0d900b00a3d224329damr1812382ejb.36.1708020033980; Thu, 15 Feb 2024 10:00:33 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id a7-20020a170906670700b00a3d2d81daafsm791088ejp.172.2024.02.15.10.00.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:00:32 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mark Cave-Ayland , BALATON Zoltan , Richard Henderson Subject: [PULL 24/56] hw/misc/macio: Realize IDE controller before accessing it Date: Thu, 15 Feb 2024 18:57:18 +0100 Message-ID: <20240215175752.82828-25-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=philmd@linaro.org; helo=mail-ed1-x52c.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=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 We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Reviewed-by: BALATON Zoltan Reviewed-by: Richard Henderson Message-Id: <20240213130341.1793-7-philmd@linaro.org> --- hw/misc/macio/macio.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c index c9f22f8515..3f449f91c0 100644 --- a/hw/misc/macio/macio.c +++ b/hw/misc/macio/macio.c @@ -123,14 +123,17 @@ static bool macio_realize_ide(MacIOState *s, MACIOIDEState *ide, { SysBusDevice *sbd = SYS_BUS_DEVICE(ide); - sysbus_connect_irq(sbd, 0, irq0); - sysbus_connect_irq(sbd, 1, irq1); qdev_prop_set_uint32(DEVICE(ide), "channel", dmaid); object_property_set_link(OBJECT(ide), "dbdma", OBJECT(&s->dbdma), &error_abort); macio_ide_register_dma(ide); + if (!qdev_realize(DEVICE(ide), BUS(&s->macio_bus), errp)) { + return false; + } + sysbus_connect_irq(sbd, 0, irq0); + sysbus_connect_irq(sbd, 1, irq1); - return qdev_realize(DEVICE(ide), BUS(&s->macio_bus), errp); + return true; } static void macio_oldworld_realize(PCIDevice *d, Error **errp) From patchwork Thu Feb 15 17:57:19 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: 772983 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp967688wre; Thu, 15 Feb 2024 10:06:13 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXqXAOLdAhTrJ4zTtCK6ruajs4ClvJvyeNlWXv+FCGkZzu7o5HUlaWUp30W//qfPLr5TXjd9yJqUyuLoVyNTv/n X-Google-Smtp-Source: AGHT+IGuYwJlt/XIk0FvG3k274AKBmkR2Q+QDxXW9hvFYtcDlEiLVoGWPdDRbtRoA2WgplOhEr/K X-Received: by 2002:a05:6808:2f08:b0:3c1:3461:9bcf with SMTP id gu8-20020a0568082f0800b003c134619bcfmr5264228oib.4.1708020373334; Thu, 15 Feb 2024 10:06:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020373; cv=none; d=google.com; s=arc-20160816; b=ZA5VOb3R6fGV9xlyZvFuFMKlS0twAEAM2fa6rZiDN57L3raF/kLI545ytKs8+jMHiU cVzfzPnVHAAqANKwsaNYLzdfKwQVRNvFDQPr/22JgJ+sze0Bujdfemwc3H4MF36Fsv++ P6nlIXoh0RnGg3KKPFUaEltuUZ+T2rHeXOxO/ZZahAe34EQ+ksud6P3rsY3bA23Fekt7 DoLFqg8TbjhTpKvy3bpcXGogzV6KVmWs/QnI4oWew6c+t/IWbVrqKn7DWnJ/6y+P9Du+ hCwPqtCO1wGX8rp+xIq8MugVq0zBxGZTyrTn4vWOdvUxvgQ3L97kiRpmlQnNBPohtIb3 sxeg== 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=MdETzWg8sMtllnYJcpe7xJU6Mgoke/FLcBGSchABTcY=; fh=/5Hu6zwp+Ls/CcPL0R55EtYtOnqbfBUbGGNMrqKF/C0=; b=EcAIbIdCmv88XtLAW9o0lhmQuyeFJM+J61I/I0HTWJGK59r2revPTb+EZweYSpidwt VjdhvOiPg4SD/NLC6j8zlJkGKyEHvUPRO8R6q3U0lGQMukZErORTXRyaW/1m4OkEDqtt p7yhSnTUlTwqB7/AzZ+eZeX7sd5oRLLCFg5F4trnve+kC8PWxUZX/GghRBHP32Lafx7E RfbxlNfPfQyObrPlv1GX3N7uLmPOkcQxio90oAD1tsvRNRdLX7Lii4W6fKokaauxtydI oR+bQRFnAt5WmD4PTXb0h+9PO0wJMQAweuENmimTdG1m7MNRX2di0O6/jDHrHqE+kn6Y SIPw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CTLvtPi1; 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 il28-20020a056130601c00b007d911e5400asi423351uab.189.2024.02.15.10.06.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:06:13 -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=CTLvtPi1; 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 1rag2U-0001Ed-Fb; Thu, 15 Feb 2024 13:00:50 -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 1rag2P-0000hA-8k for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:45 -0500 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag2N-0002Jx-If for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:44 -0500 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a2d7e2e7fe0so220771666b.1 for ; Thu, 15 Feb 2024 10:00:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020041; x=1708624841; 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=MdETzWg8sMtllnYJcpe7xJU6Mgoke/FLcBGSchABTcY=; b=CTLvtPi1TGn19RPnyO+PoX1Gsm1ioB9587tJsSDWrmc02ysB0ikZKow1xOyTAkGIem Cxdo9LdTFIujscwm57NCaYcOqm8fu1m68/wa5W6qe7WTfaaWCL/FUEhkCXNW8TooPtnr 6LncgT1wkksPYiwXNubkpAQNZkG9bwoyS05yi3HIf5Fygbms/kBXoGtOiLqs95ni5vmh Oxgb2SHoadUczkahuRBuNBpNr+j6Gft57tx1Ag8c/JRhhfvJhAC+Mi1tcAVBr4PfdKJP 1nt3xuwt2S0H0jUWn5JxuwtWqQ1CTxyV1Kj8V6F3ECDGIs+HzJ/0Oj6njscRmDScW3dc HKtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020041; x=1708624841; 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=MdETzWg8sMtllnYJcpe7xJU6Mgoke/FLcBGSchABTcY=; b=OpXIptzGoJbpL+MnKNuBD6YMiIjzQx37NBIZBH9FfZ5DRzUnwlWAk3LLNrTLY1XhhI CWLAW4U6ugUWjvKfhstXQDU2o9k1ij8sVDUq+Pd/EqmF64iQ3z1p8CPDsPIzmY+EsLXz VqhC8MwapuCV1ZjopVXGjrLW3KohipOhb1/MpLP649D40rc3TlNbGFWMS7U48euPDfhB gi6la5skiT0vJ9U1b1wKpU5rkJUqEx4xCfWhtIDhq4b5F8ohB8xniR8lKjd9ArbkGTQO rwkwW0ah8gcTAuHlPbg8r0URBKPhPVBKmpWQiGEWvmnFmbGIU4+c2FNI87uaCuksWkyq dwCA== X-Gm-Message-State: AOJu0YwQ4oud/0muAYka1pQ8xKdgeypyR9urKQDd5lIqDge7kIoDjKLN tRtu4A+2pfO6wwx03RHiYf8uoxgnYIpIB+RZ12pWPz5voVfi0cKjqKpa4VwtQrA4bYYxWeapoAp 6NRg= X-Received: by 2002:a17:907:6d0c:b0:a3d:37a4:809d with SMTP id sa12-20020a1709076d0c00b00a3d37a4809dmr6462232ejc.7.1708020041080; Thu, 15 Feb 2024 10:00:41 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id fj5-20020a1709069c8500b00a3d310a2684sm783255ejc.158.2024.02.15.10.00.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:00:40 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Yoshinori Sato , Richard Henderson , Magnus Damm Subject: [PULL 25/56] hw/sh4/r2d: Realize IDE controller before accessing it Date: Thu, 15 Feb 2024 18:57:19 +0100 Message-ID: <20240215175752.82828-26-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=philmd@linaro.org; helo=mail-ej1-x62f.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=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 We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Yoshinori Sato Reviewed-by: Richard Henderson Message-Id: <20240213130341.1793-8-philmd@linaro.org> --- hw/sh4/r2d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c index e9f316a6ce..c73e8f49b8 100644 --- a/hw/sh4/r2d.c +++ b/hw/sh4/r2d.c @@ -285,9 +285,9 @@ static void r2d_init(MachineState *machine) dinfo = drive_get(IF_IDE, 0, 0); dev = qdev_new("mmio-ide"); busdev = SYS_BUS_DEVICE(dev); - sysbus_connect_irq(busdev, 0, irq[CF_IDE]); qdev_prop_set_uint32(dev, "shift", 1); sysbus_realize_and_unref(busdev, &error_fatal); + sysbus_connect_irq(busdev, 0, irq[CF_IDE]); sysbus_mmio_map(busdev, 0, 0x14001000); sysbus_mmio_map(busdev, 1, 0x1400080c); mmio_ide_init_drives(dev, dinfo, NULL); From patchwork Thu Feb 15 17:57:20 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: 772979 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp967288wre; Thu, 15 Feb 2024 10:05:36 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWisnxM17PAwdPNfZ8aZk7y8SBwIdEDyXo5znChRx53F9OGWVNqxVN4zSt7wxXtRJLJdtXzmF+AEUG9HG4dlGyB X-Google-Smtp-Source: AGHT+IH0BZBIDU7iNBNMpl1+rMadxOKPvOWBBMvzKzrY/N9yDdjSUWd2T59/yIk5/HsQpZrOWbd3 X-Received: by 2002:a05:6870:b50c:b0:21d:ecb8:f736 with SMTP id v12-20020a056870b50c00b0021decb8f736mr3002203oap.53.1708020336602; Thu, 15 Feb 2024 10:05:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020336; cv=none; d=google.com; s=arc-20160816; b=JVkyoehHg5ikO1N83afiJ+NssYxPSrDbAUm52F7TSYk+d/xzZbNDvi9U9pt1xHhvmH /7ivNT5VFGatlCIexEetNUcxiVRPj9IkQwbCB90BDQ/an/zhf2ve2jpfE96+o/jJ7h5t XtcUMUjinnvjpn1nK0/EbjP2SokXN+MyPJd0YNBX17rVot/e4Evem8K5YWFy4ARvJeHZ OunVJvn/NWMC3ePDNgR9Gjz1YFCR/pasqDE4lKDeg5UqnN+Mj2vFkx/8b/Mpwgq87ec+ bNRvCbAXz8YK4/vChu9AtGjf87D0gO9qSzTY/maB1GzBU4KELElzG2MtAUMbrS6tp9xG txpA== 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=+ubSQX0s8XFIX39hOsqAJ21CHgufQEziwezWtT3SVxQ=; fh=YcA2VX68AXMHcMyDit5iEY5OAWPf/DfOFrzFQtRXLAk=; b=aTpuYIZbZnhcsJCzqXEhDi5oKKyUtLvH6ErP+sH7qQGy4EToONfLoS+pN0XY+l2t8R qhBLZz7Euy2r+ql0U5nrhTCzU7P9zu/NqMxth9kLjKTm9vS15BLuGSrZBMVeDyB/jdba ujpkj/8o92RpNzmTShDblafK7Sp+gq7FbNr3urO/ZYtXHT2lGU7Oxc0XouWY2znlINeM TkpdESzosNhEywNNIlCFh6CHMgAZRxfQgJjPFY9IIS5PgoN2ciCF3XwN76+2+0JRpZMI rekEMencJ/4ukKAj5s+3jaMytglkiP4mQKmCxhc7dEVL7LpRMlQJK3bMYC66ljTjLeIp HQIg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="NdyP/VV2"; 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 i17-20020a0561023d1100b0046d208aa017si402495vsv.677.2024.02.15.10.05.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:05:36 -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="NdyP/VV2"; 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 1rag2s-0002A6-60; Thu, 15 Feb 2024 13:01:14 -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 1rag2b-0001nM-Ha for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:59 -0500 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag2U-0002MH-K5 for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:57 -0500 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-55a5e7fa471so1614582a12.1 for ; Thu, 15 Feb 2024 10:00:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020048; x=1708624848; 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=+ubSQX0s8XFIX39hOsqAJ21CHgufQEziwezWtT3SVxQ=; b=NdyP/VV2u7egJYv8FmmbmbmB/X2HN2b4XDxhpCaag+Ng0hsxouIBLxagswdFXToxou 8lkDyt0/VDgzfC2EaUSj0pflzkirbaBG+9HHiP5gtyPvZMdZtuLA62TvR0HidW0/o1CT gEbL7IggrmXab2/mEN7sj6QEx/D8sHOcmRNwnq6SzfxGLOOL9BtTQJdZt5V9PNpD+VCA OkmrgyDqjtFwKiUgjHeuvnyuvy99wfl+JWA2UJ3negeU6PywE8pxlJDZUMPisVDs8klI +3PcH9PrHJNluQgUeJ31IuJgWAJJ/kOauU1m+WRvSpRZPbTOmtqVvIdOkULTwRYz3AeK 3ppQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020048; x=1708624848; 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=+ubSQX0s8XFIX39hOsqAJ21CHgufQEziwezWtT3SVxQ=; b=jGmr4hDf8BYgAVUeXgrGNVY6KUsyaRJ2908Lv86dt96vxlpNRk5GTAgjLGfpPn7GpD OqHXgKd3negThsf+3FaKiiNRbc4QBomSj469NeiSSZ1DbuWXDo4TPSOpthUIDRxwFs2i DXHRFiQdUQ5vFjGw2O9eFMYAZPhamDstcPUE97n5lauxuIYaC3YYVhqvEk3V20Ce7RBy Wo8s1OqHObQs7ONhTq4On7rfkmMFtOfgZlzuHDjgjb6Ox5UDvRQQi8WdAawltzeFjZ7Y wEJ5Q6tpp0U+q1TTurtna/E1hJicU+Z7yUO4eHyk/ZFaxLVfQrbBAwwCE/CuKEXieZQl MD6w== X-Gm-Message-State: AOJu0YweE+IPV6UlwQl6SCQjPer/0GE9q4Z0JpzrzB/Ns180xc2sci83 kSg0Vt3W7Ak9Qc8uSM3a7atg5vY7RUPfSOKRNfxjCc8c4WzU8LzJQfhMJCYIyGrvFsiHevBwsfN G2aU= X-Received: by 2002:aa7:d38e:0:b0:562:f25:b125 with SMTP id x14-20020aa7d38e000000b005620f25b125mr1825343edq.36.1708020048674; Thu, 15 Feb 2024 10:00:48 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id fg8-20020a056402548800b00562ee409ea0sm740914edb.62.2024.02.15.10.00.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:00:48 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , =?utf-8?q?Herv=C3=A9_Pous?= =?utf-8?q?sineau?= , "Michael S. Tsirkin" , Paolo Bonzini , Eduardo Habkost , Marcel Apfelbaum , Aurelien Jarno , BALATON Zoltan , Jiaxun Yang , Aleksandar Rikalo Subject: [PULL 26/56] hw/dma: Pass parent object to i8257_dma_init() Date: Thu, 15 Feb 2024 18:57:20 +0100 Message-ID: <20240215175752.82828-27-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=philmd@linaro.org; helo=mail-ed1-x52a.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=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 Set I8257 instances parent (migration isn't affected). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240213114426.87836-1-philmd@linaro.org> --- include/hw/dma/i8257.h | 2 +- hw/dma/i82374.c | 2 +- hw/dma/i8257.c | 4 +++- hw/i386/pc_piix.c | 2 +- hw/isa/lpc_ich9.c | 2 +- hw/isa/piix.c | 2 +- hw/isa/vt82c686.c | 2 +- hw/mips/jazz.c | 2 +- 8 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/hw/dma/i8257.h b/include/hw/dma/i8257.h index f652345d65..4342e4a91e 100644 --- a/include/hw/dma/i8257.h +++ b/include/hw/dma/i8257.h @@ -45,6 +45,6 @@ struct I8257State { PortioList portio_pageh; }; -void i8257_dma_init(ISABus *bus, bool high_page_enable); +void i8257_dma_init(Object *parent, ISABus *bus, bool high_page_enable); #endif diff --git a/hw/dma/i82374.c b/hw/dma/i82374.c index f6ddfc51c5..e72aa2e1ce 100644 --- a/hw/dma/i82374.c +++ b/hw/dma/i82374.c @@ -129,7 +129,7 @@ static void i82374_realize(DeviceState *dev, Error **errp) error_setg(errp, "DMA already initialized on ISA bus"); return; } - i8257_dma_init(isa_bus, true); + i8257_dma_init(OBJECT(dev), isa_bus, true); portio_list_init(&s->port_list, OBJECT(s), i82374_portio_list, s, "i82374"); diff --git a/hw/dma/i8257.c b/hw/dma/i8257.c index de1d5b110c..24a54ca272 100644 --- a/hw/dma/i8257.c +++ b/hw/dma/i8257.c @@ -632,12 +632,13 @@ static void i8257_register_types(void) type_init(i8257_register_types) -void i8257_dma_init(ISABus *bus, bool high_page_enable) +void i8257_dma_init(Object *parent, ISABus *bus, bool high_page_enable) { ISADevice *isa1, *isa2; DeviceState *d; isa1 = isa_new(TYPE_I8257); + object_property_add_child(parent, "dma[*]", OBJECT(isa1)); d = DEVICE(isa1); qdev_prop_set_int32(d, "base", 0x00); qdev_prop_set_int32(d, "page-base", 0x80); @@ -646,6 +647,7 @@ void i8257_dma_init(ISABus *bus, bool high_page_enable) isa_realize_and_unref(isa1, bus, &error_fatal); isa2 = isa_new(TYPE_I8257); + object_property_add_child(parent, "dma[*]", OBJECT(isa2)); d = DEVICE(isa2); qdev_prop_set_int32(d, "base", 0xc0); qdev_prop_set_int32(d, "page-base", 0x88); diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 70d12bb1b5..999b7b806c 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -310,7 +310,7 @@ static void pc_init1(MachineState *machine, qdev_prop_set_int32(DEVICE(rtc_state), "base_year", 2000); isa_realize_and_unref(rtc_state, isa_bus, &error_fatal); - i8257_dma_init(isa_bus, 0); + i8257_dma_init(OBJECT(machine), isa_bus, 0); pcms->hpet_enabled = false; idebus[0] = NULL; idebus[1] = NULL; diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index 3924eec483..70c6e8a093 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -739,7 +739,7 @@ static void ich9_lpc_realize(PCIDevice *d, Error **errp) isa_bus_register_input_irqs(isa_bus, lpc->gsi); - i8257_dma_init(isa_bus, 0); + i8257_dma_init(OBJECT(d), isa_bus, 0); /* RTC */ qdev_prop_set_int32(DEVICE(&lpc->rtc), "base_year", 2000); diff --git a/hw/isa/piix.c b/hw/isa/piix.c index 344bf32e54..2d30711b17 100644 --- a/hw/isa/piix.c +++ b/hw/isa/piix.c @@ -336,7 +336,7 @@ static void pci_piix_realize(PCIDevice *dev, const char *uhci_type, i8254_pit_init(isa_bus, 0x40, 0, NULL); } - i8257_dma_init(isa_bus, 0); + i8257_dma_init(OBJECT(dev), isa_bus, 0); /* RTC */ qdev_prop_set_int32(DEVICE(&d->rtc), "base_year", 2000); diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 0c504de36e..aa91942745 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -731,7 +731,7 @@ static void via_isa_realize(PCIDevice *d, Error **errp) s->isa_irqs_in = i8259_init(isa_bus, *isa_irq); isa_bus_register_input_irqs(isa_bus, s->isa_irqs_in); i8254_pit_init(isa_bus, 0x40, 0, NULL); - i8257_dma_init(isa_bus, 0); + i8257_dma_init(OBJECT(d), isa_bus, 0); /* RTC */ qdev_prop_set_int32(DEVICE(&s->rtc), "base_year", 2000); diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c index 5bf3e328db..1bc17e69d3 100644 --- a/hw/mips/jazz.c +++ b/hw/mips/jazz.c @@ -289,7 +289,7 @@ static void mips_jazz_init(MachineState *machine, /* ISA devices */ i8259 = i8259_init(isa_bus, env->irq[4]); isa_bus_register_input_irqs(isa_bus, i8259); - i8257_dma_init(isa_bus, 0); + i8257_dma_init(OBJECT(rc4030), isa_bus, 0); pit = i8254_pit_init(isa_bus, 0x40, 0, NULL); pcspk = isa_new(TYPE_PC_SPEAKER); object_property_set_link(OBJECT(pcspk), "pit", OBJECT(pit), &error_fatal); From patchwork Thu Feb 15 17:57:21 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: 772974 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp967013wre; Thu, 15 Feb 2024 10:05:15 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU9EeRgUMsdxFkY4OuBvM/TPdEgLxtQkPujtwsHUGkpmFRLVKbBfgyunadcHluanMNKFlO/UmX4SCafdhioULmd X-Google-Smtp-Source: AGHT+IFbYVWi6swrdIb+bvCKHHTU2WAOfwJu+AaTDyXFezokYG7irpAJxR3or+HaaheUayx59w/v X-Received: by 2002:a67:f793:0:b0:46d:3664:2078 with SMTP id j19-20020a67f793000000b0046d36642078mr2650056vso.8.1708020314793; Thu, 15 Feb 2024 10:05:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020314; cv=none; d=google.com; s=arc-20160816; b=nrDMy/I5VempkZDxflNV71V8sJf/gbkujjMLpoJWhYSbPYoLjPYlFOFjAdfxHF5FRo oz6ynj5e6cwHItVXQzoExxJSCwBF+EyXCX4y0cPXoFIuung52msBzsFAnAdGDFqqXLQ0 2IhH/YV4GGgSoyO81REM3mj1ZAUduRUorKCfHGlrSUk+zedOsZfx+nnLDCNaF6Id2ydo HZju4x9/YeevM5b11tx4NKGx+B15B2DAEW8tjg2zn+fH3q1Kxc+1oQmG+3nSQmjlr8m+ 70TFOknCswmEwWEW05RVLNnbOxVAyXD6EsHc9CRnX6tPUub5IcUvpW/6p9oSuITYOL1L CXmQ== 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=wCixPc5ejXKwZhVB9bkkxqa2YbnJN4g2k4IE6KKAtos=; fh=6/NvOlIBh5PZAPLle3UzPC+cO9TyEShpppeOtP3koCI=; b=jwi4B80DkDvRxil5XeibvcvboN2IMsnmS2BhEmFjp9sSZa/Gn6Laxt+f+x33dqFxQZ UmHOpHvcb4rqPtyZpZBz3e+mcW+VFwHiXSFjWPRlfSJK7sHjQN4MQYuYQyEQ+SwuDX24 dcteN0jY4GPmBB8fdHfUJA4X/Cu67Fm803/qgZpCuVyqdSgqTS7jENZiTI3da3NUstbG 9HL8j70KmFqJGfh3n1tRW1Bus3x1CLqlRKuYYqGNm8s7tU15H3FAdUKtpVPTYYBeHOe8 J9pOaO92l1C/WwzcAwA4K2nIHcCScXCPc9rocr6zdLbnZSxmeU8xR1iOeUgfikh3f2fh dZYw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lLWAjgXK; 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 j17-20020a056102335100b00466e947f46asi431019vse.78.2024.02.15.10.05.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:05:14 -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=lLWAjgXK; 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 1rag2q-000292-Tq; Thu, 15 Feb 2024 13:01:13 -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 1rag2d-0001qa-Ic for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:01:03 -0500 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag2b-0002NV-9M for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:59 -0500 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-563d32ee33aso389800a12.2 for ; Thu, 15 Feb 2024 10:00:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020055; x=1708624855; 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=wCixPc5ejXKwZhVB9bkkxqa2YbnJN4g2k4IE6KKAtos=; b=lLWAjgXK22LykSCnqz+Y+qSbXQTrmuACIeHqtsiTCmPPjbeufEaNFzBokhVhkXRUnO Y34zX95dSc46+VZpEOAi7xQAlEFT71KdXTu7ydNsrIxwOwUBAnYR9Z88T5CCrkL013xa 09yZgPNfWV1hEwRLjVXTi/PIygdcfUYWi5U6K7OOxLHwD6gc5jgVGZA8SCA2Q9BSG0bc /dxA0aQ5+j2V7gl1STx5den4B340pmfoxM4K4s0s/KONWeWL+R0NYrJFceZaIAMnKwMw s/5M7Tev8dKnz8bYSMWTIOE/BRcfW/edOjosQ9WQofkB2QI6/jj7qR3UrThJCphUEHSX evIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020055; x=1708624855; 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=wCixPc5ejXKwZhVB9bkkxqa2YbnJN4g2k4IE6KKAtos=; b=X5cVgKj6lUtT4c82Eqz03/yYNX1XIGUs8sYg41V0yHuLsaFMc0xCJ0oAMq3t+qC50J ojQbrDbW+Pd8Bp+vH5BUTBGZfHIU9upv0pyeEpd0CDSsr+DhgmvfNY0Mocunr4fRMfF2 O2qe5QkUJL21oqGLmrfrbDZAQ69LvUc8bkem043dQdUiwFt5t+sWsPydnewZQNOxFKXd FBt1H/c9GTXmJN0DpeQe9yBXmUociET/pac9wvFwqySkmWQnIhYG1/aw2tCmRO3pUf+i U46hXxera6Qv+JXpO/oitFnjFwBUzzhXcbWltsjf9E0TENc59QBGIfswKmHZZ5dr2TDy 5PqQ== X-Gm-Message-State: AOJu0YzJLNQwxJ00d6eniSvpT/VftSeT+9H7uHMG/dbL4UKtA+tPkyxr FnkzJdqSUds5FAYS4XEGO/n5ClGG6W0Jdv1lm7Nu4QtJp+xB2+zBo+SKooycr+4q2kcG9EpkJXi zbqo= X-Received: by 2002:aa7:cfc7:0:b0:561:51a0:2e07 with SMTP id r7-20020aa7cfc7000000b0056151a02e07mr1803461edy.26.1708020055331; Thu, 15 Feb 2024 10:00:55 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id g6-20020aa7c586000000b005619eea3d52sm754712edq.8.2024.02.15.10.00.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:00:54 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Mark Cave-Ayland , Richard Henderson , Artyom Tarasenko Subject: [PULL 27/56] hw/sparc/sun4m: Realize DMA controller before accessing it Date: Thu, 15 Feb 2024 18:57:21 +0100 Message-ID: <20240215175752.82828-28-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=philmd@linaro.org; helo=mail-ed1-x532.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=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 We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Mark Cave-Ayland Reviewed-by: Richard Henderson Message-Id: <20240213130341.1793-9-philmd@linaro.org> --- hw/sparc/sun4m.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index e782c8ec7a..d52e6a7213 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -312,13 +312,11 @@ static void *sparc32_dma_init(hwaddr dma_base, dma = qdev_new(TYPE_SPARC32_DMA); espdma = SPARC32_ESPDMA_DEVICE(object_resolve_path_component( OBJECT(dma), "espdma")); - sysbus_connect_irq(SYS_BUS_DEVICE(espdma), 0, espdma_irq); esp = SYSBUS_ESP(object_resolve_path_component(OBJECT(espdma), "esp")); ledma = SPARC32_LEDMA_DEVICE(object_resolve_path_component( OBJECT(dma), "ledma")); - sysbus_connect_irq(SYS_BUS_DEVICE(ledma), 0, ledma_irq); lance = SYSBUS_PCNET(object_resolve_path_component( OBJECT(ledma), "lance")); @@ -332,6 +330,11 @@ static void *sparc32_dma_init(hwaddr dma_base, } sysbus_realize_and_unref(SYS_BUS_DEVICE(dma), &error_fatal); + + sysbus_connect_irq(SYS_BUS_DEVICE(espdma), 0, espdma_irq); + + sysbus_connect_irq(SYS_BUS_DEVICE(ledma), 0, ledma_irq); + sysbus_mmio_map(SYS_BUS_DEVICE(dma), 0, dma_base); sysbus_mmio_map(SYS_BUS_DEVICE(esp), 0, esp_base); From patchwork Thu Feb 15 17:57:22 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: 772960 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp965319wre; Thu, 15 Feb 2024 10:02:37 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX0DryinQKKD0t1jnX70oqujRFqGs+Cp12Qmo1x203VK0+cNEYhzqosAnw9+dfXStNVDVTjG0MZUQH26YQ9ol6A X-Google-Smtp-Source: AGHT+IGesHhQcW797IxOgCh/m2XrwaJm/naejD3LMAtypMiZoQQokNfuUqWjBbtPtiVoyFX/viDw X-Received: by 2002:a05:620a:2488:b0:787:2606:14e2 with SMTP id i8-20020a05620a248800b00787260614e2mr3431374qkn.42.1708020157396; Thu, 15 Feb 2024 10:02:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020157; cv=none; d=google.com; s=arc-20160816; b=Z1hu9bUL7tZT/qBg+R67+60808pI5G4AU3i6Yqe0xGAgR0Ot6CN/CD582nEqRBDy/s l+HgDAcpDp9IQ6p1coe0M6fLXDLX8DhzF70PuBZr3AVGYb7ZCf2o2A6NqjBcAiyjuTXE HasYX5YK6a5SfmsrrIyJUtEXJCHOXJdZSkCaSMI8T7M6nmI2B3k/uh/p9Snt7WxsztTi RkSlM1/hW7Mm3ZjY/FdDtz2xI/cQPcALcq2cUHyA3x6Ii3WG8o3a92xVHhKPz2SnSEz8 GcYXQjTJE/gjToXqP82lNCdA48VGwEhXjIb0bc4kZ6J9gVK5h0coXMlCC01YDmwsWoiJ UIWA== 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=K9qIQKhs5a0rBnt1RjYr8e6nFgX9Qz3kgk9xy5OfTBw=; fh=ji8Yh8nl+lQsmijHgb8xFeSweOuU6hlZqBsT4ihbGqw=; b=Nlhr0xKHezZ5oqQx4yJD1fXjcMG5W6dEbJIOUekAAnWLjVczGBNAozRwv/sJDZ8MYo hwEXmAcp4RPhq+qejNwscH7Xo4erOk3bX3t1rm8PRqii/XCa8RQIqbOMTbFWQiuh78Oc HYS8ScYgVyKXQT7CpDO3iE5GUIL10IILPtgrX6NHg9re6/MMFY/0B8IVTa3W1VN7VVe2 o4lJAknLyi3jIAjNrsddrqs32byEXMsWZ6ExNWacEodXLziLv/UGybwsXBZDiTQ7QWNC wi13dx0YGo65AUNNYKLfUKsAvpPSHF6My75z2ZS16U5SlLVdV3QnsSt7Ukw9Nf9/SBO/ 6Lxw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jcVjhbk2; 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 o17-20020a0561023f9100b004679c371a51si441610vsv.709.2024.02.15.10.02.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:02:36 -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=jcVjhbk2; 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 1rag2v-0002MF-Ts; Thu, 15 Feb 2024 13:01:18 -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 1rag2n-00022O-Ny for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:01:10 -0500 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag2j-0002PA-Bt for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:01:09 -0500 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a3566c0309fso144975166b.1 for ; Thu, 15 Feb 2024 10:01:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020062; x=1708624862; 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=K9qIQKhs5a0rBnt1RjYr8e6nFgX9Qz3kgk9xy5OfTBw=; b=jcVjhbk2wkTr1VOMW5l/6dNmOeMuZB74HM5kfddyqgAVVruzA1PdZHXL+gT/pACIhS ahasEDmR3iDZmges47KRqiyG8nO4n50WBcPMpgVE/opa1PbkuRjFgfBoiBjaeduZc+I7 o2TgNBInpZsw6FQ/9q5MKriad6XTWZUo0/K8T/PMfZLNtWU+5zf6ZJ/YdG0rMXn0k17G l+d2ROaA3cRyOocmf+J7Lt/6BYbhtSahjmInFEFHeLsCsvOjOUZQ/qeXvYmW+ctbi3qx IJ4c58la/jHWX8ENCYPp0RyT1egkUd5qfykEOzs91DfupJEKHXlKc7Lp6Uk0j7aKU9be WIIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020062; x=1708624862; 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=K9qIQKhs5a0rBnt1RjYr8e6nFgX9Qz3kgk9xy5OfTBw=; b=niz4yZYRRBSg3igITjZlvrpv1GiW1jzO3mJeeT6h1Qq4YaLUyhlHx18mrg4aj0AmtN LJ7d8RP7jc0ICEOvfttRKe7eMiZSy2RoKOqHSHBg7L0k78W9n0sYRb11NwKQlT8wxuGf mFfI8tnln9T8lTPibe4lfCx4P4MvYQqXo2dSJmob+3IE7Z364Da040q6nFsKYqVAL84R rj8vYaToBC17l6hUtuUznnqqirPTr6qydr1mEZJyrc/cd1eJrkqe4v2F+5tTrUr9xXga JxveLvNwEjZiSm99EYDyTIHAP47XHvJQr7uZRGr1JR5dy4TGJr288jT0tLJcwOrOMvwx TXhA== X-Gm-Message-State: AOJu0YyTIHf1+aledvYhOCEBfM4mEVeUdSfEZFb45DbylgIBRYPc2COj 1Wimc9fUOR2lRpj3WcnP5/R9nzREechigZu0nM2v0dBoUJ+uC+4rNdQAr/8UHkfcaESgxAfFqpt ko+o= X-Received: by 2002:a17:906:7d86:b0:a3d:e9c:6d3a with SMTP id v6-20020a1709067d8600b00a3d0e9c6d3amr1800135ejo.49.1708020062128; Thu, 15 Feb 2024 10:01:02 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id s12-20020a17090699cc00b00a3d943558b8sm744210ejn.134.2024.02.15.10.01.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:01:01 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Mark Cave-Ayland , Damien Hedde , Richard Henderson , Artyom Tarasenko Subject: [PULL 28/56] hw/sparc64/cpu: Initialize GPIO before realizing CPU devices Date: Thu, 15 Feb 2024 18:57:22 +0100 Message-ID: <20240215175752.82828-29-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=philmd@linaro.org; helo=mail-ej1-x62c.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=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 Inline cpu_create() in order to call qdev_init_gpio_in_named_with_opaque() before the CPU is realized. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Mark Cave-Ayland Reviewed-by: Damien Hedde Reviewed-by: Richard Henderson Message-Id: <20240213130341.1793-13-philmd@linaro.org> --- hw/sparc64/sparc64.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/sparc64/sparc64.c b/hw/sparc64/sparc64.c index 72f0849f50..3091cde586 100644 --- a/hw/sparc64/sparc64.c +++ b/hw/sparc64/sparc64.c @@ -24,6 +24,7 @@ #include "qemu/osdep.h" +#include "qapi/error.h" #include "cpu.h" #include "hw/boards.h" #include "hw/sparc/sparc64.h" @@ -271,9 +272,10 @@ SPARCCPU *sparc64_cpu_devinit(const char *cpu_type, uint64_t prom_addr) uint32_t stick_frequency = 100 * 1000000; uint32_t hstick_frequency = 100 * 1000000; - cpu = SPARC_CPU(cpu_create(cpu_type)); + cpu = SPARC_CPU(object_new(cpu_type)); qdev_init_gpio_in_named(DEVICE(cpu), sparc64_cpu_set_ivec_irq, "ivec-irq", IVEC_MAX); + qdev_realize(DEVICE(cpu), NULL, &error_fatal); env = &cpu->env; env->tick = cpu_timer_create("tick", cpu, tick_irq, From patchwork Thu Feb 15 17:57:23 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: 772963 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp965866wre; Thu, 15 Feb 2024 10:03:24 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUHWbu8vKpcxmfC/reoArjKsBLwX0j/NQEPZ4e2Tj0RQBRQIeWAcVS31lobCrTmxt6QTB9Yk8nyPrNIPDbP9gmZ X-Google-Smtp-Source: AGHT+IH5xi6HUGMWRzrkZ5mSz+vR6bWe+5YgXTxk0mEWP8bgUjylG+eLgbME2IDNKoX6wGrKzz+Y X-Received: by 2002:a81:8d07:0:b0:604:aec0:70d with SMTP id d7-20020a818d07000000b00604aec0070dmr2163100ywg.52.1708020204529; Thu, 15 Feb 2024 10:03:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020204; cv=none; d=google.com; s=arc-20160816; b=1La1S+XvB3Fya8Wz8gXHgoTbK6T4lAeZOiA0gix1NXKQTVNGOBhwCv/hPJmMnOkI80 4s1pL/rlMYfZp9ODRc8YX0rNyAj/vxJBJfAyPdatqT/9z+p+duCkDN6GyLnf3SPF+h5A i3uA7hHjVxImSZFH8sMeMgg6eR2O4UFgDb1eDrZrr9Rguff/EDS2Vm4+uqiWrZp6WvlM FE++N/1xOx5T0Lv34gVeMQBUumjQMYCqIdVUfNKuXyT+S/ppUSJmbvetuHa2AKHyu3LL aR1Rm/EG8bMJAFrCTE7KMyf5YXZfOwGOyyZ8t0O1kNvA2AvA2MIsOE9d5fm5O9TouQWL 5onQ== 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=dKQRL6VpdheWarEt8u92abxs2j4nOpChsuFzwfI6A1Q=; fh=m+Vd/L8Fv4PFnOqZwtv66vpR6hGhdkN7t0zGF6cYI4Y=; b=xmu5HzaxAvYcop8XUr9Fcx2iJDK9w6paQBBwd/B80YpKEZLoL3CydFhMF9Polaqgsg J2UUeaYb48pDIiYwEV3UWK5PGm+722qPpZJFkeS2/IhhR7IU9yP0Duo0oxu3Ec1rYPjg GahpqUj+WyDJyLj3MTksRQcHT1BRkxYx5v3+aUw+BWBly73jvlAAcQy7vEVgRcQPpBH9 s/w0lPpl9zFAR8rhTIq90f7nkpGaucxHqfpKJl/uUOV74IY6ByhrBdii1iVyzV22ZS6D 2p3XmUAJLEsJwoZAi0Lzv23f9oXuMx/6AtwxOzUmn0df2rkdApraNyFnDb3dQc33Y+kR bpgA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KDhse0g3; 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 r198-20020a0de8cf000000b00607e3a672f9si573837ywe.90.2024.02.15.10.03.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:03:24 -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=KDhse0g3; 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 1rag3C-0002sJ-Hs; Thu, 15 Feb 2024 13:01:34 -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 1rag2q-00029w-Er for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:01:13 -0500 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag2o-0002QN-0s for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:01:12 -0500 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-55c2cf644f3so1427403a12.1 for ; Thu, 15 Feb 2024 10:01:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020068; x=1708624868; 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=dKQRL6VpdheWarEt8u92abxs2j4nOpChsuFzwfI6A1Q=; b=KDhse0g3JgeSjUdQJw8MPxW4aoQwbPXP0J7XwXN+ucVSEEygNJStez+0kP8aRDIcXZ ivAZmHL7mEy2IgaMN+Unh84p0RWN/7VMiApQUD6BOH0LKfCdA9xRRbJxY4mKCaenc0Jd hnvIQWajIwDxtEU5/vW6DXwPoTOaStMokhjC91208lWQI8OBpyiNcUPTXM2O3C/Alq+d lg9EZImac8WEg3D5TfK5xqnZfG2mspp3NcNnnCgVP/uHsaEO17MtXbXBpkYQRG61N9ZK ZQ2eZeBVVr8LGdWE4L8aG9ft2eSSzm+s1fSQ5WAwhZvpUy1Fdf+lorXUN/eTDc3wsrep 9ICg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020068; x=1708624868; 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=dKQRL6VpdheWarEt8u92abxs2j4nOpChsuFzwfI6A1Q=; b=hA235Qqp+NTqgFRvLQF2a+2X60hwzWq93biGr/UfkhPYSgk3xM9rr0kfU10NATgZTK rVJrUtC7FkThjrBF4K3/d+2BG08EqrJCVJn9lw5d2dDEqb+IfugbO/xo2YIjVceNVvXM 2cMRGnAoTGR5hRbBYMCf9NbY+14KZyI92+WAjGlQtNHCJKHeUyl7MrzkD5qAZYAni0Z5 vA/iXPc/jvtggxGMajp13dJ3BGVM68rhjS3S5ZvoxHx5UgISazUyCIpEQJWV3qo7saZi BxyOyt+Cmjt8a61UryXgCFi9DFJCx7Ha9U2HuZqdsIs+jMiF1XppDcogbUhrhV4DXCcz dTXA== X-Gm-Message-State: AOJu0YzFzFpqP3bNgSSKfRGo4oTTwWjEELzoHkshhANOVjJYODR9VvZh XS9OgIJlH/MMoykd2+ODQs/2Jsn9nRlcbHLeUX1i2VOeuCY7sMRojnsTrMOUT/+9Ue4wAO9acLx rWt4= X-Received: by 2002:a17:907:20a5:b0:a3c:f576:5f0c with SMTP id pw5-20020a17090720a500b00a3cf5765f0cmr1731792ejb.30.1708020068450; Thu, 15 Feb 2024 10:01:08 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id hu21-20020a170907a09500b00a3db6caba06sm302775ejc.1.2024.02.15.10.01.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:01:08 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Cl?= =?utf-8?q?=C3=A9ment_Chigot?= , Mark Cave-Ayland , Artyom Tarasenko Subject: [PULL 29/56] target/sparc: Provide hint about CPUSPARCState::irq_manager member Date: Thu, 15 Feb 2024 18:57:23 +0100 Message-ID: <20240215175752.82828-30-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=philmd@linaro.org; helo=mail-ed1-x52c.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=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 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 Message-Id: <20240130113102.6732-3-philmd@linaro.org> --- 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 edf46b387e..f3cdd17c62 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -545,10 +545,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 Thu Feb 15 17:57:24 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: 772958 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp964808wre; Thu, 15 Feb 2024 10:01:56 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVmgnbCbb4yVg2Q8skjRUtIMkwj2dDFCREtbiiz30zxZ/NRCz2l4MJdWa9T9FuOw0s7Mj0EHy5KbPvaiWvORDNL X-Google-Smtp-Source: AGHT+IEGI5KbMlTu2uSdRgQlgrmbPBhSZXKAD2qRQkzAroO9uVGShBcL+JFVkGFsDh/qWfxau+nM X-Received: by 2002:a05:620a:915:b0:783:1683:548 with SMTP id v21-20020a05620a091500b0078316830548mr2570294qkv.64.1708020116615; Thu, 15 Feb 2024 10:01:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020116; cv=none; d=google.com; s=arc-20160816; b=S/BmkIbPqhTn9KW9cf8dTSx40U3sjXQrk3t/haSLZ5kV9Ot3OrYGNPmRcSa9656vrb LWdu91Fwxl6NG+z9uXRYgomgy3o/hKLCRj8bRQ1rkun1vTOqa5aewVe3fnJTRFvduOag 3GjsUGRqdnXsdDMKEqDluIrHigxGifCEazT4WeVIri8jYAhghSSW6i3WKFsUKictb/Sw 2RPX2xs0PsomXZbhCnRw6u4wR0OUW7dKgJCXoZqfmm17maayBk85NbuxI5pRbedhSt6C 7CVVccDOpjXrVy2uHMxYlGcXIOM//NUsBdlc7lb8x2BvOz48y1Ax+mGCzJwvWVlqvXP1 EGXw== 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=k1XGzrffCcMjvoN7zlMmx6bS790MXe4X9nuc6CTe+o8=; fh=aCAI1KaCDgFoT3aGJJvzOYH0I7KHaS55/JQknN/qIKY=; b=Wg9HVsAmhOULiqsEQTRHF9b6N/Awm+82w3ubCDLq7OXiro3YsnuRz4qwSXhLc11Itc LVHT4hAZIvJmiRxKrl20uOov38TN3lyPy45XTXrMOldpuhFWAKhkMFcScMdd0+hnEQ4p uzfE8NTvJhKa22TLyjg5Ki6ZUUA+oVFeErh1MWV4JlZFfr8ta1N3Q7ChA/lq+psNfC/U toqDmNCZfnA0053dZr3YiTUdR5NrZL7DPGLGbj2+FFaLGF2w2qy/YHPiw6GPF8CtH2Fl cFHH/D1fH6SMdKqHdKekDmhAX3NDYX9eCgUPjlAC0SmepnG+2p5tVPamxCsHyQJp1yer bG2w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sHt9HgiA; 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 v1-20020a05620a090100b00785c0ad1601si2000198qkv.22.2024.02.15.10.01.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:01:56 -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=sHt9HgiA; 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 1rag3C-0002u1-O5; Thu, 15 Feb 2024 13:01:34 -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 1rag2y-0002Yb-6q for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:01:24 -0500 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag2v-0002TG-VO for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:01:19 -0500 Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-55ad2a47b7aso1689590a12.3 for ; Thu, 15 Feb 2024 10:01:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020075; x=1708624875; 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=k1XGzrffCcMjvoN7zlMmx6bS790MXe4X9nuc6CTe+o8=; b=sHt9HgiAQpzX7eJs1ZoUh99I9nr8gaImXAQIb9xnNzoLzgOgj5wZpEBIwmkoWQ18o4 hVla+BJdVxTv1khjmX3CVka6weZJ0sfAAOL0wgbSqciE2vPeO5orO+qypeCaIP1qiY65 PqDs/b5FPbnTJXkAhE1hpvb0+77c0AAHJLt1pgmkB+3NiMGxVulwT3N3yIGentbkhMo8 2iJNRdYQxdxfuUjvxKbFr/tOgf8LSNOLDRHf9g/6D2HqEbMypYRYufwoBpbZcJnaUsfh RC8jEGZ6CVBzA7G43e1CMRR/i5h8SLmkFGDz2qZ0I7wzfVqJrQLRVg44ctx3DbuWkHAv LOgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020075; x=1708624875; 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=k1XGzrffCcMjvoN7zlMmx6bS790MXe4X9nuc6CTe+o8=; b=cOVlcxAzH0m0bYdKByU2f0bl997QaJ9OqfnRrhjpS2XQnbg0+ynFK4ptPXcrE0q65P PiVsZnqt3SA0b86UFFBaZcrNmMWiAeSSti8b0BUYjhxTO2izQZ6txxQMpCKRH+KShhvc 8LBc6bhLVTxqYPGstJ7P49LdGvMkJYVF+wNrA8DNIfl0w3pnqBWzHP+fLlaI18vPNEp5 tsJdTmgho7UTmV2eqTNlEwim8UO8f9+I2wULpI9a8TBTVXGoMr/4ADIwCw+22JkKgfMi 1QsqGdC9YNVI1w9knLQO3ElO8fuxOocwqvDKBRRqqDGwpd28+5mmVI2dortIhq9aY/p4 eJ+w== X-Gm-Message-State: AOJu0YyWSZGENhLzPJrqP4cPbIkeO6qKoxmXDJ0chYE9o85CEdO1pKOI lMrGS556uf9SI8wMJbBK4KMTwGeY50KSfL6MV8h5TlKn0+ygUjCb5cRMo5Sn8uMIZ1pzhclPhgW oOj4= X-Received: by 2002:aa7:dd08:0:b0:563:d32f:5442 with SMTP id i8-20020aa7dd08000000b00563d32f5442mr493928edv.5.1708020075205; Thu, 15 Feb 2024 10:01:15 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id et5-20020a056402378500b00563c63e0a13sm400264edb.49.2024.02.15.10.01.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:01:14 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Cl?= =?utf-8?q?=C3=A9ment_Chigot?= , Frederic Konrad , Mark Cave-Ayland , Artyom Tarasenko Subject: [PULL 30/56] hw/sparc/leon3: Remove duplicate code Date: Thu, 15 Feb 2024 18:57:24 +0100 Message-ID: <20240215175752.82828-31-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=philmd@linaro.org; helo=mail-ed1-x531.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=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 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 Message-Id: <20240130113102.6732-3-philmd@linaro.org> --- 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; } } From patchwork Thu Feb 15 17:57:25 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: 772959 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp965248wre; Thu, 15 Feb 2024 10:02:32 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWZpi0TIFQ0G9s1uE1towdBiG/bWLFeFDIRN0YaIY1+eu2tF1yNeoZS6iLdtZpGAWOjwUwdE/QfiKQQH/h+24XR X-Google-Smtp-Source: AGHT+IHz2Lpnc+2pFrySdQaVzMeiwBFl6l8o/Dm230ox5SokQjUzbAxhDQtBsUuNYWQ5ztVFDSzO X-Received: by 2002:ae9:e41a:0:b0:785:d6a9:734f with SMTP id q26-20020ae9e41a000000b00785d6a9734fmr2301809qkc.46.1708020152480; Thu, 15 Feb 2024 10:02:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020152; cv=none; d=google.com; s=arc-20160816; b=BFz85/PvXpyKJDQ8poui+epUEYw0rzszmgflTDJLs2xTIcTPBDpEw5t60WLfSqve2i nRof7nOtp2QTaReM/reN7nkTFLFOmZe+qesbPpYZgm13C8Hn9a8DZd9wE8BUGdA3GV3a x9LSDVHuBVTgsiUfWgJlzfXe4HEJBrvMcdQaIoU6id1xYvdmWJE6eQGL9S5psjwZZ250 S8D4nLwqBQzTzHRdX0YRHX/Ra35paOEjE4jOk3Uxn+Nwuof1BRfSDYajIeeestHgdq03 sl0wtsge4sWvNkrlgg9Pge8hJnWzE2VQVj9aEsf/+g2e7eVL6W9sdCm7o0l7BlGT+WPP JTUQ== 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=x8DtNZazjY5IpYdmI7kgwXTFn+YMMPBGcaBqANiU/rg=; fh=6aSFKu/7wZylmASNxpBRoG/DnM93aTF68R44OiZ4gG4=; b=k7oMnU9KoYnGLCnIamkEYYsR0nfTYpDY6hxItQj/JdTA79OaniH6TSZQzGd3z0bss5 yJUZS+JLUp3D6E7OUzxJCDsps+0wpTvhkheqUUwzY6WmOVKSOxJcybVwdDLoPahPBBRv unUmUOWDp8kpQmwp+e8dNBlP5hktNTfnAKV1MsWya9GnJur5oQS19uCPnK7Maqiy5/Vs WJT6bQvDsROIaorS3G1MF2VW7xHgviWoBUqy6PgI8+rm4X2grs/O8mCG9l0lNx/57qHL RidcPeqK/Tp+2/sdv+IJfxxkvvdjH/HK/t773QWKkl5DBcuK2fSY/VZWKSLs40BvWv7U UQSg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A4iDdR0A; 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 j4-20020a05620a000400b00785d8a1cce3si2064164qki.295.2024.02.15.10.02.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:02:32 -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=A4iDdR0A; 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 1rag3Y-0003Bw-QI; Thu, 15 Feb 2024 13:01:57 -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 1rag37-0002mc-Fc for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:01:29 -0500 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag31-0002UH-To for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:01:29 -0500 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a3db14a0a31so70192766b.2 for ; Thu, 15 Feb 2024 10:01:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020082; x=1708624882; 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=x8DtNZazjY5IpYdmI7kgwXTFn+YMMPBGcaBqANiU/rg=; b=A4iDdR0AZqavcocK+XBa1dccCdUvfCY4Fjix7zXQA/wuAs8NBpstEzV152Eti13x6j IiaK9WlweafEQ3HLPViH1Vltl5W7+JSf5KqH0Bmzwj0NoVJaAJwTScNPMsGyDUF2EQ8X snZI2QBy2z3vn3fKX/0XfQXbBtLoViRifZXxpNltPGYUhNNDzpDRpSYxK7z43XrIREzx min6+MXJo7JNilXmF6RB95fE/ojwtDnqH54vPI9Cz0tlVYgUyurtGqvacpLIcE6qUuw7 vzkYW49a1UMqhpddQJvy4qH3QO11OEWcU5liqzbWS45NyGITKRKGRLxgB92xUUELHIsx +oWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020082; x=1708624882; 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=x8DtNZazjY5IpYdmI7kgwXTFn+YMMPBGcaBqANiU/rg=; b=FioX4BFLOLnvjtNXSDpIusXuVCdH+wGtyYvx2hTN++8AOTw44bcd67dKV/smCPeIfF wRAarBVoT7CG6yz0/xtT6157vyNrH+SWeMfWjJbuIsqhX8EP6cPHsarFh3LeCE4LD7mn Q2uuQf3rzsieowfQwsclTsjMGgHuPzr5r2JEjbtWB+DigUdkcwcazJa/DNQtdaDlpRcx BnJeZ5tPPgdyglTrGPfwTkty+w7CiR2n33f2QRif/5vAVrbKu//eCEPeBwunU4QQX+pp 8MHdYV/oZ0mubwK0Uhh6i+/7NU0ICTZmtFjapnYw+huV/SCcu1P9QmcDh8eeYfjU1WQ5 Ob9A== X-Gm-Message-State: AOJu0YxKVZQgQAEYoHtavsaXPmgS1g44ftek1bOm0m85FAmEH24deGZ1 KOJ9K/xFmR5CNIFp/gGr8mBaTrAOCrQIRZLbUHMtFZodQFewzI7UAI6q87fxvMQePB0pCTHy3sR cN5k= X-Received: by 2002:a17:907:382:b0:a3d:7d05:21ac with SMTP id ss2-20020a170907038200b00a3d7d0521acmr1934804ejb.53.1708020081957; Thu, 15 Feb 2024 10:01:21 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id wb4-20020a170907d50400b00a3cf4e8fdf5sm788702ejc.150.2024.02.15.10.01.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:01:21 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , =?utf-8?q?Cl=C3=A9ment_Chigot?= , Frederic Konrad , Mark Cave-Ayland , Artyom Tarasenko Subject: [PULL 31/56] hw/sparc/leon3: Remove unused 'env' argument of write_bootloader() Date: Thu, 15 Feb 2024 18:57:25 +0100 Message-ID: <20240215175752.82828-32-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=philmd@linaro.org; helo=mail-ej1-x62f.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 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 'CPUSPARCState *env' argument is unused, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Message-Id: <20240215132824.67363-2-philmd@linaro.org> --- hw/sparc/leon3.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 1ae9a37583..5c670b92db 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -94,8 +94,7 @@ static uint32_t *gen_store_u32(uint32_t *code, hwaddr addr, uint32_t val) * state (eg: initialized by the bootloader). This little code reproduces * this behavior. */ -static void write_bootloader(CPUSPARCState *env, uint8_t *base, - hwaddr kernel_addr) +static void write_bootloader(uint8_t *base, hwaddr kernel_addr) { uint32_t *p = (uint32_t *) base; @@ -342,7 +341,7 @@ static void leon3_generic_hw_init(MachineState *machine) uint8_t *bootloader_entry; bootloader_entry = memory_region_get_ram_ptr(prom); - write_bootloader(env, bootloader_entry, entry); + write_bootloader(bootloader_entry, entry); reset_info->entry = LEON3_PROM_OFFSET; } } From patchwork Thu Feb 15 17:57:26 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: 772964 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp966039wre; Thu, 15 Feb 2024 10:03:41 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUSHQ9iyaQQ1skt7KUxLs81RxdZAnaTTHn5rMpqqOl1gVaQBAB4Qr8cvwDzXFS7keV+ybDgzsD/tQePXbuZEsDy X-Google-Smtp-Source: AGHT+IF2MtepUpDufiL2YqtZjGc0l/WayWDiH1gPMPmLRBhqzzp4YvIH6xOjVRFwMJGDc2izBanF X-Received: by 2002:a05:6358:1099:b0:176:a5f5:d266 with SMTP id j25-20020a056358109900b00176a5f5d266mr3235763rwi.6.1708020221171; Thu, 15 Feb 2024 10:03:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020221; cv=none; d=google.com; s=arc-20160816; b=miepQIWpLDeZ2F0OeC9nma5ysfzpTpiBTw7klMoenSUUNjK1AC0dvZKJn+wFrcWFAY rY1vL2VneYGptCWl2gz8Mom5VYW5/F3HNWjZoZv2yo43w6CPfKWEbxDNiy15sHv+p436 R5ZIRbOu3dLpnPk1baE86EB+u6oYC2s4rgJhaDvQmv8AXPyOAJnBRxv/2xsVQFjHPZgk A7XA3uN9fi10Sgfd9kXIsScZPXaxf/+kFsbYMOflHQtIrAfoeprpTwcPpQ8L8D9rE/Xi ZExljWHtCAD6YDrwXYL80K92W/Een+bER390dtuOT9nMcenXCS6EbT1GWwlMUvb02TcE shRg== 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=VB2HvOhj++MQuV2OC6cpVOGxVaetf77tz8Ps5+PnfHo=; fh=6aSFKu/7wZylmASNxpBRoG/DnM93aTF68R44OiZ4gG4=; b=h6/jSR0+UqZSmPcaipggwYWiEy/n4uYRumR0bkPDgt1it6cB1h5kbj5NRvfPS9ZGKs 5wTTaRx0S8RRLdukRvkd6HnJWpV9XkTHuzx8kjYGSkI1HJy1BvrkuBfHaNepKve+8jtN OvQR83gF7q1iuM/mBaR4WiE0y6ai3xjqNwIcEEj3bgk8mzyrXbupKlT7/3bpkIlQk5Vn sZ/DJFSFPqt6wc07GkKe+jNoImMrO/LzX2uu4QHHWoUxud2gLIJH3wRG8u5WaklN90WD DfSOnt2u56i0/W/Xjxhb+4njCTnIbZtv/CXlTHNb6qwtGT+3GEO2lGtY15lTZ7DW4Ee7 OVEg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JzyX1D1E; 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 ie12-20020a0561022c0c00b0046d6df6fc2fsi431420vsb.737.2024.02.15.10.03.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:03:40 -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=JzyX1D1E; 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 1rag3H-0002zT-Sh; Thu, 15 Feb 2024 13:01:40 -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 1rag3A-0002qB-Sg for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:01:33 -0500 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag38-0002VQ-Ds for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:01:32 -0500 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a26fa294e56so175743266b.0 for ; Thu, 15 Feb 2024 10:01:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020088; x=1708624888; 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=VB2HvOhj++MQuV2OC6cpVOGxVaetf77tz8Ps5+PnfHo=; b=JzyX1D1EIt4/krNzw6j5g5htFeR7YEbAUgRfXQFfnIMzInSPy7ugN5doIIMhsGWdsT evNocsCn1mumw/ZCBni3xhgOz2f9vNwTMStbfzGqHWD5eq+AtruZ99crTtJlAzjH8fpt YeIOxEVu+slVEec8OccYEH5J1FIiWjjKENhtqtHj8oWGFF6ZIw8Xg0Po/Skm2teBoza2 bMMICcHW+Bh+P2HVkJaC3ZI7B+YaKcSh1OmfOPk8iN3E51EU+RGqrZb2DjEFB4vnXLfN fOEPW4XDnLDJPlxDOiETONJfXzilYlTrRZIrml9L7RpLIrelibV1SjeXPaU8cfniET+A zzbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020088; x=1708624888; 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=VB2HvOhj++MQuV2OC6cpVOGxVaetf77tz8Ps5+PnfHo=; b=fJboswfgtjWKR6+ssyqEstcTcMI3UuvkiRWE2j2arP59YWTqjW3Szq/A/6kN73av0A BFtVhftggSXvc1Yxftsbj8Rs0IZ2AA+arARZtiH3uD5PecSt2/PYSaKHP4EHQXtGbdzY 5aBdH3srb5TGJ3PehSOvcS75tUHDcBD5lZSfyZwDgewYk6BsYN/RXXoZgPZM+gawzinj byXfkKycCt/8aC/0gzTFOU5fADzPIwJJZq9wbZMMbG2UzHZLX5ON3GRSfXgbiBzLVUGM lEdRGEv0bXjlbRRXRqV18JAIV7VhNBvNcck/nmE86QELOvylEyLDibGO4fhylQNfHdVz 32wA== X-Gm-Message-State: AOJu0YylpNU1oMt60E4WI5A6GIOGCA3DIsfPyUi8VoPe+jo5cwF0xEMN MA+uGl3wXJxqIwxpyCfCMxSQNYOsIVJPC11wUTm1SQlrswyW4DNqr5Kiutk5zprieK0tVm+95+3 6Pvk= X-Received: by 2002:a17:906:2b55:b0:a3d:624d:3e7 with SMTP id b21-20020a1709062b5500b00a3d624d03e7mr2042719ejg.45.1708020088563; Thu, 15 Feb 2024 10:01:28 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id kt22-20020a170906aad600b00a3d07f3ac61sm789679ejb.101.2024.02.15.10.01.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:01:28 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , =?utf-8?q?Cl=C3=A9ment_Chigot?= , Frederic Konrad , Mark Cave-Ayland , Artyom Tarasenko Subject: [PULL 32/56] hw/sparc/leon3: Have write_bootloader() take a void pointer argument Date: Thu, 15 Feb 2024 18:57:26 +0100 Message-ID: <20240215175752.82828-33-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=philmd@linaro.org; helo=mail-ej1-x62b.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=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 Directly use the void pointer argument returned by memory_region_get_ram_ptr(). Reviewed-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240215132824.67363-3-philmd@linaro.org> --- hw/sparc/leon3.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 5c670b92db..fa4fbe4b30 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -94,9 +94,9 @@ static uint32_t *gen_store_u32(uint32_t *code, hwaddr addr, uint32_t val) * state (eg: initialized by the bootloader). This little code reproduces * this behavior. */ -static void write_bootloader(uint8_t *base, hwaddr kernel_addr) +static void write_bootloader(void *ptr, hwaddr kernel_addr) { - uint32_t *p = (uint32_t *) base; + uint32_t *p = ptr; /* Initialize the UARTs */ /* *UART_CONTROL = UART_RECEIVE_ENABLE | UART_TRANSMIT_ENABLE; */ @@ -338,10 +338,7 @@ static void leon3_generic_hw_init(MachineState *machine) * the machine in an initialized state through a little * bootloader. */ - uint8_t *bootloader_entry; - - bootloader_entry = memory_region_get_ram_ptr(prom); - write_bootloader(bootloader_entry, entry); + write_bootloader(memory_region_get_ram_ptr(prom), entry); reset_info->entry = LEON3_PROM_OFFSET; } } From patchwork Thu Feb 15 17:57:27 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: 772970 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp966811wre; Thu, 15 Feb 2024 10:04:56 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWqtg/y11nVZT8A5NBXYJ4U3ZzYUapzgUdIGJvqh4Pwft0+mUFfJFy1hApOeglnCh8Bk600qwfCjYsc6PnZ9/iJ X-Google-Smtp-Source: AGHT+IEZ0jQXJhnIlbA+6MI0VACS0otxRrCY2RoEhhOYvsVRANi4m3zcAqNjYcKR8ToTnnqKfrRD X-Received: by 2002:a05:6102:508c:b0:46d:2e28:366a with SMTP id bl12-20020a056102508c00b0046d2e28366amr3282182vsb.18.1708020296244; Thu, 15 Feb 2024 10:04:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020296; cv=none; d=google.com; s=arc-20160816; b=CtGKE/1AA2DrJCUepeK+5CohFXzOf3btT7KRa85LvIY8WgSdpquOWzf5J1gt6eW84t 15MMPJhlkfsme50m6AhUI3K34lirPDIhG1MnOgwV3iW71dY+5/wxgD82rVhp9j6vuGf3 SSSiMU17PQMlKrRP/KWd94DQb42CpT9oXAqkCmj05YtUNBs5v1H/93aLvdLs2leehUUT TIA/JeS7QP3SpOUb3L1IfIRY0IqrL7UJnnDJehq45zQNl7ssFcK3crJasySTIQPjLNAD KmmNGV4/PcsWqWWLu89GVwawj5g4b1aFAKveaBtGYcRVszNOASw+ywVX4+ZLUpmZRKBV 4CvQ== 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=qOBFGHotMZNhpz8RBtUCz5soAiP+H2PcJ6i2ywIfEBI=; fh=1+wSm+VIM/N/g7cyslg7h6D2EEkejJhOVJYA2v0agHk=; b=pC5aWqNAvpCtPmRiCBxAMAH2W0LJAi+NU1V2bFmlNs8xyQFriyP7M+0Ujkkd2j27Z6 TLR9dIaDGPEVb2VSAdjEVaqX0qvJq1JV0gRDg297ptzofCsE69P+ALVs5yvpskFusCok n51O4F+J6Z7EKHrN1jP6+ethtczTwgM1nBuwzQIooY2ga+xy1jVddWZmvYa8ghjLqPDz KdtiZVjBqVROC1SI+rNJ141Y/PWu9UhNBg23FXgXWw1V5jwFjdsciJKLdn/gmKs1stkO laDopK15msYwzT31DId8lZibjI68fXTBhExVwKEusr2LExLRuatAiNmfskzz8vLvB30K FeLw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vSVy1YA5; 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 i17-20020a05610220d100b0046b689067fdsi351288vsr.52.2024.02.15.10.04.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:04:55 -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=vSVy1YA5; 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 1rag3y-00048V-Fo; Thu, 15 Feb 2024 13:02:23 -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 1rag3J-00032w-J6 for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:01:45 -0500 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 1rag3F-0002Z0-Gs for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:01:41 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4121aa78aa2so6120985e9.0 for ; Thu, 15 Feb 2024 10:01:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020096; x=1708624896; 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=qOBFGHotMZNhpz8RBtUCz5soAiP+H2PcJ6i2ywIfEBI=; b=vSVy1YA5FttZ2OLuHH3kNoZAoH8H9anDU+amRUzZhfeS87/wYkNTd3EO/CjZjX6Prs ANG6JprVzeaMAdGhpO72xCMf370ZyNRbRLH+XMfLyoqJNFIHmL7DbpnS4qzDVE80MRI8 wjyAAXna7MzKt8ukj9dcma6KIAhwmQPCU8q70fpYaFmw9YdhfVkXxjzJSwUVVYJUGiH9 GhD69BuWdRoBHuQYZlzCyOpxnZpV8TMsPZolKDA1jf64EEEAeXAoIEu6AT0LNzSAyYdi npwyAlV+mH+R7D2QvtHYJY9ly96OvXLsLn3VNbsiblL1yWRn8rrynwnHxloM7W5+J+nk gI5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020096; x=1708624896; 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=qOBFGHotMZNhpz8RBtUCz5soAiP+H2PcJ6i2ywIfEBI=; b=IcE4reNWTt65uRsK8FnigjrozGgJ2haOa7TnNyBPmJ0hDRLZlJ0g0Fc/ZuX4+4QXiU TFL5l0lQVKhAXPl7r1MCFyGAGOMBF4j6OFdrHuP4G7hqVsWezaAvyND+pokKqBY4L2OQ 3H2dGGIy5I6GG02RosGqjk2lIGWecDYzlxYyBhrn3b2hZsxFxl5JZQFVFA7sTSHSE/BV sOi6SzJderwu57S5JmFlD0gfsOhpx8jhwzc+PfniPivS+yT8jMjDFsvl4vxHqSJPD9jm eOB+4h3ikXyO6GuG6PvU0G09k9zgG/RRAGf6fVpGnFFC8i1A7cn8YVLPp0kJ0CJJ8MYt AZcw== X-Gm-Message-State: AOJu0YyJWkWZxnZjN5ZOBfjAxMU2lOxHlZUbHWtVPFwvi+QOHOwuAFnL ZWFBmjfKiBo7HdzGEJ+HHte/9EeuRPlsrG9qOer8UfE5wHmVuoG2jh1JWUJE0vbdRBwE2/oxfS/ lVdU= X-Received: by 2002:a05:600c:198f:b0:411:f8f8:a0b1 with SMTP id t15-20020a05600c198f00b00411f8f8a0b1mr2001688wmq.2.1708020095497; Thu, 15 Feb 2024 10:01:35 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id b11-20020a05600003cb00b0033d07edbaa6sm2087249wrg.110.2024.02.15.10.01.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:01:34 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Cl=C3=A9ment_Chigot?= , Frederic Konrad , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , Mark Cave-Ayland , Artyom Tarasenko Subject: [PULL 33/56] hw/sparc/grlib: split out the headers for each peripherals Date: Thu, 15 Feb 2024 18:57:27 +0100 Message-ID: <20240215175752.82828-34-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-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, 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 From: Clément Chigot Split out the headers for each peripherals and move them in their right hardware directory. Update Copyright and add SPDX-License-Identifier at the same time. Co-developed-by: Frederic Konrad Signed-off-by: Clément Chigot Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240131085047.18458-2-chigot@adacore.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/char/grlib_uart.h | 32 +++++++++++++++++++ .../hw/{sparc/grlib.h => intc/grlib_irqmp.h} | 16 ++++------ include/hw/timer/grlib_gptimer.h | 32 +++++++++++++++++++ hw/char/grlib_apbuart.c | 6 ++-- hw/intc/grlib_irqmp.c | 6 ++-- hw/sparc/leon3.c | 8 +++-- hw/timer/grlib_gptimer.c | 6 ++-- 7 files changed, 88 insertions(+), 18 deletions(-) create mode 100644 include/hw/char/grlib_uart.h rename include/hw/{sparc/grlib.h => intc/grlib_irqmp.h} (86%) create mode 100644 include/hw/timer/grlib_gptimer.h diff --git a/include/hw/char/grlib_uart.h b/include/hw/char/grlib_uart.h new file mode 100644 index 0000000000..7496f8fd5e --- /dev/null +++ b/include/hw/char/grlib_uart.h @@ -0,0 +1,32 @@ +/* + * QEMU GRLIB UART + * + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2024 AdaCore + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef GRLIB_UART_H +#define GRLIB_UART_H + +#define TYPE_GRLIB_APB_UART "grlib-apbuart" + +#endif diff --git a/include/hw/sparc/grlib.h b/include/hw/intc/grlib_irqmp.h similarity index 86% rename from include/hw/sparc/grlib.h rename to include/hw/intc/grlib_irqmp.h index ef1946c7f8..c5a90cbb3e 100644 --- a/include/hw/sparc/grlib.h +++ b/include/hw/intc/grlib_irqmp.h @@ -1,7 +1,9 @@ /* * QEMU GRLIB Components * - * Copyright (c) 2010-2019 AdaCore + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2010-2024 AdaCore * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -22,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef GRLIB_H -#define GRLIB_H +#ifndef GRLIB_IRQMP_H +#define GRLIB_IRQMP_H #include "hw/sysbus.h" @@ -36,10 +38,4 @@ void grlib_irqmp_ack(DeviceState *dev, int intno); -/* GPTimer */ -#define TYPE_GRLIB_GPTIMER "grlib-gptimer" - -/* APB UART */ -#define TYPE_GRLIB_APB_UART "grlib-apbuart" - -#endif /* GRLIB_H */ +#endif /* GRLIB_IRQMP_H */ diff --git a/include/hw/timer/grlib_gptimer.h b/include/hw/timer/grlib_gptimer.h new file mode 100644 index 0000000000..e56f1b8bf3 --- /dev/null +++ b/include/hw/timer/grlib_gptimer.h @@ -0,0 +1,32 @@ +/* + * QEMU GRLIB GPTimer + * + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2024 AdaCore + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef GRLIB_GPTIMER_H +#define GRLIB_GPTIMER_H + +#define TYPE_GRLIB_GPTIMER "grlib-gptimer" + +#endif diff --git a/hw/char/grlib_apbuart.c b/hw/char/grlib_apbuart.c index 82ff40a530..515b65bc07 100644 --- a/hw/char/grlib_apbuart.c +++ b/hw/char/grlib_apbuart.c @@ -1,7 +1,9 @@ /* * QEMU GRLIB APB UART Emulator * - * Copyright (c) 2010-2019 AdaCore + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2010-2024 AdaCore * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -26,7 +28,7 @@ #include "hw/irq.h" #include "hw/qdev-properties.h" #include "hw/qdev-properties-system.h" -#include "hw/sparc/grlib.h" +#include "hw/char/grlib_uart.h" #include "hw/sysbus.h" #include "qemu/module.h" #include "chardev/char-fe.h" diff --git a/hw/intc/grlib_irqmp.c b/hw/intc/grlib_irqmp.c index 3bfe2544b7..11eef62457 100644 --- a/hw/intc/grlib_irqmp.c +++ b/hw/intc/grlib_irqmp.c @@ -3,7 +3,9 @@ * * (Multiprocessor and extended interrupt not supported) * - * Copyright (c) 2010-2019 AdaCore + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2010-2024 AdaCore * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -29,7 +31,7 @@ #include "hw/sysbus.h" #include "hw/qdev-properties.h" -#include "hw/sparc/grlib.h" +#include "hw/intc/grlib_irqmp.h" #include "trace.h" #include "qapi/error.h" diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index fa4fbe4b30..e80b9410d4 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -1,7 +1,9 @@ /* * QEMU Leon3 System Emulator * - * Copyright (c) 2010-2019 AdaCore + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2010-2024 AdaCore * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -40,7 +42,9 @@ #include "elf.h" #include "trace.h" -#include "hw/sparc/grlib.h" +#include "hw/timer/grlib_gptimer.h" +#include "hw/char/grlib_uart.h" +#include "hw/intc/grlib_irqmp.h" #include "hw/misc/grlib_ahb_apb_pnp.h" /* Default system clock. */ diff --git a/hw/timer/grlib_gptimer.c b/hw/timer/grlib_gptimer.c index 5c4923c1e0..4990885451 100644 --- a/hw/timer/grlib_gptimer.c +++ b/hw/timer/grlib_gptimer.c @@ -1,7 +1,9 @@ /* * QEMU GRLIB GPTimer Emulator * - * Copyright (c) 2010-2019 AdaCore + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2010-2024 AdaCore * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -23,7 +25,7 @@ */ #include "qemu/osdep.h" -#include "hw/sparc/grlib.h" +#include "hw/timer/grlib_gptimer.h" #include "hw/sysbus.h" #include "qemu/timer.h" #include "hw/irq.h" From patchwork Thu Feb 15 17:57:28 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: 772969 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp966618wre; Thu, 15 Feb 2024 10:04:35 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWtPLljvhSMOO5ha3J9gR1liGLBIHk2Q3k7WFOcTvlXf1nMxjC0uU77ub1s9WJs164kXdXPPKZi9NhCBi/Z/1gL X-Google-Smtp-Source: AGHT+IFDXZ77RvwUPOfguNI6rBls0k3jGPY73ONBmaJITUxuQyW5z2EiX3B/3bnYuy5vArfK7KqX X-Received: by 2002:a05:6102:304e:b0:46e:c5df:2b51 with SMTP id w14-20020a056102304e00b0046ec5df2b51mr3185249vsa.17.1708020275040; Thu, 15 Feb 2024 10:04:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020275; cv=none; d=google.com; s=arc-20160816; b=aeFKyJY8Lt23AP3ToMrtCE6Bj9TUvjxkro6SCvWsfbN4miX+cVO6ivFygMzSXKo8o9 icqe45R8H5LQ0DxNYcWSV1Gecom96pq4gNCODuLLxnGa4U6thHFfhjaggOGmehoEU+8t cCZoJxqGRvu8LOrWigLYLd7BIrkjnkh+2Qrv94ERJbqEaP5Gbcj28pqTY7ZJfRjkIQmX VIpreoc2Fb2+THC7xD9uvJx3VxusLxLvpXZrXMNdGTvsqSwZ62UwwWnvD1KYcaer8XH1 Kdf8ZOOEFMjdFCiGgaELwST1ncldh3qVjZ1VKW+fSbz6gmyPXmSCOpAD5jSxF/iBurL0 x6lA== 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=ruX53CbVKYFd9a03NjcuApvlZnuC4B/Alw04ClG0uNE=; fh=r+mbcaIVBB+d5Ke8c8av/RXIbk1kcul/Ph9l9m3Dfks=; b=P1tbgIPcEDIb6w1myUzopDDZEhMnJJEaTmrpQ9Hoo0l9sSSEKzyxo5aeIMx6ec8+7y tbpBXlrgDFycvwSe5kfJ09byJYUgriHXMM5Q9X0lliu2LQs26Bqn9cd7kAP/EiG6MEaa Q9oM+XwwRosPJDuZl5wPIM7sy6VL5vKKeIj6SaVRxfCwvPTEPhft1AqGZ1etHDSCzE6O f31DYfLwu6kxH5y8CZPXSMYqmoqSXuZQxpi3LZu3mIb1REERhHjp/eQNr3m8qR3PYHyy ES7KZBvFK4E5NqIOynUHBMrUkmDX10OXq7a6lEiOV3W/ffaR1m6j9+0rSSVmOQb30CQk DaeQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hOI1M3o3; 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 dc4-20020a056102558400b0046ed2b5ab58si411559vsb.474.2024.02.15.10.04.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:04:34 -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=hOI1M3o3; 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 1rag3y-00046h-D0; Thu, 15 Feb 2024 13:02:22 -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 1rag3Q-00036Z-65 for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:01:49 -0500 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag3M-0002cw-F1 for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:01:47 -0500 Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2d1025717c7so13584431fa.2 for ; Thu, 15 Feb 2024 10:01:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020102; x=1708624902; 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=ruX53CbVKYFd9a03NjcuApvlZnuC4B/Alw04ClG0uNE=; b=hOI1M3o3q8YkX1TJw4hk7FpfS30B9odCwTpiUYRav0slATxtzhMhHcN4kXR6+bvVUL GSWpo6Jkr1GLfhyefDS+Hi6AgX3gg/FW5pLzEoznNepSAhfpk/v98FXsHUGF6Cl8msWE Q3jIm1HRWoFdowT8vJeDucf9hZGY8j+jLUDkLfdS0f63VyvmmoNw3+5he2Fb+3EU4rML bA/vJbn9p+kDEQV4PKOvRZT7vURuWqLeh4K0H3xhZVSFr6G8McSE2lApV3C0xbIKutgc v2884sok21qrRl9dKOWYVWUwkNlYIwBkw/GSA15anwHVTsW8bcXPaIFy8p+EFESbKbU1 +JEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020102; x=1708624902; 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=ruX53CbVKYFd9a03NjcuApvlZnuC4B/Alw04ClG0uNE=; b=HWv0fVyVhPzFTSm54zXuWbQsliCSdqg/okE5fU0jWfWQZSASU8T9BaM9zARO+fiv2M QUgNBfS9BpKkTux3c/l6BY1F9E73kfNG+nUJUIf2ShdGDns098pYe5n3JlygNortVwUM mvmJXjQgUsJrQ1BZ8bDvETd6TZU06MJFLHE8GKJzCoBVjQVBfJRqoyjxcE+X6bjuupKj 5SPcTzgRknZ/pHghEuMBpgL0q6Vy2XWDpkc2F83Sidj2hyFD9FeFlVyR7mSVFSxtMe2M H5PME7BOygLxB/nAjMd4SFz0HuyvMa9AQFg6fr1hSr+1p40894H8xFILqLB+yXeAT++m JMmA== X-Gm-Message-State: AOJu0YzE7WN/sRPMPkGygJnPXDRkWvQSys5Scy19gRyxWT29CDKfcDby 9enC1KxRTAcj+9nA2ZudQNnxESr9a4ilTB2x227ktt/sm/P7zFYvlMaVH6xoYK0QKXEmWj7hsuy Cw9k= X-Received: by 2002:a2e:9058:0:b0:2d1:1c54:12d with SMTP id n24-20020a2e9058000000b002d11c54012dmr1857104ljg.38.1708020102325; Thu, 15 Feb 2024 10:01:42 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id j12-20020a05600c190c00b00410bca333b7sm5918918wmq.27.2024.02.15.10.01.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:01:41 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Cl=C3=A9ment_Chigot?= , Frederic Konrad , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Mark Cave-Ayland , Artyom Tarasenko Subject: [PULL 34/56] hw/intc/grlib_irqmp: add ncpus property Date: Thu, 15 Feb 2024 18:57:28 +0100 Message-ID: <20240215175752.82828-35-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22a; envelope-from=philmd@linaro.org; helo=mail-lj1-x22a.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=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 From: Clément Chigot This adds a "ncpus" property to the "grlib-irqmp" device to be used later, this required a little refactoring of how we initialize the device (ie: use realize instead of init). Co-developed-by: Frederic Konrad Signed-off-by: Clément Chigot Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240131085047.18458-3-chigot@adacore.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/intc/grlib_irqmp.c | 30 +++++++++++++++++++++--------- hw/sparc/leon3.c | 2 +- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/hw/intc/grlib_irqmp.c b/hw/intc/grlib_irqmp.c index 11eef62457..744cd64c58 100644 --- a/hw/intc/grlib_irqmp.c +++ b/hw/intc/grlib_irqmp.c @@ -1,7 +1,7 @@ /* * QEMU GRLIB IRQMP Emulator * - * (Multiprocessor and extended interrupt not supported) + * (Extended interrupt not supported) * * SPDX-License-Identifier: MIT * @@ -63,6 +63,7 @@ struct IRQMP { MemoryRegion iomem; + unsigned int ncpus; IRQMPState *state; qemu_irq irq; }; @@ -326,33 +327,44 @@ static void grlib_irqmp_reset(DeviceState *d) irqmp->state->parent = irqmp; } -static void grlib_irqmp_init(Object *obj) +static void grlib_irqmp_realize(DeviceState *dev, Error **errp) { - IRQMP *irqmp = GRLIB_IRQMP(obj); - SysBusDevice *dev = SYS_BUS_DEVICE(obj); + IRQMP *irqmp = GRLIB_IRQMP(dev); - qdev_init_gpio_in(DEVICE(obj), grlib_irqmp_set_irq, MAX_PILS); - qdev_init_gpio_out_named(DEVICE(obj), &irqmp->irq, "grlib-irq", 1); - memory_region_init_io(&irqmp->iomem, obj, &grlib_irqmp_ops, irqmp, + if ((!irqmp->ncpus) || (irqmp->ncpus > IRQMP_MAX_CPU)) { + error_setg(errp, "Invalid ncpus properties: " + "%u, must be 0 < ncpus =< %u.", irqmp->ncpus, + IRQMP_MAX_CPU); + } + + qdev_init_gpio_in(dev, grlib_irqmp_set_irq, MAX_PILS); + qdev_init_gpio_out_named(dev, &irqmp->irq, "grlib-irq", 1); + memory_region_init_io(&irqmp->iomem, OBJECT(dev), &grlib_irqmp_ops, irqmp, "irqmp", IRQMP_REG_SIZE); irqmp->state = g_malloc0(sizeof *irqmp->state); - sysbus_init_mmio(dev, &irqmp->iomem); + sysbus_init_mmio(SYS_BUS_DEVICE(dev), &irqmp->iomem); } +static Property grlib_irqmp_properties[] = { + DEFINE_PROP_UINT32("ncpus", IRQMP, ncpus, 1), + DEFINE_PROP_END_OF_LIST(), +}; + static void grlib_irqmp_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); + dc->realize = grlib_irqmp_realize; dc->reset = grlib_irqmp_reset; + device_class_set_props(dc, grlib_irqmp_properties); } static const TypeInfo grlib_irqmp_info = { .name = TYPE_GRLIB_IRQMP, .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(IRQMP), - .instance_init = grlib_irqmp_init, .class_init = grlib_irqmp_class_init, }; diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index e80b9410d4..bc6a85be9c 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -264,11 +264,11 @@ static void leon3_generic_hw_init(MachineState *machine) /* Allocate IRQ manager */ irqmpdev = qdev_new(TYPE_GRLIB_IRQMP); + sysbus_realize_and_unref(SYS_BUS_DEVICE(irqmpdev), &error_fatal); qdev_init_gpio_in_named_with_opaque(DEVICE(cpu), leon3_set_pil_in, env, "pil", 1); qdev_connect_gpio_out_named(irqmpdev, "grlib-irq", 0, qdev_get_gpio_in_named(DEVICE(cpu), "pil", 0)); - sysbus_realize_and_unref(SYS_BUS_DEVICE(irqmpdev), &error_fatal); sysbus_mmio_map(SYS_BUS_DEVICE(irqmpdev), 0, LEON3_IRQMP_OFFSET); env->irq_manager = irqmpdev; env->qemu_irq_ack = leon3_irq_manager; From patchwork Thu Feb 15 17:57:29 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: 772968 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp966615wre; Thu, 15 Feb 2024 10:04:35 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX0c0pl0kk4JSMwHodyAOnwY9+MbAUfk3MBcao64Rd19/nGbJchvKO34pfeaakslstPNHTHXFoy2JnZo6K4b+2r X-Google-Smtp-Source: AGHT+IGAZStEyOW9uFRKOR8m0Mm19rfRy47MEm6/ZL3xmNDzKH6uWbEHFz3Hl2My96+6NS9/xQgf X-Received: by 2002:a05:6870:469e:b0:218:c9c6:6cf9 with SMTP id a30-20020a056870469e00b00218c9c66cf9mr2589876oap.28.1708020274967; Thu, 15 Feb 2024 10:04:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020274; cv=none; d=google.com; s=arc-20160816; b=Mn1mTUJjI7+ekHSkdf0gp4KIBsQ48FSQqqo1SAcM1f7t3YAkAKvi8TR0WVUxTOECxP QJK6GpQ1bvXhe4CR44L6N6DENdC4zhby5p1tD4XcAYm3uwiarE01bOMGsMr6eck8IcPf LC7YQbWxO+UKQcI2ZPZ4j31Q5xQ+qUTv+jXHbUO6fYrdeq5ZclJvEa6jGLnrp/Z8zka+ 4Zy4kv/pPzxHbGBCufuBys9BvkOO0xwmTJmc3JOmzbPK8rz1x9wv6dz4GcY7zMETVMEY XN7Lo9OIf6VzgUILWadfcSEZs8/tb030W6f+668Qr3uOZluQVAjC5LmbagDrEOhPyc8E WuFg== 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=d24ptjop5v0vDtRVKzO4zmRV4raxlddQ2KCuegz4KuQ=; fh=eikLuBDhqEe/Afhf0KRrtX4TjUF4aR++WLZpzH37onU=; b=JnXZ+32Pbr6CTbdvqJtCHxCSES/9eRWUAlIFKGim6Mi5zp1GTWqtYu2SWG0MMcXvGJ IpJiICiN3Li4R3cIH9PQCKDASXYarBkyD8xsvXP/vB3PPFIo56I5cLJAFbGH/21jEaQb w7MeSKeMrFA2hGTsoBME6Ss/V+rnKlPAtn+dcAZk7Mx/FL3l45cb9A6LFdx0JqTgwecW uMrddp1GSvjQuzIXx6RBMBL1iIVFUyfjqY6xmUhwhFJ9pyH2E4U0qlDy8/Sd/acDc/7O qCuKn/TbPU4/ElDQlC4M++5c+OR8zmyCaLbiOwjqvYHWCg/4RiSpsEiNBcvvWCWgPulq L39A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iE1pr4Ad; 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 ia17-20020a0561024b1100b0046d1ca8be8fsi404668vsb.138.2024.02.15.10.04.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:04:33 -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=iE1pr4Ad; 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 1rag41-0004Z6-2Z; Thu, 15 Feb 2024 13:02:25 -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 1rag3Y-0003JH-Uj for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:01:58 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag3T-0002e1-Qv for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:01:56 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-410ca9e851bso9273655e9.3 for ; Thu, 15 Feb 2024 10:01:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020109; x=1708624909; 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=d24ptjop5v0vDtRVKzO4zmRV4raxlddQ2KCuegz4KuQ=; b=iE1pr4AdBSs5B4LHUVicwSvRTLthFEBDiRbnz0Isko64bZsM3CqB46gUyW0vDZORJg XD3ZoywU/irnjJUmju++FF7OagnN07+bSym5iUEP5IrO0bZsU+zVkSG7xXOfbaEU1ARC NkKbnrI7UnjRihnJNh6J0OnHaT1OfLdFVEr6jrWLz+84b0M01M4Yy4e/BZqfS7YhlUza 0vcx+QAuM1hPd1uxkYIjPJsh7PvlduvrR2AkD4NC42qOABDxfBdT+6/jvzviN7l/el1H BuO3TC5xiF+W0CrjdjdhZ3cSKE0xV/DK04fwNgzAFnNAiAi3m0hTWpdnjeD9DUo57Mam v3gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020109; x=1708624909; 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=d24ptjop5v0vDtRVKzO4zmRV4raxlddQ2KCuegz4KuQ=; b=h9x2xATV+fpjsu9bdyYBcGdcVwIQNMSpA7X9g1Ovd10vcRbcXPOaETgt+rXO3S6/O9 x1nvNWCxyzEU60YsIzgGrCtuTaehK6as70ISHzgy0rraB5OQz7mqa0Iy+sXq8d7aaS+x bWKu888qqqrXwmZunlrunIcjQnTyvd2cJgnyq8lNEWg87yJQnhfai3IJnV+HjOTmzZYP Xl5vfUl2IED+OaXdHl91y1P9kgt38mTN/MfkD9IuQs2VlveL3BpxqV7TcLMXt3dDOUXK vZvuo6NkyG5gr2xLymLOq69tA+odtfOFk0o7uTdiNawtDF5iYF3Y/RCfcyGbqOZJ3Srp KoBA== X-Gm-Message-State: AOJu0YxZqJAmN6M9MXp2nbZSsJklYUFa7CsyRwKPLkvFXYA6YO0yolms O0WSVTlcbNNBLlxkzVEp+B4d3dgJ+c93tocUswecK7AALRoBsnpLCSxXGeBsNPsd9qMu/1ag9KA zx4g= X-Received: by 2002:a5d:4491:0:b0:33b:87a0:3af with SMTP id j17-20020a5d4491000000b0033b87a003afmr1863512wrq.67.1708020108771; Thu, 15 Feb 2024 10:01:48 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id bu23-20020a056000079700b0033cdf4bea19sm2621169wrb.9.2024.02.15.10.01.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:01:48 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Cl=C3=A9ment_Chigot?= , Frederic Konrad , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 35/56] hw/intc/grlib_irqmp: implements the multiprocessor status register Date: Thu, 15 Feb 2024 18:57:29 +0100 Message-ID: <20240215175752.82828-36-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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 From: Clément Chigot This implements the multiprocessor status register in grlib-irqmp and bind it to a start signal, which will be later wired in leon3-generic to start a cpu. The EIRQ and BA bits are not implemented. Based on https://gaisler.com/doc/gr712rc-usermanual.pdf, §8.3.5. Co-developed-by: Frederic Konrad Signed-off-by: Clément Chigot Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240131085047.18458-4-chigot@adacore.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/intc/grlib_irqmp.c | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/hw/intc/grlib_irqmp.c b/hw/intc/grlib_irqmp.c index 744cd64c58..1e073bd232 100644 --- a/hw/intc/grlib_irqmp.c +++ b/hw/intc/grlib_irqmp.c @@ -52,6 +52,10 @@ #define FORCE_OFFSET 0x80 #define EXTENDED_OFFSET 0xC0 +/* Multiprocessor Status Register */ +#define MP_STATUS_CPU_STATUS_MASK ((1 << IRQMP_MAX_CPU)-2) +#define MP_STATUS_NCPU_SHIFT 28 + #define MAX_PILS 16 OBJECT_DECLARE_SIMPLE_TYPE(IRQMP, GRLIB_IRQMP) @@ -65,6 +69,7 @@ struct IRQMP { unsigned int ncpus; IRQMPState *state; + qemu_irq start_signal[IRQMP_MAX_CPU]; qemu_irq irq; }; @@ -72,6 +77,7 @@ struct IRQMPState { uint32_t level; uint32_t pending; uint32_t clear; + uint32_t mpstatus; uint32_t broadcast; uint32_t mask[IRQMP_MAX_CPU]; @@ -182,10 +188,12 @@ static uint64_t grlib_irqmp_read(void *opaque, hwaddr addr, return state->force[0]; case CLEAR_OFFSET: - case MP_STATUS_OFFSET: /* Always read as 0 */ return 0; + case MP_STATUS_OFFSET: + return state->mpstatus; + case BROADCAST_OFFSET: return state->broadcast; @@ -224,8 +232,9 @@ static uint64_t grlib_irqmp_read(void *opaque, hwaddr addr, static void grlib_irqmp_write(void *opaque, hwaddr addr, uint64_t value, unsigned size) { - IRQMP *irqmp = opaque; + IRQMP *irqmp = opaque; IRQMPState *state; + int i; assert(irqmp != NULL); state = irqmp->state; @@ -258,7 +267,18 @@ static void grlib_irqmp_write(void *opaque, hwaddr addr, return; case MP_STATUS_OFFSET: - /* Read Only (no SMP support) */ + /* + * Writing and reading operations are reversed for the CPU status. + * Writing "1" will start the CPU, but reading "1" means that the CPU + * is power-down. + */ + value &= MP_STATUS_CPU_STATUS_MASK; + for (i = 0; i < irqmp->ncpus; i++) { + if ((value >> i) & 1) { + qemu_set_irq(irqmp->start_signal[i], 1); + state->mpstatus &= ~(1 << i); + } + } return; case BROADCAST_OFFSET: @@ -325,6 +345,8 @@ static void grlib_irqmp_reset(DeviceState *d) memset(irqmp->state, 0, sizeof *irqmp->state); irqmp->state->parent = irqmp; + irqmp->state->mpstatus = ((irqmp->ncpus - 1) << MP_STATUS_NCPU_SHIFT) | + ((1 << irqmp->ncpus) - 2); } static void grlib_irqmp_realize(DeviceState *dev, Error **errp) @@ -338,6 +360,13 @@ static void grlib_irqmp_realize(DeviceState *dev, Error **errp) } qdev_init_gpio_in(dev, grlib_irqmp_set_irq, MAX_PILS); + + /* + * Transitionning from 0 to 1 starts the CPUs. The opposite can't + * happen. + */ + qdev_init_gpio_out_named(dev, irqmp->start_signal, "grlib-start-cpu", + IRQMP_MAX_CPU); qdev_init_gpio_out_named(dev, &irqmp->irq, "grlib-irq", 1); memory_region_init_io(&irqmp->iomem, OBJECT(dev), &grlib_irqmp_ops, irqmp, "irqmp", IRQMP_REG_SIZE); From patchwork Thu Feb 15 17:57:30 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: 773000 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp969064wre; Thu, 15 Feb 2024 10:08:40 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVvymbVxHKIxxOLVrd8SFV0z0TPjSZAbZRZNRH6iIt9T77D4II1Uiy4H9vl2cPPirUDzzN4hlWsKpoA3CEWbd// X-Google-Smtp-Source: AGHT+IF+fh3ywdTP0ZdS6gmuStIKskvQCOVMy/8w5yhaYCnnzlRgpDTqcSDJnThU6bYNrdbXo4kZ X-Received: by 2002:a9d:664e:0:b0:6e2:f54c:adb7 with SMTP id q14-20020a9d664e000000b006e2f54cadb7mr2350663otm.15.1708020520541; Thu, 15 Feb 2024 10:08:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020520; cv=none; d=google.com; s=arc-20160816; b=UZLmew0bxo/IqQT3KccwHvoXTpsYySTlb9iKLwfyX+xSv7FLzcR/JvmmigyVrUCt5F VdjL5MN79zXgdQ0h3zprbDfg+NwHepjIRHpfJcgwOpalVPXS/VFhyffbSWIhICGVMsG3 Q3meT/ABAhZ4VNByGBEvh6XD0SAn2WAHV47fhFSzxm3gp8y8F6e8dWJ46aLbkulBZxyp djOl8Ri6zb2eYPIJIxCpUW/Rhy0ENCgmksJ+u0OavTl75FNB7ERkwRbEhO0N1KaFglWo l3iFkOqA8el3INKgBnw5DVGxZx8NXGivMh+mfxWDjGdS3znfi73lpjDGY7/Ru1DVOgZE ry2A== 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=avVErRmCHTD7s/Wno/RUxec7ez6aln5fuHfjB8LlDS4=; fh=r+mbcaIVBB+d5Ke8c8av/RXIbk1kcul/Ph9l9m3Dfks=; b=Cet12NYkE1S1DfV9Lba/cdU98Q6CibmVK7ezUaWtU759Zb0c32wJ62lGUuuXqyaGxx jlwkrdqKgqJnzo/rSNFNRAiSHd0CVUwID46yevLD1LWMO0teDaazRwaTfWWtDD8zA7a6 qUWAeZFSJcD+WiHnnfQBOp5MKf3h2plyzYgidhiwibZyjZ26JY7vVsKBbwopBDOmrCGw QAJ5Mkkdvuz1O1au4IGGQiiiFcXdS4Kjuma/lyXkRd/G/xwQv+vwhEDiu+HGDgPeMpJr 6ZrACPRiL9d7bPQoJSDhovi/Mj+r+qg9/tGXfQtnRw4+mKWRb3MCNN+JPth2CAgFbQJZ E4Eg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=muB9VQmX; 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 e3-20020a056102224300b004680ee88941si333830vsb.177.2024.02.15.10.08.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:08:40 -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=muB9VQmX; 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 1rag47-0005BD-Kr; Thu, 15 Feb 2024 13:02:31 -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 1rag3d-0003Nt-5h for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:02:01 -0500 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag3a-0002fL-6r for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:02:00 -0500 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2d11d17dddeso13844371fa.3 for ; Thu, 15 Feb 2024 10:01:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020116; x=1708624916; 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=avVErRmCHTD7s/Wno/RUxec7ez6aln5fuHfjB8LlDS4=; b=muB9VQmXoNWZB5wTWohU3kAoWKB41f9NiVeV/dmwSJJ5aanz7Vul3ZrowLzEFRfXFO 4srIsGsRcorAEylAnMqbjsjm/9POY02XOboYfMVNR0Ep+bdQmu1Ke7xHUs48x60GLd2P 3+cFjqkCvZIjVOGLx5f4oSf+EQxl1wf7qmdkTDFRjEPTIz2wXDEzhFUqpp/Wzdfz4A6N O/vJyx7EtBqr4lo366vmoeBw9T8XssOHkLA6fnHGbv3uqU8y2IYL4LdyZpgAVVjd4WoK hxM1PM9sF995WK81eJRRACYIQMQQMlqnYZXy9NKcDooaDWzirOc95dvUI7DJvy8Mx5Tw DVjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020116; x=1708624916; 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=avVErRmCHTD7s/Wno/RUxec7ez6aln5fuHfjB8LlDS4=; b=AqOEQlk9cz10pv8jGeiy7qoNgXNe4OUP9n2IK4+31tatzpY+TsvyzSZH5rOR2rrAvd i4/5UswPCD/XXjlkqNGIcD/4RhwGRPzw30wOxvx4n0WpgyxZ6v+2RGhXOT7i0Zw2/wPD m5HsTAESqP1i0cHnPNVflb/ekR/goTRUg1jOoGqYsqoQdemkCQvzfSHbHc5LOqca8tKi gufCgrjcgPuIREQocBtiL4TDkKGbcIFpOwilFJe6XqHxcANeiUUyOEbYLcvDjU0SAJ9q wg4lpe1tZdyDxImvjXGAQGqbGrFcQXX2NoJ5VR6tNYDkMBZgGaFhBUFrt+Tx9c19d2Q3 8NcA== X-Gm-Message-State: AOJu0YwGTYwNs9pqiAUqczcZjtz/YGdOk+mP8EM735WDKT6CxmjxlwYm 3cvI6wkHbiQvBF01777onXH2OPHEHIhxStpsO9sGvHdeG60ox29g5b68dOZHBc+TigKS+OOiZBZ 3POo= X-Received: by 2002:a05:651c:d3:b0:2d0:cead:83cb with SMTP id 19-20020a05651c00d300b002d0cead83cbmr1897443ljr.50.1708020116139; Thu, 15 Feb 2024 10:01:56 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id n9-20020a05600c294900b00410cc2f5550sm5662269wmd.19.2024.02.15.10.01.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:01:55 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Cl=C3=A9ment_Chigot?= , Frederic Konrad , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Mark Cave-Ayland , Artyom Tarasenko Subject: [PULL 36/56] hw/intc/grlib_irqmp: implements multicore irq Date: Thu, 15 Feb 2024 18:57:30 +0100 Message-ID: <20240215175752.82828-37-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::232; envelope-from=philmd@linaro.org; helo=mail-lj1-x232.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=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 From: Clément Chigot Now there is an ncpus property, use it in order to deliver the IRQ to multiple CPU. Co-developed-by: Frederic Konrad Signed-off-by: Clément Chigot Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240131085047.18458-5-chigot@adacore.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/intc/grlib_irqmp.h | 2 +- hw/intc/grlib_irqmp.c | 41 +++++++++++++++++------------------ hw/sparc/leon3.c | 3 ++- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/include/hw/intc/grlib_irqmp.h b/include/hw/intc/grlib_irqmp.h index c5a90cbb3e..a76acbf940 100644 --- a/include/hw/intc/grlib_irqmp.h +++ b/include/hw/intc/grlib_irqmp.h @@ -36,6 +36,6 @@ /* IRQMP */ #define TYPE_GRLIB_IRQMP "grlib-irqmp" -void grlib_irqmp_ack(DeviceState *dev, int intno); +void grlib_irqmp_ack(DeviceState *dev, unsigned int cpu, int intno); #endif /* GRLIB_IRQMP_H */ diff --git a/hw/intc/grlib_irqmp.c b/hw/intc/grlib_irqmp.c index 1e073bd232..144b121d48 100644 --- a/hw/intc/grlib_irqmp.c +++ b/hw/intc/grlib_irqmp.c @@ -70,7 +70,7 @@ struct IRQMP { unsigned int ncpus; IRQMPState *state; qemu_irq start_signal[IRQMP_MAX_CPU]; - qemu_irq irq; + qemu_irq irq[IRQMP_MAX_CPU]; }; struct IRQMPState { @@ -89,37 +89,35 @@ struct IRQMPState { static void grlib_irqmp_check_irqs(IRQMPState *state) { - uint32_t pend = 0; - uint32_t level0 = 0; - uint32_t level1 = 0; + int i; assert(state != NULL); assert(state->parent != NULL); - /* IRQ for CPU 0 (no SMP support) */ - pend = (state->pending | state->force[0]) - & state->mask[0]; + for (i = 0; i < state->parent->ncpus; i++) { + uint32_t pend = (state->pending | state->force[i]) & state->mask[i]; + uint32_t level0 = pend & ~state->level; + uint32_t level1 = pend & state->level; - level0 = pend & ~state->level; - level1 = pend & state->level; + trace_grlib_irqmp_check_irqs(state->pending, state->force[i], + state->mask[i], level1, level0); - trace_grlib_irqmp_check_irqs(state->pending, state->force[0], - state->mask[0], level1, level0); - - /* Trigger level1 interrupt first and level0 if there is no level1 */ - qemu_set_irq(state->parent->irq, level1 ?: level0); + /* Trigger level1 interrupt first and level0 if there is no level1 */ + qemu_set_irq(state->parent->irq[i], level1 ?: level0); + } } -static void grlib_irqmp_ack_mask(IRQMPState *state, uint32_t mask) +static void grlib_irqmp_ack_mask(IRQMPState *state, unsigned int cpu, + uint32_t mask) { /* Clear registers */ state->pending &= ~mask; - state->force[0] &= ~mask; /* Only CPU 0 (No SMP support) */ + state->force[cpu] &= ~mask; grlib_irqmp_check_irqs(state); } -void grlib_irqmp_ack(DeviceState *dev, int intno) +void grlib_irqmp_ack(DeviceState *dev, unsigned int cpu, int intno) { IRQMP *irqmp = GRLIB_IRQMP(dev); IRQMPState *state; @@ -133,7 +131,7 @@ void grlib_irqmp_ack(DeviceState *dev, int intno) trace_grlib_irqmp_ack(intno); - grlib_irqmp_ack_mask(state, mask); + grlib_irqmp_ack_mask(state, cpu, mask); } static void grlib_irqmp_set_irq(void *opaque, int irq, int level) @@ -159,7 +157,6 @@ static void grlib_irqmp_set_irq(void *opaque, int irq, int level) s->pending |= 1 << irq; } grlib_irqmp_check_irqs(s); - } } @@ -263,7 +260,9 @@ static void grlib_irqmp_write(void *opaque, hwaddr addr, case CLEAR_OFFSET: value &= ~1; /* clean up the value */ - grlib_irqmp_ack_mask(state, value); + for (i = 0; i < irqmp->ncpus; i++) { + grlib_irqmp_ack_mask(state, i, value); + } return; case MP_STATUS_OFFSET: @@ -367,7 +366,7 @@ static void grlib_irqmp_realize(DeviceState *dev, Error **errp) */ qdev_init_gpio_out_named(dev, irqmp->start_signal, "grlib-start-cpu", IRQMP_MAX_CPU); - qdev_init_gpio_out_named(dev, &irqmp->irq, "grlib-irq", 1); + qdev_init_gpio_out_named(dev, irqmp->irq, "grlib-irq", irqmp->ncpus); memory_region_init_io(&irqmp->iomem, OBJECT(dev), &grlib_irqmp_ops, irqmp, "irqmp", IRQMP_REG_SIZE); diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index bc6a85be9c..3f86b74ba4 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -169,7 +169,8 @@ static void leon3_cache_control_int(CPUSPARCState *env) static void leon3_irq_ack(CPUSPARCState *env, int intno) { - grlib_irqmp_ack(env->irq_manager, intno); + /* No SMP support yet, only CPU #0 available so far. */ + grlib_irqmp_ack(env->irq_manager, 0, intno); } /* From patchwork Thu Feb 15 17:57:31 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: 772962 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp965721wre; Thu, 15 Feb 2024 10:03:13 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVLhdo5Nqo2QHBdSHmYc0yFOxSKAgj8aMPzMN6peDH5o/pclyMiZMacf+bIDxRbop9fApuBpMai1tOxQdXteDbq X-Google-Smtp-Source: AGHT+IFyCS+6SbT3fBOlResMfR/DvuxeJSGuLglksKlD1NR4NvEYiZsWVotVya6pi9dmhxzNQbnN X-Received: by 2002:a05:6808:1a23:b0:3c1:34f8:718e with SMTP id bk35-20020a0568081a2300b003c134f8718emr2732022oib.44.1708020193130; Thu, 15 Feb 2024 10:03:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020193; cv=none; d=google.com; s=arc-20160816; b=UaxeUWkpp/V2m2AXgWMnq6QtYoCGcd0LL98o2POZIVCxKCfi0J+NPW1zs1A6/KJCet S17M0kerejwlcZfVhxCwum6QXWcFJf5K91otjEPa54OZYP/h2+yB92hEGY7L2E5cJX4F 7aHrf+LKMT3WVDUeq8GAiGHICqdIDq/Lym5V2QHMNq0EVFQ+0RGEx1Gk63rH+qd1yE8p AVRxZWEfknkCgwnklXWLpuHkBXoUVmVCtqYbR8wQaloWn06lgfr4/V2H9PdKUNCDSXkZ CaAfcSbQnRcauRLja9NIl+FR0wJo8HU0UrRQ1Nguf//U3YvOPlf+2KX3GQHQFq02kFE8 +mmw== 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=RoJzuCIrsH01JQMu3l4P7H0/BC0QIRTQUaRRKiYrvbM=; fh=WGcgxIKBd9U7zIyzPOKbuvzWkA5/ELpsUvf7vwEAQ2I=; b=InBGW6utSv2NK3TyrbiHdWYCirTjvurpwiCe/HpLjH2NPL3AMrZV9MPBM51i5mDgT2 6rKXFPRi2bJ2A+ay2kjorYtZIS1NV3ErC+FzlwVJRxhg3AcjKjuHLHHBABs5VHQIi+Hm 8pKosEK3VEdl/oWtYV5YDuGCDiXxOLnO9q3kiYKVAld9kRZ7fnXxLxp8B3Wdo4NH4Hc/ Rz5A3zs050qcupbzk8Y5r+0qSpzVLXKOrNv6L++gLOXDldDd8F7HfHu97MPBnZUKpf9M n170tTRPJzhmKWER4288kDO3jMPav78bT04inLg7rOlRA7C1Ob/c65Hy3CUPGPonAtLD GarQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fqs7eixh; 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 e14-20020ab0168e000000b007cd620ccbf9si372812uaf.101.2024.02.15.10.03.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:03:13 -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=fqs7eixh; 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 1rag41-0004aC-8P; Thu, 15 Feb 2024 13:02:26 -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 1rag3q-0003le-00 for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:02:15 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag3j-0002h2-JK for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:02:12 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-411d715c401so9345115e9.1 for ; Thu, 15 Feb 2024 10:02:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020123; x=1708624923; 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=RoJzuCIrsH01JQMu3l4P7H0/BC0QIRTQUaRRKiYrvbM=; b=fqs7eixhayUIsPWPvQepdXb4+b3Q/AKm0bqu4nUJF88Wunnu/VmZ7knY0hzfTtZ/jf I2K6potT9qLPHozHAuRfsGztBuPO44CXC0zHZ4WMBPtCQ1atr3BaIPk70H79SysylFv3 pfT6AKbffZkTwn0oV8R2Qq3TnE1EDgh8LAgawfJS9/3PRM0CpRwkeOYbxLZTtRK8p8TT c+1rP0d8JJokwJEi/cc9ExEMNWoBX9T2oYwd6digUxGYlO5zPp5bZ3W+1HVGlhfRkyrz jS7tV5+w0TfrY7wDmg39Gbv9WDY3QYqGHAqp4o4OZHIAsnSSa0gcagfEfk6a6QcbMM3Z mfRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020123; x=1708624923; 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=RoJzuCIrsH01JQMu3l4P7H0/BC0QIRTQUaRRKiYrvbM=; b=lnKnpuCW6vtCJ6PqRa14mugFQsMag/dkqudEEswfVy6DXC4W12DtUnEo6Fn81O3tty cHyDkutTH2B8SDAXPMxzMTweEwu53JyL7wPbJmlScWbC/S/JBjOFYd82ad/1uRllroON cNfipkuzpNmFz6cwvHq2E922k2/s9NYZF0co7vTegl/TEp7+eIihbzNe/992j9Ch8MPb QQAHAJ2pICG6EFOK0Kpry+MlffOU+8jWOdf4xRZJGZ5QbyFO9W6tx5JAsdCNcX+IttvQ pccBMbnBrQSpnmyQkmv+JkXyWEspfLnvkKHj9XXRjkQzTHN7akCEY6F6rJktzJ3XL4/d BbAA== X-Gm-Message-State: AOJu0YwR/ANuo/j/I2PwOTuhRaJLLSxJkKhmhGMMGgLQ/nbn+K7/ayad S5c/t3JQ0BK5BAhd4AWwEu2j35vJeblA2/6UG98TZtSCvbvFlfKCH/ckzMNi4zT9yFuRHdbIXzY RCCk= X-Received: by 2002:a05:600c:198f:b0:40f:ddc8:f804 with SMTP id t15-20020a05600c198f00b0040fddc8f804mr1666036wmq.17.1708020122980; Thu, 15 Feb 2024 10:02:02 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id i7-20020a05600c290700b00410add3af79sm5649214wmd.23.2024.02.15.10.02.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:02:02 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Cl=C3=A9ment_Chigot?= , Frederic Konrad , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Mark Cave-Ayland , Artyom Tarasenko Subject: [PULL 37/56] target/sparc: implement asr17 feature for smp Date: Thu, 15 Feb 2024 18:57:31 +0100 Message-ID: <20240215175752.82828-38-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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=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 From: Clément Chigot This allows the guest program to know its cpu id. Co-developed-by: Frederic Konrad Signed-off-by: Clément Chigot Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240131085047.18458-6-chigot@adacore.com> Signed-off-by: Philippe Mathieu-Daudé --- target/sparc/helper.h | 1 + target/sparc/helper.c | 16 ++++++++++++++++ target/sparc/translate.c | 13 +++---------- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/target/sparc/helper.h b/target/sparc/helper.h index 6a42ba4e9e..e55fad5b8c 100644 --- a/target/sparc/helper.h +++ b/target/sparc/helper.h @@ -2,6 +2,7 @@ DEF_HELPER_1(rett, void, env) DEF_HELPER_2(wrpsr, void, env, tl) DEF_HELPER_1(rdpsr, tl, env) +DEF_HELPER_1(rdasr17, tl, env) DEF_HELPER_1(power_down, void, env) #else DEF_HELPER_FLAGS_2(wrpil, TCG_CALL_NO_RWG, void, env, tl) diff --git a/target/sparc/helper.c b/target/sparc/helper.c index bd10b60e4b..2247e243b5 100644 --- a/target/sparc/helper.c +++ b/target/sparc/helper.c @@ -212,4 +212,20 @@ void helper_power_down(CPUSPARCState *env) env->npc = env->pc + 4; cpu_loop_exit(cs); } + +target_ulong helper_rdasr17(CPUSPARCState *env) +{ + CPUState *cs = env_cpu(env); + target_ulong val; + + /* + * TODO: There are many more fields to be filled, + * some of which are writable. + */ + val = env->def.nwindows - 1; /* [4:0] NWIN */ + val |= 1 << 8; /* [8] V8 */ + val |= (cs->cpu_index) << 28; /* [31:28] INDEX */ + + return val; +} #endif diff --git a/target/sparc/translate.c b/target/sparc/translate.c index d9304a5bc4..692ce0b010 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -37,6 +37,7 @@ #ifdef TARGET_SPARC64 # define gen_helper_rdpsr(D, E) qemu_build_not_reached() +# define gen_helper_rdasr17(D, E) qemu_build_not_reached() # define gen_helper_rett(E) qemu_build_not_reached() # define gen_helper_power_down(E) qemu_build_not_reached() # define gen_helper_wrpsr(E, S) qemu_build_not_reached() @@ -2382,16 +2383,8 @@ static bool trans_RDY(DisasContext *dc, arg_RDY *a) static TCGv do_rd_leon3_config(DisasContext *dc, TCGv dst) { - uint32_t val; - - /* - * TODO: There are many more fields to be filled, - * some of which are writable. - */ - val = dc->def->nwindows - 1; /* [4:0] NWIN */ - val |= 1 << 8; /* [8] V8 */ - - return tcg_constant_tl(val); + gen_helper_rdasr17(dst, tcg_env); + return dst; } TRANS(RDASR17, ASR17, do_rd_special, true, a->rd, do_rd_leon3_config) From patchwork Thu Feb 15 17:57:32 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: 772995 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp968801wre; Thu, 15 Feb 2024 10:08:14 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUJBZU4YvSoWc0PggzKLqJ0xfA/F1JKgYv/BJ3H9SsESeXyCzOswU4/nXjG7oWWhWYpk2xh6amZsZnvvitTFxvq X-Google-Smtp-Source: AGHT+IF7nvSmmHwoKZQCspSRl09XOmTRZLg916apsdJRnz1isdtN+iTUPyZUHDUOXyGN1Sxeak6w X-Received: by 2002:a05:6214:5d91:b0:68e:e4e0:1d70 with SMTP id mf17-20020a0562145d9100b0068ee4e01d70mr2946055qvb.25.1708020494155; Thu, 15 Feb 2024 10:08:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020494; cv=none; d=google.com; s=arc-20160816; b=gpt6j37hCicgFqw8kxxJeaTpTOHDpr0D8X8pF/rYVFD89dnWsbzrMHojaT54hboxwJ L0Wn0AmAIjGk4XGOsLHjT7HMCsvl9bKoiODRETrnewn+uy4OQp8dlq9WiOyKdfhKdtam hwItiryo9qIxE50YHyIu5hc3cT6PC11RtuAHiDhRw6ebN3a3G4ZAfeEv0KpCIUJ4d9i1 s+z/AIMNS4K1WMmblsFqkQ0JfoDWBWquFITMcGe2dH5l8yvyOb9n9/KftkB9UW4OdWSs 6zs4EMAT0E7WuYJK7neoFzycjZj4nnMEdmHlnc8TnunQW/7eAjymOhDfH4mIrQ8RMXfk TNeA== 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=3Ln9r8XNhJVHTgj0Hz40GMoWqZy7m2Vo8THZL+0Jl3w=; fh=E4YAJaSvbOqvBPr1eyyeiwk7f81aTdmiXfceOa2hJ1Y=; b=YzhWORB8qBx79g+1/C8rwgPkuJJLQc2q7a7k4fM96v+vVyiONPFbvUUAjO0ht2XqMk Jt35xj1lOTSU3NYSmOiuhx5fQQEzcvyyus7baiADLrmiQZGNmU6YusfyivTw09JtT13y 0XYyHmCpVFoKJr+l0kWfOw9Q8XB6qRQh2iGhBEB+hH9wI8vcSr3CJFZDWQabB4tN3c88 foVD2Uh31a1VoEPDcvJYanyxACsvt3nRnj0S2CtPsn9AcgE2QcsgU/DMb3lVOtDALs2V AOTyWbLag+sKNdbsuXSQOX2kBqZw2W3qNE2Iq0zyTvnb2GpA055hzsGGOHk6sRnZfkBK Es6A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pE9DYsib; 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 o12-20020ad45c8c000000b0068ee633cdc8si2020005qvh.193.2024.02.15.10.08.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:08:14 -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=pE9DYsib; 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 1rag47-0005Bz-Pm; Thu, 15 Feb 2024 13:02:31 -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 1rag3x-00048F-06 for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:02:22 -0500 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag3n-0002jV-J4 for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:02:20 -0500 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2d11d17dddeso13848171fa.3 for ; Thu, 15 Feb 2024 10:02:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020130; x=1708624930; 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=3Ln9r8XNhJVHTgj0Hz40GMoWqZy7m2Vo8THZL+0Jl3w=; b=pE9DYsibGvT54p/Xfu7wHXKfOu2lttBIO+Z00OIqVsxYuFgNQJ/sXukfN8mssJ5Rf8 RrUZ6/n5SK+ZH2YB6Hut54Cn8fQ6azoEFl8EG96I0OWG+b7YfBBj9NCG9HM9l9J8dcx2 M8NBFG66bhgepIAaHC4f7Yjx+jQebyfOi/w0dmGb02dl9R/ZsHI+oKczGpsHV96AF7Hm zvvEb+yDlMZNkPPffyfEYFpsJwjlrl0Df0Fd5cwa/CDDMC2Xhqkh6J6F7K6CCASLBJKG vwMMUrM6r3OArjlQNrnPyumBJAtcDdW/5PO3fkQue7/axISiNytLKXB0L9+nJCiZm8hn JiRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020130; x=1708624930; 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=3Ln9r8XNhJVHTgj0Hz40GMoWqZy7m2Vo8THZL+0Jl3w=; b=jUNcQnQbMvrRADBlpS2gIOaG29H/QGDfc1X2cNo4CKlPc7me+mvRF1M+XNAvOvYSSa EnKPOJAMC/AsvBrQguiv2ee0cXSEN4TkbhW+qQxQT627uiAskPTNMt5x8JVV1xtA/kLW GokfoJdeRCIv+wrkZp9TyPKf2kYSKKBAQ/XzmVJrbDK/oxkIveNNVeLAoTDoXqTqdTv1 aJxx/blRPjNi3rDrwYubVyyWxbCNX0lZmj2l6LKi00BuEoORXsYuR2mvQronIik94A3L Mex4n8VVe5oiTdOMOcEESa7IjeLR1NcJmq+I3DAZvSbpR03hKEIv8CsBCP3H9Pze7szD SMUw== X-Gm-Message-State: AOJu0Yyp1houKtHUblKfO1wR8XZUT/osPxf/q/nPB79/C/+Or45Z/teh SiYY7sg1XJ2v7v4ypZamQ1YuGKK0o1ucD04NRAOeelQroGwjq9oCLl5baQxbO5KD4HCX+UODZia 11es= X-Received: by 2002:a2e:b8c8:0:b0:2d0:c77c:b1ca with SMTP id s8-20020a2eb8c8000000b002d0c77cb1camr2205587ljp.49.1708020129688; Thu, 15 Feb 2024 10:02:09 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id o4-20020a05600c4fc400b00411d0b58056sm2900310wmq.5.2024.02.15.10.02.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:02:09 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Cl=C3=A9ment_Chigot?= , =?utf-8?q?Philippe_Ma?= =?utf-8?q?thieu-Daud=C3=A9?= , Frederic Konrad , Mark Cave-Ayland , Artyom Tarasenko Subject: [PULL 38/56] hw/sparc/leon3: remove SP initialization Date: Thu, 15 Feb 2024 18:57:32 +0100 Message-ID: <20240215175752.82828-39-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::231; envelope-from=philmd@linaro.org; helo=mail-lj1-x231.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=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 From: Clément Chigot According to the doc (see §4.2.15 in [1]), the reset operation should not impact %SP. [1] https://gaisler.com/doc/gr712rc-usermanual.pdf Signed-off-by: Clément Chigot Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240131085047.18458-7-chigot@adacore.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc/leon3.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 3f86b74ba4..46fc1e783a 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -69,7 +69,6 @@ typedef struct ResetData { SPARCCPU *cpu; uint32_t entry; /* save kernel entry in case of reset */ - target_ulong sp; /* initial stack pointer */ } ResetData; static uint32_t *gen_store_u32(uint32_t *code, hwaddr addr, uint32_t val) @@ -135,7 +134,6 @@ static void main_cpu_reset(void *opaque) cpu->halted = 0; env->pc = s->entry; env->npc = s->entry + 4; - env->regbase[6] = s->sp; } static void leon3_cache_control_int(CPUSPARCState *env) @@ -246,7 +244,6 @@ static void leon3_generic_hw_init(MachineState *machine) /* Reset data */ reset_info = g_new0(ResetData, 1); reset_info->cpu = cpu; - reset_info->sp = LEON3_RAM_OFFSET + ram_size; qemu_register_reset(main_cpu_reset, reset_info); ahb_pnp = GRLIB_AHB_PNP(qdev_new(TYPE_GRLIB_AHB_PNP)); From patchwork Thu Feb 15 17:57:33 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: 772966 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp966243wre; Thu, 15 Feb 2024 10:04:03 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUqNLe7QLxD56qksQ4WM1iYrkLroUPKdpZ1IiIPzpybHJe6ohHWXtNeSi+009R3BvcvTTX52H3zBzu8tcnUCnce X-Google-Smtp-Source: AGHT+IHERhrTqP4jboVbgxSUVTrEU2Kzll84jb8m3ikfBRyOX5MVVatD8LMqeJwWehn6knwq/CNm X-Received: by 2002:a81:4523:0:b0:607:eed3:5490 with SMTP id s35-20020a814523000000b00607eed35490mr714604ywa.0.1708020243009; Thu, 15 Feb 2024 10:04:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020242; cv=none; d=google.com; s=arc-20160816; b=GZAHaxexnFKpjb+I2DXK/Cfj/v3Du1pDMus3JyTRIIYTV1VL5fj2Ip3O6/JdcGmgRz nRbKp+dlRrnlOtsHT0YbRJWIEM8WuSE1zW5SPuTA1R3eLoTDfomCl0x86Kb0jh/OxEvR 8+0bLRPFqM/f56i9Zq9JLQJvQgT5xbaewf10yxACAWLhRrEw2IYY2jWvVJQbdPOgFGS4 QRn/2NPIpDi4S7ZVq3RsH3qAyzvqSqVAh2s3biQ7VZKtO+/hL3u2F/LcC3qhVLWTzqUo /xOSYma2kiTtPud/OvxIVmsSaj69vnYB5EiettWhPGSs50z9OBK/KETHbBx0nkUQJa9T QGJw== 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=B/qyviN7UEniUAjJrEM78E18kGldAh1UYReZhCV2+9Q=; fh=r+mbcaIVBB+d5Ke8c8av/RXIbk1kcul/Ph9l9m3Dfks=; b=afTj9oSlM3EzqNkVmNzDgSc1O+CSExMKGiGO6cKEFsqDNNcEz8PIHJagvuQpaWTgc6 lterJP62fNSsexrSELNwOwuiT3UMwI1OaoBQANQONyslhNzM+WXk1ZRhYTvA8ET5em7b amelBvk852uuLHhRm9wvgYQbXiMtl0da5ohzafsYQk2Iwzg2rfHTEq8eRLlp72BXJP/q SMPPc2+aQ0Z2ieobxWfJTXo1rtnoXfjo6tD6WoTugUhy+Hl8DzSoXRV5GB3xcSJcSPx2 Vz8Env0FbEsSNuI71teUuNuU6YB5Jczj6URbGPXTvL3SnJ2tDnTp1/yOfaeysc9Ibx2T VkUw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="boHR/BQv"; 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 m34-20020a81ae22000000b00607a0e12e73si848415ywh.41.2024.02.15.10.04.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:04:02 -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="boHR/BQv"; 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 1rag4E-00064k-J3; Thu, 15 Feb 2024 13:02:38 -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 1rag45-0004wi-SX for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:02:29 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag3v-0002kv-Bl for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:02:29 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-411fc50e4e9so9096655e9.0 for ; Thu, 15 Feb 2024 10:02:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020137; x=1708624937; 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=B/qyviN7UEniUAjJrEM78E18kGldAh1UYReZhCV2+9Q=; b=boHR/BQv/TTYxJ1oojx2zlSSu1DXQ4CEXywoatXmEhbzR5brITQz6OmD+fBl5kL8G0 L00qmTP3oPzuWvnbLHSPIRQFG2tvSh/j3vo+SiWngOfi1prFqQKyaAlq2zknmHh48Iyf XjL0IiOx1P7VgVhH2+mHCxTSInX2yjJfXETnUxNOUVZa7fPrcHezdbGTpHp8WDe2zqOk Cn9BxriecpEij36z6PkB5lGqMYp1JgcfiD7TpBSjnaSsBTnq/ruui/SgUulfSlujVEOl h9u4MT3bXz9yJYJL3rRGr8647OIj8m+L8gQJ2AUrTWPX5uvdjQKfMJ8a+a20P4F32SCZ bNOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020137; x=1708624937; 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=B/qyviN7UEniUAjJrEM78E18kGldAh1UYReZhCV2+9Q=; b=lQsJqKnvURlgdGaWsee3TYD2R91UOMf3GH/B/HXB2bOEygVx18tSR1kHJLyr4F4TZF QqKIxKohS+83aL8VDjCt29cXQoRQwONZqn5N7d9zV3XLvGzfz00nkvx4YHlzRkRnusEo nzSiH0yt1ZFrLmC3Q5PVFevCF7hT3l6h31grbgTfIX3va9tCUKdUA/NcZgUki+91kkV5 S4nLQXLa3nDy1NazinnhXMLFaIRSV3I0gm4x0iANv16yjhugRI1pFgUDf1kqQlQTaRNt gffv+z3fDXpyiRnr+u8ixvAQEoJnq8GfVLuB86+ecB4e/1u/eu+ulYlf44C6g0OnDC7P bbAA== X-Gm-Message-State: AOJu0YwusMun8V7UzIsXqXF90p8lh9Eo/ayJ6a9FXGeh/qH5KG/9xTN0 ieKb3TvfbFZXxgAfexw6lkOzgnGzmnKQ50uYsFruwmFTruzdojrrhFFl1z2MS9SMJ7J6Mi1rg0a EhjM= X-Received: by 2002:adf:f50e:0:b0:33b:304d:36b7 with SMTP id q14-20020adff50e000000b0033b304d36b7mr2015794wro.56.1708020136423; Thu, 15 Feb 2024 10:02:16 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id bt13-20020a056000080d00b0033d1739aedbsm18872wrb.95.2024.02.15.10.02.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:02:15 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Cl=C3=A9ment_Chigot?= , Frederic Konrad , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Mark Cave-Ayland , Artyom Tarasenko Subject: [PULL 39/56] hw/sparc/leon3: implement multiprocessor Date: Thu, 15 Feb 2024 18:57:33 +0100 Message-ID: <20240215175752.82828-40-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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 From: Clément Chigot This allows to register more than one CPU on the leon3_generic machine. Co-developed-by: Frederic Konrad Signed-off-by: Clément Chigot Message-ID: <20240131085047.18458-8-chigot@adacore.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc/leon3.c | 93 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 68 insertions(+), 25 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 46fc1e783a..1637900162 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -54,6 +54,8 @@ #define LEON3_PROM_OFFSET (0x00000000) #define LEON3_RAM_OFFSET (0x40000000) +#define MAX_CPUS 4 + #define LEON3_UART_OFFSET (0x80000100) #define LEON3_UART_IRQ (3) @@ -67,8 +69,11 @@ #define LEON3_AHB_PNP_OFFSET (0xFFFFF000) typedef struct ResetData { - SPARCCPU *cpu; - uint32_t entry; /* save kernel entry in case of reset */ + struct CPUResetData { + int id; + SPARCCPU *cpu; + } info[MAX_CPUS]; + uint32_t entry; /* save kernel entry in case of reset */ } ResetData; static uint32_t *gen_store_u32(uint32_t *code, hwaddr addr, uint32_t val) @@ -123,17 +128,19 @@ static void write_bootloader(void *ptr, hwaddr kernel_addr) stl_p(p++, 0x01000000); /* nop */ } -static void main_cpu_reset(void *opaque) +static void leon3_cpu_reset(void *opaque) { - ResetData *s = (ResetData *)opaque; - CPUState *cpu = CPU(s->cpu); - CPUSPARCState *env = &s->cpu->env; + struct CPUResetData *info = (struct CPUResetData *) opaque; + int id = info->id; + ResetData *s = (ResetData *)DO_UPCAST(ResetData, info[id], info); + CPUState *cpu = CPU(s->info[id].cpu); + CPUSPARCState *env = cpu_env(cpu); cpu_reset(cpu); - cpu->halted = 0; - env->pc = s->entry; - env->npc = s->entry + 4; + cpu->halted = cpu->cpu_index != 0; + env->pc = s->entry; + env->npc = s->entry + 4; } static void leon3_cache_control_int(CPUSPARCState *env) @@ -167,8 +174,8 @@ static void leon3_cache_control_int(CPUSPARCState *env) static void leon3_irq_ack(CPUSPARCState *env, int intno) { - /* No SMP support yet, only CPU #0 available so far. */ - grlib_irqmp_ack(env->irq_manager, 0, intno); + CPUState *cpu = CPU(env_cpu(env)); + grlib_irqmp_ack(env->irq_manager, cpu->cpu_index, intno); } /* @@ -210,6 +217,19 @@ static void leon3_set_pil_in(void *opaque, int n, int level) } } +static void leon3_start_cpu_async_work(CPUState *cpu, run_on_cpu_data data) +{ + cpu->halted = 0; +} + +static void leon3_start_cpu(void *opaque, int n, int level) +{ + CPUState *cs = CPU(opaque); + + assert(level == 1); + async_run_on_cpu(cs, leon3_start_cpu_async_work, RUN_ON_CPU_NULL); +} + static void leon3_irq_manager(CPUSPARCState *env, int intno) { leon3_irq_ack(env, intno); @@ -235,16 +255,20 @@ static void leon3_generic_hw_init(MachineState *machine) AHBPnp *ahb_pnp; APBPnp *apb_pnp; - /* Init CPU */ - cpu = SPARC_CPU(cpu_create(machine->cpu_type)); - env = &cpu->env; + reset_info = g_malloc0(sizeof(ResetData)); - cpu_sparc_set_id(env, 0); + for (i = 0; i < machine->smp.cpus; i++) { + /* Init CPU */ + cpu = SPARC_CPU(cpu_create(machine->cpu_type)); + env = &cpu->env; - /* Reset data */ - reset_info = g_new0(ResetData, 1); - reset_info->cpu = cpu; - qemu_register_reset(main_cpu_reset, reset_info); + cpu_sparc_set_id(env, i); + + /* Reset data */ + reset_info->info[i].id = i; + reset_info->info[i].cpu = cpu; + qemu_register_reset(leon3_cpu_reset, &reset_info->info[i]); + } ahb_pnp = GRLIB_AHB_PNP(qdev_new(TYPE_GRLIB_AHB_PNP)); sysbus_realize_and_unref(SYS_BUS_DEVICE(ahb_pnp), &error_fatal); @@ -262,14 +286,28 @@ static void leon3_generic_hw_init(MachineState *machine) /* Allocate IRQ manager */ irqmpdev = qdev_new(TYPE_GRLIB_IRQMP); + object_property_set_int(OBJECT(irqmpdev), "ncpus", machine->smp.cpus, + &error_fatal); sysbus_realize_and_unref(SYS_BUS_DEVICE(irqmpdev), &error_fatal); - qdev_init_gpio_in_named_with_opaque(DEVICE(cpu), leon3_set_pil_in, - env, "pil", 1); - qdev_connect_gpio_out_named(irqmpdev, "grlib-irq", 0, - qdev_get_gpio_in_named(DEVICE(cpu), "pil", 0)); + + for (i = 0; i < machine->smp.cpus; i++) { + cpu = reset_info->info[i].cpu; + env = &cpu->env; + qdev_init_gpio_in_named_with_opaque(DEVICE(cpu), leon3_start_cpu, + cpu, "start_cpu", 1); + qdev_connect_gpio_out_named(irqmpdev, "grlib-start-cpu", i, + qdev_get_gpio_in_named(DEVICE(cpu), + "start_cpu", 0)); + qdev_init_gpio_in_named_with_opaque(DEVICE(cpu), leon3_set_pil_in, + env, "pil", 1); + qdev_connect_gpio_out_named(irqmpdev, "grlib-irq", i, + qdev_get_gpio_in_named(DEVICE(cpu), + "pil", 0)); + env->irq_manager = irqmpdev; + env->qemu_irq_ack = leon3_irq_manager; + } + sysbus_mmio_map(SYS_BUS_DEVICE(irqmpdev), 0, LEON3_IRQMP_OFFSET); - env->irq_manager = irqmpdev; - env->qemu_irq_ack = leon3_irq_manager; grlib_apb_pnp_add_entry(apb_pnp, LEON3_IRQMP_OFFSET, 0xFFF, GRLIB_VENDOR_GAISLER, GRLIB_IRQMP_DEV, 2, 0, GRLIB_APBIO_AREA); @@ -342,6 +380,10 @@ static void leon3_generic_hw_init(MachineState *machine) */ write_bootloader(memory_region_get_ram_ptr(prom), entry); reset_info->entry = LEON3_PROM_OFFSET; + for (i = 0; i < machine->smp.cpus; i++) { + reset_info->info[i].cpu->env.pc = LEON3_PROM_OFFSET; + reset_info->info[i].cpu->env.npc = LEON3_PROM_OFFSET + 4; + } } } @@ -380,6 +422,7 @@ static void leon3_generic_machine_init(MachineClass *mc) mc->init = leon3_generic_hw_init; mc->default_cpu_type = SPARC_CPU_TYPE_NAME("LEON3"); mc->default_ram_id = "leon3.ram"; + mc->max_cpus = MAX_CPUS; } DEFINE_MACHINE("leon3_generic", leon3_generic_machine_init) From patchwork Thu Feb 15 17:57:34 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: 772971 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp966894wre; Thu, 15 Feb 2024 10:05:05 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXHmGRPRmjKiFhTgKs05JCa4pVOxzmphNpY9ArqbucJK2+OMnhbMz9Rx1/mMlfnT7NxJc4dCG0KzbkM3JeYZjzJ X-Google-Smtp-Source: AGHT+IEY6UACCirywJyw8Xx4cvfVwSGXDWVAI0mqpIKYEAIkkyXTUYRF+ljI9Pil3lJCosJY7U4Z X-Received: by 2002:a67:f4ca:0:b0:46e:e844:fbef with SMTP id s10-20020a67f4ca000000b0046ee844fbefmr2527532vsn.20.1708020304794; Thu, 15 Feb 2024 10:05:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020304; cv=none; d=google.com; s=arc-20160816; b=QshXtQntCQwFb2upd//HPaF9OHYhi54VWSBcDO5BBlSe49onlf3hNBxkK5sI5Tcq7I pOATOfjMVlS0tfCXAhel81aCaz7yO58MPix+sIC8ickL2tBJDhDFPz1cyv8Sx01UDIuc t46x7GquQLh4KvF2pSgseOagrs/lr+Igf0sHhzyWE/5zsOmTVQTkcfn1itUGoP6CtPY6 KNvMQtbFw62O0GdI6tIswR4sE7gKfo0vcR9GMtkh0IJDcnlYlxflnlQmagZZptGY09cH WzU5ryDfqCyFAwL8kJO1M9CHPEjVf+NdMAjVXG79RQEKaIKRWfoptN7Q5ZcdCjjfUjYl dRZA== 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=YTTtBw/s0faU+3j1Lg8q8e01VXsKvPyBNLyd6bIBBuE=; fh=r+mbcaIVBB+d5Ke8c8av/RXIbk1kcul/Ph9l9m3Dfks=; b=Hhg3Ll87m0I5J0m3nWZ1Z/wqSIhMoacTVp14cDgdA+i486d3kbd0fC9pyC6gwNk6/C opFCFTYqr0anz8yN22U0wuD0sCyPlOtATKQK2RWe6EIl4HFUZa0O89kIixVoqZdbEL2K D8RUjsT0SjDvT+WMGUZlwEzr2GKMvQ2TSQWahpkmy5TdZaFwBiJKxXDwo+GBxIOM/GUT IIy6FhFjPKlmxVF0VKOU2Jn1hI/sMBlh6NKAvdEzHv/y7fGmXSQtcR88E9uiAi5R6Ef7 hOCDvQaldUBqgUmCo80BWHVrJxLWyRw3g4p5TYr/3nb9xHr3JUua05HJKc0kc7eE6C2i ucUg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SlgQmDBA; 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 gd11-20020a056102624b00b0046b129ebef4si472553vsb.123.2024.02.15.10.05.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:05:04 -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=SlgQmDBA; 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 1rag4F-0006Fk-KC; Thu, 15 Feb 2024 13:02:39 -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 1rag4C-0005kh-F9 for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:02:36 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag40-0002mF-SZ for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:02:36 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-411fc50e4e9so9097455e9.0 for ; Thu, 15 Feb 2024 10:02:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020143; x=1708624943; 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=YTTtBw/s0faU+3j1Lg8q8e01VXsKvPyBNLyd6bIBBuE=; b=SlgQmDBAoOSWuzi8AtiCigGdia1KyzLMo5oeKHGp2I+k6boOX3Q/oT/4K+MQJcuO1v R8u/S57/Su5Ukxy+YQsJWXjPJIPAYu4hV4d5DH+gBCKj0Y4fXaluLxsHyXnATBfl2X7Y q1a4k0TEqtnBRUewtDYXMSdZlFumLacCsXGBR+Td+zMzy8ST8qlyUjPvop+CgCXApWf3 6dNV0Fjw1jwaKsEyRoQEZoAyZIanQMhvND0fJ6xsP537L0uY1GBs2ayGD9JVEvv+uU7L 6+jQpn75BcP8NMWViKfSd1d9dAV3IjfwdXDjc+glwyPVRAQ0uTp5oJfFEnvaUcX3FA+s YeDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020143; x=1708624943; 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=YTTtBw/s0faU+3j1Lg8q8e01VXsKvPyBNLyd6bIBBuE=; b=p9p7lrYaksoJWYsrFt1Zha2LR/c+qBHv2JCUI4JR7yqIxSsb3DA7fhxiU/R58KPNzK 6XD+z3pNmtSMVc0Wd9ski27JmVX1GSIebnKTB++aYpVp3NXYVYwUCuR+YrpJK/ztUImI 69xh5ayEPcJPxstQGRmZrT5TkX8b+heNahDAlbdnSxLLENHr9taLjB3NByWLAyd3MBQK jqDsIsXZv02RqQ3vp7MRx0ZKb1NrwbN7DyD/g/oJhz10pEvk6wrva0rvWPzbiC6S7Y6q vFnvSpznxz4/LPSYXRSW7HngKzPxvEvjUzh9tjJ5Zs90np71Xw51AOx0hj98oSbfIe+y ACgA== X-Gm-Message-State: AOJu0YxmD6L60Wb/v+5PdujmyrjR+P314vr40AhnVUTxDhnRZREbu8e4 Wj0hTGpKVYuhTzGtj/Vu2kVuz5Q6hQUWYTvjZX9ef26Ulk3AznkfpWCPvdzu+aVVUmxPsz4SaTB djlo= X-Received: by 2002:a05:600c:6008:b0:410:c127:62fe with SMTP id az8-20020a05600c600800b00410c12762femr2036267wmb.1.1708020143112; Thu, 15 Feb 2024 10:02:23 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id n18-20020a5d67d2000000b0033cf0f5a01fsm2390836wrw.33.2024.02.15.10.02.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:02:22 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Cl=C3=A9ment_Chigot?= , Frederic Konrad , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Mark Cave-Ayland , Artyom Tarasenko Subject: [PULL 40/56] hw/sparc/leon3: check cpu_id in the tiny bootloader Date: Thu, 15 Feb 2024 18:57:34 +0100 Message-ID: <20240215175752.82828-41-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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=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 From: Clément Chigot Now that SMP is possible, the asr17 must be checked in the little boot code or the secondary CPU will reinitialize the Timer and the Uart. Co-developed-by: Frederic Konrad Signed-off-by: Clément Chigot Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240131085047.18458-9-chigot@adacore.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc/leon3.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 1637900162..bea84f3ad6 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -99,12 +99,26 @@ static uint32_t *gen_store_u32(uint32_t *code, hwaddr addr, uint32_t val) /* * When loading a kernel in RAM the machine is expected to be in a different - * state (eg: initialized by the bootloader). This little code reproduces - * this behavior. + * state (eg: initialized by the bootloader). This little code reproduces + * this behavior. Also this code can be executed by the secondary cpus as + * well since it looks at the %asr17 register before doing any + * initialization, it allows to use the same reset address for all the + * cpus. */ static void write_bootloader(void *ptr, hwaddr kernel_addr) { uint32_t *p = ptr; + uint32_t *sec_cpu_branch_p = NULL; + + /* If we are running on a secondary CPU, jump directly to the kernel. */ + + stl_p(p++, 0x85444000); /* rd %asr17, %g2 */ + stl_p(p++, 0x8530a01c); /* srl %g2, 0x1c, %g2 */ + stl_p(p++, 0x80908000); /* tst %g2 */ + /* Filled below. */ + sec_cpu_branch_p = p; + stl_p(p++, 0x0BADC0DE); /* bne xxx */ + stl_p(p++, 0x01000000); /* nop */ /* Initialize the UARTs */ /* *UART_CONTROL = UART_RECEIVE_ENABLE | UART_TRANSMIT_ENABLE; */ @@ -118,6 +132,10 @@ static void write_bootloader(void *ptr, hwaddr kernel_addr) /* *GPTIMER0_CONFIG = GPTIMER_ENABLE | GPTIMER_RESTART; */ p = gen_store_u32(p, 0x80000318, 3); + /* Now, the relative branch above can be computed. */ + stl_p(sec_cpu_branch_p, 0x12800000 + + (p - sec_cpu_branch_p)); + /* JUMP to the entry point */ stl_p(p++, 0x82100000); /* mov %g0, %g1 */ stl_p(p++, 0x03000000 + extract32(kernel_addr, 10, 22)); From patchwork Thu Feb 15 17:57:35 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: 772986 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp967940wre; Thu, 15 Feb 2024 10:06:40 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVftmAVfmswES7BeZR9L7+BN8zyDCoTuqcxRJZXqDe3G83zuX0gDOFl1dxBWvaFua8QYV13wloRLYn2WOWD7RNn X-Google-Smtp-Source: AGHT+IF2bs6uNptpkZosT86pTEWaO4iws551KzJAywqBmkVcZhQKHPw8xbU7ypzAM1g5O6pnC/N/ X-Received: by 2002:a05:6122:1783:b0:4c0:703e:766a with SMTP id o3-20020a056122178300b004c0703e766amr2964764vkf.14.1708020400065; Thu, 15 Feb 2024 10:06:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020400; cv=none; d=google.com; s=arc-20160816; b=SHPJsIXc3HDfcKLZx16lWklpSiwNisJ2r7HI7Id0RASFFJ8lN0h0fq2u/RuvtHPStt hPceeZHeJylXmczw6sD/IzRRYdwhB3MlTxA6sgdwvz5Ed2n0MoiEHAKD2ZNzlWbX8AOu v1W81zjIlWKLDAA0YVRXBJ08bUZmgOy2z3Hqa176np3A4y1RJezdqHUGigU0DQGRhlwb gsc5BvqciVF+J37b2rUBo+ENI5cousWbb2bXrDR9UW9r5LZIaIqMtA+FFIgEaTJnDPwl bU9m70TMfvPAYoJ8GeQEv4Dm1BiALMt9HHgQJxBH5x+MUszAf134gpadyQlsUZRrY/Ff loDA== 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=BcKvmadiGqmKN7g4qDe2Hjh8lZOAnNypphJxj7H8q5A=; fh=V5JxqqyEY4b6dWxOweC8AEAagDbUoTdezTJaVAV4tao=; b=Xr9afm1Tu6yOPm0+EPjELv4NgyN8xGlEgazkkF2AUBz/lSxfKitS1hX6I7JMBPG++z birWrMy7hEHNKeoHaaHwUt9P5Ppo70FLZDn6WTNZ1BVeJc7HoiQZV9j/98SE+ip3Nq4v iL6GhVfLcAZVwMFXjoC+fW/GxUEiB5FRdNStSQKG1k211kVl/BmVICAF9mh+PvPcE4Hg QirfuY/L1RbPxLIpDQ5kYd0zpoxsULcWvxXn62xa4vZiXjeTlVByV9FS8vRSB1bEZFA4 ImuRt7g626N8iu8kTALhR+Gz/pLB1KM9JkTBlk4SHID545kDl4q1MtnXeo4tBszu3Du3 bFwg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f7paDpRx; 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 er5-20020a0561221b0500b004c03da3dbd4si428980vkb.276.2024.02.15.10.06.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:06:40 -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=f7paDpRx; 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 1rag4G-0006OL-U3; Thu, 15 Feb 2024 13:02:41 -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 1rag4E-00064L-Bv for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:02:38 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag49-0002sb-Nt for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:02:37 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-41211acfcfcso8437415e9.1 for ; Thu, 15 Feb 2024 10:02:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020152; x=1708624952; 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=BcKvmadiGqmKN7g4qDe2Hjh8lZOAnNypphJxj7H8q5A=; b=f7paDpRxU1W1Jbr75o5aM8O4/n5UDydhEZasjhjNWqtb7lz1chLYUm7K7QI/6ejPpz VRmumpTnBw7L2BdwRE9scqyUQYX+J0ukicKE6hjoRrj6LV2sOn2Zj1w72x79X5o9/iBg JSUAz+gMVK5nol2asEY/l9DFuSsgJ4plcG5rvCNO69bGeoFI0Bf0RvMzV2xha7tcuP+I IswZnVMYWqKcroxeeu3uuTT2Lsr2faz/Kkqcsxp71L7UlQ7ZpbyzChNyPzd2zEKk2dLM qXedxhHGdtSXJLMH0jiYgDt6icq3IKgxHoDh+7ISkktT8r7FIFqLX1IT1dUYKxBx+EOY zIPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020152; x=1708624952; 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=BcKvmadiGqmKN7g4qDe2Hjh8lZOAnNypphJxj7H8q5A=; b=RJEvzjTKuC7IMNiJJOU+JHjffqP1ivDBW4OqRREIss6LpysJbJtWagDsdL/cuLSElh Rlw0I5JSFZfFK5Q8SklXdRJqp45WOp6BZjssVc7MdDf/A6mGARfAiJXhJXIJ64nBYdW9 yDVD2H1ysJNFITFERphQPNKzvRshMWqeLr3kkzj2xdwdGjVe+lodgdLJeyT4gm+eUyH2 7RT1MndhJV9NP1W7RM1A4/w1GOrs6v4YzJcYWjeFCoW6n+bc1HUT0jg6VfeYIZDcrOVn SNEg4NHu/6HEOpBIKO+UrUcUUsh7s8V4d7ZQjmsRcyIJDFMEQcfW2bmgclIms2fBn+fa 83YQ== X-Gm-Message-State: AOJu0YynoCDzKpklWUYzTLzGhPNObTd0SADZHIUHvQZL4J9X8c7WMPIo bpPZbjT8YYvZXpaunQ7lqRhlxvcn+RWc2s7Da6ET4KVLSoSZrqpU45AqXS0WHZpIMBjxjHWiWsp EURY= X-Received: by 2002:adf:fe86:0:b0:33c:f638:ed0b with SMTP id l6-20020adffe86000000b0033cf638ed0bmr2208959wrr.8.1708020151951; Thu, 15 Feb 2024 10:02:31 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id n5-20020adffe05000000b0033b47ee01f1sm2432289wrr.49.2024.02.15.10.02.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:02:29 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mark Cave-Ayland , =?utf-8?q?Cl=C3=A9ment_Ch?= =?utf-8?q?igot?= , Frederic Konrad , Artyom Tarasenko Subject: [PULL 41/56] hw/sparc/leon3: Pass DeviceState opaque argument to leon3_set_pil_in() Date: Thu, 15 Feb 2024 18:57:35 +0100 Message-ID: <20240215175752.82828-42-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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 By passing a DeviceState context to a QDev IRQ handler, we can simplify and use qdev_init_gpio_in_named() instead of qdev_init_gpio_in_named_with_opaque(). Suggested-by: Mark Cave-Ayland Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Message-Id: <20240215144623.76233-2-philmd@linaro.org> --- hw/sparc/leon3.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index bea84f3ad6..a15f90e142 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -202,9 +202,10 @@ static void leon3_irq_ack(CPUSPARCState *env, int intno) */ static void leon3_set_pil_in(void *opaque, int n, int level) { - CPUSPARCState *env = opaque; + DeviceState *cpu = opaque; + CPUState *cs = CPU(cpu); + CPUSPARCState *env = cpu_env(cs); uint32_t pil_in = level; - CPUState *cs; assert(env != NULL); @@ -220,7 +221,6 @@ static void leon3_set_pil_in(void *opaque, int n, int level) env->interrupt_index = TT_EXTINT | i; if (old_interrupt != env->interrupt_index) { - cs = env_cpu(env); trace_leon3_set_irq(i); cpu_interrupt(cs, CPU_INTERRUPT_HARD); } @@ -228,7 +228,6 @@ static void leon3_set_pil_in(void *opaque, int n, int level) } } } else if (!env->pil_in && (env->interrupt_index & ~15) == TT_EXTINT) { - cs = env_cpu(env); trace_leon3_reset_irq(env->interrupt_index & 15); env->interrupt_index = 0; cpu_reset_interrupt(cs, CPU_INTERRUPT_HARD); @@ -316,8 +315,7 @@ static void leon3_generic_hw_init(MachineState *machine) qdev_connect_gpio_out_named(irqmpdev, "grlib-start-cpu", i, qdev_get_gpio_in_named(DEVICE(cpu), "start_cpu", 0)); - qdev_init_gpio_in_named_with_opaque(DEVICE(cpu), leon3_set_pil_in, - env, "pil", 1); + qdev_init_gpio_in_named(DEVICE(cpu), leon3_set_pil_in, "pil", 1); qdev_connect_gpio_out_named(irqmpdev, "grlib-irq", i, qdev_get_gpio_in_named(DEVICE(cpu), "pil", 0)); From patchwork Thu Feb 15 17:57:36 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: 772991 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp968406wre; Thu, 15 Feb 2024 10:07:32 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV+UU3ZdqXJ63WDV1tg3wnB2sumo95QkKo0KLynn4s0jQHqnGGSO6cXNguVFJc+4SJbAO0H5q4j9lWXWjeRHFmD X-Google-Smtp-Source: AGHT+IHSAj9pKgpY+5705kaxqCCiR5dmtSSGQBPlkrLPCHoGvglKRuZQ3sdqO9/M/4VfiUYsjVI0 X-Received: by 2002:a05:622a:49:b0:42d:a830:4c7b with SMTP id y9-20020a05622a004900b0042da8304c7bmr2300725qtw.40.1708020452082; Thu, 15 Feb 2024 10:07:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020452; cv=none; d=google.com; s=arc-20160816; b=vb3PMWRI9ZWVseo+Aroz0CT4xiHPMntlSsQdkS0r07utxZYVrZJ3p17iwZxKDbL1+r MGkDjRVNgN+lkco6WLEEAXdcTALZDDKJ4dv3PmLX8JAI8s7qRoqLdVnknLQHQ02srozS AcJ9MOm8qs2cNmXfJwJ+fbYzOfE4ClnTF5jIMnln+E3lSHGLvRBzck0M9Advq93DRGhE 64rOlt0PUSb4xYjHa8ZxsQT21H4iEaq+JU9EKN2kHGcUjnzSW+EDHcy990hilGczwu7+ 1UF+M7vWmopc+rk5bfAj/ALcY1q4HvNetJEBOyC+IBSb9HAq3Cw0ckMCg4NADvBVMqTH PddQ== 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=3eUytsGHATYIyA0fQpy7VGo8DQbigcP7jFUNZajn3yY=; fh=V5JxqqyEY4b6dWxOweC8AEAagDbUoTdezTJaVAV4tao=; b=cUUbW03/7+TJ57RvESMKl7XWeUkrfi6vqNKB7V+wdREUNsSkEFePrHoRxMNYBFuoRt 7NeLmkj1cEIJ0B4WwuD/+cfbnPSh1tU1DiDYaFw16qVO6zfYikW0h4oK7ugMEDaQ+XUc XJRQD+bF6bW3GHs23NyP+9vXLM7TJ0JFGE3/y51QbrTFAxJk50xmOdSF2C4eqy6WB8yD mekbUTJPi7vDL5bgMmHoBySh7JhQNSMHdVSwiY2zkJsvV5dtb1a833y1hxF/5I+6kL+y +CQguFke+kwTVEl8WfIeOVvgYnq6OvUYf2R+4PxOGT2MYfgY+Mb0/BMFWU79ENw+1FQC 4MXg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JEOpKvPR; 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 t23-20020ac85317000000b0042dc8edb6e7si1838198qtn.657.2024.02.15.10.07.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:07:32 -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=JEOpKvPR; 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 1rag4R-0007NL-0z; Thu, 15 Feb 2024 13:02:51 -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 1rag4M-00074b-EW for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:02:46 -0500 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag4I-0002vB-3W for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:02:46 -0500 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-5118290fcd8so1378929e87.3 for ; Thu, 15 Feb 2024 10:02:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020160; x=1708624960; 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=3eUytsGHATYIyA0fQpy7VGo8DQbigcP7jFUNZajn3yY=; b=JEOpKvPRjp/zPhXzEhhoaqaf23aTOEn5XdyEKztOmVWAmylAwDr5RraNGwULw1OxjG DZhExAR1Z0Q12Ianwyc7pJ0ZeCA5ifcIV/FV4325S5U2YwzdF99uEJnh3EH879+pNNsr 71CEyRI8F5xqOU7Srb2kpv66SCikTP3aAhybI3W31WzRUucUIIKgbT5Hdtn4Gmmy4ZRC lqRLfsw+7axmWTbqNHO+lbb1niX3TmXMBfYttaicjtcIR1aHJzA6An1eOXX51wzZFzrz Cul5eU7TSw4IrjMGkBJPRBtT7NRCEjJhcfXBm1uVfcSy13T8NrTZfcyvmVX/cjh/NkEQ 5LAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020160; x=1708624960; 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=3eUytsGHATYIyA0fQpy7VGo8DQbigcP7jFUNZajn3yY=; b=MVcNEORp4T9GsngQzYsk+JA5NmwzCSNiREvUJ0sz+g59etCX3H7clD5ICs3xermUhe iFI2v4HtmAnVowOKl5ts1FtNtJEnZJXnoXWkQ5CWSc33nt6VtjEsPBF7cr4uNvKDHx85 R1Y13erQuiznEuuRaMN80SUbn1E3u7Z7ExBfuVFPvHJg4EYQ7UjmyytH/jWFJ80kOmmY TDKjNI1+2Gw1HIOLx1uIVSJcw8WKTI65YMfnb0g7fz/cWlymxp+Wtq61r3ZWPPcYgQ2y FdvZxjUxgGGlH4k4VTg7aLPve/Z/Bo2jWPvpyRCdltfm22YYGR0MI4kstCujv5bLnVJu Yaew== X-Gm-Message-State: AOJu0Yxby8gefhV8iGBptHwnwP4z5ynaH6PO2vlQL6/iceuohVl64B41 0+fm1SqFXaUuDPHiaQwDgOigQlrx9Fv520nSeGePIH70LmcKCa99HwoIWb3qNZLI2Ltv1PqiLjk v65c= X-Received: by 2002:ac2:5964:0:b0:511:8e03:c91e with SMTP id h4-20020ac25964000000b005118e03c91emr1965716lfp.7.1708020159713; Thu, 15 Feb 2024 10:02:39 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id bi20-20020a05600c3d9400b004103e15441dsm2693413wmb.6.2024.02.15.10.02.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:02:39 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mark Cave-Ayland , =?utf-8?q?Cl=C3=A9ment_Ch?= =?utf-8?q?igot?= , Frederic Konrad , Artyom Tarasenko Subject: [PULL 42/56] hw/sparc/leon3: Pass DeviceState opaque argument to leon3_start_cpu() Date: Thu, 15 Feb 2024 18:57:36 +0100 Message-ID: <20240215175752.82828-43-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12b; envelope-from=philmd@linaro.org; helo=mail-lf1-x12b.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=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 By passing a DeviceState context to a QDev IRQ handler, we can simplify and use qdev_init_gpio_in_named() instead of qdev_init_gpio_in_named_with_opaque(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Message-Id: <20240215144623.76233-3-philmd@linaro.org> --- hw/sparc/leon3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index a15f90e142..44fca1487d 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -241,7 +241,8 @@ static void leon3_start_cpu_async_work(CPUState *cpu, run_on_cpu_data data) static void leon3_start_cpu(void *opaque, int n, int level) { - CPUState *cs = CPU(opaque); + DeviceState *cpu = opaque; + CPUState *cs = CPU(cpu); assert(level == 1); async_run_on_cpu(cs, leon3_start_cpu_async_work, RUN_ON_CPU_NULL); @@ -310,8 +311,7 @@ static void leon3_generic_hw_init(MachineState *machine) for (i = 0; i < machine->smp.cpus; i++) { cpu = reset_info->info[i].cpu; env = &cpu->env; - qdev_init_gpio_in_named_with_opaque(DEVICE(cpu), leon3_start_cpu, - cpu, "start_cpu", 1); + qdev_init_gpio_in_named(DEVICE(cpu), leon3_start_cpu, "start_cpu", 1); qdev_connect_gpio_out_named(irqmpdev, "grlib-start-cpu", i, qdev_get_gpio_in_named(DEVICE(cpu), "start_cpu", 0)); From patchwork Thu Feb 15 17:57:37 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: 772990 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp968175wre; Thu, 15 Feb 2024 10:07:07 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXOugAVxQIJn1TgTq7WXO2roS9ZuH+bdMlUn2B8TBd6xSma+VeeNmY08pwq4Skmc5fuGBFK9iXggF3dUSo/0tvt X-Google-Smtp-Source: AGHT+IHTjVSbY/JmSCx/qdIW4W+9mDV+8LD/S7VIOaljB7CBFnCAZ60MCkfSoOqVcQhmMpZx7tdG X-Received: by 2002:a05:6122:c92:b0:4c0:254f:75d5 with SMTP id ba18-20020a0561220c9200b004c0254f75d5mr2271701vkb.10.1708020427484; Thu, 15 Feb 2024 10:07:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020427; cv=none; d=google.com; s=arc-20160816; b=HlnHG896ul4rhJ/xEa3uBsR906hKakhzfU4BgSjs5oUg7/dyutowNbJMjLC0cBkGZQ jbsaFsEsQrbKqZ5GOVXxZUubwdXXYHMzwYdiw07oSzGUXUM22ysJfyB/qUwCiJwIPyfR dJZ8pLiK2a7PxD3liiTLPf3o1cO2aOEfG89DrO1ZOeAR2H8oxB3WIY2mNNW3WtNUFr/Y +8Xw26LhAOdGMZJH2GK2x3rsJIlxmrx/ckO1Phr0iqqte34nKUECmJ6uFxMsWTX9M+H4 WOmxgQDClB4hMN+jTyaZUfzre9Dcp4uDOG8y4Rjy0JVYRuIvmCDBCeX9I4uglgzy2okV TNbQ== 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=+HBz0BFjRQZpbPfXihx7764F0fJuLimkLS/XesyXUFE=; fh=IEeMEBfRuEYv0f+p31NSkjjOHtvzn1XzuxY+KD3YeT8=; b=zdTaOuV15sDlXjiAtuhncTbIUwJJxMfVB5mrIYaiPUPaOfbVQubCuOxHlV7vOi9wre M4nR2Ei+73BW8GoaC++EgMtAYaWjOXAqB9m+hj4kBthso1OuleVaFrdWCnUXjIoptFAz c2G4qH2s3LoF/R8jFcCnMZCiTw1N1KaoDtWNsvJs1G7AJaXifNcJW9JmttO3/KnGKig7 WwGwNghM2Z1Sce7Bflu7QcGABV+OxeU6vpeFrc/Rkv+I6D3mm+euUq5i1Z854nzeez1O //yws520XVfrAPUbfTfyG5gzbDB3Fa6wRa48bObMW86Gpz7RnLhpcwEQhJzmmFla5l3k xA6w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mKiYRlPp; 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 y125-20020a1f4b83000000b004b8370fc77dsi389444vka.231.2024.02.15.10.07.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:07:07 -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=mKiYRlPp; 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 1rag4U-0007if-13; Thu, 15 Feb 2024 13:02:54 -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 1rag4S-0007XB-55 for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:02:52 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag4P-0002x2-4Z for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:02:51 -0500 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-3392b12dd21so605783f8f.0 for ; Thu, 15 Feb 2024 10:02:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020167; x=1708624967; 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=+HBz0BFjRQZpbPfXihx7764F0fJuLimkLS/XesyXUFE=; b=mKiYRlPpADzQBmNc45OY9EOpJfg2T+u2OEIE9HllBb6vx6JXBI8LD/8vtXX4KHOzfP EJh4APbB8jiDMqhvdQD5xHU/tUFzmpYejE5eFQjAtnl/aWV/WMrNAepDeghAbXZurS2V TORvrts5V2gAhxmBsclx1G1Ojl3OzdgfSgX3QomShOqj4HhGmcoZydHK2R6vthNmC5pX g1vvXMoBrEwA7eQNxm1BRqV2RQ4hHDQZK/hyKOEPIvS+VUZkg/vEhK1K2eSmzFavVcau qZpP5/R5D1hoorKDEPd423Hk/PrCFuvFEphSBgZ7Dk+77nD5YnviJQEy2WErfxiBSpBc TeEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020167; x=1708624967; 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=+HBz0BFjRQZpbPfXihx7764F0fJuLimkLS/XesyXUFE=; b=lLkbXmQwcOBe4gL9AD2JAARDKurnK+LpIyuoovbEPMotzvqIqcuZDI8GzG8vPUC2MR KJtGIcByA6o7+PZSZhKxJJWQpPny2d4D2Iq9AsFfZEEnOvk0GpSN6Oa6Z1KqF06NFJIt 2mhsElugmKpEcH9czbQezGkDsLTzuRoGsFmtWnPfvKNdDyONr/2rgxUHro9U12kkncOm BBvZYoGL4eSkoTaNmYJcOmR+5nY9Wa8WlCUsLM2TfA8X7mdI6aBRGhOHCN7QpomTF225 J73owFKpDApaBqD9RZgYA1KgseXSt5np/S59V/+cMuKwRQZHZVPPH/wFwJvlWjO0sv5i ynAQ== X-Gm-Message-State: AOJu0YyHMdTpx6UJ1cl4izbU7yYPmxUjeTfiP13URorzUc1mnv2A+xEX trB95lrvt98Dix0TDM46IC7/VBr87UpJiIMDxKupgh+KnFSF1PlIXXzboPc4VBZPlFOHIcClL9Y aAts= X-Received: by 2002:a5d:6dad:0:b0:33b:13a8:81b with SMTP id u13-20020a5d6dad000000b0033b13a8081bmr2075908wrs.0.1708020167254; Thu, 15 Feb 2024 10:02:47 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id n16-20020a5d51d0000000b0033cefb84b16sm2440537wrv.52.2024.02.15.10.02.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:02:46 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Mark Cave-Ayland , =?utf-8?q?Cl=C3=A9ment_Ch?= =?utf-8?q?igot?= , Frederic Konrad , Artyom Tarasenko Subject: [PULL 43/56] hw/sparc/leon3: Initialize GPIO before realizing CPU devices Date: Thu, 15 Feb 2024 18:57:37 +0100 Message-ID: <20240215175752.82828-44-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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=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 Inline cpu_create() in order to call qdev_init_gpio_in_named() before the CPU is realized. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Mark Cave-Ayland Message-Id: <20240215144623.76233-4-philmd@linaro.org> --- hw/sparc/leon3.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 44fca1487d..4873b59b6c 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -277,7 +277,10 @@ static void leon3_generic_hw_init(MachineState *machine) for (i = 0; i < machine->smp.cpus; i++) { /* Init CPU */ - cpu = SPARC_CPU(cpu_create(machine->cpu_type)); + cpu = SPARC_CPU(object_new(machine->cpu_type)); + qdev_init_gpio_in_named(DEVICE(cpu), leon3_start_cpu, "start_cpu", 1); + qdev_init_gpio_in_named(DEVICE(cpu), leon3_set_pil_in, "pil", 1); + qdev_realize(DEVICE(cpu), NULL, &error_fatal); env = &cpu->env; cpu_sparc_set_id(env, i); @@ -311,11 +314,9 @@ static void leon3_generic_hw_init(MachineState *machine) for (i = 0; i < machine->smp.cpus; i++) { cpu = reset_info->info[i].cpu; env = &cpu->env; - qdev_init_gpio_in_named(DEVICE(cpu), leon3_start_cpu, "start_cpu", 1); qdev_connect_gpio_out_named(irqmpdev, "grlib-start-cpu", i, qdev_get_gpio_in_named(DEVICE(cpu), "start_cpu", 0)); - qdev_init_gpio_in_named(DEVICE(cpu), leon3_set_pil_in, "pil", 1); qdev_connect_gpio_out_named(irqmpdev, "grlib-irq", i, qdev_get_gpio_in_named(DEVICE(cpu), "pil", 0)); From patchwork Thu Feb 15 17:57:38 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: 772978 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp967238wre; Thu, 15 Feb 2024 10:05:34 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXN2AuML7B4/0aV9UOPBeO9itewFMCZ/at+am2C1hkSxRFJhsC1MqhnSofq0ZtJtO9mq5OfK+jVnEuzCF3+sf1e X-Google-Smtp-Source: AGHT+IG41bacaY/Ivd3TIBRV3PASAO+NFbOAzg6Z16clrF7fIqzNQdKVSmodWpibVvHHWWyIClO4 X-Received: by 2002:a05:6214:4603:b0:68c:8218:30a2 with SMTP id oq3-20020a056214460300b0068c821830a2mr11079771qvb.0.1708020333938; Thu, 15 Feb 2024 10:05:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020333; cv=none; d=google.com; s=arc-20160816; b=L99qI/oVYr/CrDO0TGyCzbfGY6Le5ArzVrtCZXfKIM6cYbt64sZ+A6AVgWTpX8SBHr GYyXQvD/BWmfohiwP32AFuFNrcv6fuRIP9ntwosHHXz2kXTGAkVo8O5oy1nzHV+u1ALB 886yQLwNUqoggFBaS8/CXi+LUpsWl1jU6Hm18su5Ihz6JpiOmfH6P0/pIjkYUnGQ0qTk uVw0SnsECBThHwBMVe5fnnEub5Z+Dt80bUY+e4mMwFqWUIXGBPwY+QMK5dO8+ryXCh2/ q2xMDfxklq40RyXfGqGywL22txAGBMYVIc7yIpOpTobHmEIDLC/R0gOi/Cd0MbiapC6W VLFg== 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=h+kbuqXqvCRZ8Tf5uJ9Kz/BLctdAvrq0mkkiLJY8x1o=; fh=FzEKHiyX+evbSZ5HVurWKHIEjLdIcxBgwK0fI+ONFmI=; b=NKZRI6ejkg0n0eYbT3It9Fucrog2ZBN9F/NMTeBpIWJMeNQhmh3BAr0zT4vohmiFrx 0tOFvR6NePPgaPbmtBkx0fwpuxdzIj4z8l+9JBwI01tdtLMkRSbFQSol0ehH6CLCnVQo 6Tasn7w1+ISV57LaNU/IWY6Eh6ws4AuEBeHi2/5WU15+EHiRXTXg2krVaXvdU5sbly6B WZe7CqfF4graKjd1pfd8G4Sr4cuCTQng7qBTtDskg2uM1UfLpxLyUFhpr2sp1A5cra2X nEukpDbyF+zDDi+tr4QzM4i+YBy8qZbF7rrfPUeyASGN3jAPQpA9WEQho07KM2pVSsU0 x4qQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Eb5EVRfw; 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 m53-20020ac5cff5000000b004c008fdd766si426387vkf.123.2024.02.15.10.05.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:05:33 -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=Eb5EVRfw; 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 1rag5S-0002Bb-8Q; Thu, 15 Feb 2024 13:03:54 -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 1rag4m-0008Vs-6B for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:15 -0500 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag4V-0002z2-IQ for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:08 -0500 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a2f79e79f0cso172781766b.2 for ; Thu, 15 Feb 2024 10:02:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020174; x=1708624974; 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=h+kbuqXqvCRZ8Tf5uJ9Kz/BLctdAvrq0mkkiLJY8x1o=; b=Eb5EVRfwirJsqN2qdxvNVvbAz1i7or3FXgf0OyxyKWYbwWmYniT8yjptiaG95F9XJ8 bFPIM6AS7K5UbW4gOtUXkWC9FtCfH/gYQo/TriClBLOgG+qtd4/eeRYwHVMrJH0U0W0W flT1ZP0kseRkZjzL19IL4xhoUigbcCueAQVBO3ET3UDAusrqZiMHNE1Bd6Huu1mjdk/a PXB33oAYCLrZILzTWc7FV8Hg3bbjAP7gpNbCzwuyG2t7GrK/fX5GOEXYGjR/2RJdRdMc BFIM2HQARFFn3HxlYBhyt5m3kxE/AdZMpD2EHFfZJDhTLcA7L9gE3xtxWmSFVNKp2ZW3 Q+EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020174; x=1708624974; 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=h+kbuqXqvCRZ8Tf5uJ9Kz/BLctdAvrq0mkkiLJY8x1o=; b=FdanApLWH49scpojgBlyKMVTGPROp4MUKiaZr00jFbVNnCVZ8BUBqiXy+X0C9py4HS nXiWNKHf3VKUIhhtg1HoLI1Q+h6cz80Ji84yRkGSBQ25rlqVMUOUrA6Om2LPksV6kVF4 6IagB4sfWBsuV5bSigrXVxAGwoirScfFlOL/U4A9rfYb62spcAYrKaPwtX1G7h5jvJHG ddHY8gfx3NpUjGt/AACsQ1TLvyGkCDVDyqXxMR8O+vcrbshlKXFjV5+Yb/OQ4qZGexfW E/eBQGk6P0zpR9jpyBVVU2BrHVGXgEuqFaRhvWsv8TR5LEfv++8ct9K66M/m/R0Hx1+r HH5g== X-Gm-Message-State: AOJu0Yy4XKK4i8+/LkxCV3G0jdQrLVBGlUnjTm2/xJnJYoLtP0X+COws +Cd2pPgk20+BopR5V/+ZQ1m344xjkvZ6Ynkn5rVHFnIJQCLnJeWR/eg0DwAlG74Lo6MDVunS6Em 6sog= X-Received: by 2002:a17:906:c44a:b0:a38:40fc:2bcf with SMTP id ck10-20020a170906c44a00b00a3840fc2bcfmr1876968ejb.60.1708020173711; Thu, 15 Feb 2024 10:02:53 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id uz16-20020a170907119000b00a3d2ccea999sm788056ejb.35.2024.02.15.10.02.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:02:52 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Cl=C3=A9ment_Chigot?= , Fabien Chouteau , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 44/56] MAINTAINERS: replace Fabien by myself as Leon3 maintainer Date: Thu, 15 Feb 2024 18:57:38 +0100 Message-ID: <20240215175752.82828-45-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=philmd@linaro.org; helo=mail-ej1-x62b.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=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 From: Clément Chigot CC: Fabien Chouteau Signed-off-by: Clément Chigot Reviewed-by: Fabien Chouteau Message-ID: <20240131085047.18458-10-chigot@adacore.com> Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 8920ba403d..0ab73b265a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1709,7 +1709,7 @@ F: hw/rtc/sun4v-rtc.c F: include/hw/rtc/sun4v-rtc.h Leon3 -M: Fabien Chouteau +M: Clément Chigot M: Frederic Konrad S: Maintained F: hw/sparc/leon3.c From patchwork Thu Feb 15 17:57:39 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: 772967 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp966308wre; Thu, 15 Feb 2024 10:04:08 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWocEv7RCtY9XjVhmci1gfYTN5A29CfZzxp4l7csa1krQi/bkW2Wz4QbR9u+Vg2+y7VPTlZGr+Z0lF1yRGRkv/0 X-Google-Smtp-Source: AGHT+IGjmSnDPGjOdCk6L4Iy5bJmax2NKBfVQu81zLH2ZjwV3eLR19qiOeIYlBBPmZODsWHC2Rt8 X-Received: by 2002:a05:6870:65a8:b0:21a:328d:29eb with SMTP id fp40-20020a05687065a800b0021a328d29ebmr2999441oab.9.1708020248677; Thu, 15 Feb 2024 10:04:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020248; cv=none; d=google.com; s=arc-20160816; b=01Y4EmMs/v1BAV59uxNWQnNSCDFSz+Pa/ZneBv8X1YV5E9YvN1L0fR13gKw5xjVaIG K9zGNC+/PTrGTVzd5wl/A9NUkaze3O9WRYDXDErnLtq5f8aT6Ncv6a3EtvL+E6YePWRL HuI3Zuh7wkkGh8icC9z50sslNRQDyZIrsvgARyf7JWoeTr8D/y5p0FUNfOkBMSxg+Ff9 2EBIoza/gfW6g0TacVs/w/l3u9iXfEsuzfQ9aT3UH+9wqirySREhjE2guM+N9ODv4WJr AWNKdjzUtevHfRxVZGsN1fTkW18/wTiWQh+eLm3hypp1LRTRq9y185M3yfE3xbaH5EGc odxg== 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=WEJdbRYZWg5QsSQgBLhE630AfThAxul3xJqfLIQC7T0=; fh=DaNyg/VAQn4L19/AGDUal5lIiUVMR8n+wSbtZ64W5jk=; b=bM/L9H+yULYE28Pt9mtbF6TyZfkm9DWhhCthA4uFXf5FZawBs3pcVd1vvcCdwwD1aV fbeEYAl2pWQrjtO4rPOsT9YO/nA8zAFTNJG7PrIoCPjlVOmjx3/YuK0CM1Di04G34b9J uUCMh1BetFlWvwSZbpIpgEOvT4QCo2MI7uEyKyijcssCpSDxSYOAG5EwnDVm3hcXGyHT zXZA6Qx5Ovd57a03fhZu2a6W7t2ibSsD6PLrkrfjlY408BTwEL4gTQADJEoXH3zNfAmA xjl5YLhasybNeeVaBW+5xGQK2x0Qw6ieSTIr833PukIE+B/fAwgAhlt6xA+W3bUg3iBX A9LA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HIzhCUfM; 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 ej1-20020a056122270100b004c0211dd76dsi436589vkb.289.2024.02.15.10.04.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:04:08 -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=HIzhCUfM; 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 1rag5L-0001vC-Pk; Thu, 15 Feb 2024 13:03:49 -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 1rag4m-0008Vr-4a for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:17 -0500 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag4c-00031Z-S8 for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:08 -0500 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a3d159220c7so149194566b.2 for ; Thu, 15 Feb 2024 10:03:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020180; x=1708624980; 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=WEJdbRYZWg5QsSQgBLhE630AfThAxul3xJqfLIQC7T0=; b=HIzhCUfMFArrAr7NvD/9RyU6GhxskXXZoCtFNqoHVtaT6XXrMGsK3mDO0ekDRDM60j XENZGajeUlsM3VCkdCmPdP3QhQo0ytlSK2QgRsjTdDqphr6QXgxooERi6F2lHULnzz3t 1KbBnaY9966R8nIWs82Delc2n2dq/J+PSdS87bMOiHYnf/qC1s7+j0f3/shCg6ovWwkN b4t/9xgs4vMK7OecEM/EgxfiDZ4ItCMWOUFn86rM7GaSLVDySUSrEfZZybBsPmoja1zn 7rb2SU1mSazmWwnzsxPQ5LjBSogmSmv2RiycOukpxHSK0oQDgxcjHaPINWyVX9g5U1pr HMbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020180; x=1708624980; 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=WEJdbRYZWg5QsSQgBLhE630AfThAxul3xJqfLIQC7T0=; b=CJkCT8B1NPuAz7s0MmMMdzee0LCaCW9zK2Gb2XnEFBQYS6okCPVebWp83KMZFYm0U5 liiVpY0SSM4Kq1NSU3XdhSrP4N10koRRM2dRBMvtyS4ouNxA0WQ5xs7WnyS04YFo3JlQ rV9kXWKQk862j1aSjyqcOwCv9w6H4dem4CAX7NrbmVTF+U4fOm7fe55yxsvqsmPmrc2x WENoid2d3WYPMHn+fvrPZmjXWgejUKqxBKp+KX6WxfABhJ491LBRNLH85ujEO1Q9otC8 Obigv38CHQsD220O7zt1Jr+lI5vkM/ZY6LWOFn8HMMRPCDE+lqkWMY5b8hSYdFtoh+jL vMrw== X-Gm-Message-State: AOJu0Yyapzazj+6Rh9FDzbx/IRuCp/BB+RR9EbWv5Wmr/2/WBtH7KuRH ulolyZihOhy2Ma8245adDxYIbGo3vLc8QwQDJ4Xtne681zuVlWicp0JqREeA2jtcB6fztJMpTC4 SyQ4= X-Received: by 2002:a17:906:3c18:b0:a3c:ea61:9359 with SMTP id h24-20020a1709063c1800b00a3cea619359mr1621901ejg.77.1708020179824; Thu, 15 Feb 2024 10:02:59 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id lj8-20020a170907188800b00a3dbc39a376sm190751ejc.52.2024.02.15.10.02.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:02:59 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= Subject: [PULL 45/56] MAINTAINERS: Add myself as reviewer for TCG Plugins Date: Thu, 15 Feb 2024 18:57:39 +0100 Message-ID: <20240215175752.82828-46-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=philmd@linaro.org; helo=mail-ej1-x636.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 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 From: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier Message-ID: <20240118032400.3762658-14-pierrick.bouvier@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0ab73b265a..6c19ea41d1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3706,6 +3706,7 @@ TCG Plugins M: Alex Bennée R: Alexandre Iooss R: Mahmoud Mandour +R: Pierrick Bouvier S: Maintained F: docs/devel/tcg-plugins.rst F: plugins/ From patchwork Thu Feb 15 17:57:40 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: 772999 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp969031wre; Thu, 15 Feb 2024 10:08:37 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWXFIhvqsWhmZOhjpnUXebs+tN+Xzehv3O/VOqKZN47pfUH3S6r24+fO+HZmYG8ec26OxqAUyvpBbwimHDAj7pX X-Google-Smtp-Source: AGHT+IEqWa9sUE7FhNvzTagJqUWuFEPnUoh7KY8SD4sSCbxAHT2yyyeR7k98lDEEXrX+eVwJlBmO X-Received: by 2002:a05:6808:3010:b0:3c0:34b4:ee0f with SMTP id ay16-20020a056808301000b003c034b4ee0fmr2993291oib.53.1708020517224; Thu, 15 Feb 2024 10:08:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020517; cv=none; d=google.com; s=arc-20160816; b=tSUazRMwhphkUURlscvZBA7+t1WIUOouLD/XU9cJwEWuVgRvGMVVynXa62cpWG5G7k scSz5NTu154KKtbBsnEevccd+6uo+vB0R6k96w5D+sZzM4bVgkl1zRX6XgrBJJYjPyum MH3ny27PsuyFmqlD83DITFkohsymqeksZfTCWi4sEZ6jnywtG5cg8CIwGc1SkaPeks7W u70mZo3MshhbbQXvdkJlukymZgpkaJgwqOyPB9RsurI3wHuywmmiVdBvBV7+wLNQPpiV Ox40nXpJKzA/3Intw48gafDaKIAPqgdCYGV+mX1WGoOmHqRLGp6u/Z9nUUEnCXYLqFKk A2jw== 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=0uuVnrOUAIUZkKyymxTIXoVEwsBVaCFKYc2xJo7UVoM=; fh=SyGPuDDufU2F1oigqJN48XJgbTU8/01W/hl/HkJ37S8=; b=Oj26IUpN2kz6NfFdm7jqUYEJYQe71D7z0+Fih41obhgWvMWmI31kqWYaNrahe45yWT z0R3YdOAREXym7I+2iUCiF4InH8DPplaysPTI4FjQ+sUdD76rLZ4hLhthxHXRie8duRH QdCRze4tgSgGd8oD5eCIqfjzrJuxiTbbdjheQcEXZQW0Vkx/T1BJJejyz1xZeMI9vn9m aQnn5AD+7URtk2fzNivUFrbjzsAaiKcKOLlpIGLppRWh4x35X6cM+wXw4+xei/KTN4jw 7eUKN+Uq48zo7KfhAHTT+m8aqOe9dXlDCUX3hMEIdsqB9fbjn+2Jc+oGqvfDRh7frK2D taMg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WE9D0xRR; 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 c4-20020ab056c4000000b007d2a4e6baafsi404205uab.217.2024.02.15.10.08.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:08:37 -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=WE9D0xRR; 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 1rag50-0000il-TX; Thu, 15 Feb 2024 13:03:26 -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 1rag4m-0008Vv-6b for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:15 -0500 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag4h-00032Z-Tw for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:09 -0500 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a29c4bbb2f4so154154066b.1 for ; Thu, 15 Feb 2024 10:03:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020186; x=1708624986; 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=0uuVnrOUAIUZkKyymxTIXoVEwsBVaCFKYc2xJo7UVoM=; b=WE9D0xRRC0KpZU8AqRW7qCx4D3ffLDDLCcekHkLKVkftVfsZB9fryy0OGFKIUFS6oF ssFLWMSkmCFV5ht6SToCTvcUlzY9Tqd0M45g3iwEnxwh9mPjc6e713P9UB4gxwHWMtq9 TMLPoOTu7czN9Chl1XFAA6mvkrfri4AqsMcu7cOHbP21kl/YqBeaX4Q1RTabVqhIDMUU usNGyDKI2BgfzKhmAhXvg1H3upqeMIfDEwrHK/Ic7f230II836p39ftOGlLgqKSrqL4H Ug2HXmQNTIapKAx2TLJEZ9OJH4AAlQ2eEz+3N+lhxGY0xxbMi9oN5WvMD6YV1j3KAWfh u6Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020186; x=1708624986; 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=0uuVnrOUAIUZkKyymxTIXoVEwsBVaCFKYc2xJo7UVoM=; b=gJdGM15guaKMoOeOidJVtbSy2hsf/7JVOD84+ZjVZgKKHdouVaj/RksWHMGxpwKblU rEsrYIZaMCuKG9PpmiTL2tfPRarILnGbvfbljQldJ6qMhw+NH/slYCE9tlWepFqFIlUn LqXJHyJs1TVU7GWidLSngCJNZCBxfXDiBrR3IYdlMW4quSZh9rShFV/Az+9Ba+x1UWWN 8U87RYVeGyzR58GQB2gqlSCZ8D4OeMyxW8QxL/5Lh55i37nLw5esIBvzj9a2d0BgTD+1 VBCYDhGOMU1ISWB6lVQUDWydCjf3c23DUYe9wcilI+pI9iMxdpNX/mjOcLOPVsh6F4lm vIzA== X-Gm-Message-State: AOJu0Yyz3lXo9Ta59eQX7D+kAs5eZcBqrDkgsch9KPSdk61B44t4pCWU XLErvhSxkBegc514zqmH6YCg5XI4CCyyPWZArVsAJ7VJRlUH2kVVJsPuQYkUuxV+CP8gebAzFS5 v9LQ= X-Received: by 2002:a17:906:bc5a:b0:a3c:875b:f378 with SMTP id s26-20020a170906bc5a00b00a3c875bf378mr1375359ejv.36.1708020185956; Thu, 15 Feb 2024 10:03:05 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id l22-20020a170906079600b00a3d4b488970sm788570ejc.45.2024.02.15.10.03.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:03:05 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Paolo Bonzini , Eduardo Habkost , "Michael S. Tsirkin" , Marcel Apfelbaum Subject: [PULL 46/56] hw/i386/q35: Simplify pc_q35_init() since PCI is always enabled Date: Thu, 15 Feb 2024 18:57:40 +0100 Message-ID: <20240215175752.82828-47-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=philmd@linaro.org; helo=mail-ej1-x62d.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=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 We can not create the Q35 machine without PCI, so simplify pc_q35_init() removing pointless checks. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240213041952.58840-1-philmd@linaro.org> --- hw/i386/pc_q35.c | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index b7c69d55d6..a785bf7366 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -130,8 +130,7 @@ static void pc_q35_init(MachineState *machine) ISADevice *rtc_state; MemoryRegion *system_memory = get_system_memory(); MemoryRegion *system_io = get_system_io(); - MemoryRegion *pci_memory; - MemoryRegion *rom_memory; + MemoryRegion *pci_memory = g_new(MemoryRegion, 1); GSIState *gsi_state; ISABus *isa_bus; int i; @@ -143,6 +142,8 @@ static void pc_q35_init(MachineState *machine) bool keep_pci_slot_hpc; uint64_t pci_hole64_size = 0; + assert(pcmc->pci_enabled); + /* Check whether RAM fits below 4G (leaving 1/2 GByte for IO memory * and 256 Mbytes for PCI Express Enhanced Configuration Access Mapping * also known as MMCFG). @@ -189,16 +190,6 @@ static void pc_q35_init(MachineState *machine) kvmclock_create(pcmc->kvmclock_create_always); } - /* pci enabled */ - if (pcmc->pci_enabled) { - pci_memory = g_new(MemoryRegion, 1); - memory_region_init(pci_memory, NULL, "pci", UINT64_MAX); - rom_memory = pci_memory; - } else { - pci_memory = NULL; - rom_memory = system_memory; - } - pc_guest_info_init(pcms); if (pcmc->smbios_defaults) { @@ -212,14 +203,13 @@ static void pc_q35_init(MachineState *machine) /* create pci host bus */ phb = OBJECT(qdev_new(TYPE_Q35_HOST_DEVICE)); - if (pcmc->pci_enabled) { - pci_hole64_size = object_property_get_uint(phb, - PCI_HOST_PROP_PCI_HOLE64_SIZE, - &error_abort); - } + pci_hole64_size = object_property_get_uint(phb, + PCI_HOST_PROP_PCI_HOLE64_SIZE, + &error_abort); /* allocate ram and load rom/bios */ - pc_memory_init(pcms, system_memory, rom_memory, pci_hole64_size); + memory_region_init(pci_memory, NULL, "pci", UINT64_MAX); + pc_memory_init(pcms, system_memory, pci_memory, pci_hole64_size); object_property_add_child(OBJECT(machine), "q35", phb); object_property_set_link(phb, PCI_HOST_PROP_RAM_MEM, @@ -243,7 +233,7 @@ static void pc_q35_init(MachineState *machine) pcms->bus = host_bus; /* irq lines */ - gsi_state = pc_gsi_create(&x86ms->gsi, pcmc->pci_enabled); + gsi_state = pc_gsi_create(&x86ms->gsi, true); /* create ISA bus */ lpc = pci_new_multifunction(PCI_DEVFN(ICH9_LPC_DEV, ICH9_LPC_FUNC), @@ -286,9 +276,7 @@ static void pc_q35_init(MachineState *machine) pc_i8259_create(isa_bus, gsi_state->i8259_irq); } - if (pcmc->pci_enabled) { - ioapic_init_gsi(gsi_state, "q35"); - } + ioapic_init_gsi(gsi_state, "q35"); if (tcg_enabled()) { x86_register_ferr_irq(x86ms->gsi[13]); From patchwork Thu Feb 15 17:57:41 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: 772975 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp967082wre; Thu, 15 Feb 2024 10:05:21 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXan1fvkZD1IPbe3zbpcYlzLtNo6n73DuTkBtjxt4ilF0JVJsHBI1vDvDFEQnnLCx0W8OJn+uQKuaJHYLNLwC0o X-Google-Smtp-Source: AGHT+IGKu1LdWhLmMAPDdCt56748I/m5TFpVld7VA0HoXwT8YJTLZtJUR1EL4+51V683BHTsjfJG X-Received: by 2002:a1f:cc86:0:b0:4c0:e29:c438 with SMTP id c128-20020a1fcc86000000b004c00e29c438mr2664208vkg.8.1708020320847; Thu, 15 Feb 2024 10:05:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020320; cv=none; d=google.com; s=arc-20160816; b=cn77G8xNZhul0k1kzZR/ZGXqGQJiZTqNOysSpF9ip3m1AVndZ6Kv3KMDehrOINOyLj E2+Q2Lqvu9jfroS5n+/cW97S5D5SWigxxFHQMTDtOgLz/GgtOZsqBNuiBwT50oeRcJU3 6+y9vJ8bxmGyAaUAEtuvWdNXvMBCHT+Fuga66bZvfLVCwNka9pY1g/Y4MSYkwpBZblF2 Y0XIrDCM4dcIicOSrpuF7wCM36v7N9VdkMwF9KCKKaE5omtTUrKpPsyeY1+MAJUeRqjo ufXzp5ZO4rY7uxKyX7g/VCiaAsid9wDZAh2EAIFxfn3pkY7yv/0JrBSkXhJjeFcTuFLk GGVA== 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=ZOtZS61qj6Uu8AsLWZl4xcqn7jsQ1ZPqcbyAMS2h3AA=; fh=FH4VvZuhHebQxLop/T64e3WJwyoYKQ3V1qUP2Q1VTXA=; b=FJBZsn1wgXkI0q2dYeD2OwWVGLWWFSIhPscQ4nbbniCU2ca4+Nb/wR52apbYlpnNgq sNBvcVg1lSslbJPizwgBGBYbXI3tNv49IMQZ1wvpGoW7Eum+8nTtpusnUxTlGMwS/vVI EQWHleubjVDbFxVfspnw4DgA5mlk3aLDGqbQxAMTqMIp1lIYXH5iR3dDoVl9R6n/vNU8 2IDiWHzfqWuoJ4plODN5Y/7lYE7GxlOniC1FZVN9Q995Z58ynwOOrx6V2zj29nHg6LkD 0UHZwMGtwOWiftrKIryBgms1stojMZ0FDUnGqyLwDCUa0bgqgLVcpGQIQvWkhCHl4Ws9 L4yQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zx6whR2B; 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 cd13-20020a056122308d00b004c0247a5933si443114vkb.156.2024.02.15.10.05.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:05:20 -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=zx6whR2B; 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 1rag52-0000x6-NK; Thu, 15 Feb 2024 13:03:28 -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 1rag4v-0000MT-UA for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:25 -0500 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag4r-000355-Ei for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:20 -0500 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-55ad2a47b7aso1692610a12.3 for ; Thu, 15 Feb 2024 10:03:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020192; x=1708624992; 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=ZOtZS61qj6Uu8AsLWZl4xcqn7jsQ1ZPqcbyAMS2h3AA=; b=zx6whR2BVHp1qJALYdthlMg7rsB3hlnSfCiE2PzXKdqQaK1Px8QnvsNvCg5XK7y2nn ZLCgJJ1xUtKvj6zSMX9z08rtjM+UQznPI1lRmEEXnF5F04c3TfkIRDFYviO5B0ARjt4t +CQNvYH3vfHqPeL96u4XinQpinnp8sKJv89+2YuPDII3PfBh+Jsp8sSAC2o5dm9D9HXq ujb27bbT9Bl6hKKv6AMYl0Z9XlpTObbrlzm+yJ1C8wsc2OYlqMXsF9s0w9OTlh7nQj+j 1Ta8+BTxJZ4EgS+XellaRxrEDe573FViUO6uUdMBsZ0dpFhDbFgaQR41gTVxYpPGIduZ GvHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020192; x=1708624992; 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=ZOtZS61qj6Uu8AsLWZl4xcqn7jsQ1ZPqcbyAMS2h3AA=; b=oQ0fff9Qa+rLpcUIymP7VWD/AV6GcrbIbhwKkSTSn8jDyc0A9mqiMAHUMm71ivdxC4 hvJgpn15IvuvCPdW+WGkfEjZxjNMTAhzQnIA5GEuv3Ek/Z1yUxksErXx9BRGCzxQ3Faz 7tnF931rpjpgBovOGyAqvKitUBlfAO/AbUAxBywHKlK+LSB43M45rZLAgfjDbqFTSeQr G+7SyeehdPmy7voQsGKMPNwsHYaKmCNMdJWcY1qTp36YBb7WgvD3ojVbMVv4QBNspXLm JgmmiMXHGobsXRRhm1Om+zIqHNMvNkTwPqk+l94Q3qvnXNtpVEDYjjBOd2Oli/2zSUTt z9QQ== X-Gm-Message-State: AOJu0YxhzQzGq3XuuTHhKZrf1Vavk8DLQzeXxy8yfG+82V8Vm3TbcR1W Gegh6HgLrL0jKnTi9dZuATjjpZYTSdNe7u5/W7YuBchtOmcK1HxwqH5j9IISn5CM4omT9VRe4oq 4wEU= X-Received: by 2002:aa7:c49a:0:b0:561:ec1a:95d1 with SMTP id m26-20020aa7c49a000000b00561ec1a95d1mr1903454edq.37.1708020192233; Thu, 15 Feb 2024 10:03:12 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id cb18-20020a0564020b7200b0056289a2bee1sm770404edb.47.2024.02.15.10.03.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:03:11 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Michael S . Tsirkin" , Richard Henderson , Paolo Bonzini , Eduardo Habkost , Marcel Apfelbaum Subject: [PULL 47/56] hw/i386/q35: Use DEVICE() cast macro with PCIDevice object Date: Thu, 15 Feb 2024 18:57:41 +0100 Message-ID: <20240215175752.82828-48-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=philmd@linaro.org; helo=mail-ed1-x52c.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=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 QDev API provides the DEVICE() macro to access the 'qdev' parent field of the PCIDevice structure. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Richard Henderson Message-Id: <20240213081201.78951-2-philmd@linaro.org> --- hw/i386/pc_q35.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index a785bf7366..a81c86b255 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -297,8 +297,8 @@ static void pc_q35_init(MachineState *machine) PCI_DEVFN(ICH9_SATA1_DEV, ICH9_SATA1_FUNC), "ich9-ahci"); - idebus[0] = qdev_get_child_bus(&ahci->qdev, "ide.0"); - idebus[1] = qdev_get_child_bus(&ahci->qdev, "ide.1"); + idebus[0] = qdev_get_child_bus(DEVICE(ahci), "ide.0"); + idebus[1] = qdev_get_child_bus(DEVICE(ahci), "ide.1"); g_assert(MAX_SATA_PORTS == ahci_get_num_ports(ahci)); ide_drive_get(hd, ahci_get_num_ports(ahci)); ahci_ide_create_devs(ahci, hd); From patchwork Thu Feb 15 17:57:42 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: 772998 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp968956wre; Thu, 15 Feb 2024 10:08:30 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWxRwQ7VZutICw2bydul4qBTVRrEefLHm9Eg+dGat/TKn2lXg8mpDW7PXHDW5zmGKazOH7hlkl6kX1GCdk57z6d X-Google-Smtp-Source: AGHT+IGXkD50U9xAloI1B2E6beEtn0qlaXiQ6ui9ylAVbsrff6pWrZd7kM9wrRIujaeq+U65gKXW X-Received: by 2002:a05:6102:22ea:b0:46d:258e:4e10 with SMTP id b10-20020a05610222ea00b0046d258e4e10mr2463942vsh.31.1708020510014; Thu, 15 Feb 2024 10:08:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020510; cv=none; d=google.com; s=arc-20160816; b=k36UVvIy0NCCMEd2geinEMJrJqNKwkQp2EtiyhLsGJLYdF6wL0GGbiMLC9D6f4FC11 tt8djdYKQ6FuG9P1/xiIEvclVzvsOA/ePoPt67efa0Hh5oL0FXZDQZBdFhe8wWtr2/yg cGsK4q5cnfj5Pbov4Eooc9JmtbGzodPMdC5PRHAErn5l0nYbL3a2fopOnxoZTNIZ7kzh BlJ1UpDcOIMlowJ8FOWKhrGGxAo6u7/l3ONLcv3G+X011AeFCfujQmGLFW3KM8lPKYct YYUGDH0Oq+VEz4MD+ZaOXgeStUwrbH0HNjDrEcTJcp5rQc8BvoXjzSkG96VdK9wScRYO UCow== 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=Zv0rwoijSdDo8xIDgkkDnlRfaEZ/bLwEpbnDkMeyuSU=; fh=jkHjHHMKO4WMGqjIPBuoqxK678c2YxR5/zvcQM1fhTo=; b=A4WX5AHzRt38Z/eMi6jUQebiYgngYljd7crJ0VhVAkfcC6Vn0GsajvPhMubQO/66// RBHLOE1emxINLewvj3wRVsARX7+2YPZakBLLpDFk1WI3qNI1ByK7OUtrf2aekkgxWu3W E+zAabb4UU1DsgcThCwlTXpuz0kjQPCObPe6cJHqUywYMTGo+filrJ1pd9KoRLHCicYW L6rRIvK7zKthnbdEaC+arM8FazAT0rmqxyVzINM8teowm8WeSnG9ec6UIAaZfwo52EYn PDdJ7oNnKgS4BlwZOscWIXIykUJyVOTrgt2DXSx7YRPRzNFNB44hBMrVctcgJ1mOj71l PkNQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w5pvYt96; 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 j8-20020a67f788000000b0046b322e64cbsi313197vso.495.2024.02.15.10.08.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:08:29 -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=w5pvYt96; 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 1rag5m-0003Zn-Mo; Thu, 15 Feb 2024 13:04:17 -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 1rag50-0000bY-19 for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:26 -0500 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag4v-00036Y-GI for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:24 -0500 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a34c5ca2537so143203766b.0 for ; Thu, 15 Feb 2024 10:03:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020198; x=1708624998; 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=Zv0rwoijSdDo8xIDgkkDnlRfaEZ/bLwEpbnDkMeyuSU=; b=w5pvYt96CON05tBbhV+mBu1jCQVTvHsuLrNahQcc3PFchz+4XMbAnjFBnJby2xJj/I pcM6/99+Gpdtshho/EjJcHNnREIVh3Oc2cRpDUOXTXILOPZfblCSyaY1Y9RABXX6LbKL sepO7B1F38mAtCRl44qCo3uM3b/1i/OCjl33AnELcC0K3GQdV+fcskez90JjLNiWL3mB cfw6TexiP6kjCezpms0umHVv9s0nPN+zH9B2flxbA5gYXDkDtoVYezWLCFq/2QvS2Can 7sTcfA3HEe9+e8XuAQfWwR9jyo5C1aFi9qJfTHvUmd2aNbytwobGXKzyoNSm4OioNYKr 3uCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020198; x=1708624998; 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=Zv0rwoijSdDo8xIDgkkDnlRfaEZ/bLwEpbnDkMeyuSU=; b=lP7FAB8T0EX+BiKc7ARdti3MQL84KvdrqXsuA0RDzxpB8zO5zVaBme4A1dHrb//Dqg LMV8TsZnpaGGarh9CkwGmxB5qmAtZxXM1b8jyHpa+J1OKOG0kCxHBDM/TBDx+CjY/M5U 3/SlGMJ/r2IMpZyp+jxB/zuVd2DALe1ydXVaEgLTLm/4g2/AUpysFreDS92BcP8lqGsm QE/F/zz1upPrY7iYo6KEQ5lDR0w6xAAdxDGNOuXikgLp7eFhPrickATu5y8MuXXL63Vi 7A2anOoYult4B/xmGBTwTRtnkAjkUqt3nYBVu0Ojb0HIukF5+q1IE/p2qUmog0aES0Pf a/tg== X-Gm-Message-State: AOJu0YxNLv8VNnyv/VZFFXfu5gjskQhQ3r5EENFyvAs8ZiFe0doXpo2F ZdMoYhs0pNfTuhyhuhFXjiI5ptBHMnDwgTRB2PI7BFI8DAQ/KrLbVSYnYUgt4pOWya9fESNpQrQ F+WI= X-Received: by 2002:a17:906:ad5:b0:a3d:b3a7:b8ce with SMTP id z21-20020a1709060ad500b00a3db3a7b8cemr991576ejf.0.1708020198368; Thu, 15 Feb 2024 10:03:18 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id j7-20020a170906278700b00a3d76518122sm783781ejc.9.2024.02.15.10.03.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:03:17 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Michael S . Tsirkin" , Richard Henderson , Marcel Apfelbaum , Paolo Bonzini , Eduardo Habkost , John Snow , Paul Burton , Aleksandar Rikalo Subject: [PULL 48/56] hw/ide/ahci: Expose AHCIPCIState structure Date: Thu, 15 Feb 2024 18:57:42 +0100 Message-ID: <20240215175752.82828-49-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=philmd@linaro.org; helo=mail-ej1-x629.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=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 In order to be able to QOM-embed a structure, we need its full definition. Move it from "ahci_internal.h" to the new "hw/ide/ahci-pci.h" header. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Richard Henderson Message-Id: <20240213081201.78951-3-philmd@linaro.org> --- hw/ide/ahci_internal.h | 8 -------- include/hw/ide/ahci-pci.h | 22 ++++++++++++++++++++++ include/hw/ide/ahci.h | 3 --- hw/i386/pc_q35.c | 2 +- hw/ide/ahci.c | 1 + hw/ide/ich.c | 1 + hw/mips/boston.c | 2 +- 7 files changed, 26 insertions(+), 13 deletions(-) create mode 100644 include/hw/ide/ahci-pci.h diff --git a/hw/ide/ahci_internal.h b/hw/ide/ahci_internal.h index c244bbd8be..4dc2805d21 100644 --- a/hw/ide/ahci_internal.h +++ b/hw/ide/ahci_internal.h @@ -324,14 +324,6 @@ struct AHCIDevice { MemReentrancyGuard mem_reentrancy_guard; }; -struct AHCIPCIState { - /*< private >*/ - PCIDevice parent_obj; - /*< public >*/ - - AHCIState ahci; -}; - extern const VMStateDescription vmstate_ahci; #define VMSTATE_AHCI(_field, _state) { \ diff --git a/include/hw/ide/ahci-pci.h b/include/hw/ide/ahci-pci.h new file mode 100644 index 0000000000..c2ee616962 --- /dev/null +++ b/include/hw/ide/ahci-pci.h @@ -0,0 +1,22 @@ +/* + * QEMU AHCI Emulation (PCI devices) + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#ifndef HW_IDE_AHCI_PCI_H +#define HW_IDE_AHCI_PCI_H + +#include "qom/object.h" +#include "hw/ide/ahci.h" +#include "hw/pci/pci_device.h" + +#define TYPE_ICH9_AHCI "ich9-ahci" +OBJECT_DECLARE_SIMPLE_TYPE(AHCIPCIState, ICH9_AHCI) + +struct AHCIPCIState { + PCIDevice parent_obj; + + AHCIState ahci; +}; + +#endif diff --git a/include/hw/ide/ahci.h b/include/hw/ide/ahci.h index 210e5e734c..6818d02063 100644 --- a/include/hw/ide/ahci.h +++ b/include/hw/ide/ahci.h @@ -52,9 +52,6 @@ typedef struct AHCIState { } AHCIState; -#define TYPE_ICH9_AHCI "ich9-ahci" -OBJECT_DECLARE_SIMPLE_TYPE(AHCIPCIState, ICH9_AHCI) - int32_t ahci_get_num_ports(PCIDevice *dev); void ahci_ide_create_devs(PCIDevice *dev, DriveInfo **hd); diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index a81c86b255..76b3b6032b 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -47,7 +47,7 @@ #include "hw/display/ramfb.h" #include "hw/firmware/smbios.h" #include "hw/ide/pci.h" -#include "hw/ide/ahci.h" +#include "hw/ide/ahci-pci.h" #include "hw/intc/ioapic.h" #include "hw/southbridge/ich9.h" #include "hw/usb.h" diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 0eb83a6d46..aa9381a7b2 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -36,6 +36,7 @@ #include "sysemu/dma.h" #include "hw/ide/internal.h" #include "hw/ide/pci.h" +#include "hw/ide/ahci-pci.h" #include "ahci_internal.h" #include "trace.h" diff --git a/hw/ide/ich.c b/hw/ide/ich.c index 49f8eb8a7d..d190012a95 100644 --- a/hw/ide/ich.c +++ b/hw/ide/ich.c @@ -69,6 +69,7 @@ #include "hw/isa/isa.h" #include "sysemu/dma.h" #include "hw/ide/pci.h" +#include "hw/ide/ahci-pci.h" #include "ahci_internal.h" #define ICH9_MSI_CAP_OFFSET 0x80 diff --git a/hw/mips/boston.c b/hw/mips/boston.c index 4e11ff6cd6..cbcefdd693 100644 --- a/hw/mips/boston.c +++ b/hw/mips/boston.c @@ -24,7 +24,7 @@ #include "hw/boards.h" #include "hw/char/serial.h" #include "hw/ide/pci.h" -#include "hw/ide/ahci.h" +#include "hw/ide/ahci-pci.h" #include "hw/loader.h" #include "hw/loader-fit.h" #include "hw/mips/bootloader.h" From patchwork Thu Feb 15 17:57:43 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: 772992 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp968508wre; Thu, 15 Feb 2024 10:07:43 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUWTEMngMeU5jBQg4HsyidVKAbuxFUMOHGi8acR7IJ0PWAaTVEAfiwBzSfHIwami5rb1Ng3dRcr3BSBi11WA9bs X-Google-Smtp-Source: AGHT+IGnli1MFdBvPDMr8K/+6SqDqASD+Es6rryWDTPbseqgVgzPDGi31sOcQJ3YUWBt8bNgZaSP X-Received: by 2002:a05:6214:e61:b0:68f:1067:ffa1 with SMTP id jz1-20020a0562140e6100b0068f1067ffa1mr3171794qvb.19.1708020463332; Thu, 15 Feb 2024 10:07:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020463; cv=none; d=google.com; s=arc-20160816; b=PmYyh3ozpsE60bz4OmAUa0pweBCLP7/rzrgeuE6xpawtJ1MWmQyh62sRU0RFx3olwM kJrj4XE5qj+ZGY1pBqpBToi6XP2XzRqHlQS83JB115oVpeM2LidgBGKGtYOO8hOfLvuI 8AyBRkLkXsI1sfx1fyHdo6fZnK//pL3eoQu/hU4NmPeT/hkkQw9lP8MvaK9FR0E6dc45 RHB1qCU+ZvRspuICJmOocaUt27mm6cI54NclN8k67Z1VwxzKC9FVqPud+IpFdQ2Acp5R gz0tedE5oVTNCcsdIwiUnABCYsSB+PZsbmpw+GexcPPvwbVopgVVnvd//5sys7bKeMbd TnxA== 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=Lw97jjpNW0qnluWLs9FH7pp1lrQFlkFyUFYsFWqMU1o=; fh=REc9EJfAq+TSY9126QSZ7oPdaKwxE8j8XYTCCsyur1Y=; b=iT9MFL3hu86I+ifihWx+7/HKnpc4QUEsv3cbLGkp2DF3xnN32MLQJeIPI5IgrNj3KT om/BHGBkAbTcR6ZQSNrCeGqoW6G45RZJxJrN7/2sd0tpnWfk54nNMI2BL5Wb1wMPhInI 7RFK/ef00mqAnORh4vpgQD69vq8kGyDXlfhTgfFd80MUUXZP0y4v04g1LvyUsVGIvMHr dlYMVq4P2MB3IoJMPovn4/AZDBJR2OhThyRbJHKbB9esoAv+EMhTZbB53+cJIv6Meggz FsWmEQp090g1K8JCWELEOYfBuQ5uChqEhMtOu5IFuiQqBCUXl9TKpyy9volQFkEfy84P C8TQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v28xvI8E; 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 m11-20020ad45dcb000000b0068c489b1f51si1854290qvh.188.2024.02.15.10.07.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:07:43 -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=v28xvI8E; 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 1rag5P-0001wE-Vk; Thu, 15 Feb 2024 13:03:52 -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 1rag54-00017X-Bn for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:30 -0500 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag50-000385-4s for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:28 -0500 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a3d6d160529so142999066b.0 for ; Thu, 15 Feb 2024 10:03:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020204; x=1708625004; 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=Lw97jjpNW0qnluWLs9FH7pp1lrQFlkFyUFYsFWqMU1o=; b=v28xvI8EPp4Cg5DXIfPVVTDliY50wUlIWSRMVitpklKSyP3vShtfYSs4KEZL5VGjQt HoYjvJk2zYibKyw0qh/6MOX3TnbkVd7rBtZZC52aSASvG4MeI11sC4eqKLXmbP1TH3+W b+GB0sC1mtRzg0M6Lt12Zh+ELdIFY59nV2CGLoJe0/+L35qcSMEzt4KYfs/0/TiPXYpG 6qGeMcqKTf7/XapkEcZc44vKGBAsepXd8yARdH0DYSft7+HEgzvHcSSwg5gZDDFbg+Nk kgX7dSM1fqJeOLsNakbC8hjZ6/yKOc7jLp0Mz9nMaEL8irUyhHNq3Zxkk0vjTvVFZbBA Z75w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020204; x=1708625004; 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=Lw97jjpNW0qnluWLs9FH7pp1lrQFlkFyUFYsFWqMU1o=; b=EQPCqEspk4HoUlLOJXq6kLsUbkMbtAH4MsNKKzJ3ewQGpdScX4QOsRzS67xyIq+kDU Vcj5EUmKXwMcH8eElMjmiGw9DJc4iSmcYEIJ0MPO52SOsOcXsqkPxg/F010UTsWtNrj1 l2+2hNLH4m7rWT+2zYBBZGrbHoT1i8/ecfwiPr7mFSwNgTPs6P7n8E3tNyJFw8gDU7WR pZXXJtN19bIdTzgE3kHLPmXMNdnlLWaFM1heQihpCymQ7WlaEBhIB2/UHBkvV0rpgTlJ /N9Dfn+MhAzk0U21Fq/QS53NmFyCoo6hbneA3KYfd1kjf8qo3uxIET+AvSGUy77LJ2Q/ RAQA== X-Gm-Message-State: AOJu0YwM3LTTH7flnRdRF8RZUtwU75zF3E31sifhaC7W5NZbyu3Lv7dr jeA2iPYxyjL2CQykSyTYo5Z2ZF2d1qtNSg8yGjSYNvdLo6flnvjFj+rRNkhFcXJLFCNnS3TMFNV zUPU= X-Received: by 2002:a17:906:494e:b0:a3d:88be:94d7 with SMTP id f14-20020a170906494e00b00a3d88be94d7mr1603043ejt.70.1708020204492; Thu, 15 Feb 2024 10:03:24 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id wb13-20020a170907d50d00b00a3d28aa375bsm771690ejc.151.2024.02.15.10.03.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:03:24 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Michael S . Tsirkin" , Richard Henderson , Paolo Bonzini , Eduardo Habkost , Marcel Apfelbaum , Paul Burton , Aleksandar Rikalo Subject: [PULL 49/56] hw/ide/ahci: Rename AHCI PCI function as 'pdev' Date: Thu, 15 Feb 2024 18:57:43 +0100 Message-ID: <20240215175752.82828-50-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=philmd@linaro.org; helo=mail-ej1-x630.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=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 We want to access AHCIPCIState::ahci field. In order to keep the code simple (avoiding &ahci->ahci), rename the current 'ahci' variable as 'pdev' Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Richard Henderson Message-Id: <20240213081201.78951-4-philmd@linaro.org> --- hw/i386/pc_q35.c | 15 ++++++++------- hw/mips/boston.c | 10 +++++----- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 76b3b6032b..a89f900c4c 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -134,7 +134,6 @@ static void pc_q35_init(MachineState *machine) GSIState *gsi_state; ISABus *isa_bus; int i; - PCIDevice *ahci; ram_addr_t lowmem; DriveInfo *hd[MAX_SATA_PORTS]; MachineClass *mc = MACHINE_GET_CLASS(machine); @@ -292,16 +291,18 @@ static void pc_q35_init(MachineState *machine) 0xff0104); if (pcms->sata_enabled) { + PCIDevice *pdev; + /* ahci and SATA device, for q35 1 ahci controller is built-in */ - ahci = pci_create_simple_multifunction(host_bus, + pdev = pci_create_simple_multifunction(host_bus, PCI_DEVFN(ICH9_SATA1_DEV, ICH9_SATA1_FUNC), "ich9-ahci"); - idebus[0] = qdev_get_child_bus(DEVICE(ahci), "ide.0"); - idebus[1] = qdev_get_child_bus(DEVICE(ahci), "ide.1"); - g_assert(MAX_SATA_PORTS == ahci_get_num_ports(ahci)); - ide_drive_get(hd, ahci_get_num_ports(ahci)); - ahci_ide_create_devs(ahci, hd); + idebus[0] = qdev_get_child_bus(DEVICE(pdev), "ide.0"); + idebus[1] = qdev_get_child_bus(DEVICE(pdev), "ide.1"); + g_assert(MAX_SATA_PORTS == ahci_get_num_ports(pdev)); + ide_drive_get(hd, ahci_get_num_ports(pdev)); + ahci_ide_create_devs(pdev, hd); } else { idebus[0] = idebus[1] = NULL; } diff --git a/hw/mips/boston.c b/hw/mips/boston.c index cbcefdd693..0ec0b98066 100644 --- a/hw/mips/boston.c +++ b/hw/mips/boston.c @@ -677,7 +677,7 @@ static void boston_mach_init(MachineState *machine) MemoryRegion *flash, *ddr_low_alias, *lcd, *platreg; MemoryRegion *sys_mem = get_system_memory(); XilinxPCIEHost *pcie2; - PCIDevice *ahci; + PCIDevice *pdev; DriveInfo *hd[6]; Chardev *chr; int fw_size, fit_err; @@ -769,11 +769,11 @@ static void boston_mach_init(MachineState *machine) qemu_chr_fe_set_handlers(&s->lcd_display, NULL, NULL, boston_lcd_event, NULL, s, NULL, true); - ahci = pci_create_simple_multifunction(&PCI_BRIDGE(&pcie2->root)->sec_bus, + pdev = pci_create_simple_multifunction(&PCI_BRIDGE(&pcie2->root)->sec_bus, PCI_DEVFN(0, 0), TYPE_ICH9_AHCI); - g_assert(ARRAY_SIZE(hd) == ahci_get_num_ports(ahci)); - ide_drive_get(hd, ahci_get_num_ports(ahci)); - ahci_ide_create_devs(ahci, hd); + g_assert(ARRAY_SIZE(hd) == ahci_get_num_ports(pdev)); + ide_drive_get(hd, ahci_get_num_ports(pdev)); + ahci_ide_create_devs(pdev, hd); if (machine->firmware) { fw_size = load_image_targphys(machine->firmware, From patchwork Thu Feb 15 17:57:44 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: 772984 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp967846wre; Thu, 15 Feb 2024 10:06:28 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVoLdc7Vbs9Ic3aWt+ANkM8MoaEzfpEk7LzfJBDqV/7Zjlr5VGlZvOGkFQeZJYk2VU8QacH8MS+aCmhsoY2Jizf X-Google-Smtp-Source: AGHT+IEFnRM6gEcn/Xf4fR46VgcuDn5z37QhnL77LPAhoI0lVcS4w7i04hF5oPr6o7oMaVqVaKGe X-Received: by 2002:a05:6102:c87:b0:46d:1d91:ad9b with SMTP id f7-20020a0561020c8700b0046d1d91ad9bmr6511263vst.13.1708020388623; Thu, 15 Feb 2024 10:06:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020388; cv=none; d=google.com; s=arc-20160816; b=z7bSu055oRR8NK2UVNgJnKfZlGqDBhM9zYpNbasFJXxXjX691ZLXxAOpp8l9yuFsZO hhpsWOx1BHoZ8AKJvPaiT+RGTwCfCzvDjwEQKtdKEShpXr/a7U/HcbzkyExytNqM5PZZ gxnS/4NI/A8xx+uOyfn9AyVZeSZlljJ0yHQ8hCYl/cxADQH7DsPZFcMwzRjMJrx1euEr 9tmG+7YeqCWe44lsXfNDodldUZ+3r/NM6LsCt/a4aRIxUrVn/rOQVaJ4D1GP6TbVdtyN wMiaHELp5NkKVnViQKEekYSmdvbRm1RpmbihbdFwDVrtcd3qS/OLz7bSc9nYUgMFJRc5 JBUw== 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=ExMtb1HNe13B1Pbdje1mxE1780Ya0+pqDVCTBcv4Coc=; fh=LskQBqbR1i+n8KHJd8DaPuebftdqxFlBFOfZBeQkfyw=; b=UyMVC0Bt5YRxPHA9+vD0Qb19qV92R2PFLrkKZW1LqBpZoumcWJHpc54J71w1iB4gBM wUQp80y/DiSsROlwK7kqHkShdqgzRsEkj+OFwgTUtbi9UBfhxHC6+t2y9wfFojHytzNA N4giwghGvM+xa5ZAe9ULBBWr0nQbPhakuNygVTjDVf5/8WCMdHx1LKKqijF0NTy/TXLj 4pPbLDgCiUzwH4PLeuT0nKFD6KYeESTRUSnytD1nPJDdbJRw9QNU9E060O3CJ8AMJbF+ 8okwJfWkSpDz5QdURzcrMTyHDouUviKrCCKZvzy/7Eu7J4V9lcYDENGumgUUwXMc2kNz 5EWg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zXBxknZM; 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 c38-20020a0561023ca600b00467fe7eb29esi424675vsv.443.2024.02.15.10.06.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:06:28 -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=zXBxknZM; 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 1rag6B-0004UR-Um; Thu, 15 Feb 2024 13:04:40 -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 1rag5A-0001qa-3h for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:41 -0500 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag57-0003AC-MV for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:35 -0500 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-5116ec49081so1395887e87.2 for ; Thu, 15 Feb 2024 10:03:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020211; x=1708625011; 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=ExMtb1HNe13B1Pbdje1mxE1780Ya0+pqDVCTBcv4Coc=; b=zXBxknZMKxNOPfvmAixCzHxKAFfNOZ0mAGcBRKa81qjZQOf4o+FEX8ts7ek2qTejJ8 jxffaExn6r6ASorilO2GTv1rb1ozAVS8aWbbM5NKp0+y+H5E3AmLE7AsNajZocfcyVo1 SdXU4fVQuzgDVtO2RW4u3VKqxsrVQDfiOUTCWN3jz9fyZuND7aFbkDZb+wwOQj7r13kE xVQCdXvfUtzT5robffOe/kY1m1LN3B4AFqcJwetB7COjiG3aN41PirSpcWFKwCk4FmXI TpSVJ6DQi0jC4WD1y8EU2XSJXhDHaV9I8Mz4tioJBv6bayE8Jy/fl4xRLyYnZv8SE7NY 3fdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020211; x=1708625011; 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=ExMtb1HNe13B1Pbdje1mxE1780Ya0+pqDVCTBcv4Coc=; b=OOPP4j6LO9e8bSkHgAm572UYYy/d0QbtyWSdUyWsE4IjYRnvtfgJSfz8mxSWXL65Pw u54QPJf30gXRzfa5Obs5LD7KQ34j3tFALD6WppR8qjjw1DUWuQzOuPepvzfDoYQtvH3x 0JECzgRKLpZl3Y0jbsWOjemSE+3SmHypDnR60cb0tZ4VuC4YtdmFl+315pxl+rIvGEMp qrbhRXAX8p9t80SL8l90/+SC4LdurbZ3eZ48OV+yfHeDkS/a4avrrMWoJ6KDSPRTKTzH CUNfZYEmuUZX+6h+iUYnw+rcxfP4rvpOTYpKOhV5/uCgfT98f7/9WTS+ZqOJKVHdZi6o SpjQ== X-Gm-Message-State: AOJu0YxNyao95yCAJpIzsIOAen7hbLw2gj1pxqAskJqiRQTbRWOg3I45 Rm7RMYbEEjDeavWoQDWDUQXJqFujfaWkSoqYRri/k5f+TcyVU0hVFBjT/xmciLQTKQHiq48ypRw O76s= X-Received: by 2002:ac2:46eb:0:b0:511:78cf:968a with SMTP id q11-20020ac246eb000000b0051178cf968amr1860646lfo.68.1708020210864; Thu, 15 Feb 2024 10:03:30 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id pk27-20020a170906d7bb00b00a3d716dde9csm786640ejb.44.2024.02.15.10.03.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:03:30 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Michael S . Tsirkin" , Richard Henderson , Paolo Bonzini , Eduardo Habkost , Marcel Apfelbaum , John Snow , Paul Burton , Aleksandar Rikalo Subject: [PULL 50/56] hw/ide/ahci: Inline ahci_get_num_ports() Date: Thu, 15 Feb 2024 18:57:44 +0100 Message-ID: <20240215175752.82828-51-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=philmd@linaro.org; helo=mail-lf1-x12c.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=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 Introduce the 'ich9' variable and inline ahci_get_num_ports(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Richard Henderson Message-Id: <20240213081201.78951-5-philmd@linaro.org> --- include/hw/ide/ahci.h | 1 - hw/i386/pc_q35.c | 6 ++++-- hw/ide/ahci.c | 8 -------- hw/mips/boston.c | 6 ++++-- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/include/hw/ide/ahci.h b/include/hw/ide/ahci.h index 6818d02063..dbef377f3d 100644 --- a/include/hw/ide/ahci.h +++ b/include/hw/ide/ahci.h @@ -52,7 +52,6 @@ typedef struct AHCIState { } AHCIState; -int32_t ahci_get_num_ports(PCIDevice *dev); void ahci_ide_create_devs(PCIDevice *dev, DriveInfo **hd); #define TYPE_SYSBUS_AHCI "sysbus-ahci" diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index a89f900c4c..09e12418f9 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -292,16 +292,18 @@ static void pc_q35_init(MachineState *machine) if (pcms->sata_enabled) { PCIDevice *pdev; + AHCIPCIState *ich9; /* ahci and SATA device, for q35 1 ahci controller is built-in */ pdev = pci_create_simple_multifunction(host_bus, PCI_DEVFN(ICH9_SATA1_DEV, ICH9_SATA1_FUNC), "ich9-ahci"); + ich9 = ICH9_AHCI(pdev); idebus[0] = qdev_get_child_bus(DEVICE(pdev), "ide.0"); idebus[1] = qdev_get_child_bus(DEVICE(pdev), "ide.1"); - g_assert(MAX_SATA_PORTS == ahci_get_num_ports(pdev)); - ide_drive_get(hd, ahci_get_num_ports(pdev)); + g_assert(MAX_SATA_PORTS == ich9->ahci.ports); + ide_drive_get(hd, ich9->ahci.ports); ahci_ide_create_devs(pdev, hd); } else { idebus[0] = idebus[1] = NULL; diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index aa9381a7b2..8b97c6b0e7 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1896,14 +1896,6 @@ static void sysbus_ahci_register_types(void) type_init(sysbus_ahci_register_types) -int32_t ahci_get_num_ports(PCIDevice *dev) -{ - AHCIPCIState *d = ICH9_AHCI(dev); - AHCIState *ahci = &d->ahci; - - return ahci->ports; -} - void ahci_ide_create_devs(PCIDevice *dev, DriveInfo **hd) { AHCIPCIState *d = ICH9_AHCI(dev); diff --git a/hw/mips/boston.c b/hw/mips/boston.c index 0ec0b98066..a6c7bc18ff 100644 --- a/hw/mips/boston.c +++ b/hw/mips/boston.c @@ -678,6 +678,7 @@ static void boston_mach_init(MachineState *machine) MemoryRegion *sys_mem = get_system_memory(); XilinxPCIEHost *pcie2; PCIDevice *pdev; + AHCIPCIState *ich9; DriveInfo *hd[6]; Chardev *chr; int fw_size, fit_err; @@ -771,8 +772,9 @@ static void boston_mach_init(MachineState *machine) pdev = pci_create_simple_multifunction(&PCI_BRIDGE(&pcie2->root)->sec_bus, PCI_DEVFN(0, 0), TYPE_ICH9_AHCI); - g_assert(ARRAY_SIZE(hd) == ahci_get_num_ports(pdev)); - ide_drive_get(hd, ahci_get_num_ports(pdev)); + ich9 = ICH9_AHCI(pdev); + g_assert(ARRAY_SIZE(hd) == ich9->ahci.ports); + ide_drive_get(hd, ich9->ahci.ports); ahci_ide_create_devs(pdev, hd); if (machine->firmware) { From patchwork Thu Feb 15 17:57:45 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: 772988 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp968008wre; Thu, 15 Feb 2024 10:06:47 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX4HBp5SV097AsX3d3BMToQMzUAurVKop1tYrc+AXo+v9gCv4pvarSWY+iwIZIdNF21OrZTU6YkRbClg1lpEBtz X-Google-Smtp-Source: AGHT+IEVYeKh8xsGTqswpaGnhf/bt6WU1GwBGgpEQO9xBWzRTUbyyP47gaQTEQqFVzZkMH5R/NdL X-Received: by 2002:a05:622a:490:b0:42c:8605:5b79 with SMTP id p16-20020a05622a049000b0042c86055b79mr2849256qtx.8.1708020407595; Thu, 15 Feb 2024 10:06:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020407; cv=none; d=google.com; s=arc-20160816; b=QVDPzPEtVbQ6oL8RI3/p0HrppfsYfiZFv3SSfvTjDXfEZaTZ2sJyXBIT31oel00tpg TBQVJ1eH/0U7zHo8cRLtFIBVsc8gFJONXU2FC0e3hdlF7KlAu4F3y36OfUio5nJbV+gN ASDopIcW2eEsqYHpaIL+ti/OYxqzL/rZDhgBakUqdA7KvSDcWZ+JM2SlQGvVr6S9Bfuf AE8RYeM6OJAIBkS+IDQOVbh5fiJt9o62KuEOiinCvHBwQW5VfXTSMwicNatrNC5hM7lW qevt2WAIpygMxGh6cKq+pFPapBKLfo/L6ALtsvOtZUMsn5X1IUW5ZwLLfby10WBQEMCI ervA== 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=OBV5qUeSmxg7d8YWWooFsnTAz7bZYxgfHwu1fmOUlCU=; fh=jkHjHHMKO4WMGqjIPBuoqxK678c2YxR5/zvcQM1fhTo=; b=OLdZdp90ykAxMhXaU678DXf62kRSzgfqDofw0J/GP5JPA4hmcjxKQBmLduFYvJAW2d KWDGqYxda/nqLnEAJG+nf6zClcxGst39Rc7l2ShEZ1RFxJOuWjmvn4yzz4ZKAP39psiJ QCf/t55uSBT66GWLcNcR73yap+LNotBJmphKlQ1DJoTYzpivBGBYgX0TR38PHMJjMMv0 BLoVCWXBsLq49nWPpr87GOqnRRwEBTvY/ScGgt09jQ77vPdxfi+98w27oclyWWHiXBOk Dc0bqcbrhWY85gLKFrZtFlElvqVFw8HCuvi34kvPvN9pnAaPhKePZMc+sTaKgJJH/lIB C/xw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mX6wJTbP; 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 v21-20020ac85795000000b0042c7bef8823si2063815qta.146.2024.02.15.10.06.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:06:47 -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=mX6wJTbP; 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 1rag6G-0005FV-5J; Thu, 15 Feb 2024 13:04:45 -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 1rag5I-0001w1-6s for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:47 -0500 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag5E-0003BE-OP for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:43 -0500 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-563bb51c36eso921822a12.2 for ; Thu, 15 Feb 2024 10:03:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020217; x=1708625017; 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=OBV5qUeSmxg7d8YWWooFsnTAz7bZYxgfHwu1fmOUlCU=; b=mX6wJTbPzF1p33zih82b2xr+rvHG/p8upbcp2+etksbCBn124LuDniBoYQ3U+qzaq6 0fsgDqUvpiwWxIbCeVzq2O4wDWnZQjIYaE8cuXIxHNbP2KkDsHDEAhuH0K6MuSp8mfCl DlaYV/cQ4Z77TarIYiYu8Pby2msS6QjWd54gbWSjB+is8xOLuh3lvsYPW1qMM0cL/XXf eaX66Y94yhrzQ9hfs8rtym1cqWaAv2RkEaRzbeGuu2XPfyrTR+u5/mBgUWXxe/4AuPDe WBxQBJn9MTydZMKD/8iMGtF5Twwz0pkyk4CLlUnZp0XuQFeGi5QH5U+iCiZC4R7oTo8V ydig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020217; x=1708625017; 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=OBV5qUeSmxg7d8YWWooFsnTAz7bZYxgfHwu1fmOUlCU=; b=DHgQKG51Z7bYTMx80p1cjQRhQ4OMi8crZNSTk5HrnZGXduyDs7D44KuoalUdaqyVli M/ZSMr8nk444yBweBgxRDzxUZtu1GeHH26W2UzYg+drvHnYEXGanc/h1iObC8SDhdNEP +Q5oEM3rdWu21YSvxymVCBA1brjBbBPViYwV++VOi8RizE3BBHal5rU/0d+vE2TGgbqF Ct40TDQ1TSR7jgWOkjEqB2t4ORx+SMO5VJ7bU78jiPEhWPvMQOmbOk/MIHFqJkTTo9Fe oDx0QK2ZsuFcrgQ7+P4lqJnM+T9bS8pu5oZEOlKk4VYqgejr9gqkWPq1nt0Eb4K+zXVd wsbg== X-Gm-Message-State: AOJu0YyDj3yEDNDR+5qVEwh0YJLopu41wtIwGWtNkprB0k02XA7aDH3b 7AHAAAspNsP7CQaKBzzD8Dx+z5aZtgJiy860ZiJIGqjZhpi4lYp1T7s87848D5a85zxuW5FKpT5 Pv0k= X-Received: by 2002:a17:906:c415:b0:a3d:7d6b:2dc3 with SMTP id u21-20020a170906c41500b00a3d7d6b2dc3mr1755304ejz.73.1708020217134; Thu, 15 Feb 2024 10:03:37 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id t22-20020a1709063e5600b00a3c091ead20sm784624eji.222.2024.02.15.10.03.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:03:36 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Michael S . Tsirkin" , Richard Henderson , Marcel Apfelbaum , Paolo Bonzini , Eduardo Habkost , John Snow , Paul Burton , Aleksandar Rikalo Subject: [PULL 51/56] hw/ide/ahci: Pass AHCI context to ahci_ide_create_devs() Date: Thu, 15 Feb 2024 18:57:45 +0100 Message-ID: <20240215175752.82828-52-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=philmd@linaro.org; helo=mail-ed1-x534.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=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 Since ahci_ide_create_devs() is not PCI specific, pass it an AHCIState argument instead of PCIDevice. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Richard Henderson Message-Id: <20240213081201.78951-6-philmd@linaro.org> --- include/hw/ide/ahci.h | 2 +- hw/i386/pc_q35.c | 2 +- hw/ide/ahci.c | 5 +---- hw/mips/boston.c | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/hw/ide/ahci.h b/include/hw/ide/ahci.h index dbef377f3d..8cd55b1333 100644 --- a/include/hw/ide/ahci.h +++ b/include/hw/ide/ahci.h @@ -52,7 +52,7 @@ typedef struct AHCIState { } AHCIState; -void ahci_ide_create_devs(PCIDevice *dev, DriveInfo **hd); +void ahci_ide_create_devs(AHCIState *ahci, DriveInfo **hd); #define TYPE_SYSBUS_AHCI "sysbus-ahci" OBJECT_DECLARE_SIMPLE_TYPE(SysbusAHCIState, SYSBUS_AHCI) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 09e12418f9..d346fa3b1d 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -304,7 +304,7 @@ static void pc_q35_init(MachineState *machine) idebus[1] = qdev_get_child_bus(DEVICE(pdev), "ide.1"); g_assert(MAX_SATA_PORTS == ich9->ahci.ports); ide_drive_get(hd, ich9->ahci.ports); - ahci_ide_create_devs(pdev, hd); + ahci_ide_create_devs(&ich9->ahci, hd); } else { idebus[0] = idebus[1] = NULL; } diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 8b97c6b0e7..bac1871a31 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1896,10 +1896,8 @@ static void sysbus_ahci_register_types(void) type_init(sysbus_ahci_register_types) -void ahci_ide_create_devs(PCIDevice *dev, DriveInfo **hd) +void ahci_ide_create_devs(AHCIState *ahci, DriveInfo **hd) { - AHCIPCIState *d = ICH9_AHCI(dev); - AHCIState *ahci = &d->ahci; int i; for (i = 0; i < ahci->ports; i++) { @@ -1908,5 +1906,4 @@ void ahci_ide_create_devs(PCIDevice *dev, DriveInfo **hd) } ide_bus_create_drive(&ahci->dev[i].port, 0, hd[i]); } - } diff --git a/hw/mips/boston.c b/hw/mips/boston.c index a6c7bc18ff..1b44fb354c 100644 --- a/hw/mips/boston.c +++ b/hw/mips/boston.c @@ -775,7 +775,7 @@ static void boston_mach_init(MachineState *machine) ich9 = ICH9_AHCI(pdev); g_assert(ARRAY_SIZE(hd) == ich9->ahci.ports); ide_drive_get(hd, ich9->ahci.ports); - ahci_ide_create_devs(pdev, hd); + ahci_ide_create_devs(&ich9->ahci, hd); if (machine->firmware) { fw_size = load_image_targphys(machine->firmware, From patchwork Thu Feb 15 17:57:46 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: 772977 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp967172wre; Thu, 15 Feb 2024 10:05:28 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWfLUn4Zo6XYtl6CZJQ2Ogx8F0ndpz6JVAn+siXbzUuuvRi3BDXLJnxqRQGxoYJ5hoSGvtkja9MuLZknf9wSy6a X-Google-Smtp-Source: AGHT+IE4vayFFCmM9SWgToiHFBVAZcwR6k8NfC34e7coU1C7n0z/jAJAIc0xydnuFTufMdN8ClPt X-Received: by 2002:a05:6102:243c:b0:46e:bcbe:67cd with SMTP id l28-20020a056102243c00b0046ebcbe67cdmr2481752vsi.18.1708020328417; Thu, 15 Feb 2024 10:05:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020328; cv=none; d=google.com; s=arc-20160816; b=HZ1+eom//omDo1nIRLuuK9eLIO1ARkWIz/jvSmRHgvVVmjkts3DGQtsDFMMWIhMxAy VVadzd7Fl5mX3aYz3Jv+/o3tsoU4Cxhud6xXgy02meyKNIUP0PaSpI7+kIHmFkoP1kg/ qMZpszMM5573F9fnJGEwd72hFvRJF3v8uNzki7gC4MQw+cewr1+Qzzpn4xH0wOc7UgG7 WnWz7IRVNVP4w0Dtha1/D54mgKLORktWQVeizCsen1qwMvhcF53g6O8/fn6xXPcvp47D ZWpUuv4ieovLIN4cxd6wIJFLN22n7COWwUdbNSzq5a6/dXIX5CQiLpaMIAki109wHxEU 0fVw== 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=xfCkJEQkL13uYlKC8WYjGFkI0aspDHRkh5m4W/eac1U=; fh=RnY3BkcA5+JvuWZkU8e2LOihW+vbjuMZ8X6rJsvoWdI=; b=lZKn/i5Ns6oo4PHso2vKf6Tzw+3DqOp3GrtgiZ7lWZrMLysEFy5pUefLUY4xAYgqPY U/Ct0FFD7pmPCFHkycdhZYUHk/waiHLSQIVOINyF0Qbn80p0hHc4g9kSBIapPdhtVv2k PKfdNrdYW09N5wTnEt50JapHWPmVaFaExf67Gb9pSbeiVqvt7IjKHsTxJzByB6GJbZ/S zxUyAnxOgPCBW7Yp3ua2ltgiWEcGCcx/TxxmMrmb/sccOMWbUhvGAJTbWMjvZ5ACArBj kte9dtZj+Y2zw9ikDPUqFTUDF20Znxj1maAgXL8IP+NNxE9lyMDtsmDr9Cwt5V4cSxwj /bGg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DdTLLq3z; 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 q10-20020a056102100a00b0046950d2b2c7si323458vsp.351.2024.02.15.10.05.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:05:27 -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=DdTLLq3z; 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 1rag5U-0002O7-TA; Thu, 15 Feb 2024 13:03:56 -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 1rag5L-0001wn-Ho for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:48 -0500 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag5J-0003CR-3C for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:47 -0500 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a3d6ea28d46so263027966b.1 for ; Thu, 15 Feb 2024 10:03:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020223; x=1708625023; 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=xfCkJEQkL13uYlKC8WYjGFkI0aspDHRkh5m4W/eac1U=; b=DdTLLq3zRc2SElnLLqfSZBeBKHVyNTskJqyIQQ6LEIeMyycTPQIlvPtefsgXEuhS29 2wKkEPp7fh85sxwNsGDYtTveoxUGw1oU72d9Q2LuVU2smoUKLNKXNB+yMKNsLX9Zjln0 mk1TCdx/hSG/ppzdSiOv5nY35d2Ujf+lKwj+Miw7dZy0Xrucz8NDc/IenvZlRr1a1q2U ASfVkJgHAZ4+Nj9fJ3vuTeblqJkrej2W926ovZWO9n2onrVxhBdGuPKiybeFcK+9PUFl oJIuRBh+ERNFjWcRf6+prwjs4HxPbtXAhFr86SA2md4kuQmOoiTt0gpvsiEzt+w3/OcC qRSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020223; x=1708625023; 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=xfCkJEQkL13uYlKC8WYjGFkI0aspDHRkh5m4W/eac1U=; b=bf3NyEyr8jCDHscCxwr6CzMj2W/CHL62LwrR45XHP3svFG7DdS+oK7CfgYZx0hrHUi 2bm5HKhUWUaUoHS+ZOTIO0EwK52etjGRxxqDEsrKhzS/Wzbc6E8moPtl82vDRfuJTjmH yhauTnpqucNRYGlURjmRB1F6U0rdJXmgOGsYVp5uzKl62PHuTofD9UUIXdXm7XqZTwCj si+gElDB18NFLSmn22oqSA6vEQWRQfyNNHGGWPksvrnKjIORAAba1Z7J7IXFD72t6cn8 diI06V+BuV7rARibCJI/RGLJ9/MkkDga4m+PvEc/mbbh2pHNaPALHXEOzCGH97hXZ9Jb YMMg== X-Gm-Message-State: AOJu0YyoC4sIytJWr7ADlLDxI+llrGy8I35Mivc7vtjhqkHk5VuD9oR+ u8DP3arGxEQXkwDXI/NEEsvucRS1EZ9O6r6PLLVg+zp/dkIubHQq3aTJtnapbJovzfXJIXH36dm aRS4= X-Received: by 2002:a17:906:bc4e:b0:a3c:a545:5fd8 with SMTP id s14-20020a170906bc4e00b00a3ca5455fd8mr2480206ejv.26.1708020223279; Thu, 15 Feb 2024 10:03:43 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id s13-20020a1709066c8d00b00a38936aa08dsm791978ejr.32.2024.02.15.10.03.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:03:42 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Michael S . Tsirkin" , Richard Henderson , John Snow Subject: [PULL 52/56] hw/ide/ahci: Convert AHCIState::ports to unsigned Date: Thu, 15 Feb 2024 18:57:46 +0100 Message-ID: <20240215175752.82828-53-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=philmd@linaro.org; helo=mail-ej1-x635.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=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 AHCIState::ports should be unsigned. Besides, we never check it for negative value. It is unlikely it was ever used with more than INT32_MAX ports, so it is safe to convert it to unsigned. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Richard Henderson Message-Id: <20240213081201.78951-7-philmd@linaro.org> --- include/hw/ide/ahci.h | 2 +- hw/ide/ahci.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/hw/ide/ahci.h b/include/hw/ide/ahci.h index 8cd55b1333..604d3a0994 100644 --- a/include/hw/ide/ahci.h +++ b/include/hw/ide/ahci.h @@ -46,7 +46,7 @@ typedef struct AHCIState { MemoryRegion idp; /* Index-Data Pair I/O port space */ unsigned idp_offset; /* Offset of index in I/O port space */ uint32_t idp_index; /* Current IDP index */ - int32_t ports; + uint32_t ports; qemu_irq irq; AddressSpace *as; } AHCIState; diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index bac1871a31..2c3306dae4 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1819,7 +1819,7 @@ const VMStateDescription vmstate_ahci = { .version_id = 1, .post_load = ahci_state_post_load, .fields = (const VMStateField[]) { - VMSTATE_STRUCT_VARRAY_POINTER_INT32(dev, AHCIState, ports, + VMSTATE_STRUCT_VARRAY_POINTER_UINT32(dev, AHCIState, ports, vmstate_ahci_device, AHCIDevice), VMSTATE_UINT32(control_regs.cap, AHCIState), VMSTATE_UINT32(control_regs.ghc, AHCIState), @@ -1827,7 +1827,7 @@ const VMStateDescription vmstate_ahci = { VMSTATE_UINT32(control_regs.impl, AHCIState), VMSTATE_UINT32(control_regs.version, AHCIState), VMSTATE_UINT32(idp_index, AHCIState), - VMSTATE_INT32_EQUAL(ports, AHCIState, NULL), + VMSTATE_UINT32_EQUAL(ports, AHCIState, NULL), VMSTATE_END_OF_LIST() }, }; From patchwork Thu Feb 15 17:57:47 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: 772972 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp966970wre; Thu, 15 Feb 2024 10:05:11 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVls7i723wX8CObhVtns1+scjMTmlPRZiRICqqzlum8mq0KSecfEAcAGydCRtHAwDGYlWp6py8HIzmFcIwlDbJS X-Google-Smtp-Source: AGHT+IHOMQ3UTIdZoNofAjUEdR0iUJMMQJdKd3k2VloxvR14j3g3Mrxb53anbuzLD9ImRCw/yfXg X-Received: by 2002:a0d:eb12:0:b0:604:c8e7:9dcf with SMTP id u18-20020a0deb12000000b00604c8e79dcfmr2900727ywe.35.1708020311174; Thu, 15 Feb 2024 10:05:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020311; cv=none; d=google.com; s=arc-20160816; b=PPjXXrtwKmn06wmvDlJJv87cn/KQM8h1Q82CCGSPKc1WBQ0sY2gYPlaYLF48sbkTrL J11ij24/77/+60WwJ1w3kgQ0nJi/gVU8UW0pO/IQ3nmDrMGYLnm4P8dhP9kW670+aluO 7JD8s4R+O9F+Eldf1qhk6jPmJzOZe9c41naKXoqpOIfi4Vd1rMYHjB2cwZdpsZMXhD0W H88VTmzl4gAJtSEYxgFtf3yLY5A+WELaQ+0iAv793cWlpYFq2X4gD5UzlwXE1GbaSRKw ANz/ziQfygacraVwGeB3OYj0afgjpmdhxb+wW9VTa3eEXOekv/DPC3Hdi1PbicgfGRSX hVhA== 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=6J7vJKQXa+8iZQt74/J2PIq4S7PNQU5OOBph7QaqNT8=; fh=RnY3BkcA5+JvuWZkU8e2LOihW+vbjuMZ8X6rJsvoWdI=; b=QPu5VB2ziVTwLaQZP4WrWk1vRM6Ancn6VgAkOM0MeT7Fg+aYmnFPk9an9vuwypQuoq 7NzMzBDfrI4aIVYTQVvndiDcj4yR++4Qs+r6S9z2anJkOYDaUoNoEG2Oa/MBHWB2IYPy PDkAT1QgfcH09jzZDw5FEzEf35h7BWaPjnitbR6lnrW6UUd5GH6LsfOOCO3tlvpIhbJC MneuPIvZKpoTSOue784pBzOJmK6LnL3BogHr7DTz7DFAkqAh7UnezN9jvuMG3A6veUka YApCmG2kGN7oU8UvrDMUpQtGWfLvyOjD80xwwX7gV2zGdhXRIBffPcs3yLNMINHvn5sy 0SSA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L2xmsA7O; 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 u143-20020a0deb95000000b006041c7ea6c7si685215ywe.541.2024.02.15.10.05.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:05:11 -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=L2xmsA7O; 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 1rag6J-0005h6-Ka; Thu, 15 Feb 2024 13:04:47 -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 1rag5R-00026E-1h for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:53 -0500 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag5O-0003Dt-QI for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:03:52 -0500 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-56399fb02b3so1545140a12.1 for ; Thu, 15 Feb 2024 10:03:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020229; x=1708625029; 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=6J7vJKQXa+8iZQt74/J2PIq4S7PNQU5OOBph7QaqNT8=; b=L2xmsA7OzIxFYSMqiDkrrEsCWcChHteAtGCiR2/B3sDD0T3YFPmn0Z++yCAiELAEXr C4wl7TCHIwpiaOUjiknUK6M26nH8ax2a+Kx4+d2n94o0DbHTzfm7n8uj+qgyDTfARuxd 9NCQPFsBRT3mqTbSm0JbcjTO1V8Y0MQW/XbMODRMKaVmAMXCy0Ua8D2jD9M3EQrK+sJl GaEq+HuB/8aA2sdhcgn2dFnhnNVb2hqIo3VTxJ3MJWJui37O6GbVL4Gc7llGpRwPgsYM 5KJABNmFbmalqXLVGbUKx9QETBZY4PDuZYd4HK+yvh9Ls7r/ffIbIwKAy1qJo0LAwkM7 IKDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020229; x=1708625029; 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=6J7vJKQXa+8iZQt74/J2PIq4S7PNQU5OOBph7QaqNT8=; b=ZzEPnlH2HE/oPOygkcYdPl1YcCGDVWqrOLUyuqQ6YGt0LuDm1p/WN7h6vYbCfN+iFU tkFqN083Nkm2NP+EemIdj/0vkE+BeIBCPb0rm42ZmdZoYyEJepsKoqwYIcpzHwBZFND5 /TKnLmW7U/B32t2xXFYDgZYi3xiITWTAKh9RkUMMLsdKXukAiU74c2q7AX1/tWzM1441 cxOpQVuE9qxnorbsXnUIzbW3pakToRXyoO8r/5xnfXhDTW5i1+/9aRHQXiYHh8IaysWF 3cDupYF6gB7NCaa6zCntjv5F5kHrrhGzdqNifIOeLyxl4rEk2FPf/1ZjyDJY9notJO7t C3iA== X-Gm-Message-State: AOJu0YwW38IM9UxhVMBVf+vPcAsTPmn1DHkJU+MAlpGYa1EHQ/oOTIwf 8obmzcK41Tng17OElG6eLxfV4Xq37baOQ2bwvYeZttuDQ8E1YUc3Bnvt4tROGcrpitrS9JqqBUN g48M= X-Received: by 2002:a17:906:4a1a:b0:a3c:ff93:e12d with SMTP id w26-20020a1709064a1a00b00a3cff93e12dmr1965936eju.74.1708020229262; Thu, 15 Feb 2024 10:03:49 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id vi17-20020a170907d41100b00a3d782d885dsm782424ejc.121.2024.02.15.10.03.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:03:48 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Michael S . Tsirkin" , Richard Henderson , John Snow Subject: [PULL 53/56] hw/ide/ahci: Do not pass 'ports' argument to ahci_realize() Date: Thu, 15 Feb 2024 18:57:47 +0100 Message-ID: <20240215175752.82828-54-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=philmd@linaro.org; helo=mail-ed1-x52f.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=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 Explicitly set AHCIState::ports before calling ahci_realize(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Richard Henderson Message-Id: <20240213081201.78951-8-philmd@linaro.org> --- hw/ide/ahci_internal.h | 2 +- hw/ide/ahci.c | 9 +++++---- hw/ide/ich.c | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/ide/ahci_internal.h b/hw/ide/ahci_internal.h index 4dc2805d21..4e13329bb2 100644 --- a/hw/ide/ahci_internal.h +++ b/hw/ide/ahci_internal.h @@ -377,7 +377,7 @@ typedef struct SDBFIS { uint32_t payload; } QEMU_PACKED SDBFIS; -void ahci_realize(AHCIState *s, DeviceState *qdev, AddressSpace *as, int ports); +void ahci_realize(AHCIState *s, DeviceState *qdev, AddressSpace *as); void ahci_init(AHCIState *s, DeviceState *qdev); void ahci_uninit(AHCIState *s); diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 2c3306dae4..33f7e83687 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1614,14 +1614,14 @@ void ahci_init(AHCIState *s, DeviceState *qdev) "ahci-idp", 32); } -void ahci_realize(AHCIState *s, DeviceState *qdev, AddressSpace *as, int ports) +void ahci_realize(AHCIState *s, DeviceState *qdev, AddressSpace *as) { qemu_irq *irqs; int i; s->as = as; - s->ports = ports; - s->dev = g_new0(AHCIDevice, ports); + assert(s->ports > 0); + s->dev = g_new0(AHCIDevice, s->ports); ahci_reg_init(s); irqs = qemu_allocate_irqs(ahci_irq_set, s, s->ports); for (i = 0; i < s->ports; i++) { @@ -1862,7 +1862,8 @@ static void sysbus_ahci_realize(DeviceState *dev, Error **errp) { SysbusAHCIState *s = SYSBUS_AHCI(dev); - ahci_realize(&s->ahci, dev, &address_space_memory, s->num_ports); + s->ahci.ports = s->num_ports; + ahci_realize(&s->ahci, dev, &address_space_memory); } static Property sysbus_ahci_properties[] = { diff --git a/hw/ide/ich.c b/hw/ide/ich.c index d190012a95..122fc7e0ab 100644 --- a/hw/ide/ich.c +++ b/hw/ide/ich.c @@ -113,7 +113,8 @@ static void pci_ich9_ahci_realize(PCIDevice *dev, Error **errp) d = ICH9_AHCI(dev); int ret; - ahci_realize(&d->ahci, DEVICE(dev), pci_get_address_space(dev), 6); + d->ahci.ports = 6; + ahci_realize(&d->ahci, DEVICE(dev), pci_get_address_space(dev)); pci_config_set_prog_interface(dev->config, AHCI_PROGMODE_MAJOR_REV_1); From patchwork Thu Feb 15 17:57:48 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: 772982 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp967451wre; Thu, 15 Feb 2024 10:05:52 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUpoSGpgklkhOR197pqOyOTl40kuhdYhQWgZJf3MMbrFUkJiMUHNWVlxUaPm/x+sjLAnkxT60MLVIADSF8WQGAn X-Google-Smtp-Source: AGHT+IHl9Pp1L8NlAwGriQJGN/Ccwospzq7x838ZEZDzM8uiSbQqGL/Lp4gXHWUjsv29bJhSdwE7 X-Received: by 2002:a9d:774d:0:b0:6e2:e6ca:9b59 with SMTP id t13-20020a9d774d000000b006e2e6ca9b59mr2473150otl.18.1708020352277; Thu, 15 Feb 2024 10:05:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020352; cv=none; d=google.com; s=arc-20160816; b=r98YOLefRLctfP5TeYtoShNRhdlzzxIs9Dj++2MMaH9WQ9Uj9+uD7/5w0ieRjYbb7/ 8+7/T3mZbOXFWDyCHhWI2/rhtoO+yavMtNdHygd2oHsvkUVlO7+auRnnhLmJmKyt6bIh SmK9mOvnaGmGsXXxlzN84wPM/mC1AuXnkmUAqgBqMwrsSuEHZDGASOay3px0ejBeIHs1 i59SmGVrm4mTshfiCkvrZQKvbgLGnUMOCZO8Fbi0R7/lcjAFeE3cqJbtsmqKc56n9AVC 8KQ8d8Ugaz4PpniLqvHo0MlX7zgqdFfBo23pYUp9avvtQ5XRA6hja6bRP1KScM1JA1CP bjqQ== 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=4Trz8Izvuz2UeQ/LEyIdx4V0+3quGaJPJGfbh/3eXoI=; fh=RnY3BkcA5+JvuWZkU8e2LOihW+vbjuMZ8X6rJsvoWdI=; b=fdFuypl2PrlDnTGdPSCdptf5wDS3+IvBX40rb0A1QOk2D0eFcfdwupeLpdmGpjVfEz kYSJZVfTctSyKWmsriHzV5KXJ/lNscBW56/NPzm/FxoEgh/nsia1NRJfkgh9yfytkV28 OYgn5Qg3ud7kRlD877txMaInpfBbKczVLPoU6ku1+TjHPBAKzE/584PEota6G32ZnwuQ C7ikMEVEObnBL00Rj5vnKTbkPIn3BVxrUh7DkxePgvRpsH3g79CHjB5mpxg9dSl+CsMA R0mpGF2rSCrACyd1iqKlFUqFWxSfMEnNfPvf2RLJ5k31tsDp53vCx/6ZEFXc6+/TcLus DTEA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S7LzbEBV; 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 dh10-20020a056102578a00b0046d26adccc7si441835vsb.308.2024.02.15.10.05.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:05:52 -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=S7LzbEBV; 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 1rag68-0004Dq-AZ; Thu, 15 Feb 2024 13:04:39 -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 1rag5Y-0002tL-NB for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:04:02 -0500 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag5U-0003FA-Tr for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:04:00 -0500 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a2f79e79f0cso172947066b.2 for ; Thu, 15 Feb 2024 10:03:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020235; x=1708625035; 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=4Trz8Izvuz2UeQ/LEyIdx4V0+3quGaJPJGfbh/3eXoI=; b=S7LzbEBVn+eZK1SRonVtsvutPGUzc6Bjzh8TmKaMXRmqm8FCuCd0NQxwRm7uR9I3XZ tNib4W+TgJCmDu50eOUKnOvLgGClTek5OMEiWt5qLmYJ+FrIrI6pgdv2h/rcqHhoEMTk f6P6oTQPcQdn8vdVLFXE72/gioopTbBZg6t5olPhIzgpABpoL6H2m4w9Kf0juMNoOZyn O/hnrvNgmp0Z141x2tuMsINp0u4ePGI2iZGlJvPj1BeB241yLLzNSaoyvDsOeG60Bx5h ZnIRQDBJktlaqUQ8cb9wag3A1br9b3Grbduh90OSKvkHsRRagAPl8wRMz5mbJXQDgpG2 pbFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020235; x=1708625035; 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=4Trz8Izvuz2UeQ/LEyIdx4V0+3quGaJPJGfbh/3eXoI=; b=SVPD1Ol5pLoYsSfnJCRuNvZnnDWowwTlZQbkYqFBPpDoS7uukB9cSmHOvKWGSJB42r yIe8VQTcNuLwChA9CRp7eJtFWSLOyooj8THto0dd1MZoKR70xiohjm6yYfAL2FJpozdX F0l3/tRtkb0Nm2Ppm256fYIw+7+PxVzADckLVMFK2LGUrQ0BsBRyZuLk2J9qFEApw8vs hAz6UjSS+mjVQVwUXv9GPGi0hSSOOYH2eR+7IJ6u1i7dnogKZzxUBiwVWvwTNaSz2O+D nIOvdBRLM+N233lIUZzvHbk8SOyGLiIdblDPxUJqnwdhdn9bbl4/u3dJrkTD4rmKzi+O 5r5w== X-Gm-Message-State: AOJu0YwdiLdHClurZ0hHhw/adPqIq2GzwsiPOvFBFUaID30eKcvwq59M ShQFdIIHKqbb3loVi8ApTdAkFUkeLi7Ut58/Kjk44danFcC5tMxERHtJCqWPmUYeC5vBT1YvzgL aGNc= X-Received: by 2002:a17:906:338b:b0:a3d:125b:d221 with SMTP id v11-20020a170906338b00b00a3d125bd221mr1667572eja.26.1708020235273; Thu, 15 Feb 2024 10:03:55 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id sn24-20020a170906629800b00a38a705121csm779300ejc.47.2024.02.15.10.03.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:03:54 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Michael S . Tsirkin" , Richard Henderson , John Snow Subject: [PULL 54/56] hw/ide/ahci: Remove SysbusAHCIState::num_ports field Date: Thu, 15 Feb 2024 18:57:48 +0100 Message-ID: <20240215175752.82828-55-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=philmd@linaro.org; helo=mail-ej1-x62f.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=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 No need to duplicate AHCIState::ports, directly access it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Richard Henderson Message-Id: <20240213081201.78951-9-philmd@linaro.org> --- include/hw/ide/ahci.h | 1 - hw/ide/ahci.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/hw/ide/ahci.h b/include/hw/ide/ahci.h index 604d3a0994..c0b10c2bb4 100644 --- a/include/hw/ide/ahci.h +++ b/include/hw/ide/ahci.h @@ -63,7 +63,6 @@ struct SysbusAHCIState { /*< public >*/ AHCIState ahci; - uint32_t num_ports; }; #define TYPE_ALLWINNER_AHCI "allwinner-ahci" diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 33f7e83687..041cc87c11 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1862,12 +1862,11 @@ static void sysbus_ahci_realize(DeviceState *dev, Error **errp) { SysbusAHCIState *s = SYSBUS_AHCI(dev); - s->ahci.ports = s->num_ports; ahci_realize(&s->ahci, dev, &address_space_memory); } static Property sysbus_ahci_properties[] = { - DEFINE_PROP_UINT32("num-ports", SysbusAHCIState, num_ports, 1), + DEFINE_PROP_UINT32("num-ports", SysbusAHCIState, ahci.ports, 1), DEFINE_PROP_END_OF_LIST(), }; From patchwork Thu Feb 15 17:57:49 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: 772989 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp968161wre; Thu, 15 Feb 2024 10:07:05 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW+pER+rR5iC29fjwdI2sqjDdhG87ZP5uS7l/IOV4FqaQaLpBFYjXa5WCP5phOImZOXGcG8XGdu4mNeT4marW87 X-Google-Smtp-Source: AGHT+IFhDCvF15CabTpCUnAneSo/8QlTisD5jKBE7D/Ko5p2eMydgopTyh5J1ynldAtlTZd9p8W3 X-Received: by 2002:a05:6808:1a21:b0:3c1:3866:eca2 with SMTP id bk33-20020a0568081a2100b003c13866eca2mr2280880oib.2.1708020425600; Thu, 15 Feb 2024 10:07:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020425; cv=none; d=google.com; s=arc-20160816; b=YgaH4p1I1aoOUZogG1EMO4a6RhzXuRneFBfSoulg+UFwjQMPCucqw4lUKnruPX9+hV bkLwkIQeDGq14rpphZNwYO+PNQBXumBYyBeoKnf1VPXnXOXUBdCXNZyvy1HV5EbX5Hwv s7EQKrID2TcxoQvrb0cD7C43zFKrCVbgT+AoqNHolnOftj29w77tsSHqSYsGVftOk/sP XBehDqqMnA6mLtXsbanKv1GuTlsRp0SpOs+Qk5HW34qMCoQ6w8o7nzxiIwM4HBsq+EFf oUZR+RXQY8/VNdVArqydsEUN84SBBN+pEZ3Wk9yPGUKb8beuZx4EPisUP2SU3ce8LXni ssUQ== 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=pbWJfttw2i/6nkY9oTBvXTNqjF14WXnlPS1ndEBwSeA=; fh=iAePgAryTDFM4R/L66EWfKVrEAi12wNGzy8TR5mDbqE=; b=uEZ1pp7ShBk0kRmAHLyhKuqQswyvL6RCXsDJKY2kX8lpheisJftnMCiiNgPk3KjBV1 rmABMmGbbc9YljRgr/Pbt2aJG5AYiUgGf4UbTz7+LK2nvLfnJlVM8jdD04nodDhCNSwJ P9XiS7Dclb9mmsEIm0oZsTS3LbkEiSZBmL3vULqQVSBvikivWTfWD6WWzBLfFSpORdX+ REUhOstm4h2CiDUY+skI6j7Rxgc8ScEi1CTkkbpcNsWCf0OROkHZOEHWKPlWyDOGKlA1 hG5bCDjbKzdsqN4w/LKeb5eIIHRZHKUBgwU0G7r6A30JImbmbCVN2I8fn/j9I5+2Y8eQ ZQgw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EO4AJs4J; 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 h14-20020a056130010e00b007d680e7de61si410665uag.193.2024.02.15.10.07.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:07:05 -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=EO4AJs4J; 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 1rag6D-0004pL-OT; Thu, 15 Feb 2024 13:04:41 -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 1rag5s-0003k5-Sk for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:04:21 -0500 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag5c-0003Gj-75 for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:04:20 -0500 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-511898b6c9eso1445331e87.3 for ; Thu, 15 Feb 2024 10:04:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020242; x=1708625042; 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=pbWJfttw2i/6nkY9oTBvXTNqjF14WXnlPS1ndEBwSeA=; b=EO4AJs4JF5F4yqS/JhrgfEDmec71NJscSPIKghS9QnP6mQVHM8WtCHr47JqhexT7Kg 88qs9tBwmC3B7KijzRmhVct4LlCm3HmqZ9H/05QXM2QEC1x5CHCcVJw1zfMG4NKPo6Q6 7XmWLleScphA5EHN81ctwB6TXAsAS0XqJvAYnuREyC7ypPNiPzjMhErGzSu9mogarwxi qPB1kkE++MyAyTYx+H69FIy7T9VuYfdGK3aNA1cGoPtbhsi6pzrR82k5nXiOyp3YGXWb CmRN+a8LFrxBVL4+ITf5Gbsec+2dXyAIHQreEzDMMk8lJvQzVMJ+6U1XdhDxs1OgpAUA wivQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020242; x=1708625042; 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=pbWJfttw2i/6nkY9oTBvXTNqjF14WXnlPS1ndEBwSeA=; b=JL8WofBkTIDsStWWfCkaVchDZqMXivHUfxe2Oz84u6KgHBk4z1PMMHFdLfNNrCAs2A G/1VKSinZ7DmxSAM896AVS1o7qbL3pk1fkqiexmzKCizUo+4nrVhCTFvJesDtbtAvacs N4k+RRZ8udpj/hHyWnuaTZVcjgLQDJHCxoDbSMdtq+eF2r62L2gTLE4VSK/W5aqzEHf9 oE4yLgn9I1FjWk8qX2TKiH+kRkHmrvmG3AmdhSlEB76eb6qI93tLWeSGJLT1BAIsZ8VJ nFcbOSgyQbzqM2+YqOKRMvKKawBqx3RMTniP3bsKbWDkY6QdPZMBxkEArPImHjZHgCPa Pwcg== X-Gm-Message-State: AOJu0Ywxp0UKtB7+PQKnXRiP/KYsLrmg6lvKCZ2HdCgXVqUZpR8xAaZf 0V+NV7IloIYRW4AgZJCn1wMe+1lQh32b3hsblLAXOIkyIPLoLDuSdtbyRyJzvu9ODJ4ZcU3BHci Dv1Y= X-Received: by 2002:a19:3849:0:b0:511:7a31:d66d with SMTP id d9-20020a193849000000b005117a31d66dmr1604680lfj.57.1708020242033; Thu, 15 Feb 2024 10:04:02 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id s15-20020a17090699cf00b00a3bd8a34b1bsm793336ejn.164.2024.02.15.10.03.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:04:01 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Leif Lindholm , "Michael S . Tsirkin" , Rob Herring , Peter Maydell , Radoslaw Biernacki , Marcin Juszkiewicz , John Snow , Beniamino Galvani , Strahinja Jankovic , Alistair Francis , "Edgar E. Iglesias" Subject: [PULL 55/56] hw/ide/ahci: Move SysBus definitions to 'ahci-sysbus.h' Date: Thu, 15 Feb 2024 18:57:49 +0100 Message-ID: <20240215175752.82828-56-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::132; envelope-from=philmd@linaro.org; helo=mail-lf1-x132.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 Keep "hw/ide/ahci.h" AHCI-generic. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Leif Lindholm Reviewed-by: Michael S. Tsirkin Message-Id: <20240213081201.78951-10-philmd@linaro.org> --- include/hw/arm/allwinner-a10.h | 2 +- include/hw/arm/allwinner-r40.h | 2 +- include/hw/arm/xlnx-zynqmp.h | 2 +- include/hw/ide/ahci-sysbus.h | 35 ++++++++++++++++++++++++++++++++++ include/hw/ide/ahci.h | 29 +--------------------------- hw/arm/highbank.c | 2 +- hw/arm/sbsa-ref.c | 1 + hw/ide/ahci-allwinner.c | 3 +-- hw/ide/ahci.c | 1 + 9 files changed, 43 insertions(+), 34 deletions(-) create mode 100644 include/hw/ide/ahci-sysbus.h diff --git a/include/hw/arm/allwinner-a10.h b/include/hw/arm/allwinner-a10.h index 2eb83a17ea..67a9a17b86 100644 --- a/include/hw/arm/allwinner-a10.h +++ b/include/hw/arm/allwinner-a10.h @@ -5,7 +5,7 @@ #include "hw/intc/allwinner-a10-pic.h" #include "hw/net/allwinner_emac.h" #include "hw/sd/allwinner-sdhost.h" -#include "hw/ide/ahci.h" +#include "hw/ide/ahci-sysbus.h" #include "hw/usb/hcd-ohci.h" #include "hw/usb/hcd-ehci.h" #include "hw/rtc/allwinner-rtc.h" diff --git a/include/hw/arm/allwinner-r40.h b/include/hw/arm/allwinner-r40.h index 66c38e7d90..614e74b7ed 100644 --- a/include/hw/arm/allwinner-r40.h +++ b/include/hw/arm/allwinner-r40.h @@ -22,7 +22,7 @@ #include "qom/object.h" #include "hw/timer/allwinner-a10-pit.h" -#include "hw/ide/ahci.h" +#include "hw/ide/ahci-sysbus.h" #include "hw/intc/arm_gic.h" #include "hw/sd/allwinner-sdhost.h" #include "hw/misc/allwinner-r40-ccu.h" diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx-zynqmp.h index 96358d51eb..48f7948092 100644 --- a/include/hw/arm/xlnx-zynqmp.h +++ b/include/hw/arm/xlnx-zynqmp.h @@ -22,7 +22,7 @@ #include "hw/net/cadence_gem.h" #include "hw/char/cadence_uart.h" #include "hw/net/xlnx-zynqmp-can.h" -#include "hw/ide/ahci.h" +#include "hw/ide/ahci-sysbus.h" #include "hw/sd/sdhci.h" #include "hw/ssi/xilinx_spips.h" #include "hw/dma/xlnx_dpdma.h" diff --git a/include/hw/ide/ahci-sysbus.h b/include/hw/ide/ahci-sysbus.h new file mode 100644 index 0000000000..06eaac8cb6 --- /dev/null +++ b/include/hw/ide/ahci-sysbus.h @@ -0,0 +1,35 @@ +/* + * QEMU AHCI Emulation (MMIO-mapped devices) + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#ifndef HW_IDE_AHCI_SYSBUS_H +#define HW_IDE_AHCI_SYSBUS_H + +#include "qom/object.h" +#include "hw/sysbus.h" +#include "hw/ide/ahci.h" + +#define TYPE_SYSBUS_AHCI "sysbus-ahci" +OBJECT_DECLARE_SIMPLE_TYPE(SysbusAHCIState, SYSBUS_AHCI) + +struct SysbusAHCIState { + SysBusDevice parent_obj; + + AHCIState ahci; +}; + +#define TYPE_ALLWINNER_AHCI "allwinner-ahci" +OBJECT_DECLARE_SIMPLE_TYPE(AllwinnerAHCIState, ALLWINNER_AHCI) + +#define ALLWINNER_AHCI_MMIO_OFF 0x80 +#define ALLWINNER_AHCI_MMIO_SIZE 0x80 + +struct AllwinnerAHCIState { + SysbusAHCIState parent_obj; + + MemoryRegion mmio; + uint32_t regs[ALLWINNER_AHCI_MMIO_SIZE / 4]; +}; + +#endif diff --git a/include/hw/ide/ahci.h b/include/hw/ide/ahci.h index c0b10c2bb4..ba31e75ff9 100644 --- a/include/hw/ide/ahci.h +++ b/include/hw/ide/ahci.h @@ -24,8 +24,7 @@ #ifndef HW_IDE_AHCI_H #define HW_IDE_AHCI_H -#include "hw/sysbus.h" -#include "qom/object.h" +#include "exec/memory.h" typedef struct AHCIDevice AHCIDevice; @@ -54,30 +53,4 @@ typedef struct AHCIState { void ahci_ide_create_devs(AHCIState *ahci, DriveInfo **hd); -#define TYPE_SYSBUS_AHCI "sysbus-ahci" -OBJECT_DECLARE_SIMPLE_TYPE(SysbusAHCIState, SYSBUS_AHCI) - -struct SysbusAHCIState { - /*< private >*/ - SysBusDevice parent_obj; - /*< public >*/ - - AHCIState ahci; -}; - -#define TYPE_ALLWINNER_AHCI "allwinner-ahci" -OBJECT_DECLARE_SIMPLE_TYPE(AllwinnerAHCIState, ALLWINNER_AHCI) - -#define ALLWINNER_AHCI_MMIO_OFF 0x80 -#define ALLWINNER_AHCI_MMIO_SIZE 0x80 - -struct AllwinnerAHCIState { - /*< private >*/ - SysbusAHCIState parent_obj; - /*< public >*/ - - MemoryRegion mmio; - uint32_t regs[ALLWINNER_AHCI_MMIO_SIZE/4]; -}; - #endif /* HW_IDE_AHCI_H */ diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c index 9fdac1cc81..c71b1a8db3 100644 --- a/hw/arm/highbank.c +++ b/hw/arm/highbank.c @@ -30,7 +30,7 @@ #include "hw/boards.h" #include "qemu/error-report.h" #include "hw/char/pl011.h" -#include "hw/ide/ahci.h" +#include "hw/ide/ahci-sysbus.h" #include "hw/cpu/a9mpcore.h" #include "hw/cpu/a15mpcore.h" #include "qemu/log.h" diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index f2adf30337..5d3a574664 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa-ref.c @@ -38,6 +38,7 @@ #include "hw/boards.h" #include "hw/ide/internal.h" #include "hw/ide/ahci_internal.h" +#include "hw/ide/ahci-sysbus.h" #include "hw/intc/arm_gicv3_common.h" #include "hw/intc/arm_gicv3_its_common.h" #include "hw/loader.h" diff --git a/hw/ide/ahci-allwinner.c b/hw/ide/ahci-allwinner.c index b173121006..9620de8ce8 100644 --- a/hw/ide/ahci-allwinner.c +++ b/hw/ide/ahci-allwinner.c @@ -19,9 +19,8 @@ #include "qemu/error-report.h" #include "qemu/module.h" #include "sysemu/dma.h" -#include "hw/ide/internal.h" #include "migration/vmstate.h" -#include "ahci_internal.h" +#include "hw/ide/ahci-sysbus.h" #include "trace.h" diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 041cc87c11..54c9685495 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -37,6 +37,7 @@ #include "hw/ide/internal.h" #include "hw/ide/pci.h" #include "hw/ide/ahci-pci.h" +#include "hw/ide/ahci-sysbus.h" #include "ahci_internal.h" #include "trace.h" From patchwork Thu Feb 15 17:57:50 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: 772973 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp967002wre; Thu, 15 Feb 2024 10:05:14 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU1Iu6tnKdNr+6cYGT1wvmaFfS9U+UD+TPd95s8bjLO6LaP56RJhIZSnPMozit8piwLSUr7/9V2WDwBN7HU3E0I X-Google-Smtp-Source: AGHT+IG4Myc3ukOWCVI4fv3dQOXYhcBlzwSGEwd5/Iq1JWRKeI/iMQ1sYUxsKxWmwrHXbCiSatuA X-Received: by 2002:a1f:c346:0:b0:4c0:9ec7:b324 with SMTP id t67-20020a1fc346000000b004c09ec7b324mr2192206vkf.0.1708020313794; Thu, 15 Feb 2024 10:05:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020313; cv=none; d=google.com; s=arc-20160816; b=hos4g3u+4SgUjjfAJ904XITo4TynBKIYRAalE3dYtpPe8jGLCSY8++UsFFrRNdm1rW EZO3Iqf6O/e4sdACsW9U/UXZDD1+voN84gN4R4QyrfuFSWl8CDJpQB/WD7Dxe31KDODu i13HRyZpuycJyH1ewuy/MEj7rKzeMvwyMn3pLWWobb94fOaTdcLUbKQPuN/nsAm35w9P jpj/Lz0bBZkHIc1CjIGc42CJ3gDSJhutFZQ6JI31Ja0GMIVLBH8QtUhV8Zk2aftrChmf hfnvJIHlDprKfS0P1h2Fm/4Kj5PIgf6ZN/6dxKjE8SX5xiNTu2NpxpnaluSCKcB7gbYt UXVA== 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=LO7EQ9/NcsUn+L+LcRsaAULB8zo1/K9N0sf9+N40e+k=; fh=rAqSx9LNv277eMDkz7BnoWiv8X80FuWnwDQ88ZeCgmI=; b=IMVkCAZvW2xV2TI3kueI16nvGx+NvpsWC02FEYkBlq7/zut1t7weUpMlxjX8uEcw+f RVkk14k3SaJCZdUCAZTSMYF/0QH47RtTUJrlYcOdutD5K+nhdpdaq/VaRPPabYEDj4hj 7GBecT4/GPEGBuelCjw/3ezbESPBWQtcfwgLIG9O3TsmyzzTOK/S+JfiQChm8VXbfWri /jO4KyMWWQWIZgdCUNhUYzewXLjUZ3Oznv4gT/lLcIY4X3tSyoFl5unqJIOWffkeXAjT vDR8n2hpXUdAGsUKABua7ZjG+eBx1g8mt9t5BBVTo4ICcOXCYmUiv6PgVftsdh7hlVTR Iqsw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VNNCDr2A; 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 e41-20020a0561020fa900b0046d36e31416si449170vsv.728.2024.02.15.10.05.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:05:12 -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=VNNCDr2A; 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 1rag6B-0004Se-Ac; Thu, 15 Feb 2024 13:04:39 -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 1rag5l-0003e6-Jt for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:04:15 -0500 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag5i-0003Hn-Mp for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:04:13 -0500 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-55f0b2c79cdso1874048a12.3 for ; Thu, 15 Feb 2024 10:04:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020248; x=1708625048; 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=LO7EQ9/NcsUn+L+LcRsaAULB8zo1/K9N0sf9+N40e+k=; b=VNNCDr2AE6NqTlGkRxwFkj3qIAcerrb4fHwcFqkKXMANa/hHn/dktJiozLuDAKCMmc +AFkYCsaJj86V4yORy3UW/p/x0zrhQD/lGu0X/vfBr1oSKEm8VHE9NalYLUmr106Ga8l U2wsXynC+lUYXhTH/465tBNP10rY+kEAY0uil2xBmoTc2hAFLQ2ASygPFLRtJq71x8Tv uKTF9pZFpdMGKf3Cm60n5xZjVl+e7M4SVlewar9khidGPgYNBsH09yY9gAUj4wlKYsXN xCqduRyrf2nZ+iWFSdnPLYYJIS2EvETaHvkKQpUM7b660SiWmeZB2MiWaBoeZlKkDnsX fNmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020248; x=1708625048; 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=LO7EQ9/NcsUn+L+LcRsaAULB8zo1/K9N0sf9+N40e+k=; b=qxPysDDJWLHlzXD5M+a5D2LetxvPZzTI7heHCo0Sgu5WLdVF6yfvE1ylAwoRwffqKX KBDmejO7P4S1Kc+/fBzO29oeejm+tbQcwlBH4/5OW16nUMa0vBhg9u+KN0iCfqSo1QOl KWa2WPgHtxm/J0Ya3TyQ8FbnEOgomOdZD7tlmUegbvECdw3jtj1Qx5wM/YF24HNqvHCT pE9+dlZu1Q4V/+NHCN+eE83ezJztZA2Qxpdfu992EvdnaxhJfOWevhq8EPIcf7FOhr+8 a4elqN7y0EOjhwEy0ACfuqGlVnarIxYlMJiVK+1n4Y8BTEVHUZX20MS9zj0xWM81iOyU +ssw== X-Gm-Message-State: AOJu0YwNcHgYecm0EXBEyVcCcRcBm+BGyZyzkQdOOpYibUMUh/ycOpz1 nv21KsnVTZxSqZAyVyrTXuaaQdCBAI+Z8hZJNj5yK8Jlr08880qo/BI70yC94d5dWG2bxzGIRX1 +NU8= X-Received: by 2002:aa7:cf0d:0:b0:55c:d503:764c with SMTP id a13-20020aa7cf0d000000b0055cd503764cmr1899966edy.22.1708020248315; Thu, 15 Feb 2024 10:04:08 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id ec55-20020a0564020d7700b0055c85e6d75dsm772448edb.87.2024.02.15.10.04.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:04:07 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Richard Henderson , John Snow Subject: [PULL 56/56] hw/ide/ich9: Use AHCIPCIState typedef Date: Thu, 15 Feb 2024 18:57:50 +0100 Message-ID: <20240215175752.82828-57-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=philmd@linaro.org; helo=mail-ed1-x529.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=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 QEMU coding style recommend using structure typedefs: https://www.qemu.org/docs/master/devel/style.html#typedefs Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson Message-Id: <20240208181245.96617-2-philmd@linaro.org> --- hw/ide/ich.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ide/ich.c b/hw/ide/ich.c index 122fc7e0ab..3ea793d790 100644 --- a/hw/ide/ich.c +++ b/hw/ide/ich.c @@ -100,14 +100,14 @@ static void pci_ich9_reset(DeviceState *dev) static void pci_ich9_ahci_init(Object *obj) { - struct AHCIPCIState *d = ICH9_AHCI(obj); + AHCIPCIState *d = ICH9_AHCI(obj); ahci_init(&d->ahci, DEVICE(obj)); } static void pci_ich9_ahci_realize(PCIDevice *dev, Error **errp) { - struct AHCIPCIState *d; + AHCIPCIState *d; int sata_cap_offset; uint8_t *sata_cap; d = ICH9_AHCI(dev); @@ -156,7 +156,7 @@ static void pci_ich9_ahci_realize(PCIDevice *dev, Error **errp) static void pci_ich9_uninit(PCIDevice *dev) { - struct AHCIPCIState *d; + AHCIPCIState *d; d = ICH9_AHCI(dev); msi_uninit(dev);