Re: Strange interrupt behaviour

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sun, 12 Jul 1998 16:26:03 +0100 (BST)


> When Ingo tells us that the current 2.1 tree barely works with about
> 7K stack then this opens the question: Where is all this spend?

Indeed. Since 2.0 just about fits in 3.5K

> One proposal included using vmalloc() for the stack, but this was
> put down because lots of drivers seem to break with that. They put
> DMA buffers on the stack which might not work when they happen to
> lie on the border between the two pages. This would probably
> cause lots of hard-to-find, difficult-to-reporduce bugs.

I spent a bit of the morning looking at this. If you make
virt_to_phys() a function while debugging and the value is in
the range of the kernel stack you deliberately Oops, you'll find
any you missed really quick.

We also btw have a pile of buggy DMA drivers that don't use
virt_to_bus() but survive because the top byte is lost by the PC
DMA controllers. Those are not going to work too well on the
Alpha unless caught.

It may be a good time to sanity check the set_dma_addr() function
too.

I think you need to drop sanity check routines into those two points,
test them and send out a patch

> Unfortunately the interrupt stack more or less requires the indirect
> current scheme, because otherwise current could not be accessed inside
> interrupt handlers (the interrupt entry routine would just copy current
> to the bottom of the irq stack)

"Current" is not meaningful in an interrupt handler anyway. In fact it
would be nice to arrange that "current" faulted on an IRQ.

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html