From: Philippe Gerum <rpm@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: adeos-main <adeos-main@gna.org>
Subject: Re: [Adeos-main] irq masking in ipipe_restore_pipeline_head
Date: Fri, 18 Jun 2010 15:43:18 +0200 [thread overview]
Message-ID: <1276868598.12743.26.camel@domain.hid> (raw)
In-Reply-To: <4C1B57D4.6090700@domain.hid>
On Fri, 2010-06-18 at 13:26 +0200, Jan Kiszka wrote:
> Hi Philippe,
>
> don't we need this in ipipe_restore_pipeline_head to play safe
I can't see what this is supposed to fix. Any hint?
> (includes
> some UP optimization as well):
>
> diff --git a/include/linux/ipipe.h b/include/linux/ipipe.h
> index c458883..bf1f94d 100644
> --- a/include/linux/ipipe.h
> +++ b/include/linux/ipipe.h
> @@ -518,9 +518,13 @@ void __ipipe_restore_pipeline_head(unsigned long x);
>
> static inline void ipipe_restore_pipeline_head(unsigned long x)
> {
> - local_irq_disable_hw();
> + unsigned long flags;
> +
> + local_irq_save_hw_smp(flags);
> if ((x ^ test_bit(IPIPE_STALL_FLAG, &ipipe_head_cpudom_var(status))) & 1)
> __ipipe_restore_pipeline_head(x);
> + else
> + local_irq_restore_hw_smp(flags);
> }
>
> #define ipipe_unstall_pipeline() \
> diff --git a/kernel/ipipe/core.c b/kernel/ipipe/core.c
> index e2503bd..60a6433 100644
> --- a/kernel/ipipe/core.c
> +++ b/kernel/ipipe/core.c
> @@ -422,6 +422,9 @@ void __ipipe_restore_pipeline_head(unsigned long x) /* hw interrupt off */
> struct ipipe_percpu_domain_data *p = ipipe_head_cpudom_ptr();
> struct ipipe_domain *head_domain;
>
> +#ifndef CONFIG_SMP
> + local_irq_disable_hw();
> +#endif
> if (x) {
> #ifdef CONFIG_DEBUG_KERNEL
> static int warned;
>
>
> Untested, just thoughts ATM.
>
> Jan
>
--
Philippe.
next prev parent reply other threads:[~2010-06-18 13:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-18 11:26 [Adeos-main] irq masking in ipipe_restore_pipeline_head Jan Kiszka
2010-06-18 13:43 ` Philippe Gerum [this message]
2010-06-18 13:46 ` Jan Kiszka
2010-06-18 14:37 ` Philippe Gerum
2010-06-18 14:54 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1276868598.12743.26.camel@domain.hid \
--to=rpm@xenomai.org \
--cc=adeos-main@gna.org \
--cc=jan.kiszka@domain.hid \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.