public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Winchester <kjwinchester@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [GIT pull] genirq fixes for 2.6.31
Date: Wed, 22 Jul 2009 20:33:37 -0300	[thread overview]
Message-ID: <4A67A1D1.8040201@gmail.com> (raw)
In-Reply-To: <4A67A0A2.40503@gmail.com>

Kevin Winchester wrote:
> Thomas Gleixner wrote:
>> +/*
>>   * Interrupt handler thread
>>   */
>>  static int irq_thread(void *data)
>> @@ -458,6 +494,8 @@ static int irq_thread(void *data)
>>  
>>  	while (!irq_wait_for_interrupt(action)) {
>>  
>> +		irq_thread_check_affinity(desc, action);
>> +
>>  		atomic_inc(&desc->threads_active);
>>  
>>  		spin_lock_irq(&desc->lock);
> 
> Any chance we could do this in a way that doesn't break the build for CONFIG_SMP=n? :)
> 
> Should this call simply be wrapped in an #ifdef, or should the function be defined for !SMP?
> 

Actually, I guess the function is defined always, but it references desc->affinity unconditionally.

Perhaps something like the following (likely whitespace damaged) patch:

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index f0de36f..353e335 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -451,6 +451,8 @@ static int irq_wait_for_interrupt(struct irqaction *action)
        return -1;
 }
 
+#ifdef CONFIG_SMP
+
 /*
  * Check whether we need to change the affinity of the interrupt thread.
  */
@@ -479,6 +481,15 @@ irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action)
        free_cpumask_var(mask);
 }
 
+#else
+
+static void
+irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action)
+{
+}
+
+#endif
+
 /*
  * Interrupt handler thread
  */


  reply	other threads:[~2009-07-22 23:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-22 14:56 [GIT pull] genirq fixes for 2.6.31 Thomas Gleixner
2009-07-22 23:28 ` Kevin Winchester
2009-07-22 23:33   ` Kevin Winchester [this message]
2009-07-23  0:01 ` [PATCH] irq: Add compiling definition of irq_thread_check_affinity for !CONFIG_SMP Kevin Winchester
  -- strict thread matches above, loose matches on Subject: below --
2009-08-13 19:02 [GIT pull] genirq fixes for 2.6.31 Thomas Gleixner
2009-08-13 19:24 ` Linus Torvalds
2009-08-13 19:52   ` Thomas Gleixner
2009-08-13 19:59     ` Thomas Gleixner
2009-08-13 20:05     ` Linus Torvalds
2009-08-13 20:24       ` Thomas Gleixner

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=4A67A1D1.8040201@gmail.com \
    --to=kjwinchester@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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