[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZqnvD8o+Fa4o/+Db@intel.com>
Date: Wed, 31 Jul 2024 16:00:15 +0800
From: Zhao Liu <zhao1.liu@...el.com>
To: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
Cc: Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Shiju Jose <shiju.jose@...wei.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Philippe Mathieu-Daudé <philmd@...aro.org>,
Ani Sinha <anisinha@...hat.com>,
Eduardo Habkost <eduardo@...kost.net>,
Igor Mammedov <imammedo@...hat.com>,
Marcel Apfelbaum <marcel.apfelbaum@...il.com>,
Peter Maydell <peter.maydell@...aro.org>,
Shannon Zhao <shannon.zhaosl@...il.com>,
Yanan Wang <wangyanan55@...wei.com>, linux-kernel@...r.kernel.org,
qemu-arm@...gnu.org, qemu-devel@...gnu.org
Subject: Re: [PATCH v4 2/6] arm/virt: Wire up GPIO error source for ACPI /
GHES
On Wed, Jul 31, 2024 at 07:21:58AM +0200, Mauro Carvalho Chehab wrote:
[snip]
> > The name looks inconsistent with the style of other MachineClass virtual
> > methods. What about the name like "notify_xxx"? And pls add the comment
> > about this new method.
> >
> > BTW, I found this method is called in generic_error_device_notify() of
> > Patch 6. And the mc->generic_error_device_notify() - as the virtual
> > metchod of MachineClass looks just to implement a hook, and it doesn't
> > seem to have anything to do with MachineClass/MachineState, so my
> > question is why do we need to add this method to MachineClass?
> >
> > Could we maintain a notifier list in ghes.c and expose an interface
> > to allow arm code register a notifier? This eliminates the need to add
> > the “notify” method to MachineClass.
>
> Makes sense. I'll change the logic to use this notifier list code inside
> ghes.c, and drop generic_error_device_notify():
>
> NotifierList generic_error_notifiers =
> NOTIFIER_LIST_INITIALIZER(error_device_notifiers);
>
> /* Notify BIOS about an error via Generic Error Device - GED */
> static void generic_error_device_notify(void)
> {
> notifier_list_notify(&generic_error_notifiers, NULL);
> }
Fine for me.
Regards,
Zhao
Powered by blists - more mailing lists