#include <linux/cpu.h>
#include <linux/module.h>
#include <linux/sysctl.h>
+#include <linux/smp.h>
#include <asm/system.h>
#include <asm/processor.h>
#include <asm/iSeries/HvCall.h>
#include <asm/iSeries/ItLpQueue.h>
#include <asm/plpar_wrappers.h>
+#include <asm/systemcfg.h>
extern void power4_idle(void);
* The decrementer stops during the yield. Force a fake decrementer
* here and let the timer_interrupt code sort out the actual time.
*/
- get_paca()->lppaca.xIntDword.xFields.xDecrInt = 1;
+ get_paca()->lppaca.int_dword.fields.decr_int = 1;
process_iSeries_events();
}
lpaca = get_paca();
while (1) {
- if (lpaca->lppaca.xSharedProc) {
+ if (lpaca->lppaca.shared_proc) {
if (ItLpQueue_isLpIntPending(lpaca->lpqueue_ptr))
process_iSeries_events();
if (!need_resched())
* Indicate to the HV that we are idle. Now would be
* a good time to find other work to dispatch.
*/
- lpaca->lppaca.xIdle = 1;
+ lpaca->lppaca.idle = 1;
oldval = test_and_clear_thread_flag(TIF_NEED_RESCHED);
if (!oldval) {
HMT_medium();
- if (!(ppaca->lppaca.xIdle)) {
+ if (!(ppaca->lppaca.idle)) {
local_irq_disable();
/*
}
HMT_medium();
- lpaca->lppaca.xIdle = 0;
+ lpaca->lppaca.idle = 0;
schedule();
if (cpu_is_offline(cpu) && system_state == SYSTEM_RUNNING)
cpu_die();
* Indicate to the HV that we are idle. Now would be
* a good time to find other work to dispatch.
*/
- lpaca->lppaca.xIdle = 1;
+ lpaca->lppaca.idle = 1;
while (!need_resched() && !cpu_is_offline(cpu)) {
local_irq_disable();
}
HMT_medium();
- lpaca->lppaca.xIdle = 0;
+ lpaca->lppaca.idle = 0;
schedule();
if (cpu_is_offline(smp_processor_id()) &&
system_state == SYSTEM_RUNNING)
#endif /* CONFIG_PPC_ISERIES */
-int cpu_idle(void)
+void cpu_idle(void)
{
idle_loop();
- return 0;
}
int powersave_nap;
#ifdef CONFIG_PPC_PSERIES
if (systemcfg->platform & PLATFORM_PSERIES) {
if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
- if (get_paca()->lppaca.xSharedProc) {
+ if (get_paca()->lppaca.shared_proc) {
printk(KERN_INFO "Using shared processor idle loop\n");
idle_loop = shared_idle;
} else {
}
}
#endif /* CONFIG_PPC_PSERIES */
-#ifdef CONFIG_PPC_PMAC
- if (systemcfg->platform == PLATFORM_POWERMAC) {
+#ifndef CONFIG_PPC_ISERIES
+ if (systemcfg->platform == PLATFORM_POWERMAC ||
+ systemcfg->platform == PLATFORM_MAPLE) {
printk(KERN_INFO "Using native/NAP idle loop\n");
idle_loop = native_idle;
}
-#endif /* CONFIG_PPC_PMAC */
+#endif /* CONFIG_PPC_ISERIES */
return 1;
}