diff options
Diffstat (limited to 'litmus')
-rw-r--r-- | litmus/sched_mc2.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/litmus/sched_mc2.c b/litmus/sched_mc2.c index f8ad5c615e5d..864e1b03d924 100644 --- a/litmus/sched_mc2.c +++ b/litmus/sched_mc2.c | |||
@@ -148,7 +148,7 @@ asmlinkage long sys_enact_mode(void) | |||
148 | } | 148 | } |
149 | mode_changed = false; | 149 | mode_changed = false; |
150 | if (pending){ //MCR has entered | 150 | if (pending){ //MCR has entered |
151 | raw_spin_lock_irqsave(&state->lock,flags); | 151 | raw_spin_lock_irqsave(&state->lock, flags); |
152 | //TRACE_CUR("LOCK_MSG: GLOBAL LOCK\n"); | 152 | //TRACE_CUR("LOCK_MSG: GLOBAL LOCK\n"); |
153 | raw_spin_lock(&global_lock); | 153 | raw_spin_lock(&global_lock); |
154 | raw_spin_lock(&mode_lock); | 154 | raw_spin_lock(&mode_lock); |
@@ -602,6 +602,7 @@ static void mc2_update_timer_and_unlock(struct mc2_cpu_state *state) | |||
602 | //enum crit_level lv = get_task_crit_level(state->scheduled); | 602 | //enum crit_level lv = get_task_crit_level(state->scheduled); |
603 | struct next_timer_event *event, *next; | 603 | struct next_timer_event *event, *next; |
604 | int reschedule[NR_CPUS]; | 604 | int reschedule[NR_CPUS]; |
605 | unsigned long flags; | ||
605 | 606 | ||
606 | for (cpus = 0; cpus<NR_CPUS; cpus++) | 607 | for (cpus = 0; cpus<NR_CPUS; cpus++) |
607 | reschedule[cpus] = 0; | 608 | reschedule[cpus] = 0; |
@@ -616,6 +617,7 @@ static void mc2_update_timer_and_unlock(struct mc2_cpu_state *state) | |||
616 | local = local_cpu_state() == state; | 617 | local = local_cpu_state() == state; |
617 | 618 | ||
618 | //TRACE_CUR("LOCK_MSG: GLOBAL LOCK\n"); | 619 | //TRACE_CUR("LOCK_MSG: GLOBAL LOCK\n"); |
620 | local_irq_save(flags); | ||
619 | raw_spin_lock(&global_lock); | 621 | raw_spin_lock(&global_lock); |
620 | 622 | ||
621 | list_for_each_entry_safe(event, next, &_global_env->next_events, list) { | 623 | list_for_each_entry_safe(event, next, &_global_env->next_events, list) { |
@@ -654,6 +656,7 @@ static void mc2_update_timer_and_unlock(struct mc2_cpu_state *state) | |||
654 | * may raise a softirq, which in turn may wake ksoftirqd. */ | 656 | * may raise a softirq, which in turn may wake ksoftirqd. */ |
655 | //TRACE_CUR("LOCK_MSG: GLOBAL UNLOCK\n"); | 657 | //TRACE_CUR("LOCK_MSG: GLOBAL UNLOCK\n"); |
656 | raw_spin_unlock(&global_lock); | 658 | raw_spin_unlock(&global_lock); |
659 | local_irq_restore(flags); | ||
657 | raw_spin_unlock(&state->lock); | 660 | raw_spin_unlock(&state->lock); |
658 | 661 | ||
659 | if ((update <= now) || reschedule[state->cpu]) { | 662 | if ((update <= now) || reschedule[state->cpu]) { |