Commit Graph

821 Commits

Author SHA1 Message Date
Borislav Petkov cf6c6045a0 ACPI: word-smith kconfig help
Signed-off-by: <bbpetkov@yahoo.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25 14:29:50 -04:00
Bjorn Helgaas 0c0e892101 ACPI: use _STA bit names rather than 0x0F
Be explicit about what "device->status = 0x0F" really means.

syntax only.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25 14:20:58 -04:00
Bjorn Helgaas a0bd4ac498 ACPI: Remove duplicate definitions for _STA bits
No need to duplicate the existing definitions in include/acpi/actypes.h.

syntax only -- no functional change.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25 14:17:39 -04:00
Ray Lee d8938801d1 ACPI: remove duplicate include
Thomas's patch for including <asm/apic.h> for x86 UP builds came into
Linus's tree from two different directions, both of which were merged.
This reverts the latter, yanking out the duplicate #include and comment.

Signed-off-by: Ray Lee <ray-lk@madrabbit.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25 14:12:00 -04:00
Andrew Morton 94e22e13ad acpi-thermal: fix mod_timer() interval
Use relative time, not absolute.  Discovered by Jung-Ik (John) Lee
<jilee@google.com>.

Cc: Jung-Ik (John) Lee <jilee@google.com>
Acked-by: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-24 08:23:08 -07:00
Len Brown 4e381a4f06 Revert "ACPI: parse 2nd MADT by default"
This reverts commit 09fe58356d.
http://bugzilla.kernel.org/show_bug.cgi?id=8283

Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-30 14:16:10 -04:00
Randy Dunlap 62a6d7fd9b ACPI: dock: use NULL for pointer
Use NULL instead of 0 for pointers:
drivers/acpi/dock.c:677:75: warning: Using plain integer as NULL pointer

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-28 23:31:43 -04:00
Henrique de Moraes Holschuh 3ede41c718 ACPI: ibm-acpi: move driver to drivers/misc hierarchy
ibm-acpi is not an ACPICA driver, so move it to drivers/misc as per Len
Brown's request.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-25 23:37:55 -04:00
Henrique de Moraes Holschuh a62bc916cf ACPI: ibm-acpi: update copyright notice
Update copyright and license info on the source code comments.  No
functional changes.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-25 23:37:54 -04:00
Henrique de Moraes Holschuh 56b6aeb058 ACPI: ibm-acpi: organize code
Shuffle code around to better organize the driver code inside the
ibm-acpi.c file.

This patch adds no functional changes.  It is pure fluff that will make me
a bit more productive.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-25 23:37:54 -04:00
Henrique de Moraes Holschuh 1406cdd176 ACPI: ibm-acpi: add header file
Add a (private) header file for ibm-acpi, and move type definitions and
ThinkPad driver constants to the new header file.

This patch has no functional changes.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-25 23:37:54 -04:00
Henrique de Moraes Holschuh e062e03438 ACPI: ibm-acpi: rename some identifiers
Rename some identifiers so that they are more in tune with the rest of the
driver code, or less generic.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-25 23:37:54 -04:00
Henrique de Moraes Holschuh 837ca6ddb4 ACPI: ibm-acpi: kill trailing whitespace
I shall protect the ibm-acpi city against the invasion of the barbarian
blanks!  To the unforgiving jaws of sed s/[[:blank:]]\+$// they go!

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-25 23:37:54 -04:00
Thomas Gleixner e585bef815 [PATCH] i386: add command line option "local_apic_timer_c2_ok"
It turned out that it is almost impossible to trust ACPI, BIOS & Co.
regarding the C states. This was the reason to switch the local apic
timer off in C2 state already. OTOH there are sane and well behaving
systems, which get punished by that decision.

Allow the user to confirm that the local apic timer is trustworthy in C2
state. This keeps the default behaviour on the safe side.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-23 10:21:02 -07:00
Linus Torvalds 296d93cd02 Revert "ACPI: Only use IPI on known broken machines (AMD, Dothan/BaniasPentium M)"
This reverts commit 25496caec1, which
broke bootup on at least Ingo's ThinkPad T60.  Need to figure out
exactly what is wrong before we can re-do the logic.

Requested-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Thomas Renninger <trenn@suse.de>
Cc: Len Brown <len.brown@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-23 08:03:47 -07:00
Len Brown 439a888885 ACPI: sbs: remove i2c_ec.[ch]
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-22 01:21:05 -04:00
Vladimir Lebedev 722062334b ACPI: sbs: Common interface with CM battery
The SBS driver has tne features as CM battery:
SBS update_time variable has tne same definition as CM battery 'update_time' variable.

Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-22 01:15:58 -04:00
Vladimir Lebedev 6845118b3b ACPI: sbs: Debug messages correction/improvement
Debug messages correction/improvement:
Use ACPI_EXCEPTION instead of ACPI_DEBUG_PRINT.

Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-22 01:15:58 -04:00
Vladimir Lebedev 84cb559872 ACPI: sbs: remove I2C Makefile hooks
SBS does not depend on I2C.
i2c_ec.h and i2c_ec.c are not needed

Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-22 01:15:58 -04:00
Vladimir Lebedev b4150fc4ae ACPI: sbs: remove I2C Kconfig dependency
SBS does not depend on I2C.

Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-22 01:15:57 -04:00
Vladimir Lebedev 6d15702cc0 ACPI: sbs: use EC rather than I2C
SBS is based on EC function(ec_read/ec_write).
Not needed using of I2C structures/functions ... is removed.
SBS does not depend on I2C now.

Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-22 01:15:57 -04:00
Len Brown cddece4bec Pull c2 into release branch 2007-03-20 11:06:37 -04:00
Len Brown b25e84425e Pull bugzilla-7465 into release branch 2007-03-20 11:06:18 -04:00
Len Brown f5ea908c8f Pull bugzilla-8171 into release branch 2007-03-20 11:06:00 -04:00
Len Brown 54b8c39fbd Pull misc-for-upstream into release branch 2007-03-20 11:05:41 -04:00
Thomas Renninger 25496caec1 ACPI: Only use IPI on known broken machines (AMD, Dothan/BaniasPentium M)
Use IPI for blacklisted CPUs, add parameter IPI vs LAPIC

Currently, Linux disables lapic timer for all machines with C2 and higher
C-state support.

According to Intel only specific Intel models (Banias/Dothan) are broken
in respect of not waking up from C2 with lapic.

However, I am not sure about the naming of the parameter and how it
could/should get integrated into the dyntick part
(CONFIG_GENERIC_CLOCKEVENTS). There, a more fine grained check (TSC
still running?, ..) is needed? Does this make sense (always use
CLOCK_EVT_NOTIFY_BROADCAST_ON, but use OFF if forced by use_ipi=0:
clockevents_notify(use_ipi ? CLOCK_EVT_NOTIFY_BROADCAST_ON :
CLOCK_EVT_NOTIFY_BROADCAST_OFF, &pr->id);

Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-17 00:50:46 -04:00
Henrique de Moraes Holschuh 96e89afe6d ACPI: ibm-acpi: allow module to load when acpi notifiers can't be set (v2)
This patch allows for ibm-acpi to coexist (with diminished functionality) with
other drivers like ACPI_BAY.  ibm-acpi will simply disable the functions it is
not able to register ACPI notifiers for.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Chris Wedgwood <cw@f00f.org>
Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-16 01:07:18 -04:00
Len Brown 09fe58356d ACPI: parse 2nd MADT by default
http://bugzilla.kernel.org/show_bug.cgi?id=7465

Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-15 04:22:18 -04:00
Len Brown a8f4af6dc6 ACPICA: revert "acpi_serialize" changes
This reverts 977a6226fe
and reverts 1ba753acb3
and updates acpi_ev_queue_notify_request()
to restore the previous implementation of the
"acpi_serialize" workaround.

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

Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-15 04:10:36 -04:00
Al Viro 89952d133d [PATCH] misc NULL noise
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14 15:27:49 -07:00
Alexey Starikovskiy 1d99967bad ACPI: resolve HP nx6125 S3 immediate wakeup regression
Moving disable GPEs from enter_sleep up into sleep_prepare fixed
the disabled SCI on S4 on Acer laptops.

However, it caused an immediate S3 resume on the HP nx6125.
Apparently, on the HP, a GPE was getting re-enabled after
the prepare, but before the enter.

Close that window by restoring the GPE disable on enter.
This is redundant in most cases, but closes this window,
where S3 and S4 paths differ.

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Acked-by: Ray Lee <ray-lk@madrabbit.org>
2007-03-12 14:49:26 -04:00
Len Brown a1fdcc0d27 ACPI: Add support to parse 2nd MADT
When a BIOS bug presents multiple APIC/MADTs,
Linux currently uses the 1st and ignores the 2nd.

But some machines work better if we use the 2nd.

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

Add a warning and boot parameter "acpi_apic_instance=2"
to allow parsing the 2nd.

No change to default behaviour in this patch.

Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-11 03:30:13 -04:00
Alexey Starikovskiy 9fd9f8e8bd ACPI: EC: Block queries until EC is fully initialized
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-09 23:27:29 -05:00
Alexey Starikovskiy 01f2246269 ACPI: EC: Cleanup of EC initialization
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-09 23:27:29 -05:00
Alexey Starikovskiy d033879c98 ACPI: EC: first_ec is better to be acpi_ec than acpi_device.
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-09 23:27:28 -05:00
Alexey Starikovskiy d66d969df8 ACPI: EC: Rename ec_ecdt to more informative boot_ec
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-09 23:27:28 -05:00
Alexey Starikovskiy c0900c3512 ACPI: EC: Clean ECDT and namespace parsing.
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-09 23:27:28 -05:00
Alexey Starikovskiy e828432104 ACPI: EC: Put install handlers into separate function.
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-09 23:27:28 -05:00
Alexey Starikovskiy 3d02b90be2 ACPI: EC: Remove casts to/from void* from ec.c
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-09 23:27:28 -05:00
Alexey Starikovskiy c45aac43fe ACPI: EC: enable burst functionality in EC.
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-09 23:27:28 -05:00
Alexey Starikovskiy 33c7a0738c ACPI: EC: "Fake ECDT" workaround is not needed any longer.
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-09 23:27:28 -05:00
Alexey Starikovskiy 33d20b6100 ACPI: EC: Make EC to initialize first in ACPI
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-09 23:27:28 -05:00
Alexey Starikovskiy a5f8dee2d3 ACPI: EC: Don't use Global Lock if not asked to do so
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-09 23:27:27 -05:00
Len Brown 63e34ca93a Pull misc-for-upstream into release branch 2007-03-09 23:19:50 -05:00
Len Brown 51e7fff1c2 Pull bugzilla-8110 into release branch 2007-03-09 23:19:25 -05:00
Len Brown bdf3aaf951 Pull bugzilla-8066 into release branch 2007-03-09 23:19:19 -05:00
Len Brown cb2ebc59ff Pull bugzilla-7570 into release branch 2007-03-09 23:18:46 -05:00
Len Brown 3dfb737998 Pull bugzilla-6859 into release branch 2007-03-09 23:18:35 -05:00
Len Brown 5cb69bcace Pull ibm into release branch 2007-03-09 23:17:46 -05:00
Alexey Starikovskiy 9e19721960 ACPI: ec: fix race in status register access
Delay the read of the EC status register until
after the event that caused it occurs -- otherwise
it is possible to read and act on stale status that was
associated with the previous event.

Do this with a perpetually incrementing "event_count" to detect
when a new event occurs and it is safe to read status.

There is no workaround for polling mode -- it is inherently
exposed to reading and acting on stale status, since it
doesn't have an interrupt to tell it the event completed.

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

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-09 23:16:23 -05:00
Robert P. J. Day 9327f46ee2 ACPI: Kconfig: hide ACPI menu when CONFIG_PM=n
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-09 22:18:04 -05:00
Ilya A. Volynets-Evenbakh ac122bb64b ACPI: dock: add access to ACPI docking station UID
It is useful to know whether your laptop is docked or not,
but it is even more useful to know which docking station it's
docked to. Attached patch adds "uid" file to sysfs.
Tested on Dell Latitude D600 with D/Dock.
Patch is against official 2.6.20 release.

Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-09 21:40:23 -05:00
Julius Volz 98fb8fe10f ACPI: video: Fix spelling and grammar mistakes
Correct some of the most obvious spelling and grammar
mistakes in drivers/acpi/video.c (comments and printk output).

Signed-off-by: Julius Volz <juliusrv@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-09 21:37:07 -05:00
Anthony Godshall, Ampro Computers, Inc 5b27b176da ACPI: make blacklist more verbose
IMHO, ACPI disabled due to DMI failure or blacklisted year should be noted,
as is done with other ACPI blacklisting.

This will help people troubleshoot when ACPI isn't working.  Status quo is
a mysterious "ACPI Disabled" message without explanation on BIOS that
implements ACPI but not DMI.  This is actually fairly common on embedded
x86 boards.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-09 21:19:05 -05:00
Henrique de Moraes Holschuh c9bf296b64 ACPI: ibm-acpi: improve backlight power handling
Improve the backlight code to emulate as much as possible the power
management events, as we are unable to really power on or power off the
backlight.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-08 20:24:57 -05:00
Shaohua Li 2f894ef9c8 ACPI: fix boot hang w/o "noapic" on MSI MS-6390-L
This is a workaround to handle a BIOS bug where the
programmer exchanged the name and index fields of
a _PRT entry.  Apparently this BIOS error does not
confuse Windows and thus it lurks in the field
on various machines.

boot with "acpi=strict" to disable this workaround

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

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-08 03:42:42 -05:00
Konstantin Karasyov ff24ba74b6 ACPI: ThinkPad Z60m: usb mouse stops working after suspend to RAM
(http://www.mail-archive.com/linux-acpi@vger.kernel.org/msg05270.html):

References : http://lkml.org/lkml/2007/2/21/413
             http://lkml.org/lkml/2007/2/28/172
Submitter  : Arkadiusz Miskiewicz <arekm@maven.pl>
Caused-By  : Konstantin Karasyov <konstantin.a.karasyov@intel.com>
             commit 0a6139027f

Do not disable power resources on resume even if there are no devices referencing it.

Signed-off-by: Konstantin Karasyov <konstantin.a.karasyov@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-07 03:50:11 -05:00
Alexey Starikovskiy 610a3d0696 ACPICA: Fix ACPI Global Lock re-entrancy
patch "Delete recursive feature of ACPI Global Lock"
broke re-entrancy of the Global Lock.
The common routine to acquire GL is acpi_ev_acquire_global_lock,
so check for re-entrancy _must_ be there, and not anywhere else.

http://bugzilla.kernel.org/show_bug.cgi?id=8066#c9

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-07 00:57:30 -05:00
Kristen Carlson Accardi b1a316f6f9 [PATCH] ACPI: make bay depend on dock
Since the bay driver depends on the dock driver for proper notification,
make this driver depend on the dock driver.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Acked-by: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-01 14:53:38 -08:00
Henrique de Moraes Holschuh 2bc808a8c4 ACPI: ibm-acpi: make ibm-acpi bay support optional
Make ibm-acpi bay support optional at kernel compile time.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
2007-02-22 16:09:25 -02:00
Henrique de Moraes Holschuh adb005818b ACPI: ibm-acpi: fix initial status of backlight device
The brightness class core does not update the initial status of the
device's brightness at register time.  Do it by ourselves.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
2007-02-22 16:09:25 -02:00
Konstantin Karasyov 7292576043 ACPI: fix S3 fan resume issue
http://bugzilla.kernel.org/show_bug.cgi?id=7570#c14

Signed-off-by: Konstantin Karasyov <konstantin.a.karasyov@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-21 02:05:58 -05:00
Richard Purdie 599a52d126 backlight: Separate backlight properties from backlight ops pointers
Per device data such as brightness belongs to the indivdual device
and should therefore be separate from the the backlight operation
function pointers. This patch splits the two types of data and
allows simplifcation of some code.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-02-20 09:26:53 +00:00
Richard Purdie dfcba20067 backlight: Remove unneeded owner field
Remove uneeded owner field from backlight_properties structure.

Nothing uses it and it is unlikely that it will ever be used. The
backlight class uses other means to ensure that nothing references
unloaded code.

Based on a patch from Dmitry Torokhov <dtor@insightbb.com>

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-02-20 08:37:40 +00:00
Len Brown 255f0385c8 Pull bugzilla-7897 into release branch 2007-02-16 22:12:04 -05:00
Len Brown 902b236c08 Pull bugzilla-7887 into release branch 2007-02-16 22:11:57 -05:00
Len Brown 08e4a10ec8 Pull bugzilla-7570 into release branch 2007-02-16 22:11:50 -05:00
Len Brown 4559b43822 Pull bugzilla-7200 into release branch 2007-02-16 22:11:37 -05:00
Len Brown 1004879f25 Pull bugzilla-7122 into release branch 2007-02-16 22:11:31 -05:00
Len Brown f0e5ed7f32 Pull bugzilla-5534 into release branch 2007-02-16 22:11:21 -05:00
Len Brown 8800c0ebf5 Pull remove-hotkey into release branch 2007-02-16 22:11:02 -05:00
Len Brown c0cd79d114 Pull fluff into release branch
Conflicts:

	arch/x86_64/pci/mmconfig.c
	drivers/acpi/bay.c

Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16 22:10:32 -05:00
Len Brown 5ee6edbcde ACPI: hotkey: remove driver, per feature-removal-schedule.txt
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16 21:45:57 -05:00
Len Brown 81450b73dd Pull misc-for-upstream into release branch
Conflicts:

	drivers/usb/misc/appledisplay.c

Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16 18:52:41 -05:00
Henrique de Moraes Holschuh 0539771d72 ACPI: bay: use IS_ERR for return of register_platform_device_simple
register_platform_device_simple returns ERR_PTR(foo), so test it with
IS_ERR(foo).

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16 18:35:23 -05:00
John Keller ecb5f7521a ACPI: acpi_unload_table_id() always returns error
acpi_unload_table_id() is always returning an error status.
Also, once the matching table is found, don't bother looking
for another match.

Signed-off-by: John Keller <jpk@sgi.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16 18:34:40 -05:00
Alexey Starikovskiy c24e912b61 ACPI: ec: add unlock in error path
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16 12:51:53 -05:00
Thomas Gleixner e9e2cdb412 [PATCH] clockevents: i386 drivers
Add clockevent drivers for i386: lapic (local) and PIT/HPET (global).  Update
the timer IRQ to call into the PIT/HPET driver's event handler and the
lapic-timer IRQ to call into the lapic clockevent driver.  The assignement of
timer functionality is delegated to the core framework code and replaces the
compile and runtime evalution in do_timer_interrupt_hook()

Use the clockevents broadcast support and implement the lapic_broadcast
function for ACPI.

No changes to existing functionality.

[ kdump fix from Vivek Goyal <vgoyal@in.ibm.com> ]
[ fixes based on review feedback from Arjan van de Ven <arjan@infradead.org> ]
Cleanups-from: Adrian Bunk <bunk@stusta.de>
Build-fixes-from: Andrew Morton <akpm@osdl.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-16 08:13:59 -08:00
Thomas Gleixner 169a0abbe3 [PATCH] ACPI keep track of timer broadcasting
This is a preperatory patch for highres/dyntick:

- replace the big #ifdef ARCH_APICTIMER_STOPS_ON_C3 hackery by functions

- remove the double switch in the power verify function (in the worst case
  we switched ipi to apic and 20usec later apic to ipi)

- keep track of the the state which stops local APIC timer

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Len Brown <len.brown@intel.com>
Cc: <linux-acpi@vger.kernel.org>
Cc: Andi Kleen <ak@suse.de>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-16 08:13:58 -08:00
Thomas Gleixner 3434933b17 [PATCH] ACPI: fix missing include for UP
apic.h does not get included on UP compiles.  That way the
APICTIMER_STOPS_ON_C3 is not there and UP boxen have no support for timer
broadcasting.  This was never noticed, because the lapic timer is only used
for profiling on UP.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-16 08:13:58 -08:00
Konstantin Karasyov b1028c545c ACPI: fix fan after resume from S3
http://bugzilla.kernel.org/show_bug.cgi?id=7570

Signed-off-by: Konstantin Karasyov <konstantin.a.karasyov@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16 02:23:07 -05:00
Len Brown e8363f3327 ACPI: update acpi_power_resume() per new acpi_op_resume
drivers/acpi/power.c:69: warning: initialization from incompatible pointer type

Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16 02:05:39 -05:00
Konstantin Karasyov 0a6139027f ACPI: Thermal issues on HP nx6325
The previous reference counting scheme to enable power resources
got confused when multiple devices were present that might
repeatedly enable or disable the resource and throw off the count.

The new code simply lists the referencing devices which
are requesting the resource to be enabled.  When there are none,
then it is off.

Signed-off-by: Konstantin Karasyov <konstantin.a.karasyov@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16 01:47:06 -05:00
Sanjoy Mahajan 636cedf9df ACPI: thermal: fix units in debug output
http://bugzilla.kernel.org/show_bug.cgi?id=4972

Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16 01:24:43 -05:00
Thomas Gleixner 5c95d3f578 ACPI: include apic.h in processor driver for benefit of UP kernels
apic.h does not get included on UP compiles.  That way the
APICTIMER_STOPS_ON_C3 is not there and UP boxen have no support for timer
broadcasting.  This was never noticed, because the lapic timer is only used
for profiling on UP.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-15 23:27:13 -05:00
Len Brown 8d4956c201 ACPI: remove non-PNPACPI version of get_rtc_dev()
It isn't needed in ACPI code anymore because
now ACPI always includes PNPACPI.

Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-15 22:46:42 -05:00
Len Brown 243b66e76a ACPI: always enable CONFIG_PNPACPI on CONFIG_ACPI kernels
We removed the ACPI motherboard driver which handled
the ACPI=y, PNP=n case, so now we need to enforce that
PNP & PNPACPI are always enabled for ACPI kernels.

Most major distros ship this way this already.

Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-15 22:38:04 -05:00
Len Brown fc955f670c ACPI: remove acpi_os_readable(), acpi_os_writable()
...which are now unused

Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-15 22:19:17 -05:00
Randy Dunlap 70c0846e43 ACPI: Fix sparse warnings
Use NULL for pointers

drivers/acpi/osl.c:208:10: warning: Using plain integer as NULL pointer
drivers/acpi/tables/tbxface.c:411:49: warning: Using plain integer as NULL pointer
drivers/acpi/processor_core.c:1008:10: warning: Using plain integer as NULL pointer

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-15 22:19:07 -05:00
Alexey Starikovskiy 5f7748cf91 Execute AML Notify() requests on stack.
HP nx6125/nx6325/... machines have a _GPE handler with an infinite
loop sending Notify() events to different ACPI subsystems.

The notify handler in the ACPI thermal driver is a C-routine,
which may invoke the ACPI interpreter again to get access
to some ACPI variables such as temperature.  (acpi_evaluate_xxx)
On these HP machines such an evaluation changes state of an ASL 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 explosion in memory consumption.

Also as GPE handling is blocked, machines overheat because ACPI-based
fan control is stalled.  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 this failure,  Linux must not send notify events to the
kacpid workqueue -- either executing them immediately or putting them
on some other thread.

The 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-based kernel shipped with Ubuntu 6.06 LTS.

Second attempt was done by Alexey Starikovskiy, who 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 2.6.18-rc2.

Alexey 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 this broke Linus' machine
also and was reverted from 2.6.19-rc with much fanfair.

The 4th patch 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).  Then a 5th attempt did a
yield() to every GPE execution.

Finally, this 6th generation patch simply executes the notify handler
on the stack.  Previous attempts to do this simple solution failed
because of issues in AML mutex re-entrancy which are now fixed
by the previous patch in this series.

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

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-15 16:13:51 -05:00
Alexey Starikovskiy c0d127b569 ACPICA: fix AML mutex re-entrancy
ACPI AML supports "serialized" methods which are protected
by an implicit mutex.  The mutex is re-entrant for that AML thread
to allow recursion.

However, Linux implements notify() by creating a new AML thread.
So for systems where notify() re-enters a serialized method,
deadlock results.

The fix is to use the Linux thread_id as the key to allowing
re-entrancy, not the AML thread pointer.

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

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-15 16:13:16 -05:00
Linus Torvalds 414f827c46 Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6
* 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6: (94 commits)
  [PATCH] x86-64: Remove mk_pte_phys()
  [PATCH] i386: Fix broken CONFIG_COMPAT_VDSO on i386
  [PATCH] i386: fix 32-bit ioctls on x64_32
  [PATCH] x86: Unify pcspeaker platform device code between i386/x86-64
  [PATCH] i386: Remove extern declaration from mm/discontig.c, put in header.
  [PATCH] i386: Rename cpu_gdt_descr and remove extern declaration from smpboot.c
  [PATCH] i386: Move mce_disabled to asm/mce.h
  [PATCH] i386: paravirt unhandled fallthrough
  [PATCH] x86_64: Wire up compat epoll_pwait
  [PATCH] x86: Don't require the vDSO for handling a.out signals
  [PATCH] i386: Fix Cyrix MediaGX detection
  [PATCH] i386: Fix warning in cpu initialization
  [PATCH] i386: Fix warning in microcode.c
  [PATCH] x86: Enable NMI watchdog for AMD Family 0x10 CPUs
  [PATCH] x86: Add new CPUID bits for AMD Family 10 CPUs in /proc/cpuinfo
  [PATCH] i386: Remove fastcall in paravirt.[ch]
  [PATCH] x86-64: Fix wrong gcc check in bitops.h
  [PATCH] x86-64: survive having no irq mapping for a vector
  [PATCH] i386: geode configuration fixes
  [PATCH] i386: add option to show more code in oops reports
  ...
2007-02-14 09:46:06 -08:00
Tim Schmielau cd354f1ae7 [PATCH] remove many unneeded #includes of sched.h
After Al Viro (finally) succeeded in removing the sched.h #include in module.h
recently, it makes sense again to remove other superfluous sched.h includes.
There are quite a lot of files which include it but don't actually need
anything defined in there.  Presumably these includes were once needed for
macros that used to live in sched.h, but moved to other header files in the
course of cleaning it up.

To ease the pain, this time I did not fiddle with any header files and only
removed #includes from .c-files, which tend to cause less trouble.

Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
configs in arch/arm/configs on arm.  I also checked that no new warnings were
introduced by the patch (actually, some warnings are removed that were emitted
by unnecessarily included header files).

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:54 -08:00
Jean Delvare 12a917f69d i2c: Declare more i2c_adapter parent devices
Declare the parent device of i2c_adapter devices each time we can
easily do so. It makes the i2c_adapter appear at the right place in
the device tree, rather than as a platform device.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Len Brown <len.brown@intel.com>
Cc: Jordan Crouse <jordan.crouse@amd.com>
Cc: Jody McIntyre <scjody@modernduck.com>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: v4l-dvb-maintainer@linuxtv.org
Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
2007-02-13 22:09:03 +01:00
Ingo Molnar 5d0e600d90 [PATCH] x86: fix laptop bootup hang in init_acpi()
During kernel bootup, a new T60 laptop (CoreDuo, 32-bit) hangs about
10%-20% of the time in acpi_init():

 Calling initcall 0xc055ce1a: topology_init+0x0/0x2f()
 Calling initcall 0xc055d75e: mtrr_init_finialize+0x0/0x2c()
 Calling initcall 0xc05664f3: param_sysfs_init+0x0/0x175()
 Calling initcall 0xc014cb65: pm_sysrq_init+0x0/0x17()
 Calling initcall 0xc0569f99: init_bio+0x0/0xf4()
 Calling initcall 0xc056b865: genhd_device_init+0x0/0x50()
 Calling initcall 0xc056c4bd: fbmem_init+0x0/0x87()
 Calling initcall 0xc056dd74: acpi_init+0x0/0x1ee()

It's a hard hang that not even an NMI could punch through!  Frustratingly,
adding printks or function tracing to the ACPI code made the hangs go away
...

After some time an additional detail emerged: disabling the NMI watchdog
made these occasional hangs go away.

So i spent the better part of today trying to debug this and trying out
various theories when i finally found the likely reason for the hang: if
acpi_ns_initialize_devices() executes an _INI AML method and an NMI
happens to hit that AML execution in the wrong moment, the machine would
hang.  (my theory is that this must be some sort of chipset setup method
doing stores to chipset mmio registers?)

Unfortunately given the characteristics of the hang it was sheer
impossible to figure out which of the numerous AML methods is impacted
by this problem.

As a workaround i wrote an interface to disable chipset-based NMIs while
executing _INI sections - and indeed this fixed the hang.  I did a
boot-loop of 100 separate reboots and none hung - while without the patch
it would hang every 5-10 attempts.  Out of caution i did not touch the
nmi_watchdog=2 case (it's not related to the chipset anyway and didnt
hang).

I implemented this for both x86_64 and i686, tested the i686 laptop both
with nmi_watchdog=1 [which triggered the hangs] and nmi_watchdog=2, and
tested an Athlon64 box with the 64-bit kernel as well. Everything builds
and works with the patch applied.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2007-02-13 13:26:24 +01:00
Len Brown 6eb87fed52 ACPI: acpi_table_parse_madt_family() is not MADT specific
acpi_table_parse_madt_family() is also used to parse SRAT entries.
So re-name it to acpi_table_parse_entries(), and re-name the
madt-specific variables within it accordingly.

cosmetic only.

Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-13 02:58:52 -05:00
Len Brown 5a8765a84c ACPI: acpi_madt_entry_handler() is not MADT specific
acpi_madt_entry_handler() is also used for the SRAT,
so re-name it acpi_table_entry_handler().

cosmetic only.

Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-13 02:58:52 -05:00
Len Brown 7f8f97c3cc ACPI: acpi_table_parse() now returns success/fail, not count
Returning count for tables that are supposed to be unique
was useless and confusing.

Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-13 02:58:52 -05:00
Alexey Starikovskiy f3ccb06f3b ACPI: Disable wake GPEs only once.
fixes Suspend/Resume regressions due to recent ACPICA update.

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-13 02:35:50 -05:00
Len Brown 7cda93e008 ACPI: delete extra #defines in /drivers/acpi/ drivers
Cosmetic only.

Except in a single case, #define ACPI_*_DRIVER_NAME
were invoked 0 or 1 times.

Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-12 23:50:52 -05:00