From patchwork Fri Feb 10 16:57:51 2023 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: 652355 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp1070131wrr; Fri, 10 Feb 2023 08:58:42 -0800 (PST) X-Google-Smtp-Source: AK7set9xzbPbPjOrO+iEXoGcTwcgkrMru7E63QrZm8vnjn28y1oljqv8Cm7YwDBN9hgeCCgiraLC X-Received: by 2002:a05:622a:1a0d:b0:3b9:c44e:368 with SMTP id f13-20020a05622a1a0d00b003b9c44e0368mr27044059qtb.55.1676048321803; Fri, 10 Feb 2023 08:58:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676048321; cv=none; d=google.com; s=arc-20160816; b=UBM5InmQIEAANW3qmsDXHVxw9eoBgjQhXufB0+DQhzMgrmeTBW6ow1e7o5dJhd+O3E J5RCy48Gk+qF8Z95zKvoFca5e/C5gmn99fMwnSbnNdEo5W+RXLKjQePIeq/FHFYZuwJM tKTbfnkhBzSsu50K8hjWKefkOZ6QfXZ2aLxViFB5ip5CbRQe3zrMGxdKIX9efPTWhNs1 VcKTB1+KauhParh+jOpn6QnlWK6ykwvw7gNgv0Q87BzvZ/1T8v7VBdF/LE2kjEjfH0BN PUOJ+91SMZzy0q8CI1m90dA1kxr89aWdy0OjuDsWBAcJ55yUDzn/kfncyo1EKS4ZyYPC Mkqg== 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=Bd1OtqBygG3Ey4k52ycKQXbZ8TYrh9zI9oYB+ByJfKQ=; b=LbJqZgIFYZH4hCE9W26Gdv566Re8D+10GUa5KZVm4BCFTiMoYQDsaNFaEw77u9py0N 9FbPFYzWxQiWKOFdiEWCaTmw2u6Gl8Wu9iywZI5OpL3ptGC/uWUy4WLMrT/7+mkh0SdC 2iSfo8SUFBITpdEgkgNMjZJJcAFzauojnnxrOwLH2DbFGAlbLkcFvyinW2ZCCAs0BL9/ yeKA7gakpRVLTG9RfhQ3k8lMamRVoGUrJbFgIe7hhmUjvlmerocG1KyrgAizTWVf0SnZ o7ourGP/QPWlbhm5AbR1GzmB8np9ZbX9cVZc/htfvZ5cUA8MPQEfPo+Jn1Z4EO6FMToy VTXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zX0s7yVX; 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 r6-20020a05620a298600b0071ebfb476ccsi4731555qkp.324.2023.02.10.08.58.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Feb 2023 08:58:41 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zX0s7yVX; 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 1pQWis-0003W4-51; Fri, 10 Feb 2023 11:58: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 1pQWiq-0003Vv-KD for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:58:04 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQWip-0003yI-4I for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:58:04 -0500 Received: by mail-wm1-x332.google.com with SMTP id bg26so4318635wmb.0 for ; Fri, 10 Feb 2023 08:58:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=Bd1OtqBygG3Ey4k52ycKQXbZ8TYrh9zI9oYB+ByJfKQ=; b=zX0s7yVXy10HcQUrNe/k9W7VkqMtqYZew3qumYeXx0WEJMTKp1b2jEJwRu1jao3JNb rRYHgyc5hY6pkLiJvbLqA9YAA4Y6A3K73d28yUUHbXQV75/shjb5NbeT+Kq/pYvx3eFS AwbRhdXHRU/IZF4wokvfQzr6cscVKnDadRBNSGeyHWVbHOtMo7HDkxyQ/OpbsemEZjZi FiEOoX1zqgDTJsfnn56GJGnKpVLr+99MpNuVksAYSMUbDhSDv5/bNiZQf4tveejrnLe1 fs44Y36oFONjmdKQB1+/2sJkUKg/L4g5CtjysDGend+aocDS8/AgBIktxxAwjJwGkfK7 /efQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=Bd1OtqBygG3Ey4k52ycKQXbZ8TYrh9zI9oYB+ByJfKQ=; b=OhTuZ3Cz8GRNMR+SxGl3KCe6NAw3ggO8ZVgE9Q7dFM69neP9Pg+r07Qib+Ou3MPwQx PXsT83eaD8bQXR8xMFVir0Q+utmC7tRi4NqcfdqFHT7h0S01hiEkhI34fSYRnOS19kXE RzkziDCE7QKSoa4KG64HWfvaeeVMtQ5XeeOzrSFI+ayYUX5ukM5xgEkAtYplxZ2+cqnT P0fbmaHIBw6Ir7qGM9KQQCD2o365Tp1sUjf4UiujseROi4JeVnNSL5HEh1afkHKWmZfb zLLMXU7tVtaYSyO0fiP7G6SRnbLSaAqkCWYjlSnO+wBkz5TRo5g1kpGtjWBMc9XNOj96 H+lQ== X-Gm-Message-State: AO0yUKWIHt717fcJAsB7S1OFTQ1kjWQ3M8vKJSdC5GTHVf0cTGjK2VM9 cloCSaIMoYHnFwkvVY2/4WtSwUwMu2OM+pGA X-Received: by 2002:a05:600c:1713:b0:3da:fb3c:c1ab with SMTP id c19-20020a05600c171300b003dafb3cc1abmr13446668wmn.0.1676048281038; Fri, 10 Feb 2023 08:58:01 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id hg8-20020a05600c538800b003e1202744f2sm2456046wmb.31.2023.02.10.08.58.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 Feb 2023 08:58:00 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Thomas Huth , "Michael S. Tsirkin" , Richard Henderson , =?utf-8?q?Herv=C3=A9_Pous?= =?utf-8?q?sineau?= , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aurelien Jarno , Marcel Apfelbaum Subject: [PATCH 1/4] hw/southbridge/piix: Use OBJECT_DECLARE_SIMPLE_TYPE() macro Date: Fri, 10 Feb 2023 17:57:51 +0100 Message-Id: <20230210165754.34342-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230210165754.34342-1-philmd@linaro.org> References: <20230210165754.34342-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 Manually convert to OBJECT_DECLARE_SIMPLE_TYPE() macro, similarly to automatic conversion from commit 8063396bf3 ("Use OBJECT_DECLARE_SIMPLE_TYPE when possible"). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/southbridge/piix.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/include/hw/southbridge/piix.h b/include/hw/southbridge/piix.h index 0bf48e936d..a58bf13a41 100644 --- a/include/hw/southbridge/piix.h +++ b/include/hw/southbridge/piix.h @@ -29,7 +29,7 @@ #define PIIX_NUM_PIC_IRQS 16 /* i8259 * 2 */ #define PIIX_NUM_PIRQS 4ULL /* PIRQ[A-D] */ -struct PIIXState { +struct PIIX3State { PCIDevice dev; /* @@ -57,14 +57,12 @@ struct PIIXState { /* IO memory region for Reset Control Register (PIIX_RCR_IOPORT) */ MemoryRegion rcr_mem; }; -typedef struct PIIXState PIIX3State; #define TYPE_PIIX3_PCI_DEVICE "pci-piix3" -DECLARE_INSTANCE_CHECKER(PIIX3State, PIIX3_PCI_DEVICE, - TYPE_PIIX3_PCI_DEVICE) - #define TYPE_PIIX3_DEVICE "PIIX3" #define TYPE_PIIX3_XEN_DEVICE "PIIX3-xen" #define TYPE_PIIX4_PCI_DEVICE "piix4-isa" +OBJECT_DECLARE_SIMPLE_TYPE(PIIX3State, PIIX3_PCI_DEVICE) + #endif From patchwork Fri Feb 10 16:57:52 2023 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: 652353 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp1070093wrr; Fri, 10 Feb 2023 08:58:37 -0800 (PST) X-Google-Smtp-Source: AK7set/ec4zStFoqLYPxfuKEk3MwqUzJD5Mlz3s1t3E2q8utfDhlLY2gAQyS8w2dhrfzXi1yz+UE X-Received: by 2002:a05:6214:2b05:b0:56b:f9bd:c076 with SMTP id jx5-20020a0562142b0500b0056bf9bdc076mr30043749qvb.4.1676048317152; Fri, 10 Feb 2023 08:58:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676048317; cv=none; d=google.com; s=arc-20160816; b=YkeUMRvrIh7TADmbztjfw/VmoFTdNCjrG8JM/VqYUsN/NvA4GcfOKT/lAUFKE1RiVB 7qHNgyvkXq0o3qlaSye3OAL4tQOBTGg4Lr/bs47eNAvAJB/ZDISpIYlEAPnR1vRh/9uS Qu7+V40tLhC/PGFrERBA085unx2VMlz+j3amMvEUBJvs1H+VUljoCP1OP7nTGC2qZ2+m iZ7DsUvZ4GKxreKh2whU+FwCNnVrj2QxUg4SAgu65aAIO2swHp3x6hAKaDtlWCTVZahJ CfcI6F0frpSfzo6EjFH69giPnFQoHO9aB0h9cKI6oorR1LtI7/CGsRWakeD82UVPIFxC 0pIQ== 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=df58h/AdXCUfIsw29990QJNsnEG6zfozV6HUit6iE6U=; b=BY9VV43Pr16cBNC+PYuhauMyQTqbFCHxfC8XWRa9qd7lSf8rrgx14yrnWFBiHppIcH 0e7MoGUWCeElkXTPBqEJvZ8cpzZ9Dg6jorCQRYEdtEGLeyplUCUyIu0j5QKTlLNiRqWF XefgYExR5U+iaTyFbvoCGGrQuQpTcv9/Rcq3wkSvXsYbY+brOY0zK1Y89ZLWF0PrAmch 2Nq8W3SJ7UokicdRtZSjQAdTXpK2KiORngjiqdjzArOE0nqPYy3pTxC6gsfA4GKh9HcD sX9RtBXWIZJ2hxXShbT0b9YfVYpjNM2/R+qVWdvqMzd8m72XNw6h5ijQchObANDp451O b8Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=baQQBiPU; 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 g29-20020a0caadd000000b0056e9a023ffesi526808qvb.414.2023.02.10.08.58.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Feb 2023 08:58:37 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=baQQBiPU; 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 1pQWiw-0003Wa-Kf; Fri, 10 Feb 2023 11:58: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 1pQWiv-0003WP-67 for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:58:09 -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 1pQWit-0003yg-G6 for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:58:08 -0500 Received: by mail-wr1-x42f.google.com with SMTP id r2so5669747wrv.7 for ; Fri, 10 Feb 2023 08:58:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=df58h/AdXCUfIsw29990QJNsnEG6zfozV6HUit6iE6U=; b=baQQBiPUjALYohVGxuzk+/A3Hgk6QMeIa+Z2rsRjxes5IzhIhMcbsdORUxzqHIWhwj ANS9+VkJ904OZr5IEJBo9pe1qQtPr1eaSeXTqYGL6Ii/kFxNpw/x49+RsONvpdTO9jgi TchM1y6xd81wkcLAifeLarDgPdRuMWA1kk/INhTMu30PudXyuP88aAeK4CF9vt90bR1M g1xFcVHzqe3pYzFD+QNW3VDdYUwz/OEeT09BT5/W8RV3BJK4Ae3Q7ddOaBIqJImjfx0m zfX2gZAdcKdbovMprF2a9k1QwI4SjRuJZbC39Z1AK+ga5xP2agKLhM1scDcxqb32Ytae kvRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=df58h/AdXCUfIsw29990QJNsnEG6zfozV6HUit6iE6U=; b=5zxOIPLLNfM3YtkrUr+vj9P6G5lDK4hTDILDA6UQ9w6Cbpn8fT7qmafxOzo01dS4MM lt6BiJd7MgPDqlJP+fIVHsInG4jdIZuMzBi0/0E7vO9mti631DKIkeWgEYHXGxzNvxNQ /YQfyds2wG9kyWy95hrE3rToVD3/fdmlVzQwZf7bdLPfS+hGxhCSBQib/JnJ1g9vc0Ye ogRLty3ofRxmuwE0ssGwsDYt2SzCREroVYL6C8BfcKU4b+FqUeZZrHQ59iIetIYSclL5 eOSSpeIbU2SU/EZTxY3dateK0IyPp5B4OpoNTC98lQpaZGdYy+cGIgcDOt6ALRKO4Sp/ t30A== X-Gm-Message-State: AO0yUKWaJ/FNtwER340PT0iGP1t4BlKyhAawv/+xqP27wSJTgNHf3UVp x7XkWYlFNsTqcy389KNsW8r4TIa7cUvJafmI X-Received: by 2002:a5d:62c8:0:b0:2bf:d7b9:270 with SMTP id o8-20020a5d62c8000000b002bfd7b90270mr13845166wrv.3.1676048285941; Fri, 10 Feb 2023 08:58:05 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id y1-20020a5d6201000000b002c3ea5ebc73sm3996388wru.101.2023.02.10.08.58.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 Feb 2023 08:58:05 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Thomas Huth , "Michael S. Tsirkin" , Richard Henderson , =?utf-8?q?Herv=C3=A9_Pous?= =?utf-8?q?sineau?= , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Marcel Apfelbaum Subject: [PATCH 2/4] hw/isa/piix: Batch register QOM types using DEFINE_TYPES() macro Date: Fri, 10 Feb 2023 17:57:52 +0100 Message-Id: <20230210165754.34342-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230210165754.34342-1-philmd@linaro.org> References: <20230210165754.34342-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 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 See rationale in commit 38b5d79b2e ("qom: add helper macro DEFINE_TYPES()"). Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/piix3.c | 53 +++++++++++++++++++++----------------------------- 1 file changed, 22 insertions(+), 31 deletions(-) diff --git a/hw/isa/piix3.c b/hw/isa/piix3.c index a9cb39bf21..0ee94a2313 100644 --- a/hw/isa/piix3.c +++ b/hw/isa/piix3.c @@ -346,19 +346,6 @@ static void pci_piix3_class_init(ObjectClass *klass, void *data) adevc->build_dev_aml = build_pci_isa_aml; } -static const TypeInfo piix3_pci_type_info = { - .name = TYPE_PIIX3_PCI_DEVICE, - .parent = TYPE_PCI_DEVICE, - .instance_size = sizeof(PIIX3State), - .abstract = true, - .class_init = pci_piix3_class_init, - .interfaces = (InterfaceInfo[]) { - { INTERFACE_CONVENTIONAL_PCI_DEVICE }, - { TYPE_ACPI_DEV_AML_IF }, - { }, - }, -}; - static void piix3_realize(PCIDevice *dev, Error **errp) { ERRP_GUARD(); @@ -382,12 +369,6 @@ static void piix3_class_init(ObjectClass *klass, void *data) k->realize = piix3_realize; } -static const TypeInfo piix3_info = { - .name = TYPE_PIIX3_DEVICE, - .parent = TYPE_PIIX3_PCI_DEVICE, - .class_init = piix3_class_init, -}; - static void piix3_xen_realize(PCIDevice *dev, Error **errp) { ERRP_GUARD(); @@ -416,17 +397,27 @@ static void piix3_xen_class_init(ObjectClass *klass, void *data) k->realize = piix3_xen_realize; } -static const TypeInfo piix3_xen_info = { - .name = TYPE_PIIX3_XEN_DEVICE, - .parent = TYPE_PIIX3_PCI_DEVICE, - .class_init = piix3_xen_class_init, +static const TypeInfo piix_isa_types[] = { + { + .name = TYPE_PIIX3_PCI_DEVICE, + .parent = TYPE_PCI_DEVICE, + .instance_size = sizeof(PIIX3State), + .class_init = pci_piix3_class_init, + .abstract = true, + .interfaces = (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { TYPE_ACPI_DEV_AML_IF }, + { }, + }, + }, { + .name = TYPE_PIIX3_DEVICE, + .parent = TYPE_PIIX3_PCI_DEVICE, + .class_init = piix3_class_init, + }, { + .name = TYPE_PIIX3_XEN_DEVICE, + .parent = TYPE_PIIX3_PCI_DEVICE, + .class_init = piix3_xen_class_init, + } }; -static void piix3_register_types(void) -{ - type_register_static(&piix3_pci_type_info); - type_register_static(&piix3_info); - type_register_static(&piix3_xen_info); -} - -type_init(piix3_register_types) +DEFINE_TYPES(piix_isa_types) From patchwork Fri Feb 10 16:57:53 2023 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: 652354 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp1070095wrr; Fri, 10 Feb 2023 08:58:37 -0800 (PST) X-Google-Smtp-Source: AK7set8pOIMMlOB0IBrND9BzdslcztH9v53QgpsxYAfJRU+v/3Bb8mPzQesIdUP3eaTM8hHtmX01 X-Received: by 2002:a05:622a:2c7:b0:3ba:2722:e8d7 with SMTP id a7-20020a05622a02c700b003ba2722e8d7mr24705947qtx.7.1676048317232; Fri, 10 Feb 2023 08:58:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676048317; cv=none; d=google.com; s=arc-20160816; b=fAdc7NLuJ+T80j9aACsq+OcR2h6aLOOC4QnrpMbqA3p9yHNbQMwRnymI43ux7OEQzO esZKxk540pq3upXASOtRwt8FxxEkIshOeSxyGYHHSmaJfE3t2o3U3BIY/wzwUlnOG43Y Is6TW7NmIWyS7+mSHrSAKo0fa9kwo9OfKnB4vHHKM7nP8v8KWCKI3NgR1QjQXitWf+Bx xwakZOaVUXCaIAtPeNLT2WmEO9jOJFAF7MiohRjrp4LVPZhMBmBb8mCLMtp2ep5lscsR DQv2nb/sb637wJbNNZUGpzjTZVMgAHPKUmzJUFRIaT3dgpLYBT52s6D6/FOpg9YhkHua HaoQ== 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=dNEqdjb5NZIGVTLErJKFkoWmPaX64LganiXA1CDJfHw=; b=Z9vqqihI8HfqZVrK3bHSIR+X+oWMPI8VQc8GaWqLuaRoMMgjJgPnOiTGrt29C3KOd/ XMHwPhnfONiN02PqXuCiBggE9epDgQQ41B2HWfoBg55f/sA4bDSK9OakaAm730bs4Mdb zzxiBgP6CYHwz/VCBwtiPp9diMNci1ZU/kfl7VTHw5NUAb/5lhTO7OQbmECJCTGg1D/g mCdXdddN7uwAIH/2Dgur8JJbYPRnDeEaQeSL/M3RGLL17AXw0vegWWO3GblFO5BX8ht1 0EAPZBwXkwtTXUrdYhvH1X46f7fSkOfnuH8jU68aMN9JaCHZES/ROI+I9iaQ7XlZWonx utIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UEMiEvGJ; 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 q27-20020ac8411b000000b003bb97f23f46si523416qtl.777.2023.02.10.08.58.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Feb 2023 08:58:37 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UEMiEvGJ; 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 1pQWj1-0003Xv-Vx; Fri, 10 Feb 2023 11:58: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 1pQWj0-0003XQ-0y for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:58:14 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQWiy-0003z8-8a for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:58:13 -0500 Received: by mail-wr1-x42c.google.com with SMTP id a2so5682738wrd.6 for ; Fri, 10 Feb 2023 08:58:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=dNEqdjb5NZIGVTLErJKFkoWmPaX64LganiXA1CDJfHw=; b=UEMiEvGJzFHxvU4A1blkzFaEmMHOnbvRPw6m47FBQoC2w2uczRfUj/37XbibPQHcjz 0ligFQv/iNZw9csj2GXAy7V67flZpVzDJS1utmAp3tJHinN0RV7an2q/Px1bCx/kxljW ouYI6bvES2F1YERmsPUPLWEr/3TzRNFQqNZZFMvQ9YVe5tNyGPW7aay7cNBFJCB49pk3 eH6KQx1OwDYjyRrLZ53ntzVdjJViFVss6hLDP6V1Mr8mxIdppn/CIYGQGP96OJCd9bol SbekdamD0H4VqwnFcpmdn+sCOiwT1X53GXyTzIvpHogCozPA2NyWd7wsBaDrfEA1y2Ay QbTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=dNEqdjb5NZIGVTLErJKFkoWmPaX64LganiXA1CDJfHw=; b=LCp+DMQoz8CPWMTvUdJ5+Uq6dGJs+Vq8oCEftsSBnJCjFy3WhyrgXZPbEpSka0gfOG 0P5K/QyS501GennDYHOIWB0sJHz/qZeuEW5WW01V1dnKFFYnN6TrMIW5uEY7526WY2lv +QmDjjvmNjgSHWDh7WucCieXSUhMuZtf6ia6i/9WWD4DWzHY6vPrE648rScvmfGXnZaO g+iKi8tkX2KOcnl05jdEnHL4AMzrh3ZIJ5vC2BBdMkBnbl9+eMrqu87StapWJySlpYsA MHhhG7u0rPT2kB5C8VSljip0gK60l/JVZwApCtSpP8/476M9VqQRFfsrJM+5U0umWI98 /Lpw== X-Gm-Message-State: AO0yUKWH83KtxQNtcedTiS2CR8Q3qQtFRRMdwOFQbEGgw/9Tki/PuSk+ uUVakLRCRVnS4ZJWbiZMdjtiRPB4U0sheNzD X-Received: by 2002:a5d:5583:0:b0:2c3:da89:bc50 with SMTP id i3-20020a5d5583000000b002c3da89bc50mr14350872wrv.52.1676048290787; Fri, 10 Feb 2023 08:58:10 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id v15-20020adfebcf000000b002c3f81c51b6sm4087828wrn.90.2023.02.10.08.58.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 Feb 2023 08:58:10 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Thomas Huth , "Michael S. Tsirkin" , Richard Henderson , =?utf-8?q?Herv=C3=A9_Pous?= =?utf-8?q?sineau?= , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Marcel Apfelbaum , Paolo Bonzini , Aurelien Jarno Subject: [PATCH 3/4] hw/isa/piix: Unify QOM type name of PIIX ISA function Date: Fri, 10 Feb 2023 17:57:53 +0100 Message-Id: <20230210165754.34342-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230210165754.34342-1-philmd@linaro.org> References: <20230210165754.34342-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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 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 Mechanical change doing: $ sed -i -e 's/PIIX4_PCI_DEVICE/PIIX4_ISA/g' $(git grep -l PIIX4_PCI_DEVICE) $ sed -i -e 's/PIIX3_XEN_DEVICE/PIIX3_ISA_XEN/g' $(git grep -l PIIX3_XEN_DEVICE) $ sed -i -e 's/PIIX3_DEVICE/PIIX3_ISA/g' $(git grep -l PIIX3_DEVICE) $ sed -i -e 's/PIIX3_PCI_DEVICE/PIIX_ISA/g' $(git grep -l PIIX3_PCI_DEVICE) Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 5 ++--- hw/isa/piix3.c | 20 ++++++++++---------- hw/isa/piix4.c | 10 +++++----- hw/mips/malta.c | 2 +- include/hw/southbridge/piix.h | 10 +++++----- 5 files changed, 23 insertions(+), 24 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 7c48ba30e0..afef5ed115 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -220,8 +220,7 @@ static void pc_init1(MachineState *machine, if (pcmc->pci_enabled) { PIIX3State *piix3; PCIDevice *pci_dev; - const char *type = xen_enabled() ? TYPE_PIIX3_XEN_DEVICE - : TYPE_PIIX3_DEVICE; + const char *type = xen_enabled() ? TYPE_PIIX3_ISA_XEN : TYPE_PIIX3_ISA; pci_bus = i440fx_init(pci_type, i440fx_host, @@ -235,7 +234,7 @@ static void pc_init1(MachineState *machine, pcms->bus = pci_bus; pci_dev = pci_create_simple_multifunction(pci_bus, -1, true, type); - piix3 = PIIX3_PCI_DEVICE(pci_dev); + piix3 = PIIX3_ISA(pci_dev); piix3->pic = x86ms->gsi; piix3_devfn = piix3->dev.devfn; isa_bus = ISA_BUS(qdev_get_child_bus(DEVICE(piix3), "isa.0")); diff --git a/hw/isa/piix3.c b/hw/isa/piix3.c index 0ee94a2313..38e0c269ae 100644 --- a/hw/isa/piix3.c +++ b/hw/isa/piix3.c @@ -112,7 +112,7 @@ static void piix3_write_config(PCIDevice *dev, { pci_default_write_config(dev, address, val, len); if (ranges_overlap(address, len, PIIX_PIRQCA, 4)) { - PIIX3State *piix3 = PIIX3_PCI_DEVICE(dev); + PIIX3State *piix3 = PIIX3_ISA(dev); int pic_irq; pci_bus_fire_intx_routing_notifier(pci_get_bus(&piix3->dev)); @@ -145,7 +145,7 @@ static void piix3_write_config_xen(PCIDevice *dev, static void piix3_reset(DeviceState *dev) { - PIIX3State *d = PIIX3_PCI_DEVICE(dev); + PIIX3State *d = PIIX3_ISA(dev); uint8_t *pci_conf = d->dev.config; pci_conf[0x04] = 0x07; /* master, memory and I/O */ @@ -286,7 +286,7 @@ static const MemoryRegionOps rcr_ops = { static void pci_piix3_realize(PCIDevice *dev, Error **errp) { - PIIX3State *d = PIIX3_PCI_DEVICE(dev); + PIIX3State *d = PIIX3_ISA(dev); ISABus *isa_bus; isa_bus = isa_bus_new(DEVICE(d), pci_address_space(dev), @@ -349,7 +349,7 @@ static void pci_piix3_class_init(ObjectClass *klass, void *data) static void piix3_realize(PCIDevice *dev, Error **errp) { ERRP_GUARD(); - PIIX3State *piix3 = PIIX3_PCI_DEVICE(dev); + PIIX3State *piix3 = PIIX3_ISA(dev); PCIBus *pci_bus = pci_get_bus(dev); pci_piix3_realize(dev, errp); @@ -372,7 +372,7 @@ static void piix3_class_init(ObjectClass *klass, void *data) static void piix3_xen_realize(PCIDevice *dev, Error **errp) { ERRP_GUARD(); - PIIX3State *piix3 = PIIX3_PCI_DEVICE(dev); + PIIX3State *piix3 = PIIX3_ISA(dev); PCIBus *pci_bus = pci_get_bus(dev); pci_piix3_realize(dev, errp); @@ -399,7 +399,7 @@ static void piix3_xen_class_init(ObjectClass *klass, void *data) static const TypeInfo piix_isa_types[] = { { - .name = TYPE_PIIX3_PCI_DEVICE, + .name = TYPE_PIIX_ISA, .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(PIIX3State), .class_init = pci_piix3_class_init, @@ -410,12 +410,12 @@ static const TypeInfo piix_isa_types[] = { { }, }, }, { - .name = TYPE_PIIX3_DEVICE, - .parent = TYPE_PIIX3_PCI_DEVICE, + .name = TYPE_PIIX3_ISA, + .parent = TYPE_PIIX_ISA, .class_init = piix3_class_init, }, { - .name = TYPE_PIIX3_XEN_DEVICE, - .parent = TYPE_PIIX3_PCI_DEVICE, + .name = TYPE_PIIX3_ISA_XEN, + .parent = TYPE_PIIX_ISA, .class_init = piix3_xen_class_init, } }; diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index ef24826993..8c51b523e5 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -56,7 +56,7 @@ struct PIIX4State { uint8_t rcr; }; -OBJECT_DECLARE_SIMPLE_TYPE(PIIX4State, PIIX4_PCI_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(PIIX4State, PIIX4_ISA) static void piix4_set_irq(void *opaque, int irq_num, int level) { @@ -81,7 +81,7 @@ static void piix4_set_irq(void *opaque, int irq_num, int level) static void piix4_isa_reset(DeviceState *dev) { - PIIX4State *d = PIIX4_PCI_DEVICE(dev); + PIIX4State *d = PIIX4_ISA(dev); uint8_t *pci_conf = d->dev.config; pci_conf[0x04] = 0x07; // master, memory and I/O @@ -186,7 +186,7 @@ static const MemoryRegionOps piix4_rcr_ops = { static void piix4_realize(PCIDevice *dev, Error **errp) { - PIIX4State *s = PIIX4_PCI_DEVICE(dev); + PIIX4State *s = PIIX4_ISA(dev); PCIBus *pci_bus = pci_get_bus(dev); ISABus *isa_bus; qemu_irq *i8259_out_irq; @@ -251,7 +251,7 @@ static void piix4_realize(PCIDevice *dev, Error **errp) static void piix4_init(Object *obj) { - PIIX4State *s = PIIX4_PCI_DEVICE(obj); + PIIX4State *s = PIIX4_ISA(obj); object_initialize_child(obj, "rtc", &s->rtc, TYPE_MC146818_RTC); object_initialize_child(obj, "ide", &s->ide, TYPE_PIIX4_IDE); @@ -283,7 +283,7 @@ static void piix4_class_init(ObjectClass *klass, void *data) } static const TypeInfo piix4_info = { - .name = TYPE_PIIX4_PCI_DEVICE, + .name = TYPE_PIIX4_ISA, .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(PIIX4State), .instance_init = piix4_init, diff --git a/hw/mips/malta.c b/hw/mips/malta.c index ec172b111a..5aefeba581 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -1255,7 +1255,7 @@ void mips_malta_init(MachineState *machine) /* Southbridge */ piix4 = pci_create_simple_multifunction(pci_bus, PIIX4_PCI_DEVFN, true, - TYPE_PIIX4_PCI_DEVICE); + TYPE_PIIX4_ISA); isa_bus = ISA_BUS(qdev_get_child_bus(DEVICE(piix4), "isa.0")); dev = DEVICE(object_resolve_path_component(OBJECT(piix4), "ide")); diff --git a/include/hw/southbridge/piix.h b/include/hw/southbridge/piix.h index a58bf13a41..71a82ef266 100644 --- a/include/hw/southbridge/piix.h +++ b/include/hw/southbridge/piix.h @@ -58,11 +58,11 @@ struct PIIX3State { MemoryRegion rcr_mem; }; -#define TYPE_PIIX3_PCI_DEVICE "pci-piix3" -#define TYPE_PIIX3_DEVICE "PIIX3" -#define TYPE_PIIX3_XEN_DEVICE "PIIX3-xen" -#define TYPE_PIIX4_PCI_DEVICE "piix4-isa" +#define TYPE_PIIX_ISA "pci-piix3" +#define TYPE_PIIX3_ISA "PIIX3" +#define TYPE_PIIX3_ISA_XEN "PIIX3-xen" +#define TYPE_PIIX4_ISA "piix4-isa" -OBJECT_DECLARE_SIMPLE_TYPE(PIIX3State, PIIX3_PCI_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(PIIX3State, PIIX3_ISA) #endif From patchwork Fri Feb 10 16:57:54 2023 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: 652357 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp1070460wrr; Fri, 10 Feb 2023 08:59:23 -0800 (PST) X-Google-Smtp-Source: AK7set+U0Jt2iftcFhoVcvii9dTEnJrzHebNjKIpveCYWW2aAneBP20JBQDvalotc0eXrBEYzhA9 X-Received: by 2002:a05:6214:27e1:b0:539:45bd:5b73 with SMTP id jt1-20020a05621427e100b0053945bd5b73mr22480721qvb.52.1676048363676; Fri, 10 Feb 2023 08:59:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676048363; cv=none; d=google.com; s=arc-20160816; b=VzbsfHu23jgrYs2YSpbVsv3gUih/pRrvxpLJLNVa77NP4/0KI3+sVcgxJ4e2oh5WRk sjfw6EZVaBCiuJ20bTXtEv/g+nIvptH0Jpc/NcqiDcstWF/XjCRqdMpbg6EAAv6whzzl 6HV2N2w2tKv4CXsS/qFyLz07AbESvcWDhtFN9D/caRcc0C8PfL07jys0Esf5OicM0iZL nPakfDySzL9R+vknJH63n4hLSHShGe+baYGmi/oHQpLe0iERHGUCGz4upm7Vdk1cu8kI Vsx4Tw/gMjzinwR/JRk9tt3aUaa+Vj40T0ck7qJS1NrWKNTVnUEzUlfcMuSAhauFgALo hyXQ== 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=76WGhaMeuPYXbX/pWJbcrHLrwrtrG1g1D4hmZur00GA=; b=vIbmDNkkXuhLeLk1bJS04Mca4/BBquiirsuwX0PDLa9x23A8FjGPKmxNhEi3PxKvxy EUnReghwNAjIzls7h3WbBZoksI2ZGfSnQZYhwrFgXPTwdOr2Y/MaTUb/FdD316LZiSsk svjudPnoS9mS2BLEMeenZ95kgCCWdYH2UOcCv+0ShkRr0NEvlxSNaz1r7FgPTbaSmNhB vEWv/bRqNRa54haEKQe/rdp6U5HEBYhByhfzogPGWfqoYbmn9ucK+uc4IN5tvHu4+Rqb KWrIoI2Y+r5zFio2ZlZSc7yRWBoslIfCxITMM5unl9kjsduJ5JX+MRDAN8/d8v+J6yNe +G6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qWkoEjoO; 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 d15-20020a0ce44f000000b005542726b064si3897283qvm.434.2023.02.10.08.59.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Feb 2023 08:59:23 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qWkoEjoO; 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 1pQWj6-0003Yu-Kl; Fri, 10 Feb 2023 11:58: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 1pQWj5-0003Yi-8c for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:58:19 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQWj3-0003zc-IE for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:58:18 -0500 Received: by mail-wm1-x333.google.com with SMTP id z13so4286078wmp.2 for ; Fri, 10 Feb 2023 08:58:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=76WGhaMeuPYXbX/pWJbcrHLrwrtrG1g1D4hmZur00GA=; b=qWkoEjoOVmCqr1OiTv613fwL4i8yn6qDJ3BoIC2oamGES+NCsMCI0XZHfy3bQYqdya +ccw38zjVDi3QnECFPfE29HG36boSUEXSOdroeZM9pjZKxvOCtGyYGc9y4PsE7JZgh+2 OuAYUqCQSO8qDbK/AcGzZBfRSa2RHRiKAe6zGUiaCi8ZG8VfFxasAqNIEVMIDEF/5CVt uoVqXbIbm/+a1G07m7Yyv+z0ad5R8ykSJ7ehGpKG+xCQUzBm4WuzO0XHlVS1/LDiL9IC uJiC9uboEtxeD58PAXvP+kGKsUxLOvF6QJwLeaDZoKX7YnhhCIaCFWFeCMEbzBkvitLf 5jXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=76WGhaMeuPYXbX/pWJbcrHLrwrtrG1g1D4hmZur00GA=; b=fPYmk6TVpveoMUqRmjYIMlwhSCVeP/q+sFYpEAwsVy4CGsB6xYPiaoxQYhazwUhQTL AqBJ/fwhlWOOlEZf5fI5XQQREKhIcfI53p3+LPwHUH6GF6dppooyIMMQdTHOstWfMuFW K698CiSjTo0aqNHAKXcG3LK6u25tiU5hZwDS8/g77Bc6dYZUX1tNg9B+812mhLGoX2Hk gk+lXb2bDUAjrzds+is9W9mi/doRQ7yYOhRdaMPBgRncVoIJzWbDAQ6B9y32qTURtpEJ tHS66OjmLbM8ZCPOLQDzZfyWgUkj6elYUYT0lFjZm9EYGXi8e+wI3eDjf7hwr955Uyy9 EBzg== X-Gm-Message-State: AO0yUKU6wPpw+AM9+ZqQEuj7hFwFok0N0q8NV9NuPsp1opBlLw178sTI SLwbTSBi3vHoemYAw4sFOR4U8oh5r0UU54st X-Received: by 2002:a05:600c:331a:b0:3dd:f286:5ae9 with SMTP id q26-20020a05600c331a00b003ddf2865ae9mr13493365wmp.9.1676048296006; Fri, 10 Feb 2023 08:58:16 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id b39-20020a05600c4aa700b003dc433bb5e1sm5519466wmp.9.2023.02.10.08.58.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 Feb 2023 08:58:15 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Thomas Huth , "Michael S. Tsirkin" , Richard Henderson , =?utf-8?q?Herv=C3=A9_Pous?= =?utf-8?q?sineau?= , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aurelien Jarno , Marcel Apfelbaum , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= Subject: [PATCH 4/4] hw/isa/piix: Unify PIIX-ISA QOM type names using qdev aliases Date: Fri, 10 Feb 2023 17:57:54 +0100 Message-Id: <20230210165754.34342-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230210165754.34342-1-philmd@linaro.org> References: <20230210165754.34342-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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 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 Unify PIIX ISA (PCI function #0) as: pci-piix3 -> piix-isa (abstract base class) PIIX3 -> piix3-isa (PIIX3 implementation) PIIX3-xen -> piix3-isa-xen (PIIX3 implementation with Xen extensions) piix4-isa -> piix4-isa (PIIX4 implementation) Alias previous names in the QDevAlias table. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/southbridge/piix.h | 6 +++--- softmmu/qdev-monitor.c | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/hw/southbridge/piix.h b/include/hw/southbridge/piix.h index 71a82ef266..cce65e8f44 100644 --- a/include/hw/southbridge/piix.h +++ b/include/hw/southbridge/piix.h @@ -58,9 +58,9 @@ struct PIIX3State { MemoryRegion rcr_mem; }; -#define TYPE_PIIX_ISA "pci-piix3" -#define TYPE_PIIX3_ISA "PIIX3" -#define TYPE_PIIX3_ISA_XEN "PIIX3-xen" +#define TYPE_PIIX_ISA "piix-isa" +#define TYPE_PIIX3_ISA "piix3-isa" +#define TYPE_PIIX3_ISA_XEN "piix3-isa-xen" #define TYPE_PIIX4_ISA "piix4-isa" OBJECT_DECLARE_SIMPLE_TYPE(PIIX3State, PIIX3_ISA) diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c index b8d2c4dadd..820e7f52ad 100644 --- a/softmmu/qdev-monitor.c +++ b/softmmu/qdev-monitor.c @@ -72,6 +72,9 @@ static const QDevAlias qdev_alias_table[] = { { "ES1370", "es1370" }, /* -soundhw name */ { "ich9-ahci", "ahci" }, { "lsi53c895a", "lsi" }, + { "piix-isa", "pci-piix3" }, + { "piix3-isa", "PIIX3" }, + { "piix3-isa-xen", "PIIX3-xen" }, { "virtio-9p-device", "virtio-9p", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-9p-ccw", "virtio-9p", QEMU_ARCH_VIRTIO_CCW }, { "virtio-9p-pci", "virtio-9p", QEMU_ARCH_VIRTIO_PCI },