diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-14 10:31:13 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-17 22:55:43 -0500 |
commit | 7a96c6b22efbd84e195836e192a3ce478cd6e14c (patch) | |
tree | adf9c9c5e1bb9d89d8536bf49c049beb5e9458d7 /arch/powerpc/sysdev/mpic_msi.c | |
parent | bb7f20b1c639606def3b91f4e4aca6daeee5d80a (diff) |
powerpc: Fix MSI support on U4 bridge PCIe slot
On machines using the Apple U4 bridge (AKA IBM CPC945) PCIe interface such
as the latest generation G5 machines x16 slot or the x16 slot of the
PowerStation, MSIs are currently broken (and will oops when enabling).
This fixes the oops and implements proper support for those. Instead of
using the PCIe <-> HT bridge conversion, on such slots we need to use
a bunch of magic registers in the bridge as the MSI target, encoding
the interrupt number in the low bits of the address itself
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev/mpic_msi.c')
-rw-r--r-- | arch/powerpc/sysdev/mpic_msi.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/mpic_msi.c b/arch/powerpc/sysdev/mpic_msi.c index 1d44eee80fa1..0f67cd79d481 100644 --- a/arch/powerpc/sysdev/mpic_msi.c +++ b/arch/powerpc/sysdev/mpic_msi.c | |||
@@ -39,7 +39,12 @@ static int mpic_msi_reserve_u3_hwirqs(struct mpic *mpic) | |||
39 | 39 | ||
40 | pr_debug("mpic: found U3, guessing msi allocator setup\n"); | 40 | pr_debug("mpic: found U3, guessing msi allocator setup\n"); |
41 | 41 | ||
42 | /* Reserve source numbers we know are reserved in the HW */ | 42 | /* Reserve source numbers we know are reserved in the HW. |
43 | * | ||
44 | * This is a bit of a mix of U3 and U4 reserves but that's going | ||
45 | * to work fine, we have plenty enugh numbers left so let's just | ||
46 | * mark anything we don't like reserved. | ||
47 | */ | ||
43 | for (i = 0; i < 8; i++) | 48 | for (i = 0; i < 8; i++) |
44 | msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, i); | 49 | msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, i); |
45 | 50 | ||
@@ -49,6 +54,10 @@ static int mpic_msi_reserve_u3_hwirqs(struct mpic *mpic) | |||
49 | for (i = 100; i < 105; i++) | 54 | for (i = 100; i < 105; i++) |
50 | msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, i); | 55 | msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, i); |
51 | 56 | ||
57 | for (i = 124; i < mpic->irq_count; i++) | ||
58 | msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, i); | ||
59 | |||
60 | |||
52 | np = NULL; | 61 | np = NULL; |
53 | while ((np = of_find_all_nodes(np))) { | 62 | while ((np = of_find_all_nodes(np))) { |
54 | pr_debug("mpic: mapping hwirqs for %s\n", np->full_name); | 63 | pr_debug("mpic: mapping hwirqs for %s\n", np->full_name); |