Commit graph

396 commits

Author SHA1 Message Date
Len Brown
72945b2b90 [PATCH] Revert "ACPI: execute Notify() handlers on new thread"
This effectively reverts commit b8d35192c5
by reverts acpi_os_queue_for_execution() to what it was before that,
except it changes the name to acpi_os_execute() to match ACPICA
20060512.

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

[ The thread execution doesn't actually solve the bug it set out to
  solve (see

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

  for more details) because the new events can get caught behind the AML
  semaphore or other serialization.  And when that happens, the notify
  threads keep on piling up until the system dies. ]

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-12 21:02:24 -07:00
Linus Torvalds
c80dc60b03 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  ACPI: ACPI_DOCK: Initialize the atomic notifier list
  ACPI: acpi_os_allocate() fixes
  ACPI: SBS: fix initialization, sem2mutex
  ACPI: add 'const' to several ACPI file_operations
  ACPI: delete some defaults from ACPI Kconfig
  ACPI: "Device `[%s]' is not power manageable" make message debug only
  ACPI: ACPI_DOCK Kconfig
  Revert "Revert "ACPI: dock driver""
  ACPI: acpi_os_get_thread_id() returns current
  ACPI: ACPICA 20060707
2006-07-10 15:14:38 -07:00
Andi Kleen
46f6976101 [PATCH] x86_64: Fix up bogus defaults in ACPI Kconfig
No need for video to be always in
No need for smart battery driver to be always in

Acked-by: Len Brown <len.brown@intel.com>
Cc: linux-acpi@vger.kernel.org
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-10 15:12:33 -07:00
Konstantin Karasyov
bed936f7ea [PATCH] ACPI: fix fan/thermal resume
Daniel Ritz <daniel.ritz-ml@swissonline.ch> says:

The acpi driver suspend/resume patches that went in recently caused a regression
on my box (toshiba tecra 8000 laptop): after resume from swsusp the fan turns on
keeping blowing cold air out of my notebook. before the patches, the fan was off
and would only make noise when required. it's the same thing described in
bugzilla.kernel.org #5000. the acpi suspend/resume patches or at least parts of
them originate in this bug. now the last patch in the report (attach id 8438)
actually fixes the problem - for me and the reporter. this is a trimmed down
version of that patch.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Cc: Len Brown <len.brown@intel.com>
Cc: Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk>
Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-10 13:24:18 -07:00
Len Brown
0466684907 Pull dock into release branch 2006-07-10 14:20:17 -04:00
Kristen Accardi
07a18684c9 ACPI: ACPI_DOCK: Initialize the atomic notifier list
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-07-10 14:19:15 -04:00
Len Brown
c0dc250e89 Pull acpi_os_allocate into test branch 2006-07-10 02:39:47 -04:00
Len Brown
0f12b15ebc Pull acpica-20060707 into test branch 2006-07-10 02:39:41 -04:00
Len Brown
20b499aa06 Pull bugzilla-6687 into test branch 2006-07-10 02:39:36 -04:00
Len Brown
dece75b3a2 Pull dock into test branch 2006-07-10 02:39:33 -04:00
Len Brown
1a39ed5888 Pull trivial into test branch 2006-07-10 02:39:26 -04:00
Len Brown
e21c1ca3f9 ACPI: acpi_os_allocate() fixes
Replace acpi_in_resume with a more general hack
to check irqs_disabled() on any kmalloc() from ACPI.
While setting (system_state != SYSTEM_RUNNING) on resume
seemed more general, Andrew Morton preferred this approach.

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

Make acpi_os_allocate() into an inline function to
allow /proc/slab_allocators to work.

Delete some memset() that could fault on allocation failure.

Signed-off-by: Len Brown <len.brown@intel.com>
2006-07-10 02:37:22 -04:00
Andrew Morton
8970bfe706 ACPI: SBS: fix initialization, sem2mutex
cm_sbs_sem is being downed (via acpi_ac_init->acpi_lock_ac_dir) before it is
initialised, with grave results.

- Make it a mutex

- Initialise it

- Make it static

- Clean other stuff up.

Thanks to Paul Drynoff <pauldrynoff@gmail.com> for reporting and testing.

Cc: Rich Townsend <rhdt@bartol.udel.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-07-10 02:34:45 -04:00
Arjan van de Ven
d75080328a ACPI: add 'const' to several ACPI file_operations
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-07-10 00:04:29 -04:00
Andi Kleen
e26a2b8f68 ACPI: delete some defaults from ACPI Kconfig
No need for video to be always in
No need for ACPI dock driver to be always in
No need for smart battery driver to be always in

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-07-09 23:38:54 -04:00
Len Brown
af4f949c6b ACPI: "Device `[%s]' is not power manageable" make message debug only
Signed-off-by: Len Brown <len.brown@intel.com>
2006-07-09 23:30:00 -04:00
Len Brown
8d7bff6c08 ACPI: ACPI_DOCK Kconfig
HOTPLUG_PCI_ACPI depends on ACPI_DOCK
ACPI_IBM_DOCK depends on ACPI_DOCK=n
ACPI_DOCK is EXPERIMENTAL, though that doesn't seem to mean much

Signed-off-by: Len Brown <len.brown@intel.com>
2006-07-09 22:09:57 -04:00
Len Brown
c8f7a62cdd Revert "Revert "ACPI: dock driver""
This reverts 953969ddf5 commit.
2006-07-09 17:22:28 -04:00
Len Brown
ab8aa06a5c ACPI: acpi_os_get_thread_id() returns current
Linux mutexes and the debug code that that reference
acpi_os_get_thread_id() are happy with 0.
But the AML mutexes in exmutex.c expect a unique non-zero
number for each thread - as they track this thread_id
to permit the mutex re-entrancy defined by the ACPI spec.

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

Signed-off-by: Len Brown <len.brown@intel.com>
2006-07-09 15:19:44 -04:00
Bob Moore
f6dd9221dd ACPI: ACPICA 20060707
Added the ACPI_PACKED_POINTERS_NOT_SUPPORTED macro to
support C compilers that do not allow the initialization
of address pointers within packed structures - even though
the hardware itself may support misaligned transfers. Some
of the debug data structures are packed by default to
minimize size.

Added an error message for the case where
acpi_os_get_thread_id() returns zero. A non-zero value is
required by the core ACPICA code to ensure the proper
operation of AML mutexes and recursive control methods.

The DSDT is now the only ACPI table that determines whether
the AML interpreter is in 32-bit or 64-bit mode. Not really
a functional change, but the hooks for per-table 32/64
switching have been removed from the code. A clarification
to the ACPI specification is forthcoming in ACPI 3.0B.

Fixed a possible leak of an Owner ID in the error
path of tbinstal.c acpi_tb_init_table_descriptor() and
migrated all table OwnerID deletion to a single place in
acpi_tb_uninstall_table() to correct possible leaks when using
the acpi_tb_delete_tables_by_type() interface (with assistance
from Lance Ortiz.)

Fixed a problem with Serialized control methods where the
semaphore associated with the method could be over-signaled
after multiple method invocations.

Fixed two issues with the locking of the internal
namespace data structure. Both the Unload() operator and
acpi_unload_table() interface now lock the namespace during
the namespace deletion associated with the table unload
(with assistance from Linn Crosetto.)

Fixed problem reports (Valery Podrezov) integrated: -
Eliminate unnecessary memory allocation for CreateXxxxField
http://bugzilla.kernel.org/show_bug.cgi?id=5426

Fixed problem reports (Fiodor Suietov) integrated: -
Incomplete cleanup branches in AcpiTbGetTableRsdt (BZ 369)
- On Address Space handler deletion, needless deactivation
call (BZ 374) - AcpiRemoveAddressSpaceHandler: validate
Device handle parameter (BZ 375) - Possible memory leak,
Notify sub-objects of Processor, Power, ThermalZone (BZ
376) - AcpiRemoveAddressSpaceHandler: validate Handler
parameter (BZ 378) - Minimum Length of RSDT should be
validated (BZ 379) - AcpiRemoveNotifyHandler: return
AE_NOT_EXIST if Processor Obj has no Handler (BZ (380)
- AcpiUnloadTable: return AE_NOT_EXIST if no table of
specified type loaded (BZ 381)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-07-09 15:15:40 -04:00
Linus Torvalds
953969ddf5 Revert "ACPI: dock driver"
This reverts commit a5e1b94008.

Adrian Bunk points out that it has build errors, and apparently no
maintenance. Throw it out.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-09 08:47:46 -07:00
Linus Torvalds
e82ca04387 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (44 commits)
  ACPI: remove function tracing macros from drivers/acpi/*.c
  ACPI: add support for Smart Battery
  ACPI: handle battery notify event on broken BIOS
  ACPI: handle AC notify event on broken BIOS
  ACPI: asus_acpi: add S1N WLED control
  ACPI: asus_acpi: correct M6N/M6R display nodes
  ACPI: asus_acpi: add S1N WLED control
  ACPI: asus_acpi: rework model detection
  ACPI: asus_acpi: support L5D
  ACPI: asus_acpi: handle internal Bluetooth / support W5A
  ACPI: asus_acpi: support A4G
  ACPI: asus_acpi: support W3400N
  ACPI: asus_acpi: LED display support
  ACPI: asus_acpi: support A3G
  ACPI: asus_acpi: misc cleanups
  ACPI: video: Remove unneeded acpi_handle from driver.
  ACPI: thermal: Remove unneeded acpi_handle from driver.
  ACPI: power: Remove unneeded acpi_handle from driver.
  ACPI: pci_root: Remove unneeded acpi_handle from driver.
  ACPI: pci_link: Remove unneeded acpi_handle from driver.
  ...
2006-07-03 21:32:50 -07:00
Thomas Gleixner
dace145374 [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-02 13:58:50 -07:00
Len Brown
309b0f125a Pull smart-battery into release branch 2006-07-01 17:21:39 -04:00
Len Brown
d0e5f39f1e Pull bugzilla-3241 into release branch 2006-07-01 17:21:26 -04:00
Len Brown
361ea93cbf Pull asus_acpi-0.30 into release branch 2006-07-01 17:20:40 -04:00
Len Brown
5f765b8d68 Pull acpi_device_handle_cleanup into release branch 2006-07-01 17:19:34 -04:00
Len Brown
b197ba3c70 Pull acpi_os_free into release branch 2006-07-01 17:19:08 -04:00
Len Brown
635227ee89 ACPI: remove function tracing macros from drivers/acpi/*.c
a few invocations appeared due to the SBS and other patches.

Signed-off-by: Len Brown <len.brown@intel.com>
2006-07-01 16:48:23 -04:00
Rich Townsend
3f86b83243 ACPI: add support for Smart Battery
Most batteries today are ACPI "Control Method" batteries,
but some models ship with the older "Smart Battery"
that requires this code.

Rich Townsend and Bruno Ducrot were the original authors.
Vladimir Lebedev updated to run on latest kernel.

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

Signed-off-by: Len Brown <len.brown@intel.com>
2006-07-01 16:36:14 -04:00
Karol Kozimor
9becf5b91e ACPI: asus_acpi: correct M6N/M6R display nodes
This patch switches back the display nodes for M6R and M6N -- this happened
a while ago when a patch was misapplied (only the in-tree version was
affected).

Signed-off-by: Karol Kozimor <sziwan@hell.org.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-07-01 16:20:10 -04:00
Jae-hyeon Park
345a6e6aea [PATCH] ACPI: fix not power-manageable device message
Fix typo in message.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-01 09:55:58 -07:00
Vladimir Lebedev
9fdae72764 ACPI: handle battery notify event on broken BIOS
http://bugzilla.kernel.org/show_bug.cgi?id=3241

Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-07-01 12:13:49 -04:00
Christian Lupien
03d782524e ACPI: handle AC notify event on broken BIOS
http://bugzilla.kernel.org/show_bug.cgi?id=3241

updated by Vladimir Lebedev

Signed-off-by: Len Brown <len.brown@intel.com>
2006-07-01 12:09:27 -04:00
Len Brown
37672d4c52 Pull asus_acpi-0.30 into release branch 2006-07-01 11:06:01 -04:00
Len Brown
b2f71bade4 Pull acpi_device_handle_cleanup into release branch 2006-07-01 11:05:19 -04:00
Karol Kozimor
2df8386cec ACPI: asus_acpi: add S1N WLED control
This patch switches back the display nodes for M6R and M6N -- this happened
a while ago when a patch was misapplied (only the in-tree version was
affected).

Signed-off-by: Karol Kozimor <sziwan@hell.org.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-30 20:38:10 -04:00
Karol Kozimor
96d1142084 ACPI: asus_acpi: add S1N WLED control
This small patch adds back WLED control for S1N models, this was
accidentally removed a while ago.

Signed-off-by: Karol Kozimor <sziwan@hell.org.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-30 20:38:02 -04:00
Karol Kozimor
ffab0d9507 ACPI: asus_acpi: rework model detection
This patch reworks laptop model detection.

This addresses the Samsung P30 issue, where the INIT method would return no
object, but the implicit return in the AML interpreter would confuse the
driver. It also accounts for a newer batch of Asus models whose INIT
returns ACPI_TYPE_BUFFER instead of STRING.

The handling is now much leaner, if we get a buffer or a string, we check
against known values, in every other case we use a different path
(currently DSDT signatures). The bulk of this patch is separating the
string matching from asus_hotk_get_info() into a separate function.

This patch properly fixes http://bugme.osdl.org/show_bug.cgi?id=5067 and
http://bugme.osdl.org/show_bug.cgi?id=5092 and makes the driver fully
functional again with acpi=strict on all machines.

Signed-off-by: Karol Kozimor <sziwan@hell.org.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-30 20:37:50 -04:00
Karol Kozimor
ebccb84810 ACPI: asus_acpi: support L5D
This patch adds support for Asus L5D and thus fixes
http://bugme.osdl.org/show_bug.cgi?id=4695

Signed-off-by: Karol Kozimor <sziwan@hell.org.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-30 20:37:40 -04:00
Karol Kozimor
e067aaa761 ACPI: asus_acpi: handle internal Bluetooth / support W5A
This patch creates a new file named "bluetooth" under /proc/acpi/asus/.
This file controls both the internal Bluetooth adapter's presence on the
USB bus and the associated LED.

echo 1 > /proc/acpi/asus/bluetooth to enable, 0 to disable.

Additionally, the patch add support for Asus W5A, the first model that uses
this feature.

Patch originally by Fernando A. P. Gomes.

Signed-off-by: Karol Kozimor <sziwan@hell.org.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-30 20:37:27 -04:00
Karol Kozimor
f78c589d10 ACPI: asus_acpi: support A4G
This patch adds support for Asus A4G.
Originally by Giuseppe Rota.

Signed-off-by: Karol Kozimor <sziwan@hell.org.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-30 20:35:12 -04:00
Karol Kozimor
c067a78997 ACPI: asus_acpi: support W3400N
This patch adds support for Asus W3400N.

Signed-off-by: Karol Kozimor <sziwan@hell.org.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-30 20:35:01 -04:00
Karol Kozimor
42cb891295 ACPI: asus_acpi: LED display support
This patch adds handling for front LED displays found on W1N and the like.
Additionally, W1N is given its own model_data instance.

Patch originally by Éric Burghard.

Signed-off-by: Karol Kozimor <sziwan@hell.org.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-30 20:34:06 -04:00
Karol Kozimor
ed2cb07b2b ACPI: asus_acpi: support A3G
This patch adds support for Asus A3G.

Signed-off-by: Karol Kozimor <sziwan@hell.org.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-30 20:33:02 -04:00
Karol Kozimor
a170a5317c ACPI: asus_acpi: misc cleanups
This patch updates the version string, copyright notices and does
whitespace cleanup (it looks weird, blame Lindent).

Signed-off-by: Karol Kozimor <sziwan@hell.org.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-30 20:32:55 -04:00
Len Brown
ba290ab7da Pull kmalloc into release branch 2006-06-30 20:07:01 -04:00
Linus Torvalds
22a3e233ca Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial:
  Remove obsolete #include <linux/config.h>
  remove obsolete swsusp_encrypt
  arch/arm26/Kconfig typos
  Documentation/IPMI typos
  Kconfig: Typos in net/sched/Kconfig
  v9fs: do not include linux/version.h
  Documentation/DocBook/mtdnand.tmpl: typo fixes
  typo fixes: specfic -> specific
  typo fixes in Documentation/networking/pktgen.txt
  typo fixes: occuring -> occurring
  typo fixes: infomation -> information
  typo fixes: disadvantadge -> disadvantage
  typo fixes: aquire -> acquire
  typo fixes: mecanism -> mechanism
  typo fixes: bandwith -> bandwidth
  fix a typo in the RTC_CLASS help text
  smb is no longer maintained

Manually merged trivial conflict in arch/um/kernel/vmlinux.lds.S
2006-06-30 15:39:30 -07:00
Adrian Bunk
9e5289f4dd ACPI: drivers/acpi/scan.c: make acpi_bus_type static
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-30 14:28:50 -04:00
Jörn Engel
6ab3d5624e Remove obsolete #include <linux/config.h>
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-30 19:25:36 +02:00