02 Jun, 2007

4 commits


01 Jun, 2007

1 commit

  • Fix following section mismatch warnings in acpi

    WARNING: drivers/acpi/asus_acpi.o(.init.text+0xb7): Section mismatch: reference to .exit.text: (after 'init_module')
    WARNING: o-i386/drivers/acpi/toshiba_acpi.o(.init.text+0x13a): Section mismatch: reference to .exit.text: (after 'init_module')

    The exit function is used in the init function during an error codition.
    As __exit may be discarded during link-time / run-time this is no good.
    Do not mark the exit function __exit.

    Note: This warning is only seen by my local copy of modpost
    but the change will soon hit upstream.

    Signed-off-by: Sam Ravnborg
    Cc: Len Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sam Ravnborg
     

30 May, 2007

5 commits

  • Add __init to:
    acpi_initialize_subsystem() (and un-export it)
    acpi_os_initialize()

    Add __initdata to:
    acpi_osl_dmi_table[]

    Signed-off-by: Len Brown

    Len Brown
     
  • _OSI("Linux") is like _OS("Linux"), it is ill-defined and
    virtually no BIOS vendors test interaction with it.
    As a result, it can do more damage than good because
    it causes the BIOS to follow un-tested paths.

    Recently, several machines have turned up that erroneously
    test this string in a way which causes them to _not_ test other
    compatibility strings, including the ZI9 and Toshiba.
    So it appears that this bad code has made it into
    a BIOS vendor's reference BIOS.

    Linux has no choice but to stop advertising compatibility
    with _OSI string "Linux" - as there are an unbounded
    number of possible incompatibilities going forward.

    But some BIOSes have already shipped which do use it
    for things like conditionally re-enabling video on resume
    from S3. (Too bad they didn't do that unconditionally)

    Add special case code for _OSI(Linux)
    Squawk to dmesg if _OSI(Linux) is requested
    Add DMI list both to enable and disable _OSI(Linux)
    But for now, keep the default enabled via
    #define OSI_LINUX_ENABLED.

    http://bugzilla.kernel.org/show_bug.cgi?id=7787

    Signed-off-by: Len Brown

    Len Brown
     
  • The boot option "acpi_osi=" has always disabled Linux _OSI support,
    thus disabling all OS Interface strings which are advertised
    by Linux to the BIOS.

    Now...
    acpi_osi="string" adds the interface string, and
    acpi_osi="!string" invalidates the pre-defined interface string

    eg. acpi_osi="!Windows 2006"
    would disable Linux's claim of Vista compatibility.

    Signed-off-by: Len Brown

    Len Brown
     
  • For users with active thermal trip points, they need
    the fan's name, rather than its address, to understand
    where to look to observe and control fan state.

    Signed-off-by: Thomas Renninger
    Signed-off-by: Len Brown

    Thomas Renninger
     
  • HP and Hitachi machines have been implemented with SSDT's
    that use the "OEMx" signatures. But upon Load, ACPICA is rejecting
    these tables because they are not using the "SSDT" signature.

    ACPI Error (tbinstal-0134): Table has invalid signature [OEMx], must be SSDT...

    Signed-off-by: Len Brown

    Len Brown
     

17 May, 2007

1 commit

  • Strip __cpuinit[data] from Node PXM routines and supporting data
    structures. Also make pxm_to_node_map and node_to_pxm_map local to the
    numa acpi module.

    This fixes a bug triggered by the following conditions:
    - boot on a machine with a SLIT table defined
    - kernel is configured w/ CONFIG_HOTPLUG_CPU=n
    - cat /sys/devices/system/node/node*/distance
    This will cause an oops by calling into a freed memory section.

    In particular, on x86_64, __node_distance calls node_to_pxm().

    Signed-off-by: Aaron Durbin
    Cc: Len Brown
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Aaron Durbin
     

10 May, 2007

11 commits

  • Len Brown
     
  • The ACPI EC that is used in MSI laptops knows some non-standard
    commands for changing the screen brighntess and a few other things,
    which are used by the msi-laptop.c driver. Unfortunately for these
    commands no GPE events for IBF and OBF are triggered. Since nowadays
    the EC code uses the ec_intr=1 mode by default, this causes these
    operations to timeout, although they don't fail. In result, all
    operations that you can do with the msi-laptop.c driver take more or
    less 1s to complete, which is awfully slow.

    In one of the more recent kernels (2.6.20?) the EC subsystem has been
    revamped. With that change the EC timeout has been increased. before
    that increase the MSI EC accesses were slow -- but not *that* slow,
    hence I took notice of this limitation of the MSI EC hardware only very
    recently.

    The standard EC operations on the MSI EC as defined in the ACPI spec
    support GPE events properly.

    The following patch adds a new argument "force_poll" to the
    ec_transaction() function (and friends). If set to 1, the function
    will poll for IBF/OBF even if ec_intr=1 is enabled. If set to 0 the
    current behaviour is used. The msi-laptop driver is modified to make
    use of this new flag, so that OBF/IBF is polled for the special MSI EC
    transactions -- but only for them.

    Signed-off-by: Lennart Poettering
    Acked-by: Alexey Starikovskiy
    Signed-off-by: Len Brown

    Lennart Poettering
     
  • Len Brown
     
  • Len Brown
     
  • Len Brown
     
  • Signed-off-by: Len Brown

    Len Brown
     
  • HP nx6125/nx6325/... machines have a _GPE handler with an infinite
    loop sending Notify() events to different ACPI subsystems.

    Notify handler in ACPI driver is a C-routine, which may call ACPI
    interpreter again to get access to some ACPI variables
    (acpi_evaluate_xxx).
    On these HP machines such an evaluation changes state of some variable
    and lets the loop above break.

    In the current ACPI implementation Notify requests are being deferred
    to the same kacpid workqueue on which the above GPE handler with
    infinite loop is executing. Thus we have a deadlock -- loop will
    continue to spin, sending notify events, and at the same time
    preventing these notify events from being run on a workqueue. All
    notify events are deferred, thus we see increase in memory consumption
    noticed by author of the thread. Also as GPE handling is bloked,
    machines overheat. Eventually by external poll of the same
    acpi_evaluate, kacpid is released and all the queued notify events are
    free to run, thus 100% cpu utilization by kacpid for several seconds
    or more.

    To prevent all these horrors it's needed to not put notify events to
    kacpid workqueue by either executing them immediately or putting them
    on some other thread. It's dangerous to execute notify events in
    place, as it will put several ACPI interpreter stacks on top of each
    other (at least 4 in case of nx6125), thus causing kernel stack
    overflow.

    First attempt to create a new thread was done by Peter Wainwright
    He created a bunch of threads, which were stealing work from a kacpid
    workqueue.
    This patch appeared in 2.6.15 kernel shipped with Ubuntu 6.06 LTS.

    Second attempt was done by me, I created a new thread for each Notify
    event. This worked OK on HP nx machines, but broke Linus' Compaq
    n620c, by producing threads with a speed what they stopped the machine
    completely. Thus this patch was reverted from 18-rc2 as I remember.
    I re-made the patch to create second workqueue just for notify events,
    thus hopping it will not break Linus' machine. Patch was tested on the
    same HP nx machines in #5534 and #7122, but I did not received reply
    from Linus on a test patch sent to him.
    Patch went to 19-rc and was rejected with much fanfare again.
    There was 4th patch, which inserted schedule_timeout(1) into deferred
    execution of kacpid, if we had any notify requests pending, but Linus
    decided that it was too complex (involved either changes to workqueue
    to see if it's empty or atomic inc/dec).
    Now you see last variant which adds yield() to every GPE execution.

    http://bugzilla.kernel.org/show_bug.cgi?id=5534
    http://bugzilla.kernel.org/show_bug.cgi?id=8385

    Signed-off-by: Alexey Starikovskiy
    Signed-off-by: Len Brown

    Alexey Starikovskiy
     
  • This reverts commit c0d127b56937c3e72c2b1819161d2f6718eee877.

    These changes to AML locking were made to allow
    Notify handlers to be called on the stack
    and not deadlock. However, that scheme turns
    out to be flawed and was reverted by the previous commit,
    so this commit restores the locking to it previous design.

    Signed-off-by: Len Brown

    Len Brown
     
  • This reverts commit 5f7748cf91558a5026ded5be93c5bf6c1ac34edf.

    While that change fixed the HP
    http://bugzilla.kernel.org/show_bug.cgi?id=5534

    it broke the ACER:
    http://bugzilla.kernel.org/show_bug.cgi?id=8385
    which as AML that caused Linux go recursive
    and stack fault.

    So this commit by itself will restore the ACER
    and again break the HP, which we'll fix another way.

    Signed-off-by: Len Brown

    Len Brown
     
  • This reverts commit a8f4af6dc6600980885c594f52eecd60edd62013.
    Thus restoring ACPICA's new acpi_serialize code.

    This commit by itself may cause a regression, but
    it is reverted in this order so that subsequent
    reverts reverts under this one can be made
    without conflict.

    Signed-off-by: Len Brown

    Len Brown
     
  • [ With Johannes Berg ]

    Separate the hibernation (aka suspend to disk code) from the other suspend
    code. In particular:

    * Remove the definitions related to hibernation from include/linux/pm.h
    * Introduce struct hibernation_ops and a new hibernate() function to hibernate
    the system, defined in include/linux/suspend.h
    * Separate suspend code in kernel/power/main.c from hibernation-related code
    in kernel/power/disk.c and kernel/power/user.c (with the help of
    hibernation_ops)
    * Switch ACPI (the only user of pm_ops.pm_disk_mode) to hibernation_ops

    Signed-off-by: Rafael J. Wysocki
    Cc: Greg KH
    Cc: Pavel Machek
    Cc: Nigel Cunningham
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

09 May, 2007

6 commits

  • This is to fix unnecessary __meminit definition. These are exported for
    kernel modules.

    I compiled on ia64/x86-64 with memory hotplug on/off.

    Signed-off-by: Yasunori Goto
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yasunori Goto
     
  • This works around a bug seen in some RTC-related ACPI table entries, and
    tweaks related diagnostics to follow the ACPI convention.

    The bug prevents misleading boot-time messages: platforms affected by this
    bug wrongly report they can support alarms up to one year in the future,
    when in fact the longest alarm is just 24 hours. That will surprise anyone
    trying to use those extended alarms.

    Signed-off-by: David Brownell
    Cc: Alessandro Zummo
    Cc: Len Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Remove /proc/acpi/alarm file when the rtc-cmos "wakealarm" file is available.
    Instead, provide hooks that rtc-cmos will use.

    Signed-off-by: David Brownell
    Cc: Alessandro Zummo
    Cc: Len Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Teach PNPACPI how to hook up its devices to their ACPI nodes, so that
    pnpdev->dev.archdata points to the parallel acpi device node. Previously
    this only worked for PCI, leaving a notable hole.

    Export "acpi_bus_type" so this can work.

    Remove some extraneous whitespace.

    Signed-off-by: David Brownell
    Cc: Adam Belay
    Cc: Bjorn Helgaas
    Cc: Len Brown
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Remove includes of where it is not used/needed.
    Suggested by Al Viro.

    Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
    sparc64, and arm (all 59 defconfigs).

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • This is to fix many section mismatches of code related to memory hotplug.
    I checked compile with memory hotplug on/off on ia64 and x86-64 box.

    Signed-off-by: Yasunori Goto
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yasunori Goto
     

08 May, 2007

1 commit

  • Remove software_suspend() and all its users since
    pm_suspend(PM_SUSPEND_DISK) should be equivalent and there's no point in
    having two interfaces for the same thing.

    The patch also changes the valid_state function to return 0 (false) for
    PM_SUSPEND_DISK when SOFTWARE_SUSPEND is not configured instead of
    accepting it and having the whole thing fail later.

    Signed-off-by: Johannes Berg
    Acked-by: "Rafael J. Wysocki"
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Berg
     

06 May, 2007

1 commit

  • * 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6: (231 commits)
    [PATCH] i386: Don't delete cpu_devs data to identify different x86 types in late_initcall
    [PATCH] i386: type may be unused
    [PATCH] i386: Some additional chipset register values validation.
    [PATCH] i386: Add missing !X86_PAE dependincy to the 2G/2G split.
    [PATCH] x86-64: Don't exclude asm-offsets.c in Documentation/dontdiff
    [PATCH] i386: avoid redundant preempt_disable in __unlazy_fpu
    [PATCH] i386: white space fixes in i387.h
    [PATCH] i386: Drop noisy e820 debugging printks
    [PATCH] x86-64: Fix allnoconfig error in genapic_flat.c
    [PATCH] x86-64: Shut up warnings for vfat compat ioctls on other file systems
    [PATCH] x86-64: Share identical video.S between i386 and x86-64
    [PATCH] x86-64: Remove CONFIG_REORDER
    [PATCH] x86-64: Print type and size correctly for unknown compat ioctls
    [PATCH] i386: Remove copy_*_user BUG_ONs for (size < 0)
    [PATCH] i386: Little cleanups in smpboot.c
    [PATCH] x86-64: Don't enable NUMA for a single node in K8 NUMA scanning
    [PATCH] x86: Use RDTSCP for synchronous get_cycles if possible
    [PATCH] i386: Add X86_FEATURE_RDTSCP
    [PATCH] i386: Implement X86_FEATURE_SYNC_RDTSC on i386
    [PATCH] i386: Implement alternative_io for i386
    ...

    Fix up trivial conflict in include/linux/highmem.h manually.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

05 May, 2007

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq:
    [CPUFREQ] Report the number of processors in PowerNow-k8 correctly
    [CPUFREQ] do not declare undefined functions
    [CPUFREQ] cleanup kconfig options
    [CPUFREQ] Longhaul - Revert Longhaul ver. 2
    [CPUFREQ] Remove deprecated /proc/acpi/processor/performance write support
    [CPUFREQ] Fix limited cpufreq when booted on battery
    Fix preemption warnings in speedstep-centrino.c
    [CPUFREQ] Longhaul - Correct PCI code
    [CPUFREQ] p4-clockmod: switch to rdmsr_on_cpu/wrmsr_on_cpu

    Linus Torvalds
     

03 May, 2007

1 commit

  • Change mark_tsc_unstable() so it takes a string argument, which holds the
    reason the TSC was marked unstable.

    This is then displayed the first time mark_tsc_unstable is called.

    This should help us better debug why the TSC was marked unstable on certain
    systems and allow us to make sure we're not being overly paranoid when
    throwing out this troublesome clocksource.

    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen

    john stultz
     

01 May, 2007

3 commits

  • The scheme where the thermal driver displayed the
    cooling mode /proc/acpi/thermal_zone/*/cooling_mode
    was flawed in two ways.

    First, the success of _SCP doesn't actually mean
    that the BIOS moved any trip points.
    On many BIOS, _SCP is present, but does nothing.
    So displaying what _SCP executed actually
    was wrong more times than it was right.

    Second, examining the relative position of the
    trip points when the thermal_zone is added
    is insufficient -- as the BIOS reserves the right
    to change the trip points at run-time.

    The only reliable way for the user to determine if
    the thermal zone is in active, passive, or critical
    mode is to examine the relative position of the trip points.
    The user can do this without the kernel doing it
    for them by looking in /proc/acpi/thermal_zone/*/trip_points

    New contents for /proc/acpi/thermal_zone/*/cooling_mode:

    If _SCP available:
    "0 - Active; 1 - Passive\n"

    If _SCP unavailable:
    "\n"

    Signed-off-by: Len Brown

    Len Brown
     
  • /proc/acpi/thermal_zone/*/trip_points displays
    what the kernel reads from the BIOS via ACPI.

    If you echo a string of ':' deliminted numbers to this file
    then it will change what it displays.

    But it shouldn't, since the kernel has no way to communicate
    these changes to ACPI thermal zones. ACPI thermal zone
    trip points are read-only.

    The kernel does have the opportunity to ask the BIOS to change
    the trip points with _SCP - Set Cooling Policy.

    Request Active Cooling Mode:
    # echo 0 > /proc/acpi/thermal_zone/*/cooling_policy

    Request Passive Cooling Mode:
    # echo 1 > /proc/acpi/thermal_zone/*/cooling_policy

    However, in practice it is quite rare for the BIOS
    to support the optional _SCP, and it is even more rare
    for the BIOS to export an _SCP that actually changes
    the trip points.

    Signed-off-by: Len Brown

    Len Brown
     
  • Almost all users of pm_ops only support mem sleep, don't check in .valid and
    don't reject any others in .prepare so users can be confused if they check
    /sys/power/state, especially when new states are added (these would then
    result in s-t-r although they're supposed to be something different).

    This patch implements a generic pm_valid_only_mem function that is then
    exported for users and puts it to use in almost all existing pm_ops.

    Signed-off-by: Johannes Berg
    Cc: David Brownell
    Acked-by: Pavel Machek
    Cc: linux-pm@lists.linux-foundation.org
    Cc: Len Brown
    Acked-by: Russell King
    Cc: Greg KH
    Cc: "Rafael J. Wysocki"
    Cc: Paul Mundt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Berg
     

29 Apr, 2007

5 commits