diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2007-05-07 22:58:36 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-05-07 23:43:48 -0400 |
commit | a7de7c74227edda719b257eb15aecd73790ff894 (patch) | |
tree | c5168a047e3b55b220a869c678a9fefb76ffbdfc /arch/powerpc/sysdev/mpic.c | |
parent | 812fd1fd63caf2d72906603ebb9c6049a19ef4d2 (diff) |
[POWERPC] MPIC MSI allocator
To support MSI on MPIC we need a way to reserve and allocate hardware irq
numbers, this patch implements an allocator for that purpose.
New firmware platforms must define a "msi-available-ranges" property on their
MPIC node for MSI to work. For U3/U4 we do a best-guess setup.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/sysdev/mpic.c')
-rw-r--r-- | arch/powerpc/sysdev/mpic.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 33ecf89702d4..fc0428aea0c0 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
@@ -36,6 +36,8 @@ | |||
36 | #include <asm/mpic.h> | 36 | #include <asm/mpic.h> |
37 | #include <asm/smp.h> | 37 | #include <asm/smp.h> |
38 | 38 | ||
39 | #include "mpic.h" | ||
40 | |||
39 | #ifdef DEBUG | 41 | #ifdef DEBUG |
40 | #define DBG(fmt...) printk(fmt) | 42 | #define DBG(fmt...) printk(fmt) |
41 | #else | 43 | #else |
@@ -891,6 +893,8 @@ static int mpic_host_map(struct irq_host *h, unsigned int virq, | |||
891 | if (hw >= mpic->irq_count) | 893 | if (hw >= mpic->irq_count) |
892 | return -EINVAL; | 894 | return -EINVAL; |
893 | 895 | ||
896 | mpic_msi_reserve_hwirq(mpic, hw); | ||
897 | |||
894 | /* Default chip */ | 898 | /* Default chip */ |
895 | chip = &mpic->hc_irq; | 899 | chip = &mpic->hc_irq; |
896 | 900 | ||