aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi
AgeCommit message (Collapse)Author
2008-01-24Driver core: change sysdev classes to use dynamic kobject namesKay Sievers
All kobjects require a dynamically allocated name now. We no longer need to keep track if the name is statically assigned, we can just unconditionally free() all kobject names on cleanup. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24Kobject: change drivers/acpi/system.c to use kobject_create_and_addGreg Kroah-Hartman
Stop using kobject_register for this static kobject, as it's overkill. This way is much simpler. Cc: Len Brown <len.brown@intel.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24firmware: change firmware_kset to firmware_kobjGreg Kroah-Hartman
There is no firmware "subsystem" it's just a directory in /sys that other portions of the kernel want to hook into. So make it a kobject not a kset to help alivate anyone who tries to do some odd kset-like things with this. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kobject: convert /sys/firmware/acpi/ to use kobject_createGreg Kroah-Hartman
We don't need a kset here, a simple kobject will do just fine, so dynamically create the kobject and use it. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kobject: remove struct kobj_type from struct ksetGreg Kroah-Hartman
We don't need a "default" ktype for a kset. We should set this explicitly every time for each kset. This change is needed so that we can make ksets dynamic, and cleans up one of the odd, undocumented assumption that the kset/kobject/ktype model has. This patch is based on a lot of help from Kay Sievers. Nasty bug in the block code was found by Dave Young <hidave.darkstar@gmail.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Dave Young <hidave.darkstar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-23Pull dmi-2.6.24 into release branchLen Brown
2008-01-23Pull bugzilla-9798 into release branchLen Brown
2008-01-23Pull bugzilla-8459 into release branchLen Brown
2008-01-23Revert "ACPI: Fan: Drop force_power_state acpi_device option"Len Brown
This reverts commit 93ad7c07ad487b036add8760dabcc35666a550ef. http://bugzilla.kernel.org/show_bug.cgi?id=9798 Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-23ACPI: EC: "DEBUG" needs to be defined earlierMárton Németh
The "DEBUG" symbol needs to be defined before #including <linux/kernel.h> to get the pr_debug() working. Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-23ACPI: EC: add leading zeros to debug messagesMárton Németh
Add leading zeros to pr_debug() calls. For example if x=0x0a, the format "0x%2x" will result the string "0x a", the format "0x%2.2x" will result "0x0a". Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-23ACPI: EC: fix dmesg spam regressionAlexey Starikovskiy
Return OBF_1 optimization workaround http://bugzilla.kernel.org/show_bug.cgi?id=8459 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-23ACPI: DMI blacklist to reduce console warnings on OSI(Linux) systems.Len Brown
This DMI blacklist reduces the console messages on systems which have a BIOS that invokes OSI(Linux). As the DMI blacklist already knows about these systems, the request for DMI info itself is disabled. Further, if OSI(Linux) has already been determined to have no beneift, we disable the console message requesting acpi_osi=Linux test results. Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-23ACPI: Add ThinkPad R61, ThinkPad T61 to OSI(Linux) white-listLen Brown
acpi_osi=Linux helps sound on these systems. Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-23ACPI: make _OSI(Linux) console messages smarterLen Brown
If BIOS invokes _OSI(Linux), the kernel response depends on what the ACPI DMI list knows about the system, and that is reflectd in dmesg: 1) System unknown to DMI: ACPI: BIOS _OSI(Linux) query ignored ACPI: DMI System Vendor: LENOVO ACPI: DMI Product Name: 7661W1P ACPI: DMI Product Version: ThinkPad T61 ACPI: DMI Board Name: 7661W1P ACPI: DMI BIOS Vendor: LENOVO ACPI: DMI BIOS Date: 10/18/2007 ACPI: Please send DMI info above to linux-acpi@vger.kernel.org ACPI: If "acpi_osi=Linux" works better, please notify linux-acpi@vger.kernel.org 2) System known to DMI, but effect of OSI(Linux) unknown: ACPI: DMI detected: Lenovo ThinkPad T61 ... ACPI: BIOS _OSI(Linux) query ignored via DMI ACPI: If "acpi_osi=Linux" works better, please notify linux-acpi@vger.kernel.org 3) System known to DMI, which disables _OSI(Linux): ACPI: DMI detected: Lenovo ThinkPad T61 ... ACPI: BIOS _OSI(Linux) query ignored via DMI 4) System known to DMI, which enable _OSI(Linux): ACPI: DMI detected: Lenovo ThinkPad T61 ACPI: Added _OSI(Linux) ... ACPI: BIOS _OSI(Linux) query honored via DMI cmdline overrides take precidence over the built-in default and the DMI prescribed default. cmdline "acpi_osi=Linux" results in: ACPI: BIOS _OSI(Linux) query honored via cmdline Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-23ACPI: Delete Intel Customer Reference Board (CRB) from OSI(Linux) DMI listLen Brown
Linux does not want BIOS writers to invoke _OSI(Linux) - for in the field it causes more Windows incompatibility problems than it solves. So when it is seen in the BIOS for an Intel Customer Reference Board, Linux should ignore its effect by default, and should complain loudly. Otherwise, the reference BIOS will go unfixed, and the bad BIOS will spread to the field. Users of this board can get the old behavior with "acpi_osi=Linux" As this was the only entry, delete acpi_osl_dmi_table[]. Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-23ACPI: on OSI(Linux), print needed DMI rather than requesting dmidecode outputLen Brown
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-23ACPI: create acpi_dmi_dump()Len Brown
A utility routine to print common entries used for ACPI-related DMI blacklist entries. Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-15ACPI: processor: Fix null pointer dereference in throttlingAlexey Starikovskiy
http://bugzilla.kernel.org/show_bug.cgi?id=9747 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-11Pull bugzilla-9683 into release branchLen Brown
2008-01-11Pull bugzilla-9627 into release branchLen Brown
2008-01-11Pull bugzilla-9494 into release branchLen Brown
2008-01-11Pull bugzilla-9194 into release branchLen Brown
2008-01-11PM: ACPI and APM must not be enabled at the same timeLen Brown
ACPI and APM used "pm_active" to guarantee that they would not be simultaneously active. But pm_active was recently moved under CONFIG_PM_LEGACY, so that without CONFIG_PM_LEGACY, pm_active became a NOP -- allowing ACPI and APM to both be simultaneously enabled. This caused unpredictable results, including boot hangs. Further, the code under CONFIG_PM_LEGACY is scheduled for removal. So replace pm_active with pm_flags. pm_flags depends only on CONFIG_PM, which is present for both CONFIG_APM and CONFIG_ACPI. http://bugzilla.kernel.org/show_bug.cgi?id=9194 Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2008-01-11Pull bugzilla-8171 into release branchLen Brown
2008-01-10ACPICA: fix acpi_serialize hang regressionBob Moore
http://bugzilla.kernel.org/show_bug.cgi?id=8171 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-10ACPI : Not register gsi for PCI IDE controller in legacy modeAlan Cox
When PCI IDE controller works in legacy mode and no PRT entry is found in ACPI PRT table, OSPM will neither read the irq number from the IDE PCI configuration space nor call the function of acpi_register_gsi to register gsi. http://bugzilla.kernel.org/show_bug.cgi?id=5637 Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-07ACPI: Reintroduce run time configurable max_cstate for !CPU_IDLE caseVenki Pallipadi
This was writeable in 2.6.23 but the cpuidle merge made it read-only. But some people's scripts (ie: Mark's) were writing to it. As an unhappy compromise, make max_cstate writeable again if the kernel was configured without CONFIG_CPU_IDLE. http://bugzilla.kernel.org/show_bug.cgi?id=9683 Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Cc: Mark Lord <lkml@rtr.ca> Cc: Arjan van de Ven <arjan@infradead.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-01ACPI: Make sysfs interface in ACPI power optional.Alexey Starikovskiy
Reference: http://bugzilla.kernel.org/show_bug.cgi?id=9494 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-01ACPI: EC: Enable boot EC before bus_scanAlexey Starikovskiy
Some _STA methods called during bus_scan() might require EC region handler, which might be enabled later in the scan. Enable it explicitly before scan to avoid errors. Reference: http://bugzilla.kernel.org/show_bug.cgi?id=9627 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-14Pull bugzilla-9362 into release branchLen Brown
2007-12-14ACPI: SBS: Return rate in mW if capacity in mWhAlexey Starikovskiy
klaptopd assumes rate to be in same units as capacity. http://bugzilla.kernel.org/show_bug.cgi?id=9362 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-14ACPI: SBS: Ignore alarms coming from unknown devicesAlexey Starikovskiy
http://bugzilla.kernel.org/show_bug.cgi?id=9362 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-14ACPI: SBS: Reset alarm bitAlexey Starikovskiy
Alarm bit should be cleared in order for other alarms to be sent. http://bugzilla.kernel.org/show_bug.cgi?id=9362 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-14Pull hotplug into release branchLen Brown
2007-12-13Pull battery-2.6.24 into release branchLen Brown
2007-12-13ACPI: fix modpost warningsJan Beulich
for sn2_defconfig: WARNING: vmlinux.o(.text+0x4b8601): Section mismatch: reference to .init.data:node_to_pxm_map (between '__acpi_map_pxm_to_node' and 'acpi_get_pxm') WARNING: vmlinux.o(.text+0x4b8741): Section mismatch: reference to .init.data:pxm_to_node_map (between 'acpi_map_pxm_to_node' and 'acpi_get_node') Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-13ACPI: video_device_list corruptionWilliam Lee Irwin III
The ->cap fields of struct acpi_video_device and struct acpi_video_bus are 1B each, not 4B. The oversized memset()'s corrupted the subsequent list_head fields. This resulted in silent corruption without CONFIG_DEBUG_LIST and BUG's with it. This patch uses sizeof() to pass the proper bounds to the memset() calls and thereby correct the bugs. Signed-off-by: William Irwin <wli@holomorphy.com> Acked-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-07ACPI: move timer broadcast before busmaster disableThomas Gleixner
The timer broadcast code might access HPET, which should not be accessed after the busmaster disable. In acpi_idle_enter_simple() this change also prevents, that we modify the busmaster state without going actually idle. This might leave the ACPI bm state in a stale state, when we leave the function early in the need_resched() check. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
2007-12-06ACPI: battery: fix ACPI battery technology reportingAndrey Borzenkov
At least some systems report technology information with trailing spaces: {pts/1}% cat -E /var/tmp/bat/2.6.23 | grep type battery type: Li-ION $ Use strncasecmp to compare model string to skip trailing part Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru> Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-02Pull bugzilla-9429 into release branchLen Brown
2007-12-02Pull thermal into release branchLen Brown
2007-12-02ACPICA: fix acpi-cpufreq boot crash due to _PSD return-by-referenceBob Moore
Changed resolution of named references in packages Fixed a problem with the Package operator where all named references were created as object references and left otherwise unresolved. According to the ACPI specification, a Package can only contain Data Objects or references to control methods. The implication is that named references to Data Objects (Integer, Buffer, String, Package, BufferField, Field) should be resolved immediately upon package creation. This is the approach taken with this change. References to all other named objects (Methods, Devices, Scopes, etc.) are all now properly created as reference objects. http://bugzilla.kernel.org/show_bug.cgi?id=5328 http://bugzilla.kernel.org/show_bug.cgi?id=9429 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-01ACPI: Delete the IRQ operation in throttling controll via PTCZhao Yakui
The IRQ operation(enable/disable) should be avoided when throttling is controlled via PTC method. It is replaced by the migration of task. This fixes an oops on T61 -- a regression due to f79f06ab9f86 b/c FixedHW support tried to read remote MSR with interrupts disabled. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-29ACPI: avoid references to impossible processors.Christoph Lameter
ACPI uses NR_CPUS in various loops and in some it accesses per cpu data of processors that are not present(!) and that will never be present. The pointers to per cpu data are typically not initialized for processors that are not present. So we seem to be reading something here from offset 0 in memory. Make ACPI use nr_cpu_ids instead. That stops at the end of the possible processors. Convert one loop to NR_CPUS to use the cpu_possible map instead. That way ranges of processor that can never be brought online are skipped during the loop. Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Len Brown <lenb@kernel.org> Acked-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: x86: fix APIC related bootup crash on Athlon XP CPUs time: add ADJ_OFFSET_SS_READ x86: export the symbol empty_zero_page on the 32-bit x86 architecture x86: fix kprobes_64.c inlining borkage pci: use pci=bfsort for HP DL385 G2, DL585 G2 x86: correctly set UTS_MACHINE for "make ARCH=x86" lockdep: annotate do_debug() trap handler x86: turn off iommu merge by default x86: fix ACPI compile for LOCAL_APIC=n x86: printk kernel version in WARN_ON and other dump_stack users ACPI: Set max_cstate to 1 for early Opterons. x86: fix NMI watchdog & 'stopped time' problem
2007-11-26ACPI: Set max_cstate to 1 for early Opterons.Alexey Starikovskiy
AMD Opteron processors before CG revision don't like C-states > 1. This solves the long standing bugzilla #5303 and probably some more on affected machines: http://bugzilla.kernel.org/show_bug.cgi?id=5303 [ tglx@linutronix.de: reworked the patch so it does not wreck ia64 ] Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-20Pull bugzilla-9327 into release branchLen Brown
Conflicts: drivers/acpi/ec.c Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-20ACPI: EC: Workaround for optimized controllers (version 3)Alexey Starikovskiy
Some controllers fail to send confirmation GPE after address or data write. Detect this and don't expect such confirmation in future. This is a generalization of previous workaround (66c5f4e7367b0085652931b2f3366de29e7ff5ec), which did only read address. Reference: http://bugzilla.kernel.org/show_bug.cgi?id=9327 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Tested-by: Romano Giannetti <romano.giannetti@gmail.com> Tested-by: Mats Johannesson Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-20ACPI: EC: use printk_ratelimit(), add some DEBUG mode messagesMárton Németh
Sometimes it is usefull to see raw protocol dump. Uncomment '#define DEBUG' at the beginning of file to make EC really verbose. Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>