From: Ashok Raj <ashok.raj@intel.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, ak@muc.de, zwane@arm.linux.org.uk,
bunk@stusta.de
Subject: Handling delayed write to /proc/irq fix4_rc3_mm2
Date: Mon, 2 May 2005 23:41:41 -0700 [thread overview]
Message-ID: <20050502234141.A10952@unix-os.sc.intel.com> (raw)
In-Reply-To: <20050502181020.5d4f18ee.akpm@osdl.org>; from akpm@osdl.org on Mon, May 02, 2005 at 06:10:20PM -0700
Hi Andrew
the following fixes are for the errors in the earlier patch pointed out by
Adraian and Zwane.
- Fixed header file when CONFIG_GENERIC_PENDING_IRQ is not defined.
- Extended cleanup to current code by Zwane for set_ioapic_affinit_irq
done in i386 to x86_64 as well.
This applies on top of current rc3-mm2 patch list.
--
Signed-off-by: Ashok Raj <ashok.raj@intel.com>
- Extend zwane's fixes for set_ioapic_affinity to x86_64 as well.
- Put correct fix requested by Adrian, for include/linux/irq.h when
CONFIG_GENERIC_PENDING_IRQ is not defined.
---
linux-2.6.12-rc3-mm2-root/arch/x86_64/kernel/io_apic.c | 15 +++++----
linux-2.6.12-rc3-mm2-root/include/linux/irq.h | 27 ++++++++++++++---
linux-2.6.12-rc3-mm2-root/kernel/irq/manage.c | 6 ---
3 files changed, 33 insertions(+), 15 deletions(-)
diff -puN arch/x86_64/kernel/io_apic.c~fix_rc3_mm2_deferred_irq_write arch/x86_64/kernel/io_apic.c
--- linux-2.6.12-rc3-mm2/arch/x86_64/kernel/io_apic.c~fix_rc3_mm2_deferred_irq_write 2005-05-02 21:55:36.000000000 -0700
+++ linux-2.6.12-rc3-mm2-root/arch/x86_64/kernel/io_apic.c 2005-05-02 21:58:53.000000000 -0700
@@ -121,11 +121,6 @@ static void set_ioapic_affinity_irq(unsi
set_irq_info(irq, mask);
spin_unlock_irqrestore(&ioapic_lock, flags);
}
-#else
-static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t mask)
-{
- return;
-}
#endif
/*
@@ -1425,6 +1420,7 @@ static void unmask_IO_APIC_vector (unsig
unmask_IO_APIC_irq(irq);
}
+#ifdef CONFIG_SMP
static void set_ioapic_affinity_vector (unsigned int vector,
cpumask_t cpu_mask)
{
@@ -1433,7 +1429,8 @@ static void set_ioapic_affinity_vector (
set_native_irq_info(vector, cpu_mask);
set_ioapic_affinity_irq(irq, cpu_mask);
}
-#endif
+#endif // CONFIG_SMP
+#endif // CONFIG_PCI_MSI
/*
* Level and edge triggered IO-APIC interrupts need different handling,
@@ -1452,7 +1449,9 @@ static struct hw_interrupt_type ioapic_e
.disable = disable_edge_ioapic,
.ack = ack_edge_ioapic,
.end = end_edge_ioapic,
+#ifdef CONFIG_SMP
.set_affinity = set_ioapic_affinity,
+#endif
};
static struct hw_interrupt_type ioapic_level_type = {
@@ -1463,7 +1462,9 @@ static struct hw_interrupt_type ioapic_l
.disable = disable_level_ioapic,
.ack = mask_and_ack_level_ioapic,
.end = end_level_ioapic,
+#ifdef CONFIG_SMP
.set_affinity = set_ioapic_affinity,
+#endif
};
static inline void init_IO_APIC_traps(void)
@@ -2015,6 +2016,7 @@ int io_apic_set_pci_routing (int ioapic,
* we need to reprogram the ioredtbls to cater for the cpus which have come online
* so mask in all cases should simply be TARGET_CPUS
*/
+#ifdef CONFIG_SMP
void __init setup_ioapic_dest(void)
{
int pin, ioapic, irq, irq_entry;
@@ -2033,3 +2035,4 @@ void __init setup_ioapic_dest(void)
}
}
+#endif
diff -puN include/linux/irq.h~fix_rc3_mm2_deferred_irq_write include/linux/irq.h
--- linux-2.6.12-rc3-mm2/include/linux/irq.h~fix_rc3_mm2_deferred_irq_write 2005-05-02 22:02:18.000000000 -0700
+++ linux-2.6.12-rc3-mm2-root/include/linux/irq.h 2005-05-02 22:12:18.000000000 -0700
@@ -97,9 +97,13 @@ static inline void set_native_irq_info(i
}
#endif
-#ifdef CONFIG_GENERIC_PENDING_IRQ
+#ifdef CONFIG_SMP
+
+#if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE)
extern cpumask_t pending_irq_cpumask[NR_IRQS];
+#endif
+#ifdef CONFIG_GENERIC_PENDING_IRQ
static inline void
move_native_irq(int irq)
{
@@ -147,7 +151,9 @@ static inline void move_irq(int irq)
static inline void set_irq_info(int irq, cpumask_t mask)
{
}
-#else
+
+#else // CONFIG_PCI_MSI
+
static inline void move_irq(int irq)
{
move_native_irq(irq);
@@ -158,12 +164,25 @@ static inline void set_irq_info(int irq,
set_native_irq_info(irq, mask);
}
#endif // CONFIG_PCI_MSI
-#else
+
+#else // CONFIG_GENERIC_PENDING_IRQ
+
#define move_irq(x)
#define move_native_irq(x)
-extern void set_irq_info(unsigned int irq, cpumask_t mask);
+static inline void set_irq_info(int irq, cpumask_t mask)
+{
+ set_native_irq_info(irq, mask);
+}
+
#endif // CONFIG_GENERIC_PENDING_IRQ
+#else // CONFIG_SMP
+
+#define move_irq(x)
+#define move_native_irq(x)
+
+#endif // CONFIG_SMP
+
extern int no_irq_affinity;
extern int noirqdebug_setup(char *str);
diff -puN kernel/irq/manage.c~fix_rc3_mm2_deferred_irq_write kernel/irq/manage.c
--- linux-2.6.12-rc3-mm2/kernel/irq/manage.c~fix_rc3_mm2_deferred_irq_write 2005-05-02 22:17:19.000000000 -0700
+++ linux-2.6.12-rc3-mm2-root/kernel/irq/manage.c 2005-05-02 22:18:19.000000000 -0700
@@ -17,7 +17,7 @@
cpumask_t irq_affinity[NR_IRQS] = { [0 ... NR_IRQS-1] = CPU_MASK_ALL };
-#ifdef CONFIG_GENERIC_PENDING_IRQ
+#if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE)
cpumask_t __cacheline_aligned pending_irq_cpumask[NR_IRQS];
#endif
@@ -40,10 +40,6 @@ void synchronize_irq(unsigned int irq)
EXPORT_SYMBOL(synchronize_irq);
-#else
-void set_irq_info(unsigned int irq, cpumask_t mask)
-{
-}
#endif
/**
_
parent reply other threads:[~2005-05-03 6:43 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20050502181020.5d4f18ee.akpm@osdl.org>]
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=20050502234141.A10952@unix-os.sc.intel.com \
--to=ashok.raj@intel.com \
--cc=ak@muc.de \
--cc=akpm@osdl.org \
--cc=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.org \
--cc=zwane@arm.linux.org.uk \
/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®