From: Milton Miller <miltonm@bga.com>
To: Michael Ellerman <michael@ellerman.id.au>
Cc: linuxppc-dev@ozlabs.org, linux-pci <linux-pci@atrey.karlin.mff.cuni.cz>
Subject: Re: [PATCH 7/7] MPIC MSI backend
Date: Sat, 21 Apr 2007 18:17:45 -0500 [thread overview]
Message-ID: <e4520bd4be50f2884003a9421863627c@bga.com> (raw)
In-Reply-To: <20070419073556.73A6BDDE4A@ozlabs.org>
On Apr 19, 2007, Michael Ellerman wrote:
> MPIC MSI backend. Based on code from Segher, heavily hacked by me.
> Renamed to mpic_htmsi, as it only deals with MSI over Hypertransport.
...
> Index: msi-new/arch/powerpc/sysdev/Makefile
> ===================================================================
> --- msi-new.orig/arch/powerpc/sysdev/Makefile
> +++ msi-new/arch/powerpc/sysdev/Makefile
> @@ -4,6 +4,7 @@ endif
>
> mpic-obj-y := mpic.o
> mpic-obj-$(CONFIG_PCI_MSI) += mpic_msi.o
> +mpic-obj-$(CONFIG_PCI_MSI) += mpic_htmsi.o
> obj-$(CONFIG_MPIC) += $(mpic-obj-y)
This is overly complicated. You aren't going to be making this
a seperate link object anyways. It should end up somehting like
mpic-msi-$(CONFIG_PCI_MSI) := mpic_msi.o mpic_htmsi.o
obj-$(CONFIG_MPIC) += mpic.o $(mpic-msi-y)
> -static void mpic_unmask_irq(unsigned int irq)
> +void mpic_unmask_irq(unsigned int irq)
...
> -static void mpic_mask_irq(unsigned int irq)
> +void mpic_mask_irq(unsigned int irq)
...
Ok mpic.c is big enough already.
> Index: msi-new/arch/powerpc/sysdev/mpic.h
> ===================================================================
> --- msi-new.orig/arch/powerpc/sysdev/mpic.h
> +++ msi-new/arch/powerpc/sysdev/mpic.h
> @@ -11,14 +11,23 @@
> *
> */
>
> +#include <linux/irq.h>
> +
Why do you need this now? You already had uses of irq_ht_umber_t
and struct mpic. Unless this should be in the earlier patch?
> #ifdef CONFIG_PCI_MSI
> extern void mpic_msi_reserve_hwirq(struct mpic *mpic, irq_hw_number_t
> hwirq);
> +extern int mpic_htmsi_init(struct mpic *mpic);
> #else
> static inline void mpic_msi_reserve_hwirq(struct mpic *mpic,
> irq_hw_number_t hwirq)
> {
> return;
> }
> +static inline int mpic_htmsi_init(struct mpic *mpic) { return -1; }
more lines please
> #endif
>
> +extern int mpic_set_irq_type(unsigned int virq, unsigned int
> flow_type);
> +extern void mpic_end_irq(unsigned int irq);
> +extern void mpic_mask_irq(unsigned int irq);
> +extern void mpic_unmask_irq(unsigned int irq);
> +
> #endif /* _POWERPC_SYSDEV_MPIC_H */
> Index: msi-new/arch/powerpc/sysdev/mpic_htmsi.c
I just stumbled across drivers/pci/htirq.c, is that of any use?
> +
> +int mpic_htmsi_init(struct mpic *mpic)
> +{
> + int rc;
> +
> + rc = mpic_msi_init_allocator(mpic);
> + if (rc) {
> + pr_debug("htmsi: Error allocating bitmap!\n");
> + return rc;
> + }
> +
> + pr_debug("htmsi: Registering MPIC MSI callbacks.\n");
> +
> + BUG_ON(msi_mpic);
> + msi_mpic = mpic;
> +
> + ppc_md.setup_msi_irqs = htmsi_setup_msi_irqs;
> + ppc_md.teardown_msi_irqs = htmsi_teardown_msi_irqs;
> + ppc_md.msi_check_device = htmsi_msi_check_device;
Unlike the rtas patch, this one didn't advertise it was
going to set the arch hooks unconditionally.
milton
next prev parent reply other threads:[~2007-04-21 23:17 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-19 7:35 [PATCH 1/7] Rip out the existing powerpc msi stubs Michael Ellerman
2007-04-19 7:35 ` [PATCH 2/7] Powerpc MSI infrastructure Michael Ellerman
2007-04-21 23:15 ` Milton Miller
2007-04-23 4:28 ` Michael Ellerman
2007-04-19 7:35 ` [PATCH 3/7] RTAS MSI implementation Michael Ellerman
2007-04-19 7:35 ` [PATCH 4/7] Tell Phyp we support MSI Michael Ellerman
2007-04-19 7:35 ` [PATCH 5/7] Enable MSI mappings for MPIC Michael Ellerman
2007-04-21 23:16 ` Milton Miller
2007-04-22 0:06 ` Benjamin Herrenschmidt
2007-04-22 4:53 ` Milton Miller
2007-04-23 4:10 ` Michael Ellerman
2007-04-19 7:35 ` [PATCH 6/7] MPIC MSI allocator Michael Ellerman
2007-04-21 23:17 ` Milton Miller
2007-04-23 4:04 ` Michael Ellerman
2007-04-23 6:20 ` Milton Miller
2007-04-23 3:50 ` Olof Johansson
2007-04-23 3:53 ` Michael Ellerman
2007-04-24 1:29 ` Benjamin Herrenschmidt
2007-04-24 9:26 ` Segher Boessenkool
2007-04-24 9:39 ` Benjamin Herrenschmidt
2007-04-24 9:44 ` Segher Boessenkool
2007-04-24 9:51 ` Benjamin Herrenschmidt
2007-04-19 7:35 ` [PATCH 7/7] MPIC MSI backend Michael Ellerman
2007-04-20 8:40 ` Segher Boessenkool
2007-04-20 14:39 ` Michael Ellerman
2007-04-21 23:17 ` Milton Miller [this message]
2007-04-22 7:06 ` Segher Boessenkool
2007-04-22 19:30 ` Olof Johansson
2007-04-23 4:24 ` Michael Ellerman
2007-04-23 8:24 ` Segher Boessenkool
2007-04-23 8:31 ` Michael Ellerman
2007-04-23 17:33 ` Segher Boessenkool
2007-04-23 3:45 ` 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=e4520bd4be50f2884003a9421863627c@bga.com \
--to=miltonm@bga.com \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=linuxppc-dev@ozlabs.org \
--cc=michael@ellerman.id.au \
/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).