Archived
14
0
Fork 0
Commit graph

395 commits

Author SHA1 Message Date
Len Brown
6468463abd ACPI: un-export ACPI_ERROR() -- use printk(KERN_ERR...)
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-27 00:01:06 -04:00
Len Brown
cece929697 ACPI: un-export ACPI_WARNING() -- use printk(KERN_WARNING...)
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-27 00:00:54 -04:00
Jae-hyeon Park
64dedfb8fd ACPI: Device [kobj-name] is not power manageable
print kobj name in this message.
lenb changed to use printk.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-27 00:00:40 -04:00
Bjorn Helgaas
9e7e2c0475 ACPI: acpi_os_wait_semaphore(): silence complaint
The ASL Acquire operator (17.5.1 in ACPI 3.0 spec) is allowed to time out
and return True without acquiring the semaphore.  There's no indication in
the spec that this is an actual error, so this message should be
debug-only, as the message for successful acquisition is.

This used to be an ACPI_DEBUG_PRINT, but it was mis-classified as
ACPI_DB_ERROR rather than ACPI_DB_MUTEX, so it got swept up in Thomas'
recent patch to enable ACPI error messages even without CONFIG_ACPI_DEBUG.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-27 00:00:21 -04:00
Thomas Renninger
be63c925a1 ACPI: Export symbols for ACPI_ERROR/EXCEPTION/WARNING macros
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-26 23:59:51 -04:00
Thomas Renninger
a6fc67202e ACPI: Enable ACPI error messages w/o CONFIG_ACPI_DEBUG
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-26 23:58:43 -04:00
Linus Torvalds
81a07d7588 Merge branch 'x86-64'
* x86-64: (83 commits)
  [PATCH] x86_64: x86_64 stack usage debugging
  [PATCH] x86_64: (resend) x86_64 stack overflow debugging
  [PATCH] x86_64: msi_apic.c build fix
  [PATCH] x86_64: i386/x86-64 Add nmi watchdog support for new Intel CPUs
  [PATCH] x86_64: Avoid broadcasting NMI IPIs
  [PATCH] x86_64: fix apic error on bootup
  [PATCH] x86_64: enlarge window for stack growth
  [PATCH] x86_64: Minor string functions optimizations
  [PATCH] x86_64: Move export symbols to their C functions
  [PATCH] x86_64: Standardize i386/x86_64 handling of NMI_VECTOR
  [PATCH] x86_64: Fix modular pc speaker
  [PATCH] x86_64: remove sys32_ni_syscall()
  [PATCH] x86_64: Do not use -ffunction-sections for modules
  [PATCH] x86_64: Add cpu_relax to apic_wait_icr_idle
  [PATCH] x86_64: adjust kstack_depth_to_print default
  [PATCH] i386/x86-64: adjust /proc/interrupts column headings
  [PATCH] x86_64: Fix race in cpu_local_* on preemptible kernels
  [PATCH] x86_64: Fix fast check in safe_smp_processor_id
  [PATCH] x86_64: x86_64 setup.c - printing cmp related boottime information
  [PATCH] i386/x86-64/ia64: Move polling flag into thread_info_status
  ...

Manual resolve of trivial conflict in arch/i386/kernel/Makefile
2006-06-26 10:51:09 -07:00
Andi Kleen
495ab9c045 [PATCH] i386/x86-64/ia64: Move polling flag into thread_info_status
During some profiling I noticed that default_idle causes a lot of
memory traffic. I think that is caused by the atomic operations
to clear/set the polling flag in thread_info. There is actually
no reason to make this atomic - only the idle thread does it
to itself, other CPUs only read it. So I moved it into ti->status.

Converted i386/x86-64/ia64 for now because that was the easiest
way to fix ACPI which also manipulates these flags in its idle
function.

Cc: Nick Piggin <npiggin@novell.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 10:48:21 -07:00
john stultz
539eb11e6e [PATCH] Time: i386 Conversion - part 2: Rework TSC Support
As part of the i386 conversion to the generic timekeeping infrastructure, this
introduces a new tsc.c file.  The code in this file replaces the TSC
initialization, management and access code currently in timer_tsc.c (which
will be removed) that we want to preserve.

The code also introduces the following functionality:

o tsc_khz: like cpu_khz but stores the TSC frequency on systems that do not
  change TSC frequency w/ CPU frequency

o check/mark_tsc_unstable: accessor/modifier flag for TSC timekeeping
  usability

o minor cleanups to calibration math.

This patch also includes a one line __cpuinitdata fix from Zwane Mwaikambo.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:21 -07:00
Venkatesh Pallipadi
46f18e3a28 ACPI: HW P-state coordination support
Treat HW coordination as independent CPUs.
This enables per-cpu monintoring of P-states

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

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-26 00:34:43 -04:00
Dave Jones
d384ea691f [PATCH] fix typo in acpi video brightness changes.
Prevent possible null dereference due to misplaced ;

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-23 21:37:34 -07:00
Linus Torvalds
37224470c8 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: (65 commits)
  ACPI: suppress power button event on S3 resume
  ACPI: resolve merge conflict between sem2mutex and processor_perflib.c
  ACPI: use for_each_possible_cpu() instead of for_each_cpu()
  ACPI: delete newly added debugging macros in processor_perflib.c
  ACPI: UP build fix for bugzilla-5737
  Enable P-state software coordination via _PDC
  P-state software coordination for speedstep-centrino
  P-state software coordination for acpi-cpufreq
  P-state software coordination for ACPI core
  ACPI: create acpi_thermal_resume()
  ACPI: create acpi_fan_suspend()/acpi_fan_resume()
  ACPI: pass pm_message_t from acpi_device_suspend() to root_suspend()
  ACPI: create acpi_device_suspend()/acpi_device_resume()
  ACPI: replace spin_lock_irq with mutex for ec poll mode
  ACPI: Allow a WAN module enable/disable on a Thinkpad X60.
  sem2mutex: acpi, acpi_link_lock
  ACPI: delete unused acpi_bus_drivers_lock
  sem2mutex: drivers/acpi/processor_perflib.c
  ACPI add ia64 exports to build acpi_memhotplug as a module
  ACPI: asus_acpi_init(): propagate correct return value
  ...

Manual resolve of conflicts in:

	arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
	arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
	include/acpi/processor.h
2006-06-23 07:52:36 -07:00
Andreas Mohr
9f22271898 [PATCH] make ACPI errata __read_mostly
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-23 07:42:57 -07:00
Yasunori Goto
762834e8bf [PATCH] Unify pxm_to_node() and node_to_pxm()
Consolidate the various arch-specific implementations of pxm_to_node() and
node_to_pxm() into a single generic version.

Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-23 07:42:48 -07:00
Linus Torvalds
5603509137 Make sure to re-enable SCI after an ACPI suspend
According to the ACPI spec, it should be enabled on return from suspend,
but bugs happen.  Apparently especially on the Apple Intel Macs.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-19 18:05:09 -07:00
Len Brown
5b4b7a236e Pull button into release branch 2006-06-15 23:17:14 -04:00
Arnaud Patard
872d83d00f ACPI: suppress power button event on S3 resume
http://bugzilla.kernel.org/show_bug.cgi?id=6612

Note that this fix depends on a fix in ACPICA 20060608
to replace a semaphore with a spin-lock.

Signed-off-by: Arnaud Patard <apatard@mandriva.com>
Acked-by: "Yu, Luming" <luming.yu@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-15 23:16:05 -04:00
Len Brown
785fcccd68 ACPI: resolve merge conflict between sem2mutex and processor_perflib.c
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-15 22:19:31 -04:00
Len Brown
d42510a0f5 Pull bugzilla-5737 into release branch
Conflicts:

	arch/x86_64/kernel/acpi/processor.c
2006-06-15 21:39:25 -04:00
Len Brown
8f2ddb37e5 Pull bugzilla-5000 into release branch 2006-06-15 21:36:11 -04:00
Len Brown
5b542e4422 Pull bugzilla-5764 into release branch 2006-06-15 21:34:21 -04:00
Len Brown
e4151eaa7f Pull ibm_acpi into release branch 2006-06-15 21:33:36 -04:00
Len Brown
c080a3e69d Pull sem2mutex into release branch 2006-06-15 21:31:47 -04:00
Len Brown
bf891bd65d Pull trivial2 into release branch 2006-06-15 21:31:17 -04:00
Len Brown
de59e3aa6e Pull video into release branch 2006-06-15 21:30:59 -04:00
Len Brown
69cd291c6b Pull acpi_bus_register_driver into release branch
Conflicts:

	drivers/acpi/asus_acpi.c
	drivers/acpi/scan.c
2006-06-15 21:28:57 -04:00
Len Brown
35a5d9ed9f Pull bugzilla-5452 into release branch 2006-06-15 15:42:14 -04:00
Len Brown
36a557d1f4 Pull trivial into release branch 2006-06-15 15:40:39 -04:00
Len Brown
63518472c0 Pull trivial1 into release branch 2006-06-15 15:37:09 -04:00
Len Brown
3145012c1c Pull motherboard into release branch 2006-06-15 15:36:16 -04:00
Len Brown
1465887cfe Pull Kconfig into release branch 2006-06-15 15:35:57 -04:00
Len Brown
60e04a5c53 Pull ec into release branch 2006-06-15 15:35:37 -04:00
Len Brown
61fb46c5b3 Pull cpu-hotplug into release branch 2006-06-15 15:35:15 -04:00
Len Brown
59f720eb5a Pull address_range into release branch 2006-06-15 15:34:42 -04:00
Len Brown
b3899c6613 Pull acpica into release branch 2006-06-15 15:19:48 -04:00
Bob Moore
4c90ece249 ACPI: ACPICA 20060608
Converted the locking mutex used for the ACPI hardware
to a spinlock. This change should eliminate all problems
caused by attempting to acquire a semaphore at interrupt
level, and it means that all ACPICA external interfaces
that directly access the ACPI hardware can be safely
called from interrupt level.

Fixed a regression introduced in 20060526 where the ACPI
device initialization could be prematurely aborted with
an AE_NOT_FOUND if a device did not have an optional
_INI method.

Fixed an IndexField issue where a write to the Data
Register should be limited in size to the AccessSize
(width) of the IndexField itself. (BZ 433, Fiodor Suietov)

Fixed problem reports (Valery Podrezov) integrated: - Allow
store of ThermalZone objects to Debug object.
http://bugzilla.kernel.org/show_bug.cgi?id=5369
http://bugzilla.kernel.org/show_bug.cgi?id=5370

Fixed problem reports (Fiodor Suietov) integrated: -
acpi_get_table_header() doesn't handle multiple instances
correctly (BZ 364)

Removed four global mutexes that were obsolete and were
no longer being used.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-14 02:45:47 -04:00
Bob Moore
4119532c95 ACPI: ACPICA 20060526
Restructured, flattened, and simplified the internal
interfaces for namespace object evaluation - resulting
in smaller code, less CPU stack use, and fewer
interfaces. (With assistance from Mikhail Kouzmich)

Fixed a problem with the CopyObject operator where the
first parameter was not typed correctly for the parser,
interpreter, compiler, and disassembler. Caused various
errors and unexpected behavior.

Fixed a problem where a ShiftLeft or ShiftRight of
more than 64 bits produced incorrect results with some
C compilers. Since the behavior of C compilers when
the shift value is larger than the datatype width is
apparently not well defined, the interpreter now detects
this condition and simply returns zero as expected in all
such cases. (BZ 395)

Fixed problem reports (Valery Podrezov) integrated: -
Update String-to-Integer conversion to match ACPI 3.0A spec
http://bugzilla.kernel.org/show_bug.cgi?id=5329
Allow interpreter to handle nested method declarations
http://bugzilla.kernel.org/show_bug.cgi?id=5361

Fixed problem reports (Fiodor Suietov) integrated: -
acpi_terminate() doesn't free debug memory allocation
list objects (BZ 355) - After Core Subsystem
shutdown, acpi_subsystem_status() returns AE_OK (BZ 356) -
acpi_os_unmap_memory() for RSDP can be invoked inconsistently
(BZ 357) - Resource Manager should return AE_TYPE for
non-device objects (BZ 358) - Incomplete cleanup branch
in AcpiNsEvaluateRelative (BZ 359) - Use acpi_os_free()
instead of ACPI_FREE in acpi_rs_set_srs_method_data (BZ 360)
- Incomplete cleanup branch in acpi_ps_parse_aml (BZ 361) -
Incomplete cleanup branch in acpi_ds_delete_walk_state (BZ 362)
- acpi_get_table_header returns AE_NO_ACPI_TABLES until DSDT
is loaded (BZ 365) - Status of the Global Initialization
Handler call not used (BZ 366) - Incorrect object parameter
to Global Initialization Handler (BZ 367)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-14 02:44:35 -04:00
Alexey Starikovskiy
b8d35192c5 ACPI: execute Notify() handlers on new thread
http://bugzilla.kernel.org/show_bug.cgi?id=5534

Thanks to Peter Wainwright for isolating the issue.
Thanks to Andi Kleen and Bob Moore for feedback.
Thanks to Richard Mace and others for testing.
Updates by Konstantin Karasyov.

Signed-off-by: Konstantin Karasyov <konstantin.a.karasyov@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-14 02:43:23 -04:00
Bob Moore
958dd242b6 ACPI: ACPICA 20060512
Replaced the acpi_os_queue_for_execution() with a new
interface named acpi_os_execute(). The major difference is
that the new interface does not have a Priority parameter,
this appeared to be useless and has been replaced by
a Type parameter. The Type tells the OS what type of
execution is being requested, such as global lock handler,
notify handler, GPE handler, etc. This allows the host
to queue and execute the request as appropriate for the
request type, possibly using different work queues and
different priorities for the various request types. This
enables fixes for multithreading deadlock problems such as
http://bugzilla.kernel.org/show_bug.cgi?id=5534
(Alexey Starikovskiy and Bob Moore)

Fixed a possible memory leak associated with the
support for the so-called "implicit return" ACPI
extension. Reported by FreeBSD  (Fiodor Suietov)
http://bugzilla.kernel.org/show_bug.cgi?id=6514

Fixed a problem with the Load() operator where a table
load from an operation region could overwrite an internal
table buffer by up to 7 bytes and cause alignment faults
on IPF systems. (With assistance from Luming Yu)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-14 02:34:48 -04:00
Bob Moore
b229cf92ee ACPI: ACPICA 20060421
Removed a device initialization optimization introduced in
20051216 where the _STA method was not run unless an _INI
was also present for the same device. This optimization
could cause problems because it could allow _INI methods
to be run within a not-present device subtree (If a
not-present device had no _INI, _STA would not be run,
the not-present status would not be discovered, and the
children of the device would be incorrectly traversed.)

Implemented a new _STA optimization where namespace
subtrees that do not contain _INI are identified and
ignored during device initialization. Selectively running
_STA can significantly improve boot time on large machines
(with assistance from Len Brown.)

Implemented support for the device initialization case
where the returned _STA flags indicate a device not-present
but functioning. In this case, _INI is not run, but the
device children are examined for presence, as per the
ACPI specification.

Implemented an additional change to the IndexField support
in order to conform to MS behavior. The value written to
the Index Register is not simply a byte offset, it is a
byte offset in units of the access width of the parent
Index Field. (Fiodor Suietov)

Defined and deployed a new OSL interface,
acpi_os_validate_address().  This interface is called during
the creation of all AML operation regions, and allows
the host OS to exert control over what addresses it will
allow the AML code to access. Operation Regions whose
addresses are disallowed will cause a runtime exception
when they are actually accessed (will not affect or abort
table loading.)

Defined and deployed a new OSL interface,
acpi_os_validate_interface().  This interface allows the host OS
to match the various "optional" interface/behavior strings
for the _OSI predefined control method as appropriate
(with assistance from Bjorn Helgaas.)

Restructured and corrected various problems in the
exception handling code paths within DsCallControlMethod
and DsTerminateControlMethod in dsmethod (with assistance
from Takayoshi Kochi.)

Modified the Linux source converter to ignore quoted string
literals while converting identifiers from mixed to lower
case. This will correct problems with the disassembler
and other areas where such strings must not be modified.

The ACPI_FUNCTION_* macros no longer require quotes around
the function name. This allows the Linux source converter
to convert the names, now that the converter ignores
quoted strings.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-14 02:30:55 -04:00
Bob Moore
793c2388ca ACPI: ACPICA 20060331
Implemented header file support for the following
additional ACPI tables: ASF!, BOOT, CPEP, DBGP, MCFG, SPCR,
SPMI, TCPA, and WDRT. With this support, all current and
known ACPI tables are now defined in the ACPICA headers and
are available for use by device drivers and other software.

Implemented support to allow tables that contain ACPI
names with invalid characters to be loaded. Previously,
this would cause the table load to fail, but since
there are several known cases of such tables on
existing machines, this change was made to enable
ACPI support for them. Also, this matches the
behavior of the Microsoft ACPI implementation.
https://bugzilla.novell.com/show_bug.cgi?id=147621

Fixed a couple regressions introduced during the memory
optimization in the 20060317 release. The namespace
node definition required additional reorganization and
an internal datatype that had been changed to 8-bit was
restored to 32-bit. (Valery Podrezov)

Fixed a problem where a null pointer passed to
acpi_ut_delete_generic_state() could be passed through
to acpi_os_release_object which is unexpected. Such
null pointers are now trapped and ignored, matching
the behavior of the previous implementation before the
deployment of acpi_os_release_object().  (Valery Podrezov,
Fiodor Suietov)

Fixed a memory mapping leak during the deletion of
a SystemMemory operation region where a cached memory
mapping was not deleted. This became a noticeable problem
for operation regions that are defined within frequently
used control methods. (Dana Meyers)

Reorganized the ACPI table header files into two main
files: one for the ACPI tables consumed by the ACPICA core,
and another for the miscellaneous ACPI tables that are
consumed by the drivers and other software. The various
FADT definitions were merged into one common section and
three different tables (ACPI 1.0, 1.0+, and 2.0)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-14 02:04:16 -04:00
Bob Moore
61686124f4 [ACPI] ACPICA 20060317
Implemented the use of a cache object for all internal
namespace nodes. Since there are about 1000 static nodes
in a typical system, this will decrease memory use for
cache implementations that minimize per-allocation overhead
(such as a slab allocator.)

Removed the reference count mechanism for internal
namespace nodes, since it was deemed unnecessary. This
reduces the size of each namespace node by about 5%-10%
on all platforms. Nodes are now 20 bytes for the 32-bit
case, and 32 bytes for the 64-bit case.

Optimized several internal data structures to reduce
object size on 64-bit platforms by packing data within
the 64-bit alignment. This includes the frequently used
ACPI_OPERAND_OBJECT, of which there can be ~1000 static
instances corresponding to the namespace objects.

Added two new strings for the predefined _OSI method:
"Windows 2001.1 SP1" and "Windows 2006".

Split the allocation tracking mechanism out to a separate
file, from utalloc.c to uttrack.c. This mechanism appears
to be only useful for application-level code. Kernels may
wish to not include uttrack.c in distributions.

Removed all remnants of the obsolete ACPI_REPORT_* macros
and the associated code. (These macros have been replaced
by the ACPI_ERROR and ACPI_WARNING macros.)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-14 01:22:20 -04:00
Andrew Morton
a913f50706 [PATCH] powernow-k8 crash workaround
From: Andrew Morton <akpm@osdl.org>

Work around the oops reported in
http://bugzilla.kernel.org/show_bug.cgi?id=6478.

Thanks to Ralf Hildebrandt <ralf.hildebrandt@charite.de> for testing and
reporting.

Acked-by: Dave Jones <davej@codemonkey.org.uk>
Cc: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-10 11:02:05 -07:00
Jeremy Fitzhardinge
42adb53cb3 ACPI: Allow a WAN module enable/disable on a Thinkpad X60.
The WAN (Sierra Wireless EV-DO) module is very similar to the
Bluetooth module.  It appears on the USB bus when enabled.  It can be
controlled via hot key, or directly via ACPI.  This change enables
direct control via ACPI.

I have tested it on my Lenovo Thinkpad X60; I guess it will probably
work on other Thinkpad models which come with this module installed.

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
Ack'd by: Borislav Deianov <borislav@users.sf.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-01 20:42:32 -04:00
Rich Townsend
f9a6ee1afb ACPI: replace spin_lock_irq with mutex for ec poll mode
http://bugzilla.kernel.org/show_bug.cgi?id=5764

Signed-off-by: Luming Yu <luming.yu@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-19 00:49:52 -04:00
Konstantin Karasyov
74ce146812 ACPI: create acpi_thermal_resume()
http://bugzilla.kernel.org/show_bug.cgi?id=4364

Signed-off-by: Konstantin Karasyov <konstantin.a.karasyov@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-15 03:27:32 -04:00
Konstantin Karasyov
0feabb01d9 ACPI: create acpi_fan_suspend()/acpi_fan_resume()
http://bugzilla.kernel.org/show_bug.cgi?id=5000

Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-15 03:16:45 -04:00
Len Brown
531881d665 ACPI: pass pm_message_t from acpi_device_suspend() to root_suspend()
in case we want to decode it for future use in acpi_op_suspend(..., state)

also, inline new 1-liner static function

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

Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-15 03:06:41 -04:00
Patrick Mochel
5b3272655a ACPI: create acpi_device_suspend()/acpi_device_resume()
updated and tested by Konstantin Karasyov

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

Signed-off-by: Patrick Mochel <patrick.mochel@intel.com>
Signed-off-by: Konstantin Karasyov <konstantin.karasyov @intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-15 02:44:47 -04:00
Yu, Luming
973bf491a5 ACPI: fix potential memory leaks in driver/acpi/video.c
acpi_video_bus_get_one_device() and other functions in driver/acpi/video.c do
not release allocated memory on remove and on the error path.

Signed-off-by: "Yu, Luming" <luming.yu@intel.com>
Signed-off-by: Vasily Averin <vvs@sw.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-15 02:05:48 -04:00
Andrew Morton
ebd5f2ca81 ACPI: asus_acpi_init(): propagate correct return value
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-15 01:26:20 -04:00
Andreas Mohr
b6835052a6 ACPI: apply "__read_mostly" to processor_idle.c loop module parameters and friends
make pm_idle_save, nocst and bm_history __read_mostly
remove initializer from static 'first_run'.

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-14 00:03:48 -04:00
Vasily Averin
09047e75f6 ACPI: fix memory leak in acpi_thermal_add() error path
Signed-off-by: Vasily Averin <vvs@sw.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-13 23:43:39 -04:00
Vasily Averin
64385f2fd8 ACPI: fix potential memory leak in acpi_evaluate_integer() error path
Signed-off-by: Vasily Averin <vvs@sw.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-13 23:38:24 -04:00
Bjorn Helgaas
06ea8e08ae ACPI: acpi_bus_unregister_driver() returns void
Nobody looks at the return value, and this brings it into line with
pci_unregister_driver(), etc.  Also removed validation of the driver
pointer passed in to register and unregister.  More consistent, and we'll
find bugs faster if we fault rather than returning an error that's ignored.

Also makes internal functions acpi_device_unregister() and
acpi_driver_detach() void, since nobody uses their returns either.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-13 23:23:57 -04:00
KAMEZAWA Hiroyuki
193de0c79d ACPI: use for_each_possible_cpu() instead of for_each_cpu()
for_each_cpu() actually iterates across all possible CPUs.  We've had mistakes
in the past where people were using for_each_cpu() where they should have been
iterating across only online or present CPUs.  This is inefficient and
possibly buggy.

We're renaming for_each_cpu() to for_each_possible_cpu() to avoid this in the
future.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-13 23:11:29 -04:00
Ingo Molnar
36e430951a sem2mutex: acpi, acpi_link_lock
Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-13 21:48:21 -04:00
Len Brown
415d320a23 ACPI: delete unused acpi_bus_drivers_lock
acpi_bus_drivers is protected by acpi_device_lock

Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-13 21:35:56 -04:00
Arjan van de Ven
65c19bbd28 sem2mutex: drivers/acpi/processor_perflib.c
Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-13 21:33:52 -04:00
Len Brown
9011bff4bd ACPI: delete newly added debugging macros in processor_perflib.c
Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-11 00:28:12 -04:00
Andi Kleen
9d99aaa31f [PATCH] x86_64: Support memory hotadd without sparsemem
Memory hotadd doesn't need SPARSEMEM, but can be handled by just preallocating
mem_maps. This only needs some untangling of ifdefs to enable the necessary
code even without SPARSEMEM.

Originally from Keith Mannthey, hacked by AK.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:16 -07:00
Bjorn Helgaas
e6f1f3c549 ACPI: Don't print internal BIOS names of wakeup devices
Internal BIOS names like these should be exposed
to the user as little as possible:

ACPI wakeup devices: C069 C0CE C1D1 C0DE C1D4

Eventually, the "wakeup" property of a device should be exported via the
device tree, not by a printk of an internal BIOS name.  For the hard-core,
these are still available in /proc/acpi/wakeup_devices, just not
printed to dmesg.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-03 16:06:47 -04:00
Ashok Raj
eefa27a93a ACPI: Allow hot-add of ejected processor
acpi_eject_store() didn't trim processors, causing subsequent
hot-add to fail.

Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01 22:45:30 -05:00
Jiri Slaby
ff2fc3e9e3 ACPI: EC acpi-ecdt-uid-hack
On some boxes ecdt uid may be equal to 0, so do not test for uids equality,
so that fake handler will be unconditionally removed to allow loading the
real one.

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

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Luming Yu <luming.yu@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01 22:33:06 -05:00
Ashok Raj
df42baa0d8 ACPI: build fix for u8 cpu_index
Local apic entries are only 8 bits, but it seemed to not be caught with u8
return value result in the check

cpu_index >= NR_CPUS becomming always false.

drivers/acpi/processor_core.c: In function `acpi_processor_get_info':
drivers/acpi/processor_core.c:483: warning: comparison is always false due to limited range of data type

Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Cc: Dave Jones <davej@codemonkey.org.uk>
Cc: Kenji Kaneshige <kaneshige.kenji@soft.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01 22:28:30 -05:00
Bjorn Helgaas
200739c179 ACPI: remove __init/__exit from Asus .add()/.remove() methods
Even though the devices claimed by asus_acpi.c can not be hot-plugged, the
driver registration infrastructure allows the .add() and .remove() methods to
be called at any time while the driver is registered.  So remove __init and
__exit from them.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01 22:20:49 -05:00
Bjorn Helgaas
459c7266d7 ACPI: fix memory hotplug range length handling
Address space descriptors contain _MIN, _MAX, and _LEN.  _MIN and _MAX are
the bounds within which the region can be moved (this is clarified in Table
6-38 of the ACPI 3.0 spec).  We should use _LEN to determine the size of
the region, not _MAX - _MIN + 1.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01 22:05:18 -05:00
Bjorn Helgaas
1a36561607 ACPI: simplify scan.c coding
No functional changes; just remove leftover, unused "buffer" and simplify
control flow (no need to remember error values and goto the end, when we can
simply return the value directly).

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01 21:53:51 -05:00
Bjorn Helgaas
578b333bfe ACPI: update asus_acpi driver registration to unload on failure
Remove the assumption that acpi_bus_register_driver() returns the number of
devices claimed.  Returning the count is unreliable because devices may be
hot-plugged in the future (admittedly not applicable for this driver).

Since the hardware for this driver is not hot-pluggable, determine whether the
hardware is present by noticing calls to the .add() method.  It would be
better to probe the ACPI namespace for the ASUS HIDs, and load the driver only
when we find one, but ACPI doesn't support that yet.

I don't have an ASUS laptop to test on, but on my HP dl360, it does report the
appropriate error when attempting to load the module:

    $ sudo insmod drivers/acpi/asus_acpi.ko
    insmod: error inserting 'drivers/acpi/asus_acpi.ko': -1 No such device

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01 21:48:08 -05:00
Bjorn Helgaas
9d9f749b31 ACPI: make acpi_bus_register_driver() return success/failure, not device count
acpi_bus_register_driver() should not return the number of devices claimed.
We're not asking to find devices, we're making a driver available to devices,
including hot-pluggable devices that may appear in the future.

I audited all callers of acpi_bus_register_driver(), and except asus_acpi.c
and sonypi.c (fixed in previous patches), all either ignore the return value
or test only for failure (<0).

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01 21:42:57 -05:00
Bjorn Helgaas
cd090eedd8 ACPI: Display "ACPI" to motherboard resources in /proc/io{mem,port}
Add "ACPI" to motherboard resource allocation names, so people have a clue
about where to look.  And remove some trailing spaces.

Changes these /proc/iomem entries from this:

    ff5c1004-ff5c1007 : PM_TMR
    ff5c1008-ff5c100b : PM1a_EVT_BLK
    ff5c100c-ff5c100d : PM1a_CNT_BLK
    ff5c1010-ff5c1013 : GPE0_BLK
    ff5c1014-ff5c1017 : GPE1_BLK

to this:

    ff5c1004-ff5c1007 : ACPI PM_TMR
    ff5c1008-ff5c100b : ACPI PM1a_EVT_BLK
    ff5c100c-ff5c100d : ACPI PM1a_CNT_BLK
    ff5c1010-ff5c1013 : ACPI GPE0_BLK
    ff5c1014-ff5c1017 : ACPI GPE1_BLK

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01 21:33:00 -05:00
Bjorn Helgaas
81507ea9cf ACPI: request correct fixed hardware resource type (MMIO vs I/O port)
ACPI supports fixed hardware (PM_TMR, GPE blocks, etc) in either I/O port
or MMIO space, but used to always request the regions from I/O space
because it didn't check the address_space_id.

Sample ACPI fixed hardware in MMIO space (HP rx2600), was incorrectly
reported in /proc/ioports, now reported in /proc/iomem:

    ff5c1004-ff5c1007 : PM_TMR
    ff5c1008-ff5c100b : PM1a_EVT_BLK
    ff5c100c-ff5c100d : PM1a_CNT_BLK
    ff5c1010-ff5c1013 : GPE0_BLK
    ff5c1014-ff5c1017 : GPE1_BLK

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01 21:31:29 -05:00
Adrian Bunk
1300124f69 ACPI: Kconfig: ACPI should depend on, not select PCI
Otherwise, illegal configurations like X86_VOYAGER=y, PCI=y are
possible.

This patch also fixes the options select'ing ACPI to also select PCI.

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-04-01 21:07:42 -05:00
Len Brown
ec7381d6bf ACPI: inline trivial acpi_os_get_thread_id()
acpi_os_get_thread_id() is used only for debugging
code that is not enabled on Linux, so stub it out.

Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01 05:12:23 -05:00
Bob Moore
8313524a0d ACPI: ACPICA 20060310
Tagged all external interfaces to the subsystem with the
new ACPI_EXPORT_SYMBOL macro. This macro can be defined
as necessary to assist kernel integration. For Linux,
the macro resolves to the EXPORT_SYMBOL macro. The default
definition is NULL.

Added the ACPI_THREAD_ID type for the return value from
acpi_os_get_thread_id(). This allows the host to define this
as necessary to simplify kernel integration. The default
definition is ACPI_NATIVE_UINT.

Valery Podrezov fixed two interpreter problems related
to error processing, the deletion of objects, and placing
invalid pointers onto the internal operator result stack.
http://bugzilla.kernel.org/show_bug.cgi?id=6028
http://bugzilla.kernel.org/show_bug.cgi?id=6151

Increased the reference count threshold where a warning is
emitted for large reference counts in order to eliminate
unnecessary warnings on systems with large namespaces
(especially 64-bit.) Increased the value from 0x400
to 0x800.

Due to universal disagreement as to the meaning of the
'c' in the calloc() function, the ACPI_MEM_CALLOCATE
macro has been renamed to ACPI_ALLOCATE_ZEROED so that the
purpose of the interface is 'clear'. ACPI_MEM_ALLOCATE and
ACPI_MEM_FREE are renamed to ACPI_ALLOCATE and ACPI_FREE.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01 01:26:39 -05:00
Bob Moore
ea936b78f4 ACPI: ACPICA 20060217
Implemented a change to the IndexField support to match
the behavior of the Microsoft AML interpreter. The value
written to the Index register is now a byte offset,
no longer an index based upon the width of the Data
register. This should fix IndexField problems seen on
some machines where the Data register is not exactly one
byte wide. The ACPI specification will be clarified on
this point.

Fixed a problem where several resource descriptor
types could overrun the internal descriptor buffer due
to size miscalculation: VendorShort, VendorLong, and
Interrupt. This was noticed on IA64 machines, but could
affect all platforms.

Fixed a problem where individual resource descriptors were
misaligned within the internal buffer, causing alignment
faults on IA64 platforms.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01 01:23:23 -05:00
OGAWA Hirofumi
9b41046cd0 [PATCH] Don't pass boot parameters to argv_init[]
The boot cmdline is parsed in parse_early_param() and
parse_args(,unknown_bootoption).

And __setup() is used in obsolete_checksetup().

	start_kernel()
		-> parse_args()
			-> unknown_bootoption()
				-> obsolete_checksetup()

If __setup()'s callback (->setup_func()) returns 1 in
obsolete_checksetup(), obsolete_checksetup() thinks a parameter was
handled.

If ->setup_func() returns 0, obsolete_checksetup() tries other
->setup_func().  If all ->setup_func() that matched a parameter returns 0,
a parameter is seted to argv_init[].

Then, when runing /sbin/init or init=app, argv_init[] is passed to the app.
If the app doesn't ignore those arguments, it will warning and exit.

This patch fixes a wrong usage of it, however fixes obvious one only.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-31 12:18:53 -08:00
Bob Moore
52fc0b026e [ACPI] ACPICA 20060210
Removed a couple of extraneous ACPI_ERROR messages that
appeared during normal execution. These became apparent
after the conversion from ACPI_DEBUG_PRINT.

Fixed a problem where the CreateField operator could hang
if the BitIndex or NumBits parameter referred to a named
object. From Valery Podrezov.
http://bugzilla.kernel.org/show_bug.cgi?id=5359

Fixed a problem where a DeRefOf operation on a buffer
object incorrectly failed with an exception. This also
fixes a couple of related RefOf and DeRefOf issues.
From Valery Podrezov.
http://bugzilla.kernel.org/show_bug.cgi?id=5360
http://bugzilla.kernel.org/show_bug.cgi?id=5387
http://bugzilla.kernel.org/show_bug.cgi?id=5392

Fixed a problem where the AE_BUFFER_LIMIT exception was
returned instead of AE_STRING_LIMIT on an out-of-bounds
Index() operation. From Valery Podrezov.
http://bugzilla.kernel.org/show_bug.cgi?id=5480

Implemented a memory cleanup at the end of the execution
of each iteration of an AML While() loop, preventing the
accumulation of outstanding objects. From Valery Podrezov.
http://bugzilla.kernel.org/show_bug.cgi?id=5427

Eliminated a chunk of duplicate code in the object
resolution code. From Valery Podrezov.
http://bugzilla.kernel.org/show_bug.cgi?id=5336

Fixed several warnings during the 64-bit code generation.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-03-31 02:19:03 -05:00
Len Brown
46358614ed Revert "[PATCH] ACPI: fix vendor resource length computation"
fixed in a different way by a subsequent ACPICA patch

This reverts 35b73ceb9a commit.
2006-03-31 02:16:19 -05:00
Adrian Bunk
6665bda764 [ACPI] drivers/acpi/video.c: fix error path NULL pointer dereference
The Coverity checker spotted this bug in
acpi_video_device_lcd_query_levels().

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-03-31 01:02:39 -05:00
Dave Jones
fdc136ccd3 [ACPI] fix possible acpi thermal leak in failure path
Coverity: #601

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-03-31 01:02:39 -05:00
Irwan Djajadi
1fee940349 [ACPI] drivers/acpi/hotkey.c: check kmalloc return value
Signed-off-by: Irwan Djajadi <irwan.djajadi@iname.com>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-03-31 01:02:39 -05:00
Len Brown
0eacee585a ACPI: enable BIOS warning
http://bugzilla.kernel.org/show_bug.cgi?id=5452

Signed-off-by: Len Brown <len.brown@intel.com>
2006-03-31 00:37:23 -05:00
Akinobu Mita
0b28002fdf [PATCH] more s/fucn/func/ typo fixes
s/fucntion/function/ typo fixes

Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-26 08:57:09 -08:00
Bjorn Helgaas
9f4fd61fa7 [PATCH] ACPI: clean up memory attribute checking for map/read/write
ia64 ioremap is now smart enough to use the correct memory attributes, so
remove the EFI checks from osl.c.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Cc: "Tolentino, Matthew E" <matthew.e.tolentino@intel.com>
Cc: "Brown, Len" <len.brown@intel.com>
Cc: Andi Kleen <ak@muc.de>
Acked-by: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-26 08:56:54 -08:00
Tolentino, Matthew E
23dd842c00 [PATCH] EFI fixes
Here's a patch that fixes EFI boot for x86 on 2.6.16-rc5-mm3.  The
off-by-one is admittedly my fault, but the other two fix up the rest.

Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Cc: "Tolentino, Matthew E" <matthew.e.tolentino@intel.com>
Cc: "Brown, Len" <len.brown@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-26 08:56:54 -08:00
Bjorn Helgaas
b2c99e3c70 [PATCH] EFI: keep physical table addresses in efi structure
Almost all users of the table addresses from the EFI system table want
physical addresses.  So rather than doing the pa->va->pa conversion, just keep
physical addresses in struct efi.

This fixes a DMI bug: the efi structure contained the physical SMBIOS address
on x86 but the virtual address on ia64, so dmi_scan_machine() used ioremap()
on a virtual address on ia64.

This is essentially the same as an earlier patch by Matt Tolentino:
	http://marc.theaimsgroup.com/?l=linux-kernel&m=112130292316281&w=2
except that this changes all table addresses, not just ACPI addresses.

Matt's original patch was backed out because it caused MCAs on HP sx1000
systems.  That problem is resolved by the ioremap() attribute checking added
for ia64.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Cc: "Tolentino, Matthew E" <matthew.e.tolentino@intel.com>
Cc: "Brown, Len" <len.brown@intel.com>
Cc: Andi Kleen <ak@muc.de>
Acked-by: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-26 08:56:54 -08:00
Andi Kleen
0b5c59a1e4 [PATCH] Fix compilation of processor_idle.c on IA64
Broken earlier by me by a x86-64 patch.

The code was optimized away, but the compiler still complained about an
undeclared function.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-25 20:19:29 -08:00
Andi Kleen
bd66334769 [PATCH] x86_64: Force broadcast timer on AMD systems with C3 too.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-25 09:10:56 -08:00
Andi Kleen
f083a329e6 [PATCH] x86_64: Clean up and tweak ACPI blacklist year code
- Move the core parser into dmi_scan.c.  It can be useful for other
   subsystems too.
 - Differentiate between field doesn't exist and field is 0 or
   unparseable.  The first case is likely an old BIOS with broken ACPI,
   the later is likely a slightly buggy BIOS where someone forget to
   edit the date.  Don't blacklist in the later case.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-25 09:10:54 -08:00
Uwe Zeisberger
c30fe7f731 fix typos "wich" -> "which"
Signed-off-by: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-03-24 18:23:14 +01:00
Kristen Accardi
63e5f248c4 [PATCH] acpi: remove dock event handling from ibm_acpi
Remove dock station support from ibm_acpi by default.  This support has
been put into acpiphp instead.  Allow ibm_acpi to continue to provide
docking station support via config option for laptops/docking stations
that are not supported by acpiphp.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:35:15 -08:00
Kristen Accardi
ceaba66305 [PATCH] acpi: export acpi_bus_trim
Export the acpi_bus_trim function so that the pci hotplug driver can
use it.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:35:15 -08:00
Andi Kleen
2eb1bdbad8 [PATCH] x86_64: Disable ACPI blacklist by year for now on x86-64
ACPI is initialized very early on x86-64, before the DMI code is
initialized.  This means it would often discover a 0 year and then turn
off ACPI because it thought the BIOS was too old.  Some systems don't
boot without ACPI so this was a problem.

I have a full fix by adding new very early DMI detection, but it needs
more testing before it can be merged.  For 2.6.16 let's just turn the
check off.  It never made much sense anyways because there are no x86-64
systems older than 2002 or so and they generally all have working ACPI.

Cc: len.brown@intel.com

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-26 09:53:30 -08:00
Andi Kleen
e78256b8f3 [PATCH] x86-64/i386: Use common X86_PM_TIMER option and make it EMBEDDED
This makes x86-64 use the common X86_PM_TIMER Kconfig entry in drivers/acpi

And since PM timer is needed for correct timing on a lot of systems
now (e.g. AMD dual cores) and we often get bug reports from people
who forgot to set it make it depend on CONFIG_EMBEDDED. x86-64 had
this change before and it's a good thing.

I also fixed the description slightly to make this more clear.

Cc: len.brown@intel.com

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-26 09:53:30 -08:00
Bjorn Helgaas
35b73ceb9a [PATCH] ACPI: fix vendor resource length computation
acpi_rs_get_list_length() needs to account for all the vendor-defined data
bytes.  Failing to include these causes buffers to be sized too small,
which causes slab corruption when we later convert AML to resources and run
off the end of the buffer.

This causes slab corruption on machines that use ACPI vendor-defined
resources.  All HP ia64 machines do, and I'm told that some NEC machines
may as well.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-17 14:09:22 -08:00
Venkatesh Pallipadi
3b2d99429e P-state software coordination for ACPI core
http://bugzilla.kernel.org/show_bug.cgi?id=5737

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-02-09 03:21:48 -05:00
Ashok Raj
7ded56895c [PATCH] x86_64: data/functions wrongly marked as __init with cpu hotplug.
attached patch is 2 more cases i found via running the reference_init.pl
script. These were easy to spot just knowing the file names. There is
one another about init/main.c that i cant exactly zero in. (partly
because i dont know how to interpret the data thats spewed out of the tool).

Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-04 16:43:14 -08:00
Venkatesh Pallipadi
76b461c214 [PATCH] x86_64: Only switch to IPI broadcast timer on Intel when C3 is supported
Bug in apic timer removal on C3 patch. We should switch to IPI from APIC timer
only when C3 state is valid.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-04 16:43:13 -08:00
Bob Moore
b8e4d89357 [ACPI] ACPICA 20060127
Implemented support in the Resource Manager to allow
unresolved namestring references within resource package
objects for the _PRT method. This support is in addition
to the previously implemented unresolved reference
support within the AML parser. If the interpreter slack
mode is enabled (true on Linux unless acpi=strict),
these unresolved references will be passed through
to the caller as a NULL package entry.
http://bugzilla.kernel.org/show_bug.cgi?id=5741

Implemented and deployed new macros and functions for
error and warning messages across the subsystem. These
macros are simpler and generate less code than their
predecessors. The new macros ACPI_ERROR, ACPI_EXCEPTION,
ACPI_WARNING, and ACPI_INFO replace the ACPI_REPORT_*
macros.

Implemented the acpi_cpu_flags type to simplify host OS
integration of the Acquire/Release Lock OSL interfaces.
Suggested by Steven Rostedt and Andrew Morton.

Fixed a problem where Alias ASL operators are sometimes
not correctly resolved. causing AE_AML_INTERNAL
http://bugzilla.kernel.org/show_bug.cgi?id=5189
http://bugzilla.kernel.org/show_bug.cgi?id=5674

Fixed several problems with the implementation of the
ConcatenateResTemplate ASL operator. As per the ACPI
specification, zero length buffers are now treated as a
single EndTag. One-length buffers always cause a fatal
exception. Non-zero length buffers that do not end with
a full 2-byte EndTag cause a fatal exception.

Fixed a possible structure overwrite in the
AcpiGetObjectInfo external interface. (With assistance
from Thomas Renninger)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-31 03:25:09 -05:00
Len Brown
292dd876ee Pull release into acpica branch 2006-01-27 17:18:29 -05:00
Len Brown
d4ec6c7cc9 [ACPI] remove "Resource isn't an IRQ" warning
In the case where a (broken) BIOS gives  us a blank _CRS for
a PCI Interrupt Link Device, the acpi_walk_resources()
will not terminate, but will then give the callback
the resource end tag.  Ignore the end tag.

Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-26 17:23:38 -05:00
Len Brown
9fdb62af92 [ACPI] merge 3549 4320 4485 4588 4980 5483 5651 acpica asus fops pnpacpi branches into release
Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-24 17:52:48 -05:00
Bob Moore
4a90c7e862 [ACPI] ACPICA 20060113
Added 2006 copyright.

At SuSE's suggestion, enabled all error messages
without enabling function tracing, ie with CONFIG_ACPI_DEBUG=n

Replaced all instances of the ACPI_DEBUG_PRINT macro invoked at
the ACPI_DB_ERROR and ACPI_DB_WARN debug levels with
the ACPI_REPORT_ERROR and ACPI_REPORT_WARNING macros,
respectively. This preserves all error and warning messages
in the non-debug version of the ACPICA code (this has been
referred to as the "debug lite" option.) Over 200 cases
were converted to create a total of over 380 error/warning
messages across the ACPICA code. This increases the code
and data size of the default non-debug version by about 13K.
Added ACPI_NO_ERROR_MESSAGES flag to enable deleting all messages.
The size of the debug version remains about the same.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-20 02:23:50 -05:00
Len Brown
3c5c363826 [ACPI] delete message "**** SET: Misaligned resource pointer:"
This check, added in ACPICA 20051021, was overly paranoid.

Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-20 01:17:42 -05:00
Len Brown
2ae4117435 Revert "[ACPI] fix pnpacpi regression resulting from ACPICA 20051117"
This reverts ed349a8a0a commit.
2006-01-16 15:22:45 -05:00
Arjan van de Ven
858119e159 [PATCH] Unlinline a bunch of other functions
Remove the "inline" keyword from a bunch of big functions in the kernel with
the goal of shrinking it by 30kb to 40kb

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-14 18:27:06 -08:00
Venkatesh Pallipadi
6eb0a0fd05 [PATCH] i386: Handle missing local APIC timer interrupts on C3 state
Whenever we see that a CPU is capable of C3 (during ACPI cstate init), we
disable local APIC timer and switch to using a broadcast from external timer
interrupt (IRQ 0). This is needed because Intel CPUs stop the local
APIC timer in C3.  This is currently only enabled for Intel CPUs.

Patch below adds the code for i386 and also the ACPI hunk.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-11 19:04:54 -08:00
Kristen Accardi
8015a01486 [PATCH] apci: use pin stored in pci_dev
Use the stored value of the Interrupt Pin, rather than try to read
it again.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-09 12:13:13 -08:00
Kylene Jo Hall
55a82ab318 [PATCH] tpm: add bios measurement log
According to the TCG specifications measurements or hashes of the BIOS code
and data are extended into TPM PCRS and a log is kept in an ACPI table of
these extensions for later validation if desired.  This patch exports the
values in the ACPI table through a security-fs seq_file.

Signed-off-by: Seiji Munetoh <munetoh@jp.ibm.com>
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Signed-off-by: Reiner Sailer <sailer@us.ibm.com>
Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08 20:13:55 -08:00
Adrian Bunk
757b18661e [ACPI] make two processor functions static
acpi_processor_write_throttling()
acpi_processor_write_limit()

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-01-08 03:05:59 -05:00
Borislav Petkov
f9a204e1de [ACPI] remove Kconfig "default y" for laptop drivers
Signed-off-by: Borislav Petkov <petkov@uni-muenster.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-07 05:11:08 -05:00
Randy Dunlap
d758a8fa8c [ACPI] fix kernel-doc warnings in acpi/scan.c
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-07 05:05:31 -05:00
Thomas Rosner
876c184b31 [ACPI] Disable C2/C3 for _all_ IBM R40e Laptops
This adds all known BIOS versions of IBM R40e Laptops to the C2/C3
processor state blacklist and thus prevents them from crashing.
workaround for http://bugzilla.kernel.org/show_bug.cgi?id=3549

Signed-off-by: Thomas Rosner <kernel-bugs@digital-trauma.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-07 04:57:47 -05:00
KAMEZAWA Hiroyuki
3963f00831 [ACPI] acpi_memhotplug.c build fix
drivers/acpi/acpi_memhotplug.c: In function `acpi_memory_get_device_resources':
drivers/acpi/acpi_memhotplug.c:101: error: structure has no member named `attribute'
drivers/acpi/acpi_memhotplug.c:103: error: structure has no member named `attribute'
drivers/acpi/acpi_memhotplug.c: In function `acpi_memory_disable_device':
drivers/acpi/acpi_memhotplug.c:253: warning: unused variable `attr'

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-07 04:43:40 -05:00
Arjan van de Ven
d479e90845 [ACPI] move some run-time structure inits to compile time
acpi_processor_limit_fops.write was written at run time,
but can be initiailized at compile-time instead.

Similar for acpi_video_bus_POST_fops.write and friends,
but keep doing those at runtime to avoid prototype-hell.

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-07 04:19:08 -05:00
Len Brown
ed03f430cd Pull pnpacpi into acpica branch 2006-01-07 03:50:18 -05:00
Len Brown
25da097460 Auto-update from upstream 2006-01-06 16:34:21 -05:00
Len Brown
ed349a8a0a [ACPI] fix pnpacpi regression resulting from ACPICA 20051117
In ACPICA 20051117, acpi_walk_resources() started
sending ACPI_RESOURCE_TYPE_END_TAG to the callback
routine which wasn't prepared for it, causing
_CRS to fail and PnPACPI to not recognize any devices:

pnp: ACPI device : hid PNP0C02
pnp: PnPACPI: unknown resource type 7
pnp: PnPACPI: METHOD_NAME__CRS failure for PNP0c02

Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-05 02:40:11 -05:00
Kay Sievers
312c004d36 [PATCH] driver core: replace "hotplug" by "uevent"
Leave the overloaded "hotplug" word to susbsystems which are handling
real devices. The driver core does not "plug" anything, it just exports
the state to userspace and generates events.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 16:18:08 -08:00
Karol Kozimor
aea19aa078 [ACPI_ASUS] fix asus module param description
Signed-off-by: Karol Kozimor <sziwan@hell.org.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-04 00:59:11 -05:00
Karol Kozimor
bb84db937a [ACPI_ASUS] M6R display reading
This patch corrects the node to read display settings on M6R laptops.

Signed-off-by: Karol Kozimor <sziwan@hell.org.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-04 00:55:36 -05:00
Yu Luming
dacd9b8035 [ACPI] fix acpi_os_wait_sempahore() finite timeout case (AE_TIME warning)
Before this fix, the finite timeout case
behaved like the no-timeout (trylock) case.

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

Signed-off-by: Luming Yu <luming.yu@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-03 16:27:21 -05:00
Len Brown
04348e69e7 [ACPI] reduce kernel size: move 5BK .bss to 2.5KB .init.data
put __initdata on sdt_entry[], as it is accessed only by __init functions.

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

Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-30 02:44:59 -05:00
Karol Kozimor
b697b5372e [ASUS_ACPI] work around Samsung P30s oops
The code used to rely on a certain method to return a NULL buffer, which
is now hardly possible with the implicit return code on by default. This
sort of fixes bugs #5067 and #5092 for now.

Note: this patch makes the driver unusable on said machines (and on said
machines only) iff acpi=strict is specified, but it seems noone really uses
that.

Signed-off-by: Karol Kozimor <sziwan@hell.org.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-29 02:41:54 -05:00
Len Brown
3173cdfe02 [ACPI] fix osl.c build warning
typecheck complains on i386 that u32 != unsigned long

Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-28 03:23:34 -05:00
Bob Moore
defba1d8f2 [ACPI] ACPICA 20051216
Implemented optional support to allow unresolved names
within ASL Package objects. A null object is inserted in
the package when a named reference cannot be located in
the current namespace. Enabled via the interpreter slack
flag which Linux has enabled by default (acpi=strict
to disable slack).  This should eliminate AE_NOT_FOUND
exceptions seen on machines that contain such code.

Implemented an optimization to the initialization
sequence that can improve boot time. During ACPI device
initialization, the _STA method is now run if and only
if the _INI method exists. The _STA method is used to
determine if the device is present; An _INI can only be
run if _STA returns present, but it is a waste of time to
run the _STA method if the _INI does not exist. (Prototype
and assistance from Dong Wei)

Implemented use of the C99 uintptr_t for the pointer
casting macros if it is available in the current
compiler. Otherwise, the default (void *) cast is used
as before.

Fixed some possible memory leaks found within the
execution path of the Break, Continue, If, and CreateField
operators. (Valery Podrezov)

Fixed a problem introduced in the 20051202 release where
an exception is generated during method execution if a
control method attempts to declare another method.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-28 02:54:59 -05:00
Len Brown
7b3dad3d85 Pull bug3410 into release branch 2005-12-22 22:26:10 -05:00
Len Brown
3c058d8b17 Pull owner_id into release branch 2005-12-22 22:26:01 -05:00
Len Brown
9d6be4bed6 [ACPI] fix build warning from owner_id patch
Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-22 22:24:10 -05:00
Thomas Renninger
75b245b325 [ACPI] fix passive cooling regression
Return logic was inverted.
Going for changing the return value to not return zero as it is makes
more sense regarding the naming of the function (cpu_has_cpufreq()).

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

Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-22 22:00:25 -05:00
Kenji Kaneshige
63c94b68ec [ACPI] build EC driver on IA64
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-21 04:58:31 -05:00
Alex Williamson
05465fd562 [ACPI] increase owner_id limit to 64 from 32
This is an interim patch until changes in an updated
ACPICA core increase the limit to 255.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-21 04:52:16 -05:00
Alexey Starikovskiy
729b4d4ce1 [ACPI] fix reboot upon suspend-to-disk
http://bugzilla.kernel.org/show_bug.cgi?id=4320

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-15 13:28:14 -05:00
Len Brown
d3e4cefc86 Auto-update from upstream 2005-12-14 02:59:50 -05:00
Dave Jones
a64882e795 [PATCH] ACPI: fix sleeping whilst atomic warnings on resume
This has been broken for months.  On resume, we call acpi_pci_link_set()
with interrupts off, so we get a warning when we try to do a kmalloc of non
atomic memory.  The actual allocation is just 2 long's (plus extra byte for
some reason I can't fathom), so a simple conversion to GFP_ATOMIC is
probably the safest way to fix this.

The error looks like this..

Debug: sleeping function called from invalid context at mm/slab.c:2486
in_atomic():0, irqs_disabled():1
 [<c0143f6c>] kmem_cache_alloc+0x40/0x56
 [<c0206a2e>] acpi_pci_link_set+0x3f/0x17f
 [<c0206f96>] irqrouter_resume+0x1e/0x3c
 [<c0239bca>] __sysdev_resume+0x11/0x6b
 [<c0239e88>] sysdev_resume+0x34/0x52
 [<c023de21>] device_power_up+0x5/0xa

Signed-off-by: Dave Jones <davej@redhat.com>
Cc: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-12 08:57:45 -08:00
Bob Moore
28f55ebce5 [ACPI] ACPICA 20051202
Modified the parsing of control methods to no longer
create namespace objects during the first pass of the
parse. Objects are now created only during the execute
phase, at the moment the namespace creation operator
is encountered in the AML (Name, OperationRegion,
CreateByteField, etc.) This should eliminate ALREADY_EXISTS
exceptions seen on some machines where reentrant control
methods are protected by an AML mutex. The mutex will now
correctly block multiple threads from attempting to create
the same object more than once.

Increased the number of available Owner Ids for namespace
object tracking from 32 to 255. This should eliminate the
OWNER_ID_LIMIT exceptions seen on some machines with a
large number of ACPI tables (either static or dynamic).

Enhanced the namespace dump routine to output the owner
ID for each namespace object.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-10 00:29:11 -05:00
Bob Moore
c51a4de85d [ACPI] ACPICA 20051117
Fixed a problem in the AML parser where the method thread
count could be decremented below zero if any errors
occurred during the method parse phase. This should
eliminate AE_AML_METHOD_LIMIT exceptions seen on some
machines. This also fixed a related regression with the
mechanism that detects and corrects methods that cannot
properly handle reentrancy (related to the deployment of
the new OwnerId mechanism.)

Eliminated the pre-parsing of control methods (to detect
errors) during table load. Related to the problem above,
this was causing unwind issues if any errors occurred
during the parse, and it seemed to be overkill. A table
load should not be aborted if there are problems with
any single control method, thus rendering this feature
rather pointless.

Fixed a problem with the new table-driven resource manager
where an internal buffer overflow could occur for small
resource templates.

Implemented a new external interface, acpi_get_vendor_resource()
This interface will find and return a vendor-defined
resource descriptor within a _CRS or _PRS
method via an ACPI 3.0 UUID match. (from Bjorn Helgaas)

Removed the length limit (200) on string objects as
per the upcoming ACPI 3.0A specification. This affects
the following areas of the interpreter: 1) any implicit
conversion of a Buffer to a String, 2) a String object
result of the ASL Concatentate operator, 3) the String
object result of the ASL ToString operator.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-10 00:27:56 -05:00
Bob Moore
96db255c8f [ACPI] ACPICA 20051102
Modified the subsystem initialization sequence to improve
GPE support. The GPE initialization has been split into
two parts in order to defer execution of the _PRW methods
(Power Resources for Wake) until after the hardware is
fully initialized and the SCI handler is installed. This
allows the _PRW methods to access fields protected by the
Global Lock. This will fix systems where a NO_GLOBAL_LOCK
exception has been seen during initialization.

Fixed a regression with the ConcatenateResTemplate()
ASL operator introduced in the 20051021 release.

Implemented support for "local" internal ACPI object
types within the debugger "Object" command and the
acpi_walk_namespace() external interfaces. These local
types include RegionFields, BankFields, IndexFields, Alias,
and reference objects.

Moved common AML resource handling code into a new file,
"utresrc.c". This code is shared by both the Resource
Manager and the AML Debugger.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-10 00:26:05 -05:00
Bob Moore
0897831bb5 [ACPI] ACPICA 20051021
Implemented support for the EM64T and other x86_64
processors. This essentially entails recognizing
that these processors support non-aligned memory
transfers. Previously, all 64-bit processors were assumed
to lack hardware support for non-aligned transfers.

Completed conversion of the Resource Manager to nearly
full table-driven operation. Specifically, the resource
conversion code (convert AML to internal format and the
reverse) and the debug code to dump internal resource
descriptors are fully table-driven, reducing code and data
size and improving maintainability.

The OSL interfaces for Acquire and Release Lock now use a
64-bit flag word on 64-bit processors instead of a fixed
32-bit word. (Alexey Starikovskiy)

Implemented support within the resource conversion code
for the Type-Specific byte within the various ACPI 3.0
*WordSpace macros.

Fixed some issues within the resource conversion code for
the type-specific flags for both Memory and I/O address
resource descriptors. For Memory, implemented support
for the MTP and TTP flags. For I/O, split the TRS and TTP
flags into two separate fields.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-10 00:22:54 -05:00
Bob Moore
50eca3eb89 [ACPI] ACPICA 20050930
Completed a major overhaul of the Resource Manager code -
specifically, optimizations in the area of the AML/internal
resource conversion code. The code has been optimized to
simplify and eliminate duplicated code, CPU stack use has
been decreased by optimizing function parameters and local
variables, and naming conventions across the manager have
been standardized for clarity and ease of maintenance (this
includes function, parameter, variable, and struct/typedef
names.)

All Resource Manager dispatch and information tables have
been moved to a single location for clarity and ease of
maintenance. One new file was created, named "rsinfo.c".

The ACPI return macros (return_ACPI_STATUS, etc.) have
been modified to guarantee that the argument is
not evaluated twice, making them less prone to macro
side-effects. However, since there exists the possibility
of additional stack use if a particular compiler cannot
optimize them (such as in the debug generation case),
the original macros are optionally available.  Note that
some invocations of the return_VALUE macro may now cause
size mismatch warnings; the return_UINT8 and return_UINT32
macros are provided to eliminate these. (From Randy Dunlap)

Implemented a new mechanism to enable debug tracing for
individual control methods. A new external interface,
acpi_debug_trace(), is provided to enable this mechanism. The
intent is to allow the host OS to easily enable and disable
tracing for problematic control methods. This interface
can be easily exposed to a user or debugger interface if
desired. See the file psxface.c for details.

acpi_ut_callocate() will now return a valid pointer if a
length of zero is specified - a length of one is used
and a warning is issued. This matches the behavior of
acpi_ut_allocate().

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-10 00:20:25 -05:00
Len Brown
3d5271f988 Pull release into acpica branch 2005-12-06 17:31:30 -05:00
Len Brown
9115a6c787 Auto-update from upstream 2005-12-06 16:27:40 -05:00
Len Brown
927fe18397 Pull 5165 into release branch 2005-12-05 17:08:40 -05:00
David Shaohua Li
1e48396993 [ACPI] correct earlier SMP deep C-states on HT patch
http://bugzilla.kernel.org/show_bug.cgi?id=5165

Change polarity of test for PLVL2_UP flag.
Skip promotion/demotion code when not needed.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-05 17:00:37 -05:00
Len Brown
1e8df53c92 [ACPI] Embedded Controller (EC) driver printk syntax update
no functional changes

Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-05 16:48:54 -05:00
Len Brown
53f11d4ff8 [ACPI] Enable Embedded Controller (EC) interrupt mode by default
"ec_intr=0" reverts to polling
"ec_burst=" no longer exists.

Signed-off-by: Len Brown <len.brown@intel.com>
Acked-by: Luming Yu <luming.yu@intel.com>
2005-12-05 16:47:30 -05:00
Len Brown
02b28a33aa [ACPI] Embedded Controller (EC) driver syntax update
"intr" largely replaces "burst" for syntax to follow semantics
"poll" largely replaces "polling" for economy of expression
append "interrupt mode" or "polling mode" to dmesg line

no functional changes

Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-05 16:37:16 -05:00
Linus Torvalds
af2eb17bac Add missing "local_irq_enable()" to C2/C3 exit logic
Silly bug crept in with the C2/C3 TIF_POLLING_NRFLAG fixes.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-02 23:09:06 -08:00
Nick Piggin
2a298a35eb [PATCH] Fix TIF_POLLING_NRFLAG in ACPI idle routines
Commit 64c7c8f885 broke the ACPI C2 and C3
sleep states, because it left TIF_POLLING_NRFLAG active even though
those states do not actually poll the reschedule flag at all.  As a
result, the CPU wouldn't get sent an IPI when it was to be woken up, and
would only notice that it had runnable processes on the next timer tick.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-02 14:20:21 -08:00