[PATCH] ppc64 - fix spinlock recursion in native_hpte_clear

Geoff Levand geoffrey.levand at am.sony.com
Thu Feb 23 09:50:26 EST 2006


R Sharada wrote:
> linux-2.6.16-rc4/arch/powerpc/mm/hash_native_64.c~fix_native_hpte_clear
> 2006-02-22 21:22:42.000000000 +0530
> +++ linux-2.6.16-rc4-sharada/arch/powerpc/mm/hash_native_64.c
> 2006-02-22 21:26:25.000000000 +0530
> @@ -403,12 +403,16 @@ static void native_hpte_clear(void)
>  		 */
>  		hpte_v = hptep->v;
>  
> +		/* tlbie() takes the native_tlbie_lock. hence change the
> +		 * tlbie() call here to __tlbie()
> +		 */


Once the patch is applied, the tlbie() call disappears and you have
comment that doesn't make sense in the new context.  Maybe you should
reconsider the wording.


>  		if (hpte_v & HPTE_V_VALID) {
>  			hptep->v = 0;
> -			tlbie(slot2va(hpte_v, slot), MMU_PAGE_4K, 0);
> +			__tlbie(slot2va(hpte_v, slot), MMU_PAGE_4K);
>  		}
>  	}
>  
> +	asm volatile("eieio; tlbsync; ptesync":::"memory");
>  	spin_unlock(&native_tlbie_lock);
>  	local_irq_restore(flags);
>  }



More information about the Linuxppc64-dev mailing list