 #ifdef CONFIG_PPC_64K_PAGES get_paca()->pgdir = mm->pgd; #endif /* CONFIG_PPC_64K_PAGES */ 
void switch_stab(struct task_struct *tsk, struct mm_struct *mm){	struct stab_entry *stab = (struct stab_entry *) get_paca()->stab_addr;	struct stab_entry *ste;	unsigned long offset = __get_cpu_var(stab_cache_ptr);	unsigned long pc = KSTK_EIP(tsk);	unsigned long stack = KSTK_ESP(tsk);	unsigned long unmapped_base;	/* Force previous translations to complete. DRENG */	asm volatile("isync" : : : "memory");	if (offset <= NR_STAB_CACHE_ENTRIES) {		int i;		for (i = 0; i < offset; i++) {			ste = stab + __get_cpu_var(stab_cache[i]);			ste->esid_data = 0; /* invalidate entry */		}	} else {		unsigned long entry;		/* Invalidate all entries. */		ste = stab;		/* Never flush the first entry. */		ste += 1;		for (entry = 1;		     entry < (PAGE_SIZE / sizeof(struct stab_entry));		     entry++, ste++) {			unsigned long ea;			ea = ste->esid_data & ESID_MASK;			if (ea < KERNELBASE) {				ste->esid_data = 0;			}		}	}	asm volatile("sync; slbia; sync":::"memory");	__get_cpu_var(stab_cache_ptr) = 0;	/* Now preload some entries for the new task */	if (test_tsk_thread_flag(tsk, TIF_32BIT))		unmapped_base = TASK_UNMAPPED_BASE_USER32;	else		unmapped_base = TASK_UNMAPPED_BASE_USER64;	__ste_allocate(pc, mm);	if (GET_ESID(pc) == GET_ESID(stack))		return;	__ste_allocate(stack, mm);	if ((GET_ESID(pc) == GET_ESID(unmapped_base))	    || (GET_ESID(stack) == GET_ESID(unmapped_base)))		return;	__ste_allocate(unmapped_base, mm);	/* Order update */	asm volatile("sync" : : : "memory");}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/3c726f8dee6f55e96475574e9f645327e461884c/stab.c/clean/arch/powerpc/mm/stab.c