public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Jeff Garzik <jeff@garzik.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Eric Biederman <ebiederm@xmission.com>
Subject: Re: [PATCH 2/9] irq-remove: arch non-trivial
Date: Fri, 19 Oct 2007 09:54:12 -0700	[thread overview]
Message-ID: <4718E134.70101@goop.org> (raw)
In-Reply-To: <20071019075543.GC6407@havoc.gtf.org>

Jeff Garzik wrote:
> commit 8d45690dd90b18daaa21b981ab20caf393220bf0
> Author: Jeff Garzik <jeff@garzik.org>
> Date:   Fri Oct 19 00:46:23 2007 -0400
>
>     [IRQ ARG REMOVAL] various non-trivial arch updates
>
>  arch/x86/kernel/vm86_32.c     |    3 ++-
>  include/asm-x86/irq_regs_32.h |   25 +++++++++++++++++++++++++
>  2 files changed, 27 insertions(+), 1 deletion(-)
>
> 8d45690dd90b18daaa21b981ab20caf393220bf0
> diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c
> index 157e4be..18aae9e 100644
> --- a/arch/x86/kernel/vm86_32.c
> +++ b/arch/x86/kernel/vm86_32.c
> @@ -739,10 +739,11 @@ static int irqbits;
>  	| (1 << SIGUSR1) | (1 << SIGUSR2) | (1 << SIGIO)  | (1 << SIGURG) \
>  	| (1 << SIGUNUSED) )
>  	
> -static irqreturn_t irq_handler(int intno, void *dev_id)
> +static irqreturn_t irq_handler(void *dev_id)
>  {
>  	int irq_bit;
>  	unsigned long flags;
> +	unsigned int intno = get_irqfunc_irq();
>  
>  	spin_lock_irqsave(&irqbits_lock, flags);	
>  	irq_bit = 1 << intno;
> diff --git a/include/asm-x86/irq_regs_32.h b/include/asm-x86/irq_regs_32.h
> index 3368b20..68a531d 100644
> --- a/include/asm-x86/irq_regs_32.h
> +++ b/include/asm-x86/irq_regs_32.h
> @@ -26,4 +26,29 @@ static inline struct pt_regs *set_irq_regs(struct pt_regs *new_regs)
>  	return old_regs;
>  }
>  
> +DECLARE_PER_CPU(unsigned int, __irqfunc_irqs);
> +
> +static inline unsigned int get_irqfunc_irq(void)
> +{
> +	return __get_cpu_var(__irqfunc_irqs);
> +}
> +
> +#if 0
> +static inline unsigned int set_irqfunc_irq(unsigned int new_irq)
> +{
> +	unsigned int old_irq, *pirq = &__get_cpu_var(__irqfunc_irqs);
> +
> +	old_irq = *pirq;
> +	*pirq = new_irq;
> +	return old_irq;
> +}
> +#else
> +static inline void set_irqfunc_irq(unsigned int new_irq)
> +{
> +	int *pirq = &__get_cpu_var(__irqfunc_irqs);
> +
> +	*pirq = new_irq;
>   

x86_write_percpu(__irqfunc_irqs, new_irq) would be slightly more
efficient here.  Any why the pointer anyway?

    J

  reply	other threads:[~2007-10-19 16:54 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-19  7:54 [PATCH 0/9] Remove 'irq' argument from all irq handlers Jeff Garzik
2007-10-19  7:55 ` [PATCH 1/9] irq-remove: core Jeff Garzik
2007-10-19 17:27   ` Eric W. Biederman
2007-10-19 17:48     ` Jeff Garzik
2007-10-19 18:04   ` Eric W. Biederman
2007-10-19 18:21     ` Jeff Garzik
2007-10-19 19:50       ` Eric W. Biederman
2007-10-19 19:58         ` Jeff Garzik
2007-10-19 23:13           ` Eric W. Biederman
2007-10-19 23:46             ` Jeff Garzik
2007-10-19 23:53             ` Jeff Garzik
2007-10-19  7:55 ` [PATCH 2/9] irq-remove: arch non-trivial Jeff Garzik
2007-10-19 16:54   ` Jeremy Fitzhardinge [this message]
2007-10-19 17:31     ` Jeff Garzik
2007-10-19 17:50     ` Jeff Garzik
2007-10-19 17:11   ` Eric W. Biederman
2007-10-19 17:16     ` Jeff Garzik
2007-10-19 19:38       ` Eric W. Biederman
2007-10-19  7:56 ` [PATCH 3/9] irq-remove: arch trivial Jeff Garzik
2007-10-19  7:56 ` [PATCH 4/9] irq-remove: driver non-trivial Jeff Garzik
2007-10-19 18:19   ` Eric W. Biederman
2007-10-19 18:36     ` Jeff Garzik
2007-10-19  7:57 ` [PATCH 5/9] irq-remove: net driver trivial Jeff Garzik
2007-10-19  7:57 ` [PATCH 6/9] irq-remove: sound " Jeff Garzik
2007-10-19  7:58 ` [PATCH 7/9] irq-remove: scsi " Jeff Garzik
2007-10-19 13:00   ` Salyzyn, Mark
2007-10-26 21:35     ` Andrew Morton
2007-10-26 21:47       ` Jeff Garzik
2007-10-26 23:50         ` Arjan van de Ven
2007-10-27  0:12           ` Jeff Garzik
2007-10-27  0:16             ` Arjan van de Ven
2007-10-27  0:37               ` Jeff Garzik
2007-10-27  5:31                 ` Arjan van de Ven
2007-10-27  7:06                   ` Jeff Garzik
2007-10-27  7:46                     ` Eric W. Biederman
2007-10-27 14:17                       ` Arjan van de Ven
2007-10-19  7:58 ` [PATCH 8/9] irq-remove: " Jeff Garzik
2007-10-19  7:59 ` [PATCH 9/9] irq-remove: misc fixes and cleanups Jeff Garzik
2007-10-19 14:53 ` [PATCH 0/9] Remove 'irq' argument from all irq handlers Thomas Gleixner
2007-10-19 18:38   ` Eric W. Biederman
2007-10-19 18:57     ` Jeff Garzik
2007-10-19 19:02       ` Jeff Garzik
2007-10-19 19:07     ` Ingo Molnar
2007-10-19 19:35       ` Eric W. Biederman
2007-10-19 19:41         ` Thomas Gleixner
2007-10-19 19:55           ` Jeff Garzik
2007-10-19 18:45 ` Mark Gross
2007-10-20  6:07 ` Greg KH

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=4718E134.70101@goop.org \
    --to=jeremy@goop.org \
    --cc=ebiederm@xmission.com \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@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