aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi
AgeCommit message (Collapse)Author
2008-12-30ACPI: PCI: combine lookup and deriveBjorn Helgaas
This folds acpi_pci_irq_derive() into acpi_pci_irq_lookup() so it can be easily used by both acpi_pci_irq_enable() and acpi_pci_irq_disable(). Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-30ACPI: PCI: follow typical PCI INTx swizzling patternBjorn Helgaas
No functional change; this just uses the typical pattern of PCI INTx swizzling done on other architectures. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-30ACPI: PCI: use positive logic to simplify codeBjorn Helgaas
This doesn't change anything functionally; it just changes tests so we test for success instead of failure. This makes the code read more easily and allows us to remove the "!entry" in the while loop condition. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-30ACPI: PCI: remove callback from acpi_pci_irq_lookup & acpi_pci_irq_deriveBjorn Helgaas
We currently pass a callback function (either acpi_pci_allocate_irq() or acpi_pci_free_irq()) to acpi_pci_irq_lookup() and acpi_pci_irq_derive(). I think it's simpler to remove the callback and just have the enable/ disable functions make the calls directly. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-30ACPI: PCI: tweak _PRT lookup debugBjorn Helgaas
Print one message (either "found" or "not found") for every _PRT search. And add pin information to the INTx swizzling debug. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-30ACPI: PCI: lookup _PRT entry by PCI dev and pin, not segment/bus/dev/pinBjorn Helgaas
There's no reason to pass around segment, bus, and device independently when we can just pass the pci_dev pointer, which carries all those already. The pci_dev contains an interrupt pin, too, but we still have to pass both the pci_dev and the pin because when we use a bridge to derive an IRQ, we need the pin from the downstream device, not the bridge. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-30ACPI: PCI: use 1-based encoding for _PRT quirksBjorn Helgaas
Use the PCI INTx pin encoding (1=INTA, 2=INTB, etc) for _PRT quirks. Then we can simply compare "entry->pin == quirk->pin". Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-30ACPI: PCI: always use the PCI INTx pin values, not the _PRT onesBjorn Helgaas
This patch changes pci_irq.c to always use PCI INTx pin encodings instead of a mix of PCI and _PRT encodings. The PCI INTx pin numbers from the PCI_INTERRUPT_PIN config register are 0=device doesn't use interrupts, 1=INTA, ..., 4=INTD. But the _PRT table uses 0=INTA, ..., 3=INTD. This patch converts the _PRT encoding to the PCI encoding immediately when we add a _PRT entry to the global list. All the rest of the code can then use the PCI encoding consistently. The point of this is to make the interrupt swizzling look the same as on other architectures, so someday we can unify them. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-30ACPI: PCI: add a helper to convert _PRT INTx pin number to nameBjorn Helgaas
This adds a helper function to convert INTx pin numbers from the _PRT (0, 1, 2, 3) to the pin name ('A', 'B', 'C', 'D'). Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-30ACPI: PCI: move struct acpi_prt_entry declaration out of public header fileBjorn Helgaas
The struct acpi_prt_entry is used only in pci_irq.c, so there's no need for the declaration to be public. This patch moves it into pci_irq.c. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-30ACPI: PCI: fix GSI/IRQ naming confusionBjorn Helgaas
The interrupt numbers from _PRT entries are GSIs, not Linux IRQs. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-30ACPI: PCI: ignore _PRT function informationBjorn Helgaas
_PRT entries don't contain any useful PCI function information (the function part of the PCI address is supposed to be 0xffff), and we don't ever look at it, so this patch just removes the reference to it. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-30ACPI: PCI: simplify buffer management for evaluating _PRTBjorn Helgaas
Previously, acpi_pci_irq_add_prt() did all its own buffer management. But now that we have ACPI_ALLOCATE_BUFFER, we no longer need to do that management. And we don't have to call acpi_get_irq_routing_table() twice (once to learn the size of the buffer needed, and again to actually get the table). Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-30ACPI: PCI: remove unnecessary null pointer checksBjorn Helgaas
Better to oops and learn about a bug than to silently cover it up. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-30ACPI: PCI: use conventional PCI address formatBjorn Helgaas
Use the conventional format for PCI addresses (%04x:%02x:%02x.%d). Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-30ACPI: Do not modify SCI_EN directlyRafael J. Wysocki
According to the ACPI specification the SCI_EN flag is controlled by the hardware, which sets this flag to inform the kernel that ACPI is enabled. For this reason, we shouldn't try to modify SCI_EN directly. Also, we don't need to do it in irqrouter_resume(), since lower-level resume code takes care of enabling ACPI in case it hasn't been enabled by the BIOS before passing control to the kernel (which by the way is against the ACPI specification). Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-29ACPICA: Enhance implicit return mechanismLin Ming
For Windows compatibility, return an implicit integer of value zero for methods that have no executable code. A default implicit value of zero is provided for methods. Lin Ming. Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-29ACPICA: Consolidate method arg count validation codeBob Moore
Merge the code that validates control method argument counts into the predefined validation module. Eliminates possible multiple warnings for incorrect counts. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-29ACPICA: Add Buffer->String conversion for predefined methodsBob Moore
For predefined methods (such as _BIF), add automatic conversion for objects that are required to be a String, but a Buffer was found instead. This can happen when reading string battery data from an operation region, because it used to be difficult to convert the data from buffer to string from within the ASL. Linux BZ 11822. http://bugzilla.kernel.org/show_bug.cgi?id=11822 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-29ACPICA: Allow multiple backslash prefix in namepathsLin Ming
In a fully qualified namepath, allow multiple backslash prefixes. This can happen because of the use of a double-backslash in strings (since backslash is the escape character) causing confusion. ACPICA BZ 739 Lin Ming. http://www.acpica.org/bugzilla/show_bug.cgi?id=739 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-29ACPICA: Fix to allow aliases within ASL namepathsBob Moore
Fixes a problem where the use of an alias within a namepath would result in a not found error or cause the compiler to fault. Also now allows forward references from the Alias operator itself. ACPICA BZ 738. http://www.acpica.org/bugzilla/show_bug.cgi?id=738 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-29ACPICA: Remove references to obsolete ACPI_DUMP_APPBob Moore
This define is no longer used. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-29ACPICA: Add support to externally execute _OSI methodBob Moore
The current implemenation of _OSI within ACPICA only allows other control methods to execute _OSI. This change allows the host OS to execute _OSI via the AcpiEvaluateObject interface. _OSI is a special method -- it does not exist in the AML code, it is implemented within ACPICA. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-29ACPICA: Reformat comments, no functional changesBob Moore
Reformat comments to use fewer lines. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-29ACPICA: Add global pointer for FACS table to simplify FACS accessBob Moore
Use a global pointer instead of using AcpiGetTableByIndex for each FACS access. This simplifies the code for the Global Lock and the Firmware Waking Vector(s). Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-29ACPICA: Emit warning if two FACS or DSDT tables found in the FADTBob Moore
Checks if there are two valid but different addresses for the FACS and DSDT within the FADT (mismatch between the 32-bit and 64-bit fields.) Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-29ACPICA: Fix namestring for the SystemCMOS address spaceBob Moore
This fixes the name of this address space, changing it from the incorrect CMOS to the correct SystemCMOS. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-29ACPICA: Update debug output for IndexField I/OBob Moore
Split the "data register I/O" with more informative read and write messages. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-29ACPICA: Add a mechanism to escape infinite AML While() loopsBob Moore
Add a loop counter to force exit from AML While loops if the count becomes too large. This can occur in poorly written AML when the hardware does not respond within a while loop and the loop does not implement a timeout. The maximum loop count is configurable. A new exception code is returned when a loop is broken, AE_AML_INFINITE_LOOP. Bob Moore, Alexey Starikovskiy. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-29ACPICA: Optimize execution of AML While loopsBob Moore
Previously, a control state object was allocated and freed for each execution of the loop. The optimization is to simply reuse the control state for each iteration. This speeds up the raw loop execution time by about 5%. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-29ACPICA: Fix possible memory leak on error in parserLin Ming
Fixes a possible memory leak if an allocation failure happens in the parse loop. Must terminate an executing control method. Lin Ming, Bob Moore. ACPICA BZ 489. http://www.acpica.org/bugzilla/show_bug.cgi?id=489 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-29ACPICA: Update FACS waking vector interfacesBob Moore
Split AcpiSetFirmwareWakingVector into two: one for the 32-bit vector, another for the 64-bit vector. This is required because the host OS must setup the wake much differently for each vector (real vs. protected mode, etc.) and the interface should not be deciding which vector to use. Also eliminate the GetFirmwareWakingVector interface, as it served no purpose (only the firmware reads the vector, OS only writes the vector.) ACPICA BZ 731. http://www.acpica.org/bugzilla/show_bug.cgi?id=731 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-29ACPICA: Fix several warnings under gcc 4 compilerBob Moore
New compiler is pickier than older versions. Joerg Sonnenberger. From ACPICA BZ 732. http://www.acpica.org/bugzilla/show_bug.cgi?id=732 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-25Merge branches 'x86/pat2' and 'x86/fpu'; commit 'v2.6.28' into x86/coreIngo Molnar
2008-12-23Merge branch 'x86/tsc' into x86/coreIngo Molnar
2008-12-23Merge branches 'x86/apic', 'x86/cleanups', 'x86/cpufeature', ↵Ingo Molnar
'x86/crashdump', 'x86/debug', 'x86/defconfig', 'x86/detect-hyper', 'x86/doc', 'x86/dumpstack', 'x86/early-printk', 'x86/fpu', 'x86/idle', 'x86/io', 'x86/memory-corruption-check', 'x86/microcode', 'x86/mm', 'x86/mtrr', 'x86/nmi-watchdog', 'x86/pat2', 'x86/pci-ioapic-boot-irq-quirks', 'x86/ptrace', 'x86/quirks', 'x86/reboot', 'x86/setup-memory', 'x86/signal', 'x86/sparse-fixes', 'x86/time', 'x86/uv' and 'x86/xen' into x86/core
2008-12-22Newly inserted battery might differ from one just removed, soAlexey Starikovskiy
update of battery info fields is required. Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Acked-by: Andy Neitzke <neitzke@ias.edu> Signed-off-by: Alexey Starikovskiy <astarikovskiy <at> suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-19ACPI: move wmi, asus_acpi, toshiba_acpi to drivers/platform/x86Len Brown
These are platform specific drivers that happen to use ACPI, while drivers/acpi/ is for code that implements ACPI itself. Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-19ACPI hibernate: Introduce new kernel parameter acpi_sleep=s4_nonvsRafael J. Wysocki
On some machines it may be necessary to disable the saving/restoring of the ACPI NVS memory region during hibernation/resume. For this purpose, introduce new ACPI kernel command line option acpi_sleep=s4_nonvs. Based on a patch by Zhang Rui. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Nigel Cunningham <nigel@tuxonice.net> Acked-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-19ACPI hibernate: Add a mechanism to save/restore ACPI NVS memoryRafael J. Wysocki
According to the ACPI Specification 3.0b, Section 15.3.2, "OSPM will call the _PTS control method some time before entering a sleeping state, to allow the platform's AML code to update this memory image before entering the sleeping state. After the system awakes from an S4 state, OSPM will restore this memory area and call the _WAK control method to enable the BIOS to reclaim its memory image." For this reason, implement a mechanism allowing us to save the NVS memory during hibernation and to restore it during the subsequent resume. Based on a patch by Zhang Rui. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Nigel Cunningham <nigel@tuxonice.net> Cc: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-19ACPI: fix 2.6.28 acpi.debug_level regressionBjorn Helgaas
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 <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-16x86: support always running TSC on Intel CPUsVenki Pallipadi
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 <venkatesh.pallipadi@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-15ACPI toshiba: only register rfkill if bt is enabledFrederik Deweerdt
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:[<dfaa4683>] 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] [<dfb018e2>] ? bt_poll_rfkill+0x5c/0x82 [toshiba_acpi] > [ 113.922240] [<dfb381c1>] ? input_polled_device_work+0x11/0x40 [input_polldev] > [ 113.922240] [<c012ec0a>] ? run_workqueue+0xea/0x1f0 > [ 113.922240] [<c012eba8>] ? run_workqueue+0x88/0x1f0 > [ 113.922240] [<dfb381b0>] ? input_polled_device_work+0x0/0x40 [input_polldev] > [ 113.922240] [<c012f047>] ? worker_thread+0x87/0xf0 > [ 113.922240] [<c0132b00>] ? autoremove_wake_function+0x0/0x50 > [ 113.922240] [<c012efc0>] ? worker_thread+0x0/0xf0 > [ 113.922240] [<c013280f>] ? kthread+0x3f/0x80 > [ 113.922240] [<c01327d0>] ? kthread+0x0/0x80 > [ 113.922240] [<c01040d7>] ? 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 <0f> 0b eb fe 89 f6 8d bc 27 00 00 00 00 be f4 4d aa df bb 5f 01 > [ 113.922240] EIP: [<dfaa4683>] rfkill_force_state+0x53/0x90 [rfkill] SS:ESP 0068:d8d7af24 > [ 113.924700] ---[ end trace 0e404eb40cadd5f0 ]--- Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com> Tested-by: Andrey Borzenkov <arvidjaar@mail.ru> Acked-by: Len Brown <len.brown@intel.com> Cc: Richard Purdie <rpurdie@rpsys.net> Acked-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-12-11ACPI: video: Fix reversed brightness behavior on ThinkPad SL seriesZhang Rui
Section B.6.2 of ACPI 3.0b specification that defines _BCL method doesn't require the brightness levels returned to be sorted. At least ThinkPad SL300 (and probably all IdeaPads) returns the array reversed (i.e. bightest levels have lowest indexes), which causes the brightness management behave in completely reversed manner on these machines (brightness increases when the laptop is idle, while the display dims when used). Sorting the array by brightness level values after reading the list fixes the issue. http://bugzilla.kernel.org/show_bug.cgi?id=12037 Signed-off-by: Zhang Rui <rui.zhang@intel.com> Tested-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-10/proc/acpi/alarm: handle day-of-month wraparound on readbackMark Lord
Fix month wrap issue with readback from /proc/acpi/alarm This bug has been around *forever*. $ echo '2008-12-01 10:36:20' > /proc/acpi/alarm $ cat /proc/acpi/alarm 2008-11-01 10:36:20 Note how the readback above shows the month incorrectly when the alarm is set in the *next* calendar month. But with this patch applied, it shows the correct month (12). Signed-off-by: Mark Lord <mlord@pobox.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-05Revert "ACPI: battery: Convert discharge energy rate to current properly"Linus Torvalds
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 <pm@debian.org> Requested-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: Len Brown <len.brown@intel.com> Cc: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-12-04ACPI: Fix ACPI battery regression introduced by commit 558073Rafael J. Wysocki
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 <rjw@sisk.pl> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-30ACPI: EC: fix compilation warningHannes Eder
Fix the warning introduced in commit c5279dee26c0e8d7c4200993bfc4b540d2469598, and give the dummy variable a more verbose name. drivers/acpi/ec.c: In function 'acpi_ec_ecdt_probe': drivers/acpi/ec.c:1015: warning: ISO C90 forbids mixed declarations and code Signed-off-by: Hannes Eder <hannes@hanneseder.net> Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2008-11-28toshiba_acpi: close race in toshiba_acpi driverArjan van de Ven
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 <arjan@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-11-27ACPI: delete OSI(Linux) DMI dmesg spamLen Brown
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@intel.com>