ACPICA version 20140424 released
by Moore, Robert
24 April 2014. Summary of changes for version 20140424:
This release is available at https://acpica.org/downloads
1) ACPICA kernel-resident subsystem:
Implemented support to skip/ignore NULL address entries in the RSDT/XSDT. Some of these tables are known to contain a trailing NULL entry. Lv Zheng.
Removed an extraneous error message for the case where there are a large number of system GPEs (> 124). This was the "32-bit FADT register is too long to convert to GAS struct" message, which is irrelevant for GPEs since the GPEx_BLK_LEN fields of the FADT are always used instead of the (limited capacity) GAS bit length. Also, several changes to ensure proper support for GPE numbers > 255, where some "GPE number" fields were 8-bits internally.
Implemented and deployed additional configuration support for the public ACPICA external interfaces. Entire classes of interfaces can now be easily modified or configured out, replaced by stubbed inline functions by default. Lv Zheng.
Moved all public ACPICA runtime configuration globals to the public ACPICA external interface file for convenience. Also, removed some obsolete/unused globals. See the file acpixf.h. Lv Zheng.
Documentation: Added a new section to the ACPICA reference describing the maximum number of GPEs that can be supported by the FADT-defined GPEs in block zero and one. About 1200 total. See section 4.4.1 of the ACPICA reference.
Example Code and Data Size: These are the sizes for the OS-independent acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug version of the code includes the debug output trace mechanism and has a much larger code and data size.
Current Release:
Non-Debug Version: 96.8K Code, 27.2K Data, 124.0K Total
Debug Version: 189.5K Code, 79.7K Data, 269.2K Total
Previous Release:
Non-Debug Version: 97.0K Code, 27.2K Data, 124.2K Total
Debug Version: 189.7K Code, 79.5K Data, 269.2K Total
2) iASL Compiler/Disassembler and Tools:
iASL and disassembler: Add full support for the LPIT table (Low Power Idle Table). Includes support in the disassembler, data table compiler, and template generator.
AcpiDump utility:
1) Add option to force the use of the RSDT (over the XSDT).
2) Improve validation of the RSDP signature (use 8 chars instead of 4).
iASL: Add check for predefined packages that are too large. For predefined names that contain subpackages, check if each subpackage is too large. (Check for too small already exists.)
Debugger: Updated the GPE command (which simulates a GPE by executing the GPE code paths in ACPICA). The GPE device is now optional, and defaults to the GPE 0/1 FADT-defined blocks.
Unix application OSL: Update line-editing support. Add additional error checking and take care not to reset terminal attributes on exit if they were never set. This should help guarantee that the terminal is always left in the previous state on program exit.
6 years, 10 months
Re: [Devel] [PATCH] include: replace asm headers to linux
by Zheng, Lv
Hi,
> From: linux-acpi-owner(a)vger.kernel.org [mailto:linux-acpi-owner@vger.kernel.org] On Behalf Of Paul McQuade
> Sent: Friday, April 11, 2014 7:28 AM
>
> Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
> Use #include <linux/types.h> instead of <asm/types.h>
>
> Signed-off-by: Paul McQuade <paulmcquad(a)gmail.com>
> ---
> include/acpi/platform/aclinux.h | 2 +-
> include/asm-generic/bitops/__ffs.h | 2 +-
> include/asm-generic/bitops/__fls.h | 2 +-
> include/asm-generic/bitops/arch_hweight.h | 2 +-
> include/asm-generic/bitops/atomic.h | 6 +++---
> include/asm-generic/bitops/count_zeros.h | 2 +-
> include/asm-generic/bitops/fls64.h | 2 +-
> include/asm-generic/bitops/le.h | 2 +-
> include/asm-generic/bitops/non-atomic.h | 2 +-
> include/asm-generic/bitops/sched.h | 2 +-
> 10 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
> index 93c55ed..d52317f 100644
> --- a/include/acpi/platform/aclinux.h
> +++ b/include/acpi/platform/aclinux.h
> @@ -71,7 +71,7 @@
> #ifdef EXPORT_ACPI_INTERFACES
> #include <linux/export.h>
> #endif
> -#include <asm/acpi.h>
> +#include <linux/acpi.h>
>
> /* Host-dependent types and defines for in-kernel ACPICA */
>
This diff block is wrong.
The acpi/platform/aclinux.h is a "platform specific ACPICA environment header".
The linux/acpi.h is a "Top level header of Linux ACPI".
The asm/acpi.h is a combination of " architecture specific ACPICA environment header" and "architecture specific Linux ACPI header".
The relationship between Linux ACPI and ACPICA is:
Linux ACPI is using ACPICA.
So linux ACPI header should __INCLUDE__ ACPICA header, which means linux/acpi.h should include acpi/platform/aclinux.h.
You patch thus is wrong.
In fact, acpi/platform/aclinux.h is included by acpi/acpi.h and acpi/acpi.h is included by linux/acpi.h.
For asm/acpi.h, there are really things messed up in it.
I have a series to split its role so that wrong "architecture specific Linux ACPI header" can be sorted out from acpi/platform/aclinux.h.
Please refer to:
https://lkml.org/lkml/2014/4/8/57
The correct way to fix the issue you are trying to fix is this patch:
https://lkml.org/lkml/2014/4/8/60
So please drop this diff block and just wait for the above mentioned series to be merged.
Thanks and best regards
-Lv
> diff --git a/include/asm-generic/bitops/__ffs.h b/include/asm-generic/bitops/__ffs.h
> index 937d7c4..8236f91 100644
> --- a/include/asm-generic/bitops/__ffs.h
> +++ b/include/asm-generic/bitops/__ffs.h
> @@ -1,7 +1,7 @@
> #ifndef _ASM_GENERIC_BITOPS___FFS_H_
> #define _ASM_GENERIC_BITOPS___FFS_H_
>
> -#include <asm/types.h>
> +#include <linux/types.h>
>
> /**
> * __ffs - find first bit in word.
> diff --git a/include/asm-generic/bitops/__fls.h b/include/asm-generic/bitops/__fls.h
> index a60a7cc..60e5360 100644
> --- a/include/asm-generic/bitops/__fls.h
> +++ b/include/asm-generic/bitops/__fls.h
> @@ -1,7 +1,7 @@
> #ifndef _ASM_GENERIC_BITOPS___FLS_H_
> #define _ASM_GENERIC_BITOPS___FLS_H_
>
> -#include <asm/types.h>
> +#include <linux/types.h>
>
> /**
> * __fls - find last (most-significant) set bit in a long word
> diff --git a/include/asm-generic/bitops/arch_hweight.h b/include/asm-generic/bitops/arch_hweight.h
> index 6a211f4..a9a48a8 100644
> --- a/include/asm-generic/bitops/arch_hweight.h
> +++ b/include/asm-generic/bitops/arch_hweight.h
> @@ -1,7 +1,7 @@
> #ifndef _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_
> #define _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_
>
> -#include <asm/types.h>
> +#include <linux/types.h>
>
> static inline unsigned int __arch_hweight32(unsigned int w)
> {
> diff --git a/include/asm-generic/bitops/atomic.h b/include/asm-generic/bitops/atomic.h
> index 9ae6c34..4469696 100644
> --- a/include/asm-generic/bitops/atomic.h
> +++ b/include/asm-generic/bitops/atomic.h
> @@ -1,12 +1,12 @@
> #ifndef _ASM_GENERIC_BITOPS_ATOMIC_H_
> #define _ASM_GENERIC_BITOPS_ATOMIC_H_
>
> -#include <asm/types.h>
> +#include <linux/types.h>
> #include <linux/irqflags.h>
>
> #ifdef CONFIG_SMP
> -#include <asm/spinlock.h>
> -#include <asm/cache.h> /* we use L1_CACHE_BYTES */
> +#include <linux/spinlock.h>
> +#include <linux/cache.h> /* we use L1_CACHE_BYTES */
>
> /* Use an array of spinlocks for our atomic_ts.
> * Hash function to index into a different SPINLOCK.
> diff --git a/include/asm-generic/bitops/count_zeros.h b/include/asm-generic/bitops/count_zeros.h
> index 97520d2..7f8e1d0 100644
> --- a/include/asm-generic/bitops/count_zeros.h
> +++ b/include/asm-generic/bitops/count_zeros.h
> @@ -12,7 +12,7 @@
> #ifndef _ASM_GENERIC_BITOPS_COUNT_ZEROS_H_
> #define _ASM_GENERIC_BITOPS_COUNT_ZEROS_H_
>
> -#include <asm/bitops.h>
> +#include <linux/bitops.h>
>
> /**
> * count_leading_zeros - Count the number of zeros from the MSB back
> diff --git a/include/asm-generic/bitops/fls64.h b/include/asm-generic/bitops/fls64.h
> index b097cf8..3999f5c 100644
> --- a/include/asm-generic/bitops/fls64.h
> +++ b/include/asm-generic/bitops/fls64.h
> @@ -1,7 +1,7 @@
> #ifndef _ASM_GENERIC_BITOPS_FLS64_H_
> #define _ASM_GENERIC_BITOPS_FLS64_H_
>
> -#include <asm/types.h>
> +#include <linux/types.h>
>
> /**
> * fls64 - find last set bit in a 64-bit word
> diff --git a/include/asm-generic/bitops/le.h b/include/asm-generic/bitops/le.h
> index 6173154..8f4f574 100644
> --- a/include/asm-generic/bitops/le.h
> +++ b/include/asm-generic/bitops/le.h
> @@ -1,7 +1,7 @@
> #ifndef _ASM_GENERIC_BITOPS_LE_H_
> #define _ASM_GENERIC_BITOPS_LE_H_
>
> -#include <asm/types.h>
> +#include <linux/types.h>
> #include <asm/byteorder.h>
>
> #if defined(__LITTLE_ENDIAN)
> diff --git a/include/asm-generic/bitops/non-atomic.h b/include/asm-generic/bitops/non-atomic.h
> index 697cc2b..4b04267 100644
> --- a/include/asm-generic/bitops/non-atomic.h
> +++ b/include/asm-generic/bitops/non-atomic.h
> @@ -1,7 +1,7 @@
> #ifndef _ASM_GENERIC_BITOPS_NON_ATOMIC_H_
> #define _ASM_GENERIC_BITOPS_NON_ATOMIC_H_
>
> -#include <asm/types.h>
> +#include <linux/types.h>
>
> /**
> * __set_bit - Set a bit in memory
> diff --git a/include/asm-generic/bitops/sched.h b/include/asm-generic/bitops/sched.h
> index 604fab7..65ad856 100644
> --- a/include/asm-generic/bitops/sched.h
> +++ b/include/asm-generic/bitops/sched.h
> @@ -2,7 +2,7 @@
> #define _ASM_GENERIC_BITOPS_SCHED_H_
>
> #include <linux/compiler.h> /* unlikely() */
> -#include <asm/types.h>
> +#include <linux/types.h>
>
> /*
> * Every architecture must define this function. It's the fastest
> --
> 1.8.3.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo(a)vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
6 years, 10 months
Re: [Devel] Coverity CID 134632: acpi_hw_build_pci_list() memory leak
by Moore, Robert
> -----Original Message-----
> From: Bjorn Helgaas [mailto:bhelgaas@google.com]
> Sent: Thursday, April 03, 2014 10:28 AM
> To: Moore, Robert
> Cc: Zheng, Lv; Wysocki, Rafael J; Box, David E; linux-
> acpi(a)vger.kernel.org; devel(a)acpica.org
> Subject: Re: Coverity CID 134632: acpi_hw_build_pci_list() memory leak
>
> On Thu, Apr 3, 2014 at 11:03 AM, Moore, Robert <robert.moore(a)intel.com>
> wrote:
> > On second thought, did you notice that the caller always deletes the
> list, regardless of the return status?
>
> Hmm, no, I didn't notice that, and obviously Coverity didn't either.
> So I guess there's no actual bug, as long as every caller deletes the list
> regardless of status. And there's only one caller.
>
> I wouldn't hold it up as good style, but I guess it's safe :)
Yes, no real leak. But we will change it anyway on principle.
Thanks,
Bob
>
> > /* Build a list of PCI devices, from PciRegion up to RootPciDevice
> > */
> >
> > Status = AcpiHwBuildPciList (RootPciDevice, PciRegion, &ListHead);
> > if (ACPI_SUCCESS (Status))
> > {
> > /* Walk the list, updating the PCI device/function/bus numbers
> > */
> >
> > Status = AcpiHwProcessPciList (PciId, ListHead);
> > }
> >
> > /* Always delete the list */
> >
> > AcpiHwDeletePciList (ListHead);
> > return_ACPI_STATUS (Status);
> >
> >> -----Original Message-----
> >> From: Bjorn Helgaas [mailto:bhelgaas@google.com]
> >> Sent: Thursday, April 03, 2014 9:22 AM
> >> To: Moore, Robert; Zheng, Lv; Wysocki, Rafael J
> >> Cc: linux-acpi(a)vger.kernel.org; devel(a)acpica.org
> >> Subject: Coverity CID 134632: acpi_hw_build_pci_list() memory leak
> >>
> >> Coverity complains that acpi_hw_build_pci_list() leaks memory when it
> >> returns here:
> >>
> >> 201 if (!list_element) {
> >>
> >> CID 134632 (#1 of 2): Resource leak (RESOURCE_LEAK) 13. leaked_storage:
> >> Variable list_head going out of scope leaks the storage it points to.
> >> 202 return (AE_NO_MEMORY);
> >> 203 }
> >>
> >> We're building up a list, and if we fail to allocate another element,
> >> we return failure without deallocating the already built-up list.
> >>
> >> This is CID 134632.
> >>
> >> Bjorn
6 years, 11 months
Re: [Devel] Coverity CID 134632: acpi_hw_build_pci_list() memory leak
by Moore, Robert
Anyway, we'll change it to do things properly.
> -----Original Message-----
> From: Moore, Robert
> Sent: Thursday, April 03, 2014 10:04 AM
> To: 'Bjorn Helgaas'; Zheng, Lv; Wysocki, Rafael J; Box, David E
> Cc: linux-acpi(a)vger.kernel.org; devel(a)acpica.org
> Subject: RE: Coverity CID 134632: acpi_hw_build_pci_list() memory leak
>
> On second thought, did you notice that the caller always deletes the list,
> regardless of the return status?
>
> /* Build a list of PCI devices, from PciRegion up to RootPciDevice */
>
> Status = AcpiHwBuildPciList (RootPciDevice, PciRegion, &ListHead);
> if (ACPI_SUCCESS (Status))
> {
> /* Walk the list, updating the PCI device/function/bus numbers */
>
> Status = AcpiHwProcessPciList (PciId, ListHead);
> }
>
> /* Always delete the list */
>
> AcpiHwDeletePciList (ListHead);
> return_ACPI_STATUS (Status);
>
> > -----Original Message-----
> > From: Bjorn Helgaas [mailto:bhelgaas@google.com]
> > Sent: Thursday, April 03, 2014 9:22 AM
> > To: Moore, Robert; Zheng, Lv; Wysocki, Rafael J
> > Cc: linux-acpi(a)vger.kernel.org; devel(a)acpica.org
> > Subject: Coverity CID 134632: acpi_hw_build_pci_list() memory leak
> >
> > Coverity complains that acpi_hw_build_pci_list() leaks memory when it
> > returns here:
> >
> > 201 if (!list_element) {
> >
> > CID 134632 (#1 of 2): Resource leak (RESOURCE_LEAK) 13. leaked_storage:
> > Variable list_head going out of scope leaks the storage it points to.
> > 202 return (AE_NO_MEMORY);
> > 203 }
> >
> > We're building up a list, and if we fail to allocate another element,
> > we return failure without deallocating the already built-up list.
> >
> > This is CID 134632.
> >
> > Bjorn
6 years, 11 months
Re: [Devel] Coverity CID 134632: acpi_hw_build_pci_list() memory leak
by Moore, Robert
On second thought, did you notice that the caller always deletes the list, regardless of the return status?
/* Build a list of PCI devices, from PciRegion up to RootPciDevice */
Status = AcpiHwBuildPciList (RootPciDevice, PciRegion, &ListHead);
if (ACPI_SUCCESS (Status))
{
/* Walk the list, updating the PCI device/function/bus numbers */
Status = AcpiHwProcessPciList (PciId, ListHead);
}
/* Always delete the list */
AcpiHwDeletePciList (ListHead);
return_ACPI_STATUS (Status);
> -----Original Message-----
> From: Bjorn Helgaas [mailto:bhelgaas@google.com]
> Sent: Thursday, April 03, 2014 9:22 AM
> To: Moore, Robert; Zheng, Lv; Wysocki, Rafael J
> Cc: linux-acpi(a)vger.kernel.org; devel(a)acpica.org
> Subject: Coverity CID 134632: acpi_hw_build_pci_list() memory leak
>
> Coverity complains that acpi_hw_build_pci_list() leaks memory when it
> returns here:
>
> 201 if (!list_element) {
>
> CID 134632 (#1 of 2): Resource leak (RESOURCE_LEAK) 13. leaked_storage:
> Variable list_head going out of scope leaks the storage it points to.
> 202 return (AE_NO_MEMORY);
> 203 }
>
> We're building up a list, and if we fail to allocate another element, we
> return failure without deallocating the already built-up list.
>
> This is CID 134632.
>
> Bjorn
6 years, 11 months