[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-arm-kernel
Subject: Re: pending interrupts
From: Nicolas Pitre <nico () cam ! org>
Date: 2004-09-15 19:47:48
Message-ID: Pine.LNX.4.61.0409151531550.19910 () xanadu ! home
[Download RAW message or body]
On Wed, 15 Sep 2004, Matthias Welwarsky wrote:
> On Tuesday 14 September 2004 19:04, Nicolas Pitre wrote:
> > On Tue, 14 Sep 2004, Matthias Welwarsky wrote:
> > > Also, it's a little difficult to
> > > write the FIQ code in C, since you lack a stack :)
> >
> > FIQ handlers are always written in assembly, of course.
>
> Well, yes, however the badness of writing them in C is highly overrated. If
> you can trick your compiler into not using a stack and only the banked
> registers, it is entirely possible.
But thein it isn't C anymore.
And what's the point?
If you want to use FIQs that's for a single reason: speed. And normally
FIQ handlers can be written in only a _few_ assembly instructions to
read a value, maybe do little math and store it in memory then return
ASAP, with all required pointers already set in the FIQ banked regs.
Writing C code for this is rather overkill.
Also if you want to use C you'll need to preserve/restore r0 through r7
anyway since the compiler needs the low registers for function call
argument passing.
In other words, you may arrange to be able to use C for FIQ handlers of
course, but if you do that you simply missed the very reason for using a
FIQ handler in the first place.
Nicolas
-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ: http://www.arm.linux.org.uk/armlinux/mlfaq.php
Etiquette: http://www.arm.linux.org.uk/armlinux/mletiquette.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic