All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] irq: move irq_desc according to smp_affinity v5
Date: Mon, 8 Dec 2008 14:42:19 +0100	[thread overview]
Message-ID: <20081208134219.GC29965@elte.hu> (raw)
In-Reply-To: <1228532430-28958-1-git-send-email-yinghai@kernel.org>


* Yinghai Lu <yinghai@kernel.org> wrote:

> +#ifdef CONFIG_MOVE_IRQ_DESC
> +	/* get new one */
> +	desc = irq_to_desc(irq);
> +#endif
>  
>  	spin_unlock(&desc->lock);
>  }
> @@ -467,12 +475,20 @@ handle_edge_irq(unsigned int irq, struct
>  		    !desc->action)) {
>  		desc->status |= (IRQ_PENDING | IRQ_MASKED);
>  		mask_ack_irq(desc, irq);
> +#ifdef CONFIG_MOVE_IRQ_DESC
> +		/* get new one */
> +		desc = irq_to_desc(irq);
> +#endif
>  		goto out_unlock;
>  	}
>  	kstat_incr_irqs_this_cpu(irq, desc);
>  
>  	/* Start handling the irq */
>  	desc->chip->ack(irq);
> +#ifdef CONFIG_MOVE_IRQ_DESC
> +	/* get new one */
> +	desc = irq_to_desc(irq);
> +#endif
>  
>  	/* Mark the IRQ currently in progress.*/
>  	desc->status |= IRQ_INPROGRESS;
> @@ -533,8 +549,13 @@ handle_percpu_irq(unsigned int irq, stru
>  	if (!noirqdebug)
>  		note_interrupt(irq, desc, action_ret);
>  
> -	if (desc->chip->eoi)
> +	if (desc->chip->eoi) {
>  		desc->chip->eoi(irq);
> +#ifdef CONFIG_MOVE_IRQ_DESC
> +		/* get new one */
> +		desc = irq_to_desc(irq);
> +#endif
> +	}
>  }
>  
>  void
> @@ -569,8 +590,13 @@ __set_irq_handler(unsigned int irq, irq_
>  
>  	/* Uninstall? */
>  	if (handle == handle_bad_irq) {
> -		if (desc->chip != &no_irq_chip)
> +		if (desc->chip != &no_irq_chip) {
>  			mask_ack_irq(desc, irq);
> +#ifdef CONFIG_MOVE_IRQ_DESC
> +			/* get new one */
> +			desc = irq_to_desc(irq);
> +#endif

this patch adds a ton of #ifdefs to important .c files, which could all 
have been avoided by introducing a new method:

	desc = irq_remap_to_desc(irq, desc);

which would do something like:

 static struct irq_desc *
 irq_remap_to_desc(unsigned int irq, struct irq_desc *desc)
 {
 #ifdef CONFIG_MOVE_IRQ_DESC
	return irq_to_desc(irq);
 #else
	return desc;
 #endif
 }

right?

	Ingo

  reply	other threads:[~2008-12-08 13:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-06  3:00 [PATCH 5/5] irq: move irq_desc according to smp_affinity v5 Yinghai Lu
2008-12-08 13:42 ` Ingo Molnar [this message]
2008-12-08 19:18   ` Yinghai Lu
2008-12-08 22:07   ` [PATCH] irq: move irq_desc according to smp_affinity v6 Yinghai Lu
2008-12-09  3:41     ` Ingo Molnar
2008-12-11  8:15       ` [PATCH] irq: move irq_desc according to smp_affinity v7 Yinghai Lu

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=20081208134219.GC29965@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=yinghai@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 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.