04 Jan, 2009

1 commit


25 Dec, 2008

1 commit


23 Dec, 2008

2 commits


19 Dec, 2008

1 commit

  • acpi_early_init() was changed to over-write the cmdline param,
    making it really inconvenient to set debug flags at boot-time.

    Also,
    This sets the default level to "info", which is what all the ACPI
    drivers use. So to enable messages from drivers, you only have to
    supply the "layer" (a.k.a. "component"). For non-"info" ACPI core
    and ACPI interpreter messages, you have to supply both level and
    layer masks, as before.

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

    Bjorn Helgaas
     

17 Dec, 2008

1 commit

  • Impact: reward non-stop TSCs with good TSC-based clocksources, etc.

    Add support for CPUID_0x80000007_Bit8 on Intel CPUs as well. This bit means
    that the TSC is invariant with C/P/T states and always runs at constant
    frequency.

    With Intel CPUs, we have 3 classes
    * CPUs where TSC runs at constant rate and does not stop n C-states
    * CPUs where TSC runs at constant rate, but will stop in deep C-states
    * CPUs where TSC rate will vary based on P/T-states and TSC will stop in deep
    C-states.

    To cover these 3, one feature bit (CONSTANT_TSC) is not enough. So, add a
    second bit (NONSTOP_TSC). CONSTANT_TSC indicates that the TSC runs at
    constant frequency irrespective of P/T-states, and NONSTOP_TSC indicates
    that TSC does not stop in deep C-states.

    CPUID_0x8000000_Bit8 indicates both these feature bit can be set.
    We still have CONSTANT_TSC _set_ and NONSTOP_TSC _not_set_ on some older Intel
    CPUs, based on model checks. We can use TSC on such CPUs for time, as long as
    those CPUs do not support/enter deep C-states.

    Signed-off-by: Venkatesh Pallipadi
    Signed-off-by: Ingo Molnar

    Venki Pallipadi
     

16 Dec, 2008

1 commit

  • Part of the rfkill initialization was done whenever BT was on or not. The
    following patch checks for BT presence before registering the rfkill to
    the input layer. Some minor cleanups (> 80 char lines) were also added in
    the process.

    On Tue, Oct 28, 2008 at 10:10:37PM +0300, Andrey Borzenkov wrote:
    [...]
    > [ 66.633036] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.19
    > [ 66.633054] toshiba_acpi: HCI method: \_SB_.VALD.GHCI
    > [ 66.637764] input: Toshiba RFKill Switch as /devices/virtual/input/input3
    [...]
    > [ 113.920753] ------------[ cut here ]------------
    > [ 113.920828] kernel BUG at /home/bor/src/linux-git/net/rfkill/rfkill.c:347!
    > [ 113.920845] invalid opcode: 0000 [#1]
    > [ 113.920877] last sysfs file: /sys/devices/pci0000:00/0000:00:04.0/host0/target0:0:0/0:0:0:0/block/sda/size
    > [ 113.920900] Dumping ftrace buffer:
    > [ 113.920919] (ftrace buffer empty)
    > [ 113.920933] Modules linked in: af_packet irnet ppp_generic slhc ircomm_tty ircomm binfmt_misc loop dm_mirror dm_region_hash dm_log dm_round_robin dm_multipath dm_mod alim15x3 ide_core nvram toshiba cryptomgr aead crypto_blkcipher michael_mic crypto_algapi orinoco_cs orinoco hermes_dld hermes pcmcia firmware_class snd_ali5451 snd_ac97_codec ac97_bus snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device smsc_ircc2 snd_pcm_oss snd_pcm rtc_cmos irda snd_timer snd_mixer_oss rtc_core snd crc_ccitt yenta_socket rtc_lib rsrc_nonstatic i2c_ali1535 pcmcia_core pcspkr psmouse soundcore i2c_core evdev sr_mod snd_page_alloc alim1535_wdt cdrom fan sg video output toshiba_acpi rfkill thermal backlight ali_agp processor ac button input_polldev battery agpgart ohci_hcd usbcore reiserfs pata_ali libata sd_mod scsi_mod [last unloaded: scsi_wait_scan]
    > [ 113.921765]
    > [ 113.921785] Pid: 3272, comm: ipolldevd Not tainted (2.6.28-rc2-1avb #3) PORTEGE 4000
    > [ 113.921801] EIP: 0060:[] EFLAGS: 00010246 CPU: 0
    > [ 113.921854] EIP is at rfkill_force_state+0x53/0x90 [rfkill]
    > [ 113.921870] EAX: 00000000 EBX: 00000000 ECX: 00000003 EDX: 00000000
    > [ 113.921885] ESI: 00000000 EDI: ddd50300 EBP: d8d7af40 ESP: d8d7af24
    > [ 113.921900] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
    > [ 113.921918] Process ipolldevd (pid: 3272, ti=d8d7a000 task=d8d93c90 task.ti=d8d7a000)
    > [ 113.921933] Stack:
    > [ 113.921945] d8d7af38 00000246 dfb029d8 dfb029c0 dfb029d8 dfb029c0 ddd50300 d8d7af5c
    > [ 113.922014] dfb018e2 01000246 01000000 ddd50300 ddd50314 ddabb8a0 d8d7af68 dfb381c1
    > [ 113.922098] 00000000 d8d7afa4 c012ec0a 00000000 00000002 00000000 c012eba8 ddabb8c0
    > [ 113.922240] Call Trace:
    > [ 113.922240] [] ? bt_poll_rfkill+0x5c/0x82 [toshiba_acpi]
    > [ 113.922240] [] ? input_polled_device_work+0x11/0x40 [input_polldev]
    > [ 113.922240] [] ? run_workqueue+0xea/0x1f0
    > [ 113.922240] [] ? run_workqueue+0x88/0x1f0
    > [ 113.922240] [] ? input_polled_device_work+0x0/0x40 [input_polldev]
    > [ 113.922240] [] ? worker_thread+0x87/0xf0
    > [ 113.922240] [] ? autoremove_wake_function+0x0/0x50
    > [ 113.922240] [] ? worker_thread+0x0/0xf0
    > [ 113.922240] [] ? kthread+0x3f/0x80
    > [ 113.922240] [] ? kthread+0x0/0x80
    > [ 113.922240] [] ? kernel_thread_helper+0x7/0x10
    > [ 113.922240] Code: 43 54 89 73 54 39 c6 74 11 89 d9 ba 01 00 00 00 b8 40 68 aa df e8 3e 35 69 e0 89 f8 e8 77 fd 85 e0 31 c0 83 c4 10 5b 5e 5f 5d c3 0b eb fe 89 f6 8d bc 27 00 00 00 00 be f4 4d aa df bb 5f 01
    > [ 113.922240] EIP: [] rfkill_force_state+0x53/0x90 [rfkill] SS:ESP 0068:d8d7af24
    > [ 113.924700] ---[ end trace 0e404eb40cadd5f0 ]---

    Signed-off-by: Frederik Deweerdt
    Tested-by: Andrey Borzenkov
    Acked-by: Len Brown
    Cc: Richard Purdie
    Acked-by: Philip Langdale
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Frederik Deweerdt
     

06 Dec, 2008

1 commit

  • This reverts commit 558073dd56707864f09d563b64e7c37c021e89d2, along with
    the failed try to fix the regression it caused ("ACPI: Fix ACPI battery
    regression introduced by commit 558073"), which just made things worse.

    Commit aaad077638be1a25871bcae5e43952d6b63abfca (that failed "Fix ACPI
    battery regression") got the voltage conversion confused, and fixed the
    problem with Rafael's battery monitor apparently just by mistake.

    So revert them both, getting us back to the 2.6.27 state in this, and
    let's revisit it when people understand what's going on.

    Noted-by: Paul Martin
    Requested-by: Rafael J. Wysocki
    Cc: Len Brown
    Cc: Alexey Starikovskiy
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

05 Dec, 2008

1 commit

  • Commit 558073dd56707864f09d563b64e7c37c021e89d2 ("ACPI: battery: Convert
    discharge energy rate to current properly") caused the battery subsystem
    to report wrong values of the remaining time on battery power and the
    time until fully charged on Toshiba Portege R500 (and presumably on
    other boxes too).

    Fix the issue by correcting the conversion from mW to mA.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

29 Nov, 2008

1 commit

  • the toshiba ACPI driver will, in a failure case, free the rfkill state
    before stopping the polling timer that would use this state. More interesting,
    in the same failure case handling, it calls the exit function, which also
    frees the rfkill state, but after stopping the polling.

    If the race happens, a NULL pointer is passed to rfkill_force_state()
    which then causes a nice dereference.

    Fix the race by just not doing the too-early freeing of the rfkill state.

    This appears to be the cause of a hot issue on kerneloops.org; while I
    have no solid evidence of that this patch will fix the issue, the race
    appears rather real.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Len Brown

    Arjan van de Ven
     

27 Nov, 2008

6 commits

  • Linux will continue to ignore OSI(Linux),
    except for a white-list containing a few systems.

    So delete the black-list,
    and stop soliciting user-feedback on the console.

    Signed-off-by: Len Brown

    Len Brown
     
  • …ed Power button is used"

    This reverts commit faee816b1502385dc9bc5abf2960d1cc645844d1.

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

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

    Len Brown
     
  • Some Apple boxes evidently require us to set SCI_EN on resume
    directly, because if we don't do that, they hung somewhere in the
    resume code path. Moreover, on these boxes it is not sufficient to
    use acpi_enable() to turn ACPI on during resume. All of this is
    against the ACPI specification which states that (1) the BIOS is
    supposed to return from the S3 sleep state with ACPI enabled
    (SCI_EN set) and (2) the SCI_EN bit is owned by the hardware and we
    are not supposed to change it.

    For this reason, blacklist the affected systems so that the SCI_EN
    bit is set during resume on them.

    [NOTE: Unconditional setting SCI_EN for all system on resume doesn't
    work, because it makes some other systems crash (that's to be
    expected). Also, it is not entirely clear right now if all of the
    Apple boxes require this workaround.]

    This patch fixes the recent regression tracked as
    http://bugzilla.kernel.org/show_bug.cgi?id=12038

    Signed-off-by: Rafael J. Wysocki
    Tested-by: Tino Keitel
    Tested-by: Bob Copeland
    Signed-off-by: Len Brown

    Rafael J. Wysocki
     
  • Now I know why I had strange "scheduling in atomic" problems:
    acpi_evaluate_integer() does malloc(..., irqs_disabled() ? GFP_ATOMIC
    : GFP_KERNEL)... which is (of course) broken.

    There's no way to reliably tell if we need GFP_ATOMIC or not from
    code, this one for example fails to detect spinlocks held.

    Fortunately, allocation seems small enough to be done on stack.

    Signed-off-by: Pavel Machek
    Acked-by: Bob Moore
    Signed-off-by: Len Brown

    Pavel Machek
     
  • ACPI battery interface reports its state either in mW or in mA, and
    discharge rate in your case is reported in mW. power_supply interface
    does not have such a parameter, so current_now parameter is used
    for all cases. But in case of mW, reported discharge should
    be converted into mA.

    Signed-off-by: Alexey Starikovskiy
    Tested-by: Ferenc Wagner
    Signed-off-by: Len Brown

    Alexey Starikovskiy
     
  • fix 2.6.28 EC interrupt storm regression

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

    Alexey Starikovskiy
     

17 Nov, 2008

1 commit

  • Commit 0794469da3f7b2093575cbdfc1108308dd3641ce: ("ACPI: struct device -
    replace bus_id with dev_name(), dev_set_name()") introduced a bug by
    testing 'dev_name(ldev)' instead of 'ldev->bus' for NULL when printing
    out the bus information.

    So if ldev->bus was NULL, we'd oops.

    Reported-and-tested-by: Bruno Prémont
    Cc: Kay Sievers
    Cc: Len Brown
    Cc: Greg Kroah-Hartman
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

12 Nov, 2008

16 commits


08 Nov, 2008

7 commits

  • If an ACPI graphics device supports backlight brightness functions (cmp. with
    latest ACPI spec Appendix B), let the ACPI video driver control backlight and
    switch backlight control off in vendor specific ACPI drivers (asus_acpi,
    thinkpad_acpi, eeepc, fujitsu_laptop, msi_laptop, sony_laptop, acer-wmi).

    Currently it is possible to load above drivers and let both poke on the
    brightness HW registers, the video and vendor specific ACPI drivers -> bad.

    This patch provides the basic support to check for BIOS capabilities before
    driver loading time. Driver specific modifications are in separate follow up
    patches.

    "acpi_backlight=vendor"
    Prever vendor driver over ACPI driver for backlight.
    "acpi_backlight=video" (default)
    Prever ACPI driver over vendor driver for backlight.

    Signed-off-by: Thomas Renninger
    Acked-by: Zhang Rui
    Signed-off-by: Andi Kleen
    Signed-off-by: Len Brown

    Thomas Renninger
     
  • This is a reimplemention of commit
    0119509c4fbc9adcef1472817fda295334612976
    from Matthew Garrett

    This patch got removed because of a regression: ThinkPads with a
    Intel graphics card and an Integrated Graphics Device BIOS implementation
    stopped working.
    In fact, they only worked because the ACPI device of the discrete, the
    wrong one, got used (via int10). So ACPI functions were poking on the wrong
    hardware used which is a sever bug.
    The next patch provides support for above ThinkPads to be able to
    switch brightness via the legacy thinkpad_acpi driver and automatically
    detect when to use it.

    Original commit message from Matthew Garrett:
    Vendors often ship machines with a choice of integrated or discrete
    graphics, and use the same DSDT for both. As a result, the ACPI video
    module will locate devices that may not exist on this specific platform.
    Attempt to determine whether the device exists or not, and abort the
    device creation if it doesn't.

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

    Signed-off-by: Thomas Renninger
    Acked-by: Zhang Rui
    Signed-off-by: Andi Kleen
    Signed-off-by: Len Brown

    Thomas Renninger
     
  • Len's tree branch release-2.6.27, found an unwanted return statement at
    evgpe.c.

    (git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
    release-2.6.27)

    Signed-of-by Lin Ming
    Signed-off-by: Andi Kleen
    Signed-off-by: Len Brown

    Lin Ming
     
  • Reformat acpi.debug_layer and acpi.debug_level documentation so it's
    more readable, add some clues about how to figure out the mask bits that
    enable a specific ACPI_DEBUG_PRINT statement, and include some useful
    examples.

    Move the list of masks to Documentation/acpi/debug.txt (these are
    copies of the authoritative values in acoutput.h and acpi_drivers.h).

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

    Bjorn Helgaas
     
  • When CONFIG_ACPI_DEBUG=y, the default acpi_dbg_layer and acpi_dbg_level
    values built into the ACPI CA have some debug output enabled. We'd
    rather be quiet unless the user actually specified the acpi.debug_level
    argument.

    This enables distros to ship with CONFIG_ACPI_DEBUG=y without
    inundating users with debug output.

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

    Bjorn Helgaas
     
  • /sys/module/acpi/parameters/debug_layers used to contain only the
    debug layers defined by the ACPI CA. This patch adds the additional
    layer definitions for ACPI drivers.

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

    Bjorn Helgaas
     
  • Move all the component definitions for drivers to a single shared place,
    include/acpi/acpi_drivers.h.

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

    Bjorn Helgaas