07 Jan, 2012
1 commit
-
When the runtime PM is activated on PCI, if a device switches state
frequently (e.g. an EHCI controller with autosuspending USB devices
connected) the PCI configuration traces might be very verbose in the
kernel log. Let's guard those traces with DEBUG condition.Acked-by: "Rafael J. Wysocki"
Signed-off-by: Vincent Palatin
Signed-off-by: Jesse Barnes
17 Jul, 2011
1 commit
-
The following was observed by Steve Rostedt on 3.0.0-rc5
Backtrace:
irq 16: nobody cared (try booting with the "irqpoll" option)
Pid: 65, comm: irq/16-uhci_hcd Not tainted 3.0.0-rc5-test+ #94
Call Trace:
[] __report_bad_irq+0x37/0xc1
[] note_interrupt+0x14e/0x1c9
[] ? irq_thread_fn+0x3c/0x3c
[] irq_thread+0xf6/0x1b1
[] ? irq_finalize_oneshot+0xb3/0xb3
[] kthread+0x9f/0xa7
[] kernel_thread_helper+0x4/0x10
[] ? finish_task_switch+0x7b/0xc0
[] ? retint_restore_args+0x13/0x13
[] ? __init_kthread_worker+0x5a/0x5a
[] ? gs_change+0x13/0x13
handlers:
[] irq_default_primary_handler threaded [] usb_hcd_irq
[] irq_default_primary_handler threaded [] usb_hcd_irq
Disabling IRQ #16The problem being that a device triggers boot interrupts (due to threaded
interrupt handling and masking of the IO-APIC), which are forwarded
to the PIRQ line of the device. These interrupts are not handled on the PIRQ
line because the interrupt handler is not present there.
This should have already been fixed by CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS.
However some parts of the quirk got lost in the ACPI merge. This is a resent of
the patch proposed in 2009.
See http://lkml.org/lkml/2009/9/7/192Signed-off-by: Stefan Assmann
Tested-by: Steven Rostedt
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
05 May, 2010
1 commit
-
Strictly speaking on x86 (where acpi is used) dev->irq must be
a dual i8259 irq input aka an isa irq. Therefore we should translate
that isa irq into a gsi before passing it to a function that
takes a gsi.Signed-off-by: Eric W. Biederman
LKML-Reference:
Signed-off-by: H. Peter Anvin
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>
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
24 Jun, 2009
1 commit
-
…bugzilla-13121', 'bugzilla-13396', 'bugzilla-13533', 'bugzilla-13612', 'c3_lock', 'hid-cleanups', 'misc-2.6.31', 'pdc-leak-fix', 'pnpacpi', 'power_nocheck', 'thinkpad_acpi', 'video' and 'wmi' into release
18 Jun, 2009
2 commits
-
There is no need to pass a segment/bus tuple to this API, as the callsite
always has a struct pci_bus. We can derive segment/bus from the
struct pci_bus, so let's take this opportunit to simplify the API and
make life easier for the callers.Signed-off-by: Alex Chiang
Acked-by: Bjorn Helgaas
Signed-off-by: Len Brown -
A PCI domain cannot change as you descend down subordinate buses, which
makes the 'segment' argument to acpi_pci_irq_add_prt() useless.Change the interface to take a struct pci_bus *, from whence we can derive
the bus number and segment. Reducing the number of arguments makes life
simpler for callers.Signed-off-by: Alex Chiang
Acked-by: Bjorn Helgaas
Signed-off-by: Len Brown
28 Apr, 2009
1 commit
-
We want to use dev_to_node() later on, to be aware of the 'home node'
of the GSI in question.[ Impact: cleanup, prepare the IRQ code to be more NUMA aware ]
Signed-off-by: Yinghai Lu
Acked-by: Len Brown
Cc: Andrew Morton
Cc: Suresh Siddha
Cc: "Eric W. Biederman"
Cc: Rusty Russell
Cc: Len Brown
Cc: Bjorn Helgaas
Cc: Tony Luck
Cc: linux-acpi@vger.kernel.org
Cc: linux-ia64@vger.kernel.org
LKML-Reference:
Signed-off-by: Ingo Molnar
05 Apr, 2009
1 commit
04 Apr, 2009
1 commit
-
Signed-off-by: Jan Beulich
Signed-off-by: Len Brown
17 Mar, 2009
1 commit
-
Use the generic pci_swizzle_interrupt_pin() instead of ACPI-specific code.
Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown
31 Dec, 2008
20 commits
-
Add HP copyright to pci_irq.c.
Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
This patch makes function declarations consistent throughout
the file and removes some unnecessary initializations.Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
acpi_pci_allocate_irq() and acpi_pci_free_irq() are trivial and
only used once, so just open-code them.Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
Remove unused "irq" field, remove unnecessary struct,
rename "handle" to "link".Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
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.Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
This folds acpi_pci_irq_derive() into acpi_pci_irq_lookup() so it
can be easily used by both acpi_pci_irq_enable() and acpi_pci_irq_disable().Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
No functional change; this just uses the typical pattern of
PCI INTx swizzling done on other architectures.Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
This doesn't change anything functionally; it just changes tests
so we test for success instead of failure. This makes the code
read more easily and allows us to remove the "!entry" in the while
loop condition.Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
We currently pass a callback function (either acpi_pci_allocate_irq() or
acpi_pci_free_irq()) to acpi_pci_irq_lookup() and acpi_pci_irq_derive().I think it's simpler to remove the callback and just have the enable/
disable functions make the calls directly.Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
Print one message (either "found" or "not found") for every _PRT
search. And add pin information to the INTx swizzling debug.Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
There's no reason to pass around segment, bus, and device independently
when we can just pass the pci_dev pointer, which carries all those
already.The pci_dev contains an interrupt pin, too, but we still have to pass both
the pci_dev and the pin because when we use a bridge to derive an IRQ, we
need the pin from the downstream device, not the bridge.Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
Use the PCI INTx pin encoding (1=INTA, 2=INTB, etc) for _PRT quirks.
Then we can simply compare "entry->pin == quirk->pin".Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
This patch changes pci_irq.c to always use PCI INTx pin encodings
instead of a mix of PCI and _PRT encodings.The PCI INTx pin numbers from the PCI_INTERRUPT_PIN config register
are 0=device doesn't use interrupts, 1=INTA, ..., 4=INTD. But the
_PRT table uses 0=INTA, ..., 3=INTD.This patch converts the _PRT encoding to the PCI encoding immediately
when we add a _PRT entry to the global list. All the rest of the
code can then use the PCI encoding consistently.The point of this is to make the interrupt swizzling look the same
as on other architectures, so someday we can unify them.Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
This adds a helper function to convert INTx pin numbers from the _PRT
(0, 1, 2, 3) to the pin name ('A', 'B', 'C', 'D').Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
The struct acpi_prt_entry is used only in pci_irq.c, so there's no
need for the declaration to be public. This patch moves it into
pci_irq.c.Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
The interrupt numbers from _PRT entries are GSIs, not Linux IRQs.
Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
_PRT entries don't contain any useful PCI function information (the
function part of the PCI address is supposed to be 0xffff), and we
don't ever look at it, so this patch just removes the reference to
it.Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
Previously, acpi_pci_irq_add_prt() did all its own buffer management.
But now that we have ACPI_ALLOCATE_BUFFER, we no longer need to do
that management. And we don't have to call acpi_get_irq_routing_table()
twice (once to learn the size of the buffer needed, and again to
actually get the table).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 -
Use the conventional format for PCI addresses (%04x:%02x:%02x.%d).
Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown
17 Jul, 2008
1 commit
-
Convert printks to use dev_printk(). The most obvious change will
be messages like this:-ACPI: PCI Interrupt 0000:00:04.0[A] -> GSI 31 (level, low) -> IRQ 31
+cciss 0000:00:04.0: PCI INT A -> GSI 31 (level, low) -> IRQ 31Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown
Signed-off-by: Andi Kleen
26 Mar, 2008
1 commit
-
This fixes the builtin RTL8139 NIC on the Medion MD9580-F laptop. The
BIOS reports the interrupt routing incorrectly. I recently added a
quirk to work around this, and this patch fixes a typo in the quirk.We pad every ACPI pathname component to four characters, so ".ISA." will
never match anything. We need ".ISA_." instead.Thank you Johann-Nikolaus Andreae
for patiently testing this patch.See http://bugzilla.kernel.org/show_bug.cgi?id=4773
Signed-off-by: Bjorn Helgaas
Signed-off-by: Linus Torvalds
12 Mar, 2008
1 commit
-
This patch works around incorrect _PRT (PCI interrupt routing)
information from firmware. This does not fix any regressions
and can wait for the next kernel release.On the Medion MD9580-F laptop, the BIOS says the builtin RTL8139
NIC interrupt at 00:09.0[A] is connected to \_SB.PCI0.ISA.LNKA, but
it's really connected to \_SB.PCI0.ISA.LNKB. Before this patch,
the workaround was to use "pci=routeirq". More details at
http://bugzilla.kernel.org/show_bug.cgi?id=4773.On the Dell OptiPlex GX1, the BIOS says the PCI slot interrupt
00:0d[A] is connected to LNKB, but it's really connected to LNKA.
Before this patch, the workaround was to use "pci=routeirq".
Pierre Ossman tested a previous version of this patch and confirmed
that it fixed the problem. More details at
http://bugzilla.kernel.org/show_bug.cgi?id=5044.On the HP t5710 thin client, the BIOS says the builtin Radeon
video interrupt at 01:00[A] is connected to LNK1, but it's really
connected to LNK3. The previous workaround was to use a custom
DSDT. I tested this patch and verified that it fixes the problem.
More details at http://bugzilla.kernel.org/show_bug.cgi?id=10138.Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown
07 Feb, 2008
3 commits
-
Conflicts:
drivers/acpi/scan.c
include/linux/acpi.hSigned-off-by: Len Brown
-
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 -
Signed-off-by: Matthias Kaehlcke
Signed-off-by: Andrew Morton
Signed-off-by: Len Brown
11 Jan, 2008
1 commit
-
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
Signed-off-by: Zhao Yakui
Signed-off-by: Zhang Rui
Signed-off-by: Len Brown