All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Bjorn Helgaas <bhelgaas@google.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Peter Hurley <peter@hurleysoftware.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	Lan Tianyu <tianyu.lan@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Kosina <jkosina@suse.cz>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-next@vger.kernel.org
Subject: Re: [Bisected] [-next-20130204] usb/hcd: irq 18: nobody cared
Date: Mon, 11 Feb 2013 11:19:54 -0800	[thread overview]
Message-ID: <CAE9FiQWUZ3BgLOtcGePppLzWBv-uR8L+7abditH2MNA7zZW-WA@mail.gmail.com> (raw)
In-Reply-To: <1360587768.3454.2.camel@thor.lan>

[-- Attachment #1: Type: text/plain, Size: 3476 bytes --]

On Mon, Feb 11, 2013 at 5:02 AM, Peter Hurley <peter@hurleysoftware.com> wrote:
> On Sun, 2013-02-10 at 22:40 -0800, Yinghai Lu wrote:
>> On Sun, Feb 10, 2013 at 12:33 PM, Yinghai Lu <yinghai@kernel.org> wrote:
>> > On Sun, Feb 10, 2013 at 6:23 AM, Peter Hurley <peter@hurleysoftware.com> wrote:
>> >> On Sat, 2013-02-09 at 22:14 -0500, Peter Hurley wrote:
>> >>> On Tue, 2013-02-05 at 15:26 -0500, Alan Stern wrote:
>> >>> > On Tue, 5 Feb 2013, Peter Hurley wrote:
>> >>> >
>> >>> > > With -next-20130204:
>> >>> > >
>> >>> > > [   33.855570] irq 18: nobody cared (try booting with the "irqpoll" option)
>> >>> > > [   33.855580] Pid: 0, comm: swapper/4 Not tainted 3.8.0-next-20130204-xeon #20130204
>> >>> > > [   33.855582] Call Trace:
>> >>> > > [   33.855585]  <IRQ>  [<ffffffff810f1076>] __report_bad_irq+0x36/0xe0
>> >>> > > [   33.855600]  [<ffffffff810f152a>] note_interrupt+0x1aa/0x200
>> >>> > > [   33.855606]  [<ffffffff8101edf2>] ? mwait_idle+0x82/0x1b0
>> >>> > > [   33.855610]  [<ffffffff810eed89>] handle_irq_event_percpu+0xc9/0x260
>> >>> > > [   33.855614]  [<ffffffff810eef68>] handle_irq_event+0x48/0x70
>> >>> > > [   33.855618]  [<ffffffff810f20ba>] handle_fasteoi_irq+0x5a/0x100
>> >>> > > [   33.855624]  [<ffffffff810182f2>] handle_irq+0x22/0x40
>> >>> > > [   33.855630]  [<ffffffff816e2a9a>] do_IRQ+0x5a/0xd0
>> >>> > > [   33.855636]  [<ffffffff816d97ad>] common_interrupt+0x6d/0x6d
>> >>> > > [   33.855638]  <EOI>  [<ffffffff810f8e2a>] ? rcu_eqs_enter_common+0x4a/0x320
>> >>> > > [   33.855646]  [<ffffffff8101edf2>] ? mwait_idle+0x82/0x1b0
>> >>> > > [   33.855649]  [<ffffffff8101ed99>] ? mwait_idle+0x29/0x1b0
>> >>> > > [   33.855653]  [<ffffffff8101f8a6>] cpu_idle+0x116/0x130
>> >>> > > [   33.855658]  [<ffffffff816c0c0f>] start_secondary+0x251/0x258
>> >>> > > [   33.855660] handlers:
>> >>> > > [   33.855664] [<ffffffff814f98a0>] usb_hcd_irq
>> >>> > > [   33.855667] Disabling IRQ #18
>> >>> > >
>> >> https://bugzilla.kernel.org/show_bug.cgi?id=53561
>> >>
>> >> Maybe this is some interaction with all the new ACPI code and fixes
>> >> written in those 8 days.
>> >
>> > interrupt routing seems get changed:
>> > next:
>> >    5:          0          0          0          0          0
>> > 0          0          0   IO-APIC-fasteoi   snd_ctxfi
>> >   18:      99970         13         16         20      99940
>> > 13         13         16   IO-APIC-fasteoi   uhci_hcd:usb4
>> > v3.8-rc7:
>> >   18:        424         15         11        112        420
>> > 16         18        105   IO-APIC-fasteoi   uhci_hcd:usb4, snd_ctxfi
>> >
>> > These messages in the bad dmesg log are interesting since PCI INT A is routed
>> > on
>> > irq 18 with the kernels that work.
>> > [    8.983246] pci 0000:00:1e.0: can't derive routing for PCI INT A
>> > [    8.983600] snd_ctxfi 0000:09:02.0: PCI INT A: no GSI - using ISA IRQ 5
>> > ...
>> >
>> > acpi_pci_irq_add_prt() add wrong bus for that bridge, because that
>> > that bridge is not scanned.
>> >
>> > Will check if I can produce one patch for it.
>>
>> Hi Peter,
>>
>> Can you try attached debug patch?
>
> Fixed, thanks.

Bjorn, Rafael,

acpi_pci_irq_add_prt need to be called after pci bridge get scanned,
so we can not call it from pci_acpi_setup, after we move dev_register
for pci_dev early.

The attached debug patch move down that calling into
pci_bus_add_devices and that will make prt works again.

Can acpi provide another hook after bridge get scanned?

Thanks

Yinghai

[-- Attachment #2: move_add_irq_prt_down.patch --]
[-- Type: application/octet-stream, Size: 2009 bytes --]

---
 drivers/pci/bus.c      |    5 +++++
 drivers/pci/pci-acpi.c |   13 +++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

Index: linux-2.6/drivers/pci/bus.c
===================================================================
--- linux-2.6.orig/drivers/pci/bus.c
+++ linux-2.6/drivers/pci/bus.c
@@ -160,6 +160,8 @@ pci_bus_alloc_resource(struct pci_bus *b
 
 void __weak pcibios_resource_survey_bus(struct pci_bus *bus) { }
 
+void __weak pcibios_irq_setup(struct device *dev) { }
+
 /**
  * pci_bus_add_device - start driver for a single device
  * @dev: device to add
@@ -170,6 +172,9 @@ int pci_bus_add_device(struct pci_dev *d
 {
 	int retval;
 
+	/* need to after bridge is scanned */
+	pcibios_irq_setup(&dev->dev);
+
 	/*
 	 * Can not put in pci_device_add yet because resources
 	 * are not assigned yet for some devices.
Index: linux-2.6/drivers/pci/pci-acpi.c
===================================================================
--- linux-2.6.orig/drivers/pci/pci-acpi.c
+++ linux-2.6/drivers/pci/pci-acpi.c
@@ -302,14 +302,16 @@ static int acpi_pci_find_device(struct d
 	return 0;
 }
 
-static void pci_acpi_setup(struct device *dev)
+void pcibios_irq_setup(struct device *dev)
 {
 	struct pci_dev *pci_dev = to_pci_dev(dev);
 	acpi_handle handle = ACPI_HANDLE(dev);
-	struct acpi_device *adev;
 	acpi_status status;
 	acpi_handle dummy;
 
+	if (acpi_disabled || acpi_pci_disabled)
+		return;
+
 	/*
 	 * Evaluate and parse _PRT, if exists.  This code allows parsing of
 	 * _PRT objects within the scope of non-bridge devices.  Note that
@@ -326,6 +328,13 @@ static void pci_acpi_setup(struct device
 			pci_dev->subordinate->number : pci_dev->bus->number;
 		acpi_pci_irq_add_prt(handle, pci_domain_nr(pci_dev->bus), bus);
 	}
+}
+
+static void pci_acpi_setup(struct device *dev)
+{
+	struct pci_dev *pci_dev = to_pci_dev(dev);
+	acpi_handle handle = ACPI_HANDLE(dev);
+	struct acpi_device *adev;
 
 	if (acpi_bus_get_device(handle, &adev) || !adev->wakeup.flags.valid)
 		return;

  reply	other threads:[~2013-02-11 19:19 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-05 17:51 [-next-20130204] usb/hcd: irq 18: nobody cared Peter Hurley
2013-02-05 20:26 ` Alan Stern
2013-02-05 20:26   ` Alan Stern
2013-02-08 11:57   ` Peter Hurley
2013-02-10  3:14   ` [Bisected] " Peter Hurley
2013-02-10 14:23     ` Peter Hurley
2013-02-10 20:33       ` Yinghai Lu
2013-02-11  6:40         ` Yinghai Lu
2013-02-11 10:25           ` Jiri Slaby
2013-02-11 13:02           ` Peter Hurley
2013-02-11 19:19             ` Yinghai Lu [this message]
2013-02-11 19:45               ` Sedat Dilek
2013-02-11 19:53                 ` Yinghai Lu
2013-02-11 19:57               ` Yinghai Lu
2013-02-11 21:06                 ` Yinghai Lu
2013-02-11 22:41                   ` Bjorn Helgaas
2013-02-12  0:08                     ` Yinghai Lu
2013-02-12  3:21                       ` Yinghai Lu
2013-02-12 19:11                         ` [PATCH] ACPI, PCI: Get PRT entry during acpi_pci_enable_irq() Yinghai Lu
2013-02-12 20:22                           ` Rafael J. Wysocki
2013-02-15  0:50                             ` Yinghai Lu
2013-02-16  0:39                               ` Bjorn Helgaas
2013-02-16  1:26                                 ` Yinghai Lu
2013-02-16  1:37                                   ` Yinghai Lu
2013-02-19 18:51                                     ` Bjorn Helgaas
2013-02-13  2:20                           ` Peter Hurley
2013-02-13  2:42                             ` Yinghai Lu
2013-02-13  3:18                               ` Peter Hurley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAE9FiQWUZ3BgLOtcGePppLzWBv-uR8L+7abditH2MNA7zZW-WA@mail.gmail.com \
    --to=yinghai@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter@hurleysoftware.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=stern@rowland.harvard.edu \
    --cc=tianyu.lan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.