Message-ID: Date: Wed, 1 Feb 2006 09:32:39 +0100 From: Jeroen Van den Keybus Subject: Re: [Xenomai-core] [PATCH] Shared irqs v.6 In-Reply-To: <43DFC50B.1090707@domain.hid> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1633_26381702.1138782759825" References: <43DFB5F9.50406@domain.hid> <43DFC50B.1090707@domain.hid> List-Id: "Xenomai life and development \(bug reports, patches, discussions\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: xenomai@xenomai.org ------=_Part_1633_26381702.1138782759825 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline > > > I mean that the support of shared interrupts for ISA boards > (edge-triggered > > stuff) is a kind of emulation to overcome the shortcommings of the > initial > > design on the hardware level. The hardware was just not supposed to > support > > shared interrupt channels. So, let's keep it a bit aside from another > code > > :o) > > Unfortunately, this crappy hardware is still quite common in the > embedded domain. If I've understood correctly, the only reason for having this support is to avoid - after discovering an interrupting UART - that the IRQ line remains high upon exit, which would cause the 8259 not to issue the CPU IRQ for tha= t line anymore ? The proposed solution is therefore to traverse the entire list of UARTs connected to that IRQ line and make sure none of them was interruptin= g in two consecutive passes (by checking their status registers). That would mean the IRQ line must be deasserted and the 8259 will properly detect any newly arriving interrupts, since the 8259 has been acknowledged before handling the interrupt. 1. Wouldn't it be more efficient to make this a compile-time option, instea= d of burdening the nucleus with it ? 2. Would it be an option, in the embedded boards Jan is speaking of, to put the 8259 in level sensitive mode ? Some of the boards I know don't actually have this selection logic for the built-in interrupt sources such as the timer and the IDE I/F and it therefore only applies to the ISA bus. 3. Beware of UARTs that cause interrupts and have a problem that causes the= m to spuriously return 'all green' upon reading of the IIR register. I have dealt with an integrated ('Super I/O') card with that problem before. The only solution was to look at LSR and check THRE as well, even when no TX interrupt was seemingly present. Must be a logic race. Jeroen. ------=_Part_1633_26381702.1138782759825 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
> I mean that the support of = shared interrupts for ISA boards (edge-triggered
> stuff) is a kind o= f emulation to overcome the shortcommings of the initial
> design on the hardware level. The hardware was just not supposed t= o support
> shared interrupt channels. So, let's keep it a bit aside = from another code
> :o)

Unfortunately, this crappy hardware is= still quite common in the
embedded domain.
 
If I've understood correctly, the only reason for having this support = is to avoid - after discovering an interrupting UART - that the IRQ line re= mains high upon exit, which would cause the 8259 not to issue the CPU IRQ f= or that line anymore ?
 
The proposed solution is therefore to traverse the entire list of UART= s connected to that IRQ line and make sure none of them was inter= rupting in two consecutive passes (by checking their status registers). Tha= t would mean the IRQ line must be deasserted and the 8259 will properly det= ect any newly arriving interrupts, since the 8259 has been acknowledged bef= ore handling the interrupt.
 
1. Wouldn't it be more efficient to make this a compile-time option, i= nstead of burdening the nucleus with it ?
2. Would it be an option, in the embedded boards Jan is speaking of, t= o put the 8259 in level sensitive mode ? Some of the boards I know don't ac= tually have this selection logic for the built-in interrupt sources such as= the timer and the IDE I/F and it therefore only applies to the ISA bus.
3. Beware of UARTs that cause interrupts and have a problem that = causes them to spuriously return 'all green' upon reading of the IIR r= egister. I have dealt with an integrated ('Super I/O') card with that probl= em before. The only solution was to look at LSR and check THRE as well, eve= n when no TX interrupt was seemingly present. Must be a logic race.
 
Jeroen.
 
------=_Part_1633_26381702.1138782759825--