Subject: Re: fiq

From: Philip Blundell <[email-masked]>
Date: Sun, 29 Mar 1998 13:07:46 +0100

>The other reason that I took it out was because the ARM3 isn't fast enough
>to work out the reason for the FIQ and then dispatch it to, say, the floppy
>handler - I've tried it!

I know.  It's not just the ARM3 - you can't do it on an ARM7500.  Maybe a 
StrongARM would be OK but I wouldn't like to bet on it.  The problem is that 
as soon as you start multiplexing FIQ routines you have to save and restore 
all the FIQ-mode registers on entry and exit.

>Hence, I think that there ought to be some method of passing a pointer to the
>code that you want to execute, a size, and possibly a flag argument to
>claim_fiq to say 'please copy this code to the FIQ vector' or 'please put a
>code jump into the FIQ vector to point to my routine'.  

What my patch gives you, as you'll find out if you read it, is an interface 
where you call claim_fiq() simply to find out whether anybody else is using 
the FIQ (or if they're prepared to give it up).  Assuming that nobody objects 
it's then up to you to do whatever you want, like copying code down to 1c or 
installing a jump.  You supply a function pointer but this is _not_ the FIQ 
handler - it's for the kernel to call if somebody later wants to steal the FIQ 
from under you, and it can be NULL if you're never prepared to allow this (eg 
the floppydma handler).  When you call release_fiq() the kernel reinstalls its 
default "unexpected fiq" handler. 

This ought to be all fairly familiar stuff to anybody who's used FIQs under 
RISC OS.  All that we're missing, and the only thing that needs it is Econet, 
is the ability to install a default FIQ handler that gets used when nobody 
else wants fiqs.

How does that sound?

>to be written in assembler still (esp as it doesn't have any stack).

There's no reason why a handler couldn't have a stack if it wanted one, of 
course.  But I agree that for Acorn machines at least, writing FIQ handlers in 
C isn't likely to be a winning idea.

p.

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]