From: Michael Ellerman <michael@ellerman.id.au>
To: <linuxppc-dev@ozlabs.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
Greg Kroah-Hartman <greg@kroah.com>,
linux-pci@atrey.karlin.mff.cuni.cz,
"David S. Miller" <davem@davemloft.net>
Subject: [RFC/PATCH 7/7] Enable MSI on Powerpc
Date: Tue, 07 Nov 2006 18:21:25 +1100 [thread overview]
Message-ID: <20061107072127.D589667D06@ozlabs.org> (raw)
In-Reply-To: <1162884080.585336.70559261997.qpush@cradle>
Allow PCI_MSI to build on Powerpc. Hook up a few platforms to use
the appropriate MSI backend.
We still need CONFIG_POWERPC.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/kernel/Makefile | 6 ++++++
arch/powerpc/platforms/maple/setup.c | 3 +++
arch/powerpc/platforms/powermac/pic.c | 3 +++
arch/powerpc/platforms/pseries/setup.c | 3 +++
drivers/pci/Kconfig | 2 +-
drivers/pci/Makefile | 4 +++-
6 files changed, 19 insertions(+), 2 deletions(-)
Index: msi/arch/powerpc/kernel/Makefile
===================================================================
--- msi.orig/arch/powerpc/kernel/Makefile
+++ msi/arch/powerpc/kernel/Makefile
@@ -66,6 +66,12 @@ pci64-$(CONFIG_PPC64) += pci_64.o pci_d
pci_direct_iommu.o iomap.o
pci32-$(CONFIG_PPC32) := pci_32.o
obj-$(CONFIG_PCI) += $(pci64-y) $(pci32-y)
+
+msiobj-y := msi.o
+msiobj-$(CONFIG_PPC_RTAS) += msi-rtas.o
+msiobj-$(CONFIG_MPIC) += msi-mpic.o
+obj-$(CONFIG_PCI_MSI) += $(msiobj-y)
+
kexec-$(CONFIG_PPC64) := machine_kexec_64.o
kexec-$(CONFIG_PPC32) := machine_kexec_32.o
obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o $(kexec-y)
Index: msi/arch/powerpc/platforms/maple/setup.c
===================================================================
--- msi.orig/arch/powerpc/platforms/maple/setup.c
+++ msi/arch/powerpc/platforms/maple/setup.c
@@ -61,6 +61,7 @@
#include <asm/lmb.h>
#include <asm/mpic.h>
#include <asm/udbg.h>
+#include <asm/msi.h>
#include "maple.h"
@@ -275,6 +276,8 @@ static void __init maple_init_IRQ(void)
ppc_md.get_irq = mpic_get_irq;
of_node_put(mpic_node);
of_node_put(root);
+
+ msi_mpic_init();
}
static void __init maple_progress(char *s, unsigned short hex)
Index: msi/arch/powerpc/platforms/powermac/pic.c
===================================================================
--- msi.orig/arch/powerpc/platforms/powermac/pic.c
+++ msi/arch/powerpc/platforms/powermac/pic.c
@@ -34,6 +34,7 @@
#include <asm/time.h>
#include <asm/pmac_feature.h>
#include <asm/mpic.h>
+#include <asm/msi.h>
#include "pmac.h"
@@ -562,6 +563,8 @@ static int __init pmac_pic_probe_mpic(vo
set_irq_data(cascade, mpic2);
set_irq_chained_handler(cascade, pmac_u3_cascade);
+ msi_mpic_init();
+
of_node_put(slave);
return 0;
}
Index: msi/arch/powerpc/platforms/pseries/setup.c
===================================================================
--- msi.orig/arch/powerpc/platforms/pseries/setup.c
+++ msi/arch/powerpc/platforms/pseries/setup.c
@@ -65,6 +65,7 @@
#include <asm/i8259.h>
#include <asm/udbg.h>
#include <asm/smp.h>
+#include <asm/msi.h>
#include "plpar_wrappers.h"
#include "ras.h"
@@ -275,6 +276,7 @@ static void __init pseries_discover_pic(
#ifdef CONFIG_SMP
smp_init_pseries_mpic();
#endif
+ msi_mpic_init();
return;
} else if (strstr(typep, "ppc-xicp")) {
ppc_md.init_IRQ = xics_init_IRQ;
@@ -284,6 +286,7 @@ static void __init pseries_discover_pic(
#ifdef CONFIG_SMP
smp_init_pseries_xics();
#endif
+ msi_rtas_init();
return;
}
}
Index: msi/drivers/pci/Kconfig
===================================================================
--- msi.orig/drivers/pci/Kconfig
+++ msi/drivers/pci/Kconfig
@@ -4,7 +4,7 @@
config PCI_MSI
bool "Message Signaled Interrupts (MSI and MSI-X)"
depends on PCI
- depends on (X86_LOCAL_APIC && X86_IO_APIC) || IA64
+ depends on (X86_LOCAL_APIC && X86_IO_APIC) || IA64 || PPC_MERGE
help
This allows device drivers to enable MSI (Message Signaled
Interrupts). Message Signaled Interrupts enable a device to
Index: msi/drivers/pci/Makefile
===================================================================
--- msi.orig/drivers/pci/Makefile
+++ msi/drivers/pci/Makefile
@@ -14,8 +14,10 @@ obj-$(CONFIG_HOTPLUG) += hotplug.o
# Build the PCI Hotplug drivers if we were asked to
obj-$(CONFIG_HOTPLUG_PCI) += hotplug/
-# Build the PCI MSI interrupt support
+# Build the PCI MSI interrupt support, but not for arch/powerpc
+ifndef CONFIG_PPC_MERGE
obj-$(CONFIG_PCI_MSI) += msi.o
+endif
# Build the Hypertransport interrupt support
obj-$(CONFIG_HT_IRQ) += htirq.o
next prev parent reply other threads:[~2006-11-07 7:21 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-07 7:21 [RFC/PATCH 0/7] Powerpc MSI Implementation Michael Ellerman
2006-11-07 7:21 ` [RFC/PATCH 1/7] Add #defines for Hypertransport MSI fields Michael Ellerman
2006-11-07 8:01 ` Segher Boessenkool
2006-11-07 7:21 ` [RFC/PATCH 2/7] Make some MSI-X #defines generic Michael Ellerman
2006-11-13 18:31 ` patch pci-make-some-msi-x-defines-generic.patch added to gregkh-2.6 tree gregkh
2006-11-07 7:21 ` [RFC/PATCH 3/7] Rip out the existing powerpc msi stubs Michael Ellerman
2006-11-07 7:21 ` [RFC/PATCH 5/7] RTAS MSI implementation Michael Ellerman
2006-11-08 20:16 ` Jake Moilanen
2006-11-08 23:35 ` Michael Ellerman
2006-11-07 7:21 ` [RFC/PATCH 4/7] Powerpc " Michael Ellerman
2006-11-07 20:07 ` Matthew Wilcox
2006-11-07 20:14 ` Russell King
2006-11-07 20:40 ` Benjamin Herrenschmidt
2006-11-07 20:44 ` Matthew Wilcox
2006-11-07 20:48 ` Russell King
2006-11-07 21:02 ` Matthew Wilcox
2006-11-07 22:25 ` Russell King
2006-11-07 22:29 ` Benjamin Herrenschmidt
2006-11-07 23:11 ` Eric W. Biederman
2006-11-08 0:15 ` Benjamin Herrenschmidt
2006-11-08 1:33 ` Eric W. Biederman
2006-11-08 2:08 ` Benjamin Herrenschmidt
2006-11-08 2:43 ` Eric W. Biederman
2006-11-08 3:02 ` Benjamin Herrenschmidt
2006-11-07 20:39 ` Benjamin Herrenschmidt
2006-11-07 7:21 ` [RFC/PATCH 6/7] MPIC MSI backend Michael Ellerman
2006-11-07 8:27 ` Segher Boessenkool
2006-11-07 8:42 ` Benjamin Herrenschmidt
2006-11-07 9:04 ` Segher Boessenkool
2006-11-07 9:16 ` Benjamin Herrenschmidt
2006-11-07 11:12 ` Segher Boessenkool
2006-11-07 7:21 ` Michael Ellerman [this message]
2006-11-07 7:41 ` [RFC/PATCH 0/7] Powerpc MSI Implementation Benjamin Herrenschmidt
2006-11-07 8:02 ` Greg KH
2006-11-08 5:18 ` Michael Ellerman
2006-11-08 10:26 ` Eric W. Biederman
2006-11-08 23:33 ` Michael Ellerman
2006-11-09 7:36 ` Segher Boessenkool
2006-11-13 6:05 ` Michael Ellerman
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=20061107072127.D589667D06@ozlabs.org \
--to=michael@ellerman.id.au \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=greg@kroah.com \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=linuxppc-dev@ozlabs.org \
/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;
as well as URLs for NNTP newsgroup(s).