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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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=6028http://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>
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>
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>
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=5360http://bugzilla.kernel.org/show_bug.cgi?id=5387http://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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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=5189http://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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
"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>
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>
Need to de-couple the concept of polling/interrupts
vs burst/non-burst.
http://bugzilla.kernel.org/show_bug.cgi?id=4980
Signed-off-by: Luming Yu <luming.yu@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
The ASUS M6Ne specifies C2, implying C1
but not explicitly specifying it.
http://bugzilla.kernel.org/show_bug.cgi?id=4485
Signed-off-by: Janosch Machowinski <jmachowinski@gmx.de>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Linux invokes the AML _PDC method (Processor Driver Capabilities)
to tell the BIOS what features it can handle. While the ACPI
spec says nothing about the OS invoking _PDC multiple times,
doing so with changing bits seems to hopelessly confuse the BIOS
on multiple platforms up to and including crashing the system.
Factor out the _PDC invocation so Linux invokes it only once.
http://bugzilla.kernel.org/show_bug.cgi?id=5483
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Al Viro <viro@ftp.linux.org.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
(cherry picked from ef4611613657dfb8af8d336f2f61f08cfcdc9d8a commit)
This patch reverts the acpi_bus_find_driver() return value check
that came in via the PCI tree via 3fb02738b0
[PATCH] acpi bridge hotadd: Allow ACPI .add and .start
operations to be done independently
This particular change broke booting of some HP/Compaq laptops unless
acpi=noirq is used.
http://bugzilla.kernel.org/show_bug.cgi?id=5221https://bugzilla.novell.com/show_bug.cgi?id=116763
Signed-off-by: Thomas Renninger <trenn@suse.de>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
which tells us if C2 is valid for UP-only, or SMP.
As there is no separate bit for C3, use P_LVL2_UP
bit to cover both C2 and C3.
http://bugzilla.kernel.org/show_bug.cgi?id=5165
Signed-off-by: Venkatesh Pallipadi<venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
(cherry picked from 28b86b368af3944eb383078fc5797caf2dc8ce44 commit)
Note: This ACPI standard compliance may cause regression
on some system, if they have _CST present, but _CST value
is bogus. "nocst" module parameter should workaround
that regression.
http://bugzilla.kernel.org/show_bug.cgi?id=5165
Signed-off-by: Venkatesh Pallipadi<venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
(cherry picked from 883baf7f7e81cca26f4683ae0d25ba48f094cc08 commit)
Properly clear the memory, and set "pr->flags.power" only if a C2 or
deeper state is valid (to make the code match both the comment and
previous behaviour).
This fixes a boot-time lockup reported by Maneesh Soni when using
"maxcpus=1".
Acked-by: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Since few people need the support anymore, this moves the legacy
pm_xxx functions to CONFIG_PM_LEGACY, and include/linux/pm_legacy.h.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This patch further tweaks how we request control of hotplug
controller hardware from BIOS. We first search the ACPI namespace
corresponding to a specific hotplug controller looking for an
_OSC or OSHP method. On failure, we successively move to the
ACPI parent object, till we hit the highest level host bridge
in the hierarchy. This allows for different types of BIOS's
which place the _OSC/OSHP methods at various places in the acpi
namespace, while still not encroaching on the namespace of
some other root level host bridge.
This patch also introduces a new load time option (pciehp_force)
that allows us to bypass all _OSC/OSHP checking. Not supporting
these methods seems to be be the most common ACPI firmware problem
we've run into. This will still _not_ allow the pciehp driver to
work correctly if the BIOS really doesn't support pciehp (i.e. if
it doesn't generate a hotplug interrupt). Use this option with
caution. Some BIOS's may deliberately not build any _OSC/OSHP
methods to make sure it retains control the hotplug hardware.
Using the pciehp_force parameter for such systems can lead to
two separate entities trying to control the same hardware.
Signed-off-by: Rajesh Shah <rajesh.shah@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Make some changes to the NEED_RESCHED and POLLING_NRFLAG to reduce
confusion, and make their semantics rigid. Improves efficiency of
resched_task and some cpu_idle routines.
* In resched_task:
- TIF_NEED_RESCHED is only cleared with the task's runqueue lock held,
and as we hold it during resched_task, then there is no need for an
atomic test and set there. The only other time this should be set is
when the task's quantum expires, in the timer interrupt - this is
protected against because the rq lock is irq-safe.
- If TIF_NEED_RESCHED is set, then we don't need to do anything. It
won't get unset until the task get's schedule()d off.
- If we are running on the same CPU as the task we resched, then set
TIF_NEED_RESCHED and no further action is required.
- If we are running on another CPU, and TIF_POLLING_NRFLAG is *not* set
after TIF_NEED_RESCHED has been set, then we need to send an IPI.
Using these rules, we are able to remove the test and set operation in
resched_task, and make clear the previously vague semantics of
POLLING_NRFLAG.
* In idle routines:
- Enter cpu_idle with preempt disabled. When the need_resched() condition
becomes true, explicitly call schedule(). This makes things a bit clearer
(IMO), but haven't updated all architectures yet.
- Many do a test and clear of TIF_NEED_RESCHED for some reason. According
to the resched_task rules, this isn't needed (and actually breaks the
assumption that TIF_NEED_RESCHED is only cleared with the runqueue lock
held). So remove that. Generally one less locked memory op when switching
to the idle thread.
- Many idle routines clear TIF_POLLING_NRFLAG, and only set it in the inner
most polling idle loops. The above resched_task semantics allow it to be
set until before the last time need_resched() is checked before going into
a halt requiring interrupt wakeup.
Many idle routines simply never enter such a halt, and so POLLING_NRFLAG
can be always left set, completely eliminating resched IPIs when rescheduling
the idle task.
POLLING_NRFLAG width can be increased, to reduce the chance of resched IPIs.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Con Kolivas <kernel@kolivas.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This is the remaining misc drivers/ part of the big kfree cleanup patch.
Remove pointless checks for NULL prior to calling kfree() in misc files in
drivers/.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org>
Acked-by: Roland Dreier <rolandd@cisco.com>
Acked-by: Pierre Ossman <drzeus@drzeus.cx>
Acked-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Len Brown <len.brown@intel.com>
Acked-by: "Antonino A. Daplas" <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Use schedule_timeout_interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size. Also use
msecs_to_jiffies() instead of direct HZ division to avoid rounding errors.
Signed-off-by: Nishanth Aravamudan <nacc@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>
I recently picked up my older work to remove unnecessary #includes of
sched.h, starting from a patch by Dave Jones to not include sched.h
from module.h. This reduces the number of indirect includes of sched.h
by ~300. Another ~400 pointless direct includes can be removed after
this disentangling (patch to follow later).
However, quite a few indirect includes need to be fixed up for this.
In order to feed the patches through -mm with as little disturbance as
possible, I've split out the fixes I accumulated up to now (complete for
i386 and x86_64, more archs to follow later) and post them before the real
patch. This way this large part of the patch is kept simple with only
adding #includes, and all hunks are independent of each other. So if any
hunk rejects or gets in the way of other patches, just drop it. My scripts
will pick it up again in the next round.
Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Add pm_ops.valid callback, so only the available pm states show in
/sys/power/state. And this also makes an earlier states error report at
enter_state before we do actual suspend/resume.
Signed-off-by: Shaohua Li<shaohua.li@intel.com>
Acked-by: Pavel Machek<pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This basically keeps up from having to extern __kmalloc_section_memmap().
The vaddr_in_vmalloc_area() helper could go in a vmalloc header, but that
header gets hard to work with, because it needs some arch-specific macros.
Just stick it in here for now, instead of creating another header.
Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Lion Vollnhals <webmaster@schiggl.de>
Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>
Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
In drivers/acpi/glue.c the address of an integer is cast to the address of
an unsigned long. This breaks on systems where a long is larger than an
int --- for a start the int can be misaligned; for a second the assignment
through the pointer will overwrite part of the next variable.
Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Acked-by: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Fix -EIO on /proc/acpi/events after suspends. This actually breaks
suspending by power button in many setups.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Fixed a problem within the Resource Manager where
support for the Generic Register descriptor was not fully
implemented. This descriptor is now fully recognized,
parsed, disassembled, and displayed.
Restructured the Resource Manager code to utilize
table-driven dispatch and lookup, eliminating many of the
large switch() statements. This reduces overall subsystem
code size and code complexity. Affects the resource parsing
and construction, disassembly, and debug dump output.
Cleaned up and restructured the debug dump output for all
resource descriptors. Improved readability of the output
and reduced code size.
Fixed a problem where changes to internal data structures
caused the optional ACPI_MUTEX_DEBUG code to fail
compilation if specified.
Signed-off-by: Robert Moore <Robert.Moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Remove S4BIOS support. It is pretty useless, and only ever worked for _me_
once. (I do not think anyone else ever tried it). It was in feature-removal
for a long time, and it should have been removed before.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This makes ACPI_BLACKLIST_YEAR be consistently defined when ACPI is
enabled, regardless of whether we're on x86 or not, and thus avoids
bogus -Wundef warnings on ia64.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The 'bus' field in pci_dev structure should be checked before calling
pci_read_config_byte() because pci_bus_read_config_byte() called by
pci_read_config_byte() refers to 'bus' field.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Fixed a problem with the internal Owner ID allocation and
deallocation mechanisms for control method execution and
recursive method invocation. This should eliminate the
OWNER_ID_LIMIT exceptions and "Invalid OwnerId" messages
seen on some systems. Recursive method invocation depth
is currently limited to 255. (Alexey Starikovskiy)
http://bugzilla.kernel.org/show_bug.cgi?id=4892
Completely eliminated all vestiges of support for the
"module-level executable code" until this support is
fully implemented and debugged. This should eliminate the
NO_RETURN_VALUE exceptions seen during table load on some
systems that invoke this support.
http://bugzilla.kernel.org/show_bug.cgi?id=5162
Fixed a problem within the resource manager code where
the transaction flags for a 64-bit address descriptor were
handled incorrectly in the type-specific flag byte.
Consolidated duplicate code within the address descriptor
resource manager code, reducing overall subsystem code size.
Signed-off-by: Robert Moore <Robert.Moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Implemented a full bytewise compare to determine if a table load
request is attempting to load a duplicate table. The compare is
performed if the table signatures and table lengths match. This
will allow different tables with the same OEM Table ID and
revision to be loaded.
Although the BIOS is technically violating the ACPI spec when
this happens -- it does happen -- so Linux must handle it.
Signed-off-by: Robert Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
When acpi_sleep_prepare was moved into a shutdown method we
started calling it for all shutdowns.
It appears this triggers some systems to power off on reboot.
Avoid this by only calling acpi_sleep_prepare if we are going to power
off the system.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Delete the ability to build an ACPI kernel that does
not include PCI support. When such a machine is created
and it requires a tuned kernel, send a patch.
http://bugzilla.kernel.org/show_bug.cgi?id=1364
Signed-off-by: Len Brown <len.brown@intel.com>
Andi Kleen suggested it was unconventional for us to "default m"
on ACPI modules -- even though they are expected to be deployed
as modules. But as "default n" would likely result in some
users building nonsense kernels, we compromise to "default y".
Distros are expected to continue to use =m in their configs.
Signed-off-by: Len Brown <len.brown@intel.com>
Distros are shipping modules we had marked EXPERIMENTAL,
so clearly it has lost some meaning.
Delete that dependency for shipping modules, retaining
it only for ACPI_HOTKEY and ACPI_CONTAINER to emphasize
that they lack testing on real hardware.
Signed-off-by: Len Brown <len.brown@intel.com>
Build issues were mostly in the ACPI=n case -- don't do that.
Select ACPI from IA64_GENERIC.
Add some missing dependencies on ACPI.
Mark BLACKLIST_YEAR and some laptop-only ACPI drivers
as X86-only. Let me know when you get an IA64 Laptop.
Signed-off-by: Len Brown <len.brown@intel.com>
When both platform-specific and generic drivers exist,
enable generic over-ride with "acpi_generic_hotkey".
http://bugzilla.kernel.org/show_bug.cgi?id=4953
Signed-off-by: Luming Yu <luming.yu@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
This reverts commits
71db63acff
[PATCH] increase PCIBIOS_MIN_IO on x86
and
0b2bfb4e7f
ACPI: increase PCIBIOS_MIN_IO on x86
since Lukas Sandströ<lukass@etek.chalmers.se> reports that this breaks
his on-board nvidia audio.
We should re-visit this later. For now we revert the change
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
There are lots of single-PCI-segment machines that don't
supply _SEG for the root bridges. The PCI root bridge driver
silently assumes the segment to be zero in this case,
so glue.c shouldn't complain either.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
prevent:
HOTPLUG_CPU=y
ACPI_PROCESSOR=y
ACPI_HOTPLUG_CPU=n
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>
The video driver doesn't properly remove all the notify handlers
on module unload. This has a side effect of subdevices failing
to register on module reload, but sudden death looms if the
handlers trigger after the module is unloaded.
Signed-off-by: Karol Kozimor <sziwan@hell.org.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
commit from running until a change has been made in
the destination. In this instance the desired result
was to choose the destination version of the file
and ignore the source version, but git would not
allow that.
Here I added a blank line to let git commit think
I resolved a merge conflict.
ACPI now uses kmalloc(...,GPF_ATOMIC) during suspend/resume.
http://bugzilla.kernel.org/show_bug.cgi?id=3469
Signed-off-by: David Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
For 2.6.12 behaviour, this (EXPERIMENTAL) driver
should not be built.
Update the driver source with latest from Luming.
Signed-off-by: Luming Yu <luming.yu@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Burst mode isn't ready for prime time,
but can be enabled for test via "ec_burst=1"
Signed-off-by: Luming Yu <luming.yu@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
This patch disables the PCI Interrupt Link refernece counts,
which should not co-exist with the 2.6.12 irq_router.resume
method or else a double acpi_pci_link_set() could result
on resume.
Signed-off-by: David Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
We have increased PCIBIOS_MIN_IO to 0x4000, but still want
motherboard resources to be allocated properly. So we need
to state 0x1000 (according to the comment) limit explicitely.
Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
If there are devices that use interrupts over a suspend event, ACPI must
restore the PCI interrupt links on resume. Anything else breaks any
device that hasn't been converted to the new (dubious) PM rules.
Drivers that need the irq free/re-aquire sequence can be done one by one
independently of this one.
Implemented support to ignore an attempt to install/load
a particular ACPI table more than once. Apparently there
exists BIOS code that repeatedly attempts to load the same
SSDT upon certain events. Thanks to Venkatesh Pallipadi.
Restructured the main interface to the AML parser in
order to correctly handle all exceptional conditions. This
will prevent leakage of the OwnerId resource and should
eliminate the AE_OWNER_ID_LIMIT exceptions seen on some
machines. Thanks to Alexey Starikovskiy.
Support for "module level code" has been disabled in this
version due to a number of issues that have appeared
on various machines. The support can be enabled by
defining ACPI_ENABLE_MODULE_LEVEL_CODE during subsystem
compilation. When the issues are fully resolved, the code
will be enabled by default again.
Modified the internal functions for debug print support
to define the FunctionName parameter as a (const char *)
for compatibility with compiler built-in macros such as
__FUNCTION__, etc.
Linted the entire ACPICA source tree for both 32-bit
and 64-bit.
Signed-off-by: Robert Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Add reference count and disable ACPI PCI Interrupt Link
when no device still uses it.
Warn when drivers have not released Link at suspend time.
http://bugzilla.kernel.org/show_bug.cgi?id=3469
Signed-off-by: David Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
EC burst mode benefits many machines, some of
them significantly. However, our current
implementation fails on some machines such
as Rafael's Asus L5D.
This patch restores the alternative EC polling code,
which can be enabled at boot time via "ec_polling"
http://bugzilla.kernel.org/show_bug.cgi?id=4665
Signed-off-by: Luming Yu <luming.yu@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
where C-states come from FADT.
Thanks to Kevin Radloff for identifying the issue and
isolating it to exact line of code that is causing the issue.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
It is important that we support module level code --
BIOS's implement it. But this implementation needs
more testing.
Signed-off-by: Len Brown <len.brown@intel.com>
Now that all of the code paths that call acpi_power_off
have been modified to call either call kernel_power_off
(which calls apci_sleep_prepare by way of acpi_shutdown)
or to call acpi_sleep_prepare directly it is redundant to call
acpi_sleep_prepare from acpi_power_off.
So simplify the code and simply don't call acpi_sleep_prepare.
In addition there is a little error handling done so if we
can't register the acpi class we don't hook pm_power_off.
I think I have done the right thing with the CONFIG_PM define
but I'm not certain. Can this code even be compiled if
CONFIG_PM is false?
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
machine_power_off on i386 and x86_64 now switch to the
boot cpu out of paranoia and because the MP Specification indicates it
is a good idea on reboot, so for those architectures it is a noop.
I can't see anything in the acpi spec that requires you to be on
the boot cpu to power off the system, so this should not be an issue
for ia64. In addition ia64 has the altix a massive multi-node
system where switching to the boot cpu sounds insane as we may
hot removed the boot cpu.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>