19 Mar, 2011
1 commit
-
ACPI uses a sysdev class and a sysdev for executing
irqrouter_resume() before turning on interrupts on the boot CPU.
However, since irqrouter_resume() ignores its argument, the entire
mechanism may be replaced with a struct syscore_ops object which
is considerably simpler.Signed-off-by: Rafael J. Wysocki
Signed-off-by: Len Brown
16 Oct, 2010
1 commit
-
Remove unused declaration of proc_fs.h.
Signed-off-by: Zhang Rui
Signed-off-by: Len Brown
30 Mar, 2010
1 commit
-
…it slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
17 Jan, 2010
1 commit
-
The ids field of the struct acpi_driver is constant in
so it is worth to make the initialization data also constant.The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)//
@r@
disable decl_init,const_decl_init;
identifier I1, I2, x;
@@
struct I1 {
...
const struct I2 *x;
...
};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
struct I1 y = {
.x = E,
};
@c@
identifier r.I2;
identifier s.E;
@@
const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+ const
struct I2 E[] = ...;
//Signed-off-by: Márton Németh
Cc: Julia Lawall
Cc: cocci@diku.dk
Signed-off-by: Len Brown
29 Aug, 2009
1 commit
-
Linux/ACPI core files using internal.h all PREFIX "ACPI: ",
however, not all ACPI drivers use/want it -- and they
should not have to #undef PREFIX to define their own.Add GPL commment to internal.h while we are there.
This does not change any actual console output,
asside from a whitespace fix.Signed-off-by: Len Brown
17 Mar, 2009
4 commits
-
We don't need a struct containing a count and a list_head; a simple
list_head is sufficient. The list iterators handle empty lists
fine.Furthermore, we don't need to check for null list entries because we
only add non-null entries.Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
Better to oops and learn about a bug than to silently cover it up.
Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
Remove unnecessary casts and initializations.
Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
This patch makes whitespace and indentation more consistent.
Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown
07 Feb, 2009
1 commit
-
According to kerneljanitors todo list all printk calls (beginning
a new line) should have an according KERN_* constant.
Those are the missing peaces here for the acpi subsystem.Signed-off-by: Frank Seidel
Signed-off-by: Len Brown
09 Jan, 2009
1 commit
-
Conflicts:
include/acpi/acpixf.hSigned-off-by: Len Brown
31 Dec, 2008
2 commits
-
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin
Signed-off-by: Len Brown -
According to the ACPI specification the SCI_EN flag is controlled by
the hardware, which sets this flag to inform the kernel that ACPI is
enabled. For this reason, we shouldn't try to modify SCI_EN
directly. Also, we don't need to do it in irqrouter_resume(), since
lower-level resume code takes care of enabling ACPI in case it hasn't
been enabled by the BIOS before passing control to the kernel (which
by the way is against the ACPI specification).Signed-off-by: Rafael J. Wysocki
Signed-off-by: Len Brown
12 Nov, 2008
1 commit
-
This removes the acpi_irq_balance_set() interface from the PCI
interrupt link driver.x86 used acpi_irq_balance_set() to tell the PCI interrupt link
driver to configure links to minimize IRQ sharing. But the link
driver can easily figure out whether to turn on IRQ balancing
based on the IRQ model (PIC/IOAPIC/etc), so we can get rid of
that external interface.It's better for the driver to figure this out at init-time. If
we set it externally via the x86 code, the interface reduces
modularity, and we depend on the fact that acpi_process_madt()
happens before we process the kernel command line.Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown
23 Oct, 2008
2 commits
-
Code in `pci_link.c' is calling the internal routine `acpi_ut_evaluate_object'
which is dangerous given that it is passing a NULL pointer when it should
be passing a pointer to a real object. The patch corrects the issue by
having the code call the external routine `acpi_evaluate_object', which
correctly handles a NULL pointer.Signed-off-by: Don Dugger
Signed-off-by: Len Brown
11 Oct, 2008
1 commit
-
Catch attempts to use of acpi_driver_data on pointers of wrong type.
akpm: rewritten to use proper C typechecking and remove the
"function"-used-as-lvalue thing.Signed-off-by: Pavel Machek
Signed-off-by: Andrew Morton
Signed-off-by: Len Brown
15 Aug, 2008
1 commit
-
acpi_penalize_isa_irq() should validate irq before using it to
index the acpi_irq_penalty[] table.Here's the path I'm concerned about:
pnpacpi_parse_allocated_irqresource()
{
...
irq = acpi_register_gsi(gsi, triggering, polarity);
if (irq >= 0)
pcibios_penalize_isa_irq(irq, 1);There's no guarantee that acpi_register_gsi() will return an IRQ
within the bounds of acpi_irq_penalty[].I have not seen a failure I can attribute to this. However,
ACPI_MAX_IRQS is only 256, and I'm pretty sure ia64 can have
IRQs larger than that.I think this should go in 2.6.27.
Signed-off-by: Bjorn Helgaas
Signed-off-by: Andi Kleen
18 Jul, 2008
1 commit
-
Silently ignore _PRS End Tags. We already ignore Start Dependent Functions in
_PRS, and we already ignore End Tags in _CRS, so we might as well ignore End
Tags in _PRS as well.Silently ignore _PRS IRQ descriptors that mention no interrupts. The spec
allows this (section 6.4.2.1 in ACPI 3.0b spec), and it probably means the
interrupt link can't be configured at all.This patch doesn't change any functional behavior; it just removes confusing
complaints like these:ACPI: Blank IRQ resource
ACPI: Resource is not an IRQ entrywhen parsing _PRS data "23 00 00 18 79 00" from an IBM xSeries 335 dual
Pentium IV Xeon 2.40 GHz machine. For more details, see
http://bugzilla.kernel.org/show_bug.cgi?id=11049The "23 00 00 18" part is a three-byte-long small IRQ resource with no bits set
in the IRQ mask ("00 00"), and level-triggered, active low, shareable ("18").The "79 00" is an End Tag (type 0x7). It is superfluous since there is no
Start Dependent Function tag and there are no resources after it, but it is
harmless.Thanks to Gabriele Trombetti
(aka Kurk) for reporting this and testing the patch.Signed-off-by: Bjorn Helgaas
Signed-off-by: Andi Kleen
07 Feb, 2008
1 commit
-
This patch contains the following possible cleanups:
- make the following needlessly global code static:
- drivers/acpi/bay.c:dev_attr_eject
- drivers/acpi/bay.c:dev_attr_present
- drivers/acpi/dock.c:dev_attr_docked
- drivers/acpi/dock.c:dev_attr_flags
- drivers/acpi/dock.c:dev_attr_uid
- drivers/acpi/dock.c:dev_attr_undock
- drivers/acpi/pci_bind.c:acpi_pci_unbind()
- drivers/acpi/pci_link.c:acpi_link_lock
- drivers/acpi/sbs.c:acpi_sbs_callback()
- drivers/acpi/sbshc.c:acpi_smbus_transaction()
- drivers/acpi/sleep/main.c:acpi_sleep_prepare()
- #if 0 the following unused global functions:
- drivers/acpi/numa.c:acpi_unmap_pxm_to_node()
- remove the following unused EXPORT_SYMBOL's:
- acpi_register_gsi
- acpi_unregister_gsi
- acpi_strict
- acpi_bus_receive_event
- register_acpi_bus_type
- unregister_acpi_bus_type
- acpi_os_printf
- acpi_os_sleep
- acpi_os_stall
- acpi_os_read_pci_configuration
- acpi_os_create_semaphore
- acpi_os_delete_semaphore
- acpi_os_wait_semaphore
- acpi_os_signal_semaphore
- acpi_os_signal
- acpi_pci_irq_enable
- acpi_get_pxmSigned-off-by: Adrian Bunk
Acked-by: Alexey Starikovskiy
Signed-off-by: Len Brown
25 Jan, 2008
1 commit
-
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
Signed-off-by: Greg Kroah-Hartman
24 Jul, 2007
1 commit
-
modpost is going to use these to create e.g. acpi:ACPI0001
in modules.alias.Signed-off-by: Thomas Renninger
Signed-off-by: Len Brown
22 Jul, 2007
1 commit
-
Signed-off-by: Dan Aloni
Signed-off-by: Andrew Morton
Signed-off-by: Len Brown
13 Feb, 2007
3 commits
-
Cosmetic only.
Except in a single case, #define ACPI_*_DRIVER_NAME
were invoked 0 or 1 times.Signed-off-by: Len Brown
-
It was erroneously used as a description rather than a name.
ie. turn this:
lenb@se7525gp2:/sys> ls bus/acpi/drivers
ACPI AC Adapter Driver ACPI Embedded Controller Driver ACPI Power Resource Driver
ACPI Battery Driver ACPI Fan Driver ACPI Processor Driver
ACPI Button Driver ACPI PCI Interrupt Link Driver ACPI Thermal Zone Driver
ACPI container driver ACPI PCI Root Bridge Driver hpetinto this:
lenb@se7525gp2:~> ls /sys/bus/acpi/drivers
ac battery button container ec fan hpet pci_link pci_root power processor thermalSigned-off-by: Len Brown
-
cosmetic only
Make "module name" actually match the file name.
Invoke with ';' as leaving it off confuses Lindent and gcc doesn't care.
Fix indentation where Lindent did get confused.Signed-off-by: Len Brown
03 Feb, 2007
2 commits
-
Signed-off-by: Len Brown
-
Remove flags parameter for acpi_{get,set}_register().
It is no longer necessary now that these functions use a
spinlock for mutual exclusion.Signed-off-by: Alexey Starikovskiy
Signed-off-by: Len Brown
21 Dec, 2006
1 commit
-
Signed-off-by: Andrew Morton
Signed-off-by: Len Brown
16 Dec, 2006
1 commit
-
Conflicts:
drivers/acpi/button.c
drivers/acpi/ec.c
drivers/acpi/osl.c
drivers/acpi/sbs.c
14 Oct, 2006
2 commits
-
acpi_pci_link_set() allocates both with interrupts on
and with interrupts off (resume-time), so check interrupts
and decide on GFP_ATOMIC or GFP_KERNEL at run-time.Signed-off-by: Jiri Kosina
Signed-off-by: Len Brown -
Signed-off-by: Jan Engelhardt
Signed-off-by: Len Brown
10 Jul, 2006
1 commit
-
Replace acpi_in_resume with a more general hack
to check irqs_disabled() on any kmalloc() from ACPI.
While setting (system_state != SYSTEM_RUNNING) on resume
seemed more general, Andrew Morton preferred this approach.http://bugzilla.kernel.org/show_bug.cgi?id=3469
Make acpi_os_allocate() into an inline function to
allow /proc/slab_allocators to work.Delete some memset() that could fault on allocation failure.
Signed-off-by: Len Brown
30 Jun, 2006
2 commits
-
Signed-off-by: Patrick Mochel
Signed-off-by: Len Brown -
Signed-off-by: Patrick Mochel
Signed-off-by: Len Brown
27 Jun, 2006
4 commits
-
Signed-off-by: Len Brown
-
Signed-off-by: Len Brown
-
Signed-off-by: Len Brown
-
Signed-off-by: Thomas Renninger
Signed-off-by: Len Brown
23 Jun, 2006
1 commit
-
* '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