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