05 May, 2016

1 commit

  • ACPICA commit b2294cae776f5a66a7697414b21949d307e6856f

    This patch removes unwanted spaces for typedef. This solution doesn't cover
    function types.

    Note that the linuxize result of this commit is very giant and should have
    many conflicts against the current Linux upstream. Thus it is required to
    modify the linuxize result of this commit and the commits around it
    manually in order to have them merged to the Linux upstream. Since this is
    very costy, we should do this only once, and if we can't ensure to do this
    only once, we need to revert the Linux code to the wrong indentation result
    before merging the linuxize result of this commit. Lv Zheng.

    Link: https://github.com/acpica/acpica/commit/b2294cae
    Signed-off-by: Lv Zheng
    Signed-off-by: Bob Moore
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     

16 Jan, 2016

1 commit


01 Jan, 2016

1 commit


22 Oct, 2015

3 commits

  • This patch enables ACPICA debugger files using a configurable
    CONFIG_ACPI_DEBUGGER configuration item. Those debugger related code that
    was originally masked as ACPI_FUTURE_USAGE now gets unmasked.

    Necessary OSL stubs are also added in this patch:
    1. acpi_os_readable(): This should be arch specific in Linux, while this
    patch doesn't introduce real implementation and a complex mechanism to
    allow architecture specific acpi_os_readable() to be implemented to
    validate the address. It may be done by future commits.
    2. acpi_os_get_line(): This is used to obtain debugger command input. This
    patch only introduces a simple KDB concept example in it and the
    example should be co-working with the code implemented in
    acpi_os_printf(). Since this KDB example won't be compiled unless
    ENABLE_DEBUGGER is defined and it seems Linux has already stopped to
    use ENABLE_DEBUGGER, thus do not expect it can work properly.

    This patch also cleans up all other ACPI_FUTURE_USAGE surroundings
    accordingly.
    1. Since linkage error can be automatically detected, declaration in the
    headers needn't be surrounded by ACPI_FUTURE_USAGE.
    So only the following separate exported fuction bodies are masked by
    this macro (other exported fucntions may have already been masked at
    entire module level via drivers/acpi/acpica/Makefile):
    acpi_install_exception_handler()
    acpi_subsystem_status()
    acpi_get_system_info()
    acpi_get_statistics()
    acpi_install_initialization_handler()
    2. Since strip can automatically zap the no-user functions, functions that
    are not marked with ACPI_EXPORT_SYMBOL() needn't get surrounded by
    ACPI_FUTURE_USAGE.
    So the following function which is not used by Linux kernel now won't
    get surrounded by this macro:
    acpi_ps_get_name()

    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     
  • ACPICA commit 7e823714911480be47e310fb1b3590d289b9fd99

    Segmentation fault can be seen for executing the "terminate" command. This
    is because acpi_ut_subsystem_shutdown() is errnously called multiple times.

    This patch cleans up acpi_ut_subsystem_shutdown() logics to fix this
    issue. Lv Zheng.

    Link: https://github.com/acpica/acpica/commit/7e823714
    Signed-off-by: Lv Zheng
    Signed-off-by: Bob Moore
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     
  • ACPICA commit 0dd68e16274cd38224aa4781eddc57dc2cbaa108

    The quit/exit commands shouldn't invoke acpi_terminate_debugger() and
    acpi_terminate() right in the user command loop, because when the debugger
    exits, the kernel ACPI subsystem shouldn't be terminated (acpi_terminate())
    and the debugger should only be terminated by its users
    (acpi_terminate_debugger()) rather than being terminated itself. Leaving such
    invocations causes kernel panic when the debugger is shipped in the Linux
    kernel.

    This patch fixes this issue. Lv Zheng.

    Link: https://github.com/acpica/acpica/commit/0dd68e16
    Signed-off-by: Lv Zheng
    Signed-off-by: Bob Moore
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     

26 Aug, 2015

2 commits

  • ACPICA commit 7a3f22baab000b186779dac64ad71d9776b8f432

    It is likely that the debugger is enabled only when a userspace program
    explicitly tells a kernel to do so, so it shouldn't be initialized as
    early as current implementation.

    The only tool requiring ACPI_DEBUGGER is acpiexec, so acpiexec need to call
    the new APIs by itself. And BSD developers may also get notified to invoke
    the APIs for DDB enabling. Lv Zheng.

    This patch doesn't affect Linux kernel as debugger is currently not enabled
    in the Linux kernel.

    Link: https://github.com/acpica/acpica/commit/7a3f22ba
    Signed-off-by: Lv Zheng
    Signed-off-by: Bob Moore
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     
  • ACPICA commit 6d9c827b540837b6e54059e17756a06985e4a196

    ACPICA BZ 1176.

    Link: https://bugs.acpica.org/show_bug.cgi?id=1176
    Link: https://github.com/acpica/acpica/commit/6d9c827b
    Signed-off-by: Bob Moore
    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Bob Moore
     

02 Jul, 2015

1 commit

  • ACPICA commit 3b1026e0bdd3c32eb6d5d313f3ba0b1fee7597b4
    ACPICA commit 00f0dc83f5cfca53b27a3213ae0d7719b88c2d6b
    ACPICA commit 47d22a738d0e19fd241ffe4e3e9d4e198e4afc69

    Across all of ACPICA. Replace C library macros such as ACPI_STRLEN with the
    standard names such as strlen. The original purpose for these macros is
    long since obsolete.
    Also cast various invocations as necessary. Bob Moore, Jung-uk Kim, Lv Zheng.

    Link: https://github.com/acpica/acpica/commit/3b1026e0
    Link: https://github.com/acpica/acpica/commit/00f0dc83
    Link: https://github.com/acpica/acpica/commit/47d22a73
    Signed-off-by: Bob Moore
    Signed-off-by: Jung-uk Kim
    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Bob Moore
     

05 Feb, 2015

1 commit


28 Nov, 2014

1 commit

  • This macro is intended to simplify the constuction of _PLD buffers.
    NOTE: Prototype only, subject to change before this macro is
    added to the ACPI specification. David E. Box.

    Signed-off-by: David E. Box
    Signed-off-by: Bob Moore
    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Bob Moore
     

11 Feb, 2014

1 commit


31 Oct, 2013

4 commits

  • This patch adds __init to the ACPICA documented initializers:
    acpi_initialize_tables()
    acpi_initialize_subsystem()
    acpi_load_tables()
    acpi_enable_subsystem()
    acpi_initialize_objects()
    and to acpi_reallocate_root_table(), acpi_find_root_pointer() which
    are also meant to be called only during initialization.

    This patch adds __init to the ACPICA documented finalizer:
    acpi_terminate()
    as this finalizer is only called in __init function now.

    This change helps to reduce source code differences between
    ACPICA upstream and Linux.

    [rjw: Changelog]
    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     
  • This patch ports new counters and statistics interface, already
    implemented in ACPICA upstream, to Linux. That helps to reduce
    source code differences between Linux and ACPICA upstream.

    [rjw: Changelog]
    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     
  • This changes can reduce source code differences between Linux and ACPICA
    upstream to help improving the release automation.

    The side effect of applying this patch in Linux is:
    1. Some ACPICA initialization/termination APIs are no longer exported in
    Linux, these include:
    acpi_load_tables
    acpi_initialize_subsystem
    acpi_enable_subsystem
    acpi_initialize_objects
    acpi_terminate
    2. This patch does not affect the following APIs as they are currently not
    marked with ACPI_EXPORT_SYMBOL in Linux:
    acpi_reallocate_root_table
    acpi_initialize_tables
    Such functions should not be exported as they are internal to ACPI
    subsystem in Linux, and will only be invoked inside of ACPI subsystem's
    initialization routines marked with __init and termination routines marked
    with __exit. While on other OSPMs, such functions may still need to be
    exported.

    Thus this patch adds the configurability for ACPICA, so that it leaves
    OSPMs to determine if the __init/__exit marked functions should be exported
    or not. Lv Zheng.

    Signed-off-by: Lv Zheng
    Signed-off-by: Bob Moore
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     
  • For Linux, there are no functional changes/binary generation differences
    introduced by this patch.

    This change adds a new macro to all files that contain external ACPICA
    interfaces. It can be detected and used by the host (via the host-specific
    header) for any special processing required for such modules. Lv Zheng.

    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     

23 Jul, 2013

1 commit

  • Add new API to allow OSPM to disable/enable specific types of _OSI
    interface strings.

    ACPICA does not have the knowledge about whether an _OSI interface
    string is an OS vendor string or a feature group string and there
    isn't any API interface to allow OSPM to install a new interface
    string as a feature group string.
    This patch simply adds all feature group strings defined by ACPI
    specification into the acpi_default_supported_interfaces with
    ACPI_OSI_FEATURE flag set to fix this gap. This patch also adds
    codes to keep their default states as ACPI_OSI_INVALID before the
    initialization and after the termination.

    Signed-off-by: Lv Zheng
    Reviewed-by: Zhang Rui
    Signed-off-by: Bob Moore
    Acked-by: Len Brown
    Signed-off-by: Rafael J. Wysocki

    Conflicts:
    include/acpi/actypes.h (with commit 242b228)

    Lv Zheng
     

12 Apr, 2013

1 commit


25 Jan, 2013

1 commit


10 Jan, 2013

1 commit

  • This is a cosmetic patch only. Comparison of the resulting binary showed
    only line number differences.

    This patch does not affect the generation of the Linux binary.
    This patch decreases 389 lines of 20121018 divergence.diff.

    This patch reduces source code diff caused by the simple code maintenance
    work:
    1. Deletion of the unused include files.
    2. Deletion of the deprecated codes blocks.
    3. Repositioning of the code blocks.
    4. Replacing the values with the well defined macros.
    5. Replacing the types with the equivalent types.

    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     

15 Nov, 2012

2 commits


21 Sep, 2012

2 commits

  • _PLD (Physical Location of Device) returns a bit-packed buffer that
    is difficult to parse. This change adds a new interface,
    AcpiDecodePldBuffer that parses the buffer into a more usable
    local struct. Also adds macros to both get and set individual
    fields within the packed _PLD buffer. Adds a new include file,
    acbuffer.h - which will be expanded to add structs for other
    ACPI names that return buffers. ACPICA BZ 954.

    Emit (in comments) the decoded contents of a static _PLD buffer
    in order to improve comprehension of this bit-packed buffer.

    Add multi-endian support to the _PLD decode routine. Deploy the
    multi-endian macros to extract data from the _PLD buffer.

    Signed-off-by: Bob Moore
    Signed-off-by: Feng Tang
    Signed-off-by: Len Brown

    Bob Moore
     
  • Split utxface.c to improve modularity and reduce file size.

    Signed-off-by: Bob Moore
    Signed-off-by: Feng Tang
    Signed-off-by: Len Brown

    Bob Moore
     

17 Jul, 2012

1 commit


22 Mar, 2012

1 commit


17 Jan, 2012

2 commits


01 Nov, 2011

1 commit


19 Jan, 2011

1 commit


25 Oct, 2010

1 commit


01 Oct, 2010

1 commit

  • Adds install/remove interfaces so that the host can dynamically
    alter the global _OSI table. Also adds support for _OSI handlers.
    Additional support: new debugger command (osi), and test support in
    the acpiexec utility. Adds new file, utilities/utosi.c.
    ACPICA bugzilla 836.

    The Linux OSL _OSI code is also changed.
    acpi_osi_setup can't call acpi_install/remove_interface because ACPICA
    is not initialized yet at this early time.
    So we just save the osi string in acpi_osi_setup and will handle it
    later in a new function acpi_osi_setup_late.

    http://www.acpica.org/bugzilla/show_bug.cgi?id=836

    Signed-off-by: Lin Ming
    Signed-off-by: Bob Moore

    Lin Ming
     

25 Sep, 2010

1 commit

  • The current ACPI GPEs initialization code has a problem that it
    enables some GPEs pointed to by device _PRW methods, generally
    intended for signaling wakeup events (system or device wakeup).
    These GPEs are then almost immediately disabled by the ACPI namespace
    scanning code with the help of acpi_gpe_can_wake(), but it would be
    better not to enable them at all until really necessary.

    Modify the initialization of GPEs so that the ones that have
    associated _Lxx or _Exx methods and are not pointed to by any _PRW
    methods will be enabled after the namespace scan is complete.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Len Brown

    Rafael J. Wysocki
     

13 Jul, 2010

1 commit

  • Currently, during initialization ACPICA walks the entire ACPI
    namespace in search of any device objects with assciated _PRW
    methods. All of the _PRW methods found are executed in the process
    to extract the GPE information returned by them, so that the GPEs in
    question can be marked as "able to wakeup" (more precisely, the
    ACPI_GPE_CAN_WAKE flag is set for them). The only purpose of this
    exercise is to avoid enabling the CAN_WAKE GPEs automatically, even
    if there are _Lxx/_Exx methods associated with them. However, it is
    both costly and unnecessary, because the host OS has to execute the
    _PRW methods anyway to check which devices can wake up the system
    from sleep states. Moreover, it then uses full information
    returned by _PRW, including the GPE information, so it can take care
    of disabling the GPEs if necessary.

    Remove the code that walks the namespace and executes _PRW from
    ACPICA and modify comments to reflect that change. Make
    acpi_bus_set_run_wake_flags() disable GPEs for wakeup devices
    so that they don't cause spurious wakeup events to be signaled.
    This not only reduces the complexity of the ACPICA initialization
    code, but in some cases it should reduce the kernel boot time as
    well.

    Unfortunately, for this purpose we need a new ACPICA function,
    acpi_gpe_can_wake(), to be called by the host OS in order to disable
    the GPEs that can wake up the system and were previously enabled by
    acpi_ev_initialize_gpe_block() or acpi_ev_update_gpes() (such a GPE
    should be disabled only once, because the initialization code enables
    it only once, but it may be pointed to by _PRW for multiple devices
    and that's why the additional function is necessary).

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Len Brown

    Rafael J. Wysocki
     

23 Jan, 2010

1 commit


29 Aug, 2009

2 commits

  • Add limited support for executable AML code that exists outside
    of any control method. This type of code has been illegal since
    ACPI 2.0. The code must exist in an If/Else/While block. All AML
    tables are supported, including tables that are dynamically loaded.
    ACPICA BZ 762.

    http://acpica.org/bugzilla/show_bug.cgi?id=762

    Signed-off-by: Lin Ming
    Signed-off-by: Bob Moore
    Signed-off-by: Len Brown

    Lin Ming
     
  • Fixes a problem with the mechanism that prevents problems if the
    acpi_terminate interface is inadvertently called more than once
    before the ACPICA code is re-initialized. ACPICA BZ 795.

    http://acpica.org/bugzilla/show_bug.cgi?id=795

    Signed-off-by: Bob Moore
    Signed-off-by: Lin Ming
    Signed-off-by: Len Brown

    Bob Moore
     

09 Jan, 2009

2 commits