31 Mar, 2012

15 commits

  • restore_common() was shared between restore and thaw callbacks. With
    thaw gone, we don't need restore_common() anymore.

    Signed-off-by: Amit Shah

    Amit Shah
     
  • The thaw operation was used by the balloon driver, but after the last
    commit there's no reason to have separate thaw and restore callbacks.

    Signed-off-by: Amit Shah

    Amit Shah
     
  • There's no reason stats update after restore can't work. If a host
    requested for stats, and before servicing the request, the guest entered
    S4, upon restore, the stats request can still be processed and sent off
    to the host.

    Signed-off-by: Amit Shah

    Amit Shah
     
  • Pull MTD changes from David Woodhouse:
    - Artem's cleanup of the MTD API continues apace.
    - Fixes and improvements for ST FSMC and SuperH FLCTL NAND, amongst
    others.
    - More work on DiskOnChip G3, new driver for DiskOnChip G4.
    - Clean up debug/warning printks in JFFS2 to use pr_.

    Fix up various trivial conflicts, largely due to changes in calling
    conventions for things like dmaengine_prep_slave_sg() (new inline
    wrapper to hide new parameter, clashing with rewrite of previously last
    parameter that used to be an 'append' flag, and is now a bitmap of
    'unsigned long flags').

    (Also some header file fallout - like so many merges this merge window -
    and silly conflicts with sparse fixes)

    * tag 'for-linus-3.4' of git://git.infradead.org/mtd-2.6: (120 commits)
    mtd: docg3 add protection against concurrency
    mtd: docg3 refactor cascade floors structure
    mtd: docg3 increase write/erase timeout
    mtd: docg3 fix inbound calculations
    mtd: nand: gpmi: fix function annotations
    mtd: phram: fix section mismatch for phram_setup
    mtd: unify initialization of erase_info->fail_addr
    mtd: support ONFI multi lun NAND
    mtd: sm_ftl: fix typo in major number.
    mtd: add device-tree support to spear_smi
    mtd: spear_smi: Remove default partition information from driver
    mtd: Add device-tree support to fsmc_nand
    mtd: fix section mismatch for doc_probe_device
    mtd: nand/fsmc: Remove sparse warnings and errors
    mtd: nand/fsmc: Add DMA support
    mtd: nand/fsmc: Access the NAND device word by word whenever possible
    mtd: nand/fsmc: Use dev_err to report error scenario
    mtd: nand/fsmc: Use devm routines
    mtd: nand/fsmc: Modify fsmc driver to accept nand timing parameters via platform
    mtd: fsmc_nand: add pm callbacks to support hibernation
    ...

    Linus Torvalds
     
  • Pull ACPI & Power Management changes from Len Brown:
    - ACPI 5.0 after-ripples, ACPICA/Linux divergence cleanup
    - cpuidle evolving, more ARM use
    - thermal sub-system evolving, ditto
    - assorted other PM bits

    Fix up conflicts in various cpuidle implementations due to ARM cpuidle
    cleanups (ARM at91 self-refresh and cpu idle code rewritten into
    "standby" in asm conflicting with the consolidation of cpuidle time
    keeping), trivial SH include file context conflict and RCU tracing fixes
    in generic code.

    * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (77 commits)
    ACPI throttling: fix endian bug in acpi_read_throttling_status()
    Disable MCP limit exceeded messages from Intel IPS driver
    ACPI video: Don't start video device until its associated input device has been allocated
    ACPI video: Harden video bus adding.
    ACPI: Add support for exposing BGRT data
    ACPI: export acpi_kobj
    ACPI: Fix logic for removing mappings in 'acpi_unmap'
    CPER failed to handle generic error records with multiple sections
    ACPI: Clean redundant codes in scan.c
    ACPI: Fix unprotected smp_processor_id() in acpi_processor_cst_has_changed()
    ACPI: consistently use should_use_kmap()
    PNPACPI: Fix device ref leaking in acpi_pnp_match
    ACPI: Fix use-after-free in acpi_map_lsapic
    ACPI: processor_driver: add missing kfree
    ACPI, APEI: Fix incorrect APEI register bit width check and usage
    Update documentation for parameter *notrigger* in einj.txt
    ACPI, APEI, EINJ, new parameter to control trigger action
    ACPI, APEI, EINJ, limit the range of einj_param
    ACPI, APEI, Fix ERST header length check
    cpuidle: power_usage should be declared signed integer
    ...

    Linus Torvalds
     
  • Pull battery updates from Anton Vorontsov:
    "Various small bugfixes and enhancements, plus two new drivers:
    - A quite complex ab8500 charger driver, submitted by Arun Murthy @
    ST-Ericsson;
    - Summit Microelectronics SMB347 Battery Charger, submitted by Bruce
    E Robertson and Alan Cox @ Intel.

    And that's all."

    * tag 'for-v3.4-rc1' of git://git.infradead.org/battery-2.6: (36 commits)
    max17042_battery: Clean up interrupt handling
    Revert "max8998_charger: Include linux/module.h just once"
    ab8500_fg: Fix some build warnings on x86_64
    max17042_battery: Fix CHARGE_FULL representation.
    max8998_charger: Include linux/module.h just once
    power_supply: Convert i2c drivers to module_i2c_driver
    lp8727_charger: Add MODULE_DEVICE_TABLE
    charger-manager: Simplify charger_get_property(), get rid of a warning
    charger-manager: Clean up for better readability
    da9052-battery: Convert to use module_platform_driver
    da9052-battery: Fix a memory leak when unload the module
    da9052-battery: Add missing platform_set_drvdata
    ab8500: Turn unneeded global symbols into local ones
    ab8500_fg: Fix copy-paste error
    ab8500_fg: Get rid of 'struct battery_type'
    ab8500_fg: Get rid of 'struct v_to_cap'
    ab8500_btemp: Get rid of 'enum adc_therm'
    ab8500_charger: Convert to the new USB OTG calls
    ab8500-btemp: AB8500 battery temperature driver
    ab8500-fg: A8500 fuel gauge driver
    ...

    Linus Torvalds
     
  • Usage of /etc/modprobe.conf file was deprecated by module-init-tools and
    is no longer parsed by new kmod tool. References to this file are
    replaced in Documentation, comments and Kconfig according to the
    context.

    There are also some references to the old /etc/modules.conf from 2.4
    kernels that are being removed.

    Signed-off-by: Lucas De Marchi
    Acked-by: Takashi Iwai
    Acked-by: Mauro Carvalho Chehab
    Signed-off-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Lucas De Marchi
     
  • Conflicts:
    drivers/acpi/acpica/hwsleep.c

    Text conflict between:

    2feec47d4c5f80b05f1650f5a24865718978eea4
    (ACPICA: ACPI 5: Support for new FADT SleepStatus, SleepControl registers)

    which removed #include "actables.h"

    and

    09f98a825a821f7a3f1b162f9ed023f37213a63b
    (x86, acpi, tboot: Have a ACPI os prepare sleep instead of calling tboot_sleep.)

    which removed #include

    The resolution is to remove them both.

    Signed-off-by: Len Brown

    Len Brown
     
  • Conflicts:
    drivers/acpi/sleep.c

    This was a text conflict between
    a2ef5c4fd44ce3922435139393b89f2cce47f576
    (ACPI: Move module parameter gts and bfs to sleep.c)

    which added #include

    and

    b24e5098853653554baf6ec975b9e855f3d6e5c0
    (ACPI, PCI: Move acpi_dev_run_wake() to ACPI core)

    which added #include

    The resolution was to take them both.

    Signed-off-by: Len Brown

    Len Brown
     
  • Conflicts:
    drivers/acpi/apei/apei-base.c

    This was a conflict between

    15afae604651d4e17652d2ffb56f5e36f991cfef
    (CPI, APEI: Fix incorrect APEI register bit width check and usage)

    and

    653f4b538f66d37db560e0f56af08117136d29b7
    (ACPICA: Expand OSL memory read/write interfaces to 64 bits)

    The former changed a parameter in the call to acpi_os_read_memory64()
    and the later replaced all calls to acpi_os_read_memory64()
    with calls to acpi_os_read_memory().

    Signed-off-by: Len Brown

    Len Brown
     
  • … 'red-hat-bz-727865', 'thermal', 'throttling', 'turbostat' and 'video' into release

    Signed-off-by: Len Brown <len.brown@intel.com>

    Len Brown
     
  • Using a u64 here creates an endian bug. We store a u32 number in the
    top byte which is a larger number than intended on big endian systems.
    There is no reason to use a 64 bit data type here, I guess it was just
    an oversight.

    I removed the initialization to zero as well. It's needed with a u64
    but with a u32, the variable gets initialized properly inside the call
    to acpi_os_read_port().

    Signed-off-by: Dan Carpenter
    Signed-off-by: Len Brown

    Dan Carpenter
     
  • On a system on the thermal limit these are quite noisy and flood the logs.
    Better would be a counter anyways. But given that we don't even have
    anything for normal throttling this doesn't seem to be urgent either.

    Reviewed-by: Jesse Barnes
    Signed-off-by: Andi Kleen
    Signed-off-by: Len Brown

    Andi Kleen
     
  • Quoth Dmitry Torokhov:
    In addition to bus notifier we do install device notifier explicitly
    so it might fire up early. The easiest fox would be to move
    acpi_video_bus_start_devices() after input_allocate_device() but
    before input_register_device() - unregistered input devices can handle
    input_event() calls just fine.

    May fix crashes reported in:
    https://bugzilla.kernel.org/show_bug.cgi?id=40672

    Signed-off-by: Igor Murzov
    Signed-off-by: Len Brown

    Igor Murzov
     
  • It is always better to check return values, so add some new checks and
    correct existing ones.

    v2: Be consistent and don't mix errors from -E* and AE_* namespaces.

    Signed-off-by: Igor Murzov
    Signed-off-by: Len Brown

    Igor Murzov
     

30 Mar, 2012

25 commits

  • ACPI 5.0 adds the BGRT, a table that contains a pointer to the firmware
    boot splash and associated metadata. This simple driver exposes it via
    /sys/firmware/acpi in order to allow bootsplash applications to draw their
    splash around the firmware image and reduce the number of jarring graphical
    transitions during boot.

    Signed-off-by: Matthew Garrett
    Signed-off-by: Len Brown

    Matthew Garrett
     
  • Drivers may wish to add entries to /sys/firmware/acpi, so export acpi_kobj
    in order to let them do that.

    Signed-off-by: Matthew Garrett
    Signed-off-by: Len Brown

    Matthew Garrett
     
  • Make sure the removal of mappings uses the same logic that put the
    mappings in place.

    Signed-off-by: Myron Stowe
    Signed-off-by: Len Brown

    Myron Stowe
     
  • The function apei_estatus_print() and apei_estatus_check() forget to move ahead
    the gdata pointer when dealing with multiple generic error data sections.

    Signed-off-by: Jiang Liu
    Signed-off-by: Len Brown

    Jiang Liu
     
  • Clean the redundant codes of apci_bus_get_power_flags().

    Signed-off-by: Alex He
    Signed-off-by: Len Brown

    Alex He
     
  • The acpi_processor_cst_has_changed() function is invoked from a
    CPU_ONLINE or CPU_DEAD function, which might well execute on CPU 0
    even though the CPU being hotplugged is some other CPU. In addition,
    acpi_processor_cst_has_changed() invokes smp_processor_id() without
    protection, resulting in splats when onlining CPUs.

    This commit therefore changes the smp_processor_id() to pr->id, as is
    used elsewhere in the code, for example, in acpi_processor_add().

    Signed-off-by: Paul E. McKenney
    Signed-off-by: Paul E. McKenney
    Reviewed-by: Srivatsa S. Bhat
    Tested-by: Yong Zhang
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Len Brown

    Paul E. McKenney
     
  • ... so that acpi_unmap()'s behavior gets in sync with acpi_map()'s.

    Signed-off-by: Jan Beulich
    Signed-off-by: Len Brown

    Jan Beulich
     
  • During testing pci root bus removal, found some root bus bridge is not freed.
    If booting with pnpacpi=off, those hostbridge could be freed without problem.
    It turns out that some devices reference are not released during acpi_pnp_match.
    that match should not hold one device ref during every calling.
    Add pu_device calling before returning.

    Signed-off-by: Yinghai Lu
    Cc: stable@vger.kernel.org
    Signed-off-by: Len Brown

    Yinghai Lu
     
  • The function acpi_processor_add is stored in the ops.add field of a
    acpi_driver structure. This function is then called in
    acpi_bus_driver_init. On failure, this function clears the field
    device->driver_data, but does not free its contents. Thus the free has to
    be done by the add function. In acpi_processor_add, the corresponding
    value is pr. This value is currently freed on failure before storing it in
    device->driver_data, but not after. This free is added in the error
    handling code at the end of the function. The per_cpu variable
    processors is also cleared so that it does not refer to a dangling pointer.

    Signed-off-by: Julia Lawall
    Reviewed-by: Srivatsa S. Bhat
    Acked-by: Deepthi Dharwar
    Signed-off-by: Len Brown

    Julia Lawall
     
  • The current code incorrectly assumes that
    (1) the APEI register bit width is always 8, 16, 32, or 64 and
    (2) the APEI register bit width is always equal to the APEI
    register access width.

    ERST serialization instructions entries such as:

    [030h 0048 1] Action : 00 [Begin Write Operation]
    [031h 0049 1] Instruction : 03 [Write Register Value]
    [032h 0050 1] Flags (decoded below) : 01
    Preserve Register Bits : 1
    [033h 0051 1] Reserved : 00

    [034h 0052 12] Register Region : [Generic Address Structure]
    [034h 0052 1] Space ID : 00 [SystemMemory]
    [035h 0053 1] Bit Width : 03
    [036h 0054 1] Bit Offset : 00
    [037h 0055 1] Encoded Access Width : 03 [DWord Access:32]
    [038h 0056 8] Address : 000000007F2D7038

    [040h 0064 8] Value : 0000000000000001
    [048h 0072 8] Mask : 0000000000000007

    break this assumption by yielding:
    [Firmware Bug]: APEI: Invalid bit width in GAR [0x7f2d7038/3/0]

    I have found no ACPI specification requirements corresponding
    with the above assumptions. There is even a good example in
    the Serialization Instruction Entries section (ACPI 4.0 section
    17.4,1.2, ACPI 4.0a section 2.5.1.2, ACPI 5.0 section 18.5.1.2)
    that mentions a serialization instruction with a bit range of
    [6:2] which is 5 bits wide, _not_ 8, 16, 32, or 64 bits wide.

    Compile and boot tested with 3.3.0-rc7 on a IBM HX5.

    Signed-off-by: Gary Hade
    Signed-off-by: Len Brown

    Gary Hade
     
  • Some APEI firmware implementation will access injected address
    specified in param1 to trigger the error when injecting memory
    error, which means if one SRAR error is injected, the crash
    always happens because it is executed in kernel context. This
    new parameter can disable trigger action and control is taken
    over by the user. In this way, an SRAR error can happen in user
    context instead of crashing the system. This function is highly
    depended on BIOS implementation so please ensure you know the
    BIOS trigger procedure before you enable this switch.

    v2:
    notrigger should be created together with param1/param2

    Tested-by: Tony Luck
    Signed-off-by: Chen Gong
    Signed-off-by: Len Brown

    Chen Gong
     
  • On the platforms with ACPI4.x support, parameter extension
    is not always doable, which means only parameter extension
    is enabled, einj_param can take effect.

    v2->v1: stopping early in einj_get_parameter_address for einj_param

    Signed-off-by: Chen Gong
    Acked-by: Tony Luck
    Signed-off-by: Len Brown

    Chen Gong
     
  • This fixes a trivial copy & paste error in ERST header length check.
    It's just for future safety because sizeof(struct acpi_table_einj)
    equals to sizeof(struct acpi_table_erst) with current ACPI5.0
    specification. It applies to v3.3-rc6.

    Signed-off-by: Jiang Liu
    Acked-by: Huang Ying
    Signed-off-by: Len Brown

    Jiang Liu
     
  • power_usage is always assigned a negative value and should be declared
    a signed integer

    Signed-off-by: Boris Ostrovsky
    Signed-off-by: Len Brown

    Boris Ostrovsky
     
  • Currently when a CPU is off-lined it enters either MWAIT-based idle or,
    if MWAIT is not desired or supported, HLT-based idle (which places the
    processor in C1 state). This patch allows processors without MWAIT
    support to stay in states deeper than C1.

    Signed-off-by: Boris Ostrovsky
    Signed-off-by: Len Brown

    Boris Ostrovsky
     
  • Pull SuperH updates from Paul Mundt.

    * tag 'sh-for-linus' of git://github.com/pmundt/linux-sh: (25 commits)
    sh: Support I/O space swapping where needed.
    sh: use set_current_blocked() and block_sigmask()
    sh: no need to reset handler if SA_ONESHOT
    sh: intc: Fix up section mismatch for intc_ack_data
    sh: select ARCH_DISCARD_MEMBLOCK.
    sh: Consolidate duplicate _32/_64 unistd definitions.
    sh: ecovec: switch SDHI controllers to card polling
    sh: Avoid exporting unimplemented syscalls.
    sh: add platform_device for RSPI in setup-sh7757
    SH: pci-sh7780: enable big-endian operation.
    serial: sh-sci: fix a race of DMA submit_tx on transfer
    sh: dma: Collect up CHCR of SH7763, SH7764, SH7780 and SH7785
    sh: dma: Collect up CHCR of SH7723 and SH7730
    sh/next: Fix build fail by asm/system.h in asm/bitops.h
    arch/sh/drivers/dma/{dma-g2,dmabrg}.c: ensure arguments to request_irq and free_irq are compatible
    sh: cpufreq: Wire up scaling_available_freqs support.
    sh: cpufreq: notify about rate rounding fallback.
    sh: cpufreq: Support CPU clock frequency table.
    sh: cpufreq: struct device lookup from CPU topology.
    sh: cpufreq: percpu struct clk accounting.
    ...

    Linus Torvalds
     
  • acpi_processor_install_hotplug_notify() registers processor objects to
    receive ACPI CPU hotplug event notifications. This patch additionally
    registers processor device objects (ACPI0007) to receive the notifications
    as well.

    Signed-off-by: Toshi Kani
    Reviewed-by: Bjorn Helgaas
    Signed-off-by: Len Brown

    Toshi Kani
     
  • Print physical address info in a style consistent with the %pR style used
    elsewhere in the kernel.

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

    Bjorn Helgaas
     
  • An HP laptop (Pavilion G4-1016tx) has the following code in _TMP:

    Store (\_SB.PCI0.LPCB.EC0.RTMP, Local0)
    If (LGreaterEqual (Local0, S4TP))
    {
    Store (One, HTS4)
    }

    S4TP is initialised at 0 and not programmed further until either _HOT or
    _CRT is called. If we evaluate _TMP before the trip points then HTS4 will
    always be set, causing the firmware to generate a message on boot
    complaining that the system shut down because of overheating. The simplest
    solution is just to reverse the checking of trip points and _TMP in thermal
    init.

    Signed-off-by: Matthew Garrett
    Signed-off-by: Len Brown

    Matthew Garrett
     
  • acpi_dev_run_wake() is a generic function which can be used by
    other subsystem too. Rename it to acpi_pm_device_run_wake, to be
    consistent with acpi_pm_device_sleep_wake.

    Then move it to ACPI core.

    Acked-by: Rafael J. Wysocki
    Signed-off-by: Lin Ming
    Signed-off-by: Len Brown

    Lin Ming
     
  • Pull 2nd round of input updates from Dmitry Torokhov:
    - update to Wacom driver to support wireless devices
    - update to Sentelci touchpad driver to support newer hardware
    - update to gpio-keys driver to support "interrupt-only" keys
    - fixups to earlier commits

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: wacom - check for allocation failure in probe()
    Input: tegra-kbc - allocate pdata before using it
    Input: amijoy - add missing platform check
    Input: wacom - wireless battery status
    Input: wacom - create inputs when wireless connect
    Input: wacom - wireless monitor framework
    Input: wacom - isolate input registration
    Input: sentelic - improve packet debugging information
    Input: sentelic - minor code cleanup
    Input: sentelic - enabling absolute coordinates output for newer hardware
    Input: sentelic - refactor code for upcoming new hardware support
    Input: gpio_keys - add support for interrupt only keys
    Input: gpio_keys - consolidate key destructor code
    Input: revert "gpio_keys - switch to using threaded IRQs"
    Input: gpio_keys - constify platform data
    Input: spear-keyboard - remove kbd_set_plat_data()

    Linus Torvalds
     
  • If the state_count is not initialized for the device use
    the driver's state count as the default. That will prevent
    to add it manually in the cpuidle driver initialization
    routine and will save us from duplicate line of code.

    Signed-off-by: Daniel Lezcano
    Signed-off-by: Len Brown

    Daniel Lezcano
     
  • Some C states of new CPU might be not good. One reason is BIOS might
    configure them incorrectly. To help developers root cause it quickly, the
    patch adds a new sysfs entry, so developers could disable specific C state
    manually.

    In addition, C state might have much impact on performance tuning, as it
    takes much time to enter/exit C states, which might delay interrupt
    processing. With the new debug option, developers could check if a deep C
    state could impact performance and how much impact it could cause.

    Also add this option in Documentation/cpuidle/sysfs.txt.

    [akpm@linux-foundation.org: check kstrtol return value]
    Signed-off-by: ShuoX Liu
    Reviewed-by: Yanmin Zhang
    Reviewed-and-Tested-by: Deepthi Dharwar
    Signed-off-by: Andrew Morton
    Signed-off-by: Len Brown

    ShuoX Liu
     
  • Devices may share same list of power resources in _PR0, for example

    Device(Dev0)
    {
    Name (_PR0, Package (0x01)
    {
    P0PR,
    P1PR
    })
    }

    Device(Dev1)
    {
    Name (_PR0, Package (0x01)
    {
    P0PR,
    P1PR
    }
    }

    Assume Dev0 and Dev1 were runtime suspended.
    Then Dev0 is resumed first and it goes into D0 state.
    But Dev1 is left in D0_Uninitialised state.

    This is wrong. In this case, Dev1 must be resumed too.

    In order to hand this case, each power resource maintains a list of
    devices which relies on it.

    When power resource is ON, it will check if the devices on its list
    can be resumed. The device can only be resumed when all the power
    resouces of its _PR0 are ON.

    Signed-off-by: Lin Ming
    Signed-off-by: Len Brown

    Lin Ming
     
  • If a device has _PR3, it means the device supports D3_COLD.
    Add the ability to validate and enter D3_COLD state in ACPI.

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

    Zhang Rui