public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Eric W. Biederman" <ebiederm@xmission.com>
To: Andrew Morton <akpm@osdl.org>
Cc: <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Tony Luck <tony.luck@intel.com>, Andi Kleen <ak@suse.de>,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 5/5] htirq: Tidy up the htirq code
Date: Wed, 27 Sep 2006 13:58:17 -0600	[thread overview]
Message-ID: <11593870981875-git-send-email-ebiederm@xmission.com> (raw)
In-Reply-To: <m164f9m6dy.fsf@ebiederm.dsl.xmission.com>

This moves the declarations for the architecture helpers into
include/linux/htirq.h from the generic include/linux/pci.h.
Hopefully this will make this distinction clearer.

htirq.h is included where it is needed.

The dependency on the msi code is fixed and removed.

The Makefile is tidied up.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/i386/kernel/io_apic.c   |    5 ++---
 arch/x86_64/kernel/io_apic.c |    1 +
 drivers/pci/Kconfig          |    1 -
 drivers/pci/Makefile         |    4 +++-
 drivers/pci/htirq.c          |    1 +
 include/linux/htirq.h        |   15 +++++++++++++++
 include/linux/pci.h          |   11 -----------
 7 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index 5a12527..b7287fb 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -33,6 +33,7 @@ #include <linux/module.h>
 #include <linux/sysdev.h>
 #include <linux/pci.h>
 #include <linux/msi.h>
+#include <linux/htirq.h>
 
 #include <asm/io.h>
 #include <asm/smp.h>
@@ -2409,9 +2410,8 @@ static int __init ioapic_init_sysfs(void
 
 device_initcall(ioapic_init_sysfs);
 
-#ifdef CONFIG_PCI_MSI
 /*
- * Dynamic irq allocate and deallocation for MSI
+ * Dynamic irq allocate and deallocation
  */
 int create_irq(void)
 {
@@ -2450,7 +2450,6 @@ void destroy_irq(unsigned int irq)
 	irq_vector[irq] = 0;
 	spin_unlock_irqrestore(&vector_lock, flags);
 }
-#endif /* CONFIG_PCI_MSI */
 
 /*
  * MSI mesage composition
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c
index e55028f..91728d9 100644
--- a/arch/x86_64/kernel/io_apic.c
+++ b/arch/x86_64/kernel/io_apic.c
@@ -31,6 +31,7 @@ #include <linux/mc146818rtc.h>
 #include <linux/acpi.h>
 #include <linux/sysdev.h>
 #include <linux/msi.h>
+#include <linux/htirq.h>
 #ifdef CONFIG_ACPI
 #include <acpi/acpi_bus.h>
 #endif
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index 0af6d72..3029412 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -55,7 +55,6 @@ config PCI_DEBUG
 config HT_IRQ
 	bool "Interrupts on hypertransport devices"
 	default y
-	depends on PCI_MSI
 	depends on X86_LOCAL_APIC && X86_IO_APIC
 	help
 	   This allows native hypertransport devices to use interrupts.
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index 04694ec..e3beb78 100644
--- a/drivers/pci/Makefile
+++ b/drivers/pci/Makefile
@@ -17,6 +17,9 @@ obj-$(CONFIG_HOTPLUG_PCI) += hotplug/
 # Build the PCI MSI interrupt support
 obj-$(CONFIG_PCI_MSI) += msi.o
 
+# Build the Hypertransport interrupt support
+obj-$(CONFIG_HT_IRQ) += htirq.o
+
 #
 # Some architectures use the generic PCI setup functions
 #
@@ -29,7 +32,6 @@ obj-$(CONFIG_PPC32) += setup-irq.o
 obj-$(CONFIG_PPC64) += setup-bus.o
 obj-$(CONFIG_MIPS) += setup-bus.o setup-irq.o
 obj-$(CONFIG_X86_VISWS) += setup-irq.o
-obj-$(CONFIG_HT_IRQ) += htirq.o
 
 #
 # ACPI Related PCI FW Functions
diff --git a/drivers/pci/htirq.c b/drivers/pci/htirq.c
index 4ba4635..0e27f24 100644
--- a/drivers/pci/htirq.c
+++ b/drivers/pci/htirq.c
@@ -11,6 +11,7 @@ #include <linux/pci.h>
 #include <linux/spinlock.h>
 #include <linux/slab.h>
 #include <linux/gfp.h>
+#include <linux/htirq.h>
 
 /* Global ht irq lock.
  *
diff --git a/include/linux/htirq.h b/include/linux/htirq.h
new file mode 100644
index 0000000..1f15ce2
--- /dev/null
+++ b/include/linux/htirq.h
@@ -0,0 +1,15 @@
+#ifndef LINUX_HTIRQ_H
+#define LINUX_HTIRQ_H
+
+/* Helper functions.. */
+void write_ht_irq_low(unsigned int irq, u32 data);
+void write_ht_irq_high(unsigned int irq, u32 data);
+u32  read_ht_irq_low(unsigned int irq);
+u32  read_ht_irq_high(unsigned int irq);
+void mask_ht_irq(unsigned int irq);
+void unmask_ht_irq(unsigned int irq);
+
+/* The arch hook for getting things started */
+int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev);
+
+#endif /* LINUX_HTIRQ_H */
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 9fa0740..5bc4659 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -619,20 +619,9 @@ extern void msi_remove_pci_irq_vectors(s
 #endif
 
 #ifdef CONFIG_HT_IRQ
-/* Helper functions.. */
-void write_ht_irq_low(unsigned int irq, u32 data);
-void write_ht_irq_high(unsigned int irq, u32 data);
-u32  read_ht_irq_low(unsigned int irq);
-u32  read_ht_irq_high(unsigned int irq);
-void mask_ht_irq(unsigned int irq);
-void unmask_ht_irq(unsigned int irq);
-
 /* The functions a driver should call */
 int  ht_create_irq(struct pci_dev *dev, int idx);
 void ht_destroy_irq(unsigned int irq);
-
-/* The arch hook for getting things started */
-int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev);
 #endif /* CONFIG_HT_IRQ */
 
 extern void pci_block_user_cfg_access(struct pci_dev *dev);
-- 
1.4.2.rc3.g7e18e-dirty


  parent reply	other threads:[~2006-09-27 19:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-27 19:55 [PATCH 0/5] Message signaled irq handling cleanups Eric W. Biederman
2006-09-27 19:58 ` [PATCH 1/5] msi: Simplify msi sanity checks by adding with generic irq code Eric W. Biederman
2006-09-27 19:58 ` [PATCH 2/5] msi: Only use a single irq_chip for msi interrupts Eric W. Biederman
2006-09-27 19:58 ` [PATCH 3/5] msi: Refactor and move the msi irq_chip into the arch code Eric W. Biederman
2006-09-27 19:58 ` [PATCH 4/5] msi: Move the ia64 code into arch/ia64 Eric W. Biederman
2006-09-27 19:58 ` Eric W. Biederman [this message]
2006-09-27 20:29 ` [PATCH 0/5] Message signaled irq handling cleanups Eric W. Biederman
2006-09-27 22:36 ` Benjamin Herrenschmidt
2006-09-27 22:51   ` Benjamin Herrenschmidt
     [not found] <<m11wpxm4sy.fsf@ebiederm.dsl.xmission.com>
2006-09-27 20:31 ` [PATCH 5/5] htirq: Tidy up the htirq code Eric W. Biederman

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=11593870981875-git-send-email-ebiederm@xmission.com \
    --to=ebiederm@xmission.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tony.luck@intel.com \
    /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