/* Allocate segment tables for secondary CPUs. These must all go in the first (bolted) segment, so that do_stab_bolted won't get a recursive segment miss on the segment table itself.  */
void __init stabs_alloc(void)
/* Allocate segment tables for secondary CPUs. These must all go in the first (bolted) segment, so that do_stab_bolted won't get a recursive segment miss on the segment table itself.  */
void __init stabs_alloc(void)
{
	int cpu;
	if (cpu_has_feature(CPU_FTR_SLB))
		return;
	for_each_possible_cpu(cpu) {
		unsigned long newstab;
		if (cpu == 0)
			continue;
		newstab = lmb_alloc_base(HW_PAGE_SIZE, HW_PAGE_SIZE,
					 1<<SID_SHIFT);
		newstab = (unsigned long)__va(newstab);
		memset((void *)newstab, 0, HW_PAGE_SIZE);
		paca[cpu].stab_addr = newstab;
		paca[cpu].stab_real = virt_to_abs(newstab);
		printk(KERN_INFO "Segment table for CPU %d at 0x%llx "
		       "virtual, 0x%llx absolute\n",
		       cpu, paca[cpu].stab_addr, paca[cpu].stab_real);
	}
}