13 Jan, 2012

1 commit


08 Nov, 2011

1 commit

  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
    cpuidle: Single/Global registration of idle states
    cpuidle: Split cpuidle_state structure and move per-cpu statistics fields
    cpuidle: Remove CPUIDLE_FLAG_IGNORE and dev->prepare()
    cpuidle: Move dev->last_residency update to driver enter routine; remove dev->last_state
    ACPI: Fix CONFIG_ACPI_DOCK=n compiler warning
    ACPI: Export FADT pm_profile integer value to userspace
    thermal: Prevent polling from happening during system suspend
    ACPI: Drop ACPI_NO_HARDWARE_INIT
    ACPI atomicio: Convert width in bits to bytes in __acpi_ioremap_fast()
    PNPACPI: Simplify disabled resource registration
    ACPI: Fix possible recursive locking in hwregs.c
    ACPI: use kstrdup()
    mrst pmu: update comment
    tools/power turbostat: less verbose debugging

    Linus Torvalds
     

07 Nov, 2011

4 commits

  • Len Brown
     
  • This patch makes the cpuidle_states structure global (single copy)
    instead of per-cpu. The statistics needed on per-cpu basis
    by the governor are kept per-cpu. This simplifies the cpuidle
    subsystem as state registration is done by single cpu only.
    Having single copy of cpuidle_states saves memory. Rare case
    of asymmetric C-states can be handled within the cpuidle driver
    and architectures such as POWER do not have asymmetric C-states.

    Having single/global registration of all the idle states,
    dynamic C-state transitions on x86 are handled by
    the boot cpu. Here, the boot cpu would disable all the devices,
    re-populate the states and later enable all the devices,
    irrespective of the cpu that would receive the notification first.

    Reference:
    https://lkml.org/lkml/2011/4/25/83

    Signed-off-by: Deepthi Dharwar
    Signed-off-by: Trinabh Gupta
    Tested-by: Jean Pihet
    Reviewed-by: Kevin Hilman
    Acked-by: Arjan van de Ven
    Acked-by: Kevin Hilman
    Signed-off-by: Len Brown

    Deepthi Dharwar
     
  • Recently the ACPI ops structs were constified but the inline version
    of register_hotplug_dock_device() was overlooked (see also commit
    9c8b04b, June 25 2011). Update the inline function
    register_hotplug_dock_device() that is enabled with
    CONFIG_ACPI_DOCK=n too. This patch fixes at least the following
    compiler warnings:

    drivers/ata/libata-acpi.c: In function .ata_acpi_associate.:
    drivers/ata/libata-acpi.c:266:11: warning: passing argument 2 of .register_hotplug_dock_device. discards qualifiers from pointer target type
    include/acpi/acpi_drivers.h:146:19: note: expected .struct acpi_dock_ops *. but argument is of type .const struct acpi_dock_ops *.
    drivers/ata/libata-acpi.c:275:11: warning: passing argument 2 of .register_hotplug_dock_device. discards qualifiers from pointer target type
    include/acpi/acpi_drivers.h:146:19: note: expected .struct acpi_dock_ops *. but argument is of type .const struct acpi_dock_ops *.

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

    Bart Van Assche
     
  • ACPI_NO_HARDWARE_INIT is only used by acpi_early_init() and
    acpi_bus_init() when calling acpi_enable_subsystem(), but
    acpi_enable_subsystem() doesn't check that flag, so it can be
    dropped.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Len Brown

    Rafael J. Wysocki
     

01 Nov, 2011

1 commit

  • This file had an include of module.h which was probably added
    in relation to this line:

    #define ACPI_EXPORT_SYMBOL(symbol) EXPORT_SYMBOL(symbol);

    However, we really expect symbol exporters to grab export.h
    themselves, and since this is only a define, we can remove
    the module.h include without aclinux.h itself causing any
    compile issues.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

15 Oct, 2011

1 commit

  • I originally submitted a patch to workaround this by pushing all Ejection
    Requests and Device Checks onto the kacpi_hotplug queue.

    http://marc.info/?l=linux-acpi&m=131678270930105&w=2

    The patch is still insufficient in that Bus Checks also need to be added.

    Rather than add all events, including non-PCI-hotplug events, to the
    hotplug queue, mjg suggested that a better approach would be to modify
    the acpiphp driver so only acpiphp events would be added to the
    kacpi_hotplug queue.

    It's a longer patch, but at least we maintain the benefit of having separate
    queues in ACPI. This, of course, is still only a workaround the problem.
    As Bjorn and mjg pointed out, we have to refactor a lot of this code to do
    the right thing but at this point it is a better to have this code working.

    The acpi core places all events on the kacpi_notify queue. When the acpiphp
    driver is loaded and a PCI card with a PCI-to-PCI bridge is removed the
    following call sequence occurs:

    cleanup_p2p_bridge()
    -> cleanup_bridge()
    -> acpi_remove_notify_handler()
    -> acpi_os_wait_events_complete()
    -> flush_workqueue(kacpi_notify_wq)

    which is the queue we are currently executing on and the process will hang.

    Move all hotplug acpiphp events onto the kacpi_hotplug workqueue. In
    handle_hotplug_event_bridge() and handle_hotplug_event_func() we can simply
    push the rest of the work onto the kacpi_hotplug queue and then avoid the
    deadlock.

    Signed-off-by: Prarit Bhargava
    Cc: mjg@redhat.com
    Cc: bhelgaas@google.com
    Cc: linux-acpi@vger.kernel.org
    Signed-off-by: Jesse Barnes

    Prarit Bhargava
     

04 Aug, 2011

1 commit

  • * 'apei-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
    ACPI, APEI, EINJ Param support is disabled by default
    APEI GHES: 32-bit buildfix
    ACPI: APEI build fix
    ACPI, APEI, GHES: Add hardware memory error recovery support
    HWPoison: add memory_failure_queue()
    ACPI, APEI, GHES, Error records content based throttle
    ACPI, APEI, GHES, printk support for recoverable error via NMI
    lib, Make gen_pool memory allocator lockless
    lib, Add lock-less NULL terminated single list
    Add Kconfig option ARCH_HAVE_NMI_SAFE_CMPXCHG
    ACPI, APEI, Add WHEA _OSC support
    ACPI, APEI, Add APEI bit support in generic _OSC call
    ACPI, APEI, GHES, Support disable GHES at boot time
    ACPI, APEI, GHES, Prevent GHES to be built as module
    ACPI, APEI, Use apei_exec_run_optional in APEI EINJ and ERST
    ACPI, APEI, Add apei_exec_run_optional
    ACPI, APEI, GHES, Do not ratelimit fatal error printk before panic
    ACPI, APEI, ERST, Fix erst-dbg long record reading issue
    ACPI, APEI, ERST, Prevent erst_dbg from loading if ERST is disabled

    Linus Torvalds
     

03 Aug, 2011

4 commits

  • Some trivial conflicts due to other various merges
    adding to the end of common lists sooner than this one.

    arch/ia64/Kconfig
    arch/powerpc/Kconfig
    arch/x86/Kconfig
    lib/Kconfig
    lib/Makefile

    Signed-off-by: Len Brown

    Len Brown
     
  • as GHES is optional...

    When # CONFIG_ACPI_APEI_GHES is not set:

    (.init.text+0x4c22): undefined reference to `ghes_disable'

    Reported-by: Randy Dunlap
    Acked-by: Randy Dunlap
    Signed-off-by: Len Brown

    Len Brown
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (28 commits)
    ACPI: delete stale reference in kernel-parameters.txt
    ACPI: add missing _OSI strings
    ACPI: remove NID_INVAL
    thermal: make THERMAL_HWMON implementation fully internal
    thermal: split hwmon lookup to a separate function
    thermal: hide CONFIG_THERMAL_HWMON
    ACPI print OSI(Linux) warning only once
    ACPI: DMI workaround for Asus A8N-SLI Premium and Asus A8N-SLI DELUX
    ACPI / Battery: propagate sysfs error in acpi_battery_add()
    ACPI / Battery: avoid acpi_battery_add() use-after-free
    ACPI: introduce "acpi_rsdp=" parameter for kdump
    ACPI: constify ops structs
    ACPI: fix CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS
    ACPI: fix 80 char overflow
    ACPI / Battery: Resolve the race condition in the sysfs_remove_battery()
    ACPI / Battery: Add the check before refresh sysfs in the battery_notify()
    ACPI / Battery: Add the hibernation process in the battery_notify()
    ACPI / Battery: Rename acpi_battery_quirks2 with acpi_battery_quirks
    ACPI / Battery: Change 16-bit signed negative battery current into correct value
    ACPI / Battery: Add the power unit macro
    ...

    Linus Torvalds
     
  • …pm', 'kexec-param' and 'misc' into release

    Conflicts:
    Documentation/kernel-parameters.txt

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

    Len Brown
     

27 Jul, 2011

2 commits

  • This allows us to move duplicated code in
    (atomic_inc_not_zero() for now) to

    Signed-off-by: Arun Sharma
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Cc: Eric Dumazet
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     
  • * 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (135 commits)
    drm/radeon/kms: fix DP training for DPEncoderService revision bigger than 1.1
    drm/radeon/kms: add missing vddci setting on NI+
    drm/radeon: Add a rmb() in IH processing
    drm/radeon: ATOM Endian fix for atombios_crtc_program_pll()
    drm/radeon: Fix the definition of RADEON_BUF_SWAP_32BIT
    drm/radeon: Do an MMIO read on interrupts when not uisng MSIs
    drm/radeon: Writeback endian fixes
    drm/radeon: Remove a bunch of useless _iomem casts
    drm/gem: add support for private objects
    DRM: clean up and document parsing of video= parameter
    DRM: Radeon: Fix section mismatch.
    drm: really make debug levels match in edid failure code
    drm/radeon/kms: fix i2c map for rv250/280
    drm/nouveau/gr: disable fifo access and idle before suspend ctx unload
    drm/nouveau: pass flag to engine fini() method on suspend
    drm/nouveau: replace nv04_graph_fifo_access() use with direct reg bashing
    drm/nv40/gr: rewrite/split context takedown functions
    drm/nouveau: detect disabled device in irq handler and return IRQ_NONE
    drm/nouveau: ignore connector type when deciding digital/analog on DVI-I
    drm/nouveau: Add a quirk for Gigabyte NX86T
    ...

    Linus Torvalds
     

17 Jul, 2011

1 commit

  • Structs battery_file, acpi_dock_ops, file_operations,
    thermal_cooling_device_ops, thermal_zone_device_ops, kernel_param_ops
    are not changed in runtime. It is safe to make them const.
    register_hotplug_dock_device() was altered to take const "ops" argument
    to respect acpi_dock_ops' const notion.

    Signed-off-by: Vasiliy Kulikov
    Acked-by: Jeff Garzik
    Signed-off-by: Len Brown

    Vasiliy Kulikov
     

14 Jul, 2011

8 commits

  • Len Brown
     
  • Commit 28c2103 added new state ACPI_STATE_D3_COLD, so the device power
    states array must be expanded by one also.

    v2: Use ACPI_D_STATE_COUNT instead of number 5 for the array size.

    Reported-by: Dan Carpenter
    Suggested-by: Oldřich Jedlička
    Signed-off-by: Lin Ming
    Signed-off-by: Len Brown

    Lin Ming
     
  • Version 20110623.

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

    Bob Moore
     
  • Runtime option can be used to disable return value repair if this
    is causing a problem on a particular machine.

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

    Bob Moore
     
  • Version 20110527.

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

    Bob Moore
     
  • Some machine may have broken firmware so that GHES and firmware first
    mode should be disabled. This patch adds support to that.

    Signed-off-by: Huang Ying
    Reviewed-by: Andi Kleen
    Reviewed-by: Matthew Garrett
    Signed-off-by: Len Brown

    Huang Ying
     
  • All ACPICA locks are allocated by the same function,
    acpi_os_create_lock(), with the help of a local variable called
    "lock". Thus, when lockdep is enabled, it uses "lock" as the
    name of all those locks and regards them as instances of the same
    lock, which causes it to report possible locking problems with them
    when there aren't any.

    To work around this problem, define acpi_os_create_lock() as a macro
    and make it pass its argument to spin_lock_init(), so that lockdep
    uses it as the name of the new lock. Define this macron in a
    Linux-specific file, to minimize the resulting modifications of
    the OS-independent ACPICA parts.

    This change is based on an earlier patch from Andrea Righi and it
    addresses a regression from 2.6.39 tracked as
    https://bugzilla.kernel.org/show_bug.cgi?id=38152

    Signed-off-by: Rafael J. Wysocki
    Reported-and-tested-by: Borislav Petkov
    Tested-by: Andrea Righi
    Reviewed-by: Florian Mickler
    Signed-off-by: Len Brown

    Rafael J. Wysocki
     
  • opregion-based platforms will send ACPI video event 0x80 for a range of
    notification types for legacy compatibility. This is interpreted as a
    display switch event, which may not be appropriate in the circumstances.
    When we receive such an event we should make sure that the platform is
    genuinely requesting a display switch before passing that event through
    to userspace.

    Signed-off-by: Matthew Garrett
    Tested-by: Adam Jackson
    Signed-off-by: Keith Packard

    Matthew Garrett
     

29 May, 2011

3 commits

  • …old', 'ec-asus' and 'thermal-fix' into release

    Len Brown
     
  • _SxW returns an Integer containing the lowest D-state supported in state
    Sx. If OSPM has not indicated that it supports _PR3, then the value “3”
    corresponds to D3. If it has indicated _PR3 support, the value “3”
    represents D3hot and the value “4” represents D3cold.

    Linux does set _OSC._PR3, so we should fix it to expect that _SxW can
    return 4.

    Signed-off-by: Lin Ming
    Acked-by: Jesse Barnes
    Signed-off-by: Len Brown

    Lin Ming
     
  • Usually, there are multiple processors defined in ACPI table, for
    example

    Scope (_PR)
    {
    Processor (CPU0, 0x00, 0x00000410, 0x06) {}
    Processor (CPU1, 0x01, 0x00000410, 0x06) {}
    Processor (CPU2, 0x02, 0x00000410, 0x06) {}
    Processor (CPU3, 0x03, 0x00000410, 0x06) {}
    }

    processor_physically_present(...) will be called to check whether those
    processors are physically present.

    Currently we have below codes in processor_physically_present,

    cpuid = acpi_get_cpuid(...);
    if ((cpuid == -1) && (num_possible_cpus() > 1))
    return false;
    return true;

    In UP kernel, acpi_get_cpuid(...) always return -1 and
    num_possible_cpus() always return 1, so
    processor_physically_present(...) always returns true for all passed in
    processor handles.

    This is wrong for UP processor or SMP processor running UP kernel.

    This patch removes the !SMP version of acpi_get_cpuid(), so both UP and
    SMP kernel use the same acpi_get_cpuid function.

    And for UP kernel, only processor 0 is valid.

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

    Tested-by: Anton Kochkov
    Tested-by: Ambroz Bizjak
    Signed-off-by: Lin Ming
    Signed-off-by: Len Brown

    Lin Ming
     

10 May, 2011

4 commits


31 Mar, 2011

1 commit


25 Mar, 2011

1 commit


23 Mar, 2011

4 commits


22 Mar, 2011

2 commits

  • Len Brown
     
  • APEI ERST firmware interface and implementation has no multiple users
    in mind. For example, if there is four records in storage with ID: 1,
    2, 3 and 4, if two ERST readers enumerate the records via
    GET_NEXT_RECORD_ID as follow,

    reader 1 reader 2
    1
    2
    3
    4
    -1
    -1

    where -1 signals there is no more record ID.

    Reader 1 has no chance to check record 2 and 4, while reader 2 has no
    chance to check record 1 and 3. And any other GET_NEXT_RECORD_ID will
    return -1, that is, other readers will has no chance to check any
    record even they are not cleared by anyone.

    This makes raw GET_NEXT_RECORD_ID not suitable for used by multiple
    users.

    To solve the issue, an in-memory ERST record ID cache is designed and
    implemented. When enumerating record ID, the ID returned by
    GET_NEXT_RECORD_ID is added into cache in addition to be returned to
    caller. So other readers can check the cache to get all record ID
    available.

    Signed-off-by: Huang Ying
    Reviewed-by: Andi Kleen
    Signed-off-by: Len Brown

    Huang Ying
     

19 Mar, 2011

1 commit