mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* question on odd APIC behavior
@ 2007-11-14 23:54 Oliver Neukum
  2007-11-15 13:16 ` Maciej W. Rozycki
  0 siblings, 1 reply; 10+ messages in thread
From: Oliver Neukum @ 2007-11-14 23:54 UTC (permalink / raw)
  To: linux-kernel

Hi,

is there a way to so misprogramm an APIC that a physical interrupt results
in two interrupts delivered?

	Regards
		Oliver

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

* Re: question on odd APIC behavior
  2007-11-14 23:54 question on odd APIC behavior Oliver Neukum
@ 2007-11-15 13:16 ` Maciej W. Rozycki
  2007-11-15 15:27   ` Oliver Neukum
  0 siblings, 1 reply; 10+ messages in thread
From: Maciej W. Rozycki @ 2007-11-15 13:16 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-kernel

On Thu, 15 Nov 2007, Oliver Neukum wrote:

> is there a way to so misprogramm an APIC that a physical interrupt results
> in two interrupts delivered?

 Certainly.  One possibility is to have multiple processors marked as the 
destination, e.g. a logical delivery mode destination programmed with 
multiple bits set.

  Maciej

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

* Re: question on odd APIC behavior
  2007-11-15 13:16 ` Maciej W. Rozycki
@ 2007-11-15 15:27   ` Oliver Neukum
  2007-11-15 16:44     ` Maciej W. Rozycki
  0 siblings, 1 reply; 10+ messages in thread
From: Oliver Neukum @ 2007-11-15 15:27 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: linux-kernel

Am Donnerstag 15 November 2007 schrieb Maciej W. Rozycki:
> On Thu, 15 Nov 2007, Oliver Neukum wrote:
> 
> > is there a way to so misprogramm an APIC that a physical interrupt results
> > in two interrupts delivered?
> 
>  Certainly.  One possibility is to have multiple processors marked as the 
> destination, e.g. a logical delivery mode destination programmed with 
> multiple bits set.

What would be the consequences?
I am seeing an interrupt for an UHCI on #20 CPU1 also arriving on
#19 CPU0, triggering the spurious interrupt detection.

	Regards
		Oliver

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

* Re: question on odd APIC behavior
  2007-11-15 15:27   ` Oliver Neukum
@ 2007-11-15 16:44     ` Maciej W. Rozycki
  2007-11-15 18:05       ` Oliver Neukum
  0 siblings, 1 reply; 10+ messages in thread
From: Maciej W. Rozycki @ 2007-11-15 16:44 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-kernel

On Thu, 15 Nov 2007, Oliver Neukum wrote:

> >  Certainly.  One possibility is to have multiple processors marked as the 
> > destination, e.g. a logical delivery mode destination programmed with 
> > multiple bits set.
> 
> What would be the consequences?

 It depends on the exact setup and conditions.

> I am seeing an interrupt for an UHCI on #20 CPU1 also arriving on
> #19 CPU0, triggering the spurious interrupt detection.

 Well, if you see spurious interrupt detection triggered, then it is not a 
problem with the interrupt being delivered multiple times (that's handled 
silently by the interrupt dispatched), but likely the interrupt line being 
deasserted too late.  Does it happen frequently?  If your ERR counter in 
/proc/interrupts increments quite fast, then perhaps a driver does not 
handle interrupts well enough for your system.  Or there is noise on an 
interrupt line.

 You would have to provide more information to get more accurate feedback.

  Maciej

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

* Re: question on odd APIC behavior
  2007-11-15 16:44     ` Maciej W. Rozycki
@ 2007-11-15 18:05       ` Oliver Neukum
  2007-11-16 10:02         ` Maciej W. Rozycki
  0 siblings, 1 reply; 10+ messages in thread
From: Oliver Neukum @ 2007-11-15 18:05 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: linux-kernel

Am Donnerstag 15 November 2007 schrieb Maciej W. Rozycki:
> On Thu, 15 Nov 2007, Oliver Neukum wrote:

> > I am seeing an interrupt for an UHCI on #20 CPU1 also arriving on
> > #19 CPU0, triggering the spurious interrupt detection.
> 
>  Well, if you see spurious interrupt detection triggered, then it is not a 
> problem with the interrupt being delivered multiple times (that's handled 
> silently by the interrupt dispatched), but likely the interrupt line being 
> deasserted too late.  Does it happen frequently?  If your ERR counter in 
> /proc/interrupts increments quite fast, then perhaps a driver does not 
> handle interrupts well enough for your system.  Or there is noise on an 
> interrupt line.
> 
>  You would have to provide more information to get more accurate feedback.

On irq 20, there's an UHCI, on irq 19 is an EHCI. For every interrupt on 20
there's a spurious interrupt on 19. USB devices on bus of the controller on 20
work. So I know all interrupts are seen. ERR does not increase. Interrupts
for devices on the bus of the controller on 19 arrive at 19 only.
As far as I can determine there are really interrupts on both CPUs on
different vectors for one physical interrupt request.

	Regards
		Oliver

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

* Re: question on odd APIC behavior
  2007-11-15 18:05       ` Oliver Neukum
@ 2007-11-16 10:02         ` Maciej W. Rozycki
  2007-11-16 11:03           ` Oliver Neukum
  0 siblings, 1 reply; 10+ messages in thread
From: Maciej W. Rozycki @ 2007-11-16 10:02 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-kernel

On Thu, 15 Nov 2007, Oliver Neukum wrote:

> On irq 20, there's an UHCI, on irq 19 is an EHCI. For every interrupt on 20
> there's a spurious interrupt on 19. USB devices on bus of the controller on 20
> work. So I know all interrupts are seen. ERR does not increase. Interrupts
> for devices on the bus of the controller on 19 arrive at 19 only.

 I suggest you try to sort it out with the maintainers of the UHCI and 
EHCI drivers then.

  Maciej

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

* Re: question on odd APIC behavior
  2007-11-16 10:02         ` Maciej W. Rozycki
@ 2007-11-16 11:03           ` Oliver Neukum
  2007-11-16 11:20             ` Maciej W. Rozycki
  0 siblings, 1 reply; 10+ messages in thread
From: Oliver Neukum @ 2007-11-16 11:03 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: linux-kernel

Am Freitag 16 November 2007 schrieb Maciej W. Rozycki:
> On Thu, 15 Nov 2007, Oliver Neukum wrote:
> 
> > On irq 20, there's an UHCI, on irq 19 is an EHCI. For every interrupt on 20
> > there's a spurious interrupt on 19. USB devices on bus of the controller on 20
> > work. So I know all interrupts are seen. ERR does not increase. Interrupts
> > for devices on the bus of the controller on 19 arrive at 19 only.
> 
>  I suggest you try to sort it out with the maintainers of the UHCI and 
> EHCI drivers then.

They are innocent. This laptop really delivers an interrupt twice.

	Regards
		Oliver

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

* Re: question on odd APIC behavior
  2007-11-16 11:03           ` Oliver Neukum
@ 2007-11-16 11:20             ` Maciej W. Rozycki
  2007-11-16 21:34               ` Oliver Neukum
  0 siblings, 1 reply; 10+ messages in thread
From: Maciej W. Rozycki @ 2007-11-16 11:20 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-kernel

On Fri, 16 Nov 2007, Oliver Neukum wrote:

> > > On irq 20, there's an UHCI, on irq 19 is an EHCI. For every interrupt on 20
> > > there's a spurious interrupt on 19. USB devices on bus of the controller on 20
> > > work. So I know all interrupts are seen. ERR does not increase. Interrupts
> > > for devices on the bus of the controller on 19 arrive at 19 only.
> > 
> >  I suggest you try to sort it out with the maintainers of the UHCI and 
> > EHCI drivers then.
> 
> They are innocent. This laptop really delivers an interrupt twice.

 Perhaps, but these drivers are involved and the device-specific knowledge 
will help tracking down the cause.  I have general experience on how 
interrupts work, including on APIC-based systems, but I have no idea how 
UHCI and EHCI devices work in this area and, in particular, how you know 
an interrupt coming from the line #19 is related to one on the line #20 
and then a spurious one if not recorded as ERR or otherwise unclaimed 
(which would be reported as "irq 19: nobody cared").

  Maciej

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

* Re: question on odd APIC behavior
  2007-11-16 11:20             ` Maciej W. Rozycki
@ 2007-11-16 21:34               ` Oliver Neukum
  2007-11-19 15:09                 ` Maciej W. Rozycki
  0 siblings, 1 reply; 10+ messages in thread
From: Oliver Neukum @ 2007-11-16 21:34 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: linux-kernel

Am Freitag 16 November 2007 schrieb Maciej W. Rozycki:
> On Fri, 16 Nov 2007, Oliver Neukum wrote:
> 
> > > > On irq 20, there's an UHCI, on irq 19 is an EHCI. For every interrupt on 20
> > > > there's a spurious interrupt on 19. USB devices on bus of the controller on 20
> > > > work. So I know all interrupts are seen. ERR does not increase. Interrupts
> > > > for devices on the bus of the controller on 19 arrive at 19 only.
> > > 
> > >  I suggest you try to sort it out with the maintainers of the UHCI and 
> > > EHCI drivers then.
> > 
> > They are innocent. This laptop really delivers an interrupt twice.
> 
>  Perhaps, but these drivers are involved and the device-specific knowledge 
> will help tracking down the cause.  I have general experience on how 
> interrupts work, including on APIC-based systems, but I have no idea how 
> UHCI and EHCI devices work in this area and, in particular, how you know 
> an interrupt coming from the line #19 is related to one on the line #20 
> and then a spurious one if not recorded as ERR or otherwise unclaimed 
> (which would be reported as "irq 19: nobody cared").

I am getting irq 19:nobody cared. Interrupts on 19 and 20 increase with
same rate, disconnecting the device on the bus stops the increase,
reconnecting it makes them increase again.

	Regards
		Oliver

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

* Re: question on odd APIC behavior
  2007-11-16 21:34               ` Oliver Neukum
@ 2007-11-19 15:09                 ` Maciej W. Rozycki
  0 siblings, 0 replies; 10+ messages in thread
From: Maciej W. Rozycki @ 2007-11-19 15:09 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-kernel

On Fri, 16 Nov 2007, Oliver Neukum wrote:

> I am getting irq 19:nobody cared. Interrupts on 19 and 20 increase with
> same rate, disconnecting the device on the bus stops the increase,
> reconnecting it makes them increase again.

 Very odd indeed.  I suggest you post the relevant information (like the 
bootstrap log, output from `lspci -v', the contents of /proc/cpuinfo, 
etc.) together with the description of the problem (so that the report is 
self-contained) here and perhaps somebody will be able to diagnose it 
properly.  It could be some ACPI breakage.

  Maciej

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

end of thread, other threads:[~2007-11-19 15:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-14 23:54 question on odd APIC behavior Oliver Neukum
2007-11-15 13:16 ` Maciej W. Rozycki
2007-11-15 15:27   ` Oliver Neukum
2007-11-15 16:44     ` Maciej W. Rozycki
2007-11-15 18:05       ` Oliver Neukum
2007-11-16 10:02         ` Maciej W. Rozycki
2007-11-16 11:03           ` Oliver Neukum
2007-11-16 11:20             ` Maciej W. Rozycki
2007-11-16 21:34               ` Oliver Neukum
2007-11-19 15:09                 ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®