#ifdef CONFIG_PPC_64K_PAGES get_paca()->pgdir = mm->pgd; #endif /* CONFIG_PPC_64K_PAGES */ 
void switch_slb(struct task_struct *tsk, struct mm_struct *mm){	unsigned long offset = get_paca()->slb_cache_ptr;	unsigned long esid_data = 0;	unsigned long pc = KSTK_EIP(tsk);	unsigned long stack = KSTK_ESP(tsk);	unsigned long unmapped_base;	if (offset <= SLB_CACHE_ENTRIES) {		int i;		asm volatile("isync" : : : "memory");		for (i = 0; i < offset; i++) {			esid_data = ((unsigned long)get_paca()->slb_cache[i]				<< SID_SHIFT) | SLBIE_C;			asm volatile("slbie %0" : : "r" (esid_data));		}		asm volatile("isync" : : : "memory");	} else {		slb_flush_and_rebolt();	}	/* Workaround POWER5 < DD2.1 issue */	if (offset == 1 || offset > SLB_CACHE_ENTRIES)		asm volatile("slbie %0" : : "r" (esid_data));	get_paca()->slb_cache_ptr = 0;	get_paca()->context = mm->context;	/*	 * preload some userspace segments into the SLB.	 */	if (test_tsk_thread_flag(tsk, TIF_32BIT))		unmapped_base = TASK_UNMAPPED_BASE_USER32;	else		unmapped_base = TASK_UNMAPPED_BASE_USER64;	if (pc >= KERNELBASE)		return;	slb_allocate(pc);	if (GET_ESID(pc) == GET_ESID(stack))		return;	if (stack >= KERNELBASE)		return;	slb_allocate(stack);	if ((GET_ESID(pc) == GET_ESID(unmapped_base))	    || (GET_ESID(stack) == GET_ESID(unmapped_base)))		return;	if (unmapped_base >= KERNELBASE)		return;	slb_allocate(unmapped_base);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/3c726f8dee6f55e96475574e9f645327e461884c/slb.c/clean/arch/powerpc/mm/slb.c