04 Mar, 2013

5 commits

  • After PCI and USB have stopped using the .find_bridge() callback in
    struct acpi_bus_type, the only remaining user of it is SATA, but SATA
    only pretends to be a user, because it points that callback to a stub
    always returning -ENODEV.

    For this reason, drop the SATA's dummy .find_bridge() callback and
    remove .find_bridge(), which is not used any more, from struct
    acpi_bus_type entirely.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Yinghai Lu
    Acked-by: Jeff Garzik

    Rafael J. Wysocki
     
  • USB uses the .find_bridge() callback from struct acpi_bus_type
    incorrectly, because as a result of the way it is used by USB every
    device in the system that doesn't have a bus type or parent is
    passed to usb_acpi_find_device() for inspection.

    What USB actually needs, though, is to call usb_acpi_find_device()
    for USB ports that don't have a bus type defined, but have
    usb_port_device_type as their device type, as well as for USB
    devices.

    To fix that replace the struct bus_type pointer in struct
    acpi_bus_type used for matching devices to specific subsystems
    with a .match() callback to be used for this purpose and update
    the users of struct acpi_bus_type, including USB, accordingly.
    Define the .match() callback routine for USB, usb_acpi_bus_match(),
    in such a way that it will cover both USB devices and USB ports
    and remove the now redundant .find_bridge() callback pointer from
    usb_acpi_bus.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Greg Kroah-Hartman
    Acked-by: Yinghai Lu
    Acked-by: Jeff Garzik

    Rafael J. Wysocki
     
  • pr->id is u32 which never < 0, so remove the redundant pr->id < 0
    check from acpi_processor_add().

    [rjw: Changelog]
    Signed-off-by: Chen Gang
    Signed-off-by: Rafael J. Wysocki

    Chen Gang
     
  • kfree() on a NULL pointer is a no-op, so remove a redundant NULL
    pointer check in map_mat_entry().

    [rjw: Changelog]
    Signed-off-by: Syam Sidhardhan
    Signed-off-by: Rafael J. Wysocki

    Syam Sidhardhan
     
  • Got this dmesg log on an Acer Aspire 725.

    [ 0.256351] ACPI: (supports S0ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S1_] (20130117/hwxface-568)
    [ 0.256373] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20130117/hwxface-568)
    [ 0.256391] S3 S4 S5)

    Avoid this interleaving error messages.

    Signed-off-by: Joe Perches
    Signed-off-by: Rafael J. Wysocki

    Joe Perches
     

03 Mar, 2013

1 commit

  • Tim found:

    WARNING: at arch/x86/kernel/smpboot.c:324 topology_sane.isra.2+0x6f/0x80()
    Hardware name: S2600CP
    sched: CPU #1's llc-sibling CPU #0 is not on the same node! [node: 1 != 0]. Ignoring dependency.
    smpboot: Booting Node 1, Processors #1
    Modules linked in:
    Pid: 0, comm: swapper/1 Not tainted 3.9.0-0-generic #1
    Call Trace:
    set_cpu_sibling_map+0x279/0x449
    start_secondary+0x11d/0x1e5

    Don Morris reproduced on a HP z620 workstation, and bisected it to
    commit e8d195525809 ("acpi, memory-hotplug: parse SRAT before memblock
    is ready")

    It turns out movable_map has some problems, and it breaks several things

    1. numa_init is called several times, NOT just for srat. so those
    nodes_clear(numa_nodes_parsed)
    memset(&numa_meminfo, 0, sizeof(numa_meminfo))
    can not be just removed. Need to consider sequence is: numaq, srat, amd, dummy.
    and make fall back path working.

    2. simply split acpi_numa_init to early_parse_srat.
    a. that early_parse_srat is NOT called for ia64, so you break ia64.
    b. for (i = 0; i < MAX_LOCAL_APIC; i++)
    set_apicid_to_node(i, NUMA_NO_NODE)
    still left in numa_init. So it will just clear result from early_parse_srat.
    it should be moved before that....
    c. it breaks ACPI_TABLE_OVERIDE...as the acpi table scan is moved
    early before override from INITRD is settled.

    3. that patch TITLE is total misleading, there is NO x86 in the title,
    but it changes critical x86 code. It caused x86 guys did not
    pay attention to find the problem early. Those patches really should
    be routed via tip/x86/mm.

    4. after that commit, following range can not use movable ram:
    a. real_mode code.... well..funny, legacy Node0 [0,1M) could be hot-removed?
    b. initrd... it will be freed after booting, so it could be on movable...
    c. crashkernel for kdump...: looks like we can not put kdump kernel above 4G
    anymore.
    d. init_mem_mapping: can not put page table high anymore.
    e. initmem_init: vmemmap can not be high local node anymore. That is
    not good.

    If node is hotplugable, the mem related range like page table and
    vmemmap could be on the that node without problem and should be on that
    node.

    We have workaround patch that could fix some problems, but some can not
    be fixed.

    So just remove that offending commit and related ones including:

    f7210e6c4ac7 ("mm/memblock.c: use CONFIG_HAVE_MEMBLOCK_NODE_MAP to
    protect movablecore_map in memblock_overlaps_region().")

    01a178a94e8e ("acpi, memory-hotplug: support getting hotplug info from
    SRAT")

    27168d38fa20 ("acpi, memory-hotplug: extend movablemem_map ranges to
    the end of node")

    e8d195525809 ("acpi, memory-hotplug: parse SRAT before memblock is
    ready")

    fb06bc8e5f42 ("page_alloc: bootmem limit with movablecore_map")

    42f47e27e761 ("page_alloc: make movablemem_map have higher priority")

    6981ec31146c ("page_alloc: introduce zone_movable_limit[] to keep
    movable limit for nodes")

    34b71f1e04fc ("page_alloc: add movable_memmap kernel parameter")

    4d59a75125d5 ("x86: get pg_data_t's memory from other node")

    Later we should have patches that will make sure kernel put page table
    and vmemmap on local node ram instead of push them down to node0. Also
    need to find way to put other kernel used ram to local node ram.

    Reported-by: Tim Gardner
    Reported-by: Don Morris
    Bisected-by: Don Morris
    Tested-by: Don Morris
    Signed-off-by: Yinghai Lu
    Cc: Tony Luck
    Cc: Thomas Renninger
    Cc: Tejun Heo
    Cc: Tang Chen
    Cc: Yasuaki Ishimatsu
    Signed-off-by: Linus Torvalds

    Yinghai Lu
     

01 Mar, 2013

1 commit

  • Pull EDAC fixes and ghes-edac from Mauro Carvalho Chehab:
    "For:

    - Some fixes at edac drivers (i7core_edac, sb_edac, i3200_edac);
    - error injection support for i5100, when EDAC debug is enabled;
    - fix edac when it is loaded builtin (early init for the subsystem);
    - a "Firmware First" EDAC driver, allowing ghes to report errors via
    EDAC (ghes-edac).

    With regards to ghes-edac, this fixes a longstanding BZ at Red Hat
    that happens with Nehalem and Sandy Bridge CPUs: when both GHES and
    i7core_edac or sb_edac are running, the error reports are
    unpredictable, as both BIOS and OS race to access the registers. With
    ghes-edac, the EDAC core will refuse to register any other concurrent
    memory error driver.

    This patchset moves the ghes struct definitions to a separate header
    file (include/acpi/ghes.h) and adds 3 hooks at apei/ghes.c to
    register/unregister and to report errors via ghes-edac. Those changes
    were acked by ghes driver maintainer (Huang)."

    * 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac: (30 commits)
    i5100_edac: convert to use simple_open()
    ghes_edac: fix to use list_for_each_entry_safe() when delete list items
    ghes_edac: Fix RAS tracing
    ghes_edac: Make it compliant with UEFI spec 2.3.1
    ghes_edac: Improve driver's printk messages
    ghes_edac: Don't credit the same memory dimm twice
    ghes_edac: do a better job of filling EDAC DIMM info
    ghes_edac: add support for reporting errors via EDAC
    ghes_edac: Register at EDAC core the BIOS report
    ghes: add the needed hooks for EDAC error report
    ghes: move structures/enum to a header file
    edac: add support for error type "Info"
    edac: add support for raw error reports
    edac: reduce stack pressure by using a pre-allocated buffer
    edac: lock module owner to avoid error report conflicts
    edac: remove proc_name from mci structure
    edac: add a new memory layer type
    edac: initialize the core earlier
    edac: better report error conditions in debug mode
    i5100_edac: Remove two checkpatch warnings
    ...

    Linus Torvalds
     

28 Feb, 2013

1 commit

  • Pull more x86 fixes from Peter Anvin:
    "Additional x86 fixes. Three of these patches are pure documentation,
    two are pretty trivial; the remaining one fixes boot problems on some
    non-BIOS machines."

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86: Make sure we can boot in the case the BDA contains pure garbage
    x86, efi: Mark disable_runtime as __initdata
    x86, doc: Fix incorrect comment about 64-bit code segment descriptors
    doc, kernel-parameters: Document 'console=hvc'
    doc, xen: Mention 'earlyprintk=xen' in the documentation.
    ACPI: Overriding ACPI tables via initrd only works with an initrd and on X86

    Linus Torvalds
     

26 Feb, 2013

5 commits

  • Pull ACPI and power management fixes from Rafael Wysocki:

    - Fixes for blackfin and microblaze build problems introduced by the
    removal of global pm_idle. From Lars-Peter Clausen.

    - OPP core build fix from Shawn Guo.

    - Error condition check fix for the new imx6q-cpufreq driver from Wei
    Yongjun.

    - Fix for an AER driver crash related to the lack of APEI
    initialization for acpi=off. From Rafael J Wysocki.

    - Fix for a USB breakage on Thinkpad T430 related to ACPI power
    resources and PCI wakeup from Rafael J. Wysocki.

    * tag 'pm+acpi-fixes-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    ACPI / PM: Take unusual configurations of power resources into account
    imx6q-cpufreq: fix return value check in imx6q_cpufreq_probe()
    PM / OPP: fix condition for empty of_init_opp_table()
    ACPI / APEI: Fix crash in apei_hest_parse() for acpi=off
    microblaze idle: Fix compile error
    blackfin idle: Fix compile error

    Linus Torvalds
     
  • Pull PCI changes from Bjorn Helgaas:
    "Host bridge hotplug
    - Major overhaul of ACPI host bridge add/start (Rafael Wysocki, Yinghai Lu)
    - Major overhaul of PCI/ACPI binding (Rafael Wysocki, Yinghai Lu)
    - Split out ACPI host bridge and ACPI PCI device hotplug (Yinghai Lu)
    - Stop caching _PRT and make independent of bus numbers (Yinghai Lu)

    PCI device hotplug
    - Clean up cpqphp dead code (Sasha Levin)
    - Disable ARI unless device and upstream bridge support it (Yijing Wang)
    - Initialize all hot-added devices (not functions 0-7) (Yijing Wang)

    Power management
    - Don't touch ASPM if disabled (Joe Lawrence)
    - Fix ASPM link state management (Myron Stowe)

    Miscellaneous
    - Fix PCI_EXP_FLAGS accessor (Alex Williamson)
    - Disable Bus Master in pci_device_shutdown (Konstantin Khlebnikov)
    - Document hotplug resource and MPS parameters (Yijing Wang)
    - Add accessor for PCIe capabilities (Myron Stowe)
    - Drop pciehp suspend/resume messages (Paul Bolle)
    - Make pci_slot built-in only (not a module) (Jiang Liu)
    - Remove unused PCI/ACPI bind ops (Jiang Liu)
    - Removed used pci_root_bus (Bjorn Helgaas)"

    * tag 'pci-v3.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (51 commits)
    PCI/ACPI: Don't cache _PRT, and don't associate them with bus numbers
    PCI: Fix PCI Express Capability accessors for PCI_EXP_FLAGS
    ACPI / PCI: Make pci_slot built-in only, not a module
    PCI/PM: Clear state_saved during suspend
    PCI: Use atomic_inc_return() rather than atomic_add_return()
    PCI: Catch attempts to disable already-disabled devices
    PCI: Disable Bus Master unconditionally in pci_device_shutdown()
    PCI: acpiphp: Remove dead code for PCI host bridge hotplug
    PCI: acpiphp: Create companion ACPI devices before creating PCI devices
    PCI: Remove unused "rc" in virtfn_add_bus()
    PCI: pciehp: Drop suspend/resume ENTRY messages
    PCI/ASPM: Don't touch ASPM if forcibly disabled
    PCI/ASPM: Deallocate upstream link state even if device is not PCIe
    PCI: Document MPS parameters pci=pcie_bus_safe, pci=pcie_bus_perf, etc
    PCI: Document hpiosize= and hpmemsize= resource reservation parameters
    PCI: Use PCI Express Capability accessor
    PCI: Introduce accessor to retrieve PCIe Capabilities Register
    PCI: Put pci_dev in device tree as early as possible
    PCI: Skip attaching driver in device_add()
    PCI: acpiphp: Keep driver loaded even if no slots found
    ...

    Linus Torvalds
     
  • Pull module update from Rusty Russell:
    "The sweeping change is to make add_taint() explicitly indicate whether
    to disable lockdep, but it's a mechanical change."

    * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    MODSIGN: Add option to not sign modules during modules_install
    MODSIGN: Add -s option to sign-file
    MODSIGN: Specify the hash algorithm on sign-file command line
    MODSIGN: Simplify Makefile with a Kconfig helper
    module: clean up load_module a little more.
    modpost: Ignore ARC specific non-alloc sections
    module: constify within_module_*
    taint: add explicit flag to show whether lock dep is still OK.
    module: printk message when module signature fail taints kernel.

    Linus Torvalds
     
  • In order to allow reporting errors via EDAC, add hooks for:

    1) register an EDAC driver;
    2) unregister an EDAC driver;
    3) report errors via EDAC.

    As the EDAC driver will need to access the ghes structure, adds it
    as one of the parameters for ghes_do_proc.

    Acked-by: Huang Ying
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Reflect this dependency in Kconfig, to prevent build failures.

    Shorten the config description as suggested by Borislav Petkov.

    Finding a suitable memory area to store the modified table(s) has been
    taken over from arch/x86/kernel/setup.c and makes use of max_low_pfn_mapped:
    memblock_find_in_range(0, max_low_pfn_mapped,...)
    This one is X86 specific. It may not be hard to extend this functionality
    for other ACPI aware architectures if there is need for.

    For now make this feature only available for X86 to avoid build failures on
    IA64, compare with:
    https://bugzilla.kernel.org/show_bug.cgi?id=54091

    Signed-off-by: Thomas Renninger
    Link: http://lkml.kernel.org/r/1361538742-67599-3-git-send-email-trenn@suse.de
    Signed-off-by: H. Peter Anvin

    Thomas Renninger
     

24 Feb, 2013

5 commits

  • On linux, the pages used by kernel could not be migrated. As a result,
    if a memory range is used by kernel, it cannot be hot-removed. So if we
    want to hot-remove memory, we should prevent kernel from using it.

    The way now used to prevent this is specify a memory range by
    movablemem_map boot option and set it as ZONE_MOVABLE.

    But when the system is booting, memblock will allocate memory, and
    reserve the memory for kernel. And before we parse SRAT, and know the
    node memory ranges, memblock is working. And it may allocate memory in
    ranges to be set as ZONE_MOVABLE. This memory can be used by kernel,
    and never be freed.

    So, let's parse SRAT before memblock is called first. And it is early
    enough.

    The first call of memblock_find_in_range_node() is in:

    setup_arch()
    |-->setup_real_mode()

    so, this patch add a function early_parse_srat() to parse SRAT, and call
    it before setup_real_mode() is called.

    NOTE:

    1) early_parse_srat() is called before numa_init(), and has initialized
    numa_meminfo. So DO NOT clear numa_nodes_parsed in numa_init() and DO
    NOT zero numa_meminfo in numa_init(), otherwise we will lose memory
    numa info.

    2) I don't know why using count of memory affinities parsed from SRAT
    as a return value in original acpi_numa_init(). So I add a static
    variable srat_mem_cnt to remember this count and use it as the return
    value of the new acpi_numa_init()

    [mhocko@suse.cz: parse SRAT before memblock is ready fix]
    Signed-off-by: Tang Chen
    Reviewed-by: Wen Congyang
    Cc: KOSAKI Motohiro
    Cc: Jiang Liu
    Cc: Jianguo Wu
    Cc: Kamezawa Hiroyuki
    Cc: Lai Jiangshan
    Cc: Wu Jianguo
    Cc: Yasuaki Ishimatsu
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Len Brown
    Cc: "Brown, Len"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tang Chen
     
  • The node will be offlined when all memory/cpu on the node is hotremoved.
    So we should try offline the node when hotremoving a cpu on the node.

    Signed-off-by: Wen Congyang
    Signed-off-by: Tang Chen
    Cc: Yasuaki Ishimatsu
    Cc: David Rientjes
    Cc: Jiang Liu
    Cc: Minchan Kim
    Cc: KOSAKI Motohiro
    Cc: Mel Gorman
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Peter Zijlstra
    Cc: Len Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wen Congyang
     
  • Introduce a new function try_offline_node() to remove sysfs file of node
    when all memory sections of this node are removed. If some memory
    sections of this node are not removed, this function does nothing.

    Signed-off-by: Wen Congyang
    Signed-off-by: Tang Chen
    Cc: KOSAKI Motohiro
    Cc: Jiang Liu
    Cc: Jianguo Wu
    Cc: Kamezawa Hiroyuki
    Cc: Lai Jiangshan
    Cc: Wu Jianguo
    Cc: Yasuaki Ishimatsu
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tang Chen
     
  • * acpi-pm:
    ACPI / PM: Take unusual configurations of power resources into account

    Rafael J. Wysocki
     
  • Commit d2e5f0c (ACPI / PCI: Rework the setup and cleanup of device
    wakeup) moved the initial disabling of system wakeup for PCI devices
    into a place where it can actually work and that exposed a hidden old
    issue with crap^Wunusual system designs where the same power
    resources are used for both wakeup power and device power control at
    run time.

    Namely, say there is one power resource such that the ACPI power
    state D0 of a PCI device depends on that power resource (i.e. the
    device is in D0 when that power resource is "on") and it is used
    as a wakeup power resource for the same device. Then, calling
    acpi_pci_sleep_wake(pci_dev, false) for the device in question will
    cause the reference counter of that power resource to drop to 0,
    which in turn will cause it to be turned off. As a result, the
    device will go into D3cold at that point, although it should have
    stayed in D0.

    As it turns out, that happens to USB controllers on some laptops
    and USB becomes unusable on those machines as a result, which is
    a major regression from v3.8.

    To fix this problem, (1) increment the reference counters of wakup
    power resources during their initialization if they are "on"
    initially, (2) prevent acpi_disable_wakeup_device_power() from
    decrementing the reference counters of wakeup power resources that
    were not enabled for wakeup power previously, and (3) prevent
    acpi_enable_wakeup_device_power() from incrementing the reference
    counters of wakeup power resources that already are enabled for
    wakeup power.

    In addition to that, if it is impossible to determine the initial
    states of wakeup power resources, avoid enabling wakeup for devices
    whose wakeup power depends on those power resources.

    Reported-by: Dave Jones
    Reported-by: Fabio Baltieri
    Tested-by: Fabio Baltieri
    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

23 Feb, 2013

2 commits

  • * acpi-cleanup:
    ACPI / APEI: Fix crash in apei_hest_parse() for acpi=off

    Rafael J. Wysocki
     
  • After commit 92ef2a2 (ACPI: Change the ordering of PCI root bridge
    driver registrarion), acpi_hest_init() is never called for acpi=off
    (acpi_disabled), so hest_disable is not set, but hest_tab is NULL,
    which causes apei_hest_parse() to crash when it is called from
    aer_acpi_firmware_first().

    Fix that by making apei_hest_parse() check if hest_tab is not NULL
    in addition to checking hest_disable. Also remove the now useless
    acpi_disabled check from apei_hest_parse().

    Reported-by: Thomas Gleixner
    Tested-by: Thomas Gleixner
    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

22 Feb, 2013

2 commits

  • Pull driver core patches from Greg Kroah-Hartman:
    "Here is the big driver core merge for 3.9-rc1

    There are two major series here, both of which touch lots of drivers
    all over the kernel, and will cause you some merge conflicts:

    - add a new function called devm_ioremap_resource() to properly be
    able to check return values.

    - remove CONFIG_EXPERIMENTAL

    Other than those patches, there's not much here, some minor fixes and
    updates"

    Fix up trivial conflicts

    * tag 'driver-core-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (221 commits)
    base: memory: fix soft/hard_offline_page permissions
    drivercore: Fix ordering between deferred_probe and exiting initcalls
    backlight: fix class_find_device() arguments
    TTY: mark tty_get_device call with the proper const values
    driver-core: constify data for class_find_device()
    firmware: Ignore abort check when no user-helper is used
    firmware: Reduce ifdef CONFIG_FW_LOADER_USER_HELPER
    firmware: Make user-mode helper optional
    firmware: Refactoring for splitting user-mode helper code
    Driver core: treat unregistered bus_types as having no devices
    watchdog: Convert to devm_ioremap_resource()
    thermal: Convert to devm_ioremap_resource()
    spi: Convert to devm_ioremap_resource()
    power: Convert to devm_ioremap_resource()
    mtd: Convert to devm_ioremap_resource()
    mmc: Convert to devm_ioremap_resource()
    mfd: Convert to devm_ioremap_resource()
    media: Convert to devm_ioremap_resource()
    iommu: Convert to devm_ioremap_resource()
    drm: Convert to devm_ioremap_resource()
    ...

    Linus Torvalds
     
  • As a ghes_edac driver will need to access ghes structures, in order
    to properly handle the errors, move those structures to a separate
    header file. No functional changes.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

21 Feb, 2013

1 commit

  • Pull ACPI and power management updates from Rafael Wysocki:

    - Rework of the ACPI namespace scanning code from Rafael J. Wysocki
    with contributions from Bjorn Helgaas, Jiang Liu, Mika Westerberg,
    Toshi Kani, and Yinghai Lu.

    - ACPI power resources handling and ACPI device PM update from Rafael
    J Wysocki.

    - ACPICA update to version 20130117 from Bob Moore and Lv Zheng with
    contributions from Aaron Lu, Chao Guan, Jesper Juhl, and Tim Gardner.

    - Support for Intel Lynxpoint LPSS from Mika Westerberg.

    - cpuidle update from Len Brown including Intel Haswell support, C1
    state for intel_idle, removal of global pm_idle.

    - cpuidle fixes and cleanups from Daniel Lezcano.

    - cpufreq fixes and cleanups from Viresh Kumar and Fabio Baltieri with
    contributions from Stratos Karafotis and Rickard Andersson.

    - Intel P-states driver for Sandy Bridge processors from Dirk
    Brandewie.

    - cpufreq driver for Marvell Kirkwood SoCs from Andrew Lunn.

    - cpufreq fixes related to ordering issues between acpi-cpufreq and
    powernow-k8 from Borislav Petkov and Matthew Garrett.

    - cpufreq support for Calxeda Highbank processors from Mark Langsdorf
    and Rob Herring.

    - cpufreq driver for the Freescale i.MX6Q SoC and cpufreq-cpu0 update
    from Shawn Guo.

    - cpufreq Exynos fixes and cleanups from Jonghwan Choi, Sachin Kamat,
    and Inderpal Singh.

    - Support for "lightweight suspend" from Zhang Rui.

    - Removal of the deprecated power trace API from Paul Gortmaker.

    - Assorted updates from Andreas Fleig, Colin Ian King, Davidlohr Bueso,
    Joseph Salisbury, Kees Cook, Li Fei, Nishanth Menon, ShuoX Liu,
    Srinivas Pandruvada, Tejun Heo, Thomas Renninger, and Yasuaki
    Ishimatsu.

    * tag 'pm+acpi-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (267 commits)
    PM idle: remove global declaration of pm_idle
    unicore32 idle: delete stray pm_idle comment
    openrisc idle: delete pm_idle
    mn10300 idle: delete pm_idle
    microblaze idle: delete pm_idle
    m32r idle: delete pm_idle, and other dead idle code
    ia64 idle: delete pm_idle
    cris idle: delete idle and pm_idle
    ARM64 idle: delete pm_idle
    ARM idle: delete pm_idle
    blackfin idle: delete pm_idle
    sparc idle: rename pm_idle to sparc_idle
    sh idle: rename global pm_idle to static sh_idle
    x86 idle: rename global pm_idle to static x86_idle
    APM idle: register apm_cpu_idle via cpuidle
    cpufreq / intel_pstate: Add kernel command line option disable intel_pstate.
    cpufreq / intel_pstate: Change to disallow module build
    tools/power turbostat: display SMI count by default
    intel_idle: export both C1 and C1E
    ACPI / hotplug: Fix concurrency issues and memory leaks
    ...

    Linus Torvalds
     

20 Feb, 2013

2 commits

  • Pull perf changes from Ingo Molnar:
    "There are lots of improvements, the biggest changes are:

    Main kernel side changes:

    - Improve uprobes performance by adding 'pre-filtering' support, by
    Oleg Nesterov.

    - Make some POWER7 events available in sysfs, equivalent to what was
    done on x86, from Sukadev Bhattiprolu.

    - tracing updates by Steve Rostedt - mostly misc fixes and smaller
    improvements.

    - Use perf/event tracing to report PCI Express advanced errors, by
    Tony Luck.

    - Enable northbridge performance counters on AMD family 15h, by Jacob
    Shin.

    - This tracing commit:

    tracing: Remove the extra 4 bytes of padding in events

    changes the ABI. All involved parties (PowerTop in particular)
    seem to agree that it's safe to do now with the introduction of
    libtraceevent, but the devil is in the details ...

    Main tooling side changes:

    - Add 'event group view', from Namyung Kim:

    To use it, 'perf record' should group events when recording. And
    then perf report parses the saved group relation from file header
    and prints them together if --group option is provided. You can
    use the 'perf evlist' command to see event group information:

    $ perf record -e '{ref-cycles,cycles}' noploop 1
    [ perf record: Woken up 2 times to write data ]
    [ perf record: Captured and wrote 0.385 MB perf.data (~16807 samples) ]

    $ perf evlist --group
    {ref-cycles,cycles}

    With this example, default perf report will show you each event
    separately.

    You can use --group option to enable event group view:

    $ perf report --group
    ...
    # group: {ref-cycles,cycles}
    # ========
    # Samples: 7K of event 'anon group { ref-cycles, cycles }'
    # Event count (approx.): 6876107743
    #
    # Overhead Command Shared Object Symbol
    # ................ ....... ................. ..........................
    99.84% 99.76% noploop noploop [.] main
    0.07% 0.00% noploop ld-2.15.so [.] strcmp
    0.03% 0.00% noploop [kernel.kallsyms] [k] timerqueue_del
    0.03% 0.03% noploop [kernel.kallsyms] [k] sched_clock_cpu
    0.02% 0.00% noploop [kernel.kallsyms] [k] account_user_time
    0.01% 0.00% noploop [kernel.kallsyms] [k] __alloc_pages_nodemask
    0.00% 0.00% noploop [kernel.kallsyms] [k] native_write_msr_safe
    0.00% 0.11% noploop [kernel.kallsyms] [k] _raw_spin_lock
    0.00% 0.06% noploop [kernel.kallsyms] [k] find_get_page
    0.00% 0.02% noploop [kernel.kallsyms] [k] rcu_check_callbacks
    0.00% 0.02% noploop [kernel.kallsyms] [k] __current_kernel_time

    As you can see the Overhead column now contains both of ref-cycles
    and cycles and header line shows group information also - 'anon
    group { ref-cycles, cycles }'. The output is sorted by period of
    group leader first.

    - Initial GTK+ annotate browser, from Namhyung Kim.

    - Add option for runtime switching perf data file in perf report,
    just press 's' and a menu with the valid files found in the current
    directory will be presented, from Feng Tang.

    - Add support to display whole group data for raw columns, from Jiri
    Olsa.

    - Add per processor socket count aggregation in perf stat, from
    Stephane Eranian.

    - Add interval printing in 'perf stat', from Stephane Eranian.

    - 'perf test' improvements

    - Add support for wildcards in tracepoint system name, from Jiri
    Olsa.

    - Add anonymous huge page recognition, from Joshua Zhu.

    - perf build-id cache now can show DSOs present in a perf.data file
    that are not in the cache, to integrate with build-id servers being
    put in place by organizations such as Fedora.

    - perf top now shares more of the evsel config/creation routines with
    'record', paving the way for further integration like 'top'
    snapshots, etc.

    - perf top now supports DWARF callchains.

    - Fix mmap limitations on 32-bit, fix from David Miller.

    - 'perf bench numa mem' NUMA performance measurement suite

    - ... and lots of fixes, performance improvements, cleanups and other
    improvements I failed to list - see the shortlog and git log for
    details."

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (270 commits)
    perf/x86/amd: Enable northbridge performance counters on AMD family 15h
    perf/hwbp: Fix cleanup in case of kzalloc failure
    perf tools: Fix build with bison 2.3 and older.
    perf tools: Limit unwind support to x86 archs
    perf annotate: Make it to be able to skip unannotatable symbols
    perf gtk/annotate: Fail early if it can't annotate
    perf gtk/annotate: Show source lines with gray color
    perf gtk/annotate: Support multiple event annotation
    perf ui/gtk: Implement basic GTK2 annotation browser
    perf annotate: Fix warning message on a missing vmlinux
    perf buildid-cache: Add --update option
    uprobes/perf: Avoid uprobe_apply() whenever possible
    uprobes/perf: Teach trace_uprobe/perf code to use UPROBE_HANDLER_REMOVE
    uprobes/perf: Teach trace_uprobe/perf code to pre-filter
    uprobes/perf: Teach trace_uprobe/perf code to track the active perf_event's
    uprobes: Introduce uprobe_apply()
    perf: Introduce hw_perf_event->tp_target and ->tp_list
    uprobes/perf: Always increment trace_uprobe->nhit
    uprobes/tracing: Kill uprobe_trace_consumer, embed uprobe_consumer into trace_uprobe
    uprobes/tracing: Introduce is_trace_uprobe_enabled()
    ...

    Linus Torvalds
     
  • * pci/yinghai-root-bus-hotplug:
    PCI/ACPI: Don't cache _PRT, and don't associate them with bus numbers

    Bjorn Helgaas
     

19 Feb, 2013

1 commit

  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (35 commits)
    PM idle: remove global declaration of pm_idle
    unicore32 idle: delete stray pm_idle comment
    openrisc idle: delete pm_idle
    mn10300 idle: delete pm_idle
    microblaze idle: delete pm_idle
    m32r idle: delete pm_idle, and other dead idle code
    ia64 idle: delete pm_idle
    cris idle: delete idle and pm_idle
    ARM64 idle: delete pm_idle
    ARM idle: delete pm_idle
    blackfin idle: delete pm_idle
    sparc idle: rename pm_idle to sparc_idle
    sh idle: rename global pm_idle to static sh_idle
    x86 idle: rename global pm_idle to static x86_idle
    APM idle: register apm_cpu_idle via cpuidle
    tools/power turbostat: display SMI count by default
    intel_idle: export both C1 and C1E
    cpuidle: remove vestage definition of cpuidle_state_usage.driver_data
    x86 idle: remove 32-bit-only "no-hlt" parameter, hlt_works_ok flag
    x86 idle: remove mwait_idle() and "idle=mwait" cmdline param
    ...

    Conflicts:
    arch/x86/kernel/process.c (with PM / tracing commit 43720bd)
    drivers/acpi/processor_idle.c (with ACPICA commit 4f84291)

    Rafael J. Wysocki
     

18 Feb, 2013

1 commit


17 Feb, 2013

1 commit

  • Previously, we cached _PRT (PCI routing table, ACPI 5.0 sec 6.2.12)
    contents and associated each _PRT entry with a PCI bus number. The bus
    number association means dependencies on PCI device enumeration and bus
    number assignment, as well as on the PCI/ACPI binding process.

    After 4f535093cf ("PCI: Put pci_dev in device tree as early as possible"),
    these dependencies caused the IRQ issues reported by Peter:

    pci 0000:00:1e.0: PCI bridge to [bus 09] (subtractive decode)
    pci 0000:00:1e.0: can't derive routing for PCI INT A
    snd_ctxfi 0000:09:02.0: PCI INT A: no GSI - using ISA IRQ 5
    irq 18: nobody cared (try booting with the "irqpoll" option)

    This patch removes _PRT caching. Instead, we evaluate _PRT as needed
    in the pci_enable_device() path. This also removes the dependency on
    PCI bus numbers: we can simply look at the _PRT associated with each
    bridge as we walk upstream toward the root.

    [bhelgaas: changelog]
    Reference: https://bugzilla.kernel.org/show_bug.cgi?id=53561
    Reported-and-tested-by: Peter Hurley
    Suggested-by: Bjorn Helgaas
    Signed-off-by: Yinghai Lu
    Signed-off-by: Bjorn Helgaas

    Yinghai Lu
     

16 Feb, 2013

2 commits


15 Feb, 2013

3 commits

  • * pm-assorted:
    suspend: enable freeze timeout configuration through sys
    ACPI: enable ACPI SCI during suspend
    PM: Introduce suspend state PM_SUSPEND_FREEZE
    PM / Runtime: Add new helper function: pm_runtime_active()
    PM / tracing: remove deprecated power trace API
    PM: don't use [delayed_]work_pending()
    PM / Domains: don't use [delayed_]work_pending()

    Rafael J. Wysocki
     
  • * acpi-assorted:
    ACPI: Add DMI entry for Sony VGN-FW41E_H
    ACPI: fix obsolete comment in custom_method.c
    ACPI / thermal: Use mode to enable/disable kernel thermal processing
    ACPI thermal: remove unnecessary newline from exception message
    ACPI sysfs: remove unnecessary newline from exception
    ACPI video: remove unnecessary newline from error messages
    ACPI: SRAT: report non-volatile memory in debug
    ACPI: Rework acpi_get_child() to be more efficient

    Rafael J. Wysocki
     
  • * acpi-cleanup: (21 commits)
    ACPI / hotplug: Fix concurrency issues and memory leaks
    ACPI: Remove the use of CONFIG_ACPI_CONTAINER_MODULE
    ACPI / scan: Full transition to D3cold in acpi_device_unregister()
    ACPI / scan: Make acpi_bus_hot_remove_device() acquire the scan lock
    ACPI: Drop the container.h header file
    ACPI / Documentation: refer to correct file for acpi_platform_device_ids[] table
    ACPI / scan: Make container driver use struct acpi_scan_handler
    ACPI / scan: Remove useless #ifndef from acpi_eject_store()
    ACPI: Unbind ACPI drv when probe failed
    ACPI: sysfs eject support for ACPI scan handlers
    ACPI / scan: Follow priorities of IDs when matching scan handlers
    ACPI / PCI: pci_slot: replace printk(KERN_xxx) with pr_xxx()
    ACPI / dock: Fix acpi_bus_get_device() check in drivers/acpi/dock.c
    ACPI / scan: Clean up acpi_bus_get_parent()
    ACPI / platform: Use struct acpi_scan_handler for creating devices
    ACPI / PCI: Make PCI IRQ link driver use struct acpi_scan_handler
    ACPI / PCI: Make PCI root driver use struct acpi_scan_handler
    ACPI / scan: Introduce struct acpi_scan_handler
    ACPI / scan: Make scanning of fixed devices follow the general scheme
    ACPI: Drop device start operation that is not used
    ...

    Rafael J. Wysocki
     

13 Feb, 2013

7 commits

  • This changeset is aimed at fixing a few different but related
    problems in the ACPI hotplug infrastructure.

    First of all, since notify handlers may be run in parallel with
    acpi_bus_scan(), acpi_bus_trim() and acpi_bus_hot_remove_device()
    and some of them are installed for ACPI handles that have no struct
    acpi_device objects attached (i.e. before those objects are created),
    those notify handlers have to take acpi_scan_lock to prevent races
    from taking place (e.g. a struct acpi_device is found to be present
    for the given ACPI handle, but right after that it is removed by
    acpi_bus_trim() running in parallel to the given notify handler).
    Moreover, since some of them call acpi_bus_scan() and
    acpi_bus_trim(), this leads to the conclusion that acpi_scan_lock
    should be acquired by the callers of these two funtions rather by
    these functions themselves.

    For these reasons, make all notify handlers that can handle device
    addition and eject events take acpi_scan_lock and remove the
    acpi_scan_lock locking from acpi_bus_scan() and acpi_bus_trim().
    Accordingly, update all of their users to make sure that they
    are always called under acpi_scan_lock.

    Furthermore, since eject operations are carried out asynchronously
    with respect to the notify events that trigger them, with the help
    of acpi_bus_hot_remove_device(), even if notify handlers take the
    ACPI scan lock, it still is possible that, for example,
    acpi_bus_trim() will run between acpi_bus_hot_remove_device() and
    the notify handler that scheduled its execution and that
    acpi_bus_trim() will remove the device node passed to
    acpi_bus_hot_remove_device() for ejection. In that case, the struct
    acpi_device object obtained by acpi_bus_hot_remove_device() will be
    invalid and not-so-funny things will ensue. To protect agaist that,
    make the users of acpi_bus_hot_remove_device() run get_device() on
    ACPI device node objects that are about to be passed to it and make
    acpi_bus_hot_remove_device() run put_device() on them and check if
    their ACPI handles are not NULL (make acpi_device_unregister() clear
    the device nodes' ACPI handles for that check to work).

    Finally, observe that acpi_os_hotplug_execute() actually can fail,
    in which case its caller ought to free memory allocated for the
    context object to prevent leaks from happening. It also needs to
    run put_device() on the device node that it ran get_device() on
    previously in that case. Modify the code accordingly.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Yinghai Lu

    Rafael J. Wysocki
     
  • In order to drop reference counts of all power resources used by an
    ACPI device node being removed, acpi_device_unregister() calls
    acpi_power_transition(device, ACPI_STATE_D3_COLD), which effectively
    transitions the device node into D3cold if it uses any power
    resources. However, for some device nodes it may not be appropriate
    to remove power from them entirely before putting them into D3hot
    before. On the other hand, executing _PS3 for devices that don't
    use power resources before removing them shouldn't really hurt.
    In fact, that is done by acpi_bus_hot_remove_device(), but this is
    not the right place to do it, because the bus trimming may have
    caused power to be removed from the device node in question already
    before.

    For these reasons, make acpi_device_unregister() carry out full
    power-off transition for all device nodes supporting that and remove
    the direct evaluation of _PS3 from acpi_bus_hot_remove_device().

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • The ACPI scan lock has been introduced to prevent acpi_bus_scan()
    and acpi_bus_trim() from running in parallel with each other for
    overlapping ACPI namespace scopes. However, it is not sufficient
    to do that, because if acpi_bus_scan() is run (for an overlapping
    namespace scope) right after the acpi_bus_trim() in
    acpi_bus_hot_remove_device(), the subsequent eject will remove
    devices without removing the corresponding struct acpi_device
    objects (and possibly companion "physical" device objects).
    Therefore acpi_bus_hot_remove_device() has to acquire the scan
    lock before carrying out the bus trimming and hold it through
    the evaluation of _EJ0, so make that happen.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Toshi Kani

    Rafael J. Wysocki
     
  • The include/acpi/container.h only contains a definition of a
    structure that is not used any more, so drop it entirely.

    Similar change was proposed earlier by Toshi Kani.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Toshi Kani

    Rafael J. Wysocki
     
  • Make the ACPI container driver use struct acpi_scan_handler for
    representing the object used to initialize ACPI containers and remove
    the ACPI driver structure used previously and the data structures
    created by it, since in fact they were not used for any purpose.

    This simplifies the code and reduces the kernel's memory footprint by
    avoiding the registration of a struct device_driver object with the
    driver core and creation of its sysfs directory which is unnecessary.

    In addition to that, make the namespace walk callback used for
    installing the notify handlers for ACPI containers more
    straightforward.

    This change includes fixes from Toshi Kani.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Yinghai Lu
    Acked-by: Yasuaki Ishimatsu
    Tested-by: Yasuaki Ishimatsu
    Reviewed-by: Toshi Kani
    Tested-by: Toshi Kani

    Rafael J. Wysocki
     
  • Since the FORCE_EJECT symbol is never defined, the
    #ifndef FORCE_EJECT in acpi_eject_store() is always true, so drop it.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Yasuaki Ishimatsu
    Tested-by: Yasuaki Ishimatsu
    Reviewed-by: Toshi Kani
    Tested-by: Toshi Kani

    Rafael J. Wysocki
     
  • When acpi_device_install_notify_handler() failed in acpi_device_probe(),
    it calls acpi_drv->ops.remove() and fails the probe. However, the ACPI
    driver is left bound to the acpi_device. Fix it by clearing the driver
    and driver_data fields.

    Signed-off-by: Toshi Kani
    Signed-off-by: Rafael J. Wysocki

    Toshi Kani