[PATCH 2/8] cpumask: Optimize cpumask_of_cpu in arch/x86/kernel/io_apic_64.c

From: Mike Travis
Date: Tue Jul 15 2008 - 17:14:47 EST


* Optimize various places where a pointer to the cpumask_of_cpu value
will result in reducing stack pressure.

Based on linux-2.6.tip/master at the following commit:

commit 0a91813e16ebd5c2d9b5c2acd5b7c91742112c4f
Merge: 9a635fa... 724dce0...
Author: Ingo Molnar <mingo@xxxxxxx>
Date: Tue Jul 15 14:55:17 2008 +0200


Signed-off-by: Mike Travis <travis@xxxxxxx>
Cc: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
---
arch/x86/kernel/io_apic_64.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

--- linux-2.6.tip.orig/arch/x86/kernel/io_apic_64.c
+++ linux-2.6.tip/arch/x86/kernel/io_apic_64.c
@@ -1372,12 +1372,10 @@ static unsigned int startup_ioapic_irq(u
static int ioapic_retrigger_irq(unsigned int irq)
{
struct irq_cfg *cfg = &irq_cfg[irq];
- cpumask_t mask;
unsigned long flags;

spin_lock_irqsave(&vector_lock, flags);
- mask = cpumask_of_cpu(first_cpu(cfg->domain));
- send_IPI_mask(mask, cfg->vector);
+ send_IPI_mask(cpumask_of_cpu(first_cpu(cfg->domain)), cfg->vector);
spin_unlock_irqrestore(&vector_lock, flags);

return 1;

--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/