30 May, 2011

1 commit

  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
    ACPI EC: remove redundant code
    ACPI: Add D3 cold state
    ACPI: processor: fix processor_physically_present in UP kernel
    ACPI: Split out custom_method functionality into an own driver
    ACPI: Cleanup custom_method debug stuff
    ACPI EC: enable MSI workaround for Quanta laptops
    ACPICA: Update to version 20110413
    ACPICA: Execute an orphan _REG method under the EC device
    ACPICA: Move ACPI_NUM_PREDEFINED_REGIONS to a more appropriate place
    ACPICA: Update internal address SpaceID for DataTable regions
    ACPICA: Add more methods eligible for NULL package element removal
    ACPICA: Split all internal Global Lock functions to new file - evglock
    ACPI: EC: add another DMI check for ASUS hardware
    ACPI EC: remove dead code
    ACPICA: Fix code divergence of global lock handling
    ACPICA: Use acpi_os_create_lock interface
    ACPI: osl, add acpi_os_create_lock interface
    ACPI:Fix goto flows in thermal-sys

    Linus Torvalds
     

29 May, 2011

1 commit

  • With /sys/kernel/debug/acpi/custom_method root can write
    to arbitrary memory and increase his priveleges, even if
    these are restricted.

    -> Make this an own debug .config option and warn about the
    security issue in the config description.

    -> Still keep acpi/debugfs.c which now only creates an empty
    /sys/kernel/debug/acpi directory. There might be other
    users of it later.

    Signed-off-by: Thomas Renninger
    Acked-by: Rafael J. Wysocki
    Acked-by: rui.zhang@intel.com
    Signed-off-by: Len Brown

    Thomas Renninger
     

26 May, 2011

1 commit

  • As discussed earlier, the ACPI power meter driver would better live
    in drivers/hwmon, as its only purpose is to create hwmon-style
    interfaces for ACPI 4.0 power meter devices. Users are more likely to
    look for it there, and less likely to accidentally hide it by
    unselecting its dependencies.

    Signed-off-by: Jean Delvare
    Acked-by: "Darrick J. Wong"
    Acked-by: Guenter Roeck
    Cc: Len Brown

    Jean Delvare
     

12 Jan, 2011

1 commit


07 Jan, 2011

1 commit


14 Dec, 2010

1 commit

  • ACPI 4.0 spec adds the ACPI IPMI opregion, which means that the ACPI AML
    code can also communicate with the BMC controller. This is to install
    the ACPI IPMI opregion and enable the ACPI to access the BMC controller
    through the IPMI message.

    It will create IPMI user interface for every IPMI device detected
    in ACPI namespace and install the corresponding IPMI opregion space handler.
    Then it can enable ACPI to access the BMC controller through the IPMI
    message.

    The following describes how to process the IPMI request in IPMI space handler:
    1. format the IPMI message based on the request in AML code.
    IPMI system address. Now the address type is SYSTEM_INTERFACE_ADDR_TYPE
    IPMI net function & command
    IPMI message payload
    2. send the IPMI message by using the function of ipmi_request_settime
    3. wait for the completion of IPMI message. It can be done in different
    routes: One is in handled in IPMI user recv callback function. Another is
    handled in timeout function.
    4. format the IPMI response and return it to ACPI AML code.

    At the same time it also addes the module dependency. The ACPI IPMI opregion
    will depend on the IPMI subsystem.

    Signed-off-by: Zhao Yakui
    cc: Bjorn Helgaas
    Signed-off-by: Corey Minyard
    Signed-off-by: Len Brown

    Zhao Yakui
     

15 Aug, 2010

4 commits

  • Conflicts:
    drivers/acpi/debug.c

    Signed-off-by: Len Brown

    Len Brown
     
  • Rmove deprecated ACPI procfs I/F, including
    /proc/acpi/debug_layer
    /proc/acpi/debug_level
    /proc/acpi/info
    /proc/acpi/dsdt
    /proc/acpi/fadt
    /proc/acpi/sleep

    because the sysfs I/F is already available
    and has been working well for years.

    Signed-off-by: Zhang Rui
    Signed-off-by: Len Brown

    Zhang Rui
     
  • Introduce drivers/acpi/sysfs.c.

    code for ACPI sysfs I/F, including
    #ifdef ACPI_DEBUG
    /sys/module/acpi/parameters/debug_layer
    /sys/module/acpi/parameters/debug_level
    /sys/module/acpi/parameters/trace_method_name
    /sys/module/acpi/parameters/trace_debug_layer
    /sys/module/acpi/parameters/trace_debug_level
    /sys/module/acpi/parameters/trace_state
    #endif
    /sys/module/acpi/parameters/acpica_version
    /sys/firmware/acpi/tables/
    /sys/firmware/acpi/interrupts/
    is moved to this file.

    No function change in this patch.

    Signed-off-by: Zhang Rui
    Signed-off-by: Len Brown

    Zhang Rui
     
  • Introduce drivers/acpi/debugfs.c.

    Code for ACPI debugfs I/F,
    i.e. /sys/kernel/debug/acpi/custom_method,
    is moved to this file.

    And make ACPI debugfs always built in,
    even if CONFIG_ACPI_DEBUG is cleared.

    BTW:this adds about 400bytes code to ACPI, when
    CONFIG_ACPI_DEBUG is cleared.

    [uaccess.h build fix from Andrew Morton ]

    Signed-off-by: Zhang Rui
    Signed-off-by: Len Brown

    Zhang Rui
     

03 Aug, 2010

1 commit

  • This patch provides the same information through debugfs, which previously was
    provided through /proc/acpi/embedded_controller/*/info

    This is the gpe the EC is connected to and whether the global lock
    gets used.
    The io ports used are added to /proc/ioports in another patch.
    Beside the fact that /proc/acpi is deprecated for quite some time,
    this info is not needed for applications and thus can be moved
    to debugfs instead of a public interface like /sys.

    Signed-off-by: Thomas Renninger

    CC: Alexey Starikovskiy
    CC: Len Brown
    CC: linux-kernel@vger.kernel.org
    CC: linux-acpi@vger.kernel.org
    CC: Bjorn Helgaas
    CC: platform-driver-x86@vger.kernel.org
    Signed-off-by: Matthew Garrett

    Thomas Renninger
     

20 May, 2010

3 commits

  • Hardware Error Device (PNP0C33) is used to report some hardware errors
    notified via SCI, mainly the corrected errors. Some APEI Generic
    Hardware Error Source (GHES) may use SCI on hardware error device to
    notify hardware error to kernel.

    After receiving notification from ACPI core, it is forwarded to all
    listeners via a notifier chain. The listener such as APEI GHES should
    check corresponding error source for new events when notified.

    Signed-off-by: Huang Ying
    Signed-off-by: Andi Kleen
    Signed-off-by: Len Brown

    Huang Ying
     
  • Now, a dedicated HEST tabling parsing code is used for PCIE AER
    firmware_first setup. It is rebased on general HEST tabling parsing
    code of APEI. The firmware_first setup code is moved from PCI core to
    AER driver too, because it is only AER related.

    Signed-off-by: Huang Ying
    Signed-off-by: Andi Kleen
    Reviewed-by: Hidetoshi Seto
    Acked-by: Jesse Barnes
    Signed-off-by: Len Brown

    Huang Ying
     
  • APEI stands for ACPI Platform Error Interface, which allows to report
    errors (for example from the chipset) to the operating system. This
    improves NMI handling especially. In addition it supports error
    serialization and error injection.

    For more information about APEI, please refer to ACPI Specification
    version 4.0, chapter 17.

    This patch provides some common functions used by more than one APEI
    tables, mainly framework of interpreter for EINJ and ERST.

    A machine readable language is defined for EINJ and ERST for OS to
    execute, and so to drive the firmware to fulfill the corresponding
    functions. The machine language for EINJ and ERST is compatible, so a
    common framework is defined for them.

    Signed-off-by: Huang Ying
    Signed-off-by: Andi Kleen
    Signed-off-by: Len Brown

    Huang Ying
     

19 May, 2010

1 commit

  • Some ACPI IO accessing need to be done in atomic context. For example,
    APEI ERST operations may be used for permanent storage in hardware
    error handler. That is, it may be called in atomic contexts such as
    IRQ or NMI, etc. And, ERST/EINJ implement their operations via IO
    memory/port accessing. But the IO memory accessing method provided by
    ACPI (acpi_read/acpi_write) maps the IO memory during it is accessed,
    so it can not be used in atomic context. To solve the issue, the IO
    memory should be pre-mapped during EINJ/ERST initializing. A linked
    list is used to record which memory area has been mapped, when memory
    is accessed in hardware error handler, search the linked list for the
    mapped virtual address from the given physical address.

    Signed-off-by: Huang Ying
    Signed-off-by: Andi Kleen
    Signed-off-by: Len Brown

    Huang Ying
     

15 Mar, 2010

2 commits

  • We've renamed the old processor_core.c to processor_driver.c, to
    convey the idea that it can be built modular and has driver-like
    bits.

    Now let's re-create a processor_core.c for the bits needed
    statically by the rest of the kernel. The contents of processor_pdc.c
    are a good starting spot, so let's just rename that file and
    complete our three card monte.

    Acked-by: Venkatesh Pallipadi
    Signed-off-by: Alex Chiang
    Signed-off-by: Len Brown

    Alex Chiang
     
  • The ACPI processor driver can be built as a module. But it has
    pieces of code that should always be built statically into the
    kernel.

    The plan is for processor_core.c to contain the static bits while
    processor_driver.c contains the module-like bits.

    Since the bulk of the code in the current processor_core.c is
    module-like, first step is to rename the file to processor_driver.c

    Next step will re-create processor_core.c and cherry-pick out
    the static bits.

    Acked-by: Venkatesh Pallipadi
    Signed-off-by: Alex Chiang
    Signed-off-by: Len Brown

    Alex Chiang
     

22 Dec, 2009

1 commit

  • We discovered that at least one machine (HP Envy), methods in the DSDT
    attempt to call external methods defined in a dynamically loaded SSDT.

    Unfortunately, the DSDT methods we are trying to call are part of the
    EC initialization, which happens very early, and the the dynamic SSDT
    is only loaded when a processor _PDC method runs much later.

    This results in namespace lookup errors for the (as of yet) undefined
    methods.

    Since Windows doesn't have any issues with this machine, we take it
    as a hint that they must be evaluating _PDC much earlier than we are.

    Thus, the proper thing for Linux to do should be to match the Windows
    implementation more closely.

    Provide a mechanism to call _PDC before we enable the EC. Doing so loads
    the dynamic tables, and allows the EC to be enabled correctly.

    The ACPI processor driver will still evaluate _PDC in its .add() method
    to cover the hotplug case.

    Resolves: http://bugzilla.kernel.org/show_bug.cgi?id=14824

    Cc: ming.m.lin@intel.com
    Signed-off-by: Alex Chiang
    Signed-off-by: Len Brown

    Alex Chiang
     

05 Nov, 2009

1 commit

  • Feedback from Hidetoshi Seto and Kenji Kaneshige incorporated. This
    correctly handles PCI-X bridges, PCIe root ports and endpoints, and
    prints debug messages when invalid/reserved types are found in the
    HEST. PCI devices not in domain/segment 0 are not represented in
    HEST, thus will be ignored.

    Today, the PCIe Advanced Error Reporting (AER) driver attaches itself
    to every PCIe root port for which BIOS reports it should, via ACPI
    _OSC.

    However, _OSC alone is insufficient for newer BIOSes. Part of ACPI
    4.0 is the new APEI (ACPI Platform Error Interfaces) which is a way
    for OS and BIOS to handshake over which errors for which components
    each will handle. One table in ACPI 4.0 is the Hardware Error Source
    Table (HEST), where BIOS can define that errors for certain PCIe
    devices (or all devices), should be handled by BIOS ("Firmware First
    mode"), rather than be handled by the OS.

    Dell PowerEdge 11G server BIOS defines Firmware First mode in HEST, so
    that it may manage such errors, log them to the System Event Log, and
    possibly take other actions. The aer driver should honor this, and
    not attach itself to devices noted as such.

    Furthermore, Kenji Kaneshige reminded us to disallow changing the AER
    registers when respecting Firmware First mode. Platform firmware is
    expected to manage these, and if changes to them are allowed, it could
    break that firmware's behavior.

    The HEST parsing code may be replaced in the future by a more
    feature-rich implementation. This patch provides the minimum needed
    to prevent breakage until that implementation is available.

    Reviewed-by: Kenji Kaneshige
    Reviewed-by: Hidetoshi Seto
    Signed-off-by: Matt Domsch
    Signed-off-by: Jesse Barnes

    Matt Domsch
     

05 Oct, 2009

1 commit


19 Sep, 2009

1 commit

  • This driver exposes ACPI 4.0 compliant power meters as hardware monitoring
    devices. This second revision of the driver also exports the ACPI string
    info as sysfs attributes, a list of the devices that the meter measures,
    and will send ACPI notifications over the ACPI netlink socket. This
    latest revision only enables the power capping controls if it can be
    confirmed that the power cap can be enforced by the hardware and explains
    how the notification interfaces work.

    [akpm@linux-foundation.org: remove default-y]
    [akpm@linux-foundation.org: build fix]
    Signed-off-by: Darrick J. Wong
    Cc: Zhang Rui
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Len Brown

    Darrick J. Wong
     

01 Aug, 2009

1 commit

  • ACPI 4.0 created the logical "processor aggregator device" as
    a mechinism for platforms to ask the OS to force otherwise busy
    processors to enter (power saving) idle.

    The intent is to lower power consumption to ride-out
    transient electrical and thermal emergencies,
    rather than powering off the server.

    On platforms that can save more power/performance via P-states,
    the platform will first exhaust P-states before forcing idle.
    However, the relative benefit of P-states vs. idle states
    is platform dependent, and thus this driver need not know
    or care about it.

    This driver does not use the kernel's CPU hot-plug mechanism
    because after the transient emergency is over, the system must
    be returned to its normal state, and hotplug would permanently
    break both cpusets and binding.

    So to force idle, the driver creates a power saving thread.
    The scheduler will migrate the thread to the preferred CPU.
    The thread has max priority and has SCHED_RR policy,
    so it can occupy one CPU. To save power, the thread will
    invoke the deep C-state entry instructions.

    To avoid starvation, the thread will sleep 5% of the time
    time for every second (current RT scheduler has threshold
    to avoid starvation, but if other CPUs are idle,
    the CPU can borrow CPU timer from other,
    which makes the mechanism not work here)

    Vaidyanathan Srinivasan has proposed scheduler enhancements
    to allow injecting idle time into the system. This driver doesn't
    depend on those enhancements, but could cut over to them
    when they are available.

    Peter Z. does not favor upstreaming this driver until
    the those scheduler enhancements are in place. However,
    we favor upstreaming this driver now because it is useful
    now, and can be enhanced over time.

    Signed-off-by: Shaohua Li
    NACKed-by: Peter Zijlstra
    Cc: Vaidyanathan Srinivasan
    Signed-off-by: Len Brown

    Shaohua Li
     

05 Apr, 2009

3 commits


03 Apr, 2009

2 commits


28 Mar, 2009

1 commit

  • This patch removes the suggestion that ec.o link order is important,
    because it doesn't matter since acpi_ec_init() is no longer an initcall.
    And it puts together most of the core modules that are not configurable.

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Len Brown

    Bjorn Helgaas
     

22 Feb, 2009

1 commit

  • Remove CONFIG_ACPI_SYSTEM. It was always set the same as CONFIG_ACPI,
    and it had no menu label, so there was no way to set it to anything
    other than "y".

    Some things under CONFIG_ACPI_SYSTEM (acpi_irq_handled, acpi_os_gpe_count(),
    event_is_open, register_acpi_notifier(), etc.) are used unconditionally
    by the CA, the OSPM, and drivers, so we depend on them always being
    present.

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Len Brown

    Bjorn Helgaas
     

17 Jan, 2009

1 commit


09 Jan, 2009

2 commits


19 Dec, 2008

1 commit


12 Nov, 2008

1 commit


08 Nov, 2008

1 commit

  • If an ACPI graphics device supports backlight brightness functions (cmp. with
    latest ACPI spec Appendix B), let the ACPI video driver control backlight and
    switch backlight control off in vendor specific ACPI drivers (asus_acpi,
    thinkpad_acpi, eeepc, fujitsu_laptop, msi_laptop, sony_laptop, acer-wmi).

    Currently it is possible to load above drivers and let both poke on the
    brightness HW registers, the video and vendor specific ACPI drivers -> bad.

    This patch provides the basic support to check for BIOS capabilities before
    driver loading time. Driver specific modifications are in separate follow up
    patches.

    "acpi_backlight=vendor"
    Prever vendor driver over ACPI driver for backlight.
    "acpi_backlight=video" (default)
    Prever ACPI driver over vendor driver for backlight.

    Signed-off-by: Thomas Renninger
    Acked-by: Zhang Rui
    Signed-off-by: Andi Kleen
    Signed-off-by: Len Brown

    Thomas Renninger
     

07 Nov, 2008

2 commits

  • Remove CONFIG_ACPI_EC. It was always set the same as CONFIG_ACPI,
    and it had no menu label, so there was no way to set it to anything
    other than "y".

    Per section 6.5.4 of the ACPI 3.0b specification,

    OSPM must make Embedded Controller operation regions, accessed
    via the Embedded Controllers described in ECDT, available before
    executing any control method.

    The ECDT table is optional, but if it is present, the above text
    means that the EC it describes is a required part of the ACPI
    subsystem, so CONFIG_ACPI_EC=n wouldn't make sense.

    Signed-off-by: Bjorn Helgaas
    Acked-by: Alexey Starikovskiy
    Signed-off-by: Len Brown

    Bjorn Helgaas
     
  • Remove CONFIG_ACPI_POWER. It was always set the same as CONFIG_ACPI,
    and it had no menu label, so there was no way to set it to anything
    other than "y".

    The interfaces under CONFIG_ACPI_POWER (acpi_device_sleep_wake(),
    acpi_power_transition(), etc) are called unconditionally from the
    ACPI core, so we already depend on it always being present.

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Len Brown

    Bjorn Helgaas
     

23 Oct, 2008

1 commit

  • There exists the following warning message will appear after the
    following commit is merged.
    >commit f2e969acd6d5981e6b1272810002558650d0736e
    >Author: Zhao Yakui
    >Date: Mon Aug 11 14:57:50 2008 +0800
    >ACPI: Add "acpi.power_nocheck=1" to disable power state check in
    power transition:

    >WARNING: at linux-2.6/fs/sysfs/dir.c:463 sysfs_add_one+0x33/0x39()
    >sysfs: duplicate filename 'acpi' can not be created
    >kobject_add_internal failed for acpi with -EEXIST, don't try to register
    things with the same name in the same directory

    In the above commit the "acpi.power_nocheck" module parameter is defined
    in drivers/acpi/power.c file. As several module parameters using the same ACPI
    prefix are defined in the different files(for example: power_nocheck is
    defined in drivers/acpi/power.c,debug_layer/debug_level are defined in
    drivers/acpi/debug.c) and there exists another module between them, the
    warning message will be printed when using the current generic param code.
    (In the function of param_sysfs_init).

    In fact when ACPI is selected, the drivers/acpi/power will also be compiled
    as built-in kernel.So this issue can be fixed by the following approach.
    workaround it by adjusting the module link order in drivers/acpi/Makefile.
    In such case the module parameter using the same prefix(ACPI) are put together
    in the param data section.

    Of course the better solution is to fix it in generic param code related
    with sysfs.

    Signed-off-by: Zhao Yakui
    Signed-off-by: Len Brown

    Zhao Yakui
     

24 Sep, 2008

1 commit


17 Jul, 2008

1 commit

  • * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (72 commits)
    Revert "x86/PCI: ACPI based PCI gap calculation"
    PCI: remove unnecessary volatile in PCIe hotplug struct controller
    x86/PCI: ACPI based PCI gap calculation
    PCI: include linux/pm_wakeup.h for device_set_wakeup_capable
    PCI PM: Fix pci_prepare_to_sleep
    x86/PCI: Fix PCI config space for domains > 0
    Fix acpi_pm_device_sleep_wake() by providing a stub for CONFIG_PM_SLEEP=n
    PCI: Simplify PCI device PM code
    PCI PM: Introduce pci_prepare_to_sleep and pci_back_from_sleep
    PCI ACPI: Rework PCI handling of wake-up
    ACPI: Introduce new device wakeup flag 'prepared'
    ACPI: Introduce acpi_device_sleep_wake function
    PCI: rework pci_set_power_state function to call platform first
    PCI: Introduce platform_pci_power_manageable function
    ACPI: Introduce acpi_bus_power_manageable function
    PCI: make pci_name use dev_name
    PCI: handle pci_name() being const
    PCI: add stub for pci_set_consistent_dma_mask()
    PCI: remove unused arch pcibios_update_resource() functions
    PCI: fix pci_setup_device()'s sprinting into a const buffer
    ...

    Fixed up conflicts in various files (arch/x86/kernel/setup_64.c,
    arch/x86/pci/irq.c, arch/x86/pci/pci.h, drivers/acpi/sleep/main.c,
    drivers/pci/pci.c, drivers/pci/pci.h, include/acpi/acpi_bus.h) from x86
    and ACPI updates manually.

    Linus Torvalds