From nobody Sun Nov 16 01:09:52 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1744934403; cv=none; d=zohomail.com; s=zohoarc; b=bHw4TA9jLJHU9ZHUu6rSqh+TDVpygO6gBnZKKE5ksxvNiGoAgQ9m36Ejm1h3/4JONeEX4U1d3QFD/B8J/CCFz5CPdUrF+N7diw44sL5aDqoRqFkLvZ8g3GT75oKpsTgxYPmKmaOJ1YRTKoMyuF79XPeVz66AeXg2+OQbwBtt7tU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1744934403; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=IV76PRrNanbqrM8g0qKEhby3o8+8x24HZf+5mnfPp+c=; b=HfsOv0zZf4ZRDc4lD6A5bes45k0Qxi3sGOKpHUvUfo7PBApK/F8Sm3oY8PmmKB9z66Phqy3DCUMLjYRA/uYXJ47d9dOm1V0zzge5y6h4nrUKG6ZBky9/9MV0Nj5J4U9WZFoiP+bO8JXKMYb4ZXsaiZpQoVw+HSJCcVAoMAhP/Bs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1744934403030436.2926496364993; Thu, 17 Apr 2025 17:00:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u5Z89-00076b-Iq; Thu, 17 Apr 2025 19:58:53 -0400 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 1u5Z88-00076S-SA for qemu-devel@nongnu.org; Thu, 17 Apr 2025 19:58:52 -0400 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 1u5Z87-0003vP-4g for qemu-devel@nongnu.org; Thu, 17 Apr 2025 19:58:52 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-39bf44be22fso954836f8f.0 for ; Thu, 17 Apr 2025 16:58:50 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4406d6db230sm836565e9.31.2025.04.17.16.58.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 17 Apr 2025 16:58:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1744934329; x=1745539129; 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=IV76PRrNanbqrM8g0qKEhby3o8+8x24HZf+5mnfPp+c=; b=K4WzrWpe4zvJ3y8lGd1kHUw24Kczgpd7Ceq2ybWVporvbZsAE1AnSOaOLx5bhHPxgH k7Nh+Gyru9PSwA4lOQUurAdfgT+Uo6gVkLvWiyDJ2ydHlnp8Xck5bHFQRsjHrj7y1gYI t+VmgHZpbUToiY7FZBaewNh0YUwza/EBa6/qGF9p8DeDjvincOt4B5DH4jO8yd6ERS0L WTQesLAHJq63xf3XfIIgUoac4kfIbMlAkM3ze3Q0wf+JUtS/I2tz0nqTuGl2VrKbaj2D 16QKVocK3AnmJqznCPTxbcsQ3pmv1TjolPPBdhho4aVv6g90AqIgq8f3IydtxsZZzZR+ 0mjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744934329; x=1745539129; 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=IV76PRrNanbqrM8g0qKEhby3o8+8x24HZf+5mnfPp+c=; b=pLVdg8sKueqd3XZ+61W2MuYs4ORST3bvrHFo+iYDuW4BIR97CM5Jl8qx2yC+MOEXgf GSo+QC8BA1V9C/L/M+ZZxycAIsd9ZsdBHWshLE39HmMuBFAqgyxCEfh689bKtNHoExmR gymXmTHgfRVp+v4zZ4mJYUgYAQzn7hHvzbDeo15unM4lqGV+DQ8sp2UI2D6ulA/qBt3p 9MtSam6OYl7+WQ6UTKg6/xYLo322nnzW0Q6/XkSO9WJH+MNTreIOZaIOm72abmXGMr5i nR3AfDAdBSZqJQ/P/ENm+Fnggw/8ak5e9vjZbjurwjoLRq39ySbr/TMsNvdpYeKhyL+n nExA== X-Gm-Message-State: AOJu0Ywwp7Rug5Ffm09+OfdGJb+QIPRbbRXbiECyMAxEV3Pz5t1pfOVh 6cSL5WwNVXGhtMIrCO9GA/IXZug/65FH0kkfzmb8CMR68bZKtOgtuLsDDsjH9Mxq6TKgTAkYE9p P X-Gm-Gg: ASbGncuyt6uWg+A+zOez78eh7bzU6Sb7TbkPs+yun/jeKKc2/ReRqMGL48PgSXHodRA 0jPmnaotvsWptK5CYDphqit4tbI2UbBIb7Yfw/psE64SVAMC6lvUG1ZjdVN+wnwIKQt6tNAWTsC GnRsa+br4ClGrYct3bM3zdxMBJ+4RqB5nxdXYq5LRFr/wJI5HSV7MfNYcD6utRFm3Zs2RRGtqYS fgsSTxRhg/nXDh0gcOZtrvUuz5JGOhj8Zu74BithqKhzVssPb1rMvO+7Dkz9aE3z4CIyyTTtZGL 9Yhdkijw9RcA9Mo0gAV1roaOABBdShONGS3AtGKPDK33c8nYi5zp1H+e53F/TVmInzv1Bw98tF6 jqd6I+g3CbJtfj45U8U9O X-Google-Smtp-Source: AGHT+IHrJybmYerEVKR1kc4iJ3avFxeLEMMiqYjiV9t21N6Lh3iP0i4E41lSeZkx7PH2562rzzrt3A== X-Received: by 2002:a05:6000:1888:b0:391:4743:6dc2 with SMTP id ffacd0b85a97d-39efba5a416mr531019f8f.25.1744934329322; Thu, 17 Apr 2025 16:58:49 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Andrey Smirnov , Antony Pavlov , Zhao Liu , Beniamino Galvani , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost , Niek Linnenbank , qemu-arm@nongnu.org, Jean-Christophe Dubois , Felipe Balbi , Bernhard Beschow , Strahinja Jankovic , Jan Kiszka , Alistair Francis , Pierrick Bouvier , Subbaraya Sundeep , Alexandre Iooss , Peter Maydell , Marcel Apfelbaum , Yanan Wang Subject: [PATCH 06/11] hw/arm/integratorcp: Define machine as generic QOM type Date: Fri, 18 Apr 2025 01:58:09 +0200 Message-ID: <20250417235814.98677-7-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250417235814.98677-1-philmd@linaro.org> References: <20250417235814.98677-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 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, RCVD_IN_XBL=0.375, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1744934404678019000 While DEFINE_MACHINE() is a succinct macro, it doesn't allow registering QOM interfaces to the defined machine. Convert to the generic DEFINE_TYPES() in preparation to register interfaces. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/arm/integratorcp.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c index ac0c6c60961..f95916b517d 100644 --- a/hw/arm/integratorcp.c +++ b/hw/arm/integratorcp.c @@ -681,8 +681,10 @@ static void integratorcp_init(MachineState *machine) arm_load_kernel(cpu, machine, &integrator_binfo); } =20 -static void integratorcp_machine_init(MachineClass *mc) +static void integratorcp_machine_class_init(ObjectClass *oc, void *data) { + MachineClass *mc =3D MACHINE_CLASS(oc); + mc->desc =3D "ARM Integrator/CP (ARM926EJ-S)"; mc->init =3D integratorcp_init; mc->ignore_memory_transaction_failures =3D true; @@ -693,8 +695,6 @@ static void integratorcp_machine_init(MachineClass *mc) machine_add_audiodev_property(mc); } =20 -DEFINE_MACHINE("integratorcp", integratorcp_machine_init) - static const Property core_properties[] =3D { DEFINE_PROP_UINT32("memsz", IntegratorCMState, memsz, 0), }; @@ -754,3 +754,13 @@ static void integratorcp_register_types(void) } =20 type_init(integratorcp_register_types) + +static const TypeInfo integratorcp_machine_types[] =3D { + { + .name =3D MACHINE_TYPE_NAME("integratorcp"), + .parent =3D TYPE_MACHINE, + .class_init =3D integratorcp_machine_class_init, + }, +}; + +DEFINE_TYPES(integratorcp_machine_types) --=20 2.47.1