Message-ID: <50F7090F.2040504@siemens.com> Date: Wed, 16 Jan 2013 21:09:51 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <50F6FCDB.1020109@siemens.com> <50F70535.9000508@xenomai.org> In-Reply-To: <50F70535.9000508@xenomai.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] [PATCH] ipipe: Re-fix migration helper for legacy users List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix Cc: Xenomai On 2013-01-16 20:53, Gilles Chanteperdrix wrote: > On 01/16/2013 08:17 PM, Jan Kiszka wrote: > >> In the legacy use case, __ipipe_switch_tail will be invoked over the >> non-root domain after hardening. So clearing of TASK_HARDENING must not >> be restricted to root. >> >> Signed-off-by: Jan Kiszka >> --- >> >> For the case my analysis was right. With this, Xenomai 2.6 works again >> here. >> >> kernel/ipipe/core.c | 2 ++ >> 1 files changed, 2 insertions(+), 0 deletions(-) >> >> diff --git a/kernel/ipipe/core.c b/kernel/ipipe/core.c >> index 6929156..4695ba8 100644 >> --- a/kernel/ipipe/core.c >> +++ b/kernel/ipipe/core.c >> @@ -1124,7 +1124,9 @@ int __ipipe_switch_tail(void) >> hard_local_irq_disable(); >> #endif >> x = __ipipe_root_p; >> +#ifndef CONFIG_IPIPE_LEGACY >> if (x) >> +#endif >> complete_domain_migration(); >> >> #ifndef CONFIG_IPIPE_WANT_PREEMPTIBLE_SWITCH > > > Mmm, from the old patch it seems complete_domain_migration should not be > called for legacy, so, what we would like instead is: > > #ifdef CONFIG_IPIPE_LEGACY > current->state &= ~TASK_HARDENING; > #else > if (x) > complete_domain_migration(); > #endif > That's equivalent after the new patch (there are two versions of complete_domain_migration now). Jan -- Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux