linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: Question about xAPIC lowest priority delivery
@ 2003-01-14  3:43 Protasevich, Natalie
  0 siblings, 0 replies; 2+ messages in thread
From: Protasevich, Natalie @ 2003-01-14  3:43 UTC (permalink / raw)
  To: James Cleverdon, Protasevich, Natalie
  Cc: Pallipadi, Venkatesh, William Lee Irwin III, Christoph Hellwig,
	Linux Kernel, 'Nakajima, Jun',
	Martin J. Bligh, Zwane Mwaikambo

>Anyway, is this a known erratum for xAPICs in parallel mode? (Namely, a bug

>in the XTPR arbitration logic in host bridges.)
>For that matter, does this happen on non-Summit xAPIC boxes? Anyone out
there 
>with a >= 2 CPU P4 box that uses parallel interrupts care to comment

I am not sure if we fall in the parallel mode category, but I will comment
since I was also concerned about xTPR mechanism.

We use lowest priority delivery for xAPIC-APIC case the following way: set
the destination to the logical id of boot CPU, set the LPDM bit on the
destination (0x01XXXX). This way, if something is wrong with xTPR mechanism,
the interrupt goes to boot CPU. (I presume it is about IA32 case, because it
is different for Itanium). Then, I have to increase priority entering an
interrupt by writing to the TPRI register, and lower it on the exit from it
to make it available for the next one... Besides this, due to some erratum
(I wish I had my specs here) I have to read from LDR and write back to it
after changing TPRI value:
 
apic_write_around(APIC_TASKPRI, pri); 
apic_write_around(APIC_LDR, apic_read(APIC_LDR)); 

Unfortunately, there is no single spot in the code identifying start and end
of an interrupt, so I had to fish for all places where they were happening.
I got it to work, and the balance is so fragile, that if I only touch any of
those places it immediately breaks or hangs... I wish there were macros in
place: irq_enter(), irq_exit() for IO-APIC irq's like in UnixWare, say.

I am sure there are people (especially from Intel, with red books newer than
mine) who are looking into this or could shed more light on how this can be
properly implemented.

--Natalie

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

* Question about xAPIC lowest priority delivery
@ 2003-01-14  0:50 James Cleverdon
  0 siblings, 0 replies; 2+ messages in thread
From: James Cleverdon @ 2003-01-14  0:50 UTC (permalink / raw)
  To: Nakajima, Jun, Pallipadi, Venkatesh
  Cc: Martin J. Bligh, John Stultz, linux-kernel

Folks,

We've run into a hitch in the v2.5 Summit interrupt code.  When balance_irq() 
targets an I/O APIC interrupt to an idle CPU, the interrupt really goes to 
CPU 0 of the APIC cluster, no matter which one it was supposed to interrupt.  
These IRQs are in lowest priority mode, but only one bit is set (correctly) 
in the low nibble.  (The high nibble contains the APIC cluster number, the 
low nibble is a bitmap of CPUs in the cluster.)

When we change the delivery mode from lowest priority to fixed, IRQs go where 
they should.  However, this reintroduces some code from v2.4 that we were 
trying to simplify and remove.

Anyway, is this a known erratum for xAPICs in parallel mode?  (Namely, a bug 
in the XTPR arbitration logic in host bridges.)

Can anyone at Intel or otherwise enlighten me?

For that matter, does this happen on non-Summit xAPIC boxes?  Anyone out there 
with a >= 2 CPU P4 box that uses parallel interrupts care to comment?

-- 
James Cleverdon
IBM xSeries Linux Solutions
{jamesclv(Unix, preferred), cleverdj(Notes)} at us dot ibm dot com


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

end of thread, other threads:[~2003-01-14  3:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-14  3:43 Question about xAPIC lowest priority delivery Protasevich, Natalie
  -- strict thread matches above, loose matches on Subject: below --
2003-01-14  0:50 James Cleverdon

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).