From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2192FC46467 for ; Mon, 16 Jan 2023 16:37:55 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHSUN-0000OS-Er; Mon, 16 Jan 2023 11:37:39 -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 1pHSUJ-0000NV-Qm for qemu-devel@nongnu.org; Mon, 16 Jan 2023 11:37:37 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHSUH-0003KJ-Pj for qemu-devel@nongnu.org; Mon, 16 Jan 2023 11:37:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673887051; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D5lv6nxqxKL4Uj2DyZf4N5d7X3X8IIDgtzlVJU8pf6Q=; b=aQFp3KNz2VkgaEKFoX3aXSm0xGo7bZDh1DmabXq0MRDQR3ZqT/HnuCN5PUNrdft3jLXndP TKlDt5g4iYGda4bbIilEBMsLGQsIj74pmHjbbVnhMnwgVOHCL7Z0P8XeYiWl3ddDeIC0Dj Gr2xgbp7O3I5bi9rPWfclyk9a8Ct83o= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-364-UZk4cvmkNBmFbZvkZkAuGw-1; Mon, 16 Jan 2023 11:37:31 -0500 X-MC-Unique: UZk4cvmkNBmFbZvkZkAuGw-1 Received: by mail-ej1-f71.google.com with SMTP id du14-20020a17090772ce00b0087108bbcfa6so1796037ejc.7 for ; Mon, 16 Jan 2023 08:37:30 -0800 (PST) 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:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D5lv6nxqxKL4Uj2DyZf4N5d7X3X8IIDgtzlVJU8pf6Q=; b=RAiQ1JgrBJjtRQIUg2exUcHn2qCFryNZbbdAKLWsVWpQ7OZSEZ6U7fetszJeJjXqkq 3HaM84J273b9RxYm3ecJmyByrW//UUAuCyz29VgdwTk8+GXvwc+X9Cz/pUXEuxyc9cUV MYN04gj1cMnKyQutA5Hb70NTx/fvAn4X0g3/3LkiLolW4nRj3qk2Zelvmlmhgib8rnpG u2+wjfGWlFhjiWzcFltUaL0+dfmq8W3LVMSophAAGQzxjJUftnNnsWCNoJx8hGx0WeWg JhQiOkyxPpBTmdorbZIRWjlGmq6p+xGLroLuNn6RwdLmcw3JWrcyuOQnU1JOygCdyhDJ kgZg== X-Gm-Message-State: AFqh2kpoiMWTztnRYDdgewyFrFTmd18MqgJX2OC8dc0jhr9XQQ/8HQ9g sZ2YiTRzpor62m/wURm7iiyBtEYdCU5L8M7hUKs+pzbSOg0jREkAmOvQ38R/M/AbM/woGy6D3fy 5bkFXy586OHk5iDs= X-Received: by 2002:a17:906:1c59:b0:86b:49c6:259a with SMTP id l25-20020a1709061c5900b0086b49c6259amr11794259ejg.62.1673887049959; Mon, 16 Jan 2023 08:37:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXtZavZbMsc8luZPEQ0RBVx2ME2Fj6g/ue20nSAOHYYwEPxw2UEWhyQn+i0qOikiHG376wTnNA== X-Received: by 2002:a17:906:1c59:b0:86b:49c6:259a with SMTP id l25-20020a1709061c5900b0086b49c6259amr11794223ejg.62.1673887049516; Mon, 16 Jan 2023 08:37:29 -0800 (PST) Received: from imammedo.users.ipa.redhat.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id f27-20020a17090631db00b007c11f2a3b3dsm11970443ejf.107.2023.01.16.08.37.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 08:37:28 -0800 (PST) Date: Mon, 16 Jan 2023 17:37:27 +0100 From: Igor Mammedov To: Bernhard Beschow Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, Richard Henderson , Paolo Bonzini , Philippe =?UTF-8?B?TWF0aGlldS1EYXVkw6k=?= , Markus Armbruster , Eduardo Habkost , "Michael S. Tsirkin" , Ani Sinha , Marcel Apfelbaum , Aurelien Jarno Subject: Re: [PATCH v3 1/7] hw/acpi/acpi_dev_interface: Remove unused parameter from AcpiDeviceIfClass::madt_cpu Message-ID: <20230116173727.231b7811@imammedo.users.ipa.redhat.com> In-Reply-To: <20230116152908.147275-2-shentey@gmail.com> References: <20230116152908.147275-1-shentey@gmail.com> <20230116152908.147275-2-shentey@gmail.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.36; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=170.10.133.124; envelope-from=imammedo@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, RCVD_IN_MSPIKE_H2=-0.001, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On Mon, 16 Jan 2023 16:29:02 +0100 Bernhard Beschow wrote: > The only function ever assigned to AcpiDeviceIfClass::madt_cpu is > pc_madt_cpu_entry() which doesn't use the AcpiDeviceIf parameter. >=20 > Signed-off-by: Bernhard Beschow Reviewed-by: Igor Mammedov > --- > include/hw/acpi/acpi_dev_interface.h | 3 +-- > include/hw/i386/pc.h | 6 ++---- > hw/acpi/acpi-x86-stub.c | 5 ++--- > hw/acpi/cpu.c | 3 +-- > hw/i386/acpi-common.c | 7 +++---- > 5 files changed, 9 insertions(+), 15 deletions(-) >=20 > diff --git a/include/hw/acpi/acpi_dev_interface.h b/include/hw/acpi/acpi_= dev_interface.h > index ea6056ab92..a1648220ff 100644 > --- a/include/hw/acpi/acpi_dev_interface.h > +++ b/include/hw/acpi/acpi_dev_interface.h > @@ -52,8 +52,7 @@ struct AcpiDeviceIfClass { > /* */ > void (*ospm_status)(AcpiDeviceIf *adev, ACPIOSTInfoList ***list); > void (*send_event)(AcpiDeviceIf *adev, AcpiEventStatusBits ev); > - void (*madt_cpu)(AcpiDeviceIf *adev, int uid, > - const CPUArchIdList *apic_ids, GArray *entry, > + void (*madt_cpu)(int uid, const CPUArchIdList *apic_ids, GArray *ent= ry, > bool force_enabled); > }; > #endif > diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h > index 991f905f5d..a0647165d1 100644 > --- a/include/hw/i386/pc.h > +++ b/include/hw/i386/pc.h > @@ -9,7 +9,6 @@ > #include "hw/block/flash.h" > #include "hw/i386/x86.h" > =20 > -#include "hw/acpi/acpi_dev_interface.h" > #include "hw/hotplug.h" > #include "qom/object.h" > #include "hw/i386/sgx-epc.h" > @@ -193,9 +192,8 @@ bool pc_system_ovmf_table_find(const char *entry, uin= t8_t **data, > void pc_system_parse_ovmf_flash(uint8_t *flash_ptr, size_t flash_size); > =20 > /* hw/i386/acpi-common.c */ > -void pc_madt_cpu_entry(AcpiDeviceIf *adev, int uid, > - const CPUArchIdList *apic_ids, GArray *entry, > - bool force_enabled); > +void pc_madt_cpu_entry(int uid, const CPUArchIdList *apic_ids, > + GArray *entry, bool force_enabled); > =20 > /* sgx.c */ > void pc_machine_init_sgx_epc(PCMachineState *pcms); > diff --git a/hw/acpi/acpi-x86-stub.c b/hw/acpi/acpi-x86-stub.c > index 3df1e090f4..d0d399d26b 100644 > --- a/hw/acpi/acpi-x86-stub.c > +++ b/hw/acpi/acpi-x86-stub.c > @@ -2,9 +2,8 @@ > #include "hw/i386/pc.h" > #include "hw/i386/acpi-build.h" > =20 > -void pc_madt_cpu_entry(AcpiDeviceIf *adev, int uid, > - const CPUArchIdList *apic_ids, GArray *entry, > - bool force_enabled) > +void pc_madt_cpu_entry(int uid, const CPUArchIdList *apic_ids, > + GArray *entry, bool force_enabled) > { > } > =20 > diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c > index 4e580959a2..19c154d78f 100644 > --- a/hw/acpi/cpu.c > +++ b/hw/acpi/cpu.c > @@ -355,7 +355,6 @@ void build_cpus_aml(Aml *table, MachineState *machine= , CPUHotplugFeatures opts, > char *cphp_res_path =3D g_strdup_printf("%s." CPUHP_RES_DEVICE, res_= root); > Object *obj =3D object_resolve_path_type("", TYPE_ACPI_DEVICE_IF, NU= LL); > AcpiDeviceIfClass *adevc =3D ACPI_DEVICE_IF_GET_CLASS(obj); > - AcpiDeviceIf *adev =3D ACPI_DEVICE_IF(obj); > =20 > cpu_ctrl_dev =3D aml_device("%s", cphp_res_path); > { > @@ -666,7 +665,7 @@ void build_cpus_aml(Aml *table, MachineState *machine= , CPUHotplugFeatures opts, > =20 > /* build _MAT object */ > assert(adevc && adevc->madt_cpu); > - adevc->madt_cpu(adev, i, arch_ids, madt_buf, > + adevc->madt_cpu(i, arch_ids, madt_buf, > true); /* set enabled flag */ > aml_append(dev, aml_name_decl("_MAT", > aml_buffer(madt_buf->len, (uint8_t *)madt_buf->data))); > diff --git a/hw/i386/acpi-common.c b/hw/i386/acpi-common.c > index 4aaafbdd7b..52e5c1439a 100644 > --- a/hw/i386/acpi-common.c > +++ b/hw/i386/acpi-common.c > @@ -33,9 +33,8 @@ > #include "acpi-build.h" > #include "acpi-common.h" > =20 > -void pc_madt_cpu_entry(AcpiDeviceIf *adev, int uid, > - const CPUArchIdList *apic_ids, GArray *entry, > - bool force_enabled) > +void pc_madt_cpu_entry(int uid, const CPUArchIdList *apic_ids, > + GArray *entry, bool force_enabled) > { > uint32_t apic_id =3D apic_ids->cpus[uid].arch_id; > /* Flags =E2=80=93 Local APIC Flags */ > @@ -112,7 +111,7 @@ void acpi_build_madt(GArray *table_data, BIOSLinker *= linker, > build_append_int_noprefix(table_data, 1 /* PCAT_COMPAT */, 4); /* Fl= ags */ > =20 > for (i =3D 0; i < apic_ids->len; i++) { > - adevc->madt_cpu(adev, i, apic_ids, table_data, false); > + adevc->madt_cpu(i, apic_ids, table_data, false); > if (apic_ids->cpus[i].arch_id > 254) { > x2apic_mode =3D true; > }