This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] ISR not causing an DSR in some rare conditions


Nick Garnett <nickg@ecoscentric.com> writes:

> Andrew Lunn <andrew@lunn.ch> writes:
>
>> On Mon, Feb 06, 2006 at 08:58:05PM +0300, Sergei Organov wrote:
>> > Jay Foster <jay@systech.com> writes:
>> > > Revised patch attached.
>> > 
>> > The patch looks OK to me, but I don't see it applied to the public CVS
>> > :(
>> 
>> Is the general consensue that this patch is OK now? If so i will
>> commit it.
>
> Yes, it looks OK. At least it will do no harm.
>
> My one reservation is that we still don't have a good explanation for
> why this hasn't caused problems in the past. This is a serious
> register corruption bug in a very frequently executed piece of
> code.

One explanation I can think of is that we are so lucky that ISR code
creates exactly the same frame on the current stack as context switch
routine tries to create. Therefore, should interrupt happen at those one
buggy instruction, the ISR will store exactly the same registers at
exactly the same places on the stack, resulting in no program visible
corruption.

Very carefully hidden bug, I'd say ;)

-- Sergei.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]