02 Apr, 2016

1 commit


26 Mar, 2016

1 commit

  • There are several reports of freeze on enabling HWP (Hardware PStates)
    feature on Skylake-based systems by the Intel P-states driver. The root
    cause is identified as the HWP interrupts causing BIOS code to freeze.

    HWP interrupts use the thermal LVT which can be handled by Linux
    natively, but on the affected Skylake-based systems SMM will respond
    to it by default. This is a problem for several reasons:
    - On the affected systems the SMM thermal LVT handler is broken (it
    will crash when invoked) and a BIOS update is necessary to fix it.
    - With thermal interrupt handled in SMM we lose all of the reporting
    features of the arch/x86/kernel/cpu/mcheck/therm_throt driver.
    - Some thermal drivers like x86-package-temp depend on the thermal
    threshold interrupts signaled via the thermal LVT.
    - The HWP interrupts are useful for debugging and tuning
    performance (if the kernel can handle them).
    The native handling of thermal interrupts needs to be enabled
    because of that.

    This requires some way to tell SMM that the OS can handle thermal
    interrupts. That can be done by using _OSC/_PDC in processor
    scope very early during ACPI initialization.

    The meaning of _OSC/_PDC bit 12 in processor scope is whether or
    not the OS supports native handling of interrupts for Collaborative
    Processor Performance Control (CPPC) notifications. Since on
    HWP-capable systems CPPC is a firmware interface to HWP, setting
    this bit effectively tells the firmware that the OS will handle
    thermal interrupts natively going forward.

    For details on _OSC/_PDC refer to:
    http://www.intel.com/content/www/us/en/standards/processor-vendor-specific-acpi-specification.html

    To implement the _OSC/_PDC handshake as described, introduce a new
    function, acpi_early_processor_osc(), that walks the ACPI
    namespace looking for ACPI processor objects and invokes _OSC for
    them with bit 12 in the capabilities buffer set and terminates the
    namespace walk on the first success.

    Also modify intel_thermal_interrupt() to clear HWP status bits in
    the HWP_STATUS MSR to acknowledge HWP interrupts (which prevents
    them from firing continuously).

    Signed-off-by: Srinivas Pandruvada
    [ rjw: Subject & changelog, function rename ]
    Signed-off-by: Rafael J. Wysocki

    Srinivas Pandruvada
     

14 Mar, 2016

1 commit

  • * acpi-scan:
    ACPI / scan: AMBA bus probing support
    ACPI: introduce a function to find the first physical device

    * acpi-osl:
    ACPI / OSL: Add support to install tables via initrd
    ACPI / OSL: Clean up initrd table override code

    * acpi-apei:
    ACPI / APEI: ERST: Fixed leaked resources in erst_init
    ACPI / APEI: Fix leaked resources

    Rafael J. Wysocki
     

10 Mar, 2016

1 commit

  • This patch adds support to install tables from initrd.

    If a table in the initrd wasn't used by the override mechanism,
    the table would be installed after initializing all RSDT/XSDT
    tables.

    Link: https://lkml.org/lkml/2014/2/28/368
    Reported-by: Thomas Renninger
    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     

17 Feb, 2016

2 commits


05 Jan, 2016

1 commit


09 Dec, 2015

1 commit

  • There's an idiom in use by 7 Linux drivers to detect the presence of a
    particular ACPI HID by walking the namespace with acpi_get_devices().
    The callback passed to acpi_get_devices() is mostly identical across
    the drivers, leading to lots of duplicate code.

    Add acpi_dev_present(), the ACPI equivalent to pci_dev_present(),
    allowing us to deduplicate all that boilerplate in the drivers.

    Signed-off-by: Lukas Wunner
    Reviewed-by: Hanjun Guo
    Signed-off-by: Rafael J. Wysocki

    Lukas Wunner
     

05 Nov, 2015

1 commit

  • Pull driver core updates from Greg KH:
    "Here's the "big" driver core updates for 4.4-rc1. Primarily a bunch
    of debugfs updates, with a smattering of minor driver core fixes and
    updates as well.

    All have been in linux-next for a long time"

    * tag 'driver-core-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    debugfs: Add debugfs_create_ulong()
    of: to support binding numa node to specified device in devicetree
    debugfs: Add read-only/write-only bool file ops
    debugfs: Add read-only/write-only size_t file ops
    debugfs: Add read-only/write-only x64 file ops
    debugfs: Consolidate file mode checks in debugfs_create_*()
    Revert "mm: Check if section present during memory block (un)registering"
    driver-core: platform: Provide helpers for multi-driver modules
    mm: Check if section present during memory block (un)registering
    devres: fix a for loop bounds check
    CMA: fix CONFIG_CMA_SIZE_MBYTES overflow in 64bit
    base/platform: assert that dev_pm_domain callbacks are called unconditionally
    sysfs: correctly handle short reads on PREALLOC attrs.
    base: soc: siplify ida usage
    kobject: move EXPORT_SYMBOL() macros next to corresponding definitions
    kobject: explain what kobject's sd field is
    debugfs: document that debugfs_remove*() accepts NULL and error values
    debugfs: Pass bool pointer to debugfs_create_bool()
    ACPI / EC: Fix broken 64bit big-endian users of 'global_lock'

    Linus Torvalds
     

04 Oct, 2015

2 commits

  • Its a bit odd that debugfs_create_bool() takes 'u32 *' as an argument,
    when all it needs is a boolean pointer.

    It would be better to update this API to make it accept 'bool *'
    instead, as that will make it more consistent and often more convenient.
    Over that bool takes just a byte.

    That required updates to all user sites as well, in the same commit
    updating the API. regmap core was also using
    debugfs_{read|write}_file_bool(), directly and variable types were
    updated for that to be bool as well.

    Signed-off-by: Viresh Kumar
    Acked-by: Mark Brown
    Acked-by: Charles Keepax
    Signed-off-by: Greg Kroah-Hartman

    Viresh Kumar
     
  • global_lock is defined as an unsigned long and accessing only its lower
    32 bits from sysfs is incorrect, as we need to consider other 32 bits
    for big endian 64-bit systems. There are no such platforms yet, but the
    code needs to be robust for such a case.

    Fix that by changing type of 'global_lock' to u32.

    Signed-off-by: Viresh Kumar
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Viresh Kumar
     

15 Sep, 2015

2 commits


01 Sep, 2015

2 commits

  • * acpi-pm:
    ACPI / bus: Move duplicate code to a separate new function
    mfd: Add support for Intel Sunrisepoint LPSS devices
    dmaengine: add a driver for Intel integrated DMA 64-bit
    mfd: make mfd_remove_devices() iterate in reverse order
    driver core: implement device_for_each_child_reverse()
    klist: implement klist_prev()
    Driver core: wakeup the parent device before trying probe
    ACPI / PM: Attach ACPI power domain only once
    PM / QoS: Make it possible to expose device latency tolerance to userspace
    ACPI / PM: Update the copyright notice and description of power.c

    Rafael J. Wysocki
     
  • * acpi-scan:
    ACPI / bus: Move ACPI bus type registration
    ACPI / scan: Move bus operations and notification routines to bus.c
    ACPI / scan: Move device matching code to bus.c
    ACPI / scan: Move sysfs-related device code to a separate file

    * acpi-processor:
    PCC: Disable compilation by default
    ACPI: Decouple ACPI idle and ACPI processor drivers
    ACPI: Split out ACPI PSS from ACPI Processor driver
    PCC: Initialize PCC Mailbox earlier at boot
    ACPI / processor: remove leftover __refdata annotations

    * acpi-assorted:
    ACPI: fix acpi_debugfs_init prototype
    ACPI: Remove FSF mailing addresses

    Rafael J. Wysocki
     

07 Aug, 2015

1 commit

  • acpi_debugfs_init function is declared with return type int in
    drivers/acpi/internal.h when CONFIG_DEBUG_FS is enabled, but its
    definition in drivers/acpi/debugfs.c has return type void. This is due
    to commit aecad432fd68 ("ACPI: Cleanup custom_method debug stuff"),
    which changed the return type from int to void without updating the
    declaration.

    Fix this inconsistency by updating acpi_debugfs_init prototype. While
    at it, include internal.h in debugfs.c so that the compiler can check
    that the declaration and definition remain compatible.

    Signed-off-by: Nicolas Iooss
    Signed-off-by: Rafael J. Wysocki

    Nicolas Iooss
     

30 Jul, 2015

1 commit


28 Jul, 2015

1 commit

  • Some devices, like MFD subdevices, share a single ACPI companion device so
    that they are able to access their resources and children. However,
    currently all these subdevices are attached to the ACPI power domain and
    this might cause that the power methods for the companion device get called
    more than once.

    In order to solve this we attach the ACPI power domain only to the first
    physical device that is bound to the ACPI companion device. In case of MFD
    devices, this is the parent MFD device itself.

    Acked-by: Rafael J. Wysocki
    Signed-off-by: Mika Westerberg
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Lee Jones

    Mika Westerberg
     

18 Jul, 2015

1 commit


08 Jul, 2015

1 commit


03 Jul, 2015

2 commits

  • Pull ACPICA updates from Rafael Wysocki:
    "Additional ACPICA material for v4.2-rc1

    This will update the ACPICA code in the kernel to upstream revision
    20150619 (a bug-fix release mostly including stable-candidate fixes)
    and restore an earlier ACPICA commit that had to be reverted due to a
    regression introduced by it (the regression is addressed by
    blacklisting the only known system affected by it to date).

    The only new feature added by this update is the support for
    overriding objects in the ACPI namespace and a new ACPI table that can
    be used for that called the Override System Definition Table (OSDT).
    That should allow us to "patch" the ACPI namespace built from
    incomplete or incorrect ACPI System Definition tables (DSDT, SSDT)
    during system startup without the need to provide replacements for all
    of those tables in the future.

    Specifics:

    - Fix system resume problems related to 32-bit and 64-bit versions of
    the Firmware ACPI Control Structure (FACS) in the firmare (Lv
    Zheng)

    - Fix double initialization of the FACS (Lv Zheng)

    - Add _CLS object processing code to ACPICA (Suravee Suthikulpanit)

    - Add support for the (currently missing) new GIC version field in
    the Multiple APIC Description Table (MADT) (Hanjun Guo)

    - Add support for overriding objects in the ACPI namespace to ACPICA
    and OSDT support (Lv Zheng, Bob Moore, Zhang Rui)

    - Updates related to the TCPA and TPM2 ACPI tables (Bob Moore)

    - Restore the commit modifying _REV to always return "2" (as required
    by ACPI 6) and add a blacklisting mechanism for systems that may be
    affected by that change (Rafael J Wysocki)

    - Assorted fixes and cleanups (Bob Moore, Lv Zheng, Sascha Wildner)"

    * tag 'acpica-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (28 commits)
    Revert 'Revert "ACPICA: Permanently set _REV to the value '2'."'
    ACPI / init: Make it possible to override _REV
    ACPICA: Update version to 20150619
    ACPICA: Comment update, no functional change
    ACPICA: Update TPM2 ACPI table
    ACPICA: Update definitions for the TCPA and TPM2 ACPI tables
    ACPICA: Split C library prototypes to new header
    ACPICA: De-macroize calls to standard C library functions
    ACPI / acpidump: Update acpidump manual
    ACPICA: acpidump: Convert the default behavior to dump from /sys/firmware/acpi/tables
    ACPICA: acpidump: Allow customized tables to be dumped without accessing /dev/mem
    ACPICA: Cleanup output for the ASL Debug object
    ACPICA: Update for acpi_install_table memory types
    ACPICA: Namespace: Change namespace override to avoid node deletion
    ACPICA: Namespace: Add support of OSDT table
    ACPICA: Namespace: Add support to allow overriding objects
    ACPICA: ACPI 6.0: Add values for MADT GIC version field
    ACPICA: Utilities: Add _CLS processing
    ACPICA: Add dragon_fly support to unix file mapping file
    ACPICA: EFI: Add EFI interface definitions to eliminate dependency of GNU EFI
    ...

    Linus Torvalds
     
  • The platform firmware on some systems expects Linux to return "5" as
    the supported ACPI revision which makes it expose system configuration
    information in a special way.

    For example, based on what ACPI exports as the supported revision,
    Dell XPS 13 (2015) configures its audio device to either work in HDA
    mode or in I2S mode, where the former is supposed to be used on Linux
    until the latter is fully supported (in the kernel as well as in user
    space).

    Since ACPI 6 mandates that _REV should return "2" if ACPI 2 or later
    is supported by the OS, a subsequent change will make that happen, so
    make it possible to override that on systems where "5" is expected to
    be returned for Linux to work correctly one them (such as the Dell
    machine mentioned above).

    Original-by: Dominik Brodowski
    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

19 Jun, 2015

3 commits

  • * acpi-video: (38 commits)
    ACPI / video: Make acpi_video_unregister_backlight() private
    acpi-video-detect: Remove old API
    toshiba-acpi: Port to new backlight interface selection API
    thinkpad-acpi: Port to new backlight interface selection API
    sony-laptop: Port to new backlight interface selection API
    samsung-laptop: Port to new backlight interface selection API
    msi-wmi: Port to new backlight interface selection API
    msi-laptop: Port to new backlight interface selection API
    intel-oaktrail: Port to new backlight interface selection API
    ideapad-laptop: Port to new backlight interface selection API
    fujitsu-laptop: Port to new backlight interface selection API
    eeepc-laptop: Port to new backlight interface selection API
    dell-wmi: Port to new backlight interface selection API
    dell-laptop: Port to new backlight interface selection API
    compal-laptop: Port to new backlight interface selection API
    asus-wmi: Port to new backlight interface selection API
    asus-laptop: Port to new backlight interface selection API
    apple-gmux: Port to new backlight interface selection API
    acer-wmi: Port to new backlight interface selection API
    ACPI / video: Fix acpi_video _register vs _unregister_backlight race
    ...

    Rafael J. Wysocki
     
  • * acpi-ec:
    ACPI / EC: Fix a code coverity issue when QR_EC transactions are failed.
    ACPI / EC: Fix EC_FLAGS_QUERY_HANDSHAKE platforms using new event clearing timing.
    ACPI / EC: Add event clearing variation support.
    ACPI / EC: Convert event handling work queue into loop style.
    ACPI / EC: Cleanup transaction state transition.
    ACPI / EC: Remove non-root-caused busy polling quirks.
    ACPI / EC: Add module params for polling modes.
    ACPI / EC: Fix and clean up register access guarding logics.
    ACPI / EC: Remove irqs_disabled() check.
    ACPI / EC: Remove storming threashold enlarging quirk.
    ACPI / EC: Update acpi_ec_is_gpe_raised() with new GPE status flag.

    Rafael J. Wysocki
     
  • acpi_osi_is_win8 needs access to acpi_gbl_osi_data which is not exported,
    so move it to osl.c. Alternatively we could export acpi_gbl_osi_data but
    that seems undesirable.

    This allows video_detect.c to be build as a module, besides that
    acpi_osi_is_win8() is something which does not really belong in
    video_detect.c in the first place.

    Signed-off-by: Hans de Goede
    Acked-by: Darren Hart
    Signed-off-by: Rafael J. Wysocki

    Hans de Goede
     

15 Jun, 2015

1 commit

  • During the period that a work queue is scheduled (queued up for run) but
    hasn't been run, second schedule_work() could fail. This may not lead to
    the loss of queries because QR_EC is always ensured to be submitted after
    the work queue has been in the running state.

    The event handling work queue can be changed into the loop style to allow
    us to control the code in a more flexible way:
    1. Makes it possible to add event=0x00 termination condition in the loop.
    2. Increases the thoughput of the QR_EC transactions as the 2nd+ QR_EC
    transactions may be handled in the same work item used for the 1st QR_EC
    transaction, thus the delay caused by the 2nd+ work item scheduling can
    be eliminated.

    Except the logging message changes and the throughput improvement, this
    patch is just a funcitonal no-op.

    Signed-off-by: Lv Zheng
    Tested-by: Gabriele Mazzotta
    Tested-by: Tigran Gabrielyan
    Tested-by: Adrien D
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     

23 May, 2015

1 commit


16 May, 2015

1 commit

  • In the polling mode, EC driver shouldn't access the EC registers too
    frequently. Though this statement is concluded from the non-root caused
    bugs (see links below), we've maintained the register access guarding
    logics in the current EC driver. The guarding logics can be found here and
    there, makes it hard to root cause real timing issues. This patch collects
    the guarding logics into one single function so that all hidden logics
    related to this can be seen clearly.

    The current guarding related code also has several issues:
    1. Per-transaction timestamp prevents inter-transaction guarding from being
    implemented in the same place. We have an inter-transaction udelay() in
    acpi_ec_transaction_unblocked(), this logic can be merged into ec_poll()
    if we can use per-device timestamp. This patch completes such merge to
    form a new ec_guard() function and collects all guarding related hidden
    logics in it.
    One hidden logic is: there is no inter-transaction guarding performed
    for non MSI quirk (wait polling mode), this patch skips
    inter-transaction guarding before wait_event_timeout() for the wait
    polling mode to reveal the hidden logic.
    The other hidden logic is: there is msleep() inter-transaction guarding
    performed when the GPE storming is observed. As after merging this
    commit:
    Commit: e1d4d90fc0313d3d58cbd7912c90f8ef24df45ff
    Subject: ACPI / EC: Refine command storm prevention support
    EC_FLAGS_COMMAND_STORM is ensured to be cleared after invoking
    acpi_ec_transaction_unlocked(), the msleep() guard logic will never
    happen now. Since no one complains such change, this logic is likely
    added during the old times where the EC race issues are not fixed and
    the bugs are false root-caused to the timing issue. This patch simply
    removes the out-dated logic. We can restore it by stop skipping
    inter-transaction guarding for wait polling mode.
    Two different delay values are defined for msleep() and udelay() while
    they are merged in this patch to 550us.
    2. time_after() causes additional delay in the polling mode (can only be
    observed in noirq suspend/resume processes where polling mode is always
    used) before advance_transaction() is invoked ("wait polling" log is
    added before wait_event_timeout()). We can see 2 wait_event_timeout()
    invocations. This is because time_after() ensures a ">" validation while
    we only need a ">=" validation here:
    [ 86.739909] ACPI: Waking up from system sleep state S3
    [ 86.742857] ACPI : EC: 2: Increase command
    [ 86.742859] ACPI : EC: ***** Command(RD_EC) started *****
    [ 86.742861] ACPI : EC: ===== TASK (0) =====
    [ 86.742871] ACPI : EC: EC_SC(R) = 0x20 SCI_EVT=1 BURST=0 CMD=0 IBF=0 OBF=0
    [ 86.742873] ACPI : EC: EC_SC(W) = 0x80
    [ 86.742876] ACPI : EC: ***** Event started *****
    [ 86.742880] ACPI : EC: ~~~~~ wait polling ~~~~~
    [ 86.743972] ACPI : EC: ~~~~~ wait polling ~~~~~
    [ 86.747966] ACPI : EC: ===== TASK (0) =====
    [ 86.747977] ACPI : EC: EC_SC(R) = 0x20 SCI_EVT=1 BURST=0 CMD=0 IBF=0 OBF=0
    [ 86.747978] ACPI : EC: EC_DATA(W) = 0x06
    [ 86.747981] ACPI : EC: ~~~~~ wait polling ~~~~~
    [ 86.751971] ACPI : EC: ~~~~~ wait polling ~~~~~
    [ 86.755969] ACPI : EC: ===== TASK (0) =====
    [ 86.755991] ACPI : EC: EC_SC(R) = 0x21 SCI_EVT=1 BURST=0 CMD=0 IBF=0 OBF=1
    [ 86.755993] ACPI : EC: EC_DATA(R) = 0x03
    [ 86.755994] ACPI : EC: ~~~~~ wait polling ~~~~~
    [ 86.755995] ACPI : EC: ***** Command(RD_EC) stopped *****
    [ 86.755996] ACPI : EC: 1: Decrease command
    This patch corrects this by using time_before() instead in ec_guard():
    [ 54.283146] ACPI: Waking up from system sleep state S3
    [ 54.285414] ACPI : EC: 2: Increase command
    [ 54.285415] ACPI : EC: ***** Command(RD_EC) started *****
    [ 54.285416] ACPI : EC: ~~~~~ wait polling ~~~~~
    [ 54.285417] ACPI : EC: ===== TASK (0) =====
    [ 54.285424] ACPI : EC: EC_SC(R) = 0x20 SCI_EVT=1 BURST=0 CMD=0 IBF=0 OBF=0
    [ 54.285425] ACPI : EC: EC_SC(W) = 0x80
    [ 54.285427] ACPI : EC: ***** Event started *****
    [ 54.285429] ACPI : EC: ~~~~~ wait polling ~~~~~
    [ 54.287209] ACPI : EC: ===== TASK (0) =====
    [ 54.287218] ACPI : EC: EC_SC(R) = 0x20 SCI_EVT=1 BURST=0 CMD=0 IBF=0 OBF=0
    [ 54.287219] ACPI : EC: EC_DATA(W) = 0x06
    [ 54.287222] ACPI : EC: ~~~~~ wait polling ~~~~~
    [ 54.291190] ACPI : EC: ===== TASK (0) =====
    [ 54.291210] ACPI : EC: EC_SC(R) = 0x21 SCI_EVT=1 BURST=0 CMD=0 IBF=0 OBF=1
    [ 54.291213] ACPI : EC: EC_DATA(R) = 0x03
    [ 54.291214] ACPI : EC: ~~~~~ wait polling ~~~~~
    [ 54.291215] ACPI : EC: ***** Command(RD_EC) stopped *****
    [ 54.291216] ACPI : EC: 1: Decrease command

    After cleaning up all guarding logics, we have one single function
    ec_guard() collecting all old, non-root-caused, hidden logics. Then we can
    easily tune the logics in one place to respond to the bug reports.

    Except the time_before() change, all other changes do not change the
    behavior of the EC driver.

    Link: https://bugzilla.kernel.org/show_bug.cgi?id=12011
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=20242
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=77431
    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     

25 Mar, 2015

1 commit

  • ACPI 5.1 does not currently support S states for ARM64 hardware but
    ACPI code will call acpi_target_system_state() and acpi_sleep_init()
    for device power management, so introduce
    CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT and select it for x86 and
    ia64 only to make sleep functions available, and also introduce stub
    function to allow other drivers to function until S states are defined
    for ARM64.

    It will be no functional change for x86 and IA64.

    Suggested-by: Rafael J. Wysocki
    Acked-by: Lorenzo Pieralisi
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Graeme Gregory
    Signed-off-by: Tomasz Nowicki
    Signed-off-by: Hanjun Guo
    Signed-off-by: Will Deacon

    Graeme Gregory
     

10 Feb, 2015

2 commits

  • * acpi-resources: (23 commits)
    Merge branch 'pci/host-generic' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci into acpi-resources
    x86/irq, ACPI: Implement ACPI driver to support IOAPIC hotplug
    ACPI: Add interfaces to parse IOAPIC ID for IOAPIC hotplug
    x86/PCI: Refine the way to release PCI IRQ resources
    x86/PCI/ACPI: Use common ACPI resource interfaces to simplify implementation
    x86/PCI: Fix the range check for IO resources
    PCI: Use common resource list management code instead of private implementation
    resources: Move struct resource_list_entry from ACPI into resource core
    ACPI: Introduce helper function acpi_dev_filter_resource_type()
    ACPI: Add field offset to struct resource_list_entry
    ACPI: Translate resource into master side address for bridge window resources
    ACPI: Return translation offset when parsing ACPI address space resources
    ACPI: Enforce stricter checks for address space descriptors
    ACPI: Set flag IORESOURCE_UNSET for unassigned resources
    ACPI: Normalize return value of resource parser functions
    ACPI: Fix a bug in parsing ACPI Memory24 resource
    ACPI: Add prefetch decoding to the address space parser
    ACPI: Move the window flag logic to the combined parser
    ACPI: Unify the parsing of address_space and ext_address_space
    ACPI: Let the parser return false for disabled resources
    ...

    Rafael J. Wysocki
     
  • * acpi-video:
    ACPI / video: Add disable_native_backlight quirk for Samsung 510R
    ACPI / video: Add disable_native_backlight quirk for Samsung 730U3E/740U3E

    * acpi-soc:
    ACPI: add AMD ACPI2Platform device support for x86 system
    ACPI / LPSS: Remove non-existing clock control from Intel Lynxpoint I2C
    ACPI / LPSS: check the result of ioremap()

    Rafael J. Wysocki
     

06 Feb, 2015

2 commits

  • This patch implements the EC command flushing support.

    During the grace period indicated by EC_FLAGS_STARTED and EC_FLAGS_STOPPED,
    all submitted EC command transactions can be completed and new submissions
    are prevented before suspending so that the EC hardware can be ensured to
    be in the idle state when the system is resumed.

    There is a good indicator for flush support:
    All acpi_ec_submit_request() is invoked after checking driver state with
    acpi_ec_started() except the first one. This means all code paths can be
    flushed as fast as possible by discarding the requests occurred after the
    flush operation. The reference increased for such kind of code path is
    wrapped by acpi_ec_submit_flushable_request().

    Signed-off-by: Lv Zheng
    Tested-by: Ortwin Glück
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     
  • This new feature is to interpret AMD specific ACPI device to
    platform device such as I2C, UART, GPIO found on AMD CZ and
    later chipsets. It based on example intel LPSS. Now, it can
    support AMD I2C, UART and GPIO.

    Signed-off-by: Ken Xue
    Acked-by: Mika Westerberg
    Signed-off-by: Rafael J. Wysocki

    Ken Xue
     

05 Feb, 2015

1 commit

  • Enable support of IOAPIC hotplug by:
    1) reintroducing ACPI based IOAPIC driver
    2) enhance pci_root driver to hook hotplug events

    The ACPI IOAPIC driver is always enabled if all of ACPI, PCI and IOAPIC
    are enabled.

    Signed-off-by: Jiang Liu
    Cc: Konrad Rzeszutek Wilk
    Cc: Tony Luck
    Cc: Joerg Roedel
    Cc: Greg Kroah-Hartman
    Cc: Benjamin Herrenschmidt
    Cc: Rafael J. Wysocki
    Cc: Bjorn Helgaas
    Cc: Randy Dunlap
    Cc: Yinghai Lu
    Cc: Borislav Petkov
    Cc: Len Brown
    Link: http://lkml.kernel.org/r/1414387308-27148-19-git-send-email-jiang.liu@linux.intel.com
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Rafael J. Wysocki

    Jiang Liu
     

24 Jan, 2015

1 commit

  • This patch fixes 2 issues related to the draining behavior. But it doesn't
    implement the draining support, it only cleans up code so that further
    draining support is possible.

    The draining behavior is expected by some platforms (for example, Samsung)
    where SCI_EVT is set only once for a set of events and might be cleared for
    the very first QR_EC command issued after SCI_EVT is set. EC firmware on
    such platforms will return 0x00 to indicate "no outstanding event". Thus
    after seeing an SCI_EVT indication, EC driver need to fetch events until
    0x00 returned (see acpi_ec_clear()).

    Issue 1 - acpi_ec_submit_query():
    It's reported on Samsung laptops that SCI_EVT isn't checked when the
    transactions are advanced in ec_poll(), which leads to SCI_EVT triggering
    source lost:
    If no EC GPE IRQs are arrived after that, EC driver cannot detect this
    event and handle it.
    See comment 244/247 for kernel bugzilla 44161.
    This patch fixes this issue by moving SCI_EVT checks into
    advance_transaction(). So that SCI_EVT is checked each time we are going to
    handle the EC firmware indications. And this check will happen for both IRQ
    context and task context.
    Since after doing that, SCI_EVT is also checked after completing a
    transaction, ec_check_sci() and ec_check_sci_sync() can be removed.

    Issue 2 - acpi_ec_complete_query():
    We expect to clear EC_FLAGS_QUERY_PENDING to allow queuing another draining
    QR_EC after writing a QR_EC command and before reading the event. After
    reading the event, SCI_EVT might be cleared by the firmware, thus it may
    not be possible to queue such a draining QR_EC at that time.
    But putting the EC_FLAGS_QUERY_PENDING clearing code after
    start_transaction() is wrong as there are chances that after
    start_transaction(), QR_EC can fail to be sent. If this happens,
    EC_FLAG_QUERY_PENDING will be cleared earlier. As a consequence, the
    draining QR_EC will also be queued earlier than expected.
    This patch also moves this code into advance_transaction() where QR_EC is
    just sent (ACPI_EC_COMMAND_POLL flagged) to fix this issue.

    Notes:
    1. After introducing the 2 SCI_EVT related handlings into
    advance_transaction(), a next QR_EC can be queued right after writing
    the current QR_EC command and before reading the event. But this still
    hasn't implemented the draining behavior as the draining support
    requires:
    If a previous returned event value isn't 0x00, a draining QR_EC need
    to be issued even when SCI_EVT isn't set.
    2. In this patch, acpi_os_execute() is also converted into a seperate work
    item to avoid invoking kmalloc() in the atomic context. We can do this
    because of the previous global lock fix.
    3. Originally, EC_FLAGS_EVENT_PENDING is also used to avoid queuing up
    multiple work items (created by acpi_os_execute()), this can be covered
    by only using a single work item. But this patch still keeps this flag
    as there are different usages in the driver initialization steps relying
    on this flag.

    Link: https://bugzilla.kernel.org/show_bug.cgi?id=44161
    Reported-by: Kieran Clancy
    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     

05 Nov, 2014

1 commit

  • Device Tree is used in many embedded systems to describe the system
    configuration to the OS. It supports attaching properties or name-value
    pairs to the devices it describe. With these properties one can pass
    additional information to the drivers that would not be available
    otherwise.

    ACPI is another configuration mechanism (among other things) typically
    seen, but not limited to, x86 machines. ACPI allows passing arbitrary
    data from methods but there has not been mechanism equivalent to Device
    Tree until the introduction of _DSD in the recent publication of the
    ACPI 5.1 specification.

    In order to facilitate ACPI usage in systems where Device Tree is
    typically used, it would be beneficial to standardize a way to retrieve
    Device Tree style properties from ACPI devices, which is what we do in
    this patch.

    If a given device described in ACPI namespace wants to export properties it
    must implement _DSD method (Device Specific Data, introduced with ACPI 5.1)
    that returns the properties in a package of packages. For example:

    Name (_DSD, Package () {
    ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
    Package () {
    Package () {"name1", },
    Package () {"name2", },
    ...
    }
    })

    The UUID reserved for properties is daffd814-6eba-4d8c-8a91-bc9bbf4aa301
    and is documented in the ACPI 5.1 companion document called "_DSD
    Implementation Guide" [1], [2].

    We add several helper functions that can be used to extract these
    properties and convert them to different Linux data types.

    The ultimate goal is that we only have one device property API that
    retrieves the requested properties from Device Tree or from ACPI
    transparent to the caller.

    [1] http://www.uefi.org/sites/default/files/resources/_DSD-implementation-guide-toplevel.htm
    [2] http://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf

    Reviewed-by: Hanjun Guo
    Reviewed-by: Josh Triplett
    Reviewed-by: Grant Likely
    Signed-off-by: Darren Hart
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Mika Westerberg
    Signed-off-by: Rafael J. Wysocki

    Mika Westerberg
     

10 Oct, 2014

2 commits


11 Sep, 2014

1 commit

  • Newer laptops and tablets that use ACPI may have thermal sensors and
    other devices with thermal control capabilities outside the core CPU/SOC,
    for thermal safety reasons.
    They are exposed for the OS to use via
    1) INT3400 ACPI device object as the master.
    2) INT3401 ~ INT340B ACPI device objects as the slaves.

    This patch introduces a scan handler to enumerate the INT3400
    ACPI device object to platform bus, and prevent its slaves
    from being enumerated before the controller driver being probed.

    Signed-off-by: Zhang Rui

    Zhang Rui
     

28 Jul, 2014

1 commit