[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190925105341.GD5933@smile.fi.intel.com>
Date: Wed, 25 Sep 2019 13:53:41 +0300
From: "Shevchenko, Andriy" <andriy.shevchenko@...el.com>
To: Nikolaus Voss <nv@...n.de>
Cc: "Moore, Robert" <robert.moore@...el.com>,
Ferry Toth <fntoth@...il.com>,
"Schmauss, Erik" <erik.schmauss@...el.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Len Brown <lenb@...nel.org>,
Jacek Anaszewski <jacek.anaszewski@...il.com>,
Pavel Machek <pavel@....cz>, Dan Murphy <dmurphy@...com>,
"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
"devel@...ica.org" <devel@...ica.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Jan Kiszka <jan.kiszka@...mens.com>
Subject: Re: [PATCH] ACPICA: make acpi_load_table() return table index
On Wed, Sep 25, 2019 at 12:18:11PM +0200, Nikolaus Voss wrote:
> On Tue, 24 Sep 2019, Moore, Robert wrote:
> > How about this:
> > Go back to using acpi_tb_install_and_load_table(), but then call acpi_ns_initialize_objects afterwards This is what acpi_load_table does.
> >
> >
> > ACPI_INFO (("Host-directed Dynamic ACPI Table Load:"));
> > Status = AcpiTbInstallAndLoadTable (ACPI_PTR_TO_PHYSADDR (Table),
> > ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, FALSE, &TableIndex);
> > if (ACPI_SUCCESS (Status))
> > {
> > /* Complete the initialization/resolution of new objects */
> >
> > AcpiNsInitializeObjects ();
> > }
>
> The idea was to have all drivers use the same interface for dynamically
> loading ACPI tables, i.e. efivar_ssdt_load() (which already used
> acpi_load_table()) and the acpi_configfs driver. The efivar driver doesn't
> provide a possibility to unload the table, so acpi_load_table() is okay for
> this purpose.
> According to Bob, acpi_tb_install_and_load_table() is not part
> of the external ACPICA API declared under include/acpi (though it is
> exported).
You are answering to Bob himself :-)
So, above is another proposal and we can create a common symmetric APIs in ACPI
glue layer for all users even if some of them don't care about unloading.
> The counterpart of acpi_load_table() - inline comment "Note1: Mainly
> intended to support hotplug addition of SSDTs" - seems to be
> acpi_unload_parent_table() - inline comment "Note: Mainly intended to
> support hotplug removal of SSDTs" - but it doesn't expect a table index but
> an acpi_handle as argument, and it is only used within ACPICA, so IMO the
> API can't be properly used in our case and should be improved even though
> unloading tables is deprecated.
>
> If changing the API is not an option, we can choose between Rafael's way
> (extending the API instead of changing it) or Bob's proposal (doing the same
> thing - hotplug-loading a SSDT - in different ways, in case of acpi_configfs
> using ACPICA internal API). I don't have a clear favorite, but I'm tending
> to Rafael's solution my favorite being the API change.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists