Hi Matthew,

On Tue, 2012-03-20 at 10:55 -0500, Matthew Hicks wrote:
> Before creating and posting the patch, it was a consensus that using
> the l.movhi instruction was a better way to clear register values
> (since it doesn't require any register as input) than the other ways
> of doing it.  I haven't downloaded the kernel since Dec., 

...but that patch is from January 2011.  You should have it.

> so I don't know what all has been changed.  It is essential that the
> CLEAR_GPR macro be changed (as in the patch) as it relies on r0 == 0,
> which may not be true, especially when resetting r0.

I think setting r0=0 as the 2nd instruction after reset pretty much
guarantees it to be true.

> 
> 
> Your version of my changes may not work in simulation.  It depends on
> how X values are propagated.

Like I said, "your" changes went into the kernel a year before you
posted them.  As for the propagation of X values... explain it to me.

> 
> 
> Back to Mr. Diez's orginial question, the best way is to follow the
> same protocol as in my patch.

You'll need to convince me why.  I don't see the disadvantage of the
current approach, but I'm open to arguments.  (And I don't buy that
l.movhi is better than l.andi... does it use less power or what's the
advantage?)

Anyway, sorry if you feel your patch was ignored... it wasn't.  But it's
always good to ping the list if you feel your contribution didn't get
the attention it deserved; sometimes things slip through the cracks.
Otherwise, if you can sell your argument to me, your patch goes in...
it's that simple.

/Jonas

> 
> 
> 
> 
> ---Matthew Hicks
> 
> 
> 
> On Tue, Mar 20, 2012 at 10:34 AM, Jonas Bonn <[email protected]>
> wrote:
>         
>         On Tue, 2012-03-20 at 10:14 -0500, Matthew Hicks wrote:
>         > Here is a link to the patch I
>         > submitted:
>          
> http://lists.openrisc.net/pipermail/openrisc/2011-December/000560.html
>         >
>         
>         
>         This has been in the kernel for a while already.  See
>         below...  Or are
>         you saying that the below doesn't actually work?
>         
>         /Jonas
>         
>         commit 61d79baa21f0cff6697fd3172c8cf3685467441e
>         Author: Jonas Bonn <[email protected]>
>         Date:   Mon Jan 10 17:10:42 2011 +0100
>         
>            Clear r0 at startup
>         
>            r0 is "always zero" by convention only and there's no
>         guarantee that
>            the hardware actually sets its value to zero, so do it
>         explicitly at
>            startup just to be sure.  This doesn't actually cost
>         anything as we
>            can sneak it into the delay slot of the jump in the reset
>         vector
>         where
>            we previously had a l.nop.
>         
>         diff --git a/arch/openrisc/kernel/entry.S
>         b/arch/openrisc/kernel/entry.S
>         index c400de0..4f88c02 100644
>         --- a/arch/openrisc/kernel/entry.S
>         +++ b/arch/openrisc/kernel/entry.S
>         @@ -267,7 +267,7 @@
>         handler:                                                    ;\
>         
>          EXCEPTION_ENTRY(_tng_kernel_start)
>                l.jal   _start
>         -       l.nop
>         +        l.andi r0,r0,0
>         
>          /* ---[ 0x200: BUS exception
>         ]------------------------------------------- */
>         
>         
>         
>         
> 
> 


_______________________________________________
OpenRISC mailing list
[email protected]
http://lists.openrisc.net/listinfo/openrisc

Reply via email to