[PATCH] [v2] powerpc: save trap number in bad_stack

Stephen Rothwell sfr at canb.auug.org.au
Mon Apr 23 23:22:17 EST 2007


On Sun, 22 Apr 2007 18:38:21 -0500 olof at lixom.net (Olof Johansson) wrote:
>
> --- powerpc.orig/include/asm-powerpc/paca.h
> +++ powerpc/include/asm-powerpc/paca.h
> @@ -68,6 +68,7 @@ struct paca_struct {
>  	void *emergency_sp;		/* pointer to emergency stack */
>  	u64 data_offset;		/* per cpu data offset */
>  	s16 hw_cpu_id;			/* Physical processor number */
> +	u16 trap_save;			/* Used when bad stack is encountered */

Please read the comment at the top of the struct:

        /*
         * Because hw_cpu_id, unlike other paca fields, is accessed
         * routinely from other CPUs (from the IRQ code), we stick to
         * read-only (after boot) fields in the first cacheline to
         * avoid cacheline bouncing.
         */

So please move this out of the first cache line.

--
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20070423/254fa6b7/attachment.pgp>


More information about the Linuxppc-dev mailing list