[PATCH 08/12] X86: Move alloc_intr_gate out of line
Andi Kleen
andi at firstfloor.org
Thu Oct 13 16:08:48 PDT 2011
From: Andi Kleen <ak at linux.intel.com>
This saves about 2.5k text on a non force inline kernel.
Cc: x86 at kernel.org
Signed-off-by: Andi Kleen <ak at linux.intel.com>
---
arch/x86/include/asm/desc.h | 17 +----------------
arch/x86/kernel/irqinit.c | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+), 16 deletions(-)
diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h
index 41935fa..f7183e1 100644
--- a/arch/x86/include/asm/desc.h
+++ b/arch/x86/include/asm/desc.h
@@ -336,22 +336,7 @@ extern int first_system_vector;
/* used_vectors is BITMAP for irq is not managed by percpu vector_irq */
extern unsigned long used_vectors[];
-static inline void alloc_system_vector(int vector)
-{
- if (!test_bit(vector, used_vectors)) {
- set_bit(vector, used_vectors);
- if (first_system_vector > vector)
- first_system_vector = vector;
- } else {
- BUG();
- }
-}
-
-static inline void alloc_intr_gate(unsigned int n, void *addr)
-{
- alloc_system_vector(n);
- set_intr_gate(n, addr);
-}
+void alloc_intr_gate(unsigned int n, void *addr);
/*
* This routine sets up an interrupt gate at directory privilege level 3.
diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c
index b3300e6..b6e769b 100644
--- a/arch/x86/kernel/irqinit.c
+++ b/arch/x86/kernel/irqinit.c
@@ -162,6 +162,26 @@ void setup_vector_irq(int cpu)
__setup_vector_irq(cpu);
}
+static void alloc_system_vector(int vector)
+{
+ if (!test_bit(vector, used_vectors)) {
+ set_bit(vector, used_vectors);
+ if (first_system_vector > vector)
+ first_system_vector = vector;
+ } else
+ BUG();
+}
+
+/*
+ * This could be made __init if xen didn't abuse it in its
+ * suspend path!
+ */
+void alloc_intr_gate(unsigned int n, void *addr)
+{
+ alloc_system_vector(n);
+ set_intr_gate(n, addr);
+}
+
static void __init smp_intr_init(void)
{
#ifdef CONFIG_SMP
--
1.7.4.4
More information about the dri-devel
mailing list