linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PCIe interrupts assignment
@ 2012-08-02 10:28 Miguel Ángel Álvarez
  2012-08-02 13:56 ` Miguel Ángel Álvarez
  2012-08-02 15:55 ` Jiang Liu
  0 siblings, 2 replies; 4+ messages in thread
From: Miguel Ángel Álvarez @ 2012-08-02 10:28 UTC (permalink / raw)
  To: linux-pci

Dear all,

I have a 1 to 4 PCIe switch connected to a root port of a P2020.

I am attaching a PCIe board to each one of the download ports of the
switch (same kind of card with four serial ports in each one of them).

When booting Linux, all cards are detected, so I can see them in
/sys/bus/pci/devices. All 16 ttyS* are created. However, when trying
to use them, I have no problems when using the serial ports of the
card in the last downstream port of the switch, but if I try to use
any of the others I obtain the following error:

irq 16: nobody cared (try booting with the "irqpoll" option)
Call Trace:
[df83fca0] [c0007540] show_stack+0x84/0x1b0 (unreliable)
[df83fcd8] [c0077324] __report_bad_irq+0x5c/0xe0
[df83fcf0] [c0077534] note_interrupt+0x18c/0x238
[df83fd10] [c0078520] handle_fasteoi_irq+0xe4/0x134
[df83fd28] [c0004ea0] handle_one_irq+0x30/0x44
[df83fd38] [c000c078] __ipipe_do_IRQ+0x84/0xc0
[df83fd58] [c007bdc8] __ipipe_sync_stage+0x210/0x3b8
[df83fdb0] [c007cf40] __ipipe_unstall_root+0x60/0x74
[df83fdb8] [c0047798] __do_softirq+0xd8/0x200
[df83fe08] [c0004d50] do_softirq+0x60/0x80
[df83fe18] [c004751c] irq_exit+0x54/0xac
[df83fe20] [c000c07c] __ipipe_do_IRQ+0x88/0xc0
[df83fe40] [c007bdc8] __ipipe_sync_stage+0x210/0x3b8
[df83fe98] [c000ba7c] __ipipe_handle_irq+0x1c4/0x1f8
[df83fec8] [c000bd80] __ipipe_grab_irq+0x15c/0x1f0
[df83fee8] [c001323c] __ipipe_ret_from_except+0x0/0xc
[df83ffa8] [c0008684] cpu_idle+0x68/0xe0
[df83ffc0] [c0544c2c] start_secondary+0x314/0x350
[df83fff0] [c0001c9c] __secondary_start+0x30/0x84
handlers:
[<c0336e80>] (serial8250_interrupt+0x0/0x148)
Disabling IRQ #16

What I can see from /sys/bus/pci/devices/*/irq is that one irq is
assigned to each card; 16 for the first, 17 for the second, 18 for the
third and 19 for the last (and successfull) one.

My question is... where are irqs mapped for the pci express cards? I
have backtrace the code to pci_device_probe in pci-driver.c, but there
it seems that the irqs are already assigned.

I have searched the web, but have not found the clue that makes me
understand the process.

Any ideas?

Thanks

Miguel Ángel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PCIe interrupts assignment
  2012-08-02 10:28 PCIe interrupts assignment Miguel Ángel Álvarez
@ 2012-08-02 13:56 ` Miguel Ángel Álvarez
  2012-08-02 15:55 ` Jiang Liu
  1 sibling, 0 replies; 4+ messages in thread
From: Miguel Ángel Álvarez @ 2012-08-02 13:56 UTC (permalink / raw)
  To: linux-pci

More information regarding this issue:

If I change the dts from:

pci2: pcie@ffe08000 {
		cell-index = <3>;
		compatible = "fsl,mpc8548-pcie";
		device_type = "pci";
		#interrupt-cells = <1>;
		#size-cells = <2>;
		#address-cells = <3>;
		reg = <0 0xffe08000 0 0x1000>;
		bus-range = <0 255>;
		ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000
			  0x1000000 0x0 0x00000000 0 0xffc40000 0x0 0x10000>;
		clock-frequency = <33333333>;
		interrupt-parent = <&mpic>;
		interrupts = <27 2>;
		interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
		interrupt-map = <
			/* IDSEL 0x0 */
			0000 0x0 0x0 0x1 &mpic 0x8 0x1
			0000 0x0 0x0 0x2 &mpic 0x9 0x1
			0000 0x0 0x0 0x3 &mpic 0xa 0x1
			0000 0x0 0x0 0x4 &mpic 0xb 0x1
			>;
		pcie@0 {
			reg = <0x0 0x0 0x0 0x0 0x0>;
			#size-cells = <2>;
			#address-cells = <3>;
			device_type = "pci";
			ranges = <0x2000000 0x0 0xc0000000
				  0x2000000 0x0 0xc0000000
				  0x0 0x20000000

				  0x1000000 0x0 0x0
				  0x1000000 0x0 0x0
				  0x0 0x100000>;
		};
	};

to:

pci2: pcie@ffe08000 {
		cell-index = <3>;
		compatible = "fsl,mpc8548-pcie";
		device_type = "pci";
		#interrupt-cells = <1>;
		#size-cells = <2>;
		#address-cells = <3>;
		reg = <0 0xffe08000 0 0x1000>;
		bus-range = <0 255>;
		ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000
			  0x1000000 0x0 0x00000000 0 0xffc40000 0x0 0x10000>;
		clock-frequency = <33333333>;
		interrupt-parent = <&mpic>;
		interrupts = <27 2>;
		interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
		interrupt-map = <
			/* IDSEL 0x0 */
			0000 0x0 0x0 0x1 &mpic 0x8 0x2
			0000 0x0 0x0 0x2 &mpic 0x9 0x2
			0000 0x0 0x0 0x3 &mpic 0xa 0x2
			0000 0x0 0x0 0x4 &mpic 0xb 0x2
			>;
		pcie@0 {
			reg = <0x0 0x0 0x0 0x0 0x0>;
			#size-cells = <2>;
			#address-cells = <3>;
			device_type = "pci";
			ranges = <0x2000000 0x0 0xc0000000
				  0x2000000 0x0 0xc0000000
				  0x0 0x20000000

				  0x1000000 0x0 0x0
				  0x1000000 0x0 0x0
				  0x0 0x100000>;
		};
	};

I find that the cards that failed begin to work and the one that
worked begins to fail.

Miguel Ángel

On Thu, Aug 2, 2012 at 11:28 AM, Miguel Ángel Álvarez
<caronteycerbero@gmail.com> wrote:
> Dear all,
>
> I have a 1 to 4 PCIe switch connected to a root port of a P2020.
>
> I am attaching a PCIe board to each one of the download ports of the
> switch (same kind of card with four serial ports in each one of them).
>
> When booting Linux, all cards are detected, so I can see them in
> /sys/bus/pci/devices. All 16 ttyS* are created. However, when trying
> to use them, I have no problems when using the serial ports of the
> card in the last downstream port of the switch, but if I try to use
> any of the others I obtain the following error:
>
> irq 16: nobody cared (try booting with the "irqpoll" option)
> Call Trace:
> [df83fca0] [c0007540] show_stack+0x84/0x1b0 (unreliable)
> [df83fcd8] [c0077324] __report_bad_irq+0x5c/0xe0
> [df83fcf0] [c0077534] note_interrupt+0x18c/0x238
> [df83fd10] [c0078520] handle_fasteoi_irq+0xe4/0x134
> [df83fd28] [c0004ea0] handle_one_irq+0x30/0x44
> [df83fd38] [c000c078] __ipipe_do_IRQ+0x84/0xc0
> [df83fd58] [c007bdc8] __ipipe_sync_stage+0x210/0x3b8
> [df83fdb0] [c007cf40] __ipipe_unstall_root+0x60/0x74
> [df83fdb8] [c0047798] __do_softirq+0xd8/0x200
> [df83fe08] [c0004d50] do_softirq+0x60/0x80
> [df83fe18] [c004751c] irq_exit+0x54/0xac
> [df83fe20] [c000c07c] __ipipe_do_IRQ+0x88/0xc0
> [df83fe40] [c007bdc8] __ipipe_sync_stage+0x210/0x3b8
> [df83fe98] [c000ba7c] __ipipe_handle_irq+0x1c4/0x1f8
> [df83fec8] [c000bd80] __ipipe_grab_irq+0x15c/0x1f0
> [df83fee8] [c001323c] __ipipe_ret_from_except+0x0/0xc
> [df83ffa8] [c0008684] cpu_idle+0x68/0xe0
> [df83ffc0] [c0544c2c] start_secondary+0x314/0x350
> [df83fff0] [c0001c9c] __secondary_start+0x30/0x84
> handlers:
> [<c0336e80>] (serial8250_interrupt+0x0/0x148)
> Disabling IRQ #16
>
> What I can see from /sys/bus/pci/devices/*/irq is that one irq is
> assigned to each card; 16 for the first, 17 for the second, 18 for the
> third and 19 for the last (and successfull) one.
>
> My question is... where are irqs mapped for the pci express cards? I
> have backtrace the code to pci_device_probe in pci-driver.c, but there
> it seems that the irqs are already assigned.
>
> I have searched the web, but have not found the clue that makes me
> understand the process.
>
> Any ideas?
>
> Thanks
>
> Miguel Ángel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PCIe interrupts assignment
  2012-08-02 10:28 PCIe interrupts assignment Miguel Ángel Álvarez
  2012-08-02 13:56 ` Miguel Ángel Álvarez
@ 2012-08-02 15:55 ` Jiang Liu
  2012-08-02 16:53   ` Miguel Ángel Álvarez
  1 sibling, 1 reply; 4+ messages in thread
From: Jiang Liu @ 2012-08-02 15:55 UTC (permalink / raw)
  To: Miguel Ángel Álvarez; +Cc: linux-pci

Hi Miguel,
	Could you please help to check whether all serial ports work as expected with
the "irqpoll" kernel boot option? Seems something is wrong with the interrupt routine.

On 08/02/2012 06:28 PM, Miguel Ángel Álvarez wrote:
> Dear all,
> 
> I have a 1 to 4 PCIe switch connected to a root port of a P2020.
> 
> I am attaching a PCIe board to each one of the download ports of the
> switch (same kind of card with four serial ports in each one of them).
> 
> When booting Linux, all cards are detected, so I can see them in
> /sys/bus/pci/devices. All 16 ttyS* are created. However, when trying
> to use them, I have no problems when using the serial ports of the
> card in the last downstream port of the switch, but if I try to use
> any of the others I obtain the following error:
> 
> irq 16: nobody cared (try booting with the "irqpoll" option)
> Call Trace:
> [df83fca0] [c0007540] show_stack+0x84/0x1b0 (unreliable)
> [df83fcd8] [c0077324] __report_bad_irq+0x5c/0xe0
> [df83fcf0] [c0077534] note_interrupt+0x18c/0x238
> [df83fd10] [c0078520] handle_fasteoi_irq+0xe4/0x134
> [df83fd28] [c0004ea0] handle_one_irq+0x30/0x44
> [df83fd38] [c000c078] __ipipe_do_IRQ+0x84/0xc0
> [df83fd58] [c007bdc8] __ipipe_sync_stage+0x210/0x3b8
> [df83fdb0] [c007cf40] __ipipe_unstall_root+0x60/0x74
> [df83fdb8] [c0047798] __do_softirq+0xd8/0x200
> [df83fe08] [c0004d50] do_softirq+0x60/0x80
> [df83fe18] [c004751c] irq_exit+0x54/0xac
> [df83fe20] [c000c07c] __ipipe_do_IRQ+0x88/0xc0
> [df83fe40] [c007bdc8] __ipipe_sync_stage+0x210/0x3b8
> [df83fe98] [c000ba7c] __ipipe_handle_irq+0x1c4/0x1f8
> [df83fec8] [c000bd80] __ipipe_grab_irq+0x15c/0x1f0
> [df83fee8] [c001323c] __ipipe_ret_from_except+0x0/0xc
> [df83ffa8] [c0008684] cpu_idle+0x68/0xe0
> [df83ffc0] [c0544c2c] start_secondary+0x314/0x350
> [df83fff0] [c0001c9c] __secondary_start+0x30/0x84
> handlers:
> [<c0336e80>] (serial8250_interrupt+0x0/0x148)
> Disabling IRQ #16
> 
> What I can see from /sys/bus/pci/devices/*/irq is that one irq is
> assigned to each card; 16 for the first, 17 for the second, 18 for the
> third and 19 for the last (and successfull) one.
> 
> My question is... where are irqs mapped for the pci express cards? I
> have backtrace the code to pci_device_probe in pci-driver.c, but there
> it seems that the irqs are already assigned.
> 
> I have searched the web, but have not found the clue that makes me
> understand the process.
> 
> Any ideas?
> 
> Thanks
> 
> Miguel Ángel
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PCIe interrupts assignment
  2012-08-02 15:55 ` Jiang Liu
@ 2012-08-02 16:53   ` Miguel Ángel Álvarez
  0 siblings, 0 replies; 4+ messages in thread
From: Miguel Ángel Álvarez @ 2012-08-02 16:53 UTC (permalink / raw)
  To: Jiang Liu; +Cc: linux-pci

Hi

On Thu, Aug 2, 2012 at 4:55 PM, Jiang Liu <liuj97@gmail.com> wrote:
> Hi Miguel,
>         Could you please help to check whether all serial ports work as expected with
> the "irqpoll" kernel boot option? Seems something is wrong with the interrupt routine.
>

If I boot using irqpoll, the ports that worked continue working. The
one that did not work experiment a weird effect:

As the connected board is a serial expansor, I test it with a simple
"echo "a" > /dev/ttyS6". Now, with irqpoll, the caracter is sent but
the command hangs until I press ctrl+c.

> On 08/02/2012 06:28 PM, Miguel Ángel Álvarez wrote:
>> Dear all,
>>
>> I have a 1 to 4 PCIe switch connected to a root port of a P2020.
>>
>> I am attaching a PCIe board to each one of the download ports of the
>> switch (same kind of card with four serial ports in each one of them).
>>
>> When booting Linux, all cards are detected, so I can see them in
>> /sys/bus/pci/devices. All 16 ttyS* are created. However, when trying
>> to use them, I have no problems when using the serial ports of the
>> card in the last downstream port of the switch, but if I try to use
>> any of the others I obtain the following error:
>>
>> irq 16: nobody cared (try booting with the "irqpoll" option)
>> Call Trace:
>> [df83fca0] [c0007540] show_stack+0x84/0x1b0 (unreliable)
>> [df83fcd8] [c0077324] __report_bad_irq+0x5c/0xe0
>> [df83fcf0] [c0077534] note_interrupt+0x18c/0x238
>> [df83fd10] [c0078520] handle_fasteoi_irq+0xe4/0x134
>> [df83fd28] [c0004ea0] handle_one_irq+0x30/0x44
>> [df83fd38] [c000c078] __ipipe_do_IRQ+0x84/0xc0
>> [df83fd58] [c007bdc8] __ipipe_sync_stage+0x210/0x3b8
>> [df83fdb0] [c007cf40] __ipipe_unstall_root+0x60/0x74
>> [df83fdb8] [c0047798] __do_softirq+0xd8/0x200
>> [df83fe08] [c0004d50] do_softirq+0x60/0x80
>> [df83fe18] [c004751c] irq_exit+0x54/0xac
>> [df83fe20] [c000c07c] __ipipe_do_IRQ+0x88/0xc0
>> [df83fe40] [c007bdc8] __ipipe_sync_stage+0x210/0x3b8
>> [df83fe98] [c000ba7c] __ipipe_handle_irq+0x1c4/0x1f8
>> [df83fec8] [c000bd80] __ipipe_grab_irq+0x15c/0x1f0
>> [df83fee8] [c001323c] __ipipe_ret_from_except+0x0/0xc
>> [df83ffa8] [c0008684] cpu_idle+0x68/0xe0
>> [df83ffc0] [c0544c2c] start_secondary+0x314/0x350
>> [df83fff0] [c0001c9c] __secondary_start+0x30/0x84
>> handlers:
>> [<c0336e80>] (serial8250_interrupt+0x0/0x148)
>> Disabling IRQ #16
>>
>> What I can see from /sys/bus/pci/devices/*/irq is that one irq is
>> assigned to each card; 16 for the first, 17 for the second, 18 for the
>> third and 19 for the last (and successfull) one.
>>
>> My question is... where are irqs mapped for the pci express cards? I
>> have backtrace the code to pci_device_probe in pci-driver.c, but there
>> it seems that the irqs are already assigned.
>>
>> I have searched the web, but have not found the clue that makes me
>> understand the process.
>>
>> Any ideas?
>>
>> Thanks
>>
>> Miguel Ángel
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-08-02 16:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-02 10:28 PCIe interrupts assignment Miguel Ángel Álvarez
2012-08-02 13:56 ` Miguel Ángel Álvarez
2012-08-02 15:55 ` Jiang Liu
2012-08-02 16:53   ` Miguel Ángel Álvarez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).