Hi Lennart,

On 05/11/10 00:34, Lennart Sorensen wrote:
On Thu, Nov 04, 2010 at 02:50:16PM +1000, Greg Ungerer wrote:
This is a request for testing (and comment) on a patch that will
use the separate kernel/user stack pointer hardware that the more
modern ColdFire cores have. This has a performance benefit when
used, the exception entry and exit paths are quite a few instructions
shorter.

Sounds useful.  Any idea what kind of performance improvement this
would make?

I haven't gone and measured it yet :-)
But a typical exception entry from user space goes from 16 instructions
on entry to 6, and a typical exit back to user space 14 instructions
to 6. (And of course this is all exception entry types, system calls,
interrupts, etc).


Currently the parts I know can use it are the 520[78], 523x, 527[12],
527[45], 523x (and 547x/548x).

Did you mean 527[01] rather than 527[12]?  I thought the 5270 and 5271
were the same and the 5272 was the odd ball that wasn't 527x.

Sorry, yes, that should have been the 527[01]. The 5272 is the odd
ball, and doesn't support separate supervisor and user stack pointers.
(Its a real mutant, it doesn't look anything like anything else!)


The use of the separate stack pointer is based on a config option
(CONFIG_COLDFIRE_SW_A7) that is automatically selected based on
ColdFure CPU selection. This may well not be the best way to do this.
Maybe the selection should be based on the compiler define
__mcfisaaplus__. I didn't use this because only more modern toolchains
support it. My 4.2.4 based toolchain doesn't.

Does this affect compiling of user space or is it purely a kernel change?

No, this doesn't haven't any real impact on user space. Compilers that
know about __mcfisaaplus__ can generate some of its newer instructions
if they choose too.


The older toolchain also required one more ugly hack. Pre 4.3 gcc
won't generate the "move usp" instructions required for this when
compiling for ColdFire. So I have had to hard code the opcode values
in place for these instructions for now.

Maybe we need to bite the bullet and just not support this using
older toolchains... Thoughts?

I certainly don't condier pre 4.3 worth using (fails compiles too often
complaining about who knows what involving offsets or jump tables or
whatever it was it had issues with).  4.3 just works in all cases.

Yeah, pre 4.3 is kinda old now.

Regards
Greg


------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     g...@snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to