From nobody Thu Dec 18 08:06:57 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1665427451; cv=none; d=zohomail.com; s=zohoarc; b=HZWqpkR6PF8ORyEHCh9UsU88pbm3Si3zqv33h8tG7BODZPJzgg34NoeFlUYcoomxYsI9LBIdVL5w6HkEMxw4DjaVAA9Fg/TIn1ByWuSIVoleuKFUCm3QBwau1/UuKRwWHte9QsHbpjt/fYdqzgA8CsDE/GpwTq4owyZ+u/FGoDI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665427451; h=Content-Type: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=BlHcYu74UwkxKBo2ey1MBoltBMhBVKcIr1id+vxwvXY=; b=bzc+76bZQVMOji3fF/TsGQHoknX3S9PNCwe5fOhlftocKWF1+iwoM3U52SH+PTMO+fF7WQojro5vsapRn+nk19MPldNlpVZIhDfEh0kZ5LvednxArq5Qy6esWxMusz2gDxG3IiBe435NY4mf0kdzacgrCd+gmwn4ju0/TYcYK/I= 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 1665427451358914.5267131180325; Mon, 10 Oct 2022 11:44:11 -0700 (PDT) Received: from localhost ([::1]:42368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohxl3-0001yE-2J for importer@patchew.org; Mon, 10 Oct 2022 14:44:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohwdF-0003zU-7f for qemu-devel@nongnu.org; Mon, 10 Oct 2022 13:32:01 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:29871) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohwcz-0007TJ-TK for qemu-devel@nongnu.org; Mon, 10 Oct 2022 13:32:00 -0400 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-79-MTjA-EbeMhaQFz1q2h22zw-1; Mon, 10 Oct 2022 13:31:44 -0400 Received: by mail-wm1-f70.google.com with SMTP id o18-20020a05600c339200b003bf24961658so7288591wmp.6 for ; Mon, 10 Oct 2022 10:31:43 -0700 (PDT) Received: from redhat.com ([2.55.183.131]) by smtp.gmail.com with ESMTPSA id co11-20020a0560000a0b00b00228d52b935asm9618110wrb.71.2022.10.10.10.31.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 10:31:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665423105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BlHcYu74UwkxKBo2ey1MBoltBMhBVKcIr1id+vxwvXY=; b=UoqkAoQtwa9v6ks8AbRrQISzwRCZlTS9UBIKfnvZyjuqk7BN/8FdsDerk/sytefyeQYXxm kAuMWMwAkzcj0LPAmLxzUdX5p2oiHDQlPT2M7ZwYyHylnAkazGbz1CD2OZ/+xyAZzqteCw 6kRYKduQ9KeEYiGlvU4ILPY23iTROCQ= X-MC-Unique: MTjA-EbeMhaQFz1q2h22zw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=BlHcYu74UwkxKBo2ey1MBoltBMhBVKcIr1id+vxwvXY=; b=DaUkCWWQl2/Yq1NcKSSnMYIWib8pV99XL9TXHO+ADaqYIXviRwEEofWO40iX+2a/NA UCxA7bFflpFmD4uTm/B0VQi2oOgmhGv+81zyeNgFA3gjVkMwXZMemMTd+HQeJET2QMeW z2F1FMN5lEL8VjhX5YCyfnlCWXjnAKkX8zpCa1stiOjLoBfvnFoscuWc1oDKiV6/AKoN /KWDFPmUINNKVCDPrVVIXLbEiZNBHJqus0pOPXEU8/zmJDEFjeBfwXllqbO6LIathvo8 pmR3JSqZw2dcZJ0xiD1b2GfFTEhowqTUxzF3i8Co1RKfO95/ScW0ozoNRJz2BVgX084s tOqQ== X-Gm-Message-State: ACrzQf3/ZkVcphYq529T+yb/gqluvoT40WXkoT+EVf4UVQJK9r0g/vI1 kcbjCBhRZDws5wKpR5H7Y/g17LZub6TRzqjFQbBSBH1wyGxgBnHR2kzn92SK1koL1cZwWmcWiq5 T6akK46DrNYR0YOXu8o7w2Au/wSVgHL7LFjS+kKpJPVEe/+arKsayryzGaY6d X-Received: by 2002:a5d:43c8:0:b0:22e:632a:9bbf with SMTP id v8-20020a5d43c8000000b0022e632a9bbfmr12039723wrr.481.1665423102854; Mon, 10 Oct 2022 10:31:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM77YkdIxnSoiY5xO1T1VvPK3EzCO9M+U2sMr6d3ikd+e+q9xDImrxNk+Isc1gqAcvKyKesvWw== X-Received: by 2002:a5d:43c8:0:b0:22e:632a:9bbf with SMTP id v8-20020a5d43c8000000b0022e632a9bbfmr12039706wrr.481.1665423102587; Mon, 10 Oct 2022 10:31:42 -0700 (PDT) Date: Mon, 10 Oct 2022 13:31:38 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Igor Mammedov , Ani Sinha , Marcel Apfelbaum , Paolo Bonzini , Richard Henderson , Eduardo Habkost Subject: [PULL 40/55] acpi: x86: deduplicate HPET AML building Message-ID: <20221010172813.204597-41-mst@redhat.com> References: <20221010172813.204597-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221010172813.204597-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent 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=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1665427452570100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Igor Mammedov HPET AML doesn't depend on piix4 nor q35, move code buiding it to common scope to avoid duplication. Signed-off-by: Igor Mammedov Message-Id: <20220701133515.137890-3-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/acpi-build.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 0355bd3dda..67b532f5a5 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1467,9 +1467,6 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, aml_append(sb_scope, dev); aml_append(dsdt, sb_scope); =20 - if (misc->has_hpet) { - build_hpet_aml(dsdt); - } build_piix4_isa_bridge(dsdt); if (pm->pcihp_bridge_en || pm->pcihp_root_en) { build_x86_acpi_pci_hotplug(dsdt, pm->pcihp_io_base); @@ -1515,9 +1512,6 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, =20 aml_append(dsdt, sb_scope); =20 - if (misc->has_hpet) { - build_hpet_aml(dsdt); - } build_q35_isa_bridge(dsdt); if (pm->pcihp_bridge_en) { build_x86_acpi_pci_hotplug(dsdt, pm->pcihp_io_base); @@ -1528,6 +1522,10 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, } } =20 + if (misc->has_hpet) { + build_hpet_aml(dsdt); + } + if (vmbus_bridge) { sb_scope =3D aml_scope("_SB"); aml_append(sb_scope, build_vmbus_device_aml(vmbus_bridge)); --=20 MST