[uClinux-dev] [RFC] m68knommu: use user stack pointer hardware on some ColdFire cores

Lennart Sorensen lsorense at csclub.uwaterloo.ca
Thu Nov 4 10:34:54 EDT 2010

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?

> 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.

> 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?

> 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.

> The patch below is against 2.6.36. If you prefer living on the edge,
> you can pull this from from the for-linus branch of ther m68knommu
> git tree (along with a bunch of other updates):
> git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu.git for-linus

Len Sorensen

More information about the uClinux-dev mailing list