All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] x86: move ioapic_irq_destination_types to apicdef.h
@ 2011-02-22 14:38 Henrik Kretzschmar
  2011-02-22 14:38 ` [PATCH 2/5] x86: add dummy mp_save_irq() Henrik Kretzschmar
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Henrik Kretzschmar @ 2011-02-22 14:38 UTC (permalink / raw)
  To: mingo; +Cc: tglx, hpa, x86, linux-kernel, Henrik Kretzschmar

This enum is used by non IOAPIC code, so apicdef.h is
the best place for it.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
---
 arch/x86/include/asm/apicdef.h |   12 ++++++++++++
 arch/x86/include/asm/io_apic.h |   11 -----------
 2 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/arch/x86/include/asm/apicdef.h b/arch/x86/include/asm/apicdef.h
index 47a30ff..d87988b 100644
--- a/arch/x86/include/asm/apicdef.h
+++ b/arch/x86/include/asm/apicdef.h
@@ -426,4 +426,16 @@ struct local_apic {
 #else
  #define BAD_APICID 0xFFFFu
 #endif
+
+enum ioapic_irq_destination_types {
+	dest_Fixed		= 0,
+	dest_LowestPrio		= 1,
+	dest_SMI		= 2,
+	dest__reserved_1	= 3,
+	dest_NMI		= 4,
+	dest_INIT		= 5,
+	dest__reserved_2	= 6,
+	dest_ExtINT		= 7
+};
+
 #endif /* _ASM_X86_APICDEF_H */
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
index f327d38..e1a9b0e 100644
--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -63,17 +63,6 @@ union IO_APIC_reg_03 {
 	} __attribute__ ((packed)) bits;
 };
 
-enum ioapic_irq_destination_types {
-	dest_Fixed = 0,
-	dest_LowestPrio = 1,
-	dest_SMI = 2,
-	dest__reserved_1 = 3,
-	dest_NMI = 4,
-	dest_INIT = 5,
-	dest__reserved_2 = 6,
-	dest_ExtINT = 7
-};
-
 struct IO_APIC_route_entry {
 	__u32	vector		:  8,
 		delivery_mode	:  3,	/* 000: FIXED
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/5] x86: add dummy mp_save_irq()
  2011-02-22 14:38 [PATCH 1/5] x86: move ioapic_irq_destination_types to apicdef.h Henrik Kretzschmar
@ 2011-02-22 14:38 ` Henrik Kretzschmar
  2011-02-23 12:07   ` [tip:x86/apic] x86: Add " tip-bot for Henrik Kretzschmar
  2011-02-22 14:38 ` [PATCH 3/5] x86: rework arch_disable_smp_support() for x86 Henrik Kretzschmar
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Henrik Kretzschmar @ 2011-02-22 14:38 UTC (permalink / raw)
  To: mingo; +Cc: tglx, hpa, x86, linux-kernel, Henrik Kretzschmar

This is a dummy function, used when no IOAPIC is compiled in.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
---
 arch/x86/include/asm/io_apic.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
index e1a9b0e..b24915f 100644
--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -188,6 +188,7 @@ static inline int mp_find_ioapic(u32 gsi) { return 0; }
 struct io_apic_irq_attr;
 static inline int io_apic_set_pci_routing(struct device *dev, int irq,
 		 struct io_apic_irq_attr *irq_attr) { return 0; }
+static inline void mp_save_irq(struct mpc_intsrc *m) { };
 #endif
 
 #endif /* _ASM_X86_IO_APIC_H */
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/5] x86: rework arch_disable_smp_support() for x86
  2011-02-22 14:38 [PATCH 1/5] x86: move ioapic_irq_destination_types to apicdef.h Henrik Kretzschmar
  2011-02-22 14:38 ` [PATCH 2/5] x86: add dummy mp_save_irq() Henrik Kretzschmar
@ 2011-02-22 14:38 ` Henrik Kretzschmar
  2011-02-23 12:08   ` [tip:x86/apic] x86: Rework " tip-bot for Henrik Kretzschmar
  2011-02-22 14:38 ` [PATCH 4/5] x86: add dummy functions for compiling without IOAPIC Henrik Kretzschmar
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Henrik Kretzschmar @ 2011-02-22 14:38 UTC (permalink / raw)
  To: mingo; +Cc: tglx, hpa, x86, linux-kernel, Henrik Kretzschmar

Currently arch_disable_smp_support() on x86 disables only the support
for the IOAPIC and is also compiled in if SMP-support is not.

Therefore this function is renamed to disable_ioapic_support(),
which meets its purpose and is only compiled in the kernel
when IOAPIC support is also.

A new arch_disable_smp_support() is created in smpboot.c,
which calls disable_ioapic_support() and gets only compiled
in the kernel when SMP support is also.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
---
 arch/x86/include/asm/io_apic.h |    3 +++
 arch/x86/kernel/apic/apic.c    |    3 ++-
 arch/x86/kernel/apic/io_apic.c |    7 +++++--
 arch/x86/kernel/smpboot.c      |   11 ++++++++++-
 4 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
index b24915f..0be2f27 100644
--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -175,6 +175,8 @@ extern void __init pre_init_apic_IRQ0(void);
 
 extern void mp_save_irq(struct mpc_intsrc *m);
 
+extern void disable_ioapic_support(void);
+
 #else  /* !CONFIG_X86_IO_APIC */
 
 #define io_apic_assign_pci_irqs 0
@@ -189,6 +191,7 @@ struct io_apic_irq_attr;
 static inline int io_apic_set_pci_routing(struct device *dev, int irq,
 		 struct io_apic_irq_attr *irq_attr) { return 0; }
 static inline void mp_save_irq(struct mpc_intsrc *m) { };
+static inline void disable_ioapic_support(void) { }
 #endif
 
 #endif /* _ASM_X86_IO_APIC_H */
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 1e17929..6fd5c33 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -43,6 +43,7 @@
 #include <asm/i8259.h>
 #include <asm/proto.h>
 #include <asm/apic.h>
+#include <asm/io_apic.h>
 #include <asm/desc.h>
 #include <asm/hpet.h>
 #include <asm/idle.h>
@@ -1218,7 +1219,7 @@ void __cpuinit setup_local_APIC(void)
 		rdtscll(tsc);
 
 	if (disable_apic) {
-		arch_disable_smp_support();
+		disable_ioapic_support();
 		return;
 	}
 
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index ca9e2a3..a2f2bf8 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -108,7 +108,10 @@ DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
 
 int skip_ioapic_setup;
 
-void arch_disable_smp_support(void)
+/**
+ * disable_ioapic_support() - disables ioapic support at runtime
+ */
+void disable_ioapic_support(void)
 {
 #ifdef CONFIG_PCI
 	noioapicquirk = 1;
@@ -120,7 +123,7 @@ void arch_disable_smp_support(void)
 static int __init parse_noapic(char *str)
 {
 	/* disable IO-APIC */
-	arch_disable_smp_support();
+	disable_ioapic_support();
 	return 0;
 }
 early_param("noapic", parse_noapic);
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 91de347..e9efdfd 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -64,6 +64,7 @@
 #include <asm/mtrr.h>
 #include <asm/mwait.h>
 #include <asm/apic.h>
+#include <asm/io_apic.h>
 #include <asm/setup.h>
 #include <asm/uv/uv.h>
 #include <linux/mc146818rtc.h>
@@ -867,6 +868,14 @@ int __cpuinit native_cpu_up(unsigned int cpu)
 	return 0;
 }
 
+/**
+ * arch_disable_smp_support() - disables SMP support for x86 at runtime
+ */
+void arch_disable_smp_support(void)
+{
+	disable_ioapic_support();
+}
+
 /*
  * Fall back to non SMP mode after errors.
  *
@@ -966,7 +975,7 @@ static int __init smp_sanity_check(unsigned max_cpus)
 				"(tell your hw vendor)\n");
 		}
 		smpboot_clear_io_apic();
-		arch_disable_smp_support();
+		disable_ioapic_support();
 		return -1;
 	}
 
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/5] x86: add dummy functions for compiling without IOAPIC
  2011-02-22 14:38 [PATCH 1/5] x86: move ioapic_irq_destination_types to apicdef.h Henrik Kretzschmar
  2011-02-22 14:38 ` [PATCH 2/5] x86: add dummy mp_save_irq() Henrik Kretzschmar
  2011-02-22 14:38 ` [PATCH 3/5] x86: rework arch_disable_smp_support() for x86 Henrik Kretzschmar
@ 2011-02-22 14:38 ` Henrik Kretzschmar
  2011-02-23 12:08   ` [tip:x86/apic] x86: Add " tip-bot for Henrik Kretzschmar
  2011-02-22 14:38 ` [PATCH 5/5] x86: fix deps of X86_UP_IOAPIC Henrik Kretzschmar
  2011-02-23 12:07 ` [tip:x86/apic] x86: Move ioapic_irq_destination_types to apicdef.h tip-bot for Henrik Kretzschmar
  4 siblings, 1 reply; 11+ messages in thread
From: Henrik Kretzschmar @ 2011-02-22 14:38 UTC (permalink / raw)
  To: mingo; +Cc: tglx, hpa, x86, linux-kernel, Henrik Kretzschmar

This patch adds IOAPIC dummy functions for compilation
with local APIC, but without IOAPIC.

The local variable ioapic_entries in enable_IR_x2apic()
does not need initialization anymore, since the dummy
returns NULL.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
---
 arch/x86/include/asm/io_apic.h |   18 ++++++++++++++++++
 arch/x86/kernel/apic/apic.c    |    2 +-
 2 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
index 0be2f27..56dcf08 100644
--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -190,6 +190,24 @@ static inline int mp_find_ioapic(u32 gsi) { return 0; }
 struct io_apic_irq_attr;
 static inline int io_apic_set_pci_routing(struct device *dev, int irq,
 		 struct io_apic_irq_attr *irq_attr) { return 0; }
+
+static inline struct IO_APIC_route_entry **alloc_ioapic_entries(void)
+{
+	return NULL;
+}
+
+static inline void free_ioapic_entries(struct IO_APIC_route_entry **ent) { }
+static inline int save_IO_APIC_setup(struct IO_APIC_route_entry **ent)
+{
+	return -ENOMEM;
+}
+
+static inline void mask_IO_APIC_setup(struct IO_APIC_route_entry **ent) { }
+static inline int restore_IO_APIC_setup(struct IO_APIC_route_entry **ent)
+{
+	return -ENOMEM;
+}
+
 static inline void mp_save_irq(struct mpc_intsrc *m) { };
 static inline void disable_ioapic_support(void) { }
 #endif
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 6fd5c33..562a832 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1471,7 +1471,7 @@ int __init enable_IR(void)
 void __init enable_IR_x2apic(void)
 {
 	unsigned long flags;
-	struct IO_APIC_route_entry **ioapic_entries = NULL;
+	struct IO_APIC_route_entry **ioapic_entries;
 	int ret, x2apic_enabled = 0;
 	int dmar_table_init_ret;
 
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 5/5] x86: fix deps of X86_UP_IOAPIC
  2011-02-22 14:38 [PATCH 1/5] x86: move ioapic_irq_destination_types to apicdef.h Henrik Kretzschmar
                   ` (2 preceding siblings ...)
  2011-02-22 14:38 ` [PATCH 4/5] x86: add dummy functions for compiling without IOAPIC Henrik Kretzschmar
@ 2011-02-22 14:38 ` Henrik Kretzschmar
  2011-02-23 12:09   ` [tip:x86/apic] x86: Fix " tip-bot for Henrik Kretzschmar
  2011-02-23 12:07 ` [tip:x86/apic] x86: Move ioapic_irq_destination_types to apicdef.h tip-bot for Henrik Kretzschmar
  4 siblings, 1 reply; 11+ messages in thread
From: Henrik Kretzschmar @ 2011-02-22 14:38 UTC (permalink / raw)
  To: mingo; +Cc: tglx, hpa, x86, linux-kernel, Henrik Kretzschmar

Since commit 7cd92366a593246650cc7d6198e2c7d3af8c1d8a
lAPIC enabled accidently the IOAPIC, which now gets fixed.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
---
 arch/x86/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 95c36c4..66c6801 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -811,7 +811,7 @@ config X86_LOCAL_APIC
 
 config X86_IO_APIC
 	def_bool y
-	depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC
+	depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_IOAPIC
 
 config X86_VISWS_APIC
 	def_bool y
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [tip:x86/apic] x86: Move ioapic_irq_destination_types to apicdef.h
  2011-02-22 14:38 [PATCH 1/5] x86: move ioapic_irq_destination_types to apicdef.h Henrik Kretzschmar
                   ` (3 preceding siblings ...)
  2011-02-22 14:38 ` [PATCH 5/5] x86: fix deps of X86_UP_IOAPIC Henrik Kretzschmar
@ 2011-02-23 12:07 ` tip-bot for Henrik Kretzschmar
  4 siblings, 0 replies; 11+ messages in thread
From: tip-bot for Henrik Kretzschmar @ 2011-02-23 12:07 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, tglx, henne, mingo

Commit-ID:  4e034b245133adfd006ade5d7a809c9cac4beef9
Gitweb:     http://git.kernel.org/tip/4e034b245133adfd006ade5d7a809c9cac4beef9
Author:     Henrik Kretzschmar <henne@nachtwindheim.de>
AuthorDate: Tue, 22 Feb 2011 15:38:03 +0100
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 23 Feb 2011 11:38:44 +0100

x86: Move ioapic_irq_destination_types to apicdef.h

This enum is used by non IOAPIC code, so apicdef.h is
the best place for it.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
LKML-Reference: <1298385487-4708-1-git-send-email-henne@nachtwindheim.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/include/asm/apicdef.h |   12 ++++++++++++
 arch/x86/include/asm/io_apic.h |   11 -----------
 2 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/arch/x86/include/asm/apicdef.h b/arch/x86/include/asm/apicdef.h
index 47a30ff..d87988b 100644
--- a/arch/x86/include/asm/apicdef.h
+++ b/arch/x86/include/asm/apicdef.h
@@ -426,4 +426,16 @@ struct local_apic {
 #else
  #define BAD_APICID 0xFFFFu
 #endif
+
+enum ioapic_irq_destination_types {
+	dest_Fixed		= 0,
+	dest_LowestPrio		= 1,
+	dest_SMI		= 2,
+	dest__reserved_1	= 3,
+	dest_NMI		= 4,
+	dest_INIT		= 5,
+	dest__reserved_2	= 6,
+	dest_ExtINT		= 7
+};
+
 #endif /* _ASM_X86_APICDEF_H */
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
index f327d38..e1a9b0e 100644
--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -63,17 +63,6 @@ union IO_APIC_reg_03 {
 	} __attribute__ ((packed)) bits;
 };
 
-enum ioapic_irq_destination_types {
-	dest_Fixed = 0,
-	dest_LowestPrio = 1,
-	dest_SMI = 2,
-	dest__reserved_1 = 3,
-	dest_NMI = 4,
-	dest_INIT = 5,
-	dest__reserved_2 = 6,
-	dest_ExtINT = 7
-};
-
 struct IO_APIC_route_entry {
 	__u32	vector		:  8,
 		delivery_mode	:  3,	/* 000: FIXED

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [tip:x86/apic] x86: Add dummy mp_save_irq()
  2011-02-22 14:38 ` [PATCH 2/5] x86: add dummy mp_save_irq() Henrik Kretzschmar
@ 2011-02-23 12:07   ` tip-bot for Henrik Kretzschmar
  0 siblings, 0 replies; 11+ messages in thread
From: tip-bot for Henrik Kretzschmar @ 2011-02-23 12:07 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, tglx, henne, mingo

Commit-ID:  b6a1432da81fa387d76215108dc9f6ea6d343aed
Gitweb:     http://git.kernel.org/tip/b6a1432da81fa387d76215108dc9f6ea6d343aed
Author:     Henrik Kretzschmar <henne@nachtwindheim.de>
AuthorDate: Tue, 22 Feb 2011 15:38:04 +0100
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 23 Feb 2011 11:38:45 +0100

x86: Add dummy mp_save_irq()

This is a dummy function, used when no IOAPIC is compiled in.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
LKML-Reference: <1298385487-4708-2-git-send-email-henne@nachtwindheim.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/include/asm/io_apic.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
index e1a9b0e..b24915f 100644
--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -188,6 +188,7 @@ static inline int mp_find_ioapic(u32 gsi) { return 0; }
 struct io_apic_irq_attr;
 static inline int io_apic_set_pci_routing(struct device *dev, int irq,
 		 struct io_apic_irq_attr *irq_attr) { return 0; }
+static inline void mp_save_irq(struct mpc_intsrc *m) { };
 #endif
 
 #endif /* _ASM_X86_IO_APIC_H */

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [tip:x86/apic] x86: Rework arch_disable_smp_support() for x86
  2011-02-22 14:38 ` [PATCH 3/5] x86: rework arch_disable_smp_support() for x86 Henrik Kretzschmar
@ 2011-02-23 12:08   ` tip-bot for Henrik Kretzschmar
  0 siblings, 0 replies; 11+ messages in thread
From: tip-bot for Henrik Kretzschmar @ 2011-02-23 12:08 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, tglx, henne, mingo

Commit-ID:  7167d08e780a722fa79ea414fc4e72bc00751392
Gitweb:     http://git.kernel.org/tip/7167d08e780a722fa79ea414fc4e72bc00751392
Author:     Henrik Kretzschmar <henne@nachtwindheim.de>
AuthorDate: Tue, 22 Feb 2011 15:38:05 +0100
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 23 Feb 2011 11:38:45 +0100

x86: Rework arch_disable_smp_support() for x86

Currently arch_disable_smp_support() on x86 disables only the
support for the IOAPIC and is also compiled in if SMP-support is
not.

Therefore this function is renamed to disable_ioapic_support(),
which meets its purpose and is only compiled in the kernel
when IOAPIC support is also.

A new arch_disable_smp_support() is created in smpboot.c,
which calls disable_ioapic_support() and gets only compiled
in the kernel when SMP support is also.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
LKML-Reference: <1298385487-4708-3-git-send-email-henne@nachtwindheim.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/include/asm/io_apic.h |    3 +++
 arch/x86/kernel/apic/apic.c    |    3 ++-
 arch/x86/kernel/apic/io_apic.c |    7 +++++--
 arch/x86/kernel/smpboot.c      |   11 ++++++++++-
 4 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
index b24915f..0be2f27 100644
--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -175,6 +175,8 @@ extern void __init pre_init_apic_IRQ0(void);
 
 extern void mp_save_irq(struct mpc_intsrc *m);
 
+extern void disable_ioapic_support(void);
+
 #else  /* !CONFIG_X86_IO_APIC */
 
 #define io_apic_assign_pci_irqs 0
@@ -189,6 +191,7 @@ struct io_apic_irq_attr;
 static inline int io_apic_set_pci_routing(struct device *dev, int irq,
 		 struct io_apic_irq_attr *irq_attr) { return 0; }
 static inline void mp_save_irq(struct mpc_intsrc *m) { };
+static inline void disable_ioapic_support(void) { }
 #endif
 
 #endif /* _ASM_X86_IO_APIC_H */
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 76b96d7..96e6809 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -43,6 +43,7 @@
 #include <asm/i8259.h>
 #include <asm/proto.h>
 #include <asm/apic.h>
+#include <asm/io_apic.h>
 #include <asm/desc.h>
 #include <asm/hpet.h>
 #include <asm/idle.h>
@@ -1209,7 +1210,7 @@ void __cpuinit setup_local_APIC(void)
 		rdtscll(tsc);
 
 	if (disable_apic) {
-		arch_disable_smp_support();
+		disable_ioapic_support();
 		return;
 	}
 
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index ca9e2a3..a2f2bf8 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -108,7 +108,10 @@ DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
 
 int skip_ioapic_setup;
 
-void arch_disable_smp_support(void)
+/**
+ * disable_ioapic_support() - disables ioapic support at runtime
+ */
+void disable_ioapic_support(void)
 {
 #ifdef CONFIG_PCI
 	noioapicquirk = 1;
@@ -120,7 +123,7 @@ void arch_disable_smp_support(void)
 static int __init parse_noapic(char *str)
 {
 	/* disable IO-APIC */
-	arch_disable_smp_support();
+	disable_ioapic_support();
 	return 0;
 }
 early_param("noapic", parse_noapic);
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 08776a9..09d0172 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -64,6 +64,7 @@
 #include <asm/mtrr.h>
 #include <asm/mwait.h>
 #include <asm/apic.h>
+#include <asm/io_apic.h>
 #include <asm/setup.h>
 #include <asm/uv/uv.h>
 #include <linux/mc146818rtc.h>
@@ -945,6 +946,14 @@ int __cpuinit native_cpu_up(unsigned int cpu)
 	return 0;
 }
 
+/**
+ * arch_disable_smp_support() - disables SMP support for x86 at runtime
+ */
+void arch_disable_smp_support(void)
+{
+	disable_ioapic_support();
+}
+
 /*
  * Fall back to non SMP mode after errors.
  *
@@ -1045,7 +1054,7 @@ static int __init smp_sanity_check(unsigned max_cpus)
 				"(tell your hw vendor)\n");
 		}
 		smpboot_clear_io_apic();
-		arch_disable_smp_support();
+		disable_ioapic_support();
 		return -1;
 	}
 

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [tip:x86/apic] x86: Add dummy functions for compiling without IOAPIC
  2011-02-22 14:38 ` [PATCH 4/5] x86: add dummy functions for compiling without IOAPIC Henrik Kretzschmar
@ 2011-02-23 12:08   ` tip-bot for Henrik Kretzschmar
  0 siblings, 0 replies; 11+ messages in thread
From: tip-bot for Henrik Kretzschmar @ 2011-02-23 12:08 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, tglx, henne, mingo

Commit-ID:  7d0f1926131cf79aa5998d463bf1582156e7b41e
Gitweb:     http://git.kernel.org/tip/7d0f1926131cf79aa5998d463bf1582156e7b41e
Author:     Henrik Kretzschmar <henne@nachtwindheim.de>
AuthorDate: Tue, 22 Feb 2011 15:38:06 +0100
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 23 Feb 2011 11:38:46 +0100

x86: Add dummy functions for compiling without IOAPIC

This patch adds IOAPIC dummy functions for compilation
with local APIC, but without IOAPIC.

The local variable ioapic_entries in enable_IR_x2apic()
does not need initialization anymore, since the dummy
returns NULL.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
LKML-Reference: <1298385487-4708-4-git-send-email-henne@nachtwindheim.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/include/asm/io_apic.h |   18 ++++++++++++++++++
 arch/x86/kernel/apic/apic.c    |    2 +-
 2 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
index 0be2f27..56dcf08 100644
--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -190,6 +190,24 @@ static inline int mp_find_ioapic(u32 gsi) { return 0; }
 struct io_apic_irq_attr;
 static inline int io_apic_set_pci_routing(struct device *dev, int irq,
 		 struct io_apic_irq_attr *irq_attr) { return 0; }
+
+static inline struct IO_APIC_route_entry **alloc_ioapic_entries(void)
+{
+	return NULL;
+}
+
+static inline void free_ioapic_entries(struct IO_APIC_route_entry **ent) { }
+static inline int save_IO_APIC_setup(struct IO_APIC_route_entry **ent)
+{
+	return -ENOMEM;
+}
+
+static inline void mask_IO_APIC_setup(struct IO_APIC_route_entry **ent) { }
+static inline int restore_IO_APIC_setup(struct IO_APIC_route_entry **ent)
+{
+	return -ENOMEM;
+}
+
 static inline void mp_save_irq(struct mpc_intsrc *m) { };
 static inline void disable_ioapic_support(void) { }
 #endif
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 96e6809..f0e0798 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1449,7 +1449,7 @@ int __init enable_IR(void)
 void __init enable_IR_x2apic(void)
 {
 	unsigned long flags;
-	struct IO_APIC_route_entry **ioapic_entries = NULL;
+	struct IO_APIC_route_entry **ioapic_entries;
 	int ret, x2apic_enabled = 0;
 	int dmar_table_init_ret;
 

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [tip:x86/apic] x86: Fix deps of X86_UP_IOAPIC
  2011-02-22 14:38 ` [PATCH 5/5] x86: fix deps of X86_UP_IOAPIC Henrik Kretzschmar
@ 2011-02-23 12:09   ` tip-bot for Henrik Kretzschmar
  0 siblings, 0 replies; 11+ messages in thread
From: tip-bot for Henrik Kretzschmar @ 2011-02-23 12:09 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, tglx, henne, mingo

Commit-ID:  1444e0c9daf0d3472677efc15588b192fc2db761
Gitweb:     http://git.kernel.org/tip/1444e0c9daf0d3472677efc15588b192fc2db761
Author:     Henrik Kretzschmar <henne@nachtwindheim.de>
AuthorDate: Tue, 22 Feb 2011 15:38:07 +0100
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 23 Feb 2011 11:38:46 +0100

x86: Fix deps of X86_UP_IOAPIC

Since commit 7cd92366a593246650cc7d6198e2c7d3af8c1d8a
lAPIC enabled accidently the IOAPIC, which now gets fixed.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
LKML-Reference: <1298385487-4708-5-git-send-email-henne@nachtwindheim.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index d5ed94d..867a8cf 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -811,7 +811,7 @@ config X86_LOCAL_APIC
 
 config X86_IO_APIC
 	def_bool y
-	depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC
+	depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_IOAPIC
 
 config X86_VISWS_APIC
 	def_bool y

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 5/5] x86: fix deps of X86_UP_IOAPIC
  2011-02-21  8:59 [PATCH 1/5] x86: move " Henrik Kretzschmar
@ 2011-02-21  8:59 ` Henrik Kretzschmar
  0 siblings, 0 replies; 11+ messages in thread
From: Henrik Kretzschmar @ 2011-02-21  8:59 UTC (permalink / raw)
  To: mingo, tglx, hpa; +Cc: x86, linux-kernel, Henrik Kretzschmar

Since commit 7cd92366a593246650cc7d6198e2c7d3af8c1d8a
lAPIC enabled accidently the IOAPIC, which now gets fixed.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
---
 arch/x86/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 95c36c4..66c6801 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -811,7 +811,7 @@ config X86_LOCAL_APIC
 
 config X86_IO_APIC
 	def_bool y
-	depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC
+	depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_IOAPIC
 
 config X86_VISWS_APIC
 	def_bool y
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-02-23 12:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-22 14:38 [PATCH 1/5] x86: move ioapic_irq_destination_types to apicdef.h Henrik Kretzschmar
2011-02-22 14:38 ` [PATCH 2/5] x86: add dummy mp_save_irq() Henrik Kretzschmar
2011-02-23 12:07   ` [tip:x86/apic] x86: Add " tip-bot for Henrik Kretzschmar
2011-02-22 14:38 ` [PATCH 3/5] x86: rework arch_disable_smp_support() for x86 Henrik Kretzschmar
2011-02-23 12:08   ` [tip:x86/apic] x86: Rework " tip-bot for Henrik Kretzschmar
2011-02-22 14:38 ` [PATCH 4/5] x86: add dummy functions for compiling without IOAPIC Henrik Kretzschmar
2011-02-23 12:08   ` [tip:x86/apic] x86: Add " tip-bot for Henrik Kretzschmar
2011-02-22 14:38 ` [PATCH 5/5] x86: fix deps of X86_UP_IOAPIC Henrik Kretzschmar
2011-02-23 12:09   ` [tip:x86/apic] x86: Fix " tip-bot for Henrik Kretzschmar
2011-02-23 12:07 ` [tip:x86/apic] x86: Move ioapic_irq_destination_types to apicdef.h tip-bot for Henrik Kretzschmar
  -- strict thread matches above, loose matches on Subject: below --
2011-02-21  8:59 [PATCH 1/5] x86: move " Henrik Kretzschmar
2011-02-21  8:59 ` [PATCH 5/5] x86: fix deps of X86_UP_IOAPIC Henrik Kretzschmar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.