23 Jul, 2014

1 commit

  • The ACPI_HANDLE() macro evaluates ACPI_COMPANION() internally to
    return the handle of the device's ACPI companion, so it is much
    more straightforward and efficient to use ACPI_COMPANION()
    directly to obtain the device's ACPI companion object instead of
    using ACPI_HANDLE() and acpi_bus_get_device() on the returned
    handle for the same thing.

    Do that in several places in the ACPI PNP core code.

    Also use acpi_device_set_power() and acpi_device_power_manageable()
    instead of acpi_bus_set_power() and acpi_bus_power_manageable(),
    respectively, because the former two are more efficient if the
    ACPI device object is already available.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

07 Jul, 2014

1 commit

  • PNPACPI uses acpi_bus_type to do ACPI binding for the PNPACPI devices.

    This is overkill because PNPACPI code already knows which ACPI
    device object to bind during PNPACPI device enumeration.

    This patch removes acpi_pnp_bus and does the binding by invoking
    acpi_bind_one() directly after device enumerated.

    This also fixes a bug in the previous code that some PNPACPI devices failed
    to be bound because
    1. the ACPI device _HID is not pnpid, e.g. "MSFT0001", but its _CID is,
    e.g. "PNP0303", thus ACPI _CID is used as the pnp device device id.
    2. device is bound only if the pnp device id matches the ACPI device _HID.

    Tested-by: Prigent Christophe
    Signed-off-by: Zhang Rui
    Signed-off-by: Rafael J. Wysocki

    Zhang Rui
     

04 Jun, 2014

1 commit

  • * pnp:
    MAINTAINERS: Remove Bjorn Helgaas as PNP maintainer
    PNP / resources: remove positive test on unsigned values

    * powercap:
    powercap / RAPL: add new CPU IDs
    powercap / RAPL: further relax energy counter checks

    * pm-runtime:
    PM / runtime: Update documentation to reflect the current code flow

    * pm-opp:
    PM / OPP: discard duplicate OPPs
    PM / OPP: Make OPP invisible to users in Kconfig
    PM / OPP: fix incorrect OPP count handling in of_init_opp_table

    Rafael J. Wysocki
     

30 May, 2014

1 commit

  • ACPI can be used to enumerate PNP devices, but the code does not
    handle this in the right way currently. Namely, if an ACPI device
    object
    1. Has a _CRS method,
    2. Has an identification of
    "three capital characters followed by four hex digits",
    3. Is not in the excluded IDs list,
    it will be enumerated to PNP bus (that is, a PNP device object will
    be create for it). This means that, actually, the PNP bus type is
    used as the default bus type for enumerating _HID devices in ACPI.

    However, more and more _HID devices need to be enumerated to the
    platform bus instead (that is, platform device objects need to be
    created for them). As a result, the device ID list in acpi_platform.c
    is used to enforce creating platform device objects rather than PNP
    device objects for matching devices. That list has been continuously
    growing recently, unfortunately, and it is pretty much guaranteed to
    grow even more in the future.

    To address that problem it is better to enumerate _HID devices
    as platform devices by default. To this end, change the way of
    enumerating PNP devices by adding a PNP ACPI scan handler that
    will use a device ID list to create PNP devices for the ACPI
    device objects whose device IDs are present in that list.

    The initial device ID list in the PNP ACPI scan handler contains
    all of the pnp_device_id strings from all the existing PNP drivers,
    so this change should be transparent to the PNP core and all of the
    PNP drivers. Still, in the future it should be possible to reduce
    its size by converting PNP drivers that need not be PNP for any
    technical reasons into platform drivers.

    Signed-off-by: Zhang Rui
    [rjw: Rewrote the changelog, modified the PNP ACPI scan handler code]
    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Mika Westerberg

    Zhang Rui
     

10 May, 2014

1 commit


06 May, 2014

1 commit


01 May, 2014

1 commit

  • The ACPI PNP subsystem returns errors from pnpacpi_set_resources()
    and pnpacpi_disable_resources() if the _SRS or _DIS methods are not
    present, respectively, but it should not do that, because those
    methods are optional. For this reason, modify pnpacpi_set_resources()
    and pnpacpi_disable_resources(), respectively, to ignore missing _SRS
    or _DIS.

    This problem has been uncovered by commit 202317a573b2 (ACPI / scan:
    Add acpi_device objects for all device nodes in the namespace) and
    manifested itself by causing serial port suspend to fail on some
    systems.

    Fixes: 202317a573b2 (ACPI / scan: Add acpi_device objects for all device nodes in the namespace)
    References: https://bugzilla.kernel.org/show_bug.cgi?id=74371
    Reported-by: wxg4net
    Reported-and-tested-by:
    Cc: 3.14+ # 3.14+
    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

30 Apr, 2014

1 commit

  • Fix the compile error:

    drivers/pnp/quirks.c:393:2: error: implicit declaration of function 'pcibios_bus_to_resource'

    that occurs when building with CONFIG_PCI unset. The quirk is only
    relevent to Intel devices, so we could use "#if defined(CONFIG_X86) &&
    defined(CONFIG_PCI)" instead, but testing CONFIG_X86 is not strictly
    necessary.

    Fixes: cb171f7abb9a (PNP: Work around BIOS defects in Intel MCH area reporting)
    Reported-by: Randy Dunlap
    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Rafael J. Wysocki

    Bjorn Helgaas
     

24 Apr, 2014

1 commit

  • Work around BIOSes that don't report the entire Intel MCH area.

    MCHBAR is not an architected PCI BAR, so MCH space is usually reported as a
    PNP0C02 resource. The MCH space was once 16KB, but is 32KB in newer parts.
    Some BIOSes still report a PNP0C02 resource that is only 16KB, which means
    the rest of the MCH space is consumed but unreported.

    This can cause resource map sanity check warnings or (theoretically) a
    device conflict if we assigned the unreported space to another device.

    The Intel perf event uncore driver tripped over this when it claimed the
    MCH region:

    resource map sanity check conflict: 0xfed10000 0xfed15fff 0xfed10000 0xfed13fff pnp 00:01
    Info: mapping multiple BARs. Your kernel is fine.

    To prevent this, if we find a PNP0C02 resource that covers part of the MCH
    space, extend it to cover the entire space.

    References: http://lkml.kernel.org/r/20140224162400.GE16457@pd.tnic
    Reported-and-tested-by: Borislav Petkov
    Signed-off-by: Bjorn Helgaas
    Acked-by: Borislav Petkov
    Acked-by: Stephane Eranian
    Signed-off-by: Rafael J. Wysocki

    Bjorn Helgaas
     

03 Apr, 2014

1 commit

  • Pull more ACPI and power management updates from Rafael Wysocki:
    "These are commits that were not quite ready when I sent the original
    pull request for 3.15-rc1 several days ago, but they have spent some
    time in linux-next since then and appear to be good to go. All of
    them are fixes and cleanups.

    Specifics:

    - Remaining changes from upstream ACPICA release 20140214 that
    introduce code to automatically serialize the execution of methods
    creating any named objects which really cannot be executed in
    parallel with each other anyway (previously ACPICA attempted to
    address that by aborting methods upon conflict detection, but that
    wasn't reliable enough and led to other issues). From Bob Moore
    and Lv Zheng.

    - intel_pstate fix to use del_timer_sync() instead of del_timer() in
    the exit path before freeing the timer structure from Dirk
    Brandewie (original patch from Thomas Gleixner).

    - cpufreq fix related to system resume from Viresh Kumar.

    - Serialization of frequency transitions in cpufreq that involve
    PRECHANGE and POSTCHANGE notifications to avoid ordering issues
    resulting from race conditions. From Srivatsa S Bhat and Viresh
    Kumar.

    - Revert of an ACPI processor driver change that was based on a
    specific interpretation of the ACPI spec which may not be correct
    (the relevant part of the spec appears to be incomplete). From
    Hanjun Guo.

    - Runtime PM core cleanups and documentation updates from Geert
    Uytterhoeven.

    - PNP core cleanup from Michael Opdenacker"

    * tag 'pm+acpi-3.15-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    cpufreq: Make cpufreq_notify_transition & cpufreq_notify_post_transition static
    cpufreq: Convert existing drivers to use cpufreq_freq_transition_{begin|end}
    cpufreq: Make sure frequency transitions are serialized
    intel_pstate: Use del_timer_sync in intel_pstate_cpu_stop
    cpufreq: resume drivers before enabling governors
    PM / Runtime: Spelling s/competing/completing/
    PM / Runtime: s/foo_process_requests/foo_process_next_request/
    PM / Runtime: GENERIC_SUBSYS_PM_OPS is gone
    PM / Runtime: Correct documented return values for generic PM callbacks
    PM / Runtime: Split line longer than 80 characters
    PM / Runtime: dev_pm_info.runtime_error is signed
    Revert "ACPI / processor: Make it possible to get APIC ID via GIC"
    ACPICA: Enable auto-serialization as a default kernel behavior.
    ACPICA: Ignore sync_level for methods that have been auto-serialized.
    ACPICA: Add additional named objects for the auto-serialize method scan.
    ACPICA: Add auto-serialization support for ill-behaved control methods.
    ACPICA: Remove global option to serialize all control methods.
    PNP: remove deprecated IRQF_DISABLED

    Linus Torvalds
     

01 Apr, 2014

1 commit

  • Pull x86 LTO changes from Peter Anvin:
    "More infrastructure work in preparation for link-time optimization
    (LTO). Most of these changes is to make sure symbols accessed from
    assembly code are properly marked as visible so the linker doesn't
    remove them.

    My understanding is that the changes to support LTO are still not
    upstream in binutils, but are on the way there. This patchset should
    conclude the x86-specific changes, and remaining patches to actually
    enable LTO will be fed through the Kbuild tree (other than keeping up
    with changes to the x86 code base, of course), although not
    necessarily in this merge window"

    * 'x86-asmlinkage-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits)
    Kbuild, lto: Handle basic LTO in modpost
    Kbuild, lto: Disable LTO for asm-offsets.c
    Kbuild, lto: Add a gcc-ld script to let run gcc as ld
    Kbuild, lto: add ld-version and ld-ifversion macros
    Kbuild, lto: Drop .number postfixes in modpost
    Kbuild, lto, workaround: Don't warn for initcall_reference in modpost
    lto: Disable LTO for sys_ni
    lto: Handle LTO common symbols in module loader
    lto, workaround: Add workaround for initcall reordering
    lto: Make asmlinkage __visible
    x86, lto: Disable LTO for the x86 VDSO
    initconst, x86: Fix initconst mistake in ts5500 code
    initconst: Fix initconst mistake in dcdbas
    asmlinkage: Make trace_hardirqs_on/off_caller visible
    asmlinkage, x86: Fix 32bit memcpy for LTO
    asmlinkage Make __stack_chk_failed and memcmp visible
    asmlinkage: Mark rwsem functions that can be called from assembler asmlinkage
    asmlinkage: Make main_extable_sort_needed visible
    asmlinkage, mutex: Mark __visible
    asmlinkage: Make trace_hardirq visible
    ...

    Linus Torvalds
     

21 Mar, 2014

1 commit


12 Mar, 2014

1 commit

  • Before commit b355cee88e3b (ACPI / resources: ignore invalid ACPI
    device resources), if acpi_dev_resource_memory()/acpi_dev_resource_io()
    returns false, it means the the resource is not a memeory/IO resource.

    But after commit b355cee88e3b, those functions return false if the
    given memory/IO resource entry is invalid (the length of the resource
    is zero).

    This breaks pnpacpi_allocated_resource(), because it now recognizes
    the invalid memory/io resources as resources of unknown type. Thus
    users see confusing warning messages on machines with zero length
    ACPI memory/IO resources.

    Fix the problem by rearranging pnpacpi_allocated_resource() so that
    it calls acpi_dev_resource_memory() for memory type and IO type
    resources only, respectively.

    Fixes: b355cee88e3b (ACPI / resources: ignore invalid ACPI device resources)
    Signed-off-by: Zhang Rui
    Reported-and-tested-by: Markus Trippelsdorf
    Reported-and-tested-by: Julian Wollrath
    Reported-and-tested-by: Paul Bolle
    [rjw: Changelog]
    Signed-off-by: Rafael J. Wysocki

    Zhang Rui
     

14 Feb, 2014

1 commit


13 Jan, 2014

3 commits

  • * pnp:
    PNPBIOS: check return value of pnp_add_device()
    PNP: Mark the function pnp_build_option() as static in resource.c
    PNP / card: add missing put_device() call
    PNPACPI: check return value of pnp_add_device()

    Rafael J. Wysocki
     
  • * acpi-hotplug:
    ACPI / scan: ACPI device object sysfs attribute for _STA evaluation
    ACPI / hotplug / driver core: Handle containers in a special way
    ACPI / hotplug: Add demand_offline hotplug profile flag
    ACPI / bind: Move acpi_get_child() to drivers/ide/ide-acpi.c
    ACPI / bind: Pass struct acpi_device pointer to acpi_bind_one()
    ACPI / bind: Rework struct acpi_bus_type
    ACPI / bind: Redefine acpi_preset_companion()
    ACPI / bind: Redefine acpi_get_child()
    PCI / ACPI: Use acpi_find_child_device() for child devices lookup
    ACPI / bind: Simplify child device lookups
    ACPI / scan: Use direct recurrence for device hierarchy walks
    ACPI: Introduce acpi_set_device_status()
    ACPI / hotplug: Drop unfinished global notification handling routines
    ACPI / hotplug: Rework generic code to handle suprise removals
    ACPI / hotplug: Move container-specific code out of the core
    ACPI / hotplug: Make ACPI PCI root hotplug use common hotplug code
    ACPI / hotplug: Introduce common hotplug function acpi_device_hotplug()
    ACPI / hotplug: Do not fail bus and device checks for disabled hotplug
    ACPI / scan: Add acpi_device objects for all device nodes in the namespace
    ACPI / scan: Define non-empty device removal handler

    Rafael J. Wysocki
     
  • * acpi-cleanup: (22 commits)
    ACPI / tables: Return proper error codes from acpi_table_parse() and fix comment.
    ACPI / tables: Check if id is NULL in acpi_table_parse()
    ACPI / proc: Include appropriate header file in proc.c
    ACPI / EC: Remove unused functions and add prototype declaration in internal.h
    ACPI / dock: Include appropriate header file in dock.c
    ACPI / PCI: Include appropriate header file in pci_link.c
    ACPI / PCI: Include appropriate header file in pci_slot.c
    ACPI / EC: Mark the function acpi_ec_add_debugfs() as static in ec_sys.c
    ACPI / NVS: Include appropriate header file in nvs.c
    ACPI / OSL: Mark the function acpi_table_checksum() as static
    ACPI / processor: initialize a variable to silence compiler warning
    ACPI / processor: use ACPI_COMPANION() to get ACPI device
    ACPI: correct minor typos
    ACPI / sleep: Drop redundant acpi_disabled check
    ACPI / dock: Drop redundant acpi_disabled check
    ACPI / table: Replace '1' with specific error return values
    ACPI: remove trailing whitespace
    ACPI / IBFT: Fix incorrect inclusion in iSCSI boot firmware module
    ACPI / i915: Fix incorrect inclusions via
    SFI / ACPI: Fix warnings reported during builds with W=1
    ...

    Conflicts:
    drivers/acpi/nvs.c
    drivers/hwmon/asus_atk0110.c

    Rafael J. Wysocki
     

07 Jan, 2014

1 commit


06 Jan, 2014

2 commits


23 Dec, 2013

1 commit


07 Dec, 2013

2 commits

  • Replace the .find_device function pointer in struct acpi_bus_type
    with a new one, .find_companion, that is supposed to point to a
    function returning struct acpi_device pointer (instead of an int)
    and takes one argument (instead of two). This way the role of
    this callback is more clear and the implementation of it can
    be more straightforward.

    Update all of the users of struct acpi_bus_type (PCI, PNP/ACPI and
    USB) to reflect the structure change.

    Signed-off-by: Rafael J. Wysocki
    Tested-by: Lan Tianyu # for USB/ACPI

    Rafael J. Wysocki
     
  • Replace direct inclusions of , and
    , which are incorrect, with
    inclusions and remove some inclusions of those files that aren't
    necessary.

    First of all, , and
    should not be included directly from any files that are built for
    CONFIG_ACPI unset, because that generally leads to build warnings about
    undefined symbols in !CONFIG_ACPI builds. For CONFIG_ACPI set,
    includes those files and for CONFIG_ACPI unset it
    provides stub ACPI symbols to be used in that case.

    Second, there are ordering dependencies between those files that always
    have to be met. Namely, it is required that be included
    prior to so that the acpi_pci_root declarations the
    latter depends on are always there. And which provides
    basic ACPICA type declarations should always be included prior to any other
    ACPI headers in CONFIG_ACPI builds. That also is taken care of including
    as appropriate.

    Signed-off-by: Lv Zheng
    Cc: Greg Kroah-Hartman
    Cc: Matthew Garrett
    Cc: Tony Luck
    Cc: "H. Peter Anvin"
    Acked-by: Bjorn Helgaas (drivers/pci stuff)
    Acked-by: Konrad Rzeszutek Wilk (Xen stuff)
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     

05 Dec, 2013

1 commit


15 Nov, 2013

1 commit


14 Nov, 2013

1 commit

  • Pull ACPI and power management updates from Rafael J Wysocki:

    - New power capping framework and the the Intel Running Average Power
    Limit (RAPL) driver using it from Srinivas Pandruvada and Jacob Pan.

    - Addition of the in-kernel switching feature to the arm_big_little
    cpufreq driver from Viresh Kumar and Nicolas Pitre.

    - cpufreq support for iMac G5 from Aaro Koskinen.

    - Baytrail processors support for intel_pstate from Dirk Brandewie.

    - cpufreq support for Midway/ECX-2000 from Mark Langsdorf.

    - ARM vexpress/TC2 cpufreq support from Sudeep KarkadaNagesha.

    - ACPI power management support for the I2C and SPI bus types from Mika
    Westerberg and Lv Zheng.

    - cpufreq core fixes and cleanups from Viresh Kumar, Srivatsa S Bhat,
    Stratos Karafotis, Xiaoguang Chen, Lan Tianyu.

    - cpufreq drivers updates (mostly fixes and cleanups) from Viresh
    Kumar, Aaro Koskinen, Jungseok Lee, Sudeep KarkadaNagesha, Lukasz
    Majewski, Manish Badarkhe, Hans-Christian Egtvedt, Evgeny Kapaev.

    - intel_pstate updates from Dirk Brandewie and Adrian Huang.

    - ACPICA update to version 20130927 includig fixes and cleanups and
    some reduction of divergences between the ACPICA code in the kernel
    and ACPICA upstream in order to improve the automatic ACPICA patch
    generation process. From Bob Moore, Lv Zheng, Tomasz Nowicki, Naresh
    Bhat, Bjorn Helgaas, David E Box.

    - ACPI IPMI driver fixes and cleanups from Lv Zheng.

    - ACPI hotplug fixes and cleanups from Bjorn Helgaas, Toshi Kani, Zhang
    Yanfei, Rafael J Wysocki.

    - Conversion of the ACPI AC driver to the platform bus type and
    multiple driver fixes and cleanups related to ACPI from Zhang Rui.

    - ACPI processor driver fixes and cleanups from Hanjun Guo, Jiang Liu,
    Bartlomiej Zolnierkiewicz, Mathieu Rhéaume, Rafael J Wysocki.

    - Fixes and cleanups and new blacklist entries related to the ACPI
    video support from Aaron Lu, Felipe Contreras, Lennart Poettering,
    Kirill Tkhai.

    - cpuidle core cleanups from Viresh Kumar and Lorenzo Pieralisi.

    - cpuidle drivers fixes and cleanups from Daniel Lezcano, Jingoo Han,
    Bartlomiej Zolnierkiewicz, Prarit Bhargava.

    - devfreq updates from Sachin Kamat, Dan Carpenter, Manish Badarkhe.

    - Operation Performance Points (OPP) core updates from Nishanth Menon.

    - Runtime power management core fix from Rafael J Wysocki and update
    from Ulf Hansson.

    - Hibernation fixes from Aaron Lu and Rafael J Wysocki.

    - Device suspend/resume lockup detection mechanism from Benoit Goby.

    - Removal of unused proc directories created for various ACPI drivers
    from Lan Tianyu.

    - ACPI LPSS driver fix and new device IDs for the ACPI platform scan
    handler from Heikki Krogerus and Jarkko Nikula.

    - New ACPI _OSI blacklist entry for Toshiba NB100 from Levente Kurusa.

    - Assorted fixes and cleanups related to ACPI from Andy Shevchenko, Al
    Stone, Bartlomiej Zolnierkiewicz, Colin Ian King, Dan Carpenter,
    Felipe Contreras, Jianguo Wu, Lan Tianyu, Yinghai Lu, Mathias Krause,
    Liu Chuansheng.

    - Assorted PM fixes and cleanups from Andy Shevchenko, Thierry Reding,
    Jean-Christophe Plagniol-Villard.

    * tag 'pm+acpi-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (386 commits)
    cpufreq: conservative: fix requested_freq reduction issue
    ACPI / hotplug: Consolidate deferred execution of ACPI hotplug routines
    PM / runtime: Use pm_runtime_put_sync() in __device_release_driver()
    ACPI / event: remove unneeded NULL pointer check
    Revert "ACPI / video: Ignore BIOS initial backlight value for HP 250 G1"
    ACPI / video: Quirk initial backlight level 0
    ACPI / video: Fix initial level validity test
    intel_pstate: skip the driver if ACPI has power mgmt option
    PM / hibernate: Avoid overflow in hibernate_preallocate_memory()
    ACPI / hotplug: Do not execute "insert in progress" _OST
    ACPI / hotplug: Carry out PCI root eject directly
    ACPI / hotplug: Merge device hot-removal routines
    ACPI / hotplug: Make acpi_bus_hot_remove_device() internal
    ACPI / hotplug: Simplify device ejection routines
    ACPI / hotplug: Fix handle_root_bridge_removal()
    ACPI / hotplug: Refuse to hot-remove all objects with disabled hotplug
    ACPI / scan: Start matching drivers after trying scan handlers
    ACPI: Remove acpi_pci_slot_init() headers from internal.h
    ACPI / blacklist: fix name of ThinkPad Edge E530
    PowerCap: Fix build error with option -Werror=format-security
    ...

    Conflicts:
    arch/arm/mach-omap2/opp.c
    drivers/Kconfig
    drivers/spi/spi.c

    Linus Torvalds
     

17 Oct, 2013

1 commit


24 Sep, 2013

1 commit

  • acpi_has_method() is a new ACPI API introduced to check
    the existence of an ACPI control method.

    It can be used to replace acpi_get_handle() in the case that
    1. the calling function doesn't need the ACPI handle of the control method.
    and
    2. the calling function doesn't care the reason why the method is unavailable.

    Convert acpi_get_handle() to acpi_has_method()
    in drivers/pnp/pnpacpi/core.c in this patch.

    Signed-off-by: Zhang Rui
    CC: Bjorn Helgaas
    Signed-off-by: Rafael J. Wysocki

    Zhang Rui
     

12 Sep, 2013

1 commit

  • pnp_bus_suspend() and pnp_bus_resume() invoke legacy pm_ops from
    pnp_driver. Changed pnp_bus_suspend() and pnp_bus_resume() to check if
    pnp driver has dev_pm_ops and call. If dev_pm_ops don't exist, then call
    use legacy pm_ops. Without this change, pnp_driver dev_pm_ops will not
    get called.

    In addition to the pnp driver bus pm_ops change to invoke driver
    dev_pm_ops, this patch set contains changes to rtc-cmos, tpm_tis, and
    apple-gmux pnp drivers to convert from legacy pm_ops to dev_pm_ops.

    This patch (of 4):

    pnp_bus_suspend() and pnp_bus_resume() invoke legacy pm_ops from
    pnp_driver. Changed pnp_bus_suspend() and pnp_bus_resume() to check if
    pnp driver has dev_pm_ops and call. If dev_pm_ops don't exist, then call
    use legacy pm_ops. Without this change, pnp_driver dev_pm_ops will not
    get called.

    Signed-off-by: Shuah Khan
    Cc: Matthew Garrett
    Cc: Leonidas Da Silva Barbosa
    Cc: Ashley Lai
    Cc: Rajiv Andrade
    Cc: Marcel Selhorst
    Cc: Sirrix AG
    Cc: Alessandro Zummo
    Cc: "Rafael J. Wysocki"
    Cc: Bjorn Helgaas
    Cc: Grant Likely
    Cc: Rob Herring
    Cc: Peter Hüwe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shuah Khan
     

27 Aug, 2013

1 commit


30 Jul, 2013

1 commit


27 Jul, 2013

1 commit

  • Convert drivers/pnp/driver.c bus legacy pm_ops to dev_pm_ops using
    existing suspend and resume routines. Add freeze interface to
    handle PM_EVENT_FREEZE correctly with dev_pm_ops. pm_op() looks for
    freeze interface when the event is PM_EVENT_FREEZE.

    Signed-off-by: Shuah Khan
    Signed-off-by: Rafael J. Wysocki

    Shuah Khan
     

18 Jul, 2013

1 commit


04 Jul, 2013

1 commit

  • Pull power management and ACPI updates from Rafael Wysocki:
    "This time the total number of ACPI commits is slightly greater than
    the number of cpufreq commits, but Viresh Kumar (who works on cpufreq)
    remains the most active patch submitter.

    To me, the most significant change is the addition of offline/online
    device operations to the driver core (with the Greg's blessing) and
    the related modifications of the ACPI core hotplug code. Next are the
    freezer updates from Colin Cross that should make the freezing of
    tasks a bit less heavy weight.

    We also have a couple of regression fixes, a number of fixes for
    issues that have not been identified as regressions, two new drivers
    and a bunch of cleanups all over.

    Highlights:

    - Hotplug changes to support graceful hot-removal failures.

    It sometimes is necessary to fail device hot-removal operations
    gracefully if they cannot be carried out completely. For example,
    if memory from a memory module being hot-removed has been allocated
    for the kernel's own use and cannot be moved elsewhere, it's
    desirable to fail the hot-removal operation in a graceful way
    rather than to crash the kernel, but currenty a success or a kernel
    crash are the only possible outcomes of an attempted memory
    hot-removal. Needless to say, that is not a very attractive
    alternative and it had to be addressed.

    However, in order to make it work for memory, I first had to make
    it work for CPUs and for this purpose I needed to modify the ACPI
    processor driver. It's been split into two parts, a resident one
    handling the low-level initialization/cleanup and a modular one
    playing the actual driver's role (but it binds to the CPU system
    device objects rather than to the ACPI device objects representing
    processors). That's been sort of like a live brain surgery on a
    patient who's riding a bike.

    So this is a little scary, but since we found and fixed a couple of
    regressions it caused to happen during the early linux-next testing
    (a month ago), nobody has complained.

    As a bonus we remove some duplicated ACPI hotplug code, because the
    ACPI-based CPU hotplug is now going to use the common ACPI hotplug
    code.

    - Lighter weight freezing of tasks.

    These changes from Colin Cross and Mandeep Singh Baines are
    targeted at making the freezing of tasks a bit less heavy weight
    operation. They reduce the number of tasks woken up every time
    during the freezing, by using the observation that the freezer
    simply doesn't need to wake up some of them and wait for them all
    to call refrigerator(). The time needed for the freezer to decide
    to report a failure is reduced too.

    Also reintroduced is the check causing a lockdep warining to
    trigger when try_to_freeze() is called with locks held (which is
    generally unsafe and shouldn't happen).

    - cpufreq updates

    First off, a commit from Srivatsa S Bhat fixes a resume regression
    introduced during the 3.10 cycle causing some cpufreq sysfs
    attributes to return wrong values to user space after resume. The
    fix is kind of fresh, but also it's pretty obvious once Srivatsa
    has identified the root cause.

    Second, we have a new freqdomain_cpus sysfs attribute for the
    acpi-cpufreq driver to provide information previously available via
    related_cpus. From Lan Tianyu.

    Finally, we fix a number of issues, mostly related to the
    CPUFREQ_POSTCHANGE notifier and cpufreq Kconfig options and clean
    up some code. The majority of changes from Viresh Kumar with bits
    from Jacob Shin, Heiko Stübner, Xiaoguang Chen, Ezequiel Garcia,
    Arnd Bergmann, and Tang Yuantian.

    - ACPICA update

    A usual bunch of updates from the ACPICA upstream.

    During the 3.4 cycle we introduced support for ACPI 5 extended
    sleep registers, but they are only supposed to be used if the
    HW-reduced mode bit is set in the FADT flags and the code attempted
    to use them without checking that bit. That caused suspend/resume
    regressions to happen on some systems. Fix from Lv Zheng causes
    those registers to be used only if the HW-reduced mode bit is set.

    Apart from this some other ACPICA bugs are fixed and code cleanups
    are made by Bob Moore, Tomasz Nowicki, Lv Zheng, Chao Guan, and
    Zhang Rui.

    - cpuidle updates

    New driver for Xilinx Zynq processors is added by Michal Simek.

    Multidriver support simplification, addition of some missing
    kerneldoc comments and Kconfig-related fixes come from Daniel
    Lezcano.

    - ACPI power management updates

    Changes to make suspend/resume work correctly in Xen guests from
    Konrad Rzeszutek Wilk, sparse warning fix from Fengguang Wu and
    cleanups and fixes of the ACPI device power state selection
    routine.

    - ACPI documentation updates

    Some previously missing pieces of ACPI documentation are added by
    Lv Zheng and Aaron Lu (hopefully, that will help people to
    uderstand how the ACPI subsystem works) and one outdated doc is
    updated by Hanjun Guo.

    - Assorted ACPI updates

    We finally nailed down the IA-64 issue that was the reason for
    reverting commit 9f29ab11ddbf ("ACPI / scan: do not match drivers
    against objects having scan handlers"), so we can fix it and move
    the ACPI scan handler check added to the ACPI video driver back to
    the core.

    A mechanism for adding CMOS RTC address space handlers is
    introduced by Lan Tianyu to allow some EC-related breakage to be
    fixed on some systems.

    A spec-compliant implementation of acpi_os_get_timer() is added by
    Mika Westerberg.

    The evaluation of _STA is added to do_acpi_find_child() to avoid
    situations in which a pointer to a disabled device object is
    returned instead of an enabled one with the same _ADR value. From
    Jeff Wu.

    Intel BayTrail PCH (Platform Controller Hub) support is added to
    the ACPI driver for Intel Low-Power Subsystems (LPSS) and that
    driver is modified to work around a couple of known BIOS issues.
    Changes from Mika Westerberg and Heikki Krogerus.

    The EC driver is fixed by Vasiliy Kulikov to use get_user() and
    put_user() instead of dereferencing user space pointers blindly.

    Code cleanups are made by Bjorn Helgaas, Nicholas Mazzuca and Toshi
    Kani.

    - Assorted power management updates

    The "runtime idle" helper routine is changed to take the return
    values of the callbacks executed by it into account and to call
    rpm_suspend() if they return 0, which allows us to reduce the
    overall code bloat a bit (by dropping some code that's not
    necessary any more after that modification).

    The runtime PM documentation is updated by Alan Stern (to reflect
    the "runtime idle" behavior change).

    New trace points for PM QoS are added by Sahara
    ().

    PM QoS documentation is updated by Lan Tianyu.

    Code cleanups are made and minor issues are addressed by Bernie
    Thompson, Bjorn Helgaas, Julius Werner, and Shuah Khan.

    - devfreq updates

    New driver for the Exynos5-bus device from Abhilash Kesavan.

    Minor cleanups, fixes and MAINTAINERS update from MyungJoo Ham,
    Abhilash Kesavan, Paul Bolle, Rajagopal Venkat, and Wei Yongjun.

    - OMAP power management updates

    Adaptive Voltage Scaling (AVS) SmartReflex voltage control driver
    updates from Andrii Tseglytskyi and Nishanth Menon."

    * tag 'pm+acpi-3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (162 commits)
    cpufreq: Fix cpufreq regression after suspend/resume
    ACPI / PM: Fix possible NULL pointer deref in acpi_pm_device_sleep_state()
    PM / Sleep: Warn about system time after resume with pm_trace
    cpufreq: don't leave stale policy pointer in cdbs->cur_policy
    acpi-cpufreq: Add new sysfs attribute freqdomain_cpus
    cpufreq: make sure frequency transitions are serialized
    ACPI: implement acpi_os_get_timer() according the spec
    ACPI / EC: Add HP Folio 13 to ec_dmi_table in order to skip DSDT scan
    ACPI: Add CMOS RTC Operation Region handler support
    ACPI / processor: Drop unused variable from processor_perflib.c
    cpufreq: tegra: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: s3c64xx: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: omap: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: imx6q: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: exynos: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: dbx500: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: davinci: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: arm-big-little: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: powernow-k8: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: pcc: call CPUFREQ_POSTCHANGE notfier in error cases
    ...

    Linus Torvalds
     

29 Jun, 2013

1 commit


22 May, 2013

1 commit

  • To fix a 5-year-old regression, reverse changes made by commit
    7ef3639 (PNP: don't fail device init if no DMA channel available).

    As an example to show the problem, my sound card provides a
    prioritized list of PnP "dependent sets" of requested resources:

    dependent set 0 (preferred) wants DMA 5.
    dependent set 1 (acceptable) will take DMA 5, 6, or 7.
    ...
    dependent set 4 (acceptable) doesn't request a high DMA.

    If DMA 5 is not available, pnp_assign_dma has to fail on set 0 so that
    pnp_auto_config_dev will move on to set 1 and get DMA 6 or 7.
    Instead, pnp_assign_dma adds the resource with flags |=
    IORESOURCE_DISABLED and returns success. pnp_auto_config_dev just
    sees success and therefore chooses set 0 with a disabled DMA and never
    tries the sets that would have resolved the conflict.

    Furthermore, this mode of "success" is unexpected and unhandled in
    sound/isa/sb and probably other drivers. sb assumes that the returned
    DMA is enabled and obliviously uses the invalid DMA number. Observed
    consequences were sb successfully grabbing a DMA that was expressly
    forbidden by the kernel parameter pnp_reserve_dma.

    The only upside to the original change would be as a kludge for
    devices that can operate in degraded mode without a DMA but that don't
    provide the corresponding non-preferred dependent set. The right
    workaround for those devices is to synthesize the missing set in
    quirks.c; otherwise, you're reinventing PnP fallback functionality at
    the driver level for that device and all others.

    Signed-off-by: David Flater
    Signed-off-by: Rafael J. Wysocki

    David Flater
     

03 May, 2013

1 commit

  • Pull powerpc update from Benjamin Herrenschmidt:
    "The main highlights this time around are:

    - A pile of addition POWER8 bits and nits, such as updated
    performance counter support (Michael Ellerman), new branch history
    buffer support (Anshuman Khandual), base support for the new PCI
    host bridge when not using the hypervisor (Gavin Shan) and other
    random related bits and fixes from various contributors.

    - Some rework of our page table format by Aneesh Kumar which fixes a
    thing or two and paves the way for THP support. THP itself will
    not make it this time around however.

    - More Freescale updates, including Altivec support on the new e6500
    cores, new PCI controller support, and a pile of new boards support
    and updates.

    - The usual batch of trivial cleanups & fixes"

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (156 commits)
    powerpc: Fix build error for book3e
    powerpc: Context switch the new EBB SPRs
    powerpc: Turn on the EBB H/FSCR bits
    powerpc: Replace CPU_FTR_BCTAR with CPU_FTR_ARCH_207S
    powerpc: Setup BHRB instructions facility in HFSCR for POWER8
    powerpc: Fix interrupt range check on debug exception
    powerpc: Update tlbie/tlbiel as per ISA doc
    powerpc: Print page size info during boot
    powerpc: print both base and actual page size on hash failure
    powerpc: Fix hpte_decode to use the correct decoding for page sizes
    powerpc: Decode the pte-lp-encoding bits correctly.
    powerpc: Use encode avpn where we need only avpn values
    powerpc: Reduce PTE table memory wastage
    powerpc: Move the pte free routines from common header
    powerpc: Reduce the PTE_INDEX_SIZE
    powerpc: Switch 16GB and 16MB explicit hugepages to a different page table format
    powerpc: New hugepage directory format
    powerpc: Don't truncate pgd_index wrongly
    powerpc: Don't hard code the size of pte page
    powerpc: Save DAR and DSISR in pt_regs on MCE
    ...

    Linus Torvalds
     

02 May, 2013

2 commits

  • Pull VFS updates from Al Viro,

    Misc cleanups all over the place, mainly wrt /proc interfaces (switch
    create_proc_entry to proc_create(), get rid of the deprecated
    create_proc_read_entry() in favor of using proc_create_data() and
    seq_file etc).

    7kloc removed.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits)
    don't bother with deferred freeing of fdtables
    proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h
    proc: Make the PROC_I() and PDE() macros internal to procfs
    proc: Supply a function to remove a proc entry by PDE
    take cgroup_open() and cpuset_open() to fs/proc/base.c
    ppc: Clean up scanlog
    ppc: Clean up rtas_flash driver somewhat
    hostap: proc: Use remove_proc_subtree()
    drm: proc: Use remove_proc_subtree()
    drm: proc: Use minor->index to label things, not PDE->name
    drm: Constify drm_proc_list[]
    zoran: Don't print proc_dir_entry data in debug
    reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show()
    proc: Supply an accessor for getting the data from a PDE's parent
    airo: Use remove_proc_subtree()
    rtl8192u: Don't need to save device proc dir PDE
    rtl8187se: Use a dir under /proc/net/r8180/
    proc: Add proc_mkdir_data()
    proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h}
    proc: Move PDE_NET() to fs/proc/proc_net.c
    ...

    Linus Torvalds
     
  • Supply accessor functions to set attributes in proc_dir_entry structs.

    The following are supplied: proc_set_size() and proc_set_user().

    Signed-off-by: David Howells
    Acked-by: Mauro Carvalho Chehab
    cc: linuxppc-dev@lists.ozlabs.org
    cc: linux-media@vger.kernel.org
    cc: netdev@vger.kernel.org
    cc: linux-wireless@vger.kernel.org
    cc: linux-pci@vger.kernel.org
    cc: netfilter-devel@vger.kernel.org
    cc: alsa-devel@alsa-project.org
    Signed-off-by: Al Viro

    David Howells
     

28 Apr, 2013

1 commit