Re: Current kernel with http://gnats.netbsd.org/39965 and pmap patches

Izumi Tsutsui <[email protected]>
Newsgroups gmane.os.netbsd.ports.atari
Message-ID <[email protected]>
[email protected] wrote:

> AFAIK Falcon sound system and SCSI use DMA, but DMA for SCSI is disabled from
> atari/dev/ncr5380.c since 1.57 (there can be DMA HW issues with some Falcons).

Is there any device which uses DMA on your machine?
Could DMA interrupts happen even if it's disabled?

> > What happens if "MFP->mf_iprb = (u_int8_t)~IB_DINT;"
> > is added before (or after) wdcintr() call in wdc_mb_intr()
> > as current free_hw() does?
> 
> Adding it before wdcintr() call does not do better; couple of stray interrupt
> 71 error messages and many wdc:0:0:0: lost interrupt errors and
> freezing. If I place "MFP->mf_iprb = (u_int8_t)~IB_DINT;" after wdcintr() call
> behaviour is just like with current atari/dev/wdc_mb.c (kernel prints lost
> interrupt error messages as early as I mount partition from ATA drive)... I'm
> wondering why this happens? So it looks that handling MFP->mf_iprb in
> wdr_mb_intr() is not enough ?

atari/intr.c:intr_dispatch() function calls all established interrupt
handlers, so maybe we should not clear the interrupt register unless
it's actually processed in that handler.
(though I don't know about MFP interrupt registers on atari)

How about to handle MFP register only if wdcintr() returns non zero?
(Though this might cause a race condition if other DMA interrupts occur
 during wdcintr(). If IB_DINT is also shared among dma and wdc,
 maybe we should prepare special establish and dispatch functions for it)


static int
wdc_mb_intr(void *arg, int sr)
{
	int rv;

	rv = wdcintr(arg);
	if (rv != 0)
		MFP->mf_iprb = (u_int8_t)~IB_DINT;

	return rv;
}

---
Izumi Tsutsui
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.