linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ix86: fix placement of mp_should_keep_irq()
@ 2014-11-03  8:15 Jan Beulich
  2014-11-04 18:15 ` [tip:x86/apic] x86: irq: Fix " tip-bot for Jan Beulich
  2014-12-19 14:01 ` tip-bot for Jan Beulich
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Beulich @ 2014-11-03  8:15 UTC (permalink / raw)
  To: mingo, tglx, hpa; +Cc: jiang.liu, linux-kernel

While f3761db164 ("x86, irq: Fix build error caused by
9eabc99a635a77cbf09") addressed the original build problem,
declaration, inline stub, and definition still seem misplaced: It isn't
really IO-APIC related, and it's being used solely in arch/x86/pci/.
This also means stubbing it out when !CONFIG_X86_IO_APIC was at least
questionable.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
---
Note: This replaces (rather than fixes) the previously sent "ix86: fix
build failure when !CONFIG_X86_IO_APIC" (which conflicts with the
commit mentioned above).
---
 arch/x86/include/asm/io_apic.h |    3 ---
 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(+), 15 deletions(-)

--- 3.18-rc3/arch/x86/include/asm/io_apic.h
+++ 3.18-rc3-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
@@ -239,7 +237,6 @@ static inline int mp_find_ioapic(u32 gsi
 static inline u32 mp_pin_to_gsi(int ioapic, int pin) { return UINT_MAX; }
 static inline int mp_map_gsi_to_irq(u32 gsi, unsigned int flags) { return gsi; }
 static inline void mp_unmap_irq(int irq) { }
-static inline bool mp_should_keep_irq(struct device *dev) { return 1; }
 
 static inline int save_ioapic_entries(void)
 {
--- 3.18-rc3/arch/x86/include/asm/pci_x86.h
+++ 3.18-rc3-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.18-rc3/arch/x86/kernel/apic/io_apic.c
+++ 3.18-rc3-ix86-build-no-ioapic/arch/x86/kernel/apic/io_apic.c
@@ -3964,18 +3964,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.18-rc3/arch/x86/pci/irq.c
+++ 3.18-rc3-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) &&




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

* [tip:x86/apic] x86: irq: Fix placement of mp_should_keep_irq()
  2014-11-03  8:15 [PATCH] ix86: fix placement of mp_should_keep_irq() Jan Beulich
@ 2014-11-04 18:15 ` tip-bot for Jan Beulich
  2014-12-19 14:01 ` tip-bot for Jan Beulich
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Jan Beulich @ 2014-11-04 18:15 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: jiang.liu, jbeulich, hpa, JBeulich, tglx, linux-kernel, mingo

Commit-ID:  3b67bdc6599e25b082f12dbde6b0ce91dd235549
Gitweb:     http://git.kernel.org/tip/3b67bdc6599e25b082f12dbde6b0ce91dd235549
Author:     Jan Beulich <JBeulich@suse.com>
AuthorDate: Mon, 3 Nov 2014 08:15:42 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 4 Nov 2014 19:12:41 +0100

x86: irq: Fix placement of mp_should_keep_irq()

While f3761db164 ("x86, irq: Fix build error caused by
9eabc99a635a77cbf09") addressed the original build problem,
declaration, inline stub, and definition still seem misplaced: It isn't
really IO-APIC related, and it's being used solely in arch/x86/pci/.
This also means stubbing it out when !CONFIG_X86_IO_APIC was at least
questionable.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Link: http://lkml.kernel.org/r/545747BE020000780004436E@mail.emea.novell.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/x86/include/asm/io_apic.h |  3 ---
 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(+), 15 deletions(-)

diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
index ca742d5..0db2b70 100644
--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -229,8 +229,6 @@ static inline void io_apic_modify(unsigned int apic, unsigned int reg, unsigned
 
 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
@@ -241,7 +239,6 @@ static inline int mp_find_ioapic(u32 gsi) { return 0; }
 static inline u32 mp_pin_to_gsi(int ioapic, int pin) { return UINT_MAX; }
 static inline int mp_map_gsi_to_irq(u32 gsi, unsigned int flags) { return gsi; }
 static inline void mp_unmap_irq(int irq) { }
-static inline bool mp_should_keep_irq(struct device *dev) { return 1; }
 
 static inline int save_ioapic_entries(void)
 {
diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h
index fa1195d..164e3f8 100644
--- a/arch/x86/include/asm/pci_x86.h
+++ b/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);
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index ff2709e..1b7de4c 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -4116,18 +4116,6 @@ int mp_set_gsi_attr(u32 gsi, int trigger, int polarity, int node)
 	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)
 {
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c
index a47e2de..9988458 100644
--- a/arch/x86/pci/irq.c
+++ b/arch/x86/pci/irq.c
@@ -1258,6 +1258,18 @@ static int pirq_enable_irq(struct pci_dev *dev)
 	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) &&

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

* [tip:x86/apic] x86: irq: Fix placement of mp_should_keep_irq()
  2014-11-03  8:15 [PATCH] ix86: fix placement of mp_should_keep_irq() Jan Beulich
  2014-11-04 18:15 ` [tip:x86/apic] x86: irq: Fix " tip-bot for Jan Beulich
@ 2014-12-19 14:01 ` tip-bot for Jan Beulich
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Jan Beulich @ 2014-12-19 14:01 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: tglx, mingo, JBeulich, linux-kernel, jbeulich, jiang.liu, hpa

Commit-ID:  e10679825924580845c4825deaaddf5331ff627c
Gitweb:     http://git.kernel.org/tip/e10679825924580845c4825deaaddf5331ff627c
Author:     Jan Beulich <JBeulich@suse.com>
AuthorDate: Mon, 3 Nov 2014 08:15:42 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 16 Dec 2014 14:08:14 +0100

x86: irq: Fix placement of mp_should_keep_irq()

While f3761db164 ("x86, irq: Fix build error caused by
9eabc99a635a77cbf09") addressed the original build problem,
declaration, inline stub, and definition still seem misplaced: It isn't
really IO-APIC related, and it's being used solely in arch/x86/pci/.
This also means stubbing it out when !CONFIG_X86_IO_APIC was at least
questionable.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Link: http://lkml.kernel.org/r/545747BE020000780004436E@mail.emea.novell.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 arch/x86/include/asm/io_apic.h |  3 ---
 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(+), 15 deletions(-)

diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
index 1733ab4..0aeed5c 100644
--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -227,8 +227,6 @@ static inline void io_apic_modify(unsigned int apic, unsigned int reg, unsigned
 
 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
@@ -239,7 +237,6 @@ static inline int mp_find_ioapic(u32 gsi) { return 0; }
 static inline u32 mp_pin_to_gsi(int ioapic, int pin) { return UINT_MAX; }
 static inline int mp_map_gsi_to_irq(u32 gsi, unsigned int flags) { return gsi; }
 static inline void mp_unmap_irq(int irq) { }
-static inline bool mp_should_keep_irq(struct device *dev) { return 1; }
 
 static inline int save_ioapic_entries(void)
 {
diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h
index fa1195d..164e3f8 100644
--- a/arch/x86/include/asm/pci_x86.h
+++ b/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);
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 7ffe0a2..a157b66 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -3964,18 +3964,6 @@ int mp_set_gsi_attr(u32 gsi, int trigger, int polarity, int node)
 	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)
 {
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c
index eb500c2..cb50e28 100644
--- a/arch/x86/pci/irq.c
+++ b/arch/x86/pci/irq.c
@@ -1254,6 +1254,18 @@ static int pirq_enable_irq(struct pci_dev *dev)
 	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) &&

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

end of thread, other threads:[~2014-12-19 14:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-03  8:15 [PATCH] ix86: fix placement of mp_should_keep_irq() Jan Beulich
2014-11-04 18:15 ` [tip:x86/apic] x86: irq: Fix " tip-bot for Jan Beulich
2014-12-19 14:01 ` tip-bot for Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).