From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Olof Johansson <olof@lixom.net>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 4/15] [POWERPC] pci32: Add flags modifying the PCI code behaviour
Date: Fri, 14 Dec 2007 20:00:43 +1100 [thread overview]
Message-ID: <1197622843.6818.1.camel@pasglop> (raw)
In-Reply-To: <20071214084343.GC28118@lixom.net>
> On Fri, Dec 14, 2007 at 03:56:05PM +1100, Benjamin Herrenschmidt wrote:
>
> > --- linux-merge.orig/arch/powerpc/kernel/pci_32.c 2007-12-14 15:49:28.000000000 +1100
> > +++ linux-merge/arch/powerpc/kernel/pci_32.c 2007-12-14 15:49:29.000000000 +1100
> > @@ -48,7 +51,7 @@ static u8* pci_to_OF_bus_map;
> > /* By default, we don't re-assign bus numbers. We do this only on
> > * some pmacs
> > */
> > -int pci_assign_all_buses;
> > +static int pci_assign_all_buses;
> >
>
> Why not remove it alltogether, there's still the function to test the
> flag that's just as cheap (load + test + branch).
I don't remember... felt like I had a good reason back then but I don't
remember it :-) I'll have another look.
> > Index: linux-merge/include/asm-powerpc/pci-bridge.h
> > ===================================================================
> > --- linux-merge.orig/include/asm-powerpc/pci-bridge.h 2007-12-14 15:49:01.000000000 +1100
> > +++ linux-merge/include/asm-powerpc/pci-bridge.h 2007-12-14 15:49:29.000000000 +1100
> > @@ -13,6 +13,26 @@
> >
> > struct device_node;
> >
> > +extern unsigned int ppc_pci_flags;
>
> Should the below be a named enum and the type for the above be the same
> for nicer decode in gdb?
>
> > +enum {
> > + /* Force re-assigning all resources (ignore firmware
> > + * setup completely)
> > + */
> > + PPC_PCI_REASSIGN_ALL_RSRC = 0x00000001,
>
> This should be ..._RSRCS (resources, not resource)
>
> > + /* Re-assign all bus numbers */
> > + PPC_PCI_REASSIGN_ALL_BUS = 0x00000002,
>
> And this should be ..._BUSSES
>
> > + /* Do not try to assign, just use existing setup */
> > + PPC_PCI_PROBE_ONLY = 0x00000004,
>
> My first reaction was "what's the difference between setting this and
> keeping the two other cleared". Looks like the difference is the
> assignment of unassigned resources. Not sure how to better represent
> that so it's obvious from the naming (without doing something as
> excessive as PPC_PCI_REASSIGN_UNASSIGNED_RSRCS :)
Well... hence "RE" in "REASSIGN" ...
By default, we assign only unassigned resources... (or the ones that
collide). I could add a comment to that effect.
> > +
> > + /* Don't bother with ISA alignment unless the bridge has
> > + * ISA forwarding enabled
> > + */
> > + PPC_PCI_CAN_SKIP_ISA_ALIGN = 0x00000008,
> > +};
Ben.
next prev parent reply other threads:[~2007-12-14 9:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-14 4:56 [PATCH 0/15] [POWERPC] PCI updates & merges Benjamin Herrenschmidt
2007-12-14 4:56 ` [PATCH 1/15] [POWERPC] pci32: remove bogus alignment message Benjamin Herrenschmidt
2007-12-14 4:56 ` [PATCH 3/15] [POWERPC] pci32: Remove PowerMac P2P bridge IO hack Benjamin Herrenschmidt
2007-12-14 4:56 ` [PATCH 2/15] [POWERPC] pci32: use generic pci_assign_unassign_resources Benjamin Herrenschmidt
2007-12-14 4:56 ` [PATCH 4/15] [POWERPC] pci32: Add flags modifying the PCI code behaviour Benjamin Herrenschmidt
2007-12-14 8:43 ` Olof Johansson
2007-12-14 9:00 ` Benjamin Herrenschmidt [this message]
2007-12-14 4:56 ` [PATCH 5/15] [POWERPC] pci32: Remove obsolete PowerMac bus number hack Benjamin Herrenschmidt
2007-12-14 4:56 ` [PATCH 6/15] [POWERPC] pci32: Add platform option to enable /proc PCI domains Benjamin Herrenschmidt
2007-12-14 4:56 ` [PATCH 8/15] [POWERPC] Merge PCI resource fixups Benjamin Herrenschmidt
2007-12-14 4:56 ` [PATCH 7/15] [POWERPC] Merge pcibios_resource_to_bus/bus_to_resource Benjamin Herrenschmidt
2007-12-14 4:56 ` [PATCH 9/15] [POWERPC] Merge PCI resource allocation & assignment Benjamin Herrenschmidt
2007-12-14 4:56 ` [PATCH 10/15] [POWERPC] fix iSeries PCI resource management Benjamin Herrenschmidt
2007-12-14 4:56 ` [PATCH 11/15] [POWERPC] Updates/fixes to 32 bits pcibios_enable_device() Benjamin Herrenschmidt
2007-12-14 4:56 ` [PATCH 12/15] [POWERPC] Merge 32 and 64 bits pcibios_enable_device Benjamin Herrenschmidt
2007-12-14 4:56 ` [PATCH 13/15] [POWERPC] Fixup powermac enable device hook Benjamin Herrenschmidt
2007-12-14 4:56 ` [PATCH 14/15] [POWERPC] Clear pci_probe_only on 64 bits PowerMac Benjamin Herrenschmidt
2007-12-14 4:56 ` [PATCH 15/15] [POWERPC] Various fixes to pcibios_enable_device() Benjamin Herrenschmidt
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=1197622843.6818.1.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=olof@lixom.net \
/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).