From: Ingo Molnar <mingo@elte.hu>
To: linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Russell King <rmk@arm.linux.org.uk>,
Andrew Morton <akpm@osdl.org>,
Christoph Hellwig <hch@infradead.org>,
linux-arm-kernel@lists.arm.linux.org.uk
Subject: [patch 08/50] genirq: cleanup: merge pending_irq_cpumask[] into irq_desc[]
Date: Wed, 17 May 2006 02:15:45 +0200 [thread overview]
Message-ID: <20060517001545.GI12877@elte.hu> (raw)
From: Ingo Molnar <mingo@elte.hu>
consolidation: remove the pending_irq_cpumask[NR_IRQS] array and move it
into the irq_desc[NR_IRQS].pending_mask field.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/i386/kernel/io_apic.c | 2 +-
include/linux/irq.h | 2 +-
kernel/irq/manage.c | 4 ----
kernel/irq/migration.c | 8 ++++----
4 files changed, 6 insertions(+), 10 deletions(-)
Index: linux-genirq.q/arch/i386/kernel/io_apic.c
===================================================================
--- linux-genirq.q.orig/arch/i386/kernel/io_apic.c
+++ linux-genirq.q/arch/i386/kernel/io_apic.c
@@ -570,7 +570,7 @@ static int balanced_irq(void *unused)
/* push everything to CPU 0 to give us a starting point. */
for (i = 0 ; i < NR_IRQS ; i++) {
- pending_irq_cpumask[i] = cpumask_of_cpu(0);
+ irq_desc[i].pending_mask = cpumask_of_cpu(0);
set_pending_irq(i, cpumask_of_cpu(0));
}
Index: linux-genirq.q/include/linux/irq.h
===================================================================
--- linux-genirq.q.orig/include/linux/irq.h
+++ linux-genirq.q/include/linux/irq.h
@@ -83,6 +83,7 @@ struct irq_desc {
cpumask_t affinity;
#endif
#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE)
+ cpumask_t pending_mask;
unsigned int move_irq; /* need to re-target IRQ dest */
#endif
#ifdef CONFIG_PROC_FS
@@ -123,7 +124,6 @@ static inline void set_native_irq_info(i
#ifdef CONFIG_SMP
#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE)
-extern cpumask_t pending_irq_cpumask[NR_IRQS];
void set_pending_irq(unsigned int irq, cpumask_t mask);
void move_native_irq(int irq);
Index: linux-genirq.q/kernel/irq/manage.c
===================================================================
--- linux-genirq.q.orig/kernel/irq/manage.c
+++ linux-genirq.q/kernel/irq/manage.c
@@ -16,10 +16,6 @@
#ifdef CONFIG_SMP
-#if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE)
-cpumask_t __cacheline_aligned pending_irq_cpumask[NR_IRQS];
-#endif
-
/**
* synchronize_irq - wait for pending IRQ handlers (on other CPUs)
* @irq: interrupt number to wait for
Index: linux-genirq.q/kernel/irq/migration.c
===================================================================
--- linux-genirq.q.orig/kernel/irq/migration.c
+++ linux-genirq.q/kernel/irq/migration.c
@@ -8,7 +8,7 @@ void set_pending_irq(unsigned int irq, c
spin_lock_irqsave(&desc->lock, flags);
desc->move_irq = 1;
- pending_irq_cpumask[irq] = mask;
+ irq_desc[irq].pending_mask = mask;
spin_unlock_irqrestore(&desc->lock, flags);
}
@@ -30,7 +30,7 @@ void move_native_irq(int irq)
desc->move_irq = 0;
- if (likely(cpus_empty(pending_irq_cpumask[irq])))
+ if (likely(cpus_empty(irq_desc[irq].pending_mask)))
return;
if (!desc->handler->set_affinity)
@@ -38,7 +38,7 @@ void move_native_irq(int irq)
assert_spin_locked(&desc->lock);
- cpus_and(tmp, pending_irq_cpumask[irq], cpu_online_map);
+ cpus_and(tmp, irq_desc[irq].pending_mask, cpu_online_map);
/*
* If there was a valid mask to work with, please
@@ -58,5 +58,5 @@ void move_native_irq(int irq)
if (likely(!(desc->status & IRQ_DISABLED)))
desc->handler->enable(irq);
}
- cpus_clear(pending_irq_cpumask[irq]);
+ cpus_clear(irq_desc[irq].pending_mask);
}
reply other threads:[~2006-05-17 0:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20060517001545.GI12877@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@osdl.org \
--cc=benh@kernel.crashing.org \
--cc=hch@infradead.org \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®