public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
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 5/7] Enable MSI mappings for MPIC
Date: Sat, 21 Apr 2007 18:16:55 -0500	[thread overview]
Message-ID: <0846c0d8efafe7258075826b9c869fea@bga.com> (raw)
In-Reply-To: <20070419073555.01990DDECB@ozlabs.org>

On Apr 19, 2007, Michael Ellerman wrote:
> On some Apple machines the HT MSI mappings are not enabled by 
> firmware, so
> we need to do it by hand.
>

> +#ifdef CONFIG_PCI_MSI
> +static void __init mpic_scan_ht_msi(struct mpic *mpic, u8 __iomem 
> *devbase,
> +				    unsigned int devfn)
> +{
> +	u8 __iomem *base;
> +	u8 pos, flags;
> +	u64 addr = 0;
> +
> +	for (pos = readb(devbase + PCI_CAPABILITY_LIST); pos != 0;
> +	     pos = readb(devbase + pos + PCI_CAP_LIST_NEXT)) {
> +		u8 id = readb(devbase + pos + PCI_CAP_LIST_ID);
> +		if (id == PCI_CAP_ID_HT) {
> +			id = readb(devbase + pos + 3);
> +			if ((id & HT_5BIT_CAP_MASK) == HT_CAPTYPE_MSI_MAPPING)
>

This is just begging to be written in terms of 
pci_bus_find_ht_capability.  Well,
we have pci_bus_find_capability, and pci_find_ht_capability, I'm sure 
we could
create that.   It also means this and the other nearby functions want 
to be
written in terms of a struct pci_bus and config accessors.

milton

  reply	other threads:[~2007-04-21 23:17 UTC|newest]

Thread overview: 34+ 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 [this message]
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
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
  -- strict thread matches above, loose matches on Subject: below --
2007-05-08  2:58 [PATCH 1/7] Rip out the existing powerpc msi stubs Michael Ellerman
2007-05-08  2:58 ` [PATCH 5/7] Enable MSI mappings for MPIC 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=0846c0d8efafe7258075826b9c869fea@bga.com \
    --to=miltonm@bga$(echo .)com \
    --cc=linux-pci@atrey$(echo .)karlin.mff.cuni.cz \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=michael@ellerman$(echo .)id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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