03 Nov, 2012

1 commit

  • There are systems where video module known to work fine regardless
    of broken _DOD and ignoring returned value here doesn't cause
    any issues later. This should fix brightness controls on some laptops.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=47861

    Signed-off-by: Igor Murzov
    Reviewed-by: Sergey V
    Signed-off-by: Zhang Rui

    Igor Murzov
     

26 Oct, 2012

1 commit


23 Oct, 2012

1 commit

  • Memory is allocated with kzalloc() and assigned to
    'physical_node'. Then 'physical_node->node_id' is initialized with a
    call to 'find_first_zero_bit()', if that results in a value greater
    than ACPI_MAX_PHYSICAL_NODE we'll end up jumping to the 'err:' label
    and there leave the function and let 'physical_node' go out of scope
    and leak the memory we allocated.
    This patch fixes the leak by simply freeing the unused/unneeded memory
    pointed to by 'physical_node' just before we jump to 'err:'.

    [rjw: The problem has been introduced by commit 1033f90 (ACPI: Allow
    ACPI binding with USB-3.0 hub), which is new in 3.7-rc.]

    Signed-off-by: Jesper Juhl
    Reviewed-by: Toshi Kani
    Reviewed-by: Yasuaki Ishimatsu
    Acked-by: David Rientjes
    Signed-off-by: Rafael J. Wysocki

    Jesper Juhl
     

17 Oct, 2012

1 commit


09 Oct, 2012

3 commits


08 Oct, 2012

1 commit

  • Pul ACPI & Power Management updates from Len Brown:
    - acpidump utility added
    - intel_idle driver now supports IVB Xeon
    - turbostat utility can now count SMIs
    - ACPI can now bind to USB3 hubs
    - misc fixes

    * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (49 commits)
    ACPI: Add new sysfs interface to export device description
    ACPI: Harden acpi_table_parse_entries() against BIOS bug
    tools/power/turbostat: add option to count SMIs, re-name some options
    tools/power turbostat: add [-d MSR#][-D MSR#] options to print counter deltas
    intel_idle: enable IVB Xeon support
    tools/power turbostat: add [-m MSR#] option
    tools/power turbostat: make -M output pretty
    tools/power turbostat: print more turbo-limit information
    tools/power turbostat: delete unused line
    tools/power turbostat: run on IVB Xeon
    tools/power/acpi/acpidump: create acpidump(8), local make install targets
    tools/power/acpi/acpidump: version 20101221 - find dynamic tables in sysfs
    ACPI: run _OSC after ACPI_FULL_INITIALIZATION
    tools/power/acpi/acpidump: create acpidump(8), local make install targets
    tools/power/acpi/acpidump: version 20101221 - find dynamic tables in sysfs
    tools/power/acpi/acpidump: version 20071116
    tools/power/acpi/acpidump: version 20070714
    tools/power/acpi/acpidump: version 20060606
    tools/power/acpi/acpidump: version 20051111
    xo15-ebook: convert to module_acpi_driver()
    ...

    Linus Torvalds
     

07 Oct, 2012

5 commits

  • …implify', 'turbostat' and 'usb3' into release

    add acpidump utility
    intel_idle driver now supports IVB Xeon
    turbostat can now count SMIs
    ACPI can now bind to USB3 hubs
    misc fixes

    Len Brown
     
  • Add support to export the device description obtained from the ACPI _STR
    method, if one exists for a device, to user-space via a sysfs interface.
    This new interface provides a standard and platform neutral way for users
    to obtain the description text stored in the ACPI _STR method. If no
    _STR method exists for the device, no sysfs 'description' file will be
    created. The 'description' file will be located in the /sys/devices/
    directory using the device's path.

    /sys/device///.../firmware_node/description

    Example:

    /sys/devices/pci0000:00/0000:00.07.0/0000:0e:00.0/firmware_node/description

    It can also be located using the ACPI device path, for example:

    /sys/devices/LNXSYSTM:00/device:00/ACPI0004:00/PNP0A08:00/device:13/device:15/description
    /sys/devices/LNXSYSTM:00/device:00/ACPI0004:00/ACPI0004:01/ACPI0007:02/description

    Execute the 'cat' command on the 'description' file to obtain the
    description string for that device.

    This patch also includes documentation describing how the new sysfs
    interface works

    Changes from v1-v2 based on comments by Len Brown and Fengguang Wu
    * Removed output "No Description" and leaving a NULL attribute if the
    _STR method failed to evaluate.

    * In acpi_device_remove_files() removed the redundent check of
    dev->pnp.str_obj before calling free. This check triggered a message
    from smatch.

    Signed-off-by: Lance Ortiz
    Signed-off-by: Len Brown

    Lance Ortiz
     
  • Parsing acpi table entries may fall into an infinite loop on a buggy BIOS
    which has entry length=0 in acpi table.

    Instead of kernel hang with few failure clue which leads to heavy lifting debug
    effort, this patch hardens kernel boot by booting into non NUMA mode. The debug
    info left in log buffer helps people identify the issue.

    Signed-off-by: Fenghua Yu
    Signed-off-by: Len Brown

    Fenghua Yu
     
  • By enlarging the GPE storm threshold back to 20, that laptop's
    EC works fine with interrupt mode instead of polling mode.

    https://bugzilla.kernel.org/show_bug.cgi?id=45151

    Reported-and-Tested-by: Francesco
    Signed-off-by: Feng Tang
    Signed-off-by: Len Brown
    cc: stable@vger.kernel.org

    Feng Tang
     
  • The Linux EC driver includes a mechanism to detect GPE storms,
    and switch from interrupt-mode to polling mode. However, polling
    mode sometimes doesn't work, so the workaround is problematic.
    Also, different systems seem to need the threshold for detecting
    the GPE storm at different levels.

    ACPI_EC_STORM_THRESHOLD was initially 20 when it's created, and
    was changed to 8 in 2.6.28 commit 06cf7d3c7 "ACPI: EC: lower interrupt storm
    threshold" to fix kernel bug 11892 by forcing the laptop in that bug to
    work in polling mode. However in bug 45151, it works fine in interrupt
    mode if we lift the threshold back to 20.

    This patch makes the threshold a module parameter so that user has a
    flexible option to debug/workaround this issue.

    The default is unchanged.

    This is also a preparation patch to fix specific systems:
    https://bugzilla.kernel.org/show_bug.cgi?id=45151

    Signed-off-by: Feng Tang
    Signed-off-by: Len Brown
    cc: stable@vger.kernel.org

    Feng Tang
     

04 Oct, 2012

1 commit

  • Pull drm merge (part 1) from Dave Airlie:
    "So first of all my tree and uapi stuff has a conflict mess, its my
    fault as the nouveau stuff didn't hit -next as were trying to rebase
    regressions out of it before we merged.

    Highlights:
    - SH mobile modesetting driver and associated helpers
    - some DRM core documentation
    - i915 modesetting rework, haswell hdmi, haswell and vlv fixes, write
    combined pte writing, ilk rc6 support,
    - nouveau: major driver rework into a hw core driver, makes features
    like SLI a lot saner to implement,
    - psb: add eDP/DP support for Cedarview
    - radeon: 2 layer page tables, async VM pte updates, better PLL
    selection for > 2 screens, better ACPI interactions

    The rest is general grab bag of fixes.

    So why part 1? well I have the exynos pull req which came in a bit
    late but was waiting for me to do something they shouldn't have and it
    looks fairly safe, and David Howells has some more header cleanups
    he'd like me to pull, that seem like a good idea, but I'd like to get
    this merge out of the way so -next dosen't get blocked."

    Tons of conflicts mostly due to silly include line changes, but mostly
    mindless. A few other small semantic conflicts too, noted from Dave's
    pre-merged branch.

    * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (447 commits)
    drm/nv98/crypt: fix fuc build with latest envyas
    drm/nouveau/devinit: fixup various issues with subdev ctor/init ordering
    drm/nv41/vm: fix and enable use of "real" pciegart
    drm/nv44/vm: fix and enable use of "real" pciegart
    drm/nv04/dmaobj: fixup vm target handling in preparation for nv4x pcie
    drm/nouveau: store supported dma mask in vmmgr
    drm/nvc0/ibus: initial implementation of subdev
    drm/nouveau/therm: add support for fan-control modes
    drm/nouveau/hwmon: rename pwm0* to pmw1* to follow hwmon's rules
    drm/nouveau/therm: calculate the pwm divisor on nv50+
    drm/nouveau/fan: rewrite the fan tachometer driver to get more precision, faster
    drm/nouveau/therm: move thermal-related functions to the therm subdev
    drm/nouveau/bios: parse the pwm divisor from the perf table
    drm/nouveau/therm: use the EXTDEV table to detect i2c monitoring devices
    drm/nouveau/therm: rework thermal table parsing
    drm/nouveau/gpio: expose the PWM/TOGGLE parameter found in the gpio vbios table
    drm/nouveau: fix pm initialization order
    drm/nouveau/bios: check that fixed tvdac gpio data is valid before using it
    drm/nouveau: log channel debug/error messages from client object rather than drm client
    drm/nouveau: have drm debugging macros build on top of core macros
    ...

    Linus Torvalds
     

03 Oct, 2012

2 commits

  • Pull power management updates from Rafael J Wysocki:

    - Improved system suspend/resume and runtime PM handling for the SH
    TMU, CMT and MTU2 clock event devices (also used by ARM/shmobile).

    - Generic PM domains framework extensions related to cpuidle support
    and domain objects lookup using names.

    - ARM/shmobile power management updates including improved support for
    the SH7372's A4S power domain containing the CPU core.

    - cpufreq changes related to AMD CPUs support from Matthew Garrett,
    Andre Przywara and Borislav Petkov.

    - cpu0 cpufreq driver from Shawn Guo.

    - cpufreq governor fixes related to the relaxing of limit from Michal
    Pecio.

    - OMAP cpufreq updates from Axel Lin and Richard Zhao.

    - cpuidle ladder governor fixes related to the disabling of states from
    Carsten Emde and me.

    - Runtime PM core updates related to the interactions with the system
    suspend core from Alan Stern and Kevin Hilman.

    - Wakeup sources modification allowing more helper functions to be
    called from interrupt context from John Stultz and additional
    diagnostic code from Todd Poynor.

    - System suspend error code path fix from Feng Hong.

    Fixed up conflicts in cpufreq/powernow-k8 that stemmed from the
    workqueue fixes conflicting fairly badly with the removal of support for
    hardware P-state chips. The changes were independent but somewhat
    intertwined.

    * tag 'pm-for-3.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (76 commits)
    Revert "PM QoS: Use spinlock in the per-device PM QoS constraints code"
    PM / Runtime: let rpm_resume() succeed if RPM_ACTIVE, even when disabled, v2
    cpuidle: rename function name "__cpuidle_register_driver", v2
    cpufreq: OMAP: Check IS_ERR() instead of NULL for omap_device_get_by_hwmod_name
    cpuidle: remove some empty lines
    PM: Prevent runtime suspend during system resume
    PM QoS: Use spinlock in the per-device PM QoS constraints code
    PM / Sleep: use resume event when call dpm_resume_early
    cpuidle / ACPI : move cpuidle_device field out of the acpi_processor_power structure
    ACPI / processor: remove pointless variable initialization
    ACPI / processor: remove unused function parameter
    cpufreq: OMAP: remove loops_per_jiffy recalculate for smp
    sections: fix section conflicts in drivers/cpufreq
    cpufreq: conservative: update frequency when limits are relaxed
    cpufreq / ondemand: update frequency when limits are relaxed
    properly __init-annotate pm_sysrq_init()
    cpufreq: Add a generic cpufreq-cpu0 driver
    PM / OPP: Initialize OPP table from device tree
    ARM: add cpufreq transiton notifier to adjust loops_per_jiffy for smp
    cpufreq: Remove support for hardware P-state chips from powernow-k8
    ...

    Linus Torvalds
     
  • Alex writes:
    "The big changes for 3.7 include:
    - Asynchronous VM page table updates for Cayman/SI
    - 2 level VM page table support. Saves memory compared to 1 level
    page tables.
    - Reworked PLL handing in the display code allows lots more
    combinations of monitors to work, including more than two
    DP displays assuming compatible clocks across shared PLLs.
    This also allows us to power down extra PLLs when we can
    share a single one across multiple displays which saves power.
    - Native backlight control on ATOMBIOS systems.
    - Improved ACPI support for interacting with the GPU. Fixes
    backlight control on some laptops.
    - Document AMD ACPI interfaces
    - Lots of code cleanup
    - Bug fixes"

    * 'drm-next-3.7' of git://people.freedesktop.org/~agd5f/linux: (79 commits)
    drm/radeon: add vm set_page() callback for SI
    drm/radeon: rework the vm_flush interface
    drm/radeon: use WRITE_DATA packets for vm flush on SI
    drm/radeon/pm: fix multi-head profile handling on BTC+ (v2)
    drm/radeon: fix radeon power state debug output
    drm/radeon: force MSIs on RS690 asics
    drm/radeon: Add MSI quirk for gateway RS690
    drm/radeon: allow MIP_ADDRESS=0 for MSAA textures on Evergreen
    drm/radeon/kms: allow STRMOUT_BASE_UPDATE on RS780 and RS880
    drm/radeon: add 2-level VM pagetables support v9
    drm/radeon: refactor set_page chipset interface v5
    drm/radeon: Fix scratch register leak in IB test.
    drm/radeon: restore backlight level on resume
    drm/radeon: add get_backlight_level callback
    drm/radeon: only adjust default clocks on NI GPUs
    drm/radeon: validate PPLL in crtc fixup
    drm/radeon: work around KMS modeset limitations in PLL allocation (v2)
    drm/radeon: make non-DP PPLL sharing more robust
    drm/radeon: store the encoder in the radeon_crtc
    drm/radeon: rework crtc pll setup to better support PPLL sharing
    ...

    Dave Airlie
     

02 Oct, 2012

1 commit

  • Pull PCI changes from Bjorn Helgaas:
    "Host bridge hotplug
    - Protect acpi_pci_drivers and acpi_pci_roots (Taku Izumi)
    - Clear host bridge resource info to avoid issue when releasing
    (Yinghai Lu)
    - Notify acpi_pci_drivers when hot-plugging host bridges (Jiang Liu)
    - Use standard list ops for acpi_pci_drivers (Jiang Liu)

    Device hotplug
    - Use pci_get_domain_bus_and_slot() to close hotplug races (Jiang
    Liu)
    - Remove fakephp driver (Bjorn Helgaas)
    - Fix VGA ref count in hotplug remove path (Yinghai Lu)
    - Allow acpiphp to handle PCIe ports without native hotplug (Jiang
    Liu)
    - Implement resume regardless of pciehp_force param (Oliver Neukum)
    - Make pci_fixup_irqs() work after init (Thierry Reding)

    Miscellaneous
    - Add pci_pcie_type(dev) and remove pci_dev.pcie_type (Yijing Wang)
    - Factor out PCI Express Capability accessors (Jiang Liu)
    - Add pcibios_window_alignment() so powerpc EEH can use generic
    resource assignment (Gavin Shan)
    - Make pci_error_handlers const (Stephen Hemminger)
    - Cleanup drivers/pci/remove.c (Bjorn Helgaas)
    - Improve Vendor-Specific Extended Capability support (Bjorn
    Helgaas)
    - Use standard list ops for bus->devices (Bjorn Helgaas)
    - Avoid kmalloc in pci_get_subsys() and pci_get_class() (Feng Tang)
    - Reassign invalid bus number ranges (Intel DP43BF workaround)
    (Yinghai Lu)"

    * tag 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (102 commits)
    PCI: acpiphp: Handle PCIe ports without native hotplug capability
    PCI/ACPI: Use acpi_driver_data() rather than searching acpi_pci_roots
    PCI/ACPI: Protect acpi_pci_roots list with mutex
    PCI/ACPI: Use acpi_pci_root info rather than looking it up again
    PCI/ACPI: Pass acpi_pci_root to acpi_pci_drivers' add/remove interface
    PCI/ACPI: Protect acpi_pci_drivers list with mutex
    PCI/ACPI: Notify acpi_pci_drivers when hot-plugging PCI root bridges
    PCI/ACPI: Use normal list for struct acpi_pci_driver
    PCI/ACPI: Use DEVICE_ACPI_HANDLE rather than searching acpi_pci_roots
    PCI: Fix default vga ref_count
    ia64/PCI: Clear host bridge aperture struct resource
    x86/PCI: Clear host bridge aperture struct resource
    PCI: Stop all children first, before removing all children
    Revert "PCI: Use hotplug-safe pci_get_domain_bus_and_slot()"
    PCI: Provide a default pcibios_update_irq()
    PCI: Discard __init annotations for pci_fixup_irqs() and related functions
    PCI: Use correct type when freeing bus resource list
    PCI: Check P2P bridge for invalid secondary/subordinate range
    PCI: Convert "new_id"/"remove_id" into generic pci_bus driver attributes
    xen-pcifront: Use hotplug-safe pci_get_domain_bus_and_slot()
    ...

    Linus Torvalds
     

30 Sep, 2012

1 commit

  • The ACPI BGRT driver accesses the BIOS logo image when it initializes.
    However, ACPI 5.0 (which introduces the BGRT) recommends putting the
    logo image in EFI boot services memory, so that the OS can reclaim that
    memory. Production systems follow this recommendation, breaking the
    ACPI BGRT driver.

    Move the bulk of the BGRT code to run during a new EFI late
    initialization phase, which occurs after switching EFI to virtual mode,
    and after initializing ACPI, but before freeing boot services memory.
    Copy the BIOS logo image to kernel memory at that point, and make it
    accessible to the BGRT driver. Rework the existing ACPI BGRT driver to
    act as a simple wrapper exposing that image (and the properties from the
    BGRT) via sysfs.

    Signed-off-by: Josh Triplett
    Link: http://lkml.kernel.org/r/93ce9f823f1c1f3bb88bdd662cce08eee7a17f5d.1348876882.git.josh@joshtriplett.org
    Signed-off-by: H. Peter Anvin

    Josh Triplett
     

25 Sep, 2012

9 commits


24 Sep, 2012

5 commits

  • * pm-cpuidle:
    cpuidle: rename function name "__cpuidle_register_driver", v2
    cpuidle: remove some empty lines
    cpuidle / ACPI : move cpuidle_device field out of the acpi_processor_power structure

    Rafael J. Wysocki
     
  • This function is used to update the cooling state of
    all the cooling devices that are bound to an active trip point.

    This will be used for passive cooling as well, in the future patches.
    as both active and passive cooling can share the same algorithm,
    which is

    1. if the temperature is higher than a trip point,
    a. if the trend is THERMAL_TREND_RAISING, use higher cooling
    state for this trip point
    b. if the trend is THERMAL_TREND_DROPPING, use lower cooling
    state for this trip point

    2. if the temperature is lower than a trip point, use lower
    cooling state for this trip point.

    Signed-off-by: Zhang Rui
    Reviewed-by: Rafael J. Wysocki
    Reviewed-by: Eduardo Valentin

    Zhang Rui
     
  • Remove tc1/tc2 in generic thermal layer.
    .get_trend() callback starts to take effect from this patch.

    Signed-off-by: Zhang Rui
    Reviewed-by: Rafael J. Wysocki
    Reviewed-by: Valentin, Eduardo

    Zhang Rui
     
  • According to ACPI spec, tc1 and tc2 are used by OSPM
    to anticipate the temperature trends.
    We introduced the same concept to the generic thermal layer
    for passive cooling, but now it seems that these values
    are hard to be used on other platforms.

    So We introduce .get_trend() as a more general solution.

    For the platform thermal drivers that have their own way to
    anticipate the temperature trends, they should provide
    their own .get_trend() callback.
    Or else, we will calculate the temperature trends by simply
    comparing the current temperature and the cached previous
    temperature reading.

    Signed-off-by: Zhang Rui
    Reviewed-by: Rafael J. Wysocki
    Reviewed-by: Valentin, Eduardo

    Zhang Rui
     
  • set upper and lower limits when binding
    a thermal cooling device to a thermal zone device.

    Signed-off-by: Zhang Rui
    Reviewed-by: Rafael J. Wysocki
    Reviewed-by: Eduardo Valentin

    Zhang Rui
     

22 Sep, 2012

5 commits

  • Signed-off-by: Mika Westerberg
    Signed-off-by: Len Brown

    Mika Westerberg
     
  • Signed-off-by: Mika Westerberg
    Signed-off-by: Len Brown

    Mika Westerberg
     
  • Signed-off-by: Mika Westerberg
    Signed-off-by: Len Brown

    Mika Westerberg
     
  • Signed-off-by: Mika Westerberg
    Signed-off-by: Len Brown

    Mika Westerberg
     
  • A USB port's position and connectability can't be identified on some boards
    via USB hub registers. ACPI _UPC and _PLD can help to resolve this issue
    and so it is necessary to bind USB with ACPI. This patch is to allow ACPI
    binding with USB-3.0 hub.

    Current ACPI only can bind one struct-device to one ACPI device node.
    This can not work with USB-3.0 hub, because the USB-3.0 hub has two logical
    devices. Each works for USB-2.0 and USB-3.0 devices. In the Linux USB subsystem,
    those two logical hubs are treated as two seperate devices that have two struct
    devices. But in the ACPI DSDT, these two logical hubs share one ACPI device
    node. So there is a requirement to bind multi struct-devices to one ACPI
    device node. This patch is to resolve such problem.

    Following is the ACPI device nodes' description under xhci hcd.

    Device (XHC)
    Device (RHUB)
    Device (HSP1)
    Device (HSP2)
    Device (HSP3)
    Device (HSP4)
    Device (SSP1)
    Device (SSP2)
    Device (SSP3)
    Device (SSP4)

    Topology in the Linux

    device XHC
    USB-2.0 logical hub USB-3.0 logical hub
    HSP1 SSP1
    HSP2 SSP2
    HSP3 SSP3
    HSP4 SSP4

    This patch also modifies the output of /proc/acpi/wakeup. One ACPI node
    can be associated with multiple devices:

    XHC S4 *enabled pci:0000:00:14.0
    RHUB S0 disabled usb:usb1
    disabled usb:usb2

    Signed-off-by: Lan Tianyu
    Acked-by: Sarah Sharp
    Signed-off-by: Len Brown

    Lan Tianyu
     

21 Sep, 2012

3 commits

  • Merge/remove duplicate code in the root table resize functions
    One function is external, the other is internal. Lv Zheng,

    ACPICA BZ 846:
    https://acpica.org/bugzilla/show_bug.cgi?id=846

    Signed-off-by: Bob Moore
    Signed-off-by: Lv Zheng
    Signed-off-by: Len Brown

    Lv Zheng
     
  • This patch is on top of the ACPICA 20120816 release, which implemented
    a native way to decode PLD buffer, so use it instead of leting upper
    level users do the decoding.

    v2: Modify the check for PLD buffer length to reject buffers whose
    length < 16

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

    Feng Tang
     
  • _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