This fixes the valid complaint about safe_halt being called with the
root domain unstalled.

Signed-off-by: Jan Kiszka <[email protected]>
---
 kernel/ipipe/core.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

Applies to 2.6.31, but is relevant for older kernels as well.

diff --git a/kernel/ipipe/core.c b/kernel/ipipe/core.c
index ffaceaa..cd946f3 100644
--- a/kernel/ipipe/core.c
+++ b/kernel/ipipe/core.c
@@ -615,12 +615,13 @@ void ipipe_suspend_domain(void)
        struct ipipe_domain *this_domain, *next_domain;
        struct ipipe_percpu_domain_data *p;
        struct list_head *ln;
-       unsigned long flags;
+       unsigned long flags, saved_status;

        local_irq_save_hw(flags);

        this_domain = next_domain = __ipipe_current_domain;
        p = ipipe_cpudom_ptr(this_domain);
+       saved_status = p->status & ~IPIPE_SYNC_MASK;
        p->status &= ~(IPIPE_STALL_MASK|IPIPE_SYNC_MASK);

        if (p->irqpend_himask != 0)
@@ -654,6 +655,8 @@ sync_stage:
        }

        __ipipe_current_domain = this_domain;
+       p = ipipe_cpudom_ptr(this_domain);
+       p->status = saved_status;

        local_irq_restore_hw(flags);
 }
-- 
1.6.0.2

_______________________________________________
Adeos-main mailing list
[email protected]
https://mail.gna.org/listinfo/adeos-main

Reply via email to