[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] CONFIG_REGISTER_TASK_PTR



Hi Yashi,

Yasushi SHOJI wrote:

> Is anyone still(?) working on CONFIG_REGISTER_TASK_PTR?

Not me :)
> 
> it seems broken on my side.

Oh yes, well and truly broken!

> can anyone enlighten me on the status?

Short version - I intended to quietly remove it one day...

Long version - it's a hangover from the v850 origins of the microblaze 
port.  the v850 port (and some others?) dedicates a register to hold the 
current task pointer, to save the kernel a memory lookup every time it 
needs it.    At the time I was porting entry.S, I couldn't get it to 
behave, so moved over to the memory-based version.  I left the register 
stuff in there for no particularly good reason.

There are some much easier targets for performance improvement, but if 
you're keen, you could probably get it going.  I think I chose r31, so 
you'd add "CFLAGS +=-ffixed-r31" into arch/microblaze/Makefile, to tell 
mb-gcc that r31 is no longer available.

Then find where we declare the "current" variable (I think in 
arch/microblaze/kernel/process.c?), put some #define's around that, and 
so on.

This takes r31 away from the compiler, which in some cases (funcs with 
lots of local vars?) will cause register swapping and other slow stuff.

Regards,

John

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/