From: tip-bot for Henrik Kretzschmar <henne@nachtwindheim.de>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
tglx@linutronix.de, henne@nachtwindheim.de, mingo@elte.hu
Subject: [tip:x86/apic] x86: Add dummy functions for compiling without IOAPIC
Date: Wed, 23 Feb 2011 12:08:34 GMT [thread overview]
Message-ID: <tip-7d0f1926131cf79aa5998d463bf1582156e7b41e@git.kernel.org> (raw)
In-Reply-To: <1298385487-4708-4-git-send-email-henne@nachtwindheim.de>
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;
next prev parent reply other threads:[~2011-02-23 12:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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-bot for Henrik Kretzschmar [this message]
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
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=tip-7d0f1926131cf79aa5998d463bf1582156e7b41e@git.kernel.org \
--to=henne@nachtwindheim.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--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 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.