[PATCH 2/2] powerpc/e6500: hw tablewalk: fix recursive tlb lock on cpu 0

mihai.caraman at freescale.com mihai.caraman at freescale.com
Fri May 30 17:59:31 EST 2014


> -----Original Message-----
> From: Linuxppc-dev [mailto:linuxppc-dev-
> bounces+mihai.caraman=freescale.com at lists.ozlabs.org] On Behalf Of Scott
> Wood
> Sent: Friday, May 23, 2014 12:45 AM
> To: linuxppc-dev at lists.ozlabs.org
> Cc: Wood Scott-B07421
> Subject: [PATCH 2/2] powerpc/e6500: hw tablewalk: fix recursive tlb lock
> on cpu 0
> 
> Commit 82d86de25b9c99db546e17c6f7ebf9a691da557e "TLB lock recursive"
> introduced a bug whereby cpu 0 uses the same value for "lock held" as
> is used to indicate that the lock is free.

Isn't his what spin lock implementation solves by combines paca_index
with lock_token? Can't we have a common approach?

> Add one to the CPU value to ensure we do not use zero as a "lock held"
> value.

The CPU value is loaded in r10 from tlb_miss_common_e6500. "TLB lock recursive"
commit also introduced this misleading comment:

    We are entered with:
    r10 = cpu number

-Mike


More information about the Linuxppc-dev mailing list