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

Benjamin Herrenschmidt benh at kernel.crashing.org
Sun Sep 14 03:56:11 EST 2008


>  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 at 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.





More information about the Linuxppc-dev mailing list