pmu_resume();  
static int __pmac pmu_set_cpu_speed(int low_speed){	struct adb_request req;	unsigned long save_l2cr;	unsigned long save_l3cr;	unsigned int pic_prio;	unsigned long flags;	preempt_disable();#ifdef DEBUG_FREQ	printk(KERN_DEBUG "HID1, before: %x\n", mfspr(SPRN_HID1));#endif	/* Disable all interrupt sources on openpic */ 	pic_prio = openpic_get_priority();	openpic_set_priority(0xf);	/* Make sure the decrementer won't interrupt us */	asm volatile("mtdec %0" : : "r" (0x7fffffff));	/* Make sure any pending DEC interrupt occuring while we did	 * the above didn't re-enable the DEC */	mb();	asm volatile("mtdec %0" : : "r" (0x7fffffff));	/* We can now disable MSR_EE */	local_irq_save(flags);	/* Giveup the FPU & vec */	enable_kernel_fp();#ifdef CONFIG_ALTIVEC	if (cpu_has_feature(CPU_FTR_ALTIVEC))		enable_kernel_altivec();#endif /* CONFIG_ALTIVEC */	/* Save & disable L2 and L3 caches */	save_l3cr = _get_L3CR();	/* (returns -1 if not available) */	save_l2cr = _get_L2CR();	/* (returns -1 if not available) */	/* Send the new speed command. My assumption is that this command	 * will cause PLL_CFG[0..3] to be changed next time CPU goes to sleep	 */	pmu_request(&req, NULL, 6, PMU_CPU_SPEED, 'W', 'O', 'O', 'F', low_speed);	while (!req.complete)		pmu_poll();	/* Prepare the northbridge for the speed transition */	pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,1,1);	/* Call low level code to backup CPU state and recover from	 * hardware reset	 */	low_sleep_handler();	/* Restore the northbridge */	pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,1,0);	/* Restore L2 cache */	if (save_l2cr != 0xffffffff && (save_l2cr & L2CR_L2E) != 0) 		_set_L2CR(save_l2cr);	/* Restore L3 cache */	if (save_l3cr != 0xffffffff && (save_l3cr & L3CR_L3E) != 0) 		_set_L3CR(save_l3cr);	/* Restore userland MMU context */	set_context(current->active_mm->context, current->active_mm->pgd);#ifdef DEBUG_FREQ	printk(KERN_DEBUG "HID1, after: %x\n", mfspr(SPRN_HID1));#endif	/* Restore low level PMU operations */	pmu_unlock();	/* Restore decrementer */	wakeup_decrementer();	/* Restore interrupts */ 	openpic_set_priority(pic_prio);	/* Let interrupts flow again ... */	local_irq_restore(flags);#ifdef DEBUG_FREQ	debug_calc_bogomips();#endif	preempt_enable();	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b16eeb47292597a8bf3ad53fdaf1f727f57bd8e4/pmac_cpufreq.c/buggy/arch/ppc/platforms/pmac_cpufreq.c