1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
From 52c6ed89305008a778644d4cea292cae5944ea63 Mon Sep 17 00:00:00 2001
From: Wu Zhangjin <wuzhangjin@gmail.com>
Date: Wed, 10 Mar 2010 01:38:27 +0800
Subject: [PATCH] RT: MIPS: Convert the schedule to __schedule
commit c10f19d9f405a5325689ba12d372080d62b84170 in tip.
There is a new __schedule() defined in the Preempt-rt patch, which
should be called between local_irq_disble and local_irq_enable.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
arch/mips/kernel/entry.S | 5 +----
arch/mips/kernel/process.c | 6 ++++--
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S
index ffa3310..2b43b66 100644
--- a/arch/mips/kernel/entry.S
+++ b/arch/mips/kernel/entry.S
@@ -145,11 +145,8 @@ work_pending:
andi t0, a2, _TIF_NEED_RESCHED # a2 is preloaded with TI_FLAGS
beqz t0, work_notifysig
work_resched:
- jal schedule
+ jal __schedule
- local_irq_disable # make sure need_resched and
- # signals dont change between
- # sampling and return
LONG_L a2, TI_FLAGS($28)
andi t0, a2, _TIF_WORK_MASK # is there any work to be done
# other than syscall tracing?
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index 9996094..f733437 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -78,9 +78,11 @@ void __noreturn cpu_idle(void)
play_dead();
#endif
tick_nohz_restart_sched_tick();
- preempt_enable_no_resched();
- schedule();
+ local_irq_disable();
+ __preempt_enable_no_resched();
+ __schedule();
preempt_disable();
+ local_irq_enable();
}
}
--
1.7.0.4
|