[PATCH] powerpc: Don't play type punning games with lock_token

Segher Boessenkool segher at kernel.crashing.org
Thu Apr 24 04:27:02 EST 2008


> The two u16 fields lock_token and paca_index in struct paca_struct are
> accessed as one u32 field via type punning.  Change this into one u32
> field paca_id, and add a paca_get_index() function to access only the
> low 16 bits of this.
>
> Signed-off-by: Segher Boessenkool <segher at kernel.crashing.org>
> ---
>  arch/powerpc/kernel/asm-offsets.c          |    2 +-
>  arch/powerpc/kernel/paca.c                 |    3 +--
>  arch/powerpc/platforms/iseries/exception.S |    2 +-
>  include/asm-powerpc/iseries/hv_call.h      |    2 +-
>  include/asm-powerpc/paca.h                 |   18 ++++++++++++------
>  include/asm-powerpc/smp.h                  |    2 +-
>  include/asm-powerpc/spinlock.h             |    2 +-
>  7 files changed, 18 insertions(+), 13 deletions(-)

It doesn't apply cleanly anymore, will redo once the dust settles
a bit.


Segher




More information about the Linuxppc-dev mailing list