Re: svn commit: r311667 - in head/sys/contrib/dev/acpica: components/namespace components/tables include
On 01/09/2017 13:01, Jung-uk Kim wrote: On 01/09/2017 12:08, John Baldwin wrote: On Sunday, January 08, 2017 06:26:33 AM Conrad E. Meyer wrote: Author: cem Date: Sun Jan 8 06:26:33 2017 New Revision: 311667 URL: https://svnweb.freebsd.org/changeset/base/311667 Log: Add some additional ACPI methods for DRM Add AcpiGetDataFull and AcpiGetTableWithSize. Submitted by:Matt Macy Have these been submitted upstream? The Intel folks are generally quite responsive on freebsd-a...@freebsd.org and this codebase is actively maintained externally. Please submit upstream first. https://github.com/acpica/acpica Since nobody responded, I just googled about it. It seems these two functions, AcpiGetDataFull() (aka. acpi_get_data_full() in Linux) and AcpiGetTableWithSize() (aka. acpi_get_table_with_size() in Linux), were only added in linux-pm tree and we only need them for "Graphics" repository. - AcpiGetDataFull() This function is only called by acpi_get_device_data(), which is, in turn, only called by acpi_bus_get_device() with *NULL* callback. Therefore, I don't see any reason to pollute contrib code for this. - AcpiGetTableWithSize() This API is now deprecated by the upstream: http://marc.info/?l=linux-acpi=148169906815835 http://marc.info/?l=linux-acpi=148169907615836 http://marc.info/?l=linux-acpi=148169908115837 http://marc.info/?l=linux-acpi=148169908615838 http://marc.info/?l=linux-acpi=148169909215840 The code changes were committed to both ACPICA: https://github.com/acpica/acpica/commit/cac67909 and committed to linux-pm tree: https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit?id=6b11d1d677132816252004426ef220ccd3c92d2f This means it will be removed from future Linux kernel. Therefore, we should NOT implement the deprecated API. Please back out r311667 and r311843 and let me know if you need any help in resolving this matter. Jung-uk Kim ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r311667 - in head/sys/contrib/dev/acpica: components/namespace components/tables include
On 01/09/2017 12:08, John Baldwin wrote: On Sunday, January 08, 2017 06:26:33 AM Conrad E. Meyer wrote: Author: cem Date: Sun Jan 8 06:26:33 2017 New Revision: 311667 URL: https://svnweb.freebsd.org/changeset/base/311667 Log: Add some additional ACPI methods for DRM Add AcpiGetDataFull and AcpiGetTableWithSize. Submitted by: Matt Macy Have these been submitted upstream? The Intel folks are generally quite responsive on freebsd-a...@freebsd.org and this codebase is actively maintained externally. Please submit upstream first. https://github.com/acpica/acpica Jung-uk Kim ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r311667 - in head/sys/contrib/dev/acpica: components/namespace components/tables include
On Sunday, January 08, 2017 06:26:33 AM Conrad E. Meyer wrote: > Author: cem > Date: Sun Jan 8 06:26:33 2017 > New Revision: 311667 > URL: https://svnweb.freebsd.org/changeset/base/311667 > > Log: > Add some additional ACPI methods for DRM > > Add AcpiGetDataFull and AcpiGetTableWithSize. > > Submitted by: Matt Macy Have these been submitted upstream? The Intel folks are generally quite responsive on freebsd-a...@freebsd.org and this codebase is actively maintained externally. -- John Baldwin ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r311667 - in head/sys/contrib/dev/acpica: components/namespace components/tables include
> On Jan 8, 2017, at 18:24, Jan Beichwrote: > > "Conrad E. Meyer" writes: > >> +++ head/sys/contrib/dev/acpica/components/tables/tbxface.c Sun Jan 8 >> 06:26:33 2017(r311667) >> @@ -314,11 +314,12 @@ ACPI_EXPORT_SYMBOL (AcpiGetTableHeader) >> >> /*** >> * >> - * FUNCTION:AcpiGetTable >> + * FUNCTION:AcpiGetTableWithSize >> * >> * PARAMETERS: Signature - ACPI signature of needed table >> * Instance- Which instance (for SSDTs) >> * OutTable- Where the pointer to the table is >> returned >> + * TblSize - Size of the table >> * >> * RETURN: Status and pointer to the requested table >> * >> @@ -333,10 +334,11 @@ ACPI_EXPORT_SYMBOL (AcpiGetTableHeader) >> >> **/ >> >> ACPI_STATUS >> -AcpiGetTable ( >> +AcpiGetTableWithSize ( > > Can you adjust ACPI_EXPORT_SYMBOL() as well? It doesn't make sense to > export AcpiGetTable() twice but compiler won't complain if you do. Depends on the compiler and the version. IIRC clang won’t, but gcc will (depending on the version). Cheers, -Ngie signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r311667 - in head/sys/contrib/dev/acpica: components/namespace components/tables include
"Conrad E. Meyer"writes: > +++ head/sys/contrib/dev/acpica/components/tables/tbxface.c Sun Jan 8 > 06:26:33 2017(r311667) > @@ -314,11 +314,12 @@ ACPI_EXPORT_SYMBOL (AcpiGetTableHeader) > > > /*** > * > - * FUNCTION:AcpiGetTable > + * FUNCTION:AcpiGetTableWithSize > * > * PARAMETERS: Signature - ACPI signature of needed table > * Instance- Which instance (for SSDTs) > * OutTable- Where the pointer to the table is > returned > + * TblSize - Size of the table > * > * RETURN: Status and pointer to the requested table > * > @@ -333,10 +334,11 @@ ACPI_EXPORT_SYMBOL (AcpiGetTableHeader) > > **/ > > ACPI_STATUS > -AcpiGetTable ( > +AcpiGetTableWithSize ( Can you adjust ACPI_EXPORT_SYMBOL() as well? It doesn't make sense to export AcpiGetTable() twice but compiler won't complain if you do. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r311667 - in head/sys/contrib/dev/acpica: components/namespace components/tables include
Author: cem Date: Sun Jan 8 06:26:33 2017 New Revision: 311667 URL: https://svnweb.freebsd.org/changeset/base/311667 Log: Add some additional ACPI methods for DRM Add AcpiGetDataFull and AcpiGetTableWithSize. Submitted by: Matt Macy Modified: head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c head/sys/contrib/dev/acpica/components/tables/tbxface.c head/sys/contrib/dev/acpica/include/acpixf.h Modified: head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c == --- head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c Sun Jan 8 06:22:35 2017(r311666) +++ head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c Sun Jan 8 06:26:33 2017(r311667) @@ -1022,23 +1022,25 @@ ACPI_EXPORT_SYMBOL (AcpiDetachData) /*** * - * FUNCTION:AcpiGetData + * FUNCTION:AcpiGetDataFull * * PARAMETERS: ObjHandle - Namespace node - * Handler - Handler used in call to AttachData + * Handle - Handler used in call to attach_data * Data- Where the data is returned + * Callback- function to execute before returning * * RETURN: Status * - * DESCRIPTION: Retrieve data that was previously attached to a namespace node. + * DESCRIPTION: Retrieve data that was previously attached to a namespace node + * and execute a callback before returning. * **/ - ACPI_STATUS -AcpiGetData ( +AcpiGetDataFull ( ACPI_HANDLE ObjHandle, ACPI_OBJECT_HANDLER Handler, -void**Data) +void**Data, +void (*Callback)(void *)) { ACPI_NAMESPACE_NODE *Node; ACPI_STATUS Status; @@ -1069,10 +1071,34 @@ AcpiGetData ( } Status = AcpiNsGetAttachedData (Node, Handler, Data); - +if (ACPI_SUCCESS(Status) && Callback) { + Callback(*Data); +} UnlockAndExit: (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); return (Status); } +ACPI_EXPORT_SYMBOL (AcpiGetDataFull) +/*** + * + * FUNCTION:AcpiGetData + * + * PARAMETERS: ObjHandle - Namespace node + * Handler - Handler used in call to AttachData + * Data- Where the data is returned + * + * RETURN: Status + * + * DESCRIPTION: Retrieve data that was previously attached to a namespace node. + * + **/ +ACPI_STATUS +AcpiGetData ( +ACPI_HANDLE ObjHandle, +ACPI_OBJECT_HANDLER Handler, +void**Data) +{ + return (AcpiGetDataFull(ObjHandle, Handler, Data, NULL)); +} ACPI_EXPORT_SYMBOL (AcpiGetData) Modified: head/sys/contrib/dev/acpica/components/tables/tbxface.c == --- head/sys/contrib/dev/acpica/components/tables/tbxface.c Sun Jan 8 06:22:35 2017(r311666) +++ head/sys/contrib/dev/acpica/components/tables/tbxface.c Sun Jan 8 06:26:33 2017(r311667) @@ -314,11 +314,12 @@ ACPI_EXPORT_SYMBOL (AcpiGetTableHeader) /*** * - * FUNCTION:AcpiGetTable + * FUNCTION:AcpiGetTableWithSize * * PARAMETERS: Signature - ACPI signature of needed table * Instance- Which instance (for SSDTs) * OutTable- Where the pointer to the table is returned + * TblSize - Size of the table * * RETURN: Status and pointer to the requested table * @@ -333,10 +334,11 @@ ACPI_EXPORT_SYMBOL (AcpiGetTableHeader) **/ ACPI_STATUS -AcpiGetTable ( +AcpiGetTableWithSize ( char*Signature, UINT32 Instance, -ACPI_TABLE_HEADER **OutTable) +ACPI_TABLE_HEADER **OutTable, +ACPI_SIZE *TblSize) { UINT32 i; UINT32 j; @@ -434,12 +436,40 @@ AcpiPutTable ( (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); return_VOID; } - ACPI_EXPORT_SYMBOL (AcpiPutTable) /*** * + * FUNCTION:AcpiGetTable + * + * PARAMETERS: Signature - ACPI signature of needed table + * Instance- Which instance (for SSDTs) + * OutTable- Where the pointer to the table is returned + * + * RETURN: Status and