Subject: Re: [PATCH v4 1/4] powerpc: Introduce local (non-broadcast) forms of tlb invalidates

From: Benjamin Herrenschmidt <[email-masked]>
Date: Sat, 13 Sep 2008 10:56:11 -0700

>  static inline void flush_tlb_range(struct vm_area_struct *vma,
>  				   unsigned long start, unsigned long end)
>  {
> -	_tlbia();
> +	_tlbil_all();
>  }

Why not the _pid() variant here ?

> +/*
> + * Flush MMU TLB for a particular process id, but only on the local processor
> + * (no broadcast)
> + */
> +_GLOBAL(_tlbil_pid)
> +	li	r3,(MMUCSR0_TLBFI)@l
> +	mtspr	SPRN_MMUCSR0, r3
> +1:
> +	mfspr	r3,SPRN_MMUCSR0
> +	andi.	r3,r3,MMUCSR0_TLBFI@l
> +	bne	1b
> +	blr

This will do a full inval of the TLB right ? Might be worth mentioning
this implementation limitation in a comment..

Cheers,
Ben.