[-mm PATCH 13/32] ppc64: fix-up schedule_timeout() usage
Nishanth Aravamudan
nacc at us.ibm.com
Tue Aug 16 04:15:41 EST 2005
Description: Use schedule_timeout_interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.
Signed-off-by: Nishanth Aravamudan <nacc at us.ibm.com>
---
arch/ppc64/kernel/rtasd.c | 3 +--
arch/ppc64/kernel/rtc.c | 6 ++----
arch/ppc64/kernel/scanlog.c | 3 +--
3 files changed, 4 insertions(+), 8 deletions(-)
diff -urpN 2.6.13-rc5-mm1/arch/ppc64/kernel/rtasd.c 2.6.13-rc5-mm1-dev/arch/ppc64/kernel/rtasd.c
--- 2.6.13-rc5-mm1/arch/ppc64/kernel/rtasd.c 2005-08-07 09:57:45.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/arch/ppc64/kernel/rtasd.c 2005-08-08 13:54:49.000000000 -0700
@@ -412,8 +412,7 @@ static void do_event_scan_all_cpus(long
/* Drop hotplug lock, and sleep for the specified delay */
unlock_cpu_hotplug();
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(delay);
+ schedule_timeout_interruptible(delay);
lock_cpu_hotplug();
cpu = next_cpu(cpu, cpu_online_map);
diff -urpN 2.6.13-rc5-mm1/arch/ppc64/kernel/rtc.c 2.6.13-rc5-mm1-dev/arch/ppc64/kernel/rtc.c
--- 2.6.13-rc5-mm1/arch/ppc64/kernel/rtc.c 2005-08-07 09:57:45.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/arch/ppc64/kernel/rtc.c 2005-08-08 13:55:03.000000000 -0700
@@ -351,8 +351,7 @@ void rtas_get_rtc_time(struct rtc_time *
return; /* delay not allowed */
}
wait_time = rtas_extended_busy_delay_time(error);
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(wait_time);
+ schedule_timeout_interruptible(wait_time);
error = RTAS_CLOCK_BUSY;
}
} while (error == RTAS_CLOCK_BUSY && (__get_tb() < max_wait_tb));
@@ -386,8 +385,7 @@ int rtas_set_rtc_time(struct rtc_time *t
if (in_interrupt())
return 1; /* probably decrementer */
wait_time = rtas_extended_busy_delay_time(error);
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(wait_time);
+ schedule_timeout_interruptible(wait_time);
error = RTAS_CLOCK_BUSY;
}
} while (error == RTAS_CLOCK_BUSY && (__get_tb() < max_wait_tb));
diff -urpN 2.6.13-rc5-mm1/arch/ppc64/kernel/scanlog.c 2.6.13-rc5-mm1-dev/arch/ppc64/kernel/scanlog.c
--- 2.6.13-rc5-mm1/arch/ppc64/kernel/scanlog.c 2005-08-07 09:57:22.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/arch/ppc64/kernel/scanlog.c 2005-08-08 13:55:13.000000000 -0700
@@ -123,8 +123,7 @@ static ssize_t scanlog_read(struct file
}
}
/* Apparently no data yet. Wait and try again. */
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(wait_time);
+ schedule_timeout_interruptible(wait_time);
}
/*NOTREACHED*/
}
More information about the Linuxppc64-dev
mailing list