From nobody Wed Sep 10 03:18:04 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1666562999; cv=none; d=zohomail.com; s=zohoarc; b=hC4u6Q4JO04p2utAtY8F/o4JsuSTCVxbHbYiPEOQvTK7i0lZfgeE9D0lySSKZlL9FdL+HJO/hB3IfRgFTCb3upGJ59ghWmW8RgjEfpQXeLfA7Aq1W+Dbxlxpb/5lCrADLqmJl8VY/woLJ5cqV5MHNSg5yBuv2XQ7w8F1V8iE0f4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666562999; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=GR9CJIBgt9N+B9FKDmAgyhzq/HDc453u4Nxt6YUO8PE=; b=MBCgg+iTOkmw5gOG0NSXyPVAR3sJdR/oYymWs8ohdkxcDPLb0Bakkw9j8Azb/tO0fEuhbX3MeJ0y0pk9dNUPskk7zqbN3pDchyX/4ucpibCWO1m7TEUn6onUsXkjO3Db13eeDa+/a0xQXyCak5bIrsSSI9tZoi5Vu/66ohFK+io= 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 1666562999612127.73693202228742; Sun, 23 Oct 2022 15:09:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omgyb-0003lH-05 for importer@patchew.org; Sun, 23 Oct 2022 15:49:41 -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 1omG4s-00077p-6z; Sat, 22 Oct 2022 11:06:22 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omG4q-00026R-Im; Sat, 22 Oct 2022 11:06:22 -0400 Received: by mail-ed1-x52d.google.com with SMTP id u21so16098625edi.9; Sat, 22 Oct 2022 08:06:19 -0700 (PDT) Received: from localhost.localdomain (dynamic-077-191-171-138.77.191.pool.telefonica.de. [77.191.171.138]) by smtp.gmail.com with ESMTPSA id 4-20020a170906310400b00780ab5a9116sm13021558ejx.211.2022.10.22.08.06.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Oct 2022 08:06:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=GR9CJIBgt9N+B9FKDmAgyhzq/HDc453u4Nxt6YUO8PE=; b=KamZZ1ho3l94LDdtEhSATSyGjX2ZfouQ8d81CqLJQfqnerOcZ9Xr9hdPX9SjuHXW4N KqwVCcvCtY4VYSFoDobZTijPL6zLVIFvx0YNJmrlF+NFye5mrmVVrqcf/t/YysEt6aIx hgLbL6S+aCmJcS2Xiy7zBOSiHWih8SMymJSyvTrLxHqWsi3jf95ezLxRnTAQuQgqKxEY +0yTz57MhvPPhasWAgxNXyo82oaXF6o2hxoB93WXxXeKZ93/G6zPDTJMHJrK5ZwLBqz1 cuhZAHi7vIYTB3uazEb0RsEUAqZm37p+EESSrlfFxrPpf0+5ZTZX+8xG6FSXJ/4OBZ1D PlcA== 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=GR9CJIBgt9N+B9FKDmAgyhzq/HDc453u4Nxt6YUO8PE=; b=pbb95XAKwdcVsUe4PtVQsv/ZpiEEcl1VyAzYbwSii8tE5sjQ20QrGMjhHCorC460N7 W0GyvYBbabXkhQgbnxYRAJcjTQhHMK1dXwbAGP76G/l9Z08Qc94kH4YFo7AoehbzyY9X FRssjFWhf/dhyrUuI4ooxSHCpBOEVo1EXxnfaBAeQKvxTTWJV50kkj4khVBS1j5josY5 dEjrHiJ2ekxCzhdJ1wsJIfL6a53MBTJPI1tYIZy9HwCCfGPUlPlXNaZ3RIleqxgjYcX9 HiBkB24TLbaEp/+0X/qDPpsjEzNH3ebv/QLY+FEgv/peHmBv7ZiqcqHElx86iJojBegd gFhg== X-Gm-Message-State: ACrzQf2zKk5TKOTQKvOUtj1intZToCz/hlN7B2BfxQVpJJbuAnk76h9z QH1znkyOkcvTCueyqluIACoQ94KeTscmHg== X-Google-Smtp-Source: AMsMyM4oEg2uHL4mHdM4QRyNJz+lp8yva0HsPH/sYMEfGpCCnuqVpe2ZsyB+cXToV1xaJl3KzMuL0Q== X-Received: by 2002:a17:906:c152:b0:78d:9dbb:150b with SMTP id dp18-20020a170906c15200b0078d9dbb150bmr19347990ejc.542.1666451178595; Sat, 22 Oct 2022 08:06:18 -0700 (PDT) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Eduardo Habkost , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aurelien Jarno , Igor Mammedov , Gerd Hoffmann , John Snow , Jiaxun Yang , Ani Sinha , Marcel Apfelbaum , qemu-block@nongnu.org, Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" , Paolo Bonzini , Bernhard Beschow , Peter Maydell Subject: [PATCH v2 11/43] hw/i386/pc: No need for rtc_state to be an out-parameter Date: Sat, 22 Oct 2022 17:04:36 +0200 Message-Id: <20221022150508.26830-12-shentey@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022150508.26830-1-shentey@gmail.com> References: <20221022150508.26830-1-shentey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=shentey@gmail.com; helo=mail-ed1-x52d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1666563001559100001 Content-Type: text/plain; charset="utf-8" Now that the RTC is created as part of the southbridges it doesn't need to be an out-parameter any longer. Signed-off-by: Bernhard Beschow Reviewed-by: Peter Maydell --- hw/i386/pc.c | 12 ++++++------ hw/i386/pc_piix.c | 2 +- hw/i386/pc_q35.c | 2 +- include/hw/i386/pc.h | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 8f72aedea4..8619a295f2 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1248,7 +1248,7 @@ static void pc_superio_init(ISABus *isa_bus, bool cre= ate_fdctrl, =20 void pc_basic_device_init(struct PCMachineState *pcms, ISABus *isa_bus, qemu_irq *gsi, - ISADevice **rtc_state, + ISADevice *rtc_state, bool create_fdctrl, uint32_t hpet_irqs) { @@ -1303,17 +1303,17 @@ void pc_basic_device_init(struct PCMachineState *pc= ms, } =20 if (rtc_irq) { - qdev_connect_gpio_out(DEVICE(*rtc_state), 0, rtc_irq); + qdev_connect_gpio_out(DEVICE(rtc_state), 0, rtc_irq); } else { - uint32_t irq =3D object_property_get_uint(OBJECT(*rtc_state), + uint32_t irq =3D object_property_get_uint(OBJECT(rtc_state), "irq", &error_fatal); - isa_connect_gpio_out(*rtc_state, 0, irq); + isa_connect_gpio_out(rtc_state, 0, irq); } - object_property_add_alias(OBJECT(pcms), "rtc-time", OBJECT(*rtc_state), + object_property_add_alias(OBJECT(pcms), "rtc-time", OBJECT(rtc_state), "date"); =20 - qemu_register_boot_set(pc_boot_set, *rtc_state); + qemu_register_boot_set(pc_boot_set, rtc_state); =20 if (!xen_enabled() && (x86ms->pit =3D=3D ON_OFF_AUTO_AUTO || x86ms->pit =3D=3D ON_OFF_AU= TO_ON)) { diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 7de2f1092b..b97bff5674 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -262,7 +262,7 @@ static void pc_init1(MachineState *machine, } =20 /* init basic PC hardware */ - pc_basic_device_init(pcms, isa_bus, x86ms->gsi, &rtc_state, true, + pc_basic_device_init(pcms, isa_bus, x86ms->gsi, rtc_state, true, 0x4); =20 pc_nic_init(pcmc, isa_bus, pci_bus); diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index bf0888db97..bee932fb8f 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -293,7 +293,7 @@ static void pc_q35_init(MachineState *machine) } =20 /* init basic PC hardware */ - pc_basic_device_init(pcms, isa_bus, x86ms->gsi, &rtc_state, !mc->no_fl= oppy, + pc_basic_device_init(pcms, isa_bus, x86ms->gsi, rtc_state, !mc->no_flo= ppy, 0xff0104); =20 /* connect pm stuff to lpc */ diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index c95333514e..0cf3ccdf0d 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -169,7 +169,7 @@ uint64_t pc_pci_hole64_start(void); DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus); void pc_basic_device_init(struct PCMachineState *pcms, ISABus *isa_bus, qemu_irq *gsi, - ISADevice **rtc_state, + ISADevice *rtc_state, bool create_fdctrl, uint32_t hpet_irqs); void pc_cmos_init(PCMachineState *pcms, --=20 2.38.1