mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: <mingo@elte.hu>, <tglx@linutronix.de>, <hpa@zytor.com>
Cc: <jiang.liu@linux.intel.com>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] ix86: fix build failure when !CONFIG_X86_IO_APIC
Date: Tue, 16 Sep 2014 13:44:24 +0100	[thread overview]
Message-ID: <54184CC802000078000355EE@mail.emea.novell.com> (raw)

mp_should_keep_irq() isn't really IO-APIC related, and considering that
it's being used solely in arch/x86/pci/ likely both declaration and
definition got misplaced even without considering the resulting build
failure:

.../arch/x86/pci/irq.c: In function ‘pirq_disable_irq’:
.../arch/x86/pci/irq.c:1259: error: implicit declaration of function ‘mp_should_keep_irq’
make[3]: *** [arch/x86/pci/irq.o] Error 1

Move them to better places.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
---
 arch/x86/include/asm/io_apic.h |    2 --
 arch/x86/include/asm/pci_x86.h |    2 ++
 arch/x86/kernel/apic/io_apic.c |   12 ------------
 arch/x86/pci/irq.c             |   12 ++++++++++++
 4 files changed, 14 insertions(+), 14 deletions(-)

--- 3.17-rc5/arch/x86/include/asm/io_apic.h
+++ 3.17-rc5-ix86-build-no-IOAPIC/arch/x86/include/asm/io_apic.h
@@ -227,8 +227,6 @@ static inline void io_apic_modify(unsign
 
 extern void io_apic_eoi(unsigned int apic, unsigned int vector);
 
-extern bool mp_should_keep_irq(struct device *dev);
-
 #else  /* !CONFIG_X86_IO_APIC */
 
 #define io_apic_assign_pci_irqs 0
--- 3.17-rc5/arch/x86/include/asm/pci_x86.h
+++ 3.17-rc5-ix86-build-no-IOAPIC/arch/x86/include/asm/pci_x86.h
@@ -93,6 +93,8 @@ extern raw_spinlock_t pci_config_lock;
 extern int (*pcibios_enable_irq)(struct pci_dev *dev);
 extern void (*pcibios_disable_irq)(struct pci_dev *dev);
 
+extern bool mp_should_keep_irq(struct device *dev);
+
 struct pci_raw_ops {
 	int (*read)(unsigned int domain, unsigned int bus, unsigned int devfn,
 						int reg, int len, u32 *val);
--- 3.17-rc5/arch/x86/kernel/apic/io_apic.c
+++ 3.17-rc5-ix86-build-no-IOAPIC/arch/x86/kernel/apic/io_apic.c
@@ -3959,18 +3959,6 @@ int mp_set_gsi_attr(u32 gsi, int trigger
 	return ret;
 }
 
-bool mp_should_keep_irq(struct device *dev)
-{
-	if (dev->power.is_prepared)
-		return true;
-#ifdef	CONFIG_PM_RUNTIME
-	if (dev->power.runtime_status == RPM_SUSPENDING)
-		return true;
-#endif
-
-	return false;
-}
-
 /* Enable IOAPIC early just for system timer */
 void __init pre_init_apic_IRQ0(void)
 {
--- 3.17-rc5/arch/x86/pci/irq.c
+++ 3.17-rc5-ix86-build-no-IOAPIC/arch/x86/pci/irq.c
@@ -1254,6 +1254,18 @@ static int pirq_enable_irq(struct pci_de
 	return 0;
 }
 
+bool mp_should_keep_irq(struct device *dev)
+{
+	if (dev->power.is_prepared)
+		return true;
+#ifdef CONFIG_PM_RUNTIME
+	if (dev->power.runtime_status == RPM_SUSPENDING)
+		return true;
+#endif
+
+	return false;
+}
+
 static void pirq_disable_irq(struct pci_dev *dev)
 {
 	if (io_apic_assign_pci_irqs && !mp_should_keep_irq(&dev->dev) &&



             reply	other threads:[~2014-09-16 12:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-16 12:44 Jan Beulich [this message]
2014-10-28 11:13 ` [tip:x86/urgent] ix86: Fix " tip-bot for Jan Beulich
2014-10-28 11:18 ` tip-bot for Jan Beulich
2014-10-28 13:47   ` Jan Beulich
2014-10-29  7:50     ` Ingo Molnar
2014-10-29  7:53       ` Jan Beulich
2014-10-29  7:59         ` Ingo Molnar

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=54184CC802000078000355EE@mail.emea.novell.com \
    --to=jbeulich@suse.com \
    --cc=hpa@zytor.com \
    --cc=jiang.liu@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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®