From nobody Sat Nov 23 20:42:56 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641348; cv=none; d=zohomail.com; s=zohoarc; b=jvDEp1cUdNyVYv+NmacJagIYN0JwemRhE/B2y7gKB8qxc0x9T0W5MYqGnCksz47JYWFd2yxzzoq2OiWhtGt/8zs8w+f3vOwLsn9+LfxEzO1L1Se4qnOkzFaiEmUYCSvi7Gj9KikUDNBFuhuzeT28/225PELjI67kSw87PLj7EXc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641348; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+kcGj5THgATrhziRVv9fCQe0+3eD5yxcFJLfyqBCQbg=; b=DdfEWHHhgl+0yNzqULpOXPvDyh46kkvzePEhX455eQDAHoUe7IK/r4u8ikVfsmd+uz9k0OwhPUBlJ8LY4IWN3LdX72K0+PXLYP76ycdPvuM15BL0QZ5ivM8q+AIO8QtFZPj/s6IVA0ePLWYQ5etvl15xOmrVkHA/RY//3ihr6Yc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730641348793211.90461741855688; Sun, 3 Nov 2024 05:42:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7akm-00068j-4z; Sun, 03 Nov 2024 08:34: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 1t7akg-00065i-M6; Sun, 03 Nov 2024 08:34:46 -0500 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7akf-0001D4-4N; Sun, 03 Nov 2024 08:34:46 -0500 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a99f3a5a44cso469327466b.3; Sun, 03 Nov 2024 05:34:44 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.34.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:34:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640882; x=1731245682; 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=+kcGj5THgATrhziRVv9fCQe0+3eD5yxcFJLfyqBCQbg=; b=JxZdCnzecxv8Fs4J9oFXMam3pQtA0SnE1c/guwt4AWis6xL0XbKY1AW23qEKXIxIZI k+hDkamnJnW1scEVLagMydEChgG4660+1KODs+JT964dMf1Eu9gYMlAXjmyw9XVh5pHV r+l1f+U5t0a/vvLemeccHdnFJGtKGLC5zOjOJ7q0H+WlcmYZBxw3hnefLZT8xRm9qLzC /TWrRkLNhcrhRjxawNEg02oHCwXLtaWT7vda2SI5BVVyXhfsxfsYDMg4PebN22aGWI/j RxcHoxLs5NBJDD3xYpfMFX5qYdwt/n7gwSlx7fgJKvwQOM9Zt3ZwLm2VXcAEs55ywxK9 yMLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640882; x=1731245682; 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=+kcGj5THgATrhziRVv9fCQe0+3eD5yxcFJLfyqBCQbg=; b=TmZNd658al69wFwmlAZ6/oSi9ASb2BkcU5NafJUkuezttoqamgMy1Dvzk7I3pdeg0c prn2VNTK3g7s/alVHv6kVSwc/TDox1Od+2dFwJggA9WpiGGFzWctreN9iiV1Hopso0/3 vceRtjYnZtT+TbggpXwP+zFmWrFkIWE4C6CONh9JIite12reyqrtl9Eh+BUOzBuer6TE hNJ8eThL8xg5zqLvANan/vzyQphcHt8lAHJnK8qwB3t94NUbpfA/wsIUC/YdgQgkh7u7 +qBpSGh27bn+zt0bhRNMGSBD6L5I8NU4Gifb0/rcEBt8o49vPLzYL02GFSWcRBPd/u3V U4wg== X-Forwarded-Encrypted: i=1; AJvYcCV0AoB7TVNMqCsDOnDNSp7RtCO7uLwGoSlS18K5mi1T+MNx7x1KS/IoEzmlNyZao7VCcPTcq/7blSc=@nongnu.org, AJvYcCVmRy/XnAMXQnqwuQYYE1nwBAR8VqoFelVfkFxYaHpxbqCIb2ql7ehxqeXcajGGdwFY4nweoVSquGAD@nongnu.org X-Gm-Message-State: AOJu0YyKGO6CF1rwhfPmvYCthvl7z/6dvdj9o0cV1TC0kpekHl7oOMNP nvhtd3diYHgoZe/O438s2DsogdMecK3QJU2epLWgdPNWL6sltE4tLt+a6Q== X-Google-Smtp-Source: AGHT+IEY30HUHnATzk+Jh1Vg1LG0xMCN2LDUFv/lGfk4bEtvJKrgA7Rnz3ef/frMty/+0RpDj1AA2Q== X-Received: by 2002:a17:907:e88:b0:a99:7676:ceb7 with SMTP id a640c23a62f3a-a9de5f49bf7mr2870520966b.26.1730640882416; Sun, 03 Nov 2024 05:34:42 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza Subject: [PATCH v4 01/26] hw/ppc/e500: Do not leak struct boot_info Date: Sun, 3 Nov 2024 14:33:47 +0100 Message-ID: <20241103133412.73536-2-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=shentey@gmail.com; helo=mail-ej1-x62a.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641350675116600 Content-Type: text/plain; charset="utf-8" The struct is allocated once with g_new0() but never free()'d. Fix the leak= age by adding an attribute to struct PPCE500MachineState which avoids the allocation. While at it remove the obsolete /*< private >*/ markers. Signed-off-by: Bernhard Beschow --- hw/ppc/e500.h | 9 +++++++-- hw/ppc/e500.c | 17 ++++------------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/hw/ppc/e500.h b/hw/ppc/e500.h index 8c09ef92e4..4a1b42d44b 100644 --- a/hw/ppc/e500.h +++ b/hw/ppc/e500.h @@ -5,18 +5,23 @@ #include "hw/platform-bus.h" #include "qom/object.h" =20 +struct boot_info { + uint32_t dt_base; + uint32_t dt_size; + uint32_t entry; +}; + struct PPCE500MachineState { - /*< private >*/ MachineState parent_obj; =20 /* points to instance of TYPE_PLATFORM_BUS_DEVICE if * board supports dynamic sysbus devices */ PlatformBusDevice *pbus_dev; + struct boot_info boot_info; }; =20 struct PPCE500MachineClass { - /*< private >*/ MachineClass parent_class; =20 /* required -- must at least add toplevel board compatible */ diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index b760c6d6a2..ba83f33033 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -80,13 +80,6 @@ =20 #define PLATFORM_CLK_FREQ_HZ (400 * 1000 * 1000) =20 -struct boot_info -{ - uint32_t dt_base; - uint32_t dt_size; - uint32_t entry; -}; - static uint32_t *pci_map_create(void *fdt, uint32_t mpic, int first_slot, int nr_slots, int *len) { @@ -919,7 +912,6 @@ void ppce500_init(MachineState *machine) bool kernel_as_payload; hwaddr bios_entry =3D 0; target_long payload_size; - struct boot_info *boot_info =3D NULL; int dt_size; int i; unsigned int smp_cpus =3D machine->smp.cpus; @@ -974,9 +966,8 @@ void ppce500_init(MachineState *machine) /* Register reset handler */ if (!i) { /* Primary CPU */ - boot_info =3D g_new0(struct boot_info, 1); qemu_register_reset(ppce500_cpu_reset, cpu); - env->load_info =3D boot_info; + env->load_info =3D &pms->boot_info; } else { /* Secondary CPUs */ qemu_register_reset(ppce500_cpu_reset_sec, cpu); @@ -1274,9 +1265,9 @@ void ppce500_init(MachineState *machine) } assert(dt_size < DTB_MAX_SIZE); =20 - boot_info->entry =3D bios_entry; - boot_info->dt_base =3D dt_base; - boot_info->dt_size =3D dt_size; + pms->boot_info.entry =3D bios_entry; + pms->boot_info.dt_base =3D dt_base; + pms->boot_info.dt_size =3D dt_size; } =20 static void e500_ccsr_initfn(Object *obj) --=20 2.47.0 From nobody Sat Nov 23 20:42:56 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730640951; cv=none; d=zohomail.com; s=zohoarc; b=AagdX6JffpqqNrlhsQEjmv0QRwrYFB/a1J4BUa5coGUPd7272EK237vze1pbyn2JouI9Muc8Vttd9X9F2LJL43pP8KUBJuaLGvVlT4/0s2C+7BNsQCN4PtlKcuVVzr6MzeLl3HVGslivsoF9rt6vkbfPA330CdEVtKNR/Op8JeM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730640951; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=OSUXdq93xqCIzRVUO2sgZ5ZRdMkGuWMIHhF5tQTYyjM=; b=kY/vmNxKHI4fozYKBEYP9aar5lH06+ZcnmsKhaSpvsSe8TPpCEJoECUh4wrmZ55bWmSKi8qbrKYNz/U0K8IO2aO7zq/a4ql+vIuSWjGLvQMaeKHzk36aKyRNRH7gNd7XzDVq3vFlriR1SJkde6bouKt93dBRMYqPNPQbs9X0To8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730640951519544.0692164994765; Sun, 3 Nov 2024 05:35:51 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7aku-0006D1-UQ; Sun, 03 Nov 2024 08:35: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 1t7aki-000678-Nc; Sun, 03 Nov 2024 08:34:50 -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 1t7akg-0001DE-JG; Sun, 03 Nov 2024 08:34:47 -0500 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5ceb03aadb1so3463643a12.0; Sun, 03 Nov 2024 05:34:45 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.34.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:34:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640884; x=1731245684; 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=OSUXdq93xqCIzRVUO2sgZ5ZRdMkGuWMIHhF5tQTYyjM=; b=QQfeeZbaXBZBXD52GqBcCsyDcpX69eJBddMpbZh8ShWe4I+e7/D91lPKoImRcs/TXH tTvi4pYvhOZppokSOqbOgFXo5yySckkdGjyTBNrXS0U2PbSwMdU+slR4NB9RKxYHimuw 2V4E9u46V0ueCLFjB5UVtUBhgbk8xiVJckQRk+Ay7pN1e35PxAe0/F0e7TA9wX9w4A51 JgIMLtg+h7I6DuvguJspyIExjKLYhjEPxs4XBnV9pp/dcNZrEXX2+Bb9Y1hViZWkfbiH rTozv/Z+W6qMngYZa0cVzr4mzScKeFcAtOUcMzDP2Wm4DwL310UF9y6dbqN4m0HLBEcv qPWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640884; x=1731245684; 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=OSUXdq93xqCIzRVUO2sgZ5ZRdMkGuWMIHhF5tQTYyjM=; b=WXRQJSz6k5aiQ59OFy9EO2YKPqu0HsUDOBclWytGrLY6TXQVaP6rlZfmO04la6o3uk UD2djZoWKTFTv3zLtlAJ1C8MfduWvidlbLCW/inPwiSb8D1NxdX39i0/3zacUGjb5XlU gV545EtJh3PtM+xyrXZJQtonlbhdbJpWl+Mv6CkISDTQmJGUa2589L7Mz085a52Xvnk/ 1X+ixrSkty8a5ns7aOf0TyfNVaeTT2T+ALdJGqmVsQX9UITeNAG6njUQX5mVVTJZAn22 /AN5ODZtDpXCX9NsGEAmlICWV8geJKT2EZX3//ovpbN6F86RP/cXcD/27083HGBALMXj s+fg== X-Forwarded-Encrypted: i=1; AJvYcCWRaIrWdasinJePcYvH56hadVcS0M02HdpRXBcOyCCmQcyvUT8VN1JICeBBy49EbPGLgQjmi/yWp8w5@nongnu.org, AJvYcCXzaXdXe4XGzhvmeHfa5SCtKd4ocFQsnIbNkTpRqrMsx+9M/U7I0ltCP0zJ9ngz2fFYolabz3xGu2Y=@nongnu.org X-Gm-Message-State: AOJu0YygDor/tfWacS7Wg/ptx6+yrl6/ZTab9JOEZMhZBumdcTIqao0i 8rJJ/ylikoVR4mBjrT/ioqFmesugOjZZNj5/3uWFVa9p3Al+33bjiBhj6A== X-Google-Smtp-Source: AGHT+IFFoIXH+FAuPZ0vMVjN6afjo2lrtHwnrDcUbLgHXdwoGxTX3b9Sdqk6MQMli648IJ17O7cSTQ== X-Received: by 2002:a17:907:e87:b0:a99:ea2c:59d1 with SMTP id a640c23a62f3a-a9e5092959amr1331511766b.26.1730640883543; Sun, 03 Nov 2024 05:34:43 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza Subject: [PATCH v4 02/26] hw/ppc/e500: Remove firstenv variable Date: Sun, 3 Nov 2024 14:33:48 +0100 Message-ID: <20241103133412.73536-3-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=shentey@gmail.com; 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730640953077116600 Content-Type: text/plain; charset="utf-8" The firstenv variable is never read, so remove it. The env variable is then= only used inside the loop, so move it there to restrict its scope. Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index ba83f33033..0683629ac0 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -899,7 +899,6 @@ void ppce500_init(MachineState *machine) const PPCE500MachineClass *pmc =3D PPCE500_MACHINE_GET_CLASS(machine); MachineClass *mc =3D MACHINE_CLASS(pmc); PCIBus *pci_bus; - CPUPPCState *env =3D NULL; uint64_t loadaddr; hwaddr kernel_base =3D -1LL; int kernel_size =3D 0; @@ -921,7 +920,6 @@ void ppce500_init(MachineState *machine) IrqLines *irqs; DeviceState *dev, *mpicdev; DriveInfo *dinfo; - CPUPPCState *firstenv =3D NULL; MemoryRegion *ccsr_addr_space; SysBusDevice *s; PPCE500CCSRState *ccsr; @@ -930,6 +928,7 @@ void ppce500_init(MachineState *machine) irqs =3D g_new0(IrqLines, smp_cpus); for (i =3D 0; i < smp_cpus; i++) { PowerPCCPU *cpu; + CPUPPCState *env; CPUState *cs; =20 cpu =3D POWERPC_CPU(object_new(machine->cpu_type)); @@ -950,10 +949,6 @@ void ppce500_init(MachineState *machine) &error_abort); qdev_realize_and_unref(DEVICE(cs), NULL, &error_fatal); =20 - if (!firstenv) { - firstenv =3D env; - } - irqs[i].irq[OPENPIC_OUTPUT_INT] =3D qdev_get_gpio_in(DEVICE(cpu), PPCE500_INPUT_INT); irqs[i].irq[OPENPIC_OUTPUT_CINT] =3D @@ -974,8 +969,6 @@ void ppce500_init(MachineState *machine) } } =20 - env =3D firstenv; - if (!QEMU_IS_ALIGNED(machine->ram_size, RAM_SIZES_ALIGN)) { error_report("RAM size must be multiple of %" PRIu64, RAM_SIZES_AL= IGN); exit(EXIT_FAILURE); --=20 2.47.0 From nobody Sat Nov 23 20:42:56 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730640946; cv=none; d=zohomail.com; s=zohoarc; b=WIQDEdP8tso/wU5D5XavdI6bdtvhJoSTwKp8KIzUTuW0L/gJd1atXoOSqUoG8So+VhTRM+wyGoRzYB3LCzK9D19T8fOiU+8m5mTAz0++ZumhJHnDvtEEhKW9PEWTutMIJlBlbcDnC0mDLlBUex+y80r1AiocFDTExibYAyW26RE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730640946; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=tfVJw2OTp+OS1+DvQbkRZgABrzKigE/SljuSUg2aBz4=; b=bi+qvGbL4dgqPvu4HZgPtmVr14Vw/1D44UjH4A7j9jnq3I0PTw7lhaK2QOY4nM5X09tSPjXc1b48NK7cMEngbBCYFeNK1vqSob89Sf3cqAxOLzeTFZpa9vaQEOmBCwFLeZ+ABv9A01LoCq4oLPRC9ouCUrYXXhmAK0ULfJkLaTg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730640946098845.2940145967251; Sun, 3 Nov 2024 05:35:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7ako-0006Af-QP; Sun, 03 Nov 2024 08:34: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 1t7akj-00067c-QG; Sun, 03 Nov 2024 08:34:50 -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 1t7akh-0001DI-7B; Sun, 03 Nov 2024 08:34:49 -0500 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a99ebb390a5so807653966b.1; Sun, 03 Nov 2024 05:34:46 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.34.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:34:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640885; x=1731245685; 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=tfVJw2OTp+OS1+DvQbkRZgABrzKigE/SljuSUg2aBz4=; b=JNdxFE6FS1oI7/GgVhiZg8wg9cJ9pfMt6eTc8uSAMUeh87sNpIg1FsMSrzCF1MYwyi AiBqmLfiaG8lcdG0lLDmEiUsGZ64bDj0EYSgDo/TUVvNTYfjJ8a+ThW5hr+C45QNKNE+ rb/MSBYyYYPWe8rcOkjrrdBbNH0fWMjT3ngmbYyUYO3Lw8RW/akbjbxHOVqVfuvhEGxP ORBXUhsVXKsAuMuqaosVfpTL0TjSkGfSPnePYhfBAEE2eTkcX5skW9yozailxJC0tIVv cmudQl4krq1ceF9A92TPppjy9VcR8F1Lt46kaprHr25lVpXuMlP+QGBbDXdLfzBT4b8S +VCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640885; x=1731245685; 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=tfVJw2OTp+OS1+DvQbkRZgABrzKigE/SljuSUg2aBz4=; b=m4FGCAUIQU9YIAIXtmLoc2K3nC0h062TBTF/kHN1AW5ml7mkpAKdpttXaXUtaWb504 /8DKePhBNFrBOS5ZMKlduwnwdmM0ywca7hXD6Sb3zMbQtHdk58036vskA1G6axpkXaQY pEZf8SZ+taJcVkC8t2igK9WlYtepzUE+tnV01ZQ57ykq9U4wqNX7bUeMQpMB0LLILrds cFiMK7qg3iPvYrWjmSgIOuCBZ67WxV7VTvcZ/RUOslFUiFR2ltMxM9twLr0ZBVnbDMv/ S3hfPRrvHEtaXaZ4SP1CTXC0PiT8kiLixnm3AFLKcRcQbOhITyvlOEBqn9UoaGc3tE7a u98Q== X-Forwarded-Encrypted: i=1; AJvYcCUy0uG/2sISGAPnoZmYrE9vSbWcFidR6/pxZ7kjICdwLIcGxgNilZyvCv2m2m7YTuKX0kYR7S+9x2VP@nongnu.org, AJvYcCV/xhHX2Tj4CXh7gIj6vAw+ZjLrdGMRWPOu7q+qJs2ZC5SYfUgIFJBX1sGKZVz4/kBpOrcBP34Pufk=@nongnu.org X-Gm-Message-State: AOJu0Yx4EvA+Nbq3+AoBUFueQo+EdJNTuo1PB2DZ0PmEbtW5HgLIn6QO YjZ2KmX9PAck53YNhCvxC0m4JEMokt1pGE1mZSggho/5b9S3AHsuHnaLHg== X-Google-Smtp-Source: AGHT+IFvTXV0EwHb4m6teKcmqQtNjmvUTA5vih6cGGIDbVNCE6KjCTB5izxfXaLpqP8Q9feG66VAGw== X-Received: by 2002:a17:907:3f87:b0:a9a:cea7:1294 with SMTP id a640c23a62f3a-a9e65436316mr813080866b.21.1730640884521; Sun, 03 Nov 2024 05:34:44 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza , BALATON Zoltan Subject: [PATCH v4 03/26] hw/ppc/e500: Prefer QOM cast Date: Sun, 3 Nov 2024 14:33:49 +0100 Message-ID: <20241103133412.73536-4-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=shentey@gmail.com; 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730640947328116600 Content-Type: text/plain; charset="utf-8" Reviewed-by: BALATON Zoltan Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 0683629ac0..964a22c5b7 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -1008,7 +1008,7 @@ void ppce500_init(MachineState *machine) sysbus_connect_irq(s, 0, qdev_get_gpio_in(mpicdev, MPC8544_I2C_IRQ)); memory_region_add_subregion(ccsr_addr_space, MPC8544_I2C_REGS_OFFSET, sysbus_mmio_get_region(s, 0)); - i2c =3D (I2CBus *)qdev_get_child_bus(dev, "i2c"); + i2c =3D I2C_BUS(qdev_get_child_bus(dev, "i2c")); i2c_slave_create_simple(i2c, "ds1338", RTC_REGS_OFFSET); =20 /* eSDHC */ @@ -1057,7 +1057,7 @@ void ppce500_init(MachineState *machine) memory_region_add_subregion(ccsr_addr_space, MPC8544_PCI_REGS_OFFSET, sysbus_mmio_get_region(s, 0)); =20 - pci_bus =3D (PCIBus *)qdev_get_child_bus(dev, "pci.0"); + pci_bus =3D PCI_BUS(qdev_get_child_bus(dev, "pci.0")); if (!pci_bus) printf("couldn't create PCI controller!\n"); =20 --=20 2.47.0 From nobody Sat Nov 23 20:42:56 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641092; cv=none; d=zohomail.com; s=zohoarc; b=nUjke1sn3Pev1FdS8PxAWoaRHgMBOyWVeq7hrf1XS/Mmtrcs5oMAKDTwS9LePnoiElMqpZhB8IGScXMQGt2pepqZQxSDAeno6c+907lJbhLFo4UBQrwZ92rVNU6GjsGSnZdlxv1h4DeU1YXgEpIq+sFDidVPEALwWy+a0fHfG1Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641092; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=n35w2VDiQsxwqNroL2qJeQnt4HfjJdNE+pLX1JQDjcs=; b=PN7VubfC3JZpX2XZ3nhaWT0K+fvNSNdoFe7oq5+71dlbvlwOkMYR1RmJCfeP+DOJM093UKwbDkaPptlLSfH2qOfQYbkmZ1dtV4awmTotxU2Ba33IuqXhT/55tp0A/YW0TyLczbxLjwrt11QsUn1OVe8Ozq/TYV8ukvb7w9JzTqs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730641092560638.5141567490039; Sun, 3 Nov 2024 05:38:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7akw-0006FF-4I; Sun, 03 Nov 2024 08:35:02 -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 1t7akk-000683-H7; Sun, 03 Nov 2024 08:34:52 -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 1t7akj-0001Dz-3j; Sun, 03 Nov 2024 08:34:50 -0500 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a9acafdb745so567669866b.0; Sun, 03 Nov 2024 05:34:47 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.34.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:34:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640886; x=1731245686; 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=n35w2VDiQsxwqNroL2qJeQnt4HfjJdNE+pLX1JQDjcs=; b=bXj9bESHfZlMcsANApGRivF1T0DldMkyQ1AZ2cTpsky7bNE1nSMHMaBbVum27oer4f yEunFHGBXAgKzBLQifRQWf19ZpBoUXaRpZF751CgqECtdvPS3U26GZDEKErgYUxktZcY YlJh/vuBTIR1/IJzsGIUI57eeqhESEdn5EcCzdEHlBeiSpRNSZX8WWJExlG88JwLFN5s rDB8vQ/N+AWUD7iHdSkDPO8rbm874hjDzeixTcvaalUU7YIxlo9BkFcDRV5hjmB9O7XG Kgsr766yun6jODb536ExwgQFUaeShKzBbbv9bjU+UzKpJbMo/7LYZViPNewNLhPlwzhR H6sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640886; x=1731245686; 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=n35w2VDiQsxwqNroL2qJeQnt4HfjJdNE+pLX1JQDjcs=; b=fejhgkgTAhDWyXxgcitgZ4HYMEeI68f7/3va6j7TvtTKes2NvuNrvqXDw/RF6D3Pbp aRssPJFXF3PEMb2YUicluBsZKzg1GwmEPmhfPn88feVni+/XgPPelnQPiPpxcLA+IMKs BZFrD6jAhqTXm5hgEZZJ3CPzXdK3TjbPnqoJuS2BX+giAHAh8pvjIdJ2M2Hqxvy8o2Zz 4HUkav7uMfZsD2l8FhuOGelDwDRY8xd2WesOJZP7V/qwtvEaullNXaRnE+mtTPhISD2f KkohgWee7VeDV8kYdbCWHu6QbvwxFv/y8/d01uq/MZE5ZJRlHEwl16nPpo0bP93EwIyM vjOQ== X-Forwarded-Encrypted: i=1; AJvYcCWOo5Ai4lJh0GLH16k+fCEyi5zysXzOb+O4Tok9suMSgZ3h9JAHeg2Vb1wGQGnzb3fikeStOP3LvJ3Z@nongnu.org, AJvYcCXZ47FhZqGA+MrpvocaG9Q8IlZk66ztxuR9tNaPREcbtWl3vd/SRaAR3rKKM2fZl/w1dLBp+m6k4jY=@nongnu.org X-Gm-Message-State: AOJu0YxJejqYaoSLMqk++9FJAcZYTOP4ra2ET2aSDqLe/r3eH+DUbw6c M0/9vS2uxSuWmO9RW/cMjmFApBzA3jfhQmRSU+pzOdE41FLvMVXR+vdlaw== X-Google-Smtp-Source: AGHT+IFE4YH+nm3DMUKu3TZJUMhXar2OUlimOXOmtOAn6GEIK6tHsaB4eF/qR9pxUTbit9f3eneNaQ== X-Received: by 2002:a17:907:7e96:b0:a9a:6c41:50c0 with SMTP id a640c23a62f3a-a9e55ade680mr1042711166b.26.1730640885841; Sun, 03 Nov 2024 05:34:45 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza , BALATON Zoltan Subject: [PATCH v4 04/26] hw/ppc/e500: Remove unused "irqs" parameter Date: Sun, 3 Nov 2024 14:33:50 +0100 Message-ID: <20241103133412.73536-5-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=shentey@gmail.com; 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641093886116600 Content-Type: text/plain; charset="utf-8" Reviewed-by: BALATON Zoltan Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 964a22c5b7..ecaaab1558 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -825,7 +825,7 @@ static DeviceState *ppce500_init_mpic_qemu(PPCE500Machi= neState *pms, } =20 static DeviceState *ppce500_init_mpic_kvm(const PPCE500MachineClass *pmc, - IrqLines *irqs, Error **errp) + Error **errp) { #ifdef CONFIG_KVM DeviceState *dev; @@ -865,7 +865,7 @@ static DeviceState *ppce500_init_mpic(PPCE500MachineSta= te *pms, Error *err =3D NULL; =20 if (kvm_kernel_irqchip_allowed()) { - dev =3D ppce500_init_mpic_kvm(pmc, irqs, &err); + dev =3D ppce500_init_mpic_kvm(pmc, &err); } if (kvm_kernel_irqchip_required() && !dev) { error_reportf_err(err, --=20 2.47.0 From nobody Sat Nov 23 20:42:56 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641375; cv=none; d=zohomail.com; s=zohoarc; b=CVCDekwlLaIHAIlAJTsJKd4HxZevDaR+GCkGyoU002m8bRfEOaSZFzhoYzPCd122WzPcJOzX127jtNdzLKuUo9uC7PfGq4Y+DBIWhUVZwW5bidEw1Car01eGnsm8e0tC6q4SI7b2ftVJfjm8aEkb8T0TuFUsoFdRzlCUDooIIps= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641375; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ODth02XHk2l2sGfVJHhWS3UJ9E3eRYVl7bEr+6Us9LU=; b=JZZG5g1SQLiPuFAvFFbdec9KG2pUW5DAVqhqQpbwQFY2/Dx0F/Z6yeQQT5vSDijWz7dkjuSrqrFuXt0UX28x+UnF05QEEVdtxARv3Tet7Waj5ZL5pcou49Hqg4Zo1rYWFyXJN43I+tHTIbRAKqxC+i/zd947PSzW+r6J8fY0Yy4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730641375240771.1146587062336; Sun, 3 Nov 2024 05:42:55 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7akv-0006Du-9V; Sun, 03 Nov 2024 08:35:01 -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 1t7akl-00068k-O5; Sun, 03 Nov 2024 08:34:52 -0500 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7akj-0001EC-GA; Sun, 03 Nov 2024 08:34:50 -0500 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a9abe139088so506790566b.1; Sun, 03 Nov 2024 05:34:48 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.34.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:34:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640887; x=1731245687; 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=ODth02XHk2l2sGfVJHhWS3UJ9E3eRYVl7bEr+6Us9LU=; b=TvKintYFNm2Kw2WXPnmSwuY8M00hiv1hQKrZYzVcyWhBPH99hzD4lXhrNUsBWCiEbL MCXl2ym5QT5RKNArlUeiVJ1OY0HmGtJd5vk7x5eOP8VH8Tsr1SmNTrKOXIMyB4Jtq+pn FVpgneSBZilCIrwXNRF/rYyhaOADuBI8AiQ2f/THR6xgkl+Sz9D+x18UH9SnPAJZgY9k U++8zGFOJcEPj4CvqrgSSaMNhIUd0Zzhh0o41IqzltqeWhRR2XDTCMuDPiNtEJ/61a0u nu1wUYo2Ek9u1ZUjmV+qZJI0SgXvU9dD2v2dlnQwbwnXS1KlgnIOcOiaKBDzIkNuPfCT ADBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640887; x=1731245687; 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=ODth02XHk2l2sGfVJHhWS3UJ9E3eRYVl7bEr+6Us9LU=; b=JF+DoFNbz352p7B1QgqJm2AZ7Vw3axDFq+GNKWWudPQO7gbcX1t4KW4Be+uEZmlITg R6/7XYuRjINfeaR9lvPDJAUhc5XUbhmKzQlP19S7Uim6lgVsPk561AofgcZGOCtg5s3M 9rMs8clrPqb2ViQRMVaRSvnhc3LY+J99FfKYLD2fItvYlcWX8vleqPhGcdov8Ne2vKbR /6aGNQuRx3UYHyCZCA238ARsjJj06nRG0qilELSCH3m58AK/LyTpAw5vfmz0nxR2DHrh PTAGqX/JIBmNfzEQkH4Se2nAzQXrjK8tXgnO1a+Twn8HzOcA51PswCUN4tRm29dOg0pg J9Pg== X-Forwarded-Encrypted: i=1; AJvYcCVYsT2mJMzchkhjddyjNxCpw0IBQsg4ft2J6sXBWy8AkvqJc0oZUTcDWv6adAwErq1KsasLNQD84Ig=@nongnu.org, AJvYcCVxxYt6/j2x236c5A7tPX2Cy59/pD9MrsG4YRBsiI/g6DwObt898Dy34ZbtGfHB3qk0UcnXcSLJuiPH@nongnu.org X-Gm-Message-State: AOJu0YxW9Y8+vxMHQxKNs9TWvCh59BH5tlRPtdUOBVJ0F+SN7i5ZtXaG 00mpLfLenXOMSEcIsnGr0Y6k5BW5bcFMFlLWAu2xyFt81phJWql28fmrug== X-Google-Smtp-Source: AGHT+IFF8/L/iRE8yf5AQZFoUl5px1enwfXfTk1acUptV6vJQG5DQ7oGj0T1IZutGdcS/wQaRdWHJQ== X-Received: by 2002:a17:906:da89:b0:a99:43b2:417e with SMTP id a640c23a62f3a-a9de61a2e85mr2720945766b.62.1730640887051; Sun, 03 Nov 2024 05:34:47 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza Subject: [PATCH v4 05/26] hw/ppc/e500: Add missing device tree properties to i2c controller node Date: Sun, 3 Nov 2024 14:33:51 +0100 Message-ID: <20241103133412.73536-6-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=shentey@gmail.com; helo=mail-ej1-x62a.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641376703116600 When compiling a decompiled device tree blob created with dumpdtb, dtc comp= lains with: /soc@e0000000/i2c@3000: incorrect #address-cells for I2C bus /soc@e0000000/i2c@3000: incorrect #size-cells for I2C bus Fix this by adding the missing device tree properties. Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index ecaaab1558..a0c856568b 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -196,6 +196,8 @@ static void dt_i2c_create(void *fdt, const char *soc, c= onst char *mpic, qemu_fdt_setprop_cells(fdt, i2c, "cell-index", 0); qemu_fdt_setprop_cells(fdt, i2c, "interrupts", irq0, 0x2); qemu_fdt_setprop_phandle(fdt, i2c, "interrupt-parent", mpic); + qemu_fdt_setprop_cell(fdt, i2c, "#size-cells", 0); + qemu_fdt_setprop_cell(fdt, i2c, "#address-cells", 1); qemu_fdt_setprop_string(fdt, "/aliases", alias, i2c); =20 g_free(i2c); --=20 2.47.0 From nobody Sat Nov 23 20:42:56 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641337; cv=none; d=zohomail.com; s=zohoarc; b=ZIl800FvmucibWukY6xvV0lx7Mj5G8PPkn1rFxljMeoOLpLDik+U5pEm7dV2SIET3MoR6eVGRnY1ijHGMb5Nk/rKdBJCJ6mMv4UAS11Qz0ZmYEZVWF+qo2fO3eijj+kLL2nQbWdhTGfazr/0zhDxG3WGWMTdZ6m7BUhWlYymMg8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641337; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=scKsKjVwCuGqApOSyGEnsOwcmcTTDBAW30tcpamKwQc=; b=gBXQa+m+uXOhKlNPCdhOwfe6Qs+woyalBe+45z++XZULvaNBzNiEAsBBgE/QvQ22iy/5exp5e85vEkGAuLp8v1nvuu0fZYqcVAPtpBlaismM8CKvDZ5jLxiRbzIPXj5a32uQmP+qHHEH7QODCZPvGV+dIJTC4BqRD7hrcavgvB4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 173064133753863.6955858315016; Sun, 3 Nov 2024 05:42:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7al0-0006Nd-R8; Sun, 03 Nov 2024 08:35: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 1t7akn-00069s-Kl; Sun, 03 Nov 2024 08:34:54 -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 1t7akm-0001Eg-4C; Sun, 03 Nov 2024 08:34:53 -0500 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a99cc265e0aso541952966b.3; Sun, 03 Nov 2024 05:34:50 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.34.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:34:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640889; x=1731245689; 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=scKsKjVwCuGqApOSyGEnsOwcmcTTDBAW30tcpamKwQc=; b=Qj+RsAd2eF6KCsX4IZJ1308F/XbnlP3/CQSPukHmSXmuWHxedaiu8otAgHYU+ZiNv8 r+3OTfJ+ltZka9nPURbUzQkp5j4I+WqlmH1omZDZGOhIRvmJrLYuL2S5mrWr4SkDT7T1 UDh/qcqzTpC0S3vT1XLM9MsgHJzJmD/6lCN7OY+//4cmla0Af7NYBnJG6C2bZqr8/adX pqfKt8L8q+1u58imxx4ruFPu0Ig70R0qQ8+kgxtobfUCRq3DHPbd1tW1vA+oaR6tpIJ2 kxEjdQilZwxDLX/J4CsdoTHc4helHaYvPQOgJJZEndvE8+597v/z9O5Z7HeEnEvHMdPe 7+OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640889; x=1731245689; 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=scKsKjVwCuGqApOSyGEnsOwcmcTTDBAW30tcpamKwQc=; b=T2hZYGRYz30YUIAZ0YPdwlOA7p8yN5Jr2VhxCr+7K7uTwEcpErvw1pt7d25k5V1fEV GmTLz0hRy1/zZgeNhW1GhoFNnHMYWSf56kQmY/nOSluCIfScNE2a2mtecNFHyT1nr5HY mBnQm1PKREN/b8v4JI9czeeCQyGsm/kWsvSOPU3pGwQBYbY0lDDDKXQqMUAeIW2vN9lv J/wjdyDYW3uGEdNfxwbC8pMoDUeu5zDO59FEG2h+IG13CK2T4kGRrAEw3osTn695Tiw0 sZa84bmWJ8nHQzY2wNl5BkEYNMyQuP9Ju/qibz2Zbbaz5KcSsbPgniWFohfgvt/5yyXK QvEg== X-Forwarded-Encrypted: i=1; AJvYcCWVDF6gBmb/joFkdvLe8R9GnDRVAGvweJcFJHTocok231sSQYAf+dAmXkhQv2ccZG6/Gi3R/PX+HnQ=@nongnu.org, AJvYcCWvu8T6X5WmfnhNpEjO1El+ulAmInTx1Rz1BWIhBEGYUgHdzBkY8pbDzlRBri1U+Br4pxMSIPhrTPCI@nongnu.org X-Gm-Message-State: AOJu0Yx+tgeGS5k01geqZRMkNGQLTU/I17C/XMSCAigaVc500Zva9zZL 2aFuR6di0su/Q10hJj4InwvOysewJ+Ix+KCTjvXZdqRFxHRc6n8oYexFKg== X-Google-Smtp-Source: AGHT+IF1QfdyD0Jguue1vn3h1azepvYr0LOfkoX+8GlEMqCtWBmSee7YXuBr+DBGsjlI8018RI6KmA== X-Received: by 2002:a17:907:3f1f:b0:a99:fb10:128e with SMTP id a640c23a62f3a-a9de5fee8admr2751310366b.36.1730640888604; Sun, 03 Nov 2024 05:34:48 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza Subject: [PATCH v4 06/26] hw/ppc/e500: Reuse TYPE_GPIO_PWR Date: Sun, 3 Nov 2024 14:33:52 +0100 Message-ID: <20241103133412.73536-7-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=shentey@gmail.com; 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641338614116600 Content-Type: text/plain; charset="utf-8" Taking inspiration from the ARM virt machine, port away from qemu_allocate_irq() by reusing TYPE_GPIO_PWR. Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 16 ++++------------ hw/ppc/Kconfig | 1 + 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index a0c856568b..5d75a090ee 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -30,7 +30,6 @@ #include "sysemu/sysemu.h" #include "sysemu/kvm.h" #include "sysemu/reset.h" -#include "sysemu/runstate.h" #include "kvm_ppc.h" #include "sysemu/device_tree.h" #include "hw/ppc/openpic.h" @@ -47,7 +46,6 @@ #include "hw/platform-bus.h" #include "hw/net/fsl_etsec/etsec.h" #include "hw/i2c/i2c.h" -#include "hw/irq.h" #include "hw/sd/sdhci.h" #include "hw/misc/unimp.h" =20 @@ -887,13 +885,6 @@ static DeviceState *ppce500_init_mpic(PPCE500MachineSt= ate *pms, return dev; } =20 -static void ppce500_power_off(void *opaque, int line, int on) -{ - if (on) { - qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN); - } -} - void ppce500_init(MachineState *machine) { MemoryRegion *address_space_mem =3D get_system_memory(); @@ -1072,7 +1063,7 @@ void ppce500_init(MachineState *machine) sysbus_create_simple("e500-spin", pmc->spin_base, NULL); =20 if (pmc->has_mpc8xxx_gpio) { - qemu_irq poweroff_irq; + DeviceState *gpio_pwr_dev; =20 dev =3D qdev_new("mpc8xxx_gpio"); s =3D SYS_BUS_DEVICE(dev); @@ -1082,8 +1073,9 @@ void ppce500_init(MachineState *machine) sysbus_mmio_get_region(s, 0)); =20 /* Power Off GPIO at Pin 0 */ - poweroff_irq =3D qemu_allocate_irq(ppce500_power_off, NULL, 0); - qdev_connect_gpio_out(dev, 0, poweroff_irq); + gpio_pwr_dev =3D sysbus_create_simple("gpio-pwr", -1, NULL); + qdev_connect_gpio_out(dev, 0, qdev_get_gpio_in_named(gpio_pwr_dev, + "shutdown", 0= )); } =20 /* Platform Bus Device */ diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig index b44d91bebb..12ca3caabf 100644 --- a/hw/ppc/Kconfig +++ b/hw/ppc/Kconfig @@ -158,6 +158,7 @@ config E500 imply VIRTIO_PCI select ETSEC select GPIO_MPC8XXX + select GPIO_PWR select OPENPIC select PFLASH_CFI01 select PLATFORM_BUS --=20 2.47.0 From nobody Sat Nov 23 20:42:56 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641260; cv=none; d=zohomail.com; s=zohoarc; b=PdL5YKFrLRP1I453wCdpZ3DJSVfbNjCpmfw+xySJJ6HWjZ8h4Iax9cGQgSfGB9qM0RFSPIpq6pfljW+puiQc50KMlPvTD+KhEHtvf1Gl7sxDPvBDUacr4djJySNKhyL7aAdrYRReV8vtGcUMObFyhYU7xnr/xEEG7rA57scvPFE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641260; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=CdW4RukPeYbtzE571oJ5Ywld87248Qqc7eArKKusu5M=; b=EjMPJq0ben9ZqMK1t+Duzq32J+hcwhquse3INXDvIc5mOACZ2A5B1jPJPGKcIww04QU5mMWMIP3530sHtJVPzms9U/34L+tm/WwD+9DDzw2t6iO7Kg8pZQpIX4luPjshJjH11rejbzwgmhX/dg+/QjMJmjkv0XZRzn96+ez5GHA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730641260919275.8218015584864; Sun, 3 Nov 2024 05:41:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7akx-0006GK-38; Sun, 03 Nov 2024 08:35:03 -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 1t7akq-0006BJ-Cj; Sun, 03 Nov 2024 08:34:57 -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 1t7ako-0001F8-HS; Sun, 03 Nov 2024 08:34:55 -0500 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a9e8522c10bso161327866b.1; Sun, 03 Nov 2024 05:34:52 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.34.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:34:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640891; x=1731245691; 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=CdW4RukPeYbtzE571oJ5Ywld87248Qqc7eArKKusu5M=; b=PTlpFZFR80O0XHcf9OcTnAgb9CJTAWFilBrEEaJjtXaaldmZxl+r2scDw7MlVd1Cqx sXPyeABX/qvf4ipKZ8DYN/j3ZLoQuh5AOZyiudy6K8RQZgx2nuiKsGU8hMyuA7PjDmkC 8JX1f9uFy9AyYJ+dD5X4USOayLQxiydf8cquk7vwSjCNWejcKrgKYHnQG5upYJZylY1Q dz3cEXzfU/5YXvhj65B/4GTmcRiFiyRxhro6l5MBLwKFjLCgn9q199FEpnzu7SA9uevr 9Dy7XeCcj1MgE9xrLtZ8YRbI3lR2GQ00JXx2NaQy4IfLPNFFakeVl3j7LBKxBfNQbpk3 99cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640891; x=1731245691; 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=CdW4RukPeYbtzE571oJ5Ywld87248Qqc7eArKKusu5M=; b=BjLCsanlp6on//q6bsxpuhB+SzhuHUsmSKdXBCBNImL5H2Bga2YyitH/hXSVs34NRz 2gFNaHq2zOkpnkyf8DIeYrkvl8LfS95YYxQK+lkBQy2YvP47DiveU9Y3Pe5UN2oEjiJq SxQEbvcy9an9SwHdrIV9Hw7XKVWGz1g5j8M0CCo/ki9c1hejorGc1VFf4oEgkjXIBeg4 B40qm2Pqd8q9NS2UEjfgNwm7n90m+nDDWihEvZJZe0URQ62ojLulSCx19bLp4LiMglLa OvKyC7XRx7G9DF6WCD0vPHqzEzO2irJQ8UsgoLWHTTHbocfL7wbHau1KkmU3YqwezV9g MUEw== X-Forwarded-Encrypted: i=1; AJvYcCWWCMpl+zMX44e+y4i7hd66otarWx13eLZmTKESVjDhDAGd2dFptD4Yqv5bygHtestwIG9PHdxEsMCI@nongnu.org, AJvYcCWmxvxVZngq2rCWCKK6UzNSTrL4u+wGQ5to8eoa+NGL76EMtICSwWh6LnyBMOHaXX8+eLRnB2roccs=@nongnu.org X-Gm-Message-State: AOJu0YzNTSprYPj+7HjtuV8XBf4MfBnyvixRIo8O3d24qc72wdIYWDZ2 ZyY9UUOhBQY828lnCHXoXZZtRgx86R41eYV/ePEFJLXV/2jcDyPdB4GDiw== X-Google-Smtp-Source: AGHT+IGqK/4vu9rfQhq+xLQiXk8jzYoKDP8OSpCx8cF49FFD+92B8FCTFaak50T7pkxg3DreS+3y8A== X-Received: by 2002:a17:907:94cb:b0:a99:f94b:f92e with SMTP id a640c23a62f3a-a9e654924a6mr1024746966b.27.1730640890410; Sun, 03 Nov 2024 05:34:50 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza , BALATON Zoltan Subject: [PATCH v4 07/26] hw/ppc/e500: Use SysBusDevice API to access TYPE_CCSR's internal resources Date: Sun, 3 Nov 2024 14:33:53 +0100 Message-ID: <20241103133412.73536-8-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=shentey@gmail.com; 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641262549116600 Content-Type: text/plain; charset="utf-8" Rather than accessing the attributes of TYPE_CCSR directly, use the SysBusD= evice API which exists exactly for that purpose. Furthermore, registering the mem= ory region with the SysBusDevice API makes it show up in QMP's `info qom-tree` command. Reviewed-by: BALATON Zoltan Signed-off-by: Bernhard Beschow --- hw/pci-host/ppce500.c | 10 +++++----- hw/ppc/e500.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c index 95b983b2b3..97e5d47cec 100644 --- a/hw/pci-host/ppce500.c +++ b/hw/pci-host/ppce500.c @@ -16,7 +16,6 @@ =20 #include "qemu/osdep.h" #include "hw/irq.h" -#include "hw/ppc/e500-ccsr.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" #include "hw/pci/pci_device.h" @@ -419,11 +418,12 @@ static const VMStateDescription vmstate_ppce500_pci = =3D { static void e500_pcihost_bridge_realize(PCIDevice *d, Error **errp) { PPCE500PCIBridgeState *b =3D PPC_E500_PCI_BRIDGE(d); - PPCE500CCSRState *ccsr =3D CCSR(container_get(qdev_get_machine(), - "/e500-ccsr")); + SysBusDevice *ccsr =3D SYS_BUS_DEVICE(container_get(qdev_get_machine(), + "/e500-ccsr")); + MemoryRegion *ccsr_space =3D sysbus_mmio_get_region(ccsr, 0); =20 - memory_region_init_alias(&b->bar0, OBJECT(ccsr), "e500-pci-bar0", &ccs= r->ccsr_space, - 0, int128_get64(ccsr->ccsr_space.size)); + memory_region_init_alias(&b->bar0, OBJECT(ccsr), "e500-pci-bar0", + ccsr_space, 0, int128_get64(ccsr_space->size)= ); pci_register_bar(d, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &b->bar0); } =20 diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 5d75a090ee..2849fba524 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -915,7 +915,6 @@ void ppce500_init(MachineState *machine) DriveInfo *dinfo; MemoryRegion *ccsr_addr_space; SysBusDevice *s; - PPCE500CCSRState *ccsr; I2CBus *i2c; =20 irqs =3D g_new0(IrqLines, smp_cpus); @@ -971,10 +970,10 @@ void ppce500_init(MachineState *machine) memory_region_add_subregion(address_space_mem, 0, machine->ram); =20 dev =3D qdev_new("e500-ccsr"); + s =3D SYS_BUS_DEVICE(dev); object_property_add_child(OBJECT(machine), "e500-ccsr", OBJECT(dev)); - sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); - ccsr =3D CCSR(dev); - ccsr_addr_space =3D &ccsr->ccsr_space; + sysbus_realize_and_unref(s, &error_fatal); + ccsr_addr_space =3D sysbus_mmio_get_region(s, 0); memory_region_add_subregion(address_space_mem, pmc->ccsrbar_base, ccsr_addr_space); =20 @@ -1262,6 +1261,7 @@ static void e500_ccsr_initfn(Object *obj) PPCE500CCSRState *ccsr =3D CCSR(obj); memory_region_init(&ccsr->ccsr_space, obj, "e500-ccsr", MPC8544_CCSRBAR_SIZE); + sysbus_init_mmio(SYS_BUS_DEVICE(ccsr), &ccsr->ccsr_space); } =20 static const TypeInfo e500_ccsr_info =3D { --=20 2.47.0 From nobody Sat Nov 23 20:42:56 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641247; cv=none; d=zohomail.com; s=zohoarc; b=dnN4aApHTF+XR05Ix4VCAjL60tE3FwZ4bJDg959vZZ13b8n9vMA3So9ec0FHjLOTeBP5ba/WWROz3IJp7xKZST9x8T9XP++dQnWOkswOH4N5iaFZZNt+IteVS/2OTfEgLYnklxLRHnBHN+ShLoOFS8+catDVYO5C0O8J6op4VZo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641247; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=VEVYSxDFqm/X/a/RCULnQJR7m3PPQ/OfkGJfqpgzHf8=; b=MXhCkS5yfh4zwqUI+9K7jWojCt0nBd74UeCNFTAwuY5M7/JPHtU1IS6dMDkowmqxbLSIwdMyRa0h88/DPyw+qprc2pNTZw4r/Su7XA7eqdmZ3n9tggKFc5yd2PkWsNsiGkunpS3V6Ar39DCaG/xFbd3GvFK/yrQNVA2XG/lGDiU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730641247759673.7610769316298; Sun, 3 Nov 2024 05:40:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7al1-0006P2-VW; Sun, 03 Nov 2024 08:35:08 -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 1t7akr-0006BM-8D; Sun, 03 Nov 2024 08:34:58 -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 1t7ako-0001FT-Sv; Sun, 03 Nov 2024 08:34:56 -0500 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a9a0c40849cso584842266b.3; Sun, 03 Nov 2024 05:34:53 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.34.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:34:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640892; x=1731245692; 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=VEVYSxDFqm/X/a/RCULnQJR7m3PPQ/OfkGJfqpgzHf8=; b=FbGrc8VGNlZ8o9J8MbDS2OhXfOV8KGeeIK4Yq/MiXfgFp1jRLMxwkDVj/YhrVK5b1s qP5AzoHC1Y3yUIb3bBWdkhEZIn/qhyH+kRdcRHoIx8JIEa5KqMq/suNJTG+dcjGJaNFY wj22O/yZ5StXoc/U9TxK+v5I9Q9tPZEnQSeJldB9PltJAZT+rVgcnMPTVcASbYG8lObi 4r32DTiGpK0n0UozW28/3u3GJ/5P463yJxdHp0pcH1OtBPYRM288S1/Xzjsr6Wy1Bkbd PwcOAiQc/GrC1Ufjah6GUjDUmbQPL7jwKjvSIoKZ7MAcXh/REGQt978Yrq3UFY0KjBb6 9LBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640892; x=1731245692; 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=VEVYSxDFqm/X/a/RCULnQJR7m3PPQ/OfkGJfqpgzHf8=; b=KeAzLTfLDZxzBAyFCWAIBUO3cnYuL52vGtZYinyIP90vGK6taXl1Qw+BmkA+ydyhnO JkZ+sWFUm+HA0grHEYQbcvvd8MZYHVlODv5fpVRg7wwMIl9iN8TJpU3nyQBfhnkTNMC0 cDYEZqHnabEcP/+cRFaWWLFc3EmXd54Mb26d5Rq1sCnXQ8OzkfgjJ4duaGr9pOotJxy2 CgxHgM1zWW0UT4DF+AwZpWWYDJ73emIgEhflDwgbRsYii45sK2JnpvUlMsshlrzdHUtb n0hRHLqR6onex9TVsAuaKWZ7EB/G0TcL4duqnznUzD0tTI3o6OzDnRydxgFutXBW/Dsy 4DLw== X-Forwarded-Encrypted: i=1; AJvYcCUfopgLYOi1VuAZrxKqqO0mbU+6KvKu+7RPk7IHAuJ9Hmh9bk34dLzquHurHJ0cGxwAne8WRRBneOM=@nongnu.org, AJvYcCWJDYyMAVt0xUUVMaWEpDqwInCzpyfyVPBNsIc46vonpmwJgv9upPVUFXXnFqerhcVeDp/PeXUIlPDc@nongnu.org X-Gm-Message-State: AOJu0YwGD2ZnuIwpftxdbHnjPZsAMZc8Ipltu/OioU+uUX5TInn29s3f r2p7+1wuwPqvHLNxLMrZbK4gaPOjgNAKHNntxJ5MxFIDkdiZP1Of2EgcOQ== X-Google-Smtp-Source: AGHT+IG/NkwSbyQcPA7VTBkhc+fgWP5WQMO5A6TN7O2ZRXm7nE4SiheTYHRRNUvoqC+oOJpGzcdTLw== X-Received: by 2002:a17:907:1c1d:b0:a9a:f53:a5c6 with SMTP id a640c23a62f3a-a9e3a7f468fmr1599305666b.65.1730640891928; Sun, 03 Nov 2024 05:34:51 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza Subject: [PATCH v4 08/26] hw/ppc/e500: Extract ppce500_ccsr.c Date: Sun, 3 Nov 2024 14:33:54 +0100 Message-ID: <20241103133412.73536-9-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=shentey@gmail.com; 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641248580116600 Content-Type: text/plain; charset="utf-8" The device model already has a header file, so extract its implementation i= nto an accompanying source file like other e500 devices. While at it rename the header file to reflect the name of the structure defined there. This commit is also a preparation for the next commit. Signed-off-by: Bernhard Beschow --- MAINTAINERS | 2 +- hw/ppc/{e500-ccsr.h =3D> ppce500_ccsr.h} | 8 +++--- hw/ppc/e500.c | 21 ++-------------- hw/ppc/ppce500_ccsr.c | 34 ++++++++++++++++++++++++++ hw/ppc/meson.build | 1 + 5 files changed, 42 insertions(+), 24 deletions(-) rename hw/ppc/{e500-ccsr.h =3D> ppce500_ccsr.h} (71%) create mode 100644 hw/ppc/ppce500_ccsr.c diff --git a/MAINTAINERS b/MAINTAINERS index 1e88b5738c..a8f39aeb6f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1391,7 +1391,7 @@ M: Bernhard Beschow L: qemu-ppc@nongnu.org S: Odd Fixes F: hw/ppc/e500* -F: hw/ppc/ppce500_spin.c +F: hw/ppc/ppce500_* F: hw/gpio/mpc8xxx.c F: hw/i2c/mpc_i2c.c F: hw/net/fsl_etsec/ diff --git a/hw/ppc/e500-ccsr.h b/hw/ppc/ppce500_ccsr.h similarity index 71% rename from hw/ppc/e500-ccsr.h rename to hw/ppc/ppce500_ccsr.h index 249c17be3b..36cbb811ca 100644 --- a/hw/ppc/e500-ccsr.h +++ b/hw/ppc/ppce500_ccsr.h @@ -1,13 +1,13 @@ -#ifndef E500_CCSR_H -#define E500_CCSR_H +#ifndef PPCE500_CCSR_H +#define PPCE500_CCSR_H =20 #include "hw/sysbus.h" #include "qom/object.h" =20 +#define MPC85XX_CCSRBAR_SIZE 0x00100000ULL + struct PPCE500CCSRState { - /*< private >*/ SysBusDevice parent; - /*< public >*/ =20 MemoryRegion ccsr_space; }; diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 2849fba524..f640195e62 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -20,7 +20,7 @@ #include "qemu/guest-random.h" #include "qapi/error.h" #include "e500.h" -#include "e500-ccsr.h" +#include "ppce500_ccsr.h" #include "net/net.h" #include "qemu/config-file.h" #include "hw/block/flash.h" @@ -59,7 +59,6 @@ #define RAM_SIZES_ALIGN (64 * MiB) =20 /* TODO: parameterize */ -#define MPC8544_CCSRBAR_SIZE 0x00100000ULL #define MPC8544_MPIC_REGS_OFFSET 0x40000ULL #define MPC8544_MSI_REGS_OFFSET 0x41600ULL #define MPC8544_SERIAL0_REGS_OFFSET 0x4500ULL @@ -530,7 +529,7 @@ static int ppce500_load_device_tree(PPCE500MachineState= *pms, qemu_fdt_setprop_cell(fdt, soc, "#size-cells", 1); qemu_fdt_setprop_cells(fdt, soc, "ranges", 0x0, pmc->ccsrbar_base >> 32, pmc->ccsrbar_base, - MPC8544_CCSRBAR_SIZE); + MPC85XX_CCSRBAR_SIZE); /* XXX should contain a reasonable value */ qemu_fdt_setprop_cell(fdt, soc, "bus-frequency", 0); =20 @@ -1256,21 +1255,6 @@ void ppce500_init(MachineState *machine) pms->boot_info.dt_size =3D dt_size; } =20 -static void e500_ccsr_initfn(Object *obj) -{ - PPCE500CCSRState *ccsr =3D CCSR(obj); - memory_region_init(&ccsr->ccsr_space, obj, "e500-ccsr", - MPC8544_CCSRBAR_SIZE); - sysbus_init_mmio(SYS_BUS_DEVICE(ccsr), &ccsr->ccsr_space); -} - -static const TypeInfo e500_ccsr_info =3D { - .name =3D TYPE_CCSR, - .parent =3D TYPE_SYS_BUS_DEVICE, - .instance_size =3D sizeof(PPCE500CCSRState), - .instance_init =3D e500_ccsr_initfn, -}; - static const TypeInfo ppce500_info =3D { .name =3D TYPE_PPCE500_MACHINE, .parent =3D TYPE_MACHINE, @@ -1281,7 +1265,6 @@ static const TypeInfo ppce500_info =3D { =20 static void e500_register_types(void) { - type_register_static(&e500_ccsr_info); type_register_static(&ppce500_info); } =20 diff --git a/hw/ppc/ppce500_ccsr.c b/hw/ppc/ppce500_ccsr.c new file mode 100644 index 0000000000..b1fb4090c0 --- /dev/null +++ b/hw/ppc/ppce500_ccsr.c @@ -0,0 +1,34 @@ +/* + * QEMU PowerPC E500 embedded processors CCSR space emulation + * + * Copyright (C) 2009 Freescale Semiconductor, Inc. All rights reserved. + * + * Author: Yu Liu, + * + * This is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#include "qemu/osdep.h" +#include "ppce500_ccsr.h" + +static void ppce500_ccsr_init(Object *obj) +{ + PPCE500CCSRState *s =3D CCSR(obj); + + memory_region_init(&s->ccsr_space, obj, "e500-ccsr", MPC85XX_CCSRBAR_S= IZE); + sysbus_init_mmio(SYS_BUS_DEVICE(s), &s->ccsr_space); +} + +static const TypeInfo ppce500_ccsr_types[] =3D { + { + .name =3D TYPE_CCSR, + .parent =3D TYPE_SYS_BUS_DEVICE, + .instance_size =3D sizeof(PPCE500CCSRState), + .instance_init =3D ppce500_ccsr_init, + }, +}; + +DEFINE_TYPES(ppce500_ccsr_types) diff --git a/hw/ppc/meson.build b/hw/ppc/meson.build index 7cd9189869..43c746795a 100644 --- a/hw/ppc/meson.build +++ b/hw/ppc/meson.build @@ -81,6 +81,7 @@ ppc_ss.add(when: 'CONFIG_MPC8544DS', if_true: files('mpc8= 544ds.c')) ppc_ss.add(when: 'CONFIG_E500', if_true: files( 'e500.c', 'mpc8544_guts.c', + 'ppce500_ccsr.c', 'ppce500_spin.c' )) # PowerPC 440 Xilinx ML507 reference board. --=20 2.47.0 From nobody Sat Nov 23 20:42:56 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641035; cv=none; d=zohomail.com; s=zohoarc; b=J5eUXe5VZVYRoC76TlUwjlNMQa9HKGcHQdREYwBNx9jYtP6fhUD0JNeJfOrh6AvL3JKHviUvJZZwb5E9b22Mfm49lgVEYkDPVTys700eCelvlacxFBBqg77rNAbe8rnj4O7sAo060LhM+PODL/9k7zVOQMoC3B8U2cZC+OZxTIU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641035; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=4LrsAVgiHNYWHzjycHLAubvkskxhUaO0hAeiKijzufc=; b=gWjYMCLJcZ2G5Lhm3T8Qmu9PQkTPPlwe7WmKd0o+69+8rFo8SEq8Tted492SwQiYBWE3HSlOXbwOcYo6VvwOkLlJm1l3eCidNF6V2SVhKrHf/XgX1P36LAnrbjcIUvL9LoV2yeikkLF4hKsC1xeYDxyZhMzO1YC1cwOPKQc6r3A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730641035059422.42570930734587; Sun, 3 Nov 2024 05:37:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7aky-0006KX-SY; Sun, 03 Nov 2024 08:35:04 -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 1t7aks-0006C6-DT; Sun, 03 Nov 2024 08:34:59 -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 1t7akq-0001Fz-Pl; Sun, 03 Nov 2024 08:34:58 -0500 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a99f3a5a44cso469338066b.3; Sun, 03 Nov 2024 05:34:55 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.34.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:34:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640894; x=1731245694; 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=4LrsAVgiHNYWHzjycHLAubvkskxhUaO0hAeiKijzufc=; b=OTfSeM0ieNxm+o8dhgsRUtA+iYXAx9H3tr8HaGNErkOoru+iciDxeCJR7O/G4wVjJS 5uacOl8ruRuJH38Lbe2LHMGH5S9pGIN0xcSu11UW05oddPoHbNZHvAKzoyW0V6ibvM4l K8GOk+qG9Mu2IrM2hb4PsdWJb/FoIqQ4yeZVuZnHb0ktWTpjezyLKJEJFYcbbUT2GNiX 71jFnXfNVeHL37JFA4F2AvY0xnkJEK03gBITtwJhh6uF0R0lkZB44tCIrZEQ0gRTy9L0 EQ7W/fmh1Ubbw5QWUws2v7nNvx12YrN7zpOzzl7KbJcztBKtfEWxrfyuIkdtO9hRjJRo MYBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640894; x=1731245694; 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=4LrsAVgiHNYWHzjycHLAubvkskxhUaO0hAeiKijzufc=; b=AxozvTQ/BatnJw50K19h9qsiqHwWG83SPrMJgwRHThi3vDww3JL/q4dyAIbbeHPO2d czOBCkmD1ZX8kNY8728/clzb+vifK2iwUP0xdG6EKU/k/PW/r9VlyTGjywvc+DwjUlNC zm2AUHV8kNo4qdzZ4Mq/SDCY988/kw+9V62dLfbQWSeVRhBhce+4aPcT1Igrea/Kt/BA PMt6xEaBJSvETZMm7DbJEqR95fWYQfy7o2vkY6uReBYs+Hb8Ghp+U0Fh4ugP7hCSmfJt NXAMkq5lqDd64s32zR15fXSGW6WYIPPw2qaBJ7Hsyi7kO2A7sDUJ0yrCeEdf9P9+Txkz cH5Q== X-Forwarded-Encrypted: i=1; AJvYcCVI2nbwgoLGGAyU3qFvF8jGiiS1o3uN28aXUmNNQkB9RNVXtdaikuj6N1sMh3Ke/p1iidULd36JGVQj@nongnu.org, AJvYcCXHAfLRJ5YpuLaylcPmDfuyyJ8Ki548tkv7NFq0scRmL8dWJY7fKkjDArS1m3p1Toh7rsHhFbMkmJA=@nongnu.org X-Gm-Message-State: AOJu0YxCsOqOX3JS73J+wEPO6xjQC08bcXBspfh4VnP8gi9EIJRidknP oWYYjm6A7WwqzJXtt2JLDPgcjDBpX9uXU2VtY1H2Um4LiDLBgeo2TPyZEA== X-Google-Smtp-Source: AGHT+IGGqec/lBlZhlqUjJJtcC2SRULsfxWaoxXKs3/e50EAVjutNghDuXtXSNX6EdSwnl2VhJBuPQ== X-Received: by 2002:a17:907:9413:b0:a9a:1f8:6c9b with SMTP id a640c23a62f3a-a9de5fe7455mr2899437166b.37.1730640893838; Sun, 03 Nov 2024 05:34:53 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza Subject: [PATCH v4 09/26] hw/ppc/ppce500_ccsr: Trace access to CCSR region Date: Sun, 3 Nov 2024 14:33:55 +0100 Message-ID: <20241103133412.73536-10-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=shentey@gmail.com; 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641035619116600 Content-Type: text/plain; charset="utf-8" The CCSR space is just a container which is meant to be covered by platform device memory regions. However, QEMU only implements a subset of these devi= ces. Add some tracing to see which unimplemented devices a guest attempts to acc= ess. Signed-off-by: Bernhard Beschow --- hw/ppc/ppce500_ccsr.c | 25 ++++++++++++++++++++++++- hw/ppc/trace-events | 3 +++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/hw/ppc/ppce500_ccsr.c b/hw/ppc/ppce500_ccsr.c index b1fb4090c0..31efc7bee8 100644 --- a/hw/ppc/ppce500_ccsr.c +++ b/hw/ppc/ppce500_ccsr.c @@ -13,12 +13,35 @@ =20 #include "qemu/osdep.h" #include "ppce500_ccsr.h" +#include "trace.h" + +static uint64_t ppce500_ccsr_io_read(void *opaque, hwaddr addr, unsigned s= ize) +{ + uint64_t value =3D 0; + + trace_ppce500_ccsr_io_read(addr, value, size); + + return value; +} + +static void ppce500_ccsr_io_write(void *opaque, hwaddr addr, uint64_t valu= e, + unsigned size) +{ + trace_ppce500_ccsr_io_write(addr, value, size); +} + +static const MemoryRegionOps ppce500_ccsr_ops =3D { + .read =3D ppce500_ccsr_io_read, + .write =3D ppce500_ccsr_io_write, + .endianness =3D DEVICE_NATIVE_ENDIAN, +}; =20 static void ppce500_ccsr_init(Object *obj) { PPCE500CCSRState *s =3D CCSR(obj); =20 - memory_region_init(&s->ccsr_space, obj, "e500-ccsr", MPC85XX_CCSRBAR_S= IZE); + memory_region_init_io(&s->ccsr_space, obj, &ppce500_ccsr_ops, obj, + "e500-ccsr", MPC85XX_CCSRBAR_SIZE); sysbus_init_mmio(SYS_BUS_DEVICE(s), &s->ccsr_space); } =20 diff --git a/hw/ppc/trace-events b/hw/ppc/trace-events index 1f125ce841..ca4c231c9f 100644 --- a/hw/ppc/trace-events +++ b/hw/ppc/trace-events @@ -143,6 +143,9 @@ ppc_irq_cpu(const char *action) "%s" ppc_dcr_read(uint32_t addr, uint32_t val) "DRCN[0x%x] -> 0x%x" ppc_dcr_write(uint32_t addr, uint32_t val) "DRCN[0x%x] <- 0x%x" =20 +ppce500_ccsr_io_read(uint32_t index, uint32_t val, uint8_t size) "[0x%" PR= Ix32 "] -> 0x%08x (size: 0x%" PRIu8 ")" +ppce500_ccsr_io_write(uint32_t index, uint32_t val, uint8_t size) "[0x%" P= RIx32 "] <- 0x%08x (size: 0x%" PRIu8 ")" + # prep_systemio.c prep_systemio_read(uint32_t addr, uint32_t val) "read addr=3D0x%x val=3D0x= %x" prep_systemio_write(uint32_t addr, uint32_t val) "write addr=3D0x%x val=3D= 0x%x" --=20 2.47.0 From nobody Sat Nov 23 20:42:56 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641018; cv=none; d=zohomail.com; s=zohoarc; b=jI8+Yuxf/wchUDNnksh1uugnyEaojvLs9CCEeLtYQJ/M6r5PEQpfIzZbRw/ErLEsDIXYtS+HetaZ9E5MswcA7e7bdlNo4XEGItxJrvLDOTAEnszSN3akIWPm7FKgmEK/FqU67zo+iQFt1Sw7uP+75qFAqvYih7OzGbuGfhVyvJU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641018; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ek6CJz/W/BZPJLQDBSj5hrEIX9vzfAv/et55GzS0YMU=; b=QW/xu7GCbpItIze2KKo05Rb51L3Etw6PP9gsUS2Flbk4BzSW1WrzJ7aRLaOVFerh53oYJmcPcqLKpj7YDUwx9ugA/MtyzHQ0lqe2NSoM4sMQaMzVwXlyKpvz+1TLj1UDyggrQIKHVzUoOsrcJyEyZSpLBw2ScQc4hzlSXe9jCuI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730641018189487.92445582694893; Sun, 3 Nov 2024 05:36:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7akz-0006Mp-QN; Sun, 03 Nov 2024 08:35:05 -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 1t7akv-0006EC-7l; Sun, 03 Nov 2024 08:35:01 -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 1t7aks-0001GH-K2; Sun, 03 Nov 2024 08:35:00 -0500 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a7aa086b077so392509566b.0; Sun, 03 Nov 2024 05:34:56 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.34.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:34:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640895; x=1731245695; 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=ek6CJz/W/BZPJLQDBSj5hrEIX9vzfAv/et55GzS0YMU=; b=HX8XAsNb23G7vjga9CHfq1rLCNSNF4MQYiVtUzUjq8uJ4TJvMRlm1vJomnlURVjVvP mo9lVtwhKvwDetARdRCzKtK5UWmrDNEJRYs+vQ8iofcVuCkYjzG4aKYQxRKJiUqSJJKL ir+8AeVpYCyc8mdEP0bqgXSO+stj0J1FOY6mr7t9OXwyiflRbBdBtprrubvQ1l6xYU+O FxV2UlrbAKoNgdPfzpHuH5GgD6W98dF9ekRG6hcEaAAE8+kIDv7YlMvThb99C++BWZwR WS3PyV4R9cPG6TCuV0lbbqcyaL9GFnsxRHnzZL0QdTYEqPamHextT+aIYH6/Kl5iWde+ DRQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640895; x=1731245695; 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=ek6CJz/W/BZPJLQDBSj5hrEIX9vzfAv/et55GzS0YMU=; b=j+DCeG+EUxQB9p5Yo1epW2E4gqpHdzDKpso8EDF3ps7BJ3pbvQ37mKAjdsO3pQgVTn 4WI4B+0Kpad8ZoEKJCkbwvKHWsGDMI/T9mgHR5uXPOw+Y6FSQbrnt3fR1VFzGfEfzCun +VYa5w+RfF/+Fgns7tKJ5X9DipivwGIulAJ/wH/ihl9FDYIu2ElEaheqZWrmjobxrL9Y QEvaX4/GwmXpF0KGQ2Vs/ot18l1FOLkp5JGT94YP2cg4Y6nOJGFBSE6H1nUeLX8VPt05 POdbepMYGqPbFOdM7dgHww6pFVFw6ZHqfwp7nh3RAyBrHWNtqxraRESHiwqM7miIVQu/ ClZA== X-Forwarded-Encrypted: i=1; AJvYcCWWeGqh/tuDNCIvR9WcADU6AYdIILei7HAkHU7Ka4/BFIzrBzgvAc3MTNFFnV/mNgqYlkNBi7k5kwo=@nongnu.org, AJvYcCXDImv7Wmyk4ajO1IFMe9Zabdr7JKovOq18EohLmEoqJykqMkfCvetj/AQ1xKI2WGZqQs/vQMm08ck+@nongnu.org X-Gm-Message-State: AOJu0YxVbu0QKZtqStojm7gPwyUJRusTpkC9OaqZTBmXkW9TLCu+gAzO n5ycEo+PJn/h9YFl3bLJuJLpLNWBSSIDGj7RABYXoC0ggWiH1/Z3DEkd2g== X-Google-Smtp-Source: AGHT+IHU1zHgnSJYKblp4Y2Phk1qGDzo9lmKgHdHvby6tWb3uuE0Pzqbi12wiCC0k3hd9DC9+Y4wZg== X-Received: by 2002:a17:906:6a12:b0:a99:f746:385 with SMTP id a640c23a62f3a-a9e3a573d11mr1837250766b.1.1730640895195; Sun, 03 Nov 2024 05:34:55 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza , BALATON Zoltan Subject: [PATCH v4 10/26] hw/ppc/mpc8544_guts: Populate POR PLL ratio status register Date: Sun, 3 Nov 2024 14:33:56 +0100 Message-ID: <20241103133412.73536-11-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=shentey@gmail.com; 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641019501116600 Content-Type: text/plain; charset="utf-8" Populate this read-only register with some arbitrary values which avoids U-Boot's get_clocks() to hang(). Reviewed-by: BALATON Zoltan Signed-off-by: Bernhard Beschow --- hw/ppc/mpc8544_guts.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hw/ppc/mpc8544_guts.c b/hw/ppc/mpc8544_guts.c index e3540b0281..c02b34ccde 100644 --- a/hw/ppc/mpc8544_guts.c +++ b/hw/ppc/mpc8544_guts.c @@ -29,6 +29,12 @@ #define MPC8544_GUTS_RSTCR_RESET 0x02 =20 #define MPC8544_GUTS_ADDR_PORPLLSR 0x00 +REG32(GUTS_PORPLLSR, 0x00) + FIELD(GUTS_PORPLLSR, E500_1_RATIO, 24, 6) + FIELD(GUTS_PORPLLSR, E500_0_RATIO, 16, 6) + FIELD(GUTS_PORPLLSR, DDR_RATIO, 9, 5) + FIELD(GUTS_PORPLLSR, PLAT_RATIO, 1, 5) + #define MPC8544_GUTS_ADDR_PORBMSR 0x04 #define MPC8544_GUTS_ADDR_PORIMPSCR 0x08 #define MPC8544_GUTS_ADDR_PORDEVSR 0x0C @@ -75,6 +81,12 @@ static uint64_t mpc8544_guts_read(void *opaque, hwaddr a= ddr, =20 addr &=3D MPC8544_GUTS_MMIO_SIZE - 1; switch (addr) { + case MPC8544_GUTS_ADDR_PORPLLSR: + value =3D FIELD_DP32(value, GUTS_PORPLLSR, E500_1_RATIO, 6); /* 3:= 1 */ + value =3D FIELD_DP32(value, GUTS_PORPLLSR, E500_0_RATIO, 6); /* 3:= 1 */ + value =3D FIELD_DP32(value, GUTS_PORPLLSR, DDR_RATIO, 12); /* 12:1= */ + value =3D FIELD_DP32(value, GUTS_PORPLLSR, PLAT_RATIO, 6); /* 6:1 = */ + break; case MPC8544_GUTS_ADDR_PVR: value =3D env->spr[SPR_PVR]; break; --=20 2.47.0 From nobody Sat Nov 23 20:42:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641033; cv=none; d=zohomail.com; s=zohoarc; b=LaF2rzxelY1B2fZo2xSQMJ9I5Ly/IunblR0eXXcCeJM8ZW8ZFjuQiI5PJVm3SDb1y/M0Dp8LXvCr1P6KAJyQwG+lfQADuo1OeIbjJgSVtHIFcvtfUgGyO1UQZ5F8xDArkce8c4i97JB/YjUWkwk5DJYYBrVcKrRxBtydbEw+DIE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641033; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=F19SeWagbzAvngzaU5ogyB638Uj1pnr+BrSpn2Lt6ZY=; b=CnEbLepxS/f62+sB7fI3wL5Gt3QBVSyfDakbcRq0jSYpfGbFLjxJf8dcJIqA0MZgCgUmVpNCWQ8fRH+/5lHGdsXNOJZy02Pu04YktPtFo4BG6qsfgbMygw2oGX8dr+UsGgPoI4hjV0D3qGfhyQJYH7qm4Kd5msQKeP4s2OECK90= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730641033186803.998391922943; Sun, 3 Nov 2024 05:37:13 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7akz-0006Mk-PT; Sun, 03 Nov 2024 08:35:05 -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 1t7akw-0006FQ-6q; Sun, 03 Nov 2024 08:35:02 -0500 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7aku-0001Ga-GP; Sun, 03 Nov 2024 08:35:01 -0500 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a9abe139088so506806666b.1; Sun, 03 Nov 2024 05:34:58 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.34.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:34:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640897; x=1731245697; 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=F19SeWagbzAvngzaU5ogyB638Uj1pnr+BrSpn2Lt6ZY=; b=UPJrMTfiKadutZyRBP0DEMOj9Ml1WlW+LDaJzp+eqmOaljSMlEmi3/iCOZ8eoyQtGv AYlD1xUXD0RtPjF307lod2U29/M5m0CtShADt5FfrOef1SF3CMY65Z8Y2B1+1IWTP4dy z5Y5hmiCvq1wmWO1o05MJpo3127P2jeVBBUEl/XWrn4lslRsLSdKEywpurTEn2LCqE7+ xEnZLzultgYr4HhKIv+flV//9fTDEI6EXdFfvJNJo1mdv6nxOREB7X7qwqS89fMbf2IU 5QoGmp+LkY+TxrIZMeHRuTH78IOGiGTKtDjoiVUzKZ88FcWap8A8bVlYZLTxDiyIffbo yV1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640897; x=1731245697; 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=F19SeWagbzAvngzaU5ogyB638Uj1pnr+BrSpn2Lt6ZY=; b=mbFb+Dx2Bo2V2mSRz2kYo2SZ6VXUgzBKuR7qtgJuFrgMKLB659hRGNrB6eNmT5K9it /cGNBJReNb2Xt8rUgag0UW9S3xhZ3/0THYvgDTXDSw0UOigJ4Rw3ZKSnLfgMz810KyON x0ejZdX5GriNZdmsw2bKjh2HeeGObIA1BkXkpUL7ZxY+BTWYpCYdEzleRcawMV728XLI ZD+PhFVfpbjaaZlPlgU1K/ztwmiv4SCdyD0NAw2rSG0c8PsiPckZl0qMIyQ54P7jZ907 FXPE0r/ziCBKjXJyk7QBGfezDyukxNJGLu568zx+ibqWSdlaybvTjkTzpdk1RjgjMOpn H1Rw== X-Forwarded-Encrypted: i=1; AJvYcCUhoeZCU5eoff0oOZJbTB3HnoZcEnFm7VNaUPHSP4X9XzMWz+VD4RVSHEXxugyRMwdjq7ZqyHi2NgFN@nongnu.org, AJvYcCXpoWER8Zm7EibWzd1cw3w2GV/bO1H3DC3VllBBvJxL20VXQ/iBQORF/Uhj0ixh6ajqcFvup6erZs4=@nongnu.org X-Gm-Message-State: AOJu0YxWJ9Z5Mvmm3CJr25xM84ou4LmxNReieO6Zstr0on8cHOSiQBaM DyYDYzRpY53XZ8Qs/AXax3qR/91oO+9CykyJ7WJobCIj+hPOGJZqVg0oLQ== X-Google-Smtp-Source: AGHT+IFGl5YfqmwGHjo+DGZ0I/pa9ZuB30gwX2CQEq7ObFiuNcsCrmaVKsayMPJiv3wh5b7HIHfHNQ== X-Received: by 2002:a17:907:ea8:b0:a99:f3ab:c58d with SMTP id a640c23a62f3a-a9de5ce139dmr3074317266b.16.1730640896471; Sun, 03 Nov 2024 05:34:56 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza Subject: [PATCH v4 11/26] hw/i2c/mpc_i2c: Convert DPRINTF to trace events for register access Date: Sun, 3 Nov 2024 14:33:57 +0100 Message-ID: <20241103133412.73536-12-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=shentey@gmail.com; helo=mail-ej1-x62e.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641033350116600 Reviewed-by: C=C3=A9dric Le Goater Acked-by: Corey Minyard Signed-off-by: Bernhard Beschow --- hw/i2c/mpc_i2c.c | 9 +++++---- hw/i2c/trace-events | 5 +++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/i2c/mpc_i2c.c b/hw/i2c/mpc_i2c.c index 2467d1a9aa..3d79c15653 100644 --- a/hw/i2c/mpc_i2c.c +++ b/hw/i2c/mpc_i2c.c @@ -24,6 +24,7 @@ #include "hw/sysbus.h" #include "migration/vmstate.h" #include "qom/object.h" +#include "trace.h" =20 /* #define DEBUG_I2C */ =20 @@ -224,8 +225,8 @@ static uint64_t mpc_i2c_read(void *opaque, hwaddr addr,= unsigned size) break; } =20 - DPRINTF("%s: addr " HWADDR_FMT_plx " %02" PRIx32 "\n", __func__, - addr, value); + trace_mpc_i2c_read(addr, value); + return (uint64_t)value; } =20 @@ -234,8 +235,8 @@ static void mpc_i2c_write(void *opaque, hwaddr addr, { MPCI2CState *s =3D opaque; =20 - DPRINTF("%s: addr " HWADDR_FMT_plx " val %08" PRIx64 "\n", __func__, - addr, value); + trace_mpc_i2c_write(addr, value); + switch (addr) { case MPC_I2C_ADR: s->adr =3D value & CADR_MASK; diff --git a/hw/i2c/trace-events b/hw/i2c/trace-events index 6900e06eda..f708a7ace1 100644 --- a/hw/i2c/trace-events +++ b/hw/i2c/trace-events @@ -35,6 +35,11 @@ aspeed_i2c_bus_write(uint32_t busid, uint64_t offset, un= signed size, uint64_t va aspeed_i2c_bus_send(const char *mode, int i, int count, uint8_t byte) "%s = send %d/%d 0x%02x" aspeed_i2c_bus_recv(const char *mode, int i, int count, uint8_t byte) "%s = recv %d/%d 0x%02x" =20 +# mpc_i2c.c + +mpc_i2c_read(uint64_t addr, uint32_t value) "[0x%" PRIx64 "] -> 0x%02" PRI= x32 +mpc_i2c_write(uint64_t addr, uint32_t value) "[0x%" PRIx64 "] <- 0x%02" PR= Ix32 + # npcm7xx_smbus.c =20 npcm7xx_smbus_read(const char *id, uint64_t offset, uint64_t value, unsign= ed size) "%s offset: 0x%04" PRIx64 " value: 0x%02" PRIx64 " size: %u" --=20 2.47.0 From nobody Sat Nov 23 20:42:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641105; cv=none; d=zohomail.com; s=zohoarc; b=afvNmTW7wx01Lqqmahetjzrns8HRFWrusjg6w3UY6TkGlvu/1HJfojZsQQyt5YrV191/3DHdpFTMPv4AbgI3ntwYU61idMdviegGw2neolm68LPbSrH8BUXIClYonkqgvubxVKuk7J+yXSE8uEcovEq82vFxU1AEZVqyg2BK5Jo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641105; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ewKz4XWNmQIqUkyxTbXCUQmadauWdqAWF9aPgS8rmA8=; b=F3M112aWwTFjx+TEAHS1ZuCn8ZrOJf3+MIwPGiA8Y+a2glynlkhAQJDDASVbaFV3TlrHpLW9l6hZ2QuL72SAmSSSAH+2qeJmu9llUfcGWU76wWAfTf2slMYfkxq0LTxhA1m2d6PVxi7RIcZ7po6xifO3UHPrci4aS0CMCTe8Uh0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17306411057521008.3572605543873; Sun, 3 Nov 2024 05:38:25 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7al4-0006Ur-Un; Sun, 03 Nov 2024 08:35:10 -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 1t7akx-0006GM-16; Sun, 03 Nov 2024 08:35:03 -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 1t7akv-0001H2-Gk; Sun, 03 Nov 2024 08:35:02 -0500 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a9aa8895facso590133666b.2; Sun, 03 Nov 2024 05:34:59 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.34.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:34:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640898; x=1731245698; 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=ewKz4XWNmQIqUkyxTbXCUQmadauWdqAWF9aPgS8rmA8=; b=YmjqKjDjVYZ2nof3T68N+GUulIKE5u9JVbyO7lQ8Ba3BY7AbfJejjezgMyiCA/568H PyWeGxx45SIYizKbLoSeonMYx+zGIbgy01yYo5yuv7OMowHyedPYMBHnBwdOh+ZD3/V5 EfKeQ1eBWqnnKftpW9xfK+sQtTXelrvqxqKr0z3+9yioO880TfgeEMpfsgbhPmH89/eH Zh8FxTeWCx2NszI9O6cKm22AMMEurdE4SLH+jraQg63GxePo9w3Kk1Jj1aJLyE86p3KT 1RH1N4eWd41b+2r+9KMDD2XJ7h1MtVvN7b8TnzcHEmv/VcMbFzBU6K9PfwIrnChD/vUg YQrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640898; x=1731245698; 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=ewKz4XWNmQIqUkyxTbXCUQmadauWdqAWF9aPgS8rmA8=; b=kF9YDQ47hE0Kn2DQ5UQRtyfMRScbpf3BQCg6TVYLUs1zDWez6280y/LwgTZP3387FR g+T8sa6ddCqkBvPqTsqbeeIdO7UEfmq0fY5EFa1LK5ibUiZYo5f6Kfft6ND8topky5D2 vQbHYvFh2N9fF7e1KT4PQDqNyj8QNwjkqUjYkW26J0PM9cjkMNWbsM1W4azyVXIWJPDj SLJkiABXaqIo6QtTH+p+7EoSoi0yTaViA4GOAyCahK2Y8xPeXmVyXwcqOdVi1XdTMYQC t35lX+Lml6eDAOepzs6u02XK6JV9+bg2v1kwPIWmmN5310gK3BVKLg51m0Xml3VoJmYs vrnA== X-Forwarded-Encrypted: i=1; AJvYcCWwCR/WSg0hm/Yoissi0EYJEeuZWAq9mq9DP5Qia0wQNJEYYsmTdssHjQFu/ni1VUGsEbtsQSF/bLg=@nongnu.org, AJvYcCXTLU3Cm070atJ+6q+B/HVcC0XbQC39lWBkehqhXm6/vrJqLfZnyxpRqKlA36dPOV3xdbavRd/F6IDk@nongnu.org X-Gm-Message-State: AOJu0YwL60C+nzJJVaTh8hDkWGNoZYx13tAUCDKVcroqDWWUmu6Vb65i IIJsGSUMpY3XHm0SpDcXcJuj+fl8cEYZCdt5ib/FAyhCeP3YfDnDWrS51w== X-Google-Smtp-Source: AGHT+IHBZYbIlmSk/W+Ev6sJI8xKi/KLvDdhEKIfo4tDQ9a1dh6S5fFew5CHRITwGbgXcfA/2ht3jw== X-Received: by 2002:a17:906:730f:b0:a9a:1565:1051 with SMTP id a640c23a62f3a-a9de5d6e1fdmr2942272466b.10.1730640898202; Sun, 03 Nov 2024 05:34:58 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza Subject: [PATCH v4 12/26] hw/i2c/mpc_i2c: Prefer DEFINE_TYPES() macro Date: Sun, 3 Nov 2024 14:33:58 +0100 Message-ID: <20241103133412.73536-13-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=shentey@gmail.com; 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641107757116600 Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Bernhard Beschow Acked-by: Corey Minyard --- hw/i2c/mpc_i2c.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/hw/i2c/mpc_i2c.c b/hw/i2c/mpc_i2c.c index 3d79c15653..913d044ac1 100644 --- a/hw/i2c/mpc_i2c.c +++ b/hw/i2c/mpc_i2c.c @@ -20,7 +20,6 @@ #include "qemu/osdep.h" #include "hw/i2c/i2c.h" #include "hw/irq.h" -#include "qemu/module.h" #include "hw/sysbus.h" #include "migration/vmstate.h" #include "qom/object.h" @@ -345,16 +344,13 @@ static void mpc_i2c_class_init(ObjectClass *klass, vo= id *data) dc->desc =3D "MPC I2C Controller"; } =20 -static const TypeInfo mpc_i2c_type_info =3D { - .name =3D TYPE_MPC_I2C, - .parent =3D TYPE_SYS_BUS_DEVICE, - .instance_size =3D sizeof(MPCI2CState), - .class_init =3D mpc_i2c_class_init, +static const TypeInfo mpc_i2c_types[] =3D { + { + .name =3D TYPE_MPC_I2C, + .parent =3D TYPE_SYS_BUS_DEVICE, + .instance_size =3D sizeof(MPCI2CState), + .class_init =3D mpc_i2c_class_init, + }, }; =20 -static void mpc_i2c_register_types(void) -{ - type_register_static(&mpc_i2c_type_info); -} - -type_init(mpc_i2c_register_types) +DEFINE_TYPES(mpc_i2c_types) --=20 2.47.0 From nobody Sat Nov 23 20:42:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641356; cv=none; d=zohomail.com; s=zohoarc; b=RbMYOoaFAaHoMI3t0M4jj7D86Bu6qm2MMPSwQeuVI7+QvwEEcYnHwymGb5gOlYiL7kHxHflMSGhzDCgtoRLDZXXBZfzNFh2NfqzPUJs9ZtWYGh97cHzyIuwNHwaZVDh8zfJu00u7ogMQu3p8R24AnlqoN5IPxH6p57avfTvTLcI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641356; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ER63OFaSbqJru3HFylC612MYJYy6isDGIUx/mkHzX+E=; b=XM5gR1lCuDL+AfnWJVTdMZn0SMF75KTOojWIWjTbBUjiChQk/1Z5o2qtf0wDyUGnHQ7zCu3e8jOFMOg5cDOxT0lzvkq6EmJqrIq5J/3mfyBjteQUexEm0PkgtIbeuQTp4OmNccQ6MSvjx4071e3D8NiOk1DJZM5av515CsN/P0I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730641356246848.8278305449018; Sun, 3 Nov 2024 05:42:36 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7al5-0006W5-Qa; Sun, 03 Nov 2024 08:35:11 -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 1t7aky-0006I8-0U; Sun, 03 Nov 2024 08:35:04 -0500 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7akw-0001Hh-HF; Sun, 03 Nov 2024 08:35:03 -0500 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a9a2209bd7fso590720566b.2; Sun, 03 Nov 2024 05:35:01 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.34.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:34:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640900; x=1731245700; 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=ER63OFaSbqJru3HFylC612MYJYy6isDGIUx/mkHzX+E=; b=Z5jikzpC9DT26OF1Lr3zmTorrb3IaCt+a/H7h2+xykrmRCM49rYQ6cX6z+AKcHgTd3 DVM4TTZD7kZYFhmYKWJFzlT+njz4ZJfUa8bz2rrbB7+tqvHeXsrQc0vehXUjdt3Tspn7 4y8zJsLp0q+nlA6jBuovsASjmb3bFHy41Fb1B0nmYDuIphOuDUnRs0Pkyb3NHc1DO4NJ 0Hz5A353SB+z3MIY6MX8Qd+Q4ykec9LNKZd3L0GVFhoGeb4x/J36DOOITANckN+8XpAS TkV85RFzbOSQwxMyQDYc9RPtje/kpG5hUT4UDhboxW4WyZCs+O2GAJIJ86uxkwS/qjoq jKEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640900; x=1731245700; 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=ER63OFaSbqJru3HFylC612MYJYy6isDGIUx/mkHzX+E=; b=NzX+nJ3dNNAajp8n7wdQZjxUmNjUcaUhEBit+41u2HUpJDaQEMBlQ4+7aE2fv3H7pC UWbkfu962fIKqCR26nETkCQ2jmDKL2d7oe8P/0SZkPuSH+AarZ7RCDosyDZZ6vjbFwBz 4T4Poglsop/zLHdTSHuoA0LEDap8QspBvpf38L10NkxmbkTogNPj364lhtGC/k3vJg6x Y9EUkIhGDN/sxSStlniZo5rPoRtI6uN4rwBH0KW5ygvpVHSex1vJM3YPtf2w/k++sRSJ lRFKOtYTpZ3rPBki2wzBx1PE7Zud/Td3emKyCYnyyBxqZfWJ0qeyHm7aKjWqA48kDvJd WU6g== X-Forwarded-Encrypted: i=1; AJvYcCUo41KRSs6LqvmHT/qOH5As8rIu8tVC6mb0GBQToa7D0bzqR8pnD9sila8uP3nD8L88mfPvsPAwL+kt@nongnu.org, AJvYcCUyTRyimiocxIxz8Q2x6XB097ExE1bv/JJukwDP/9fKozPNoFdc8NQAVWhvNInxw/3T+M69xQw4/dM=@nongnu.org X-Gm-Message-State: AOJu0YyrVFBi7bsKEUDXgyn7J3qGyKlBlcHG3UDRR0aVjWELRqGtF5+P sDibsGIOQ5aM/K15yiFOYvsX913fpIz8D/9nzqpy3iN6Y5Rw+s5fypdiUQ== X-Google-Smtp-Source: AGHT+IG+AeFB/YT9Y7oMfdxq0o20C3QD+REAbj1Km5aeSINDXdqdJX5piKSzPElCQf5E3xMywqVpBA== X-Received: by 2002:a17:906:6a15:b0:a9a:a891:b43e with SMTP id a640c23a62f3a-a9de616dfeamr3071310366b.50.1730640899523; Sun, 03 Nov 2024 05:34:59 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza , BALATON Zoltan Subject: [PATCH v4 13/26] hw/pci-host/ppce500: Reuse TYPE_PPC_E500_PCI_BRIDGE define Date: Sun, 3 Nov 2024 14:33:59 +0100 Message-ID: <20241103133412.73536-14-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=shentey@gmail.com; helo=mail-ej1-x631.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641356688116600 Content-Type: text/plain; charset="utf-8" Prefer a macro rather than a string literal when instantiaging device model= s. Reviewed-by: BALATON Zoltan Signed-off-by: Bernhard Beschow --- hw/pci-host/ppce500.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c index 97e5d47cec..d7ff2ba778 100644 --- a/hw/pci-host/ppce500.c +++ b/hw/pci-host/ppce500.c @@ -475,7 +475,7 @@ static void e500_pcihost_realize(DeviceState *dev, Erro= r **errp) address_space_init(&s->bm_as, &s->bm, "pci-bm"); pci_setup_iommu(b, &ppce500_iommu_ops, s); =20 - pci_create_simple(b, 0, "e500-host-bridge"); + pci_create_simple(b, 0, TYPE_PPC_E500_PCI_BRIDGE); =20 memory_region_init(&s->container, OBJECT(h), "pci-container", PCIE500_= ALL_SIZE); memory_region_init_io(&h->conf_mem, OBJECT(h), &pci_host_conf_be_ops, = h, --=20 2.47.0 From nobody Sat Nov 23 20:42:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641351; cv=none; d=zohomail.com; s=zohoarc; b=ghWNd5rAmA+i16qVc1a7EVh8bS6iEq3XrhmCLMc3HQAVef9SDb2SFVX6skqVB4h/0HGhqevZl2AbdXms/kpzQ2N77kmDGEibH71P6loSwICIFUydyCLU+cY8r4ez60GvC240wK3y8zLSxQWddnwMMgVcLehBf/i2v+Iato/nVGc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641351; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=cFBJ0zSZIctgQGXUV1/Dx5zv1vWYaeefYYPzCtjTK4k=; b=V0pyFOd402iVWiEGiRsnNKNmzB5rYeWR4IxjCYZ5tg/RHaV6cQwNDhA1iuZoUnnYj3MliegxPWrf28ae4eyGsyJiIEnXp44Nt2UbVbq8nf7pybta52Ff9FY3iFzG7HYJAHkLaQ858YTuB6EF5n2txPSBGMKx6w+mU0bHGbQf4+Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730641351824963.1556796936234; Sun, 3 Nov 2024 05:42:31 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7al8-0006Yw-GU; Sun, 03 Nov 2024 08:35: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 1t7al1-0006OZ-I1; Sun, 03 Nov 2024 08:35:07 -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 1t7akz-0001Oo-86; Sun, 03 Nov 2024 08:35:07 -0500 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a7aa086b077so392521466b.0; Sun, 03 Nov 2024 05:35:04 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.34.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:35:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640903; x=1731245703; 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=cFBJ0zSZIctgQGXUV1/Dx5zv1vWYaeefYYPzCtjTK4k=; b=O6wYNxwy8VD5DPeJeIS74b3j+JXMI0JQztfge7aQzdQnu4qq/PSZrKffsKpT2YQRQx vecJVrgJBQiPtSgfpOltt0BfEn7JUbxfwjZSAcRXFMBH1Qo8A8608LaCgm3rC549gB4u zgYklTdS9dlVfkrGl5XqFrcC48AC4JererqSpr7tjZme3eKKdzRQLwgVXrsj1L73Ly88 KPxnBVM2l7a51iXjiukN/qw2OMVmgNHlOGzhgjbKdcLWj1MdzttDedF/0rZy68ZLqP4q Bklq8uQa+Gu4UpdV4l+iD6Ey4GnsjkQG9U1/W3pYhShcPOgM21wmce8x0DVleS/ugZ+l k4nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640903; x=1731245703; 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=cFBJ0zSZIctgQGXUV1/Dx5zv1vWYaeefYYPzCtjTK4k=; b=EtEcRFQ9wNti8z623WSBB0ncG6gBSt+vh9gY65vEsR+CQXnLURXrrRwP5j9cuvstjB IAs8DaUWD0zT0g+/EdVvyuhIznywyEnhNU+2J73s6yPax5cinix9a4TP1dKAYUxh7iv4 5bev1isr0WxEtzizmPd6Y5/8AUGKdeCmoIWLwoMb3XvnTyxA9KWmEECdsykB7KE+nrTT W7F84DiVFvjXqe7EoP3L24Wi4MTG/PT3fgB22x/gfKRhPyjceURcaaT6glGj2qF3PhPs GhJHt4UEHGQowG1NQzKgDBCysKqnXE3GBPRdPksLw4DXW9kiKqVV9DpumIk3qKvDJzoJ UvKg== X-Forwarded-Encrypted: i=1; AJvYcCVPKtYwURpRlSgYnrZA1Ev/bE+5gZl8PEf9VVrdYdoESlrIAEOxtYFySivIRK5bJOnlzZyv6SbHS5Y=@nongnu.org, AJvYcCWHmwYwcxBkUg1uUGzX9gekTEjLCqhEw5s9zzwxzXxyxsaWgqP7ClO+DbibecLG89q1GOL63spY1dSf@nongnu.org X-Gm-Message-State: AOJu0Yw7EViXtxrHAxru4C/ZmrBul666uOtq1dBcxnkI8oOQ1DG22Rxw /sdFY66muCU1oTCwnf9XnwH9hXlvDVAlNKYSR//qJkUxpINbkX+LXHDGfQ== X-Google-Smtp-Source: AGHT+IFXj4j0Y10H5LIqoAwEtBBXj8psWXexpBTdoBmJgcDSvBL0d2TxaOMfGXPblOzLFo/UvK0uug== X-Received: by 2002:a17:907:6e8a:b0:a99:5021:bcf0 with SMTP id a640c23a62f3a-a9e3a61eaa2mr1641429066b.34.1730640900969; Sun, 03 Nov 2024 05:35:00 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza Subject: [PATCH v4 14/26] hw/pci-host/ppce500: Prefer DEFINE_TYPES() macro Date: Sun, 3 Nov 2024 14:34:00 +0100 Message-ID: <20241103133412.73536-15-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=shentey@gmail.com; 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641352646116600 Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Bernhard Beschow --- hw/pci-host/ppce500.c | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c index d7ff2ba778..2dded696aa 100644 --- a/hw/pci-host/ppce500.c +++ b/hw/pci-host/ppce500.c @@ -21,7 +21,6 @@ #include "hw/pci/pci_device.h" #include "hw/pci/pci_host.h" #include "qemu/bswap.h" -#include "qemu/module.h" #include "hw/pci-host/ppce500.h" #include "qom/object.h" =20 @@ -508,17 +507,6 @@ static void e500_host_bridge_class_init(ObjectClass *k= lass, void *data) dc->user_creatable =3D false; } =20 -static const TypeInfo e500_host_bridge_info =3D { - .name =3D TYPE_PPC_E500_PCI_BRIDGE, - .parent =3D TYPE_PCI_DEVICE, - .instance_size =3D sizeof(PPCE500PCIBridgeState), - .class_init =3D e500_host_bridge_class_init, - .interfaces =3D (InterfaceInfo[]) { - { INTERFACE_CONVENTIONAL_PCI_DEVICE }, - { }, - }, -}; - static Property pcihost_properties[] =3D { DEFINE_PROP_UINT32("first_slot", PPCE500PCIState, first_slot, 0x11), DEFINE_PROP_UINT32("first_pin_irq", PPCE500PCIState, first_pin_irq, 0x= 1), @@ -535,17 +523,23 @@ static void e500_pcihost_class_init(ObjectClass *klas= s, void *data) dc->vmsd =3D &vmstate_ppce500_pci; } =20 -static const TypeInfo e500_pcihost_info =3D { - .name =3D TYPE_PPC_E500_PCI_HOST_BRIDGE, - .parent =3D TYPE_PCI_HOST_BRIDGE, - .instance_size =3D sizeof(PPCE500PCIState), - .class_init =3D e500_pcihost_class_init, +static const TypeInfo e500_pci_types[] =3D { + { + .name =3D TYPE_PPC_E500_PCI_BRIDGE, + .parent =3D TYPE_PCI_DEVICE, + .instance_size =3D sizeof(PPCE500PCIBridgeState), + .class_init =3D e500_host_bridge_class_init, + .interfaces =3D (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { }, + }, + }, + { + .name =3D TYPE_PPC_E500_PCI_HOST_BRIDGE, + .parent =3D TYPE_PCI_HOST_BRIDGE, + .instance_size =3D sizeof(PPCE500PCIState), + .class_init =3D e500_pcihost_class_init, + }, }; =20 -static void e500_pci_register_types(void) -{ - type_register_static(&e500_pcihost_info); - type_register_static(&e500_host_bridge_info); -} - -type_init(e500_pci_register_types) +DEFINE_TYPES(e500_pci_types) --=20 2.47.0 From nobody Sat Nov 23 20:42:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641335; cv=none; d=zohomail.com; s=zohoarc; b=mxXxapDIa87tt5OygPpNRioVTpJiSuhCG3LquaJohoxVsRPSaL6cTVitvoeBh6W4QLFPkqVpXBMTN7iGmS0QkDw7a/o0RULvPJ5kmGBXWwK0pkRsmac6nI0sWS8AqjhjV0URjHXOZEkULo1GyMQud0lMhExRz7bZR2f/XDTVORY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641335; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Q+9sPr/c1Q3i7IBMZfbnvSvuFCvri5bfm/mYMzMrjI0=; b=WGE/R4hQHG9uNsQ3cbDnv46JJn6eMl2djlTtB3qe5jZ6jw4v0rHcibCu1OdZt2239So5P9rPaVuhjh8iMnttycaG5EJycid3FrPt5JVPq4NgaqlWCM6PyiD10Yl6zqxOlg+WpgKEHnejZ4tsqj2W9sdw7aGZUgZ2SdVWzlRZsWk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730641335681671.9636975040014; Sun, 3 Nov 2024 05:42:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7al6-0006XY-Kn; Sun, 03 Nov 2024 08:35:12 -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 1t7al0-0006Na-Mv; Sun, 03 Nov 2024 08:35:06 -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 1t7akz-0001M8-6r; Sun, 03 Nov 2024 08:35:06 -0500 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a9a0c40849cso584862466b.3; Sun, 03 Nov 2024 05:35:04 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.35.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:35:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640902; x=1731245702; 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=Q+9sPr/c1Q3i7IBMZfbnvSvuFCvri5bfm/mYMzMrjI0=; b=RZHtWbkDgMOSgUmIFbjUF75gczBwAza3dwK6yqDcipel1PKRjmz+rqgfsB/kHwg4lE 9YNqSyxXKQa4XLJGMTgDHeSDBWCAUqiS8AWpXIfk5w+SPZMSCrTBKCAuWHnpBLmxueuH 0A79y6ZqvNEr5BKxqcxOdbLRf6nTEChZspLXIYyupsRzAaQSmjCNuqLIgdYKj/o1XXAS 7bDbcNVZX/wtbVqqEbsbrf5qCX3KPoUtEpBk72kz6WlUkIlmrmItooqf/fDQlXrT2UaV lEjiFQZRgmgqMObCmUyzffjlIx+hNlOw5WMuuIdJksUD9Jey4yAzfvNjmUbeQNTYdCij 8Myg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640902; x=1731245702; 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=Q+9sPr/c1Q3i7IBMZfbnvSvuFCvri5bfm/mYMzMrjI0=; b=d3XHnH6ALlzVT8ARbacSgzo48qDNxbXADY2qRIbgVDiXHLoEkvsKkaoBV0Qrf/vI3y +4Opkmd8MEUXpEnO8jgYxGE9ZM8g2xKugXZTH/cz8swqs6+OClOrPi31qd5jS8LDpHzq RcxaXRqzvTUnlBu4g1Zrzc8M3gfQllMzhPNdsRqSvUtUFyurwY2TPgceZ4JCXaKLDTJb 1ZTzyQwAbdXmebI9AVFdbluzMXexK3O38U2Deyj3qhH1170qjovVdfCvRbmk8W3XdiAU HwFFH98S0AFWZhho/nnfUkd/ZfIOafL6kBJCH4s36OQBy4QDgG2ve8svlFGa1B9U1Xtd reqg== X-Forwarded-Encrypted: i=1; AJvYcCUnaCR2wbw7p5oWhecm2yiatwH5YMDFMbkfFyXGh9LU9betdwtvbkgxxuXB47pSQgWyrL5wJVMa1Jj7@nongnu.org, AJvYcCVlolzk11LdVTrTj5x39+jr8DIEMUIlV45RNbAbQP00FWVtHOO2KrbVHNgi2Ol9wkHvrU4HnJIlBKs=@nongnu.org X-Gm-Message-State: AOJu0Yz1lnBadO4vfQ5WXV5CJ4Zg4j+llWZHqcwEt18AQkYFxsCG5Tqe b3W43kJ37rlw8k8+K+Lt+A2jPsee6x7JAK/6WAkt+fGe3y4j3g01nmxu0g== X-Google-Smtp-Source: AGHT+IHT9SaXazslt+65BMyp5+OO28E4LbbVWxvSN9SsnBSN0uy0dollThrUA4xZAQXb6fCbgn8B/w== X-Received: by 2002:a17:907:6d0a:b0:a9a:d23:f8ca with SMTP id a640c23a62f3a-a9e3a57530fmr1299853366b.13.1730640902415; Sun, 03 Nov 2024 05:35:02 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza , Akihiko Odaki Subject: [PATCH v4 15/26] hw/net/fsl_etsec/miim: Reuse MII constants Date: Sun, 3 Nov 2024 14:34:01 +0100 Message-ID: <20241103133412.73536-16-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=shentey@gmail.com; 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641336623116600 Content-Type: text/plain; charset="utf-8" Instead of defining redundant constants and using magic numbers reuse the existing MII constants. Signed-off-by: Bernhard Beschow cc: Akihiko Odaki Reviewed-by: Akihiko Odaki --- hw/net/fsl_etsec/miim.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/hw/net/fsl_etsec/miim.c b/hw/net/fsl_etsec/miim.c index b48d2cb57b..4e9169907a 100644 --- a/hw/net/fsl_etsec/miim.c +++ b/hw/net/fsl_etsec/miim.c @@ -29,13 +29,6 @@ =20 /* #define DEBUG_MIIM */ =20 -#define MIIM_CONTROL 0 -#define MIIM_STATUS 1 -#define MIIM_PHY_ID_1 2 -#define MIIM_PHY_ID_2 3 -#define MIIM_T2_STATUS 10 -#define MIIM_EXT_STATUS 15 - static void miim_read_cycle(eTSEC *etsec) { uint8_t phy; @@ -47,14 +40,14 @@ static void miim_read_cycle(eTSEC *etsec) addr =3D etsec->regs[MIIMADD].value & 0x1F; =20 switch (addr) { - case MIIM_CONTROL: + case MII_BMCR: value =3D etsec->phy_control; break; - case MIIM_STATUS: + case MII_BMSR: value =3D etsec->phy_status; break; - case MIIM_T2_STATUS: - value =3D 0x1800; /* Local and remote receivers OK */ + case MII_STAT1000: + value =3D MII_STAT1000_LOK | MII_STAT1000_ROK; break; default: value =3D 0x0; @@ -84,8 +77,8 @@ static void miim_write_cycle(eTSEC *etsec) #endif =20 switch (addr) { - case MIIM_CONTROL: - etsec->phy_control =3D value & ~(0x8100); + case MII_BMCR: + etsec->phy_control =3D value & ~(MII_BMCR_RESET | MII_BMCR_FD); break; default: break; --=20 2.47.0 From nobody Sat Nov 23 20:42:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641166; cv=none; d=zohomail.com; s=zohoarc; b=AtioXHnyFWV00PH8gFNZML9UBU6NthbQzQyfh9ct4RB0XMNdEjECjGDK0xGBhNx3p/Efg2TCsWncIr5e0kahDo8tkbCMOPGObwfWhYUgQmH/WhQKaqQ80c+rooYIFp+ZVxqVS2sZVDKd7tvaS3yZO5ArDWqCAN0F2fqhhNMZ6Lg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641166; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=oXSWlQsS4wnwDh//bO88rrwGjYCS2NZpoLPVmLCuaSY=; b=MYSDbDCmWPTVZ3U9rHT7GvC6UvXJkErfWwoSld86J47nFVSjEXWn6aU228GEmWMTboy/UkT9p7Mpu8LC1wNDDHRe+hmuuz56sHRNlza5OFYrnmfRVmMh7Lx6LsbmCukWJNlr7sbdSbEVkIQA+ds3BoSh/6oM2llAeXjyM+iQWPk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730641166153674.9751226855425; Sun, 3 Nov 2024 05:39:26 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7al4-0006TW-AH; Sun, 03 Nov 2024 08:35:10 -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 1t7al2-0006QV-Aj; Sun, 03 Nov 2024 08:35:08 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7al0-0001To-Ld; Sun, 03 Nov 2024 08:35:08 -0500 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a9a1b71d7ffso588614366b.1; Sun, 03 Nov 2024 05:35:05 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.35.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:35:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640904; x=1731245704; 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=oXSWlQsS4wnwDh//bO88rrwGjYCS2NZpoLPVmLCuaSY=; b=lQNXVNwjSZETQXgWfD6/AQ6BkKF6UfMnNwqFiSYy9KAfnMa1y6pL7n5F7VPb4W936/ +9nTRDBAbL1CQXsrI/CrdnVoc40us/o4hXcedKPJThvn8kK7vz0kjxVG+r5ZifpTHL5a aFgWrAuBGorjT/e+u1M07ejonOfJ1eblwbGjTc13fL1cdXXAaT7dow6/3fd5syQjtOVl n2SrlaeDtIHrUUjE4b6/Udd58k8hucEUf87/jm+VI82hypDgko/hDZhoanmHKIp3Vo13 94ByVwTp+pQ49t67YglWS6iLnwj+j3wp0mdFbL6jTDF5AEPS5b/wvAhmJwW7l49lNWEa rIiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640904; x=1731245704; 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=oXSWlQsS4wnwDh//bO88rrwGjYCS2NZpoLPVmLCuaSY=; b=CBnHPh2QkI5KxLgR3N4OK/k0/0Hly0qFYfvHlyyVFGLErhCNg9iy4YGEy1ET/2bq5+ TpOWyNnL4Q4jj8MxJI2S5u+/iOSIx/5VewN0IEyJF6Poer2bfwNapE2oWhId6IgxwBTb 6ghgWsnw4E6YhTOi8OPC7lA3RKsIBWrm2fqePHdEMBAZPUeIuL5takpKhryZWIlZGGqr rDYVFd1qqGjaZc1jPXEEwhtfXmhKohK3VSkyzBlSPx/1PecmY9hBiN3C8mH/dM0Pxryx jwBIjtmmqw/njFTL9Nkko/Eecg9UrNVWv2ooByOxNorJTn60un68n1DPUxg90oigBT23 uSsQ== X-Forwarded-Encrypted: i=1; AJvYcCUkRY11kQhCOVk/M7IXT4qdmypRfAP7gCG2Yhm5CUD0aFt2x+lfN0FrYYj9p4KQWHl3hth6kl2Ik1qd@nongnu.org, AJvYcCWzYI2kgQHHUdxWkAcF7YfDNbDkIjf+83+INXGA/rs1n4iqHNeUeRfN1GwduUdGbyQDmuilizymoy0=@nongnu.org X-Gm-Message-State: AOJu0YyxEjl+ytIWxI/VNtyobFdZqJmx744sOCgFQZ5OoaIWmRUNJAf4 Pdb07KEVlKSWL8Pz7vql1RoNSH5vThFqvGtT3ZzlSk5KORUXyjwifYJnaA== X-Google-Smtp-Source: AGHT+IEgdICE+E1VWTYNLUdtxfjCc9msz+ItmZKTCilM9azyMl8KI2OsQlG2ahUGyZWhSRn8WJ3XXw== X-Received: by 2002:a17:907:d18:b0:a99:f8a2:cd8f with SMTP id a640c23a62f3a-a9e3a7f434fmr1634973266b.64.1730640903872; Sun, 03 Nov 2024 05:35:03 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza Subject: [PATCH v4 16/26] hw/net/fsl_etsec/etsec: Prefer DEFINE_TYPES() macro Date: Sun, 3 Nov 2024 14:34:02 +0100 Message-ID: <20241103133412.73536-17-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=shentey@gmail.com; helo=mail-ej1-x632.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641167870116600 Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Bernhard Beschow --- hw/net/fsl_etsec/etsec.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/hw/net/fsl_etsec/etsec.c b/hw/net/fsl_etsec/etsec.c index 3fdd16ef2e..d8076e7be4 100644 --- a/hw/net/fsl_etsec/etsec.c +++ b/hw/net/fsl_etsec/etsec.c @@ -36,7 +36,6 @@ #include "registers.h" #include "qapi/error.h" #include "qemu/log.h" -#include "qemu/module.h" =20 /* #define HEX_DUMP */ /* #define DEBUG_REGISTER */ @@ -431,17 +430,14 @@ static void etsec_class_init(ObjectClass *klass, void= *data) dc->user_creatable =3D true; } =20 -static const TypeInfo etsec_info =3D { - .name =3D TYPE_ETSEC_COMMON, - .parent =3D TYPE_SYS_BUS_DEVICE, - .instance_size =3D sizeof(eTSEC), - .class_init =3D etsec_class_init, - .instance_init =3D etsec_instance_init, +static const TypeInfo etsec_types[] =3D { + { + .name =3D TYPE_ETSEC_COMMON, + .parent =3D TYPE_SYS_BUS_DEVICE, + .instance_size =3D sizeof(eTSEC), + .class_init =3D etsec_class_init, + .instance_init =3D etsec_instance_init, + }, }; =20 -static void etsec_register_types(void) -{ - type_register_static(&etsec_info); -} - -type_init(etsec_register_types) +DEFINE_TYPES(etsec_types) --=20 2.47.0 From nobody Sat Nov 23 20:42:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730640946; cv=none; d=zohomail.com; s=zohoarc; b=kwSJu6/QwLQ9l+O2kZZZX99yGjcCkFfNgcG6Q4KkY7CO3ow9mOc1PItrKnBJBrJBhjQ/iWWYC+U7IFHor/M/NBOJoz1EaaJmG8brWb324EMhUKsIEjY81sZ7e2I3lUD/otDg6o5YypqcxT8ULQgAQm18okm9yXXG4HJqPQGX6To= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730640946; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8PJZHCBpLf+Ed1Y0PojeiRWpqZynqPn/D87ewATJ+qo=; b=WHh+F/R6OyXezB8ynDAQBv8A6j61tVQtZUjhkrQ0yOY9cdqiQf5Mu4doP9Rqp/FCZhDZBoEHhrbp1EExtsQOb/8YD+hJWMRjr1HkfdQJ6f/RDMn2bllr+/Rn+koCgA538IfCZYpiygi9q6nTzXTRugxOjxn/Q+CRdouqSIkZpnc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730640946342849.7107582487644; Sun, 3 Nov 2024 05:35:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7al9-0006ZU-3t; Sun, 03 Nov 2024 08:35:15 -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 1t7al3-0006T9-O2; Sun, 03 Nov 2024 08:35:10 -0500 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7al2-0001UC-8F; Sun, 03 Nov 2024 08:35:09 -0500 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a9e8522445dso192814466b.1; Sun, 03 Nov 2024 05:35:07 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.35.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:35:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640906; x=1731245706; 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=8PJZHCBpLf+Ed1Y0PojeiRWpqZynqPn/D87ewATJ+qo=; b=RnyLBvPmxX+pdSP8zVeG3MJzVduF+W6eOqNn9dhd5fs4GBKS3M3W8aeeUxppeHXrND haxNgrfCSn5lhD4dv/DUgcDs0SpyWcdIYRlmJRc0UXBvY1ghGI6hOMgxlFExUZM+CPEL 5usTXKoTXKWzJZNo446t+pP5VCPTKmBOIg77Or9O0HGisA/Yz38npX9A8yIChJlp2Vh5 mJDPNkKtBbRZdZCz+A9xD+gS1wJjmsWsv2uH3aQMDpYNrwHol1a3uZDjXVn5pIfEiieI DRaUpV0RUR92TPjLxFZo0ewQO2SIaXLUZgsTW8zqJpSnzI6dqbwbrfkfBv7JVmkNW6tV 7AXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640906; x=1731245706; 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=8PJZHCBpLf+Ed1Y0PojeiRWpqZynqPn/D87ewATJ+qo=; b=QTiq8HynetDDDz5TG67qTgj5GmyFIononfnMoYGgFmVOQd/5xCzEDzFpATgRcZ1IQ8 mN4irgaatUr6rnBp5F2jub1VkfMk/JzuJ5rw9uI2WJTmJPWsDEonN0e2Vvp0i+sZHgPT JFQEk0e3fz6LxIJLjlUXcURcTgWoPlhnJiGtemRfoZVQ9nmLWNd93UAjt9picHJS43M9 twZt8xakCG7LWfHp0Xk833+e2Kk20xLkuxah4CFV0rQqSHzy3yXoZMseaKfqe+zCwzl3 jlpWLPftfPAshdlPUNhUVqheW8buyml/8jv362OI9KHh6a2QpmIatvY0SnASP2aWlUgx vyrg== X-Forwarded-Encrypted: i=1; AJvYcCWLFS7gFsylDR/ubAi5fGLFL5DqApWc+qdUKzmL8sD5Ke+63hce6V31kxxDIlEMHbC3ebmN42zvMhr3@nongnu.org, AJvYcCXKsSs+bcnsIVhX9sNv0qOqt3TAhqsnCPfxPJ42AZkQSduoIWAScTg/lMaiMiO/yVXcaYkK1+UyFLs=@nongnu.org X-Gm-Message-State: AOJu0YwU2arnRFZ57hFTEB8ZoZvht2os22opcmEfPeR11hHiMEc1f5JH AwWsV3lvRagr237NlJAVH4c/Sxan/pb1H7H3VxB6ASe6+lK9j27IgBA0Jw== X-Google-Smtp-Source: AGHT+IGtOLKgCt1GasDdGC2u2sCykJLirj/8W1heSBaSiaAYbStoa7SZh26WnkebgprhCvPOiEFYtw== X-Received: by 2002:a17:907:3f20:b0:a9a:33c:f6e1 with SMTP id a640c23a62f3a-a9e6553c10amr937310766b.5.1730640905543; Sun, 03 Nov 2024 05:35:05 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza Subject: [PATCH v4 17/26] hw/gpio/mpc8xxx: Prefer DEFINE_TYPES() macro Date: Sun, 3 Nov 2024 14:34:03 +0100 Message-ID: <20241103133412.73536-18-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=shentey@gmail.com; helo=mail-ej1-x634.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730640947155116600 Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Bernhard Beschow --- hw/gpio/mpc8xxx.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/hw/gpio/mpc8xxx.c b/hw/gpio/mpc8xxx.c index 63b7a5c881..a3c1d2fbf4 100644 --- a/hw/gpio/mpc8xxx.c +++ b/hw/gpio/mpc8xxx.c @@ -23,7 +23,6 @@ #include "hw/irq.h" #include "hw/sysbus.h" #include "migration/vmstate.h" -#include "qemu/module.h" #include "qom/object.h" =20 #define TYPE_MPC8XXX_GPIO "mpc8xxx_gpio" @@ -208,17 +207,14 @@ static void mpc8xxx_gpio_class_init(ObjectClass *klas= s, void *data) device_class_set_legacy_reset(dc, mpc8xxx_gpio_reset); } =20 -static const TypeInfo mpc8xxx_gpio_info =3D { - .name =3D TYPE_MPC8XXX_GPIO, - .parent =3D TYPE_SYS_BUS_DEVICE, - .instance_size =3D sizeof(MPC8XXXGPIOState), - .instance_init =3D mpc8xxx_gpio_initfn, - .class_init =3D mpc8xxx_gpio_class_init, +static const TypeInfo mpc8xxx_gpio_types[] =3D { + { + .name =3D TYPE_MPC8XXX_GPIO, + .parent =3D TYPE_SYS_BUS_DEVICE, + .instance_size =3D sizeof(MPC8XXXGPIOState), + .instance_init =3D mpc8xxx_gpio_initfn, + .class_init =3D mpc8xxx_gpio_class_init, + }, }; =20 -static void mpc8xxx_gpio_register_types(void) -{ - type_register_static(&mpc8xxx_gpio_info); -} - -type_init(mpc8xxx_gpio_register_types) +DEFINE_TYPES(mpc8xxx_gpio_types) --=20 2.47.0 From nobody Sat Nov 23 20:42:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641401; cv=none; d=zohomail.com; s=zohoarc; b=dQG8AWz85NTS/S5Pdu2ESOu17DSZvIGQw3N7Rck5PAcQHJdflrlt0rrhflj/H3Z/iTNC/9FZJcGRvYHXHlNT0nJpqMFgOI2aQ8Nfz+BIFhQKO6pDIlUDpwplA4GSAi70wGMT6dfeyNpHVdZRobZ8loHz+s5exlcck5D8WBH1XBk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641401; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=3PcD3MeN7oG/a16flPfYAPmHTWpb8xl6Fwk4sXiy6/A=; b=EMxhW7Dnm/Xer5BPMqBnZpyfWzlxNJwlo3quizTO5UnqUMYwoNTMRX/ZBaacX7CP2YdFmC+BXs2504/ln/KYZiLQE/nj5xc2frP5dZQ0P0BV4vL+pX+CWaJt2CCLoH3YZUMnlvgM6yr0/tAYjeVbQpIihASdqVg+lUNd8h+eFJk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730641401100684.453279478365; Sun, 3 Nov 2024 05:43:21 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7al7-0006Xn-0z; Sun, 03 Nov 2024 08:35: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 1t7al5-0006Us-05; Sun, 03 Nov 2024 08:35:11 -0500 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7al3-0001UZ-Au; Sun, 03 Nov 2024 08:35:10 -0500 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a99f3a5a44cso469352266b.3; Sun, 03 Nov 2024 05:35:08 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.35.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:35:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640907; x=1731245707; 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=3PcD3MeN7oG/a16flPfYAPmHTWpb8xl6Fwk4sXiy6/A=; b=eOqXZfAQMaBNU7CljxkHRXN/PR3RLnYHDoxZHOWiafsuoSW1GbIbRSWjpertEmlJ5u 84bEvxiFycNfD8wb009bLGDqSBD+ksZ/7TzDzOiq8TpUErA8NikuNCWr9TVwoDmzZbVG lUTaOYFYfGMVNeWKCbPP6y7VWFflpEzLOFtRvKb7n2xhmczkkLi+1lY4CLsC+0R8CLmH LCHNonm7TF33JSDCEt8kmvoOt/Bae/gByUERnApsna2Y2ODA/LAoAVyXbwwH0ITFQrHa qC9LdQ3z5PHqzV594+l541jStxmjLSRoMwluO7Y3oWw094aKpJRvn27K9+mhKIcgg6RR RReQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640907; x=1731245707; 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=3PcD3MeN7oG/a16flPfYAPmHTWpb8xl6Fwk4sXiy6/A=; b=Ov6HfdJfIt1ssVASNNJ7Hpy195kQ/sTsXgVJJhwkK6bu+64wW18UiEKMUYshVf59PL Eph4MBGVMywU/mVhHiCH9fuetOgsQzk/6J3ZZRPXyZeRZTMXgyitiK5BB3jN2O5V8HME IB90egyaZD+C+UXVWB0y+aWXi90OBuX8FAwca0MZun4ecm0PsLkIqc4oQqPRoeaenbBz GdKANTTT2USaGWvcStsxEf6/2dBxHQI05mWb5Vpzcxr01gRLVmbEyKIanLz0dnSBzeq4 qZTlc1qbyPUZkQ+4phvJuW7MWggHNC8+PiWkpYM3TuODOwd6iCLPr8gt7Wj8hp8UK4BY e4Og== X-Forwarded-Encrypted: i=1; AJvYcCUvrx3pgOaf33mHNaR29naqvr4/2vefCDTiAcTdYbItgL/StiUxq8314EmQu6XRlS5qAzKTZDFIvUs=@nongnu.org, AJvYcCX6H2zSNsD3yLKw4FCYlDrJpmihRW65uylYNRsyNEGpDMO+zdqo0vC3Yxa3+hBxGcYC5g2hRtG1m72q@nongnu.org X-Gm-Message-State: AOJu0YxfAYyepqcWjHrIZQD3CkQ+kw7QZoMD1JMI2oaVpta+WPQGoQLz RyoQq2XsBlqUVJTIul+o4FPUZWu5eEWIY8MsrsbNjvsjR3q2ko13CkzhyQ== X-Google-Smtp-Source: AGHT+IHhEnFrAMNswLgLPjjmt4ftcJL5pxp/zi4FxJ6cPugFHYitTFt8hrglJ4Cvl3dRGVfM/ykosA== X-Received: by 2002:a17:907:9405:b0:a9a:a3a:6c58 with SMTP id a640c23a62f3a-a9de5ed3e2emr2958689466b.22.1730640906800; Sun, 03 Nov 2024 05:35:06 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza Subject: [PATCH v4 18/26] hw/ppc/mpc8544_guts: Prefer DEFINE_TYPES() macro Date: Sun, 3 Nov 2024 14:34:04 +0100 Message-ID: <20241103133412.73536-19-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=shentey@gmail.com; helo=mail-ej1-x631.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641402834116600 Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Bernhard Beschow --- hw/ppc/mpc8544_guts.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/hw/ppc/mpc8544_guts.c b/hw/ppc/mpc8544_guts.c index c02b34ccde..e3c51458e6 100644 --- a/hw/ppc/mpc8544_guts.c +++ b/hw/ppc/mpc8544_guts.c @@ -18,7 +18,6 @@ */ =20 #include "qemu/osdep.h" -#include "qemu/module.h" #include "qemu/log.h" #include "sysemu/runstate.h" #include "cpu.h" @@ -141,16 +140,13 @@ static void mpc8544_guts_initfn(Object *obj) sysbus_init_mmio(d, &s->iomem); } =20 -static const TypeInfo mpc8544_guts_info =3D { - .name =3D TYPE_MPC8544_GUTS, - .parent =3D TYPE_SYS_BUS_DEVICE, - .instance_size =3D sizeof(GutsState), - .instance_init =3D mpc8544_guts_initfn, +static const TypeInfo mpc8544_guts_types[] =3D { + { + .name =3D TYPE_MPC8544_GUTS, + .parent =3D TYPE_SYS_BUS_DEVICE, + .instance_size =3D sizeof(GutsState), + .instance_init =3D mpc8544_guts_initfn, + }, }; =20 -static void mpc8544_guts_register_types(void) -{ - type_register_static(&mpc8544_guts_info); -} - -type_init(mpc8544_guts_register_types) +DEFINE_TYPES(mpc8544_guts_types) --=20 2.47.0 From nobody Sat Nov 23 20:42:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641012; cv=none; d=zohomail.com; s=zohoarc; b=Ij2xztGx5IQOnAg2xDC0iq0h2VvSsnykRcljWbKnkOe+YR2yXG8AWQSVDKzKLIIWLdcYBX/F/3YH3/rDBRkOW4SjdWhEHpM+kp5ubTHrwvTec3ZL2nWFPEXO6+Z9z1P9SlGuAOI5YZS+sdonfb8sdEE14upvOdc9ZUv1ZKOxs5o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641012; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=9EXWyrH8f7oP41/W4xeKAhIRvW+hPSPt58Osc1OjMy8=; b=QEyfEcHmxEgVJ2urFQlfwaFJrY74FscEYVu+r6+dAvGaW3mQrpSsKPQ1PNYk43XrT49J5UP83bmQqXrLZpVDL3bThURDxppJQv5ai6KAtaMQp5AD/VKr1puqFc6YqT3LPA0Yfth3rpYZM9xVJ5mxWdoP+4ftXQxPqUgYwggQ1s8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730641012569917.3117594334007; Sun, 3 Nov 2024 05:36:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7alB-0006c2-3q; Sun, 03 Nov 2024 08:35: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 1t7al8-0006Yp-Bb; Sun, 03 Nov 2024 08:35:14 -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 1t7al6-0001VJ-BA; Sun, 03 Nov 2024 08:35:14 -0500 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a9a0ec0a94fso537705466b.1; Sun, 03 Nov 2024 05:35:11 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.35.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:35:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640910; x=1731245710; 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=9EXWyrH8f7oP41/W4xeKAhIRvW+hPSPt58Osc1OjMy8=; b=cjV38T4Wor8TYsBHs1CnkdRDsq82kQrjIlRRaIRZm3M8mFVFobUUhkM1gOZ5iB+7GH EhSX08M8mzCiroD4k9kPQY62D3CqjIf7LXA02QKquit3iSwQ1V5cXOo6BcKQEX8f5fAp aa86vqKdy3Be7Ev0BaCvdFJtCh7nph25e8U441gdmKqbgeGzgOFaYG+h9daRvMMda7d6 X7EdMzEJOc5aIWsJPp0IOX8nc5YGiqhcGT+Yo+SxjlLEBvStxmrNYEq0WdRSuwZq6lP+ 8/0woP6P7ZEGjx/twTX1nJaSREnL8yXKL4ehvON9nwl6IzpX/sTesQdKD6VRkPWy6SI8 mKdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640910; x=1731245710; 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=9EXWyrH8f7oP41/W4xeKAhIRvW+hPSPt58Osc1OjMy8=; b=Pmfs2Ilzsorm8wGV0Vqn0K3VAdqx8x92pcCGJuYmNfYOpQUJpKV/uXVnBrt394AjH0 QMipGXbTz9WzMftigNgUmSBoU3F4u1SfqEuCrss33HUBnj2oQKv96KQmGoItUX+Eb2OV z8pOQY3oN2O701+D3ga8ll+SIeuvCebvKycRdgkn16icWTuBFlyYGLGXbcJfTaKodFyv loEsvrn3Nc10Z4RWzRSwBYLCITzpEQ4G9EtUqH/RWVca1Sl7Fkw/f08RuLyVWFLof8g+ Loc+wK53gDxoNorKaFHD9T77bpfMAVu8AZaiuhHR1bRklMq/H3l3QxCB+yhnEGMKTZde j01w== X-Forwarded-Encrypted: i=1; AJvYcCUbi5H7uP6wRSCV4Oyvu+yo+jifxHWm6chTjcImiUl/MUN8QxjkhzGEOQSxp1MKnE7PS97UGgv3piuV@nongnu.org, AJvYcCViJj0Zq01mZdp3eTk8joPdDakoOTANV8k//6k4pPGhWT1D09RXlrgiSfh14ibD/fA5F0xdXfIu/9M=@nongnu.org X-Gm-Message-State: AOJu0Yy4WFbboJHueM+4NHCoO/3GD4McJQMxlxULtoJNuS5JvWG2V3hG /naXCVqgBm7qPRHesY2Vwmya69eyVdpLScGpB53H1lmwKo0B1PcL60b5tQ== X-Google-Smtp-Source: AGHT+IHV/tZqpLoOKKUt58bZGrLOzCxYv81Fnu3Tg9rweTAyPHqh1/zoWbGPg5e3Ee1zp+QYJLdKcg== X-Received: by 2002:a17:907:9729:b0:a9a:7f92:782 with SMTP id a640c23a62f3a-a9de61ea441mr2791292266b.52.1730640907941; Sun, 03 Nov 2024 05:35:07 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza Subject: [PATCH v4 19/26] hw/intc: Guard openpic_kvm.c by dedicated OPENPIC_KVM Kconfig switch Date: Sun, 3 Nov 2024 14:34:05 +0100 Message-ID: <20241103133412.73536-20-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=shentey@gmail.com; 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641013320116600 Allows to clearly mark code sections relying on this device type. Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 2 +- hw/intc/Kconfig | 4 ++++ hw/intc/meson.build | 3 +-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index f640195e62..f12329feda 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -826,7 +826,7 @@ static DeviceState *ppce500_init_mpic_qemu(PPCE500Machi= neState *pms, static DeviceState *ppce500_init_mpic_kvm(const PPCE500MachineClass *pmc, Error **errp) { -#ifdef CONFIG_KVM +#ifdef CONFIG_OPENPIC_KVM DeviceState *dev; CPUState *cs; =20 diff --git a/hw/intc/Kconfig b/hw/intc/Kconfig index dd405bdb5d..a3df98ae59 100644 --- a/hw/intc/Kconfig +++ b/hw/intc/Kconfig @@ -16,6 +16,10 @@ config OPENPIC bool select MSI_NONBROKEN =20 +config OPENPIC_KVM + bool + depends on OPENPIC && KVM + config APIC bool select MSI_NONBROKEN diff --git a/hw/intc/meson.build b/hw/intc/meson.build index 6bfdc4eb33..b9de6bf5c6 100644 --- a/hw/intc/meson.build +++ b/hw/intc/meson.build @@ -48,8 +48,7 @@ specific_ss.add(when: 'CONFIG_IOAPIC', if_true: files('io= apic.c')) specific_ss.add(when: 'CONFIG_LOONGSON_LIOINTC', if_true: files('loongson_= liointc.c')) specific_ss.add(when: 'CONFIG_MIPS_CPS', if_true: files('mips_gic.c')) specific_ss.add(when: 'CONFIG_OMPIC', if_true: files('ompic.c')) -specific_ss.add(when: ['CONFIG_KVM', 'CONFIG_OPENPIC'], - if_true: files('openpic_kvm.c')) +specific_ss.add(when: 'CONFIG_OPENPIC_KVM', if_true: files('openpic_kvm.c'= )) specific_ss.add(when: 'CONFIG_POWERNV', if_true: files('xics_pnv.c', 'pnv_= xive.c', 'pnv_xive2.c')) specific_ss.add(when: 'CONFIG_PPC_UIC', if_true: files('ppc-uic.c')) specific_ss.add(when: 'CONFIG_RX_ICU', if_true: files('rx_icu.c')) --=20 2.47.0 From nobody Sat Nov 23 20:42:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641370; cv=none; d=zohomail.com; s=zohoarc; b=RQ+m00hSCMjGATeMRVjvAOHm53GKdbsxDm10n0C17ai4QbWTl1fulZZ56Tax4ZJ8a0ZUZWXIl7UydMK4JWyHEpMrDKAtDt+Gr7N6yVI1vP9xaP2zl6Y9Z/IOQEe8GX0gE5ALarYOajOcrvKJTGkLUzWSWxHMrvd1dJHp/oOJ3ck= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641370; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=/cYHnxTWw7p4cqvKVRM0bYbFOPLVh9Od6lWVKQFFgqU=; b=HninJF3dalb4JEhvEupyckLTsbUuXqPQFYRl37NML9BUfL9lpF0UAkMf9h4Sa8GdzqTl4GGNCFhcgC81yuRNmFHTvv9pkfFV3kTg3U3FMRQcpKX5iDTJMDNxW4tuDZTgLY0RKeNSz1A0hc9rI6hLOLKRh0jXVGfFnHa0stQAeeA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730641370806755.3196577167444; Sun, 3 Nov 2024 05:42:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7alA-0006aH-Av; Sun, 03 Nov 2024 08:35:16 -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 1t7al7-0006YO-QM; Sun, 03 Nov 2024 08:35:14 -0500 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7al6-0001VD-06; Sun, 03 Nov 2024 08:35:13 -0500 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5ceca0ec4e7so1290699a12.0; Sun, 03 Nov 2024 05:35:10 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.35.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:35:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640909; x=1731245709; 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=/cYHnxTWw7p4cqvKVRM0bYbFOPLVh9Od6lWVKQFFgqU=; b=S7An9rWAeW/Cs7cl5O766mDeeAWJ6Q1XTfJV+rAUw6GdNTYOSPeSdFguXSiFgrrpJ/ 9XY9eE2VpKVR63/v5DE4kWcRfiVxWCuMCkKGleIjUukpB0jb/41I8Ykm9qOYID0M32mk FA0xxhApJkQIAfCzBFS5GzAjiukZH4HrHCcXNWlrHlBfa0k/E/RD9dERoI7YKfV3oZQp 3jNVL6SFT4Lth3bDpkPmCb41hdmbHU2RuLeQxRoJjjFM89tmS4370MupmDGrLi0rMEGv yyImtR1ivmg2QaX8hdCSWwx+V7DgJKlCiuGNG6BekF47XbKEKmh/JWgXAFHnYmGBpjhL SyLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640909; x=1731245709; 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=/cYHnxTWw7p4cqvKVRM0bYbFOPLVh9Od6lWVKQFFgqU=; b=v8n7oakFJed4RFbWcelL0sItB1OqGM0cr7u5vMly5R9+blr1TMsCo0OMxCGOkHpbYu iHBFDH3l6Hl3Cy6pBTgInFpan2LrWXA+qsR8CGiMweKKT62MFt81Ufq/blK4ibw1GbLq BeBZI63Lx8sEoAUB8lHmhED22ssvq2sPct04Zug1VVq2f/XcqIjTWzLEbin0ISux57jZ S5B2qL9EnFFrRZWK2vTikfjIRzzPBlKjatY2o7QkTAy9j3dV9nj0dibRgKXHZN/wgEzV AQEFmUCY9W7ljLRBKP10tNiaWDBVKFuy9SlqlwML+C3VKiaqLyikb5UuW+McSXMbwBGJ mm9Q== X-Forwarded-Encrypted: i=1; AJvYcCVC9JgqtbY+3Z3/NIWk0uEWW97kJAuYmMMUn/H3NodqYTIAx16V7BOcfyhXI4TqcpSMxrRr0yIMK1a9@nongnu.org, AJvYcCW0y1IGWPaf0RSF9Ic4NYxEEADDGNnJb0LAMeITflhT7DQbNfrV9PdjiUk4TLFAXkVcNe/mDepWmpc=@nongnu.org X-Gm-Message-State: AOJu0YxHhrPxvbmvs+hHWcmvpPBLN8V7meQsbH3zbF2fvoSacZKmV8rX HAI1UO0Hzxp4J2vBmBAYP7639yI5EG8A4fpSYwkuH/S/rYKNS3NNaT72SA== X-Google-Smtp-Source: AGHT+IFi714sznYZ6C7nJF2EK5NZfV2pJsBfD6ZoRdXCYBhBUxg6DLcUQ1gtpdJpFrSympm2bfiYtQ== X-Received: by 2002:a17:906:6a15:b0:a9a:a891:b43e with SMTP id a640c23a62f3a-a9de616dfeamr3071373366b.50.1730640909199; Sun, 03 Nov 2024 05:35:09 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza Subject: [PATCH v4 20/26] hw/sd/sdhci: Prefer DEFINE_TYPES() macro Date: Sun, 3 Nov 2024 14:34:06 +0100 Message-ID: <20241103133412.73536-21-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=shentey@gmail.com; helo=mail-ed1-x536.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641372783116600 Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Bernhard Beschow --- hw/sd/sdhci.c | 62 +++++++++++++++++++++------------------------------ 1 file changed, 26 insertions(+), 36 deletions(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index ed01499391..dbe5c2340c 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -37,7 +37,6 @@ #include "migration/vmstate.h" #include "sdhci-internal.h" #include "qemu/log.h" -#include "qemu/module.h" #include "trace.h" #include "qom/object.h" =20 @@ -1598,15 +1597,6 @@ static void sdhci_sysbus_class_init(ObjectClass *kla= ss, void *data) sdhci_common_class_init(klass, data); } =20 -static const TypeInfo sdhci_sysbus_info =3D { - .name =3D TYPE_SYSBUS_SDHCI, - .parent =3D TYPE_SYS_BUS_DEVICE, - .instance_size =3D sizeof(SDHCIState), - .instance_init =3D sdhci_sysbus_init, - .instance_finalize =3D sdhci_sysbus_finalize, - .class_init =3D sdhci_sysbus_class_init, -}; - /* --- qdev bus master --- */ =20 static void sdhci_bus_class_init(ObjectClass *klass, void *data) @@ -1617,13 +1607,6 @@ static void sdhci_bus_class_init(ObjectClass *klass,= void *data) sbc->set_readonly =3D sdhci_set_readonly; } =20 -static const TypeInfo sdhci_bus_info =3D { - .name =3D TYPE_SDHCI_BUS, - .parent =3D TYPE_SD_BUS, - .instance_size =3D sizeof(SDBus), - .class_init =3D sdhci_bus_class_init, -}; - /* --- qdev i.MX eSDHC --- */ =20 #define USDHC_MIX_CTRL 0x48 @@ -1882,12 +1865,6 @@ static void imx_usdhc_init(Object *obj) s->quirks =3D SDHCI_QUIRK_NO_BUSY_IRQ; } =20 -static const TypeInfo imx_usdhc_info =3D { - .name =3D TYPE_IMX_USDHC, - .parent =3D TYPE_SYSBUS_SDHCI, - .instance_init =3D imx_usdhc_init, -}; - /* --- qdev Samsung s3c --- */ =20 #define S3C_SDHCI_CONTROL2 0x80 @@ -1946,18 +1923,31 @@ static void sdhci_s3c_init(Object *obj) s->io_ops =3D &sdhci_s3c_mmio_ops; } =20 -static const TypeInfo sdhci_s3c_info =3D { - .name =3D TYPE_S3C_SDHCI , - .parent =3D TYPE_SYSBUS_SDHCI, - .instance_init =3D sdhci_s3c_init, +static const TypeInfo sdhci_types[] =3D { + { + .name =3D TYPE_SDHCI_BUS, + .parent =3D TYPE_SD_BUS, + .instance_size =3D sizeof(SDBus), + .class_init =3D sdhci_bus_class_init, + }, + { + .name =3D TYPE_SYSBUS_SDHCI, + .parent =3D TYPE_SYS_BUS_DEVICE, + .instance_size =3D sizeof(SDHCIState), + .instance_init =3D sdhci_sysbus_init, + .instance_finalize =3D sdhci_sysbus_finalize, + .class_init =3D sdhci_sysbus_class_init, + }, + { + .name =3D TYPE_IMX_USDHC, + .parent =3D TYPE_SYSBUS_SDHCI, + .instance_init =3D imx_usdhc_init, + }, + { + .name =3D TYPE_S3C_SDHCI, + .parent =3D TYPE_SYSBUS_SDHCI, + .instance_init =3D sdhci_s3c_init, + }, }; =20 -static void sdhci_register_types(void) -{ - type_register_static(&sdhci_sysbus_info); - type_register_static(&sdhci_bus_info); - type_register_static(&imx_usdhc_info); - type_register_static(&sdhci_s3c_info); -} - -type_init(sdhci_register_types) +DEFINE_TYPES(sdhci_types) --=20 2.47.0 From nobody Sat Nov 23 20:42:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641012; cv=none; d=zohomail.com; s=zohoarc; b=l3zowv+DL02XphcW86hh0fj5pbotR8rI8tlg/J1V5RZhAZoO3Cm0sNNCFAy6pXDdpCNUf4lgQEgXZKhw+vCBuuKudMb8EX933RV90rK5Y4mPFyfEYAhwLHqM5FWTQqSGpuhndQ5gwxy/FPCuj6Iek/UVyFROko4g9jw/wcsILRw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641012; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=r4Y0ToFbSGJ6R/Fpizvem6vSl9v+O4XUjL/gx4SiiIM=; b=ClUnhPuMy3P71j0aOV4chdC1PNR9vx04/sHZVchbeolJJIjMj2VzbhVFRqDbYYyn6JVGyya6EDudJOW+HiqlQWJSQqgUZpdykds5x/BE9YbnjQSd9prAVGXtdts/TCLySIidskGv+ztLlyqOuJzNx5YXeGStVsdM9sGivE+Mo2E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730641012588287.12425259715076; Sun, 3 Nov 2024 05:36:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7alB-0006cx-Ns; Sun, 03 Nov 2024 08:35: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 1t7al8-0006ZM-Vv; Sun, 03 Nov 2024 08:35:15 -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 1t7al7-0001Vf-6T; Sun, 03 Nov 2024 08:35:14 -0500 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a9a0c7abaa6so414514266b.2; Sun, 03 Nov 2024 05:35:12 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.35.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:35:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640910; x=1731245710; 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=r4Y0ToFbSGJ6R/Fpizvem6vSl9v+O4XUjL/gx4SiiIM=; b=gauLCXCEvS6vL+eTfQE+QurUodnbJaTcYhmRrwxzGmIl5EKu678FrOp1HGz3JY2LFq 7zjwVJGe1UDZ6DlXVNmzO7rZ8XFeMRVRgks1a9uPaI98lf2DerXt0eUhU7o0/fjbDDT0 4lXPVkRk/EGyP46GWdshnkWVVdoVB7e5ChI4PqqicFPYYr7AcTNfabDHfWRhOkxHA3Qj YYr14/o3HrfUHlVO466oF67mjM082/idz2rleqkn0/vvDsrKfUr57J7ooKH2JoYsrMqY aJWo8nSi4jTHCQNp9HqXFlmdF0ztIIofg72607kUSK/+B2ks8poKwUDy2QZv0AGgDV8N PQIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640910; x=1731245710; 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=r4Y0ToFbSGJ6R/Fpizvem6vSl9v+O4XUjL/gx4SiiIM=; b=PzUhvQlJvZ0/IrV7AsPSEKQwhzlSiI1o7xs1PSIAOlSF+NEWJnVe8Xkm+/PA7FJs4g jr2PVtrSLCsVyD2cuTozbxVcDYwxFqa0dbIy4y0BANogQmTXo8TIqTSZZfFyoC+b/Bp6 7bfXoaoMG611qKBua3bj8aJPrqzqpC6kuoEcMe7fTpzDxjOSSRVgSoi64kRmXQz+VPcw IBsv0+vDZ3JWVvTwfS1KtnrifwF7FZxJC4MDW4XBPkBSuWUDOzVLX3vGAiPW19f/VTfo oy1p+29f25/4pOEDw/kBpCwkQUUa9MXSbsjTvthHRaB2MVITuJ+Um3d2C7c7aSfmMljM sJWw== X-Forwarded-Encrypted: i=1; AJvYcCU0pBoHPnnDmW0UPmEADif4sRfvLVhdyj0R4RqCliYhH4ZgIUzaP5h33oz9qIc9+8UtpvA77U7QGH4=@nongnu.org, AJvYcCUf0ESPoCwPQaZek/p7RsDYFwm0udLMXQrpTeZY7lv/sHwUZOcstoQkRU9JAE1ed8E6WZA4EUDrrbgl@nongnu.org X-Gm-Message-State: AOJu0YzLTGEawOEFAiIT/eH8eFp6Y7vLT6ylAHvhtgpH5Trm80eDBErU EhRGRySreMRQY3JMFdf4sDF4/jzUAVI/SLIwMp+ZwHuqMlJzSTT+tiR/lA== X-Google-Smtp-Source: AGHT+IGu+MYgcCBmtvZjFR8NVm0lcOsatyIELmJVB+Bry5um3NRX2mp81Gjspb0KIJ02Jv1wivh2aw== X-Received: by 2002:a17:907:2d0c:b0:a9a:714:4393 with SMTP id a640c23a62f3a-a9e6557deb8mr903306066b.23.1730640910370; Sun, 03 Nov 2024 05:35:10 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza Subject: [PATCH v4 21/26] hw/block/pflash_cfi01: Prefer DEFINE_TYPES() macro Date: Sun, 3 Nov 2024 14:34:07 +0100 Message-ID: <20241103133412.73536-22-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=shentey@gmail.com; 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641013353116600 Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Kevin Wolf Signed-off-by: Bernhard Beschow --- hw/block/pflash_cfi01.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 7b6ec64442..21a81b44f0 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -47,7 +47,6 @@ #include "qemu/bitops.h" #include "qemu/host-utils.h" #include "qemu/log.h" -#include "qemu/module.h" #include "qemu/option.h" #include "hw/sysbus.h" #include "migration/vmstate.h" @@ -947,20 +946,16 @@ static void pflash_cfi01_class_init(ObjectClass *klas= s, void *data) set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); } =20 - -static const TypeInfo pflash_cfi01_info =3D { - .name =3D TYPE_PFLASH_CFI01, - .parent =3D TYPE_SYS_BUS_DEVICE, - .instance_size =3D sizeof(PFlashCFI01), - .class_init =3D pflash_cfi01_class_init, +static const TypeInfo pflash_cfi01_types[] =3D { + { + .name =3D TYPE_PFLASH_CFI01, + .parent =3D TYPE_SYS_BUS_DEVICE, + .instance_size =3D sizeof(PFlashCFI01), + .class_init =3D pflash_cfi01_class_init, + }, }; =20 -static void pflash_cfi01_register_types(void) -{ - type_register_static(&pflash_cfi01_info); -} - -type_init(pflash_cfi01_register_types) +DEFINE_TYPES(pflash_cfi01_types) =20 PFlashCFI01 *pflash_cfi01_register(hwaddr base, const char *name, --=20 2.47.0 From nobody Sat Nov 23 20:42:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730640993; cv=none; d=zohomail.com; s=zohoarc; b=KyN6NIdB/BHshjMr+JUqkebJLcGuSg+8/S7T7u1/EL34KlPEdYY0JicYk37lABERhF4YJa3kAsSJI97KT+jGRseQ69ElqlU1EKpVEQar3kENo1IILnppJHRx4AJUTYzT8yNkn7KvKecH8Zhm2/etZmXxh/yvbnFUsQxdM+8ZmIU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730640993; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=568WB/HhdhShwfBcr5m1kUkKamKkxukqnLj/PaLkUro=; b=UYhLFJ5AlZGsl0L+xV1yDLCjCRnSxKfjLyVZ82td52STPjCB0YVh1/L52IrkJKzqXtC1+qWmg+v7Lh7mJkDPIJYIEY5L+orFDZFWcOeW2s58w8t4sNSm7kpHBw+lQ+3gBWulHehplTNKWUpKgcc7Q3K97Y/DDpeRUHcF0hvw1rs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730640993979841.342515344787; Sun, 3 Nov 2024 05:36:33 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7alE-0006eM-06; Sun, 03 Nov 2024 08:35:20 -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 1t7alA-0006a4-6o; Sun, 03 Nov 2024 08:35:16 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7al8-0001WS-KJ; Sun, 03 Nov 2024 08:35:15 -0500 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a99f1fd20c4so442272566b.0; Sun, 03 Nov 2024 05:35:13 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.35.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:35:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640912; x=1731245712; 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=568WB/HhdhShwfBcr5m1kUkKamKkxukqnLj/PaLkUro=; b=VuxTaBKnUaUfg7fpzPqkIUkzc/pBbxK7eSzopC+cDMDF1J95PweX6V1tJOYwQEEwQg pf5lrZz3d2sYjZpCeQLfLggVL1h+obzPVZb+iQQvu285IafM2KTrxXlHppxLMwggBYw6 UzVS2K5Cl0IL0zYrHxdvaVvzmBnYC6k9uiFHPgKZRHnxKouSp7/QVwH+cfkbdDUKcIvS hZbRV5+wiGqi6pO244qBbUKlkBDnfYG9kOiYNSSR6KeGDOr6up0GwYDjb5SBpSDixhfR tlZbl/VQaHmXw43nU8CIycFz+NskP8wTB5LJmsYbgWZMNV6UmiI68e/7PLkUWeNc2YYN q17w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640912; x=1731245712; 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=568WB/HhdhShwfBcr5m1kUkKamKkxukqnLj/PaLkUro=; b=pH661Gr+n3zc4ip72WmpLqyEdYoAJwrjS1bWpbH9P9aRuLIoqgcvBIqA3JFktYI92A 5Joqv0ZWQV1n2J4xGiL7IySV058PKzzo3pNMootNAEPvS0MrhevvqKkAqw10dB7vSMb8 kuH2dc7UWOsLE9ABRnujIFGvaxc23NrKG+5PfnSwvDQubCGrMGLamb61/Ccp6F/afLsR 7G6+7VIepdv2NY2nB0O0mInPSe90Gxxg483nLspvToaDUXBBNvwainQkyASchgI9uglW S5yUoDibHBbbCnZ+/j3t+VCWC23076Q2ao0IHS2gSquCZOAPlt6K8//tkxmN4NNp7Aar HPxQ== X-Forwarded-Encrypted: i=1; AJvYcCVr54p38XXS2fNPPq8ZOJuHXkRybYcz+EC/7ic/c02wIy0AB2WOJsLvHr/V31OUJZ0XOjmD/sNCgDYA@nongnu.org, AJvYcCVyVSN+lSIincVQa43Y2jvZ/uh9UJHtoTFukz1jDxi0pz9+vHUObXHW5HH5Pcfq26z1n7WLm4CwZeU=@nongnu.org X-Gm-Message-State: AOJu0YxtkhhaFsQNSO+93iqa5u9HebbLqsPqB2jTMliYPc586ByC4Ypq wAJ3B7uhuA085sfVxE8dX3zCS76HMYzhl3EhqHv0GrS1Lr3fPjU7iG1pLg== X-Google-Smtp-Source: AGHT+IHYHxcRTnkfIsp7f1mRhHmZs95LZaTT6yxpsE37c8QlQfGO6n6UtdgOjl+iD2KK3cpnLAgLEg== X-Received: by 2002:a17:907:7ea4:b0:a99:ce2f:b0ff with SMTP id a640c23a62f3a-a9e5093895emr1243348566b.33.1730640911637; Sun, 03 Nov 2024 05:35:11 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza Subject: [PATCH v4 22/26] hw/i2c/smbus_eeprom: Prefer DEFINE_TYPES() macro Date: Sun, 3 Nov 2024 14:34:08 +0100 Message-ID: <20241103133412.73536-23-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=shentey@gmail.com; helo=mail-ej1-x632.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730640995437116600 Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Bernhard Beschow Acked-by: Corey Minyard --- hw/i2c/smbus_eeprom.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/hw/i2c/smbus_eeprom.c b/hw/i2c/smbus_eeprom.c index 9e62c27a1a..e3e96d4a2d 100644 --- a/hw/i2c/smbus_eeprom.c +++ b/hw/i2c/smbus_eeprom.c @@ -151,19 +151,16 @@ static void smbus_eeprom_class_initfn(ObjectClass *kl= ass, void *data) dc->user_creatable =3D false; } =20 -static const TypeInfo smbus_eeprom_info =3D { - .name =3D TYPE_SMBUS_EEPROM, - .parent =3D TYPE_SMBUS_DEVICE, - .instance_size =3D sizeof(SMBusEEPROMDevice), - .class_init =3D smbus_eeprom_class_initfn, +static const TypeInfo smbus_eeprom_types[] =3D { + { + .name =3D TYPE_SMBUS_EEPROM, + .parent =3D TYPE_SMBUS_DEVICE, + .instance_size =3D sizeof(SMBusEEPROMDevice), + .class_init =3D smbus_eeprom_class_initfn, + }, }; =20 -static void smbus_eeprom_register_types(void) -{ - type_register_static(&smbus_eeprom_info); -} - -type_init(smbus_eeprom_register_types) +DEFINE_TYPES(smbus_eeprom_types) =20 void smbus_eeprom_init_one(I2CBus *smbus, uint8_t address, uint8_t *eeprom= _buf) { --=20 2.47.0 From nobody Sat Nov 23 20:42:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730640945; cv=none; d=zohomail.com; s=zohoarc; b=i0S7CG8k/FaWoeXCdBGNwrcCVr9bmYsCq2T8C48Sm05d7UZVUmaLLoiYbYsHB2hzq3qlmLnaVleY+6ObbwHVVffjBmvjPR3DR1rSAixQ/q7EFqHCHScQ8EDHgUMrEbP8zk43x5YOWmBwITIF/MjLcfwpdfoXDq8jsNLXpcM13EU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730640945; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=uvB/npsxlbJ9QKuMcZU24QB6i/ks5OjN7Y8RG67aRzw=; b=QnMirhOlrZlhhTFsPtLVEYiigHHMD2bgmsa/fF7pLxsCLhCEKaQG9iV+GzxC7cs2Q66N2OICbVqm/Z4GNzsMiiDV7jDD3bEkcBD8SQa5bISJdO1fasizKJkgZbtw0WCpkT5rZcdvUhxOmFc8UpDMx2oXuY1b/IcLGtZaXmCtZ/Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730640945936629.2724159478536; Sun, 3 Nov 2024 05:35:45 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7alI-0006lq-Ro; Sun, 03 Nov 2024 08:35:24 -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 1t7alB-0006cM-2u; Sun, 03 Nov 2024 08:35:17 -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 1t7al9-0001Wl-Dg; Sun, 03 Nov 2024 08:35:16 -0500 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a9a2209bd7fso590743666b.2; Sun, 03 Nov 2024 05:35:14 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.35.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:35:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640913; x=1731245713; 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=uvB/npsxlbJ9QKuMcZU24QB6i/ks5OjN7Y8RG67aRzw=; b=geiTZZt8q5FoxiktTZOKe0/TRRxqDSibcrPONEVc6uVTIhU66DdF60zien22qt5v/f Q6osiCu+paLZWbiaW1eewLd7tKvejOcDVS25a6s8chVaD3EUubD7cu4I1LjHRrmwsKRb 9/76NusJuHg+zasfDoRb3hE8/1AILFNThD7U/GzWhu572DnL7TyoGIuohRW/Modpsfd5 JE3e/i66UVLdiHvaDhUHo4cqjdPeIUIvJVdoEW0jKydKifZP1b9hVOV2mWniW6KAPyRY sQoOqR/A4DvXduZOdxQRVK6TO3lC2AcTAx7ZFVDdVrpOkao238ln84VOvv1/ebLjCzZ5 XMVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640913; x=1731245713; 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=uvB/npsxlbJ9QKuMcZU24QB6i/ks5OjN7Y8RG67aRzw=; b=iRwE7iEcKcAxpbHfoeAiusDigVjP1yueuiZ3ryhJpucXapiXfrAH1t9e3qeEIFu4Wk uVvuLI0XNUGowzGcdpGRGMEW5E2uEW7DUxpAQhoPx25pUhWMZptEjS2oPDFBXcnWGokV R5T7qzfID5gYM6qAjs5sj1aRU1qkVDfMmFwJlqzUOrEO0odKwpJCom2IZx6jQT1EbL1q K9bK9J51i3T3yXFfZeFZsWQweB3fEeHFz0SaBwnba4TyuGUgNfaxUNdY+BMLSh1JF4k0 mMablU8Ql3sckVrq9//TrELZsUhyUauqzeBKkTa6V5w2/3s1ywu3xfTo3I/j/Cd1HKRz vbSw== X-Forwarded-Encrypted: i=1; AJvYcCUl+JoIEFWekg/KEo4Q3sYmzKgyxC2yWMC0Yh2Ay4aF1d6UKvJFNcZy/eZw3dAysT0tdBlt1rUirJKk@nongnu.org, AJvYcCXKliMSNB8r6DA/zpGQs9C1wPQyLi1p3dtBT10YQvxL6ZLYnsz0Ywpj3Tuqgs+QdY87sWsQ/SjJ2+0=@nongnu.org X-Gm-Message-State: AOJu0YzHGDRwjIRufhh4H/Rv+dwfTWma9z3bBPhSRf+i3jCLHEQwoeB+ LKdfckdC+IfOmCQr+0PRxM9QrxV7p/2KpJf4Z5DSbekshf3d6VB2WWWY8A== X-Google-Smtp-Source: AGHT+IH//ZaAoLMQDViGf3sbi7kLGwX6e5QLPY1oWf6RMj9CL2sW8TG/69ANColW7aNzMzDoGjPg2g== X-Received: by 2002:a17:907:7e8b:b0:a99:fd32:11dc with SMTP id a640c23a62f3a-a9de5d858aemr2955587066b.24.1730640912848; Sun, 03 Nov 2024 05:35:12 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza Subject: [PATCH v4 23/26] hw/rtc/ds1338: Prefer DEFINE_TYPES() macro Date: Sun, 3 Nov 2024 14:34:09 +0100 Message-ID: <20241103133412.73536-24-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=shentey@gmail.com; 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730640947146116600 Content-Type: text/plain; charset="utf-8" Signed-off-by: Bernhard Beschow --- hw/rtc/ds1338.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/hw/rtc/ds1338.c b/hw/rtc/ds1338.c index a5fe221418..13472c5670 100644 --- a/hw/rtc/ds1338.c +++ b/hw/rtc/ds1338.c @@ -14,7 +14,6 @@ #include "hw/i2c/i2c.h" #include "migration/vmstate.h" #include "qemu/bcd.h" -#include "qemu/module.h" #include "qom/object.h" #include "sysemu/rtc.h" =20 @@ -227,16 +226,13 @@ static void ds1338_class_init(ObjectClass *klass, voi= d *data) dc->vmsd =3D &vmstate_ds1338; } =20 -static const TypeInfo ds1338_info =3D { - .name =3D TYPE_DS1338, - .parent =3D TYPE_I2C_SLAVE, - .instance_size =3D sizeof(DS1338State), - .class_init =3D ds1338_class_init, +static const TypeInfo ds1338_types[] =3D { + { + .name =3D TYPE_DS1338, + .parent =3D TYPE_I2C_SLAVE, + .instance_size =3D sizeof(DS1338State), + .class_init =3D ds1338_class_init, + }, }; =20 -static void ds1338_register_types(void) -{ - type_register_static(&ds1338_info); -} - -type_init(ds1338_register_types) +DEFINE_TYPES(ds1338_types) --=20 2.47.0 From nobody Sat Nov 23 20:42:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641306; cv=none; d=zohomail.com; s=zohoarc; b=I6yYReUlm1+dHyvQev9zWWz4POP8UIyiQWBk2PYG2Q7k1FFWKOdaPHdTqPDV2qscxmYAHX6dHbM9HJhMXWp/1y+dR3LsTeUDsmFEx/ixP6MHr+SekePsMhcg2eaMgGFssuxNMM0PIx1KvXHGOvZUocx+8yEPVSr2gnI3XIYBoGo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641306; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Hys/7KjvfIPIAYUIaZOYNBC8Ed9q/VILcwQ4ObN64sY=; b=GABYy5TxBYZaaLkQaPp6W1rbpjNYz4/fNb2wOOAn1pr4shV9oU1d98IXXn2TTn/ZW+ZViX2bkofTY18l0XRHSnKpAanDHmNJHKo7EP/XADNIGNKb+ra/aqOZJfRmIdSQghwo/aHpLs1KS+WjMjF5ND8A7CRjC3k9HZ3bIwQXTUo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730641306684916.9638111424821; Sun, 3 Nov 2024 05:41:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7alG-0006iz-S9; Sun, 03 Nov 2024 08:35: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 1t7alC-0006dn-Iy; Sun, 03 Nov 2024 08:35:18 -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 1t7alA-0001XS-QP; Sun, 03 Nov 2024 08:35:18 -0500 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5cebcf96fabso2304244a12.3; Sun, 03 Nov 2024 05:35:15 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.35.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:35:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640914; x=1731245714; 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=Hys/7KjvfIPIAYUIaZOYNBC8Ed9q/VILcwQ4ObN64sY=; b=h1/YkUMgCeR2g72D97l70MLgGnAzrXnh84qbxup/wgwXJbqQ4TiDIXp+GclcraKlA+ qwfyMXs48m5M6tQM+wUMS9GCSIjAO7/tp4dryAQAQzrcx+XK9zwj6gK055h9FZXgqujT MWKO8798kt9zRAuHaaQmmWijOF+fyGPWYjkz/dfyBiynsqV08lPCOlTE5sjSts9OV7kj IxJmdbhE3seHOcG3dB1qrp3gLoGAe1zhG0w/isGvnDHOzzNHV4GaENeuv3QF7gsT5z5Y S7UKfT7CqXTRHv4Yz0B8ySybhOrTU4UPUd8x/bU1aN5lHm3ebgUrr5uDgjHymMw/xSx+ wVKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640914; x=1731245714; 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=Hys/7KjvfIPIAYUIaZOYNBC8Ed9q/VILcwQ4ObN64sY=; b=KCfbuOUcyv0D4dHk9yf4KCi1mfVeqr8JIqnvWhT3HhZA2aLWCim76Y0M1vsiRby45k 7mJDxpk6DkmotPAg4JCldiAeftO7q6Y59Xp5pEgLmipmoJpH35YQoibwCiEA4HVYoCuJ PsbNUOLSDHL0a/5S/5dSstkPc+Ryb8Q2WSxZoaokRIZyimwMxk/cybCIxs+5jgVQzFNx iq2/SteT8qWq/0xYEnjBSUBHF7NAxcHTHrjErPujwjQlLo7cDdFaOpjA9A+QZGS9SEhO 44mFxAH4Duzb9b6rNRHQW8DwBFH3Rk1fOWhYFrFMDbdCO+ohg67KkEdo1rvV9Vdx51Vm 1rwA== X-Forwarded-Encrypted: i=1; AJvYcCUxii9lc4FUi8l6+ki6iQJ4VOSab86PNuEo6c6IpTuPRthtwj0zO0MpvaerFbgenOxNsHgHq0tLNaQ=@nongnu.org, AJvYcCVATMhQ4sAIg5UwQyhW6S/Nb30VER4nmzb5u5O8+tYP4CsLyso9esGkPxIX+M4vKwJnekrzA9m4DUkM@nongnu.org X-Gm-Message-State: AOJu0YzV3hk4fGBy/6ly/yIkCO5utESfZJu7l4xnlNRBKamuF9FyEACA VotEdKwXd4qxYHVQRJ/fPvBQYYSI57U7Q9x8+p+tSk6xDFRMLeNpXY9wDA== X-Google-Smtp-Source: AGHT+IHwqqTdl88p6B2thIs7lnXeozEZZcKdLjFr19fMDQeKLzhh4hmeXCQPtJHMoudFFufGJhWU8Q== X-Received: by 2002:a17:907:6e94:b0:a9a:67aa:31f5 with SMTP id a640c23a62f3a-a9e508aaa56mr1256145166b.10.1730640914015; Sun, 03 Nov 2024 05:35:14 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza Subject: [PATCH v4 24/26] hw/usb/hcd-ehci-sysbus: Prefer DEFINE_TYPES() macro Date: Sun, 3 Nov 2024 14:34:10 +0100 Message-ID: <20241103133412.73536-25-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=shentey@gmail.com; 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641308670116600 The naming of the TypeInfo array is inspired by hcd-ohci-sysbus. Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Bernhard Beschow --- hw/usb/hcd-ehci-sysbus.c | 118 +++++++++++++++++---------------------- 1 file changed, 50 insertions(+), 68 deletions(-) diff --git a/hw/usb/hcd-ehci-sysbus.c b/hw/usb/hcd-ehci-sysbus.c index 2b1652f7a8..eb7df93ac2 100644 --- a/hw/usb/hcd-ehci-sysbus.c +++ b/hw/usb/hcd-ehci-sysbus.c @@ -19,7 +19,6 @@ #include "hw/qdev-properties.h" #include "hw/usb/hcd-ehci.h" #include "migration/vmstate.h" -#include "qemu/module.h" =20 static const VMStateDescription vmstate_ehci_sysbus =3D { .name =3D "ehci-sysbus", @@ -97,17 +96,6 @@ static void ehci_sysbus_class_init(ObjectClass *klass, v= oid *data) set_bit(DEVICE_CATEGORY_USB, dc->categories); } =20 -static const TypeInfo ehci_type_info =3D { - .name =3D TYPE_SYS_BUS_EHCI, - .parent =3D TYPE_SYS_BUS_DEVICE, - .instance_size =3D sizeof(EHCISysBusState), - .instance_init =3D ehci_sysbus_init, - .instance_finalize =3D ehci_sysbus_finalize, - .abstract =3D true, - .class_init =3D ehci_sysbus_class_init, - .class_size =3D sizeof(SysBusEHCIClass), -}; - static void ehci_platform_class_init(ObjectClass *oc, void *data) { SysBusEHCIClass *sec =3D SYS_BUS_EHCI_CLASS(oc); @@ -118,12 +106,6 @@ static void ehci_platform_class_init(ObjectClass *oc, = void *data) set_bit(DEVICE_CATEGORY_USB, dc->categories); } =20 -static const TypeInfo ehci_platform_type_info =3D { - .name =3D TYPE_PLATFORM_EHCI, - .parent =3D TYPE_SYS_BUS_EHCI, - .class_init =3D ehci_platform_class_init, -}; - static void ehci_exynos4210_class_init(ObjectClass *oc, void *data) { SysBusEHCIClass *sec =3D SYS_BUS_EHCI_CLASS(oc); @@ -134,12 +116,6 @@ static void ehci_exynos4210_class_init(ObjectClass *oc= , void *data) set_bit(DEVICE_CATEGORY_USB, dc->categories); } =20 -static const TypeInfo ehci_exynos4210_type_info =3D { - .name =3D TYPE_EXYNOS4210_EHCI, - .parent =3D TYPE_SYS_BUS_EHCI, - .class_init =3D ehci_exynos4210_class_init, -}; - static void ehci_aw_h3_class_init(ObjectClass *oc, void *data) { SysBusEHCIClass *sec =3D SYS_BUS_EHCI_CLASS(oc); @@ -150,12 +126,6 @@ static void ehci_aw_h3_class_init(ObjectClass *oc, voi= d *data) set_bit(DEVICE_CATEGORY_USB, dc->categories); } =20 -static const TypeInfo ehci_aw_h3_type_info =3D { - .name =3D TYPE_AW_H3_EHCI, - .parent =3D TYPE_SYS_BUS_EHCI, - .class_init =3D ehci_aw_h3_class_init, -}; - static void ehci_npcm7xx_class_init(ObjectClass *oc, void *data) { SysBusEHCIClass *sec =3D SYS_BUS_EHCI_CLASS(oc); @@ -168,12 +138,6 @@ static void ehci_npcm7xx_class_init(ObjectClass *oc, v= oid *data) set_bit(DEVICE_CATEGORY_USB, dc->categories); } =20 -static const TypeInfo ehci_npcm7xx_type_info =3D { - .name =3D TYPE_NPCM7XX_EHCI, - .parent =3D TYPE_SYS_BUS_EHCI, - .class_init =3D ehci_npcm7xx_class_init, -}; - static void ehci_tegra2_class_init(ObjectClass *oc, void *data) { SysBusEHCIClass *sec =3D SYS_BUS_EHCI_CLASS(oc); @@ -184,12 +148,6 @@ static void ehci_tegra2_class_init(ObjectClass *oc, vo= id *data) set_bit(DEVICE_CATEGORY_USB, dc->categories); } =20 -static const TypeInfo ehci_tegra2_type_info =3D { - .name =3D TYPE_TEGRA2_EHCI, - .parent =3D TYPE_SYS_BUS_EHCI, - .class_init =3D ehci_tegra2_class_init, -}; - static void ehci_ppc4xx_init(Object *o) { EHCISysBusState *s =3D SYS_BUS_EHCI(o); @@ -207,13 +165,6 @@ static void ehci_ppc4xx_class_init(ObjectClass *oc, vo= id *data) set_bit(DEVICE_CATEGORY_USB, dc->categories); } =20 -static const TypeInfo ehci_ppc4xx_type_info =3D { - .name =3D TYPE_PPC4xx_EHCI, - .parent =3D TYPE_SYS_BUS_EHCI, - .class_init =3D ehci_ppc4xx_class_init, - .instance_init =3D ehci_ppc4xx_init, -}; - /* * Faraday FUSBH200 USB 2.0 EHCI */ @@ -282,24 +233,55 @@ static void fusbh200_ehci_class_init(ObjectClass *oc,= void *data) set_bit(DEVICE_CATEGORY_USB, dc->categories); } =20 -static const TypeInfo ehci_fusbh200_type_info =3D { - .name =3D TYPE_FUSBH200_EHCI, - .parent =3D TYPE_SYS_BUS_EHCI, - .instance_size =3D sizeof(FUSBH200EHCIState), - .instance_init =3D fusbh200_ehci_init, - .class_init =3D fusbh200_ehci_class_init, +static const TypeInfo ehci_sysbus_types[] =3D { + { + .name =3D TYPE_SYS_BUS_EHCI, + .parent =3D TYPE_SYS_BUS_DEVICE, + .instance_size =3D sizeof(EHCISysBusState), + .instance_init =3D ehci_sysbus_init, + .instance_finalize =3D ehci_sysbus_finalize, + .abstract =3D true, + .class_init =3D ehci_sysbus_class_init, + .class_size =3D sizeof(SysBusEHCIClass), + }, + { + .name =3D TYPE_PLATFORM_EHCI, + .parent =3D TYPE_SYS_BUS_EHCI, + .class_init =3D ehci_platform_class_init, + }, + { + .name =3D TYPE_EXYNOS4210_EHCI, + .parent =3D TYPE_SYS_BUS_EHCI, + .class_init =3D ehci_exynos4210_class_init, + }, + { + .name =3D TYPE_AW_H3_EHCI, + .parent =3D TYPE_SYS_BUS_EHCI, + .class_init =3D ehci_aw_h3_class_init, + }, + { + .name =3D TYPE_NPCM7XX_EHCI, + .parent =3D TYPE_SYS_BUS_EHCI, + .class_init =3D ehci_npcm7xx_class_init, + }, + { + .name =3D TYPE_TEGRA2_EHCI, + .parent =3D TYPE_SYS_BUS_EHCI, + .class_init =3D ehci_tegra2_class_init, + }, + { + .name =3D TYPE_PPC4xx_EHCI, + .parent =3D TYPE_SYS_BUS_EHCI, + .class_init =3D ehci_ppc4xx_class_init, + .instance_init =3D ehci_ppc4xx_init, + }, + { + .name =3D TYPE_FUSBH200_EHCI, + .parent =3D TYPE_SYS_BUS_EHCI, + .instance_size =3D sizeof(FUSBH200EHCIState), + .instance_init =3D fusbh200_ehci_init, + .class_init =3D fusbh200_ehci_class_init, + }, }; =20 -static void ehci_sysbus_register_types(void) -{ - type_register_static(&ehci_type_info); - type_register_static(&ehci_platform_type_info); - type_register_static(&ehci_exynos4210_type_info); - type_register_static(&ehci_aw_h3_type_info); - type_register_static(&ehci_npcm7xx_type_info); - type_register_static(&ehci_tegra2_type_info); - type_register_static(&ehci_ppc4xx_type_info); - type_register_static(&ehci_fusbh200_type_info); -} - -type_init(ehci_sysbus_register_types) +DEFINE_TYPES(ehci_sysbus_types) --=20 2.47.0 From nobody Sat Nov 23 20:42:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641337; cv=none; d=zohomail.com; s=zohoarc; b=lcyG2QpxQm3L19cI+vyiVcv+2MShFPr6AXmaQu0mV6EpBltsW/7vjdB+s4XbhsiAc/NgYJEbUO8R5mbzFEhcEMK/FXfoorinRFU1PBR81EYIRnjX6a9MVGx4aIepth6io0PHyQpF3itNj+nAwHT4CwI4v1141aSgysDP2jsi1f4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641337; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=uVflLGHPyO3cQe2iVaao8/FC1//CU9ki9Sx4TSq7Uus=; b=IAOUiCKIF/9rpGUZp0RagAEDLz/RTIzZgvsTWQE7GWgW5IYctpaP7K9gjz2n5qSMGoHuHUXmt0G6bk1Cfh9haCYD4OZKHMECyQZtHnZmNjdtd/mQeIu/8Jyh24psp+S1tvR1/Zpzo4ABrXC6k5imegAbpra/buGKu4xX4PZnBQg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730641337449423.8163385715184; Sun, 3 Nov 2024 05:42:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7alL-0006ne-2r; Sun, 03 Nov 2024 08:35:27 -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 1t7alD-0006eN-Fu; Sun, 03 Nov 2024 08:35:19 -0500 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7alC-0001Xq-1g; Sun, 03 Nov 2024 08:35:19 -0500 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5c9c28c1ecbso4212633a12.0; Sun, 03 Nov 2024 05:35:16 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.35.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:35:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640915; x=1731245715; 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=uVflLGHPyO3cQe2iVaao8/FC1//CU9ki9Sx4TSq7Uus=; b=WTGYvfydV8J+ZtL8tJtVG/AGXpLFNab0Gyo5GHJCHmYzto0vCz/8/DyP/l5ZKgVGla erDPLPwOCbLxlutCntSoqEiT7rnEVvgcYWYcD4OFcn4XYwzotjD+bqxQHC/3BhNGjasL ikd54AO1dJWp2fwXJITd8Lmp+VXV8upjquU6XDf65Pa439y27KwX+Q96aikcW94VxGnw CgI29QA+ZmQByrhoqQksEsxhJzaiBOYlXVEprpALU6NOwfuOECHSQKhWwIYED1A2dmAc 9bXyQL9+Vy4OlLTdeH14K0gU+/Z5mW27JxUShUNG+tZLQPWjp2hfFx08hINxaiBXvpVn NXxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640915; x=1731245715; 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=uVflLGHPyO3cQe2iVaao8/FC1//CU9ki9Sx4TSq7Uus=; b=F0jyZqG7K2hoEnKoXAmI44o8ayRjiKmdZCwLAUfpsir0miDDOIbwB0OTXz3U0cI1tF UvR8rINAwpLlvx7hVj2vJI/p4np+s4aOT7pbsFfDGNeqOxs40Ydhm4GtqujzPQaidJHF WwtnUjnNOQylUdX+8fvxHCD2tq85N+9OT0hs1HD+c0PuvHk66TeJtlPaBb/AXYiSvPhT 0f533Rj9OVhb/1v7KTqVVj8tlw5MDod5XUOfoKOie/J9/9s1A+N+qaM8/nWiCgwhNSmY PCPvKe1fOWPPgpm+9irzPd7WCdDA6XUtpnanI0hb6i8NKzOHedC2zP2f2TBXkP6gMfhs keJQ== X-Forwarded-Encrypted: i=1; AJvYcCVYDVt6N/qASK+uuxW1EGVvRbMXexOJlJ2Jka/wldlvm5Pvhd6SgtFl46Z+YXGLfzGs/8dbC1OffZ4=@nongnu.org, AJvYcCWy9QM7jyhahbfJ1AgTv1sNKDHAfAH6a61PZpHmkfxG4vbq+uiEdiz0azQGmxKO3yCNUTi0UEa1oYBX@nongnu.org X-Gm-Message-State: AOJu0Yz5jZYJSJDh/Qpu5kJHV1vTyV1tTUhfq4U1GuL4eD09Br3nXOce C+q8vjM59p1AT/tSryE9AjdzFUiJxmZ9L/RZNQloQWThPyUqPEmkZI5fPA== X-Google-Smtp-Source: AGHT+IFSAMzYZp3iO2kUylRyZZ1WNNzMYdgRFsRmn01AOrdiyrwCTjRWWPYSZ647eiOxZXftkF4AwA== X-Received: by 2002:a17:907:9604:b0:a99:f4be:7a6a with SMTP id a640c23a62f3a-a9de61ce626mr2663539666b.47.1730640915260; Sun, 03 Nov 2024 05:35:15 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza Subject: [PATCH v4 25/26] hw/vfio/platform: Let vfio_start_eventfd_injection() take VFIOPlatformDevice pointer Date: Sun, 3 Nov 2024 14:34:11 +0100 Message-ID: <20241103133412.73536-26-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=shentey@gmail.com; helo=mail-ed1-x52e.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641338616116600 Avoids one downcast, making the code more type-safe. Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Bernhard Beschow --- hw/vfio/platform.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index a85c199c76..77bbfbf62c 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -318,13 +318,12 @@ static void vfio_platform_eoi(VFIODevice *vbasedev) /** * vfio_start_eventfd_injection - starts the virtual IRQ injection using * user-side handled eventfds - * @sbdev: the sysbus device handle + * @vdev: the VFIO platform device handle * @irq: the qemu irq handle */ =20 -static void vfio_start_eventfd_injection(SysBusDevice *sbdev, qemu_irq irq) +static void vfio_start_eventfd_injection(VFIOPlatformDevice *vdev, qemu_ir= q irq) { - VFIOPlatformDevice *vdev =3D VFIO_PLATFORM_DEVICE(sbdev); VFIOINTp *intp; =20 QLIST_FOREACH(intp, &vdev->intp_list, next) { @@ -417,7 +416,7 @@ fail_vfio: kvm_irqchip_remove_irqfd_notifier(kvm_state, intp->interrupt, irq); abort(); fail_irqfd: - vfio_start_eventfd_injection(sbdev, irq); + vfio_start_eventfd_injection(vdev, irq); return; } =20 --=20 2.47.0 From nobody Sat Nov 23 20:42:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641364; cv=none; d=zohomail.com; s=zohoarc; b=gvBpwemS7DOOiLAv1IcIlVYe11CJDovjpNiRRfvnFyCH4zay28UpJSxPMZIponXTeVnE+6lgoXc24xDdVZrKYaSyFQfLo7UyGQEeDe69eFASHMy24QKAWEk/ISqaVKkKNKoEPl6RvlSaszYh2ru3ynXy7NhpPBoNNa23kez42Sc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641364; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=dKFAh2MnjhZ1jF0dRDKV/YEAdE5+3y61mz+4DueAPJw=; b=j6ugmpQQtnGb++4D/2veVIXvJjHMR0CCxBy4y+kRSggR+jDYzvdmiCqeyDF09QcvjFNNS9hwo+L6UNFq8MqWMp3QjR+4QBRbxb1989d5nG67OsT20Ztb9E1Ogq8Zu2a9tv0OUpykeqXtoKKgUNeisek7iGAt9msMpY3pxiRHbEk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730641364895656.5728659164095; Sun, 3 Nov 2024 05:42:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7alH-0006k3-Cc; Sun, 03 Nov 2024 08:35: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 1t7alE-0006fV-T0; Sun, 03 Nov 2024 08:35:21 -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 1t7alD-0001YB-En; Sun, 03 Nov 2024 08:35:20 -0500 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a998a5ca499so443566266b.0; Sun, 03 Nov 2024 05:35:18 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.35.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:35:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640917; x=1731245717; 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=dKFAh2MnjhZ1jF0dRDKV/YEAdE5+3y61mz+4DueAPJw=; b=TB8rMvLCrK3PU2S1JF5qsrsRmkccIenPfMEUeuKpcqwRXKe5+fl/AR5GlxxoIdlWSU ayisoUbQtIflewMggyV7MuDZVQ5YnxkhYicg3yA62na7fWzr5ceZxn0b/sslWAX9dcNp /Ynyi5970dKZn3OEvgrpaT6rI+SeGuxBSG5moB9UzIH5/kx4wcfU/MhZicVMLfD7MVHQ yeJm5XcfpuCXeem0Ra8gysp/zeQ5TcmzI583EUCru44lf3MWADiOFc+vt2TjoADTxM6O VhjRK2oBP4afDc+l1YOEGGPcCcKmEs2LdQl4GTMp7sVFQ4rx9kDFjK4Ucxf6mydzemwx iJEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640917; x=1731245717; 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=dKFAh2MnjhZ1jF0dRDKV/YEAdE5+3y61mz+4DueAPJw=; b=PA7r9FvBIdNUlVvPnsz5vmmQqdD/K7sjxb/GDemc0AmJWbzVvZ3owUiakTvRt0WwJv L8jF9PSYKukfI83AOHk0kHvXIm+sOn1iKml1iaZ2oRfQCUGH+mC+JBDlzMgX8SUQ3ab6 k6HxGO9pZ+c9uQAgMSqC9B9bmbU6V1kIRJw+WMQpNCkGX8/rtB/2HONBEA0UAyNr4oiX KMLdtJfx3N9sO2Mo054Ns81tYqcMcX3ewa9KZrsqO34FafziTXx0QfFC64nvXFSpFnXJ ayODfTeXLL3+vxL6T473QItJ1jP2gNdkB1oXFFNuhjc8nQ5bJsal2C5+SkQ7e0uTbKX7 HBYw== X-Forwarded-Encrypted: i=1; AJvYcCVhBYS+ERJING0QUKxq1mTesDJy/AzEiEhWy77kecfAbfbdB10h8kmf5RHoy8yx9eEV2E0Ajwx3mO4=@nongnu.org, AJvYcCXtSENWWkNPv70ts7r0OQIQhgy5+Ctdzis89FsSEhNkjxuhsxWgUBmDuqJcGQGyE67w3hnUBXRrINHa@nongnu.org X-Gm-Message-State: AOJu0Yz1Mu5HpGBfzeNFA9jlvDVXyEnx7rGhNY9RsOP6Qsx3E4bLzlt4 JMJnWYFy/5ihLSRON5Z9/2Q2A5s1JiasViQJFeaB6uDuxm9NDFv68v8xsQ== X-Google-Smtp-Source: AGHT+IHLUHMg6DKNnMQwTTj7ahrL/XdEShaCsfcEDWq4r0QiHLHEzLbnKyt4GkcyPClIdjdLqNxcIg== X-Received: by 2002:a17:906:f8d1:b0:a9e:6e77:3ecd with SMTP id a640c23a62f3a-a9e6e77407bmr699875266b.54.1730640916913; Sun, 03 Nov 2024 05:35:16 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza Subject: [PATCH v4 26/26] MAINTAINERS: Add hw/gpio/gpio_pwr.c Date: Sun, 3 Nov 2024 14:34:12 +0100 Message-ID: <20241103133412.73536-27-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=shentey@gmail.com; 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641366655116600 Content-Type: text/plain; charset="utf-8" The device is only used in the ARM virt machine and designed to be used on = top of pl061 for use cases such as ARM Trusted Firmware. Add it to the same sec= tion as hw/gpio/pl061.c. Signed-off-by: Bernhard Beschow --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index a8f39aeb6f..5dd35f87ff 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -651,6 +651,7 @@ F: hw/display/pl110* F: hw/dma/pl080.c F: include/hw/dma/pl080.h F: hw/dma/pl330.c +F: hw/gpio/gpio_pwr.c F: hw/gpio/pl061.c F: hw/input/pl050.c F: include/hw/input/pl050.h --=20 2.47.0