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 968BCC3ABDD for ; Tue, 20 May 2025 08:35:33 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uHIRL-0007cG-3D; Tue, 20 May 2025 04:35:12 -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 1uHIRI-0007bl-BJ; Tue, 20 May 2025 04:35:08 -0400 Received: from [185.176.79.56] (helo=frasgout.his.huawei.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uHIRC-0003Fy-7m; Tue, 20 May 2025 04:35:08 -0400 Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4b1nmW6zKFz6M4pS; Tue, 20 May 2025 16:30:03 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id A6BC21402FF; Tue, 20 May 2025 16:34:53 +0800 (CST) Received: from localhost (10.203.177.66) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 20 May 2025 10:34:53 +0200 Date: Tue, 20 May 2025 09:34:51 +0100 To: Mauro Carvalho Chehab CC: Igor Mammedov , "Michael S . Tsirkin" , Shiju Jose , , , Ani Sinha , Dongjiu Geng , Subject: Re: [PATCH v9 04/20] Revert "hw/acpi/ghes: Make ghes_record_cper_errors() static" Message-ID: <20250520093451.0000245a@huawei.com> In-Reply-To: <1ee2df288540088176a1ac27c70cc2736d10ad16.1747722973.git.mchehab+huawei@kernel.org> References: <1ee2df288540088176a1ac27c70cc2736d10ad16.1747722973.git.mchehab+huawei@kernel.org> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.203.177.66] X-ClientProxiedBy: lhrpeml100010.china.huawei.com (7.191.174.197) To frapeml500008.china.huawei.com (7.182.85.71) X-Host-Lookup-Failed: Reverse DNS lookup failed for 185.176.79.56 (deferred) Received-SPF: pass client-ip=185.176.79.56; envelope-from=jonathan.cameron@huawei.com; helo=frasgout.his.huawei.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RDNS_NONE=0.793, 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: , Reply-to: Jonathan Cameron From: Jonathan Cameron via Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On Tue, 20 May 2025 08:41:23 +0200 Mauro Carvalho Chehab wrote: > The ghes_record_cper_errors() function was introduced to be used > by other types of errors, as part of the error injection > patch series. That's why it is not static. > > Make it non-static again to allow its usage outside ghes.c > > This reverts commit 611f3bdb20f7828b0813aa90d47d1275ef18329b. > > Signed-off-by: Mauro Carvalho Chehab FWIW (which is maybe just that I don't read the commit message again if you have to do a v10 ;) Reviewed-by: Jonathan Cameron > --- > hw/acpi/ghes.c | 6 ++++-- > include/hw/acpi/ghes.h | 2 ++ > 2 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c > index b85bb48195a0..b709c177cdea 100644 > --- a/hw/acpi/ghes.c > +++ b/hw/acpi/ghes.c > @@ -390,8 +390,8 @@ static void get_hw_error_offsets(uint64_t ghes_addr, > *read_ack_register_addr = ghes_addr + sizeof(uint64_t); > } > > -static void ghes_record_cper_errors(const void *cper, size_t len, > - uint16_t source_id, Error **errp) > +void ghes_record_cper_errors(const void *cper, size_t len, > + uint16_t source_id, Error **errp) > { > uint64_t cper_addr = 0, read_ack_register_addr = 0, read_ack_register; > AcpiGedState *acpi_ged_state; > @@ -440,6 +440,8 @@ static void ghes_record_cper_errors(const void *cper, size_t len, > > /* Write the generic error data entry into guest memory */ > cpu_physical_memory_write(cper_addr, cper, len); > + > + return; > } > > int acpi_ghes_memory_errors(uint16_t source_id, uint64_t physical_address) > diff --git a/include/hw/acpi/ghes.h b/include/hw/acpi/ghes.h > index 578a582203ce..39619a2457cb 100644 > --- a/include/hw/acpi/ghes.h > +++ b/include/hw/acpi/ghes.h > @@ -75,6 +75,8 @@ void acpi_build_hest(GArray *table_data, GArray *hardware_errors, > void acpi_ghes_add_fw_cfg(AcpiGhesState *vms, FWCfgState *s, > GArray *hardware_errors); > int acpi_ghes_memory_errors(uint16_t source_id, uint64_t error_physical_addr); > +void ghes_record_cper_errors(const void *cper, size_t len, > + uint16_t source_id, Error **errp); > > /** > * acpi_ghes_present: Report whether ACPI GHES table is present