public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-arch@vger.kernel.org
Subject: Re: irq-type-flags.patch
Date: Wed, 9 Nov 2005 15:30:23 +0200	[thread overview]
Message-ID: <20051109133023.GD17992@linux-sh.org> (raw)
In-Reply-To: <20051108191057.09f57114.akpm@osdl.org>

[-- Attachment #1: Type: text/plain, Size: 2055 bytes --]

On Tue, Nov 08, 2005 at 07:10:57PM -0800, Andrew Morton wrote:
> Is everyone OK with this?
> 
Looks fine to me, especially if it gets that set_irq_type() stuff out of
some of the drivers.

> diff -puN arch/arm/kernel/irq.c~irq-type-flags arch/arm/kernel/irq.c
> --- devel/arch/arm/kernel/irq.c~irq-type-flags	2005-11-06 00:55:46.000000000 -0800
> +++ devel-akpm/arch/arm/kernel/irq.c	2005-11-06 00:55:46.000000000 -0800
> @@ -681,10 +681,16 @@ int setup_irq(unsigned int irq, struct i
>  	 */
>  	desc = irq_desc + irq;
>  	spin_lock_irqsave(&irq_controller_lock, flags);
> +#define SA_TRIGGER	(SA_TRIGGER_HIGH|SA_TRIGGER_LOW|\
> +			 SA_TRIGGER_RISING|SA_TRIGGER_FALLING)
>  	p = &desc->action;
>  	if ((old = *p) != NULL) {
> -		/* Can't share interrupts unless both agree to */
> -		if (!(old->flags & new->flags & SA_SHIRQ)) {
> +		/*
> +		 * Can't share interrupts unless both agree to and are
> +		 * the same type.
> +		 */
> +		if (!(old->flags & new->flags & SA_SHIRQ) ||
> +		    (~old->flags & new->flags) & SA_TRIGGER) {
>  			spin_unlock_irqrestore(&irq_controller_lock, flags);
>  			return -EBUSY;
>  		}
> diff -puN include/linux/signal.h~irq-type-flags include/linux/signal.h
> --- devel/include/linux/signal.h~irq-type-flags	2005-11-06 00:55:46.000000000 -0800
> +++ devel-akpm/include/linux/signal.h	2005-11-06 00:55:46.000000000 -0800
> @@ -18,6 +18,14 @@
>  #define SA_PROBE		SA_ONESHOT
>  #define SA_SAMPLE_RANDOM	SA_RESTART
>  #define SA_SHIRQ		0x04000000
> +/*
> + * As above, these correspond to the __IRQT defines in asm-arm/irq.h
> + * to select the interrupt line behaviour.
> + */
> +#define SA_TRIGGER_HIGH		0x00000008
> +#define SA_TRIGGER_LOW		0x00000004
> +#define SA_TRIGGER_RISING	0x00000002
> +#define SA_TRIGGER_FALLING	0x00000001
>  
>  /*
>   * Real Time signals may be queued.
> _
It probably makes sense to move SA_TRIGGER here as well, as it's going to
be a pretty common mask. Otherwise everyone that plans to make use of
this will likely end up duplicating it.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2005-11-09 13:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-09  3:10 irq-type-flags.patch Andrew Morton
2005-11-09  9:26 ` irq-type-flags.patch William Lee Irwin III
2005-11-09 13:20 ` irq-type-flags.patch David Howells
2005-11-09 13:24   ` irq-type-flags.patch Russell King
2005-11-09 15:13     ` irq-type-flags.patch David Howells
2005-11-09 15:27       ` irq-type-flags.patch Russell King
2005-11-09 16:07         ` irq-type-flags.patch David Howells
2005-11-09 13:30 ` Paul Mundt [this message]
2005-11-09 13:49   ` irq-type-flags.patch Matthew Wilcox
2005-11-09 14:40     ` irq-type-flags.patch Paul Mundt
2005-11-09 14:47     ` irq-type-flags.patch Russell King
2005-11-09 15:26       ` irq-type-flags.patch Matthew Wilcox
2005-11-09 15:28         ` irq-type-flags.patch Russell King
2005-11-10 14:06 ` irq-type-flags.patch Andi Kleen

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=20051109133023.GD17992@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=akpm@osdl.org \
    --cc=linux-arch@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox