From patchwork Thu Feb 22 12:55:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 774863 Delivered-To: patch@linaro.org Received: by 2002:a5d:6ac2:0:b0:33b:4db1:f5b3 with SMTP id u2csp748839wrw; Thu, 22 Feb 2024 04:57:26 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWWxlMUUDtUBmciNiD2XLteMakN8znizC6+Ub+vOEi1nRszqyhbV1PvS9KrBkrcY/BMF8/40d5AfR2Ek2viDqxd X-Google-Smtp-Source: AGHT+IGzRxnzkPfJ634n3JVuCTkffov9UKyvWbAMu9Giy6YCmsXcPQFJantAjNV5hdG7ZLne8q0l X-Received: by 2002:a05:6808:1141:b0:3c1:836d:4def with SMTP id u1-20020a056808114100b003c1836d4defmr233729oiu.26.1708606645917; Thu, 22 Feb 2024 04:57:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708606645; cv=none; d=google.com; s=arc-20160816; b=rDjjoescgyg5MHXbrl1Y6vG3hWqIw0zxOKv2uVbMrezkt7OGkFfmFQZ/pHaXDQMD28 4sqq4l9yYZHVTue5Z5GvbSCoQ11IJ522FkIn3cZhrvzNDCnxvvCdcml5f56FcEqZxRxe bBqX7Q6D+3XrqQsuxypvzJ6OwJfJAadDaI/so1L4yF4rRmQlisWAuTHNMTEja3p8rNv6 Z4EiHP8/Cpw83k/UmXqaTMXR02KIvhYb0I/pA4dENhmjELQNCwDpRdEQ1c2RnciMnr3u fHjn7r9N+sfUohyxW9UEj6NDH/amagqQ7ty0t896QKwY923AA8uiYjzdgN1VCOW4a1it GXCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=+ZxPkAn9Il3IN8rHQ8R89Mlj+pjG0aoXx4zL2lsx2sI=; fh=g6vbbUUu5Cj/Jny1xQBOuSHi6CiDRd47loHUBlytq5E=; b=QeIONjxzIB0JQFxZWgWIOVJcqsxGMIBnsVKcSCrc6UXMBc9beTCf1ve4BzRQfUJGXw 9svlNARc5gjn64yOhsLKBuTGmrFLWw7Jz5d0JeMIME6QpyQcSQ+mmDxcfM27ZXA7sPfV iyLYn9NLowoxgEbWkGpS63ZrqCHYndysKcfWkxiFWHG1SfkngrRIByTE/zfQjaAQSqaC ZcAcwv0Fwn1CZRvNjvMzufa9ieboqxX3At8FR3IfB9M4rzkP+7GpTGc8yt+t4LmPtddF aJAgOuf8nwr16TgPOkM1QMGl7lTHJWteOS9lC5YAV5weiJx67B0P7njouGKdijkJQyy4 WDQw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oNe5tyfy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c9-20020ac85189000000b0042c68e14191si11917027qtn.586.2024.02.22.04.57.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Feb 2024 04:57:25 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oNe5tyfy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rd8cA-000647-OV; Thu, 22 Feb 2024 07:55:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rd8bq-0005z3-D6 for qemu-devel@nongnu.org; Thu, 22 Feb 2024 07:55:32 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rd8bi-0004cX-Tb for qemu-devel@nongnu.org; Thu, 22 Feb 2024 07:55:29 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-33d18931a94so1440581f8f.1 for ; Thu, 22 Feb 2024 04:55:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708606520; x=1709211320; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+ZxPkAn9Il3IN8rHQ8R89Mlj+pjG0aoXx4zL2lsx2sI=; b=oNe5tyfykKfCzfD+slmgMUWIPWjKMm2BsriwlZScoK20E13vvlcvHfYeewo+nOv7Rm UG/TMbNFgOrS7Ivdg4uSDgD+r409n4KH4cd4wArB3qR2pq7gDAn4phDnglZbW+65FFrc pDZ09q7msddq7QnS80yp/UOTlOwkM05LUmZ2uCgyJd3UnAmFixkJVZsNLyR6DKNFJW3K Sbqg8IV57ZsxwgiDsjE3Bmto9IhliSlvcHKbweKmt30ze1lAspjAD0mmH9HfuxdONjea wX2pgMchSg3lIh6r8embP1z87BEjzBxi8nDiG3QEzjBUNzmIh9RBCZiuM7BIac0EFI5m 5ztg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708606520; x=1709211320; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+ZxPkAn9Il3IN8rHQ8R89Mlj+pjG0aoXx4zL2lsx2sI=; b=iTZVihCaF29b+tRgIh/lixgwRw9rGiPaudrGDzrrTfQxMrqyMH37YK7hrWdA6YFfQT 80XHVD8JpaGMrndeD1FdKyI49/uH+C1INrCpUi7Hu/QDvAxwEE4i3aRt9tCOEm7UPwMI 7bEFs2bkc0+GhQXXUXEtCZbfQLKjYJRGwzFm8Wqk6K5or8sqritKufr27uIJxC34eI52 IIWTPC+xcp9E1Hpumox6KaKKdMZwvfjwK20aOuECwIvFjkXwIYCANVyi9ZAmjrr41IMx q7pIanP4qfewoKwiqqUWM+FxQfAHrkibu3ajb6dJFNjjcy+UaPx1VCth8Jry0AqqY6Yw GJMA== X-Gm-Message-State: AOJu0YxNaGO48aJfNB4i+Gj6W1EzApSjkJMHLq/63MsmuMWvb/NjTLDw ViFpHWgApbYo7tspCwoSQqlVcOVwgNf/1dAhjg2fEmiZgC8To4HSDfD3onHzxyGD45SRo+JWp3h fbp4= X-Received: by 2002:a05:6000:10c6:b0:33d:7d88:bd3e with SMTP id b6-20020a05600010c600b0033d7d88bd3emr3316027wrx.43.1708606520647; Thu, 22 Feb 2024 04:55:20 -0800 (PST) Received: from m1x-phil.lan ([176.187.211.34]) by smtp.gmail.com with ESMTPSA id k1-20020adfe3c1000000b0033afc81fc00sm20170135wrm.41.2024.02.22.04.55.18 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 22 Feb 2024 04:55:20 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , Richard Henderson , "Michael S. Tsirkin" , Marcel Apfelbaum , Aleksandar Rikalo , Gerd Hoffmann , kvm@vger.kernel.org Subject: [PULL 02/32] hw/sysbus: Inline and remove sysbus_add_io() Date: Thu, 22 Feb 2024 13:55:08 +0100 Message-ID: <20240222125517.67131-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org sysbus_add_io(...) is a simple wrapper to memory_region_add_subregion(get_system_io(), ...). It is used in 3 places; inline it directly. Rationale: we want to move to an explicit I/O bus, rather that an implicit one. Besides in heterogeneous setup we can have more than one I/O bus. Reviewed-by: Peter Maydell Message-Id: <20240216150441.45681-1-philmd@linaro.org> [PMD: Include missing "exec/address-spaces.h" header] Signed-off-by: Philippe Mathieu-Daudé --- include/hw/sysbus.h | 2 -- hw/core/sysbus.c | 6 ------ hw/i386/kvmvapic.c | 3 ++- hw/mips/mipssim.c | 3 ++- hw/nvram/fw_cfg.c | 6 ++++-- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/include/hw/sysbus.h b/include/hw/sysbus.h index 3564b7b6a2..14dbc22d0c 100644 --- a/include/hw/sysbus.h +++ b/include/hw/sysbus.h @@ -83,8 +83,6 @@ void sysbus_mmio_map(SysBusDevice *dev, int n, hwaddr addr); void sysbus_mmio_map_overlap(SysBusDevice *dev, int n, hwaddr addr, int priority); void sysbus_mmio_unmap(SysBusDevice *dev, int n); -void sysbus_add_io(SysBusDevice *dev, hwaddr addr, - MemoryRegion *mem); MemoryRegion *sysbus_address_space(SysBusDevice *dev); bool sysbus_realize(SysBusDevice *dev, Error **errp); diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c index 35f902b582..9f1d5b2d6d 100644 --- a/hw/core/sysbus.c +++ b/hw/core/sysbus.c @@ -298,12 +298,6 @@ static char *sysbus_get_fw_dev_path(DeviceState *dev) return g_strdup(qdev_fw_name(dev)); } -void sysbus_add_io(SysBusDevice *dev, hwaddr addr, - MemoryRegion *mem) -{ - memory_region_add_subregion(get_system_io(), addr, mem); -} - MemoryRegion *sysbus_address_space(SysBusDevice *dev) { return get_system_memory(); diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c index f2b0aff479..20b0300357 100644 --- a/hw/i386/kvmvapic.c +++ b/hw/i386/kvmvapic.c @@ -16,6 +16,7 @@ #include "sysemu/hw_accel.h" #include "sysemu/kvm.h" #include "sysemu/runstate.h" +#include "exec/address-spaces.h" #include "hw/i386/apic_internal.h" #include "hw/sysbus.h" #include "hw/boards.h" @@ -727,7 +728,7 @@ static void vapic_realize(DeviceState *dev, Error **errp) VAPICROMState *s = VAPIC(dev); memory_region_init_io(&s->io, OBJECT(s), &vapic_ops, s, "kvmvapic", 2); - sysbus_add_io(sbd, VAPIC_IO_PORT, &s->io); + memory_region_add_subregion(get_system_io(), VAPIC_IO_PORT, &s->io); sysbus_init_ioports(sbd, VAPIC_IO_PORT, 2); option_rom[nb_option_roms].name = "kvmvapic.bin"; diff --git a/hw/mips/mipssim.c b/hw/mips/mipssim.c index a12427b6c8..9170d6c474 100644 --- a/hw/mips/mipssim.c +++ b/hw/mips/mipssim.c @@ -28,6 +28,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/datadir.h" +#include "exec/address-spaces.h" #include "hw/clock.h" #include "hw/mips/mips.h" #include "hw/char/serial.h" @@ -226,7 +227,7 @@ mips_mipssim_init(MachineState *machine) qdev_prop_set_uint8(dev, "endianness", DEVICE_LITTLE_ENDIAN); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, env->irq[4]); - sysbus_add_io(SYS_BUS_DEVICE(dev), 0x3f8, + memory_region_add_subregion(get_system_io(), 0x3f8, sysbus_mmio_get_region(SYS_BUS_DEVICE(dev), 0)); } diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index e85493d513..fc0263f349 100644 --- a/hw/nvram/fw_cfg.c +++ b/hw/nvram/fw_cfg.c @@ -27,6 +27,7 @@ #include "sysemu/sysemu.h" #include "sysemu/dma.h" #include "sysemu/reset.h" +#include "exec/address-spaces.h" #include "hw/boards.h" #include "hw/nvram/fw_cfg.h" #include "hw/qdev-properties.h" @@ -1142,6 +1143,7 @@ FWCfgState *fw_cfg_init_io_dma(uint32_t iobase, uint32_t dma_iobase, SysBusDevice *sbd; FWCfgIoState *ios; FWCfgState *s; + MemoryRegion *iomem = get_system_io(); bool dma_requested = dma_iobase && dma_as; dev = qdev_new(TYPE_FW_CFG_IO); @@ -1155,7 +1157,7 @@ FWCfgState *fw_cfg_init_io_dma(uint32_t iobase, uint32_t dma_iobase, sbd = SYS_BUS_DEVICE(dev); sysbus_realize_and_unref(sbd, &error_fatal); ios = FW_CFG_IO(dev); - sysbus_add_io(sbd, iobase, &ios->comb_iomem); + memory_region_add_subregion(iomem, iobase, &ios->comb_iomem); s = FW_CFG(dev); @@ -1163,7 +1165,7 @@ FWCfgState *fw_cfg_init_io_dma(uint32_t iobase, uint32_t dma_iobase, /* 64 bits for the address field */ s->dma_as = dma_as; s->dma_addr = 0; - sysbus_add_io(sbd, dma_iobase, &s->dma_iomem); + memory_region_add_subregion(iomem, dma_iobase, &s->dma_iomem); } return s; From patchwork Thu Feb 22 12:55:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 774858 Delivered-To: patch@linaro.org Received: by 2002:a5d:6ac2:0:b0:33b:4db1:f5b3 with SMTP id u2csp748465wrw; Thu, 22 Feb 2024 04:56:21 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXtQw/gm9ZT4zj65tHoewbY144OFmsfFGLrFeWRDtloZMVDpf1uaVZ+8XX95zh51raXblI5JC9MxaS46DIxlYY3 X-Google-Smtp-Source: AGHT+IHQV3LG8HXfcwFkNLwFMwi6W5zCmeDsr6U6mFFQRJ04ilrF1uKMktxoUb0t/j+AyLFWUKD5 X-Received: by 2002:a81:9b02:0:b0:607:9613:2afa with SMTP id s2-20020a819b02000000b0060796132afamr18852463ywg.0.1708606580923; Thu, 22 Feb 2024 04:56:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708606580; cv=none; d=google.com; s=arc-20160816; b=AdCCSLxNgJ/nDzcb4agOeE91arOjyN6n9r4+3XaVkncd9zk0Sy87Xyp5gcel6tY7S5 orEsnNy5IVIx+obhiyH9t9bO0YRgbqHrYY3RD8AYbJyq/gdYUPJcL5Vhy9IpRRn58K12 O6HSKD1ERyTpzkNE72CmPMasAVRMi8RKGmF/k3kNkfLtb7giLb3aN32Fn0CZ4Qs3hMOV ytIZFWIhbhCCd7cWBSRNBMY75PA7AqVCI44n/9K24VRgy8mb3rhe8R0+pCAkQWqje4/C FXSpXjUNsqH56yO6fcr8EQnv6fJFjydac80CbyFvT7FXonhMBGeCVe1DAxKLZBJqi2E5 i8Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sTbUaEgNgo7IbUetOjGywYbHIYWFMzt0Rp2Y/fJHQw4=; fh=9eRC+sBMg7AaWGEWlJwk5VqXCIYbb/dSVptzd91eX3w=; b=MsfNRgXIwCdsFkUfyi2IwJByqCffFSZYR+O1SKc+yCL3suMgJS+Zu1OUXQ1KO+PPe/ LCO7w07h1fMKJb6Mwv63O8ltenp7yHxANzXdw3h0Gs1+KrWuDcD7xaWpBf781LlvOyAN Qc5dZ84nCpL9fZ61OCR9177uieds2VY/P7Nhe/fCnAESnO6WK/58nIPr5weGyP5fze8s g5HeB2AzZJWJW4oGbiWx2sLDB4Dqh0XmuLS1izWRyC7uR+EzWzUinNM2yWhxK/9DuSal bE0sgeMgnBh06kMlmk/4ephA2YdOP3j6Juu9Q8GTfVYOy4R5AlNUt98FclKqwPxdN2ne C8+A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fFek2Rt8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w2-20020ac843c2000000b0042e3d122afcsi2679790qtn.614.2024.02.22.04.56.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Feb 2024 04:56:20 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fFek2Rt8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rd8c9-00062M-4R; Thu, 22 Feb 2024 07:55:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rd8br-0005zA-KF for qemu-devel@nongnu.org; Thu, 22 Feb 2024 07:55:33 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rd8bp-0004kf-7n for qemu-devel@nongnu.org; Thu, 22 Feb 2024 07:55:31 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-41272d42207so17108825e9.2 for ; Thu, 22 Feb 2024 04:55:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708606526; x=1709211326; 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=sTbUaEgNgo7IbUetOjGywYbHIYWFMzt0Rp2Y/fJHQw4=; b=fFek2Rt8y+7XcwctElbLG9CYv1Rz+85hP4Ev8syfC6g9XZjNm4wu8/9sRizbWHuF56 b4qd3UD6J2jK/Afi6p5SFpaqhNtCMSiCp8LN9OP4pJRHG4OBUuo4+zrecnY6EKIcv8Dt zcIpoySsCpfh1D6pH8W2NuQ+zobvKbvlQQpaH+9E7kYMwUyhs9oSl0pW8Oaey5bhjRJG jHmjaZuN5FsmYkCXrhvg9T4vNQXjm8hELlvBEJZe9YnsdInyjjG9tLE5UopdP2S85Ung 747ldvVdQYZVsS1i9iaXx4iAoYUd4BjKAPUaO3FahjmndFygfCqGTIc2nlLCXcu45nUA x/WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708606526; x=1709211326; 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=sTbUaEgNgo7IbUetOjGywYbHIYWFMzt0Rp2Y/fJHQw4=; b=UJ0naUXyLwIDo9CZk+7IaJ8Go1ZKJ1TqxwHf9AQhMkanef2OgKDc3YEB3Fynn+xITA /ptv2lE8nHouQ2Uwc35GO0KFKrCEgho85j3LrJg096cT3fnRkNLjE1QAU5m0EEVWYhyj 0agtBndRbGh5aKj/Cfnf2SkAJZTR0Q5xhhX31Qo4ifGl53tznzzDeQKUgJkFfq60wh1W bL6xX2H4FEPoyagnWN9X8FtBGdkZtYsaFkmuVCla9IKANzxxSCMdp1BZ9IdbRdvdT+0X EpXgQDSNzv8F426ihHzD/McU1iYD2qOQ+l9X+qGutvn4hqI6sU9J5ZCHH36aHX9x9YeY tvWw== X-Gm-Message-State: AOJu0YwV7z7eIow4MgAxTwciSyrptdJDuhZQNnvX8GmHDMPoYmSnZ0DS zgEEiXZpUaSd6WpGgbUtvTZJcWPe702osRXQkTEpQMtCeAn0AdI3iz/ATz9qz8nEFFbaC/HFlja TRxA= X-Received: by 2002:a05:600c:21d8:b0:411:e398:ca7a with SMTP id x24-20020a05600c21d800b00411e398ca7amr16491946wmj.39.1708606526348; Thu, 22 Feb 2024 04:55:26 -0800 (PST) Received: from m1x-phil.lan ([176.187.211.34]) by smtp.gmail.com with ESMTPSA id v1-20020a5d59c1000000b0033d9c5c5557sm944138wry.15.2024.02.22.04.55.24 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 22 Feb 2024 04:55:25 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Nicholas Piggin , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , David Gibson , Harsh Prateek Bora Subject: [PULL 07/32] hw/ppc/spapr_cpu: Use qdev_is_realized() instead of QOM API Date: Thu, 22 Feb 2024 13:55:09 +0100 Message-ID: <20240222125517.67131-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240222125517.67131-1-philmd@linaro.org> References: <20240222125517.67131-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Message-Id: <20240216110313.17039-4-philmd@linaro.org> --- hw/ppc/spapr_cpu_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index 0c0fb3f1b0..40b7c52f7f 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw/ppc/spapr_cpu_core.c @@ -245,8 +245,7 @@ static void spapr_cpu_core_unrealize(DeviceState *dev) * spapr_cpu_core_realize(), make sure we only unrealize * vCPUs that have already been realized. */ - if (object_property_get_bool(OBJECT(sc->threads[i]), "realized", - &error_abort)) { + if (qdev_is_realized(DEVICE(sc->threads[i]))) { spapr_unrealize_vcpu(sc->threads[i], sc); } spapr_delete_vcpu(sc->threads[i]); From patchwork Thu Feb 22 12:55:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 774864 Delivered-To: patch@linaro.org Received: by 2002:a5d:6ac2:0:b0:33b:4db1:f5b3 with SMTP id u2csp748841wrw; Thu, 22 Feb 2024 04:57:26 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVOhI4ehELHuuCqgvPheTR1E6yKoT+z1elU35a2ZbTi+aIJAyAW3IZbZitTTGekWkbbjm9W0IaBe+SZi6Pg3vwr X-Google-Smtp-Source: AGHT+IEWIsRSdnxH+HTiGxP8G1pusDNh2YiYZseHiZ7bzYfD18katwfuqGSpFsaT8e2UzDa4HhIp X-Received: by 2002:a05:6808:14ce:b0:3c1:5dc6:d9ba with SMTP id f14-20020a05680814ce00b003c15dc6d9bamr12874811oiw.5.1708606646057; Thu, 22 Feb 2024 04:57:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708606646; cv=none; d=google.com; s=arc-20160816; b=UpbO7Qb0V8sHIvKtsN2ckEXKMpNBF+5ZyYzXOpilgq/2ppa4dveYY0CH2s542srxgc UczpHYajtQgr9TFL3UddOLKDQxnqWqXnTwb2vL32D47tEg65GhEQQ873Ls+RH8x6jqHK F21P017/p36YoagceKQbjLe0nXk8vlfFDK3rrwB8DE8B9AeWOey/AowKnvXddqIFdzi0 I4y1AhStfNIoqQmmR8zXrFtjGhb9sawe0ptQBVvE9G7X4nbG1l1ZZyCDG3SMZ+RMDVON t3rIcXEz7hl87dWq7bS7UxzsmJE/9LT7mDI1qpMC6dbRSeLUrhWFcE4T9Due/3h0xFmJ 5o1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NITcCbTrMmjEc1uhZkNKiyfNNYFXJBPxx+OU8JE8tD0=; fh=gmo/VroZxM/dMZgdU3RcV0FNbjNuQkMFuxKaZpuCzsk=; b=CaM/m46ZnK6gA/eGpLgohrKxytCONmB6BEulelFVMOaaQqHC5t9vbXHNq7tMNEOqE7 QOdOA4MiE02g+xEfK3hQJrfohroyTmQV6XOGdk77BbhjCmQ22X9yfK84OvzqVLDXYlTA vhgrv5kR5QsmGaYrzzxzTju0zkjF2aAPiPmM3cze4Sj5gSdzWSFLwbyGrAJBmItwDDnc xLuZnaT2otKXOwASbNUfzrxUfHRInM6cGzXhTy5ewW0ZM02s1FfNKIeLvTGfpslZXrDH WBKYwkUyETBwOPYCfNZqzGpA4nVmiKmiswCVO7Q6ViGvY/M7c7GCjN7CrueQQy0u4dgl rSKA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NiPFoOWx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v35-20020a05622a18a300b0042e4fa976c6si907313qtc.365.2024.02.22.04.57.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Feb 2024 04:57:26 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NiPFoOWx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rd8cC-00066D-6e; Thu, 22 Feb 2024 07:55: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 1rd8bw-000607-Px for qemu-devel@nongnu.org; Thu, 22 Feb 2024 07:55:39 -0500 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rd8bu-0004mm-27 for qemu-devel@nongnu.org; Thu, 22 Feb 2024 07:55:36 -0500 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-512bce554a5so5254872e87.3 for ; Thu, 22 Feb 2024 04:55:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708606532; x=1709211332; 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=NITcCbTrMmjEc1uhZkNKiyfNNYFXJBPxx+OU8JE8tD0=; b=NiPFoOWxhJ0SaA3o8YgxJRYJ/wOrTw4etA1Vu+yYed4+zNwk8oOD9uWzpBvfTpSukJ QmJADSLv7mBNCMeyKN9Mi1AQQXlUpOubhNEDIxTj3grzxOdvk/h7rj9Zy+KhFegUrpTN 4zl9NtKGbTXUUZEJ5f+yp/4L7h2TkbwvZmYoVhnXjX346grm76ntgIZF1kzzgLqJ62aE vWv/cA2qgvcyK//udiucbKpwc6sHLyKPju9fJj3rgF2c6Z39tiPxCqPLcFcbfi+b5u6k MOSna1OM2yG+JpeJhK23MwNXwUBtZIRJn/QtXc0OddVA0bGODYSqMC3NE4SM8dxy8ah+ V0ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708606532; x=1709211332; 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=NITcCbTrMmjEc1uhZkNKiyfNNYFXJBPxx+OU8JE8tD0=; b=xL5zgXo1voAnxpAEurYsExbGmhVal+pQWpqL8f1xKMi92sRQGCRSAE43fp6U2mlV/i 2253glNf1la3VH3XUOKIaxeO0yW0EHee8ZuuHjBtSAeiZKlUrxjQec034P1LawM6l1Qg SXMyWYm7kvJkZAybVJsU2B81o9tA3bKE0hbV8zE6IPXbUSpfEL6BVqFf0JJLhnsatCSL eSYc/Vvgd1mWBPj0VGh156jezWR7PolI5kToLwP+65KLTv0O8STXLItoANEK8xrynA98 y5VPUel9Z3L7TgEdrCjTfqGCZYI4+/esVkfbMFXPkEqCavjRYnHv73dJcgvxGNAVxJvr bKsA== X-Gm-Message-State: AOJu0YwEi7ci3Vnf+d7HBdS2zRd2EwQSCV5OSrLwnDJfQ0rW3NW34uHe /HpkycEiZgDksDI96PsphIdCRJ2IGw0QGlI9djxWiia7tXyOssReZ6xG3hqFnC85huka1B78WtP 8JpY= X-Received: by 2002:a19:650c:0:b0:512:a5c6:499c with SMTP id z12-20020a19650c000000b00512a5c6499cmr9291184lfb.12.1708606531957; Thu, 22 Feb 2024 04:55:31 -0800 (PST) Received: from m1x-phil.lan ([176.187.211.34]) by smtp.gmail.com with ESMTPSA id p1-20020a05600c358100b0040fccf7e8easm6348704wmq.36.2024.02.22.04.55.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 22 Feb 2024 04:55:31 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?C?= =?utf-8?q?=C3=A9dric_Le_Goater?= , Nicholas Piggin , =?utf-8?b?RnLDqWTDqXJpYyBCYXJyYXQ=?= Subject: [PULL 08/32] hw/ppc/pnv_bmc: Use qdev_new() instead of QOM API Date: Thu, 22 Feb 2024 13:55:10 +0100 Message-ID: <20240222125517.67131-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240222125517.67131-1-philmd@linaro.org> References: <20240222125517.67131-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::133; envelope-from=philmd@linaro.org; helo=mail-lf1-x133.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Message-Id: <20240216110313.17039-6-philmd@linaro.org> --- hw/ppc/pnv_bmc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ppc/pnv_bmc.c b/hw/ppc/pnv_bmc.c index 99f1e8d7f9..0c1274df21 100644 --- a/hw/ppc/pnv_bmc.c +++ b/hw/ppc/pnv_bmc.c @@ -269,13 +269,13 @@ void pnv_bmc_set_pnor(IPMIBmc *bmc, PnvPnor *pnor) */ IPMIBmc *pnv_bmc_create(PnvPnor *pnor) { - Object *obj; + DeviceState *dev; - obj = object_new(TYPE_IPMI_BMC_SIMULATOR); - qdev_realize(DEVICE(obj), NULL, &error_fatal); - pnv_bmc_set_pnor(IPMI_BMC(obj), pnor); + dev = qdev_new(TYPE_IPMI_BMC_SIMULATOR); + qdev_realize(dev, NULL, &error_fatal); + pnv_bmc_set_pnor(IPMI_BMC(dev), pnor); - return IPMI_BMC(obj); + return IPMI_BMC(dev); } typedef struct ForeachArgs { From patchwork Thu Feb 22 12:55:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 774859 Delivered-To: patch@linaro.org Received: by 2002:a5d:6ac2:0:b0:33b:4db1:f5b3 with SMTP id u2csp748551wrw; Thu, 22 Feb 2024 04:56:36 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXYf5F/U9SFNAasXEIXg1YyKNB3ZUnO21W0AKHfK7gDlmPZo/3VlQhC8cHju5GbfIoQQFK4IH5e28BLjl9fh9ru X-Google-Smtp-Source: AGHT+IFXWjvbkMPjJnwJlGwTpDQHCAYMoimLRktjsGhdxQIDYCZSOYUbcFQIJrd+/C9YWUa1Vi1c X-Received: by 2002:a05:620a:4911:b0:787:3ac3:eb6e with SMTP id vy17-20020a05620a491100b007873ac3eb6emr17740063qkn.52.1708606596659; Thu, 22 Feb 2024 04:56:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708606596; cv=none; d=google.com; s=arc-20160816; b=f3DYV6HZMzQ6OtZ6tyKAvFU8HeXf5pDvS+1YBEFD4N6s7gYGtuetWo40L7Jg7B6x31 WsRSDfDY+M+rPXifuOGCUq/Lzq0JjC+m5oi8GPjVHhxb0aZokYwaHLxdktplIPjoE5/H WVe/rKbSOg8SBVeKOrU659H9/SYMTiE+NG3f2/XpIbsRPbXxW5DhIwhi3q/8edJ4SgPt fndCqXpJJtHLyi1CwIWBDlpIKy5qg1jn7hKZPzGR2h6VOrCz7FNcL7p1R8ql3X7lVXds 39MpKawYf0gYdIkMIyI2+lKWdFFD7j7oysKSS48v2+FfUmGubmCkFSkLr6TQiKGgiRXF LOUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JspwhcdtiFe4E7MZg2XJDqNEWrT6NpNFHrvazz9D4TA=; fh=K3x3J8Xp5VU4VzsFAGde4ovaTF+xFvMCZIIYJ5u7mVs=; b=UqiJhIrqLVgQ+UQC2wTWgpx/rVKg2CV06FTu+o8HtrK60dKAYqkR8uq1wlCiH38tCk j2YArKJCAYBOM7nAm9eoKHUPXK/F1hx392REE8/cn14JhcyiZCiaA5KzVnaj1pJNIbya lyiYAhAAUFATEVNZ2X7dQi/5ylD1KEWmj/yHRNK5OmOsyQKZymHOI73sFmI06JSsYzNY 62z9gArH7yklvRsKlCtIicaZf41BSybzlVKkN8Jzy7FMiRCWjT7zJQco6bi9gNtYeKOT P6uPmfDkcs1Qni/CPin4iu/P2/6qEDU0fUkckrgJAAbMDBDkFLoG1gYQy6/8ZtJo4sj/ tNcQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yUMu3a29; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x18-20020a05620a099200b00783e46b2470si12598751qkx.600.2024.02.22.04.56.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Feb 2024 04:56:36 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yUMu3a29; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rd8cB-00065a-Kl; Thu, 22 Feb 2024 07:55:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rd8c4-000629-LC for qemu-devel@nongnu.org; Thu, 22 Feb 2024 07:55:45 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rd8bz-0004nf-U0 for qemu-devel@nongnu.org; Thu, 22 Feb 2024 07:55:44 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4128cfb6b6fso2076755e9.0 for ; Thu, 22 Feb 2024 04:55:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708606538; x=1709211338; 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=JspwhcdtiFe4E7MZg2XJDqNEWrT6NpNFHrvazz9D4TA=; b=yUMu3a29L2vgv4cUyyDs9KmC/hBnfCS2Orsr7vpoVMyk9pczuoIhTsB3ZePCykc7nD EDCjcL/ITudmpgV76u700Xl6m+kWhddLiJB9Pu168pDtWf8ZVmjsqY77sjplnzpp+AEW xjBz0AuFf5sgKw/HO2UMLSfdplJZRgVnawpI8fZetghiwDs5Xo3PZxi5ntJn2/GlE9EG MqXzRQjGI5SDaEvk6AzGqmak0mTEQLBWmVw9I7cUJnLv+NZSO4shL/xkniedc6cGJdry Ank2sA5Jcfp08O0+sANAkoLGZPYlOQBzpjdGeUDaKSQohugsokYEBHTfLZV2V4DROzLR rp2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708606538; x=1709211338; 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=JspwhcdtiFe4E7MZg2XJDqNEWrT6NpNFHrvazz9D4TA=; b=c4e68F5rpYeunf/84BL92ura2ou/lVtcXO0ArXa6DiCwagrpbx9QsujzpxtF8PZlEl U8Ot2Ku8jzFP8cE4eOE1yVRM9s+0sbTCbTPSXxuq1AfUxhPiUpfusdZmdWjUD66dcJdW feoqNuhtlS+XLwPmchk9TY7S7rJdbbJ3Fc4QooIROI81fpuprZCA4RYwOFeSAJ/uEinW NSOFVAEeqJC1CLtIS+eht95yPpghakcGIzTxvfSlsbJeGwQNp4RyAAShJzvrW5pqoQbp g0HMQQBlinQZ5g0WsDkBsnK5Ttgee3hLP80y1pcl4ab6xS0RJcR+khjEbpoZV2fmLYFb Q1BA== X-Gm-Message-State: AOJu0Yx1JdUGY2g9eBbk7SP71BufRyz5KzT79p6EDBWQdlqh/4I2+utZ OC2cFNjFX1sfta+kE1G1Glz2s6yc9zwfhBVEp9/B1zmWky/9OjEFvmJHFdw+9LRrjS9dqizeDTn RExE= X-Received: by 2002:a05:600c:1c0d:b0:412:64cb:eff3 with SMTP id j13-20020a05600c1c0d00b0041264cbeff3mr8722712wms.3.1708606538147; Thu, 22 Feb 2024 04:55:38 -0800 (PST) Received: from m1x-phil.lan ([176.187.211.34]) by smtp.gmail.com with ESMTPSA id by1-20020a056000098100b0033d873f08d4sm3626621wrb.98.2024.02.22.04.55.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 22 Feb 2024 04:55:37 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Bastian Koppelmann Subject: [PULL 09/32] hw/tricore/testboard: Use qdev_new() instead of QOM basic API Date: Thu, 22 Feb 2024 13:55:11 +0100 Message-ID: <20240222125517.67131-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240222125517.67131-1-philmd@linaro.org> References: <20240222125517.67131-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bastian Koppelmann Message-Id: <20240216110313.17039-5-philmd@linaro.org> --- include/hw/tricore/tricore_testdevice.h | 3 --- hw/tricore/tricore_testboard.c | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/include/hw/tricore/tricore_testdevice.h b/include/hw/tricore/tricore_testdevice.h index 8b4fe15f24..2c57b62f22 100644 --- a/include/hw/tricore/tricore_testdevice.h +++ b/include/hw/tricore/tricore_testdevice.h @@ -25,12 +25,9 @@ OBJECT_CHECK(TriCoreTestDeviceState, (obj), TYPE_TRICORE_TESTDEVICE) typedef struct { - /* */ SysBusDevice parent_obj; - /* */ MemoryRegion iomem; - } TriCoreTestDeviceState; #endif diff --git a/hw/tricore/tricore_testboard.c b/hw/tricore/tricore_testboard.c index b6810e3be0..c29db8b451 100644 --- a/hw/tricore/tricore_testboard.c +++ b/hw/tricore/tricore_testboard.c @@ -89,9 +89,7 @@ static void tricore_testboard_init(MachineState *machine, int board_id) memory_region_add_subregion(sysmem, 0xf0050000, pcp_data); memory_region_add_subregion(sysmem, 0xf0060000, pcp_text); - test_dev = g_new(TriCoreTestDeviceState, 1); - object_initialize(test_dev, sizeof(TriCoreTestDeviceState), - TYPE_TRICORE_TESTDEVICE); + test_dev = TRICORE_TESTDEVICE(qdev_new(TYPE_TRICORE_TESTDEVICE)); memory_region_add_subregion(sysmem, 0xf0000000, &test_dev->iomem); From patchwork Thu Feb 22 12:55:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 774861 Delivered-To: patch@linaro.org Received: by 2002:a5d:6ac2:0:b0:33b:4db1:f5b3 with SMTP id u2csp748786wrw; Thu, 22 Feb 2024 04:57:15 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVuT7D9yVgAeWSbCAWijJ0han6/F9HCg7AvSvQpEZex1su56d7UetLa3PP1hq2+wdmC95WjWddjKyDuYah6Ffsx X-Google-Smtp-Source: AGHT+IFUT5FX5NRYVKdQKWT9Db2nH3caWrx18yxb0kfeMMF+Jxt3nGNkPxRU60pBs4IYwO3S9oHF X-Received: by 2002:a0c:f551:0:b0:68f:4d2d:3f30 with SMTP id p17-20020a0cf551000000b0068f4d2d3f30mr13516955qvm.51.1708606634993; Thu, 22 Feb 2024 04:57:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708606634; cv=none; d=google.com; s=arc-20160816; b=bhv+v0aOHV4RHn0Z94MCmLj2uQu6Ks0IWep5afIZuyl/sSF3J7BbSDaTa8/kxY/Ehx rQ6cGwx/dr8GAKzl2wDCv7bU+t4wdBYQ2LzF45zwYvPWa+o7Tpo0RTqXmgeR2SPz9HVX 8u2ffXNl1HNvTeNuZMRvWkKtbrdeXbVV63XgToIXeYM+UlyF5wyYkto0W7I1qZ4i6dSi fE1yPRcNrCO8J7qFTkQefS4oSzoQoLMxAR3ilXNUQKYhSAEwMJS2p51gKbBWX45ge+Df uYpMNh+eutVSj7W5aHuJ1ckJKjIoD2Kn88EpG6I7Z8lVGNnCMHwIWOXNXnd11vl8sqqs kBpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uRGIpW70+JCu0X7x3ntc2AVzHCNC5IMABlVBK4pcGGo=; fh=hoobuGUYYDvH0Swf9XQmQaugkFFBZJv1DqRpGZMnoV8=; b=TLsyaadxapRMNCnrKDx6vBZeyb+a/mShgwQ1Fxb23hqnc7z9g6YHS4+0Q7SYsmEgeC WkK/CclmFcxL/T6IhaR4Hsv7n8LQfIP71XMjjsAWTL6+ZbcE9FcexxtPuRsg2S5jphYw IRJiN6e5aNpMsf3h1YmVU2HsmgD52V64U1nhe8MuoD9CwGMsVjkDEvsvR/k1nb9VTQzg p61ZpXJNnUArU8yZ16h/B3n30o2rf/E6XSZQQZ00bjtVqibJEUjZn9DWsD3KlBgNeb7p JD9KpyMehU5CAjQSHvuWs3HiN/yppYGHnY3aU1zxuIH6XVLVyefIoYTpis6JHf2WcpZo EUMQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NqnX49VQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 7-20020a05621420e700b0068fb8647084si1449725qvk.250.2024.02.22.04.57.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Feb 2024 04:57:14 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NqnX49VQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rd8cE-00066f-6q; Thu, 22 Feb 2024 07:55:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rd8c9-00063N-4D for qemu-devel@nongnu.org; Thu, 22 Feb 2024 07:55:49 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rd8c6-0004pU-3z for qemu-devel@nongnu.org; Thu, 22 Feb 2024 07:55:48 -0500 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-33d118a181fso4157753f8f.1 for ; Thu, 22 Feb 2024 04:55:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708606544; x=1709211344; 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=uRGIpW70+JCu0X7x3ntc2AVzHCNC5IMABlVBK4pcGGo=; b=NqnX49VQEUL4rdFt3fe5ZFoouFmxkrr3E4MO2d3GD8XJUMjQkWPr4IVATuHIvsaVSH Pmm/1bUCy20vKN8qA+8NBf+2djsAEzPDUespYJTFTR2akoFOcHnkZQH3WuOjT87wqxW7 BROQ4G8eHn+y8qhh1HvVDjYMhfU1QpdCuS9tXjphGslp343lC8SdPCyprTu+VtGwz0JG Pr8RrZD4E2B5IDVG6IFu2qLClfcdIVWmqls4mbxn7JF51iYL2Y80771Hlt8ocLBedy58 aDRmlZAnk4sDwN0Djvm2x0CH/eABrQSb1OMNxZKqGDmHpIVXUf5eabORB3artj2Ljwyl 4cRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708606544; x=1709211344; 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=uRGIpW70+JCu0X7x3ntc2AVzHCNC5IMABlVBK4pcGGo=; b=seqrvQcdo5tOZmGxkmUwBGMhrMpsVzYvcfkBkunqVrT5O+cevnbR+AcWc/oINVm1+g JUk2q0N9JPbQHX2Wn1G+8bb0My/8daTdwD7Izr3lYlt5xH2hB0UtGTWjCEFhKYPKc9un rD9bQUtUZ0+V8MCyvSuoK+/OUSd+RdqBb/n9Z7Vsw9eTAdWu9sU+jMPd3WOqhkxSOi04 XBiT6ygRXpjmwZYAiviZiPYdIfOTJgBhJjZuF7X49r2rOcPs9oGrhgnoEqJrYZXpHXc/ s5pk5EcRCh2CyEYbz2G1u9ptOYaUJunBjn7Q3cH0tRU6JOCfrPN5qaMcUJ2EOs34qktI dHAQ== X-Gm-Message-State: AOJu0YzSwoGqtzh1EEjVmttSgcozJa726McA2qxsLJEtFIGDK2lwBaQH +cFBpYKSi3Q2z69c2kAKmgw0sK8AzQJC7qO3j/EbkJqnO/UCFAKnK9pFZfRNo19ofJruT0EeVq3 fhXc= X-Received: by 2002:a05:6000:1f0e:b0:33d:6fd8:90d3 with SMTP id bv14-20020a0560001f0e00b0033d6fd890d3mr6031207wrb.4.1708606543937; Thu, 22 Feb 2024 04:55:43 -0800 (PST) Received: from m1x-phil.lan ([176.187.211.34]) by smtp.gmail.com with ESMTPSA id x11-20020a5d444b000000b0033b7ce8b496sm20291719wrr.108.2024.02.22.04.55.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 22 Feb 2024 04:55:43 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Paolo Bonzini , Richard Henderson , Eduardo Habkost , "Michael S. Tsirkin" , Marcel Apfelbaum Subject: [PULL 19/32] hw/i386/pc_sysfw: Use qdev_is_realized() instead of QOM API Date: Thu, 22 Feb 2024 13:55:12 +0100 Message-ID: <20240222125517.67131-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240222125517.67131-1-philmd@linaro.org> References: <20240222125517.67131-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Message-Id: <20240216110313.17039-3-philmd@linaro.org> --- hw/i386/pc_sysfw.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c index 2dcaa116ad..b02e285579 100644 --- a/hw/i386/pc_sysfw.c +++ b/hw/i386/pc_sysfw.c @@ -95,17 +95,15 @@ static void pc_system_flash_cleanup_unused(PCMachineState *pcms) { char *prop_name; int i; - Object *dev_obj; assert(PC_MACHINE_GET_CLASS(pcms)->pci_enabled); for (i = 0; i < ARRAY_SIZE(pcms->flash); i++) { - dev_obj = OBJECT(pcms->flash[i]); - if (!object_property_get_bool(dev_obj, "realized", &error_abort)) { + if (!qdev_is_realized(DEVICE(pcms->flash[i]))) { prop_name = g_strdup_printf("pflash%d", i); object_property_del(OBJECT(pcms), prop_name); g_free(prop_name); - object_unparent(dev_obj); + object_unparent(OBJECT(pcms->flash[i])); pcms->flash[i] = NULL; } } From patchwork Thu Feb 22 12:55:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 774866 Delivered-To: patch@linaro.org Received: by 2002:a5d:6ac2:0:b0:33b:4db1:f5b3 with SMTP id u2csp749133wrw; Thu, 22 Feb 2024 04:58:12 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXp0/C+QxEfxCWZvJP6XX0IBFnFyu4jj7fHiYmPbfs8RgcBdZQpbNmGgUyHE7llne2QNdTKWpdrn5gYJph4ZENf X-Google-Smtp-Source: AGHT+IF8l0M1N2iQnlt95HYgMGsaBSyR0Azu9FDTOUSo5KRIvM4kYTzkX8MXBM5fWXhcVQysVWQk X-Received: by 2002:a05:620a:1002:b0:787:17be:2999 with SMTP id z2-20020a05620a100200b0078717be2999mr24341570qkj.15.1708606691860; Thu, 22 Feb 2024 04:58:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708606691; cv=none; d=google.com; s=arc-20160816; b=zMCFGVpejPLBFY214k5XDgCmgw8CmWkcIfTt+mP4qI2Y1MMNc5Cp6s28HAlF58CzKS AIQy6IkjqL1NfaoU2tLQPt4uApid2owfTNwfeKr+wyCSori35e3431Y9Cttqz8q8+/TJ mijadHDzox/7g0NqOT1i2Hi0pPXw6UKKJAH64zfteCEz14mzWkrtw1rMWT5WKYO24psV q7PbbRrSiRBPqGfLQnJevRxjCU5qMX473bm1kcVXzgOd5EEItxr3u4QeCrx+WO5Dw9DG WK47BqBxphtKNS96Q5peB+v9v8UEin6SGKEONDSN3jeNP8oOxI+ZptCqS4tRhCZyFiqO o6dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=haz8xWPEOIi2z03nhQKaHcW8uQbVkLIuqEbGOCYseVA=; fh=nqUcZ+CNLyqfSIEEAp1z6XgXgOv16iFLohEYQqF13Uo=; b=ATI3kX5N/wyse4w8jS0R5FjQs4TjHnYq8a2OrEViSKvRtqwDBpf+hsi080UMSnB1Rb vGcGGdOa1NK8G0d1FyHuI234WG/SDFy/go1UM23XY3JFtR9q63ZrS5NgoqqxevBu6WvL uxWcj5qcGhpkqxJteE9UQPdcSXWSFnNJrbVK6GVe4b2qPnotdIXILlOIpPcRYyr+5Gb/ ge+xK2Q32J+wLQjf4A5cRBeagrUBKHmG8PtQ26n8Ju+7TNicqBtHZt5v9Ck1v5EvruKf 9mq0alU1n01HPMwiHv0Rk+4gmjr7CtxT/8PbpCktqqbSxxuTCuEe1oba0HIUFfT5av54 ZdXg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JPxg0jzh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x9-20020ae9e909000000b00787a71e63d5si366184qkf.151.2024.02.22.04.58.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Feb 2024 04:58:11 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JPxg0jzh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rd8cT-0006Lx-0t; Thu, 22 Feb 2024 07:56:09 -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 1rd8cE-00067f-Ed for qemu-devel@nongnu.org; Thu, 22 Feb 2024 07:55:56 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rd8cB-00053I-C8 for qemu-devel@nongnu.org; Thu, 22 Feb 2024 07:55:53 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-41279488d3cso10238915e9.2 for ; Thu, 22 Feb 2024 04:55:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708606550; x=1709211350; 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=haz8xWPEOIi2z03nhQKaHcW8uQbVkLIuqEbGOCYseVA=; b=JPxg0jzhI9/K6/rPTOvkP0+Ah1sEWIgSt2xOIm3ww73x8I7SsEDR7cOz22aqS073HV h28IaWaRSRHJW5iaw8PLKC+yJG9FIMSZMfVonPZ7dmHhT//GYkWobl2oCjdOIDJBt69A lTt30vrxUgGAE43JMQnP3E5o8LnwY4KR3fQSkzNWPkyIoJ3pS11gSTrOCP5ZioY5yowm ir063k0+5gC8bjfNdgLHPnA1lO2oujLw97GwOI3YLAlgUopB56mRXFIEN06UbZhkrw8W QHJHhhJqiy6WWMJA+bBsqhsRZM3Oz3rg2WKZAJVpsjRtSv3oYPnzdXj8mr80FSeN0LHv 5NYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708606550; x=1709211350; 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=haz8xWPEOIi2z03nhQKaHcW8uQbVkLIuqEbGOCYseVA=; b=HDuJ5q6l0dBWH0ZUN7qVUzd64dK4WCLcP6p9NhmCo2aysEtC2wLLgSNmsJbWo7MbK0 fd+pyVEJHSDAmIyFuKH46eJQQdEEfIHkSKfBZdroEOB9j0YaaCchoMFX+qeZQuJ5lukO dlqtzIMeFsdkmjAhfARH0eDz1vX+bQweaciTzoROB2tCcbOfjDMjMWtpMXDnC7oWF1Lm znXbuAkTe1N2UUNt3zjCzdNaPLvxcpXyddIYyr4xzncQXcOFn8CaDF8SZo/Upms+o2sq jFVf4/5euTsZVm0E0ofBuQsFx6rZWsUuWQkICyw0E62qw/MLr4UviAKnpVUGITV+MdX1 s9rg== X-Gm-Message-State: AOJu0YxnOzbi/qnoxt9bzJV55OCWk1XOXXfhAwcKuZXXNJls1MtzzpCO EDrXQH+jJiDF3mYMVhDk1f4vY1CVj740DZ2gnESFB7sMheweCfmCDS97ewPlLDeRLaxt2Scq3Gh PUyg= X-Received: by 2002:a05:600c:1384:b0:410:c128:2bed with SMTP id u4-20020a05600c138400b00410c1282bedmr16176314wmf.20.1708606549802; Thu, 22 Feb 2024 04:55:49 -0800 (PST) Received: from m1x-phil.lan ([176.187.211.34]) by smtp.gmail.com with ESMTPSA id x14-20020a05600c21ce00b00412704a0e4asm5983207wmj.2.2024.02.22.04.55.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 22 Feb 2024 04:55:49 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [PULL 22/32] hw/acpi: Include missing 'qapi/qapi-types-acpi.h' generated header Date: Thu, 22 Feb 2024 13:55:13 +0100 Message-ID: <20240222125517.67131-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240222125517.67131-1-philmd@linaro.org> References: <20240222125517.67131-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org ACPIOSTInfo is a QAPI generated structure: $ git grep -w ACPIOSTInfo qapi/acpi.json:81:# @ACPIOSTInfo: qapi/acpi.json:99:{ 'struct': 'ACPIOSTInfo', qapi/acpi.json:109:# Return a list of ACPIOSTInfo for devices that support status Include the "qapi/qapi-types-acpi.h" header to avoid the following errors when including "hw/acpi/cpu.h" or "hw/acpi/memory_hotplug.h" elsewhere: include/hw/acpi/cpu.h:67:52: error: unknown type name 'ACPIOSTInfoList' void acpi_cpu_ospm_status(CPUHotplugState *cpu_st, ACPIOSTInfoList ***list); ^ include/hw/acpi/memory_hotplug.h:51:55: error: unknown type name 'ACPIOSTInfoList' void acpi_memory_ospm_status(MemHotplugState *mem_st, ACPIOSTInfoList ***list); ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Message-Id: <20240219141412.71418-2-philmd@linaro.org> --- include/hw/acpi/cpu.h | 1 + include/hw/acpi/memory_hotplug.h | 1 + 2 files changed, 2 insertions(+) diff --git a/include/hw/acpi/cpu.h b/include/hw/acpi/cpu.h index bc901660fb..e011d01adf 100644 --- a/include/hw/acpi/cpu.h +++ b/include/hw/acpi/cpu.h @@ -12,6 +12,7 @@ #ifndef ACPI_CPU_H #define ACPI_CPU_H +#include "qapi/qapi-types-acpi.h" #include "hw/qdev-core.h" #include "hw/acpi/acpi.h" #include "hw/acpi/aml-build.h" diff --git a/include/hw/acpi/memory_hotplug.h b/include/hw/acpi/memory_hotplug.h index dfe9cf3fde..38841d7b06 100644 --- a/include/hw/acpi/memory_hotplug.h +++ b/include/hw/acpi/memory_hotplug.h @@ -1,6 +1,7 @@ #ifndef QEMU_HW_ACPI_MEMORY_HOTPLUG_H #define QEMU_HW_ACPI_MEMORY_HOTPLUG_H +#include "qapi/qapi-types-acpi.h" #include "hw/qdev-core.h" #include "hw/acpi/acpi.h" #include "hw/acpi/aml-build.h" From patchwork Thu Feb 22 12:55:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 774865 Delivered-To: patch@linaro.org Received: by 2002:a5d:6ac2:0:b0:33b:4db1:f5b3 with SMTP id u2csp749061wrw; Thu, 22 Feb 2024 04:57:58 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUCOUjKu5vELNfTXW40JVLTm7hP0NJW+jsmtS3raP5sHqdyAk663l9CQLkKulTnALaiyvEe7aalM4A69g364Jah X-Google-Smtp-Source: AGHT+IETZEjiYVMrIV8ks8xRI9ivbRc90BMTm6pgkqVZS5cjm0BmqSPC/NnaAa9qrwQXCaNP5SN9 X-Received: by 2002:a37:c444:0:b0:787:5f7b:d97e with SMTP id h4-20020a37c444000000b007875f7bd97emr14917307qkm.13.1708606678072; Thu, 22 Feb 2024 04:57:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708606678; cv=none; d=google.com; s=arc-20160816; b=cWGJFdbCwVSaD9WU1PTD3jkFJivVE4r0kGNnDpHxeu3iR91bjgx9zFlr4+XX66bBp+ OGjjkvdHx9xIKo5jU11A73d+SU0zJrKsNlPBLHci9rDMyjoHECLPSVMCcKLmE7uGQPsz 6fFy3Isqc4Rt/Mh8Zt3u/TINm1WVJR6CC1sTA9iQgFCUYekyU3x2HYI778SiqYku3Qcw pqFPHDzeAZbSWjGJ5wXSYhPZOO2X2o9efa832Lffvr4F4CP/WNqmnDiQv2ePxhXnOLMo eMLxzR5FHKyzmir8GI37aaWhzfcU51cXX96EIybz2ufrrMTejld9RHzJeBEj5UvM4LFK ZaSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VVZ+VNqHmOLRPOXAqtL522gDrsWtXXCXM5mqlJag8Eg=; fh=3Q6ePR8pbZ45DJS/y1csgZJNKicjQ5WMxMevUkbSKRI=; b=pZNe7L3td6zQmrVTC5F2Cs6wXamtz2fBJzhjySE2K1cF4m8o6749F5BP8k3ek2a6B5 Xa82kUDaOi45Jre/sf+HRQ4mV7rFoy7luEnGgDXGAEJ9i7N29BAJGZLo4IN1Dlsy/Z+G 5c3GvOekAXbZktZn9SA+FoJSr56dgSq38CJRtmOJ1m9LkRouor8Sz2P0OZHW9uhRgqwC YxTzDvWk8+jGf4b98DaZ+DwpK9PDee76E7QtJt33J4NvBbSv3ly1Rj30sizXswUbtKbN R9CoVUnjpB/AnewxzuATJWIA/aDtNJkquCR66D37esxq72N6OQuTxB0FvwjJgS3JWmq2 b0Tg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="up/ubXLt"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u23-20020a05620a121700b0078780c83032si4292129qkj.363.2024.02.22.04.57.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Feb 2024 04:57:58 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="up/ubXLt"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rd8cX-0006Ut-9W; Thu, 22 Feb 2024 07:56: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 1rd8cK-0006AE-Gz for qemu-devel@nongnu.org; Thu, 22 Feb 2024 07:56:00 -0500 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rd8cH-00055T-Pw for qemu-devel@nongnu.org; Thu, 22 Feb 2024 07:56:00 -0500 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2d180d6bd32so90478861fa.1 for ; Thu, 22 Feb 2024 04:55:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708606555; x=1709211355; 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=VVZ+VNqHmOLRPOXAqtL522gDrsWtXXCXM5mqlJag8Eg=; b=up/ubXLt10k3QO9vkwX6g75lvOJJffifWJ5o6q5dZPkORoguw2VqOmVLaLTnWlNqkE 4uUWlo+g4s/Vg2caSShVMalvoBJmXK83nR0IFZw8foBAc44AY1wk/Mty1Fys/bxntVbQ EAFTBtPLwDXFP5DHZwNQOHU1UmjW/QFQltW+hcscqWwvhwuKLaMwYIlAtfkMKLL7VIrN CZoFL5ScPKiaZhiikT0j3z8ASq9Wb0P0JVoKNZchehWSb2ovDd58NAXvWFZXG5p70GGF iq/WSW+uK1LxDPiT1IUmqtSStlS81xfge9PUz52CVQwEyd+wRsCI059/WVARkjJuW5nQ 8giA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708606555; x=1709211355; 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=VVZ+VNqHmOLRPOXAqtL522gDrsWtXXCXM5mqlJag8Eg=; b=GLu7DEheoD/exMIYsBwW3YqtvAUj5mApJlbOsnOtXvvpAJHNp8Ztw16CgVHWWYCNJd j5mascRAa4KRV+36SjbyrUuojWjjhA1MAiBYOGvR5DcwmMwFyDyIYZkIU2U/zl5b480W OE3jCJOz6mPIggU6wMaIuybiZxNSf9I7zvCc5bWrd8pDKxkfBOhZWU6IBefWH5xKSLT/ hKMnxItudKRe8Gs/wMKnRcq55bCe8utCNfgd3Ktgvozu/gG5rPF9DhrnYUbqtHzXw0Zd cY+gA+wT99XgP3equaV7VoZacTadQwx5syyOMgB6K4GI08vJlatVIpblHRaHzBsvB5vY UxNw== X-Gm-Message-State: AOJu0YzPmIT8yx559eWhBfmjxOhWFfd3XkiMujIl079aHWWiRzQiNVfW NhEV3skRxV3iKA/lm7ZOarB7gMYXqunRimEtwQeEXMFpBrc9CrLMxILA/hiQoLa94UrOWlQSrpp Xb/U= X-Received: by 2002:a2e:9807:0:b0:2d2:43ef:e4c with SMTP id a7-20020a2e9807000000b002d243ef0e4cmr5926953ljj.45.1708606555634; Thu, 22 Feb 2024 04:55:55 -0800 (PST) Received: from m1x-phil.lan ([176.187.211.34]) by smtp.gmail.com with ESMTPSA id fs14-20020a05600c3f8e00b00411a595d56bsm21418920wmb.14.2024.02.22.04.55.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 22 Feb 2024 04:55:55 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Zhao Liu , "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [PULL 23/32] hw/acpi/cpu: Use CPUState typedef Date: Thu, 22 Feb 2024 13:55:14 +0100 Message-ID: <20240222125517.67131-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240222125517.67131-1-philmd@linaro.org> References: <20240222125517.67131-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22b; envelope-from=philmd@linaro.org; helo=mail-lj1-x22b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org QEMU coding style recommend using structure typedefs: https://www.qemu.org/docs/master/devel/style.html#typedefs Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Zhao Liu Message-Id: <20240126220407.95022-2-philmd@linaro.org> --- include/hw/acpi/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/acpi/cpu.h b/include/hw/acpi/cpu.h index e011d01adf..e6e1a9ef59 100644 --- a/include/hw/acpi/cpu.h +++ b/include/hw/acpi/cpu.h @@ -20,7 +20,7 @@ #include "hw/hotplug.h" typedef struct AcpiCpuStatus { - struct CPUState *cpu; + CPUState *cpu; uint64_t arch_id; bool is_inserting; bool is_removing; From patchwork Thu Feb 22 12:55:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 774862 Delivered-To: patch@linaro.org Received: by 2002:a5d:6ac2:0:b0:33b:4db1:f5b3 with SMTP id u2csp748819wrw; Thu, 22 Feb 2024 04:57:21 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU80y3oOX6XxWbOJ4u8KqkkeSpxpvYL+VE1pIq9bjjHA0dR/tpRL5w8owUtgzrVtKpQtkr0BeT4LI02mHmG9L9H X-Google-Smtp-Source: AGHT+IFdmXJejJKId2+Oy3jwFpk+wYD3guovNCoAr2YeMapaxXXVkq2pUsdIH9Y+JFAJvUpV7qkk X-Received: by 2002:ae9:f80f:0:b0:786:2d19:93cc with SMTP id x15-20020ae9f80f000000b007862d1993ccmr23209811qkh.73.1708606641384; Thu, 22 Feb 2024 04:57:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708606641; cv=none; d=google.com; s=arc-20160816; b=EHBllM86WqDFz60AWSzFxCS5uYk/XxzB+K2hcBw8eGQDzKAOiE3DZuBTvrFwHU84G/ VlV/YK8skboGD9WiItqXatEv64MVuKZW2eLkZeOGuKmcrOZ1CtFZ/GymiWST++gBDtku eicZVhC+E0bh7U4YylHEasKbVlYD8S/fogYzNM40zE1wG1NjBfj7poHaQOwzin2RHObV ynGfYZJTfpENDhgyi+qJFdDDlR8FBa8JTNb03DPT3u6fCPbLOMX1CYp2tscNxnFENtyf arHL4OAtQ9xAcm20oOtz3DXSckha3W/gkEmimjvg26HhZajzZhkT3DIhIABjdKZhqndw 38Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7fiMAHxMKyZo0atwcCXeNwXI7oIw0a2AWdKKNEO+8KQ=; fh=bKY2eAhf3KGMBh/38JNHzScGgYYDsemHAt+9upkCl9s=; b=FK3dQPwbkn0yINuaGNBhMjg75NRzMTWEdvtDO+iA0gKMPJxYUjKbh6CpyFMfvxX8CO pc5fH4ZsSovwewLgf0LSqrrep3ydPiMIrbfMuO3FKJwGxGaKR/N6ojn0FT7rofrcc+cG t/g8voX0sYqfseYhZJ0qlOsO3Hpi0aALSPHNoQt4wSAkc02HO7bxsVGJwByiKcvBjFuE nlQ/42R6Xs+Uon/qcooSSSPHsfJlPrDh/0P/RKCGO5Tw4knHxolJrm0nUY1IKzcCsotE I8Uv7GLXUyNtRU1DkilZigDuw+v465zw1FxtjCUcbSRCLHlgScJ1eEnPVmbBYKG8yEbR eozQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VMR+cqXz; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g7-20020a05620a218700b00785d59f3f94si12589492qka.447.2024.02.22.04.57.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Feb 2024 04:57:21 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VMR+cqXz; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rd8cW-0006Sv-4J; Thu, 22 Feb 2024 07:56: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 1rd8cP-0006Gz-Rj for qemu-devel@nongnu.org; Thu, 22 Feb 2024 07:56:07 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rd8cN-00057C-9S for qemu-devel@nongnu.org; Thu, 22 Feb 2024 07:56:05 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-33d146737e6so5194002f8f.0 for ; Thu, 22 Feb 2024 04:56:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708606561; x=1709211361; 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=7fiMAHxMKyZo0atwcCXeNwXI7oIw0a2AWdKKNEO+8KQ=; b=VMR+cqXzncKn+tBrEvJ9rICGNY0FU62FsKmsYACOnXUb/tT4Rchox6nFj1GPTlFLNf I0Gb84VjbClL6VutIjZYRHdBeskPwiUtHfKOGSVul959+UnmspOUkFU8ijs2+vUH/xoW c4J/xklRMNl3AuOLAbUhdcDUZJADl9u4VexyIVghcGec1B8yQ4Tc2HCp24LZUEZ2ipzJ 3u7PaI68n34jFAltBwbN2USo5ODineNZ44L83xr/u4l/m+04lPvWC/KaF6VHTkX0e83W TyDGL+MAzaou+v0StRl43nCs97WfAu+qMS0ai/7Q7tnLGrwX0a5+y8XhGfsDFRsriE50 UMjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708606561; x=1709211361; 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=7fiMAHxMKyZo0atwcCXeNwXI7oIw0a2AWdKKNEO+8KQ=; b=Q63hv2lHIz9dsIUFHB+Npk/05hZRDk1fp9mjUV/ca+x7FexOMY2zA6EzZYQ0mAhwMe GjenglcKP2Ppc2XQc49ZvaTLwjXNHRlh0w4swDt3Vi3GAMMzj+iROpFXYizXvXrvIUEy 9yt08UWb/W+xX9K9blMT7ainQFWLPTVCX6xchqpeju+1y8/jY3PTLrbeLHOymJxkAdRl D5ZRUgOeTfGM+fq9yy7tYXCkuacc+nOIbapprnzgSRQZOEUu+h7ZqLwmN79e/x0QP1g6 /lFWjD1yZZP8V89hT9ondw2D3Vb8jNawXxLvzKAXLYic781JEh1W9r8GB2A4IWDY5pvB 4Shg== X-Gm-Message-State: AOJu0YyvyfCi6cdql4ucGO6PV6p2EjFHjqp/8vVYxd4jU5YimyVCSlV9 ACb+lcTTGGo7ai3fcERY2RCK29HEwwrpv8Cc/PMUsaZ6Ywswb/vjQJCbZM2bQw4XDPA2SyaFgrs X6Rw= X-Received: by 2002:a5d:5645:0:b0:33d:3b82:ab2a with SMTP id j5-20020a5d5645000000b0033d3b82ab2amr9485069wrw.19.1708606561338; Thu, 22 Feb 2024 04:56:01 -0800 (PST) Received: from m1x-phil.lan ([176.187.211.34]) by smtp.gmail.com with ESMTPSA id b7-20020adfe647000000b0033b406bc689sm20495892wrn.75.2024.02.22.04.55.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 22 Feb 2024 04:56:00 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha , Marcel Apfelbaum Subject: [PULL 24/32] hw/acpi/ich9_tco: Include missing 'migration/vmstate.h' header Date: Thu, 22 Feb 2024 13:55:15 +0100 Message-ID: <20240222125517.67131-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240222125517.67131-1-philmd@linaro.org> References: <20240222125517.67131-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We need the VMStateDescription structure definition from "migration/vmstate.h" in order to declare vmstate_tco_io_sts. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Message-Id: <20240219141412.71418-4-philmd@linaro.org> --- include/hw/acpi/ich9_tco.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/hw/acpi/ich9_tco.h b/include/hw/acpi/ich9_tco.h index c4393caee0..2562a7cf39 100644 --- a/include/hw/acpi/ich9_tco.h +++ b/include/hw/acpi/ich9_tco.h @@ -11,6 +11,7 @@ #define HW_ACPI_TCO_H #include "exec/memory.h" +#include "migration/vmstate.h" /* As per ICH9 spec, the internal timer has an error of ~0.6s on every tick */ #define TCO_TICK_NSEC 600000000LL From patchwork Thu Feb 22 12:55:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 774860 Delivered-To: patch@linaro.org Received: by 2002:a5d:6ac2:0:b0:33b:4db1:f5b3 with SMTP id u2csp748715wrw; Thu, 22 Feb 2024 04:57:04 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV/G59ZqXOVob9mxbr2eOBQTvDVO95fL3h5axSkjS4IVNq13im1tTMVNavU724S91y/lGOABsbA3v4Naco4RjGU X-Google-Smtp-Source: AGHT+IFZSdRhjMRIQXJBAhkng6SuJC6iq55AOssdAvgmt+DUapMIkE7Jf2rd5ab2k6EEOhVxvGxn X-Received: by 2002:a05:6214:3b87:b0:68f:a864:4e44 with SMTP id nf7-20020a0562143b8700b0068fa8644e44mr3144277qvb.1.1708606624548; Thu, 22 Feb 2024 04:57:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708606624; cv=none; d=google.com; s=arc-20160816; b=bUf9VmYLZuCOSxR8nEHgYo827voMpiAGQ78Ai5AH4lCmVfECOAlU2vixX+Q0PZb7yq 2F3w66Yhvg+9Jzv6LhyAc00abviBDmVc3+0xhObPhaF21KIJgDr+32u4a6xNZ2Aa1D9H MF9uNu0ebPpuDK1pMBTL1h1DqenfEWT8mB6TDywghqQja7m/pTJ/svsXi482M7ptMx6q 9aZkaQiztCVqHoIckTYc+hjxUD9tNRb8vp9WTdzgb/YZj/tGaTl8j5Fxro0MY81Z4Bmd 0uBW5PngdeMucU0M00AJqGzCf1pbuGTH4JTh/QKrjLPVd3K9t9VtscH1o9d33ca6u7KV Jc/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=I7XkfKPxz7eBX4abxuH9t9ZpbmlF01x5HTkfTXvGamo=; fh=QvN2yXP/cdWsJIZgURUHCiAfwMjQNkIJ2M0MUOUwXeg=; b=aKaxj3b/1hhT2oxPW5KXf5KVJwitwSz2eMxpqGlAbJ9kXhkQt0QBxrPiwgAXVcef+o 0BzirLCRsd+1mkme2yuXLvynE6XTjf6taJ0lrkQocjNSrTac54nxYC/JB0mHqwtbqk3c SNzgPIESOfYK5rV7iI46ibrUeeLvGqdxhgoohsvlYadzgeasG14fsH+WN8HDbNjj4IoN GQ4wG3JNfKpsEoEqygi1DPUxcvX8a0JSOrGnZmjIO+SfHdCgJs3pI6eGv4+0DoeNKmhB Ch5felwaWNJK0sycFIohNboOwMzrt8LzOWsGRJVtimFLTXryl5imkREaxTtg2Pk0eLEg Jvhg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vXtxlrb8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 7-20020a05621420e700b0068fb82dedd7si1495727qvk.239.2024.02.22.04.57.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Feb 2024 04:57:04 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vXtxlrb8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rd8cc-0006Zq-6l; Thu, 22 Feb 2024 07:56:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rd8cY-0006Wr-Bl for qemu-devel@nongnu.org; Thu, 22 Feb 2024 07:56:14 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rd8cW-0005AK-Im for qemu-devel@nongnu.org; Thu, 22 Feb 2024 07:56:13 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-41282f05409so4658555e9.0 for ; Thu, 22 Feb 2024 04:56:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708606567; x=1709211367; 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=I7XkfKPxz7eBX4abxuH9t9ZpbmlF01x5HTkfTXvGamo=; b=vXtxlrb8bhPU0SKRELbiri0A2XAfrAIi2rThuuhUBl0Urvq1I+Jv0rbULbW88fYNnk xfokphEGRlHVU2igZmjmSW8IDtqb16c5BBNicgoT8GnkrkQR10Ms+RlQg0plhxeW6s9c YIO0M2mpYarmGCOSht19B5aTi0Xds6hwrmOgR9Erm6DIOKd01vd3tqpiprQ7BYaZKHl+ v5taCDjlvzhZxoPGWz7WqHCLo7KeWmASQvsuTyGpmpYn61GNiZpZeYW3+K+cr6kHmJ5p 7L48sEXO6V3ufMxfERrb3EHkJRXh+tAGe8w2Wc5wHL0BbI5XhjmRiQWJE0Qd7xln2NJR jPVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708606567; x=1709211367; 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=I7XkfKPxz7eBX4abxuH9t9ZpbmlF01x5HTkfTXvGamo=; b=TUaoUzVW1Daai0h5WlMYE5TbAqkr4HF0suP3jVlYrebTD7oDe+v6katD0uiVsk13N1 vJMJLv8OagYE1K3oZhIyl1ASyZaCKGS953MfInNwKrgt/2yBli47Z5hMz+x8fUCTL+mB +Vkh2kQv6XDV3oiC/rON7J/0C1WGwc1ajpgUndxzKzaPhh9vCD9H7dUUcTsW+Ryf7XC2 XZF+Of2BLQKHq5dCEsPzx3bMPWvoxEaCCQ85awFdfR3BPFA2LR4ndsR3HizrefPN+Skj VyfDoY20+EgvWrs5Ox+8sY+TAqDGoQSFfk11/FBofToXeT5i5FTtbygLWbcXMX5zAF2J c3NQ== X-Gm-Message-State: AOJu0YxZ8OEMVI5kjmx8lbnLEu14WkpOG6LRki7aRxOtRiwYmLu+ng9B 9Kq7VEMZgMwNLcEDlL9Lm0ah2LCBgQUEJCSwu8hWg1VEGB6kI56Bo8pcT4RcK/cwhwXSaafIvRe 5iCc= X-Received: by 2002:a05:600c:3581:b0:412:6a78:d4db with SMTP id p1-20020a05600c358100b004126a78d4dbmr7395532wmq.14.1708606567589; Thu, 22 Feb 2024 04:56:07 -0800 (PST) Received: from m1x-phil.lan ([176.187.211.34]) by smtp.gmail.com with ESMTPSA id s7-20020a7bc387000000b004107dfa6aebsm5938919wmj.28.2024.02.22.04.56.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 22 Feb 2024 04:56:07 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Cl?= =?utf-8?q?=C3=A9ment_Chigot?= , Frederic Konrad , Mark Cave-Ayland , Artyom Tarasenko Subject: [PULL 32/32] hw/sparc/leon3: Fix wrong usage of DO_UPCAST macro Date: Thu, 22 Feb 2024 13:55:16 +0100 Message-ID: <20240222125517.67131-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240222125517.67131-1-philmd@linaro.org> References: <20240222125517.67131-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Thomas Huth leon3.c currently fails to compile with some compilers when the -Wvla option has been enabled: ../hw/sparc/leon3.c: In function ‘leon3_cpu_reset’: ../hw/sparc/leon3.c:153:5: error: ISO C90 forbids variable length array ‘offset_must_be_zero’ [-Werror=vla] 153 | ResetData *s = (ResetData *)DO_UPCAST(ResetData, info[id], info); | ^~~~~~~~~ cc1: all warnings being treated as errors Looking at this code, the DO_UPCAST macro is indeed used in a wrong way here: DO_UPCAST is supposed to check that the second parameter is the first entry of the struct that the first parameter indicates, but since we use and index into the info[] array, this of course cannot work. The intention here was likely rather to use the container_of() macro instead, so switch the code accordingly. Fixes: d65aba8286 ("hw/sparc/leon3: implement multiprocessor") Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240221180751.190489-1-thuth@redhat.com> Tested-by: Clément Chigot Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc/leon3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 4873b59b6c..6aaa04cb19 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -150,7 +150,7 @@ static void leon3_cpu_reset(void *opaque) { struct CPUResetData *info = (struct CPUResetData *) opaque; int id = info->id; - ResetData *s = (ResetData *)DO_UPCAST(ResetData, info[id], info); + ResetData *s = container_of(info, ResetData, info[id]); CPUState *cpu = CPU(s->info[id].cpu); CPUSPARCState *env = cpu_env(cpu);