aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorNishanth Aravamudan <nacc@us.ibm.com>2005-07-08 20:10:00 -0400
committerTony Luck <tony.luck@intel.com>2005-07-11 13:26:40 -0400
commit699139279d29e36e39d353b0536b510dab2e5ffa (patch)
tree228dbf79b2a79387c12f9b34622d70f84d88c72a /arch
parentd0feafbf14ebe860136b8ad84cce42b34defb323 (diff)
[IA64] use msleep_interruptible() instead of schedule_timeout
Description: Replace schedule_timeout() with msleep_interruptible() to guarantee the task delays as expected. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Acked-by: Dean Nelson <dcn@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/sn/kernel/xpc_main.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c
index 177ddb748ebe..d580adcad927 100644
--- a/arch/ia64/sn/kernel/xpc_main.c
+++ b/arch/ia64/sn/kernel/xpc_main.c
@@ -53,6 +53,7 @@
53#include <linux/cache.h> 53#include <linux/cache.h>
54#include <linux/interrupt.h> 54#include <linux/interrupt.h>
55#include <linux/slab.h> 55#include <linux/slab.h>
56#include <linux/delay.h>
56#include <asm/sn/intr.h> 57#include <asm/sn/intr.h>
57#include <asm/sn/sn_sal.h> 58#include <asm/sn/sn_sal.h>
58#include <asm/uaccess.h> 59#include <asm/uaccess.h>
@@ -308,8 +309,7 @@ xpc_make_first_contact(struct xpc_partition *part)
308 "partition %d\n", XPC_PARTID(part)); 309 "partition %d\n", XPC_PARTID(part));
309 310
310 /* wait a 1/4 of a second or so */ 311 /* wait a 1/4 of a second or so */
311 set_current_state(TASK_INTERRUPTIBLE); 312 msleep_interruptible(250);
312 (void) schedule_timeout(0.25 * HZ);
313 313
314 if (part->act_state == XPC_P_DEACTIVATING) { 314 if (part->act_state == XPC_P_DEACTIVATING) {
315 return part->reason; 315 return part->reason;
@@ -841,9 +841,7 @@ xpc_do_exit(void)
841 down(&xpc_discovery_exited); 841 down(&xpc_discovery_exited);
842 842
843 843
844 set_current_state(TASK_INTERRUPTIBLE); 844 msleep_interruptible(300);
845 schedule_timeout(0.3 * HZ);
846 set_current_state(TASK_RUNNING);
847 845
848 846
849 /* wait for all partitions to become inactive */ 847 /* wait for all partitions to become inactive */
@@ -860,12 +858,8 @@ xpc_do_exit(void)
860 } 858 }
861 } 859 }
862 860
863 if (active_part_count) { 861 if (active_part_count)
864 set_current_state(TASK_INTERRUPTIBLE); 862 msleep_interruptible(300);
865 schedule_timeout(0.3 * HZ);
866 set_current_state(TASK_RUNNING);
867 }
868
869 } while (active_part_count > 0); 863 } while (active_part_count > 0);
870 864
871 865