All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Sven Luther <sven.luther@wanadoo.fr>
Cc: linuxppc-dev list <linuxppc-dev@lists.linuxppc.org>
Subject: Re: multiple separate pci bridges ...
Date: Fri, 02 Jan 2004 18:49:56 +1100	[thread overview]
Message-ID: <1073029796.1501.228.camel@gaston> (raw)
In-Reply-To: <20040102074049.GA2032@iliana>


> There is some extra magic that needs to be done. In particular
> interrupts need to be disabled before being able to write to the config
> space of the agp bridge.

That can be completely local to the config ops. of that pci_controller
instance.

> > What do you mean ? config ops ? You can have different ops per host,
> > again, look at what pmac_pci.c does
>
> Yep, that i did already. And that is what i did, i used the indirect pci
> ops for the first bus, but specialized stuff for the second bus, due to
> the above mentioned stuff.

Good.

> Mmm, since these are two CPU<->PCI bridges, i don't care about that,
> right. PCI<->PCI bridges are ones which stand behind a PCI<->PCI bridge,
> right ?

No, no, ... PCI<->PCI bridges can happen still... some PCI cards can
have one on-board for example.

> > You trigger the proper renumbering code by setting pci_assign_all_busses
> > to 1.
>
> Ok. This must have been the magic bit i was searching for.

Probably :)

> > So basically, what we do is, we keep a "next_busno" variable which is
> > 0 at first. When probing a host, we assign it that bus number (0 for
> > the first host typically). Then, we call pci_scan_bus(). This one will
> > do the renumbering for P2P bridges when pci_assign_all_busses is true.
> > It will also tell us what was the "last" bus number found on the host.
> > We use that+1 to get the new next_busno and start again for the next
> > host.
>
> Ok. Need to look again though to find the place where the arch specific
> place is to modify this. As i remember, pci_scan_bus is called from
> drivers/pci/pci.c, and i shouldn't need to modify this.

No, look what I do when setting up uninorth in pmac_pci.c

> > On your side, you don't have much else to do that set
> > pci_assign_all_busses to 1, and create 2 pci_controller structures with
> > different config cycle ops.
>
> Yep. I guess the pci_assign_all_busses can be set in chrp_find_bridges,
> in the pegasos2 special case. The rest i have already handled.

Yes.

> > Note that in 2.4, there is a small risk when doing bus renumbering with
> > PCI-PCI bridges that you can get temporarily overlapping bus numbers
> > during the probe, thus screwing it up. this typically happens on
>
> Not a problem in this case though, right ? There is only one bus for
> each controller, and the controller are sitting directly after the CPU.

And ? You can still have P2P bridges sitting on one of your PCI busses.

> > Xserves. The problem is when scanning a given segment with P2P bridges,
> > when old & new numbers overlap, a not-yet scanned bridge may be set to
> > the same number as one we are currently scanning after having renumbered
>
> Ok, do we need to detect this, or will it just fail or something ?

It will do random crap on PCI probe

> > it, thus screwing things up. I think 2.6 is protected against this
> > problem. For 2.4, what I do is hack to force a 0x10 bus number offset
> > between hosts.
>
> Mmm. Will look into that.
>
> Anyway, i will not be able to implement it until sunday at the earliest.
>
> Friendly,
>
> Sven Luther
--
Benjamin Herrenschmidt <benh@kernel.crashing.org>

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2004-01-02  7:49 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-01 18:11 multiple separate pci bridges Sven Luther
2004-01-02  4:03 ` Benjamin Herrenschmidt
2004-01-02  7:40   ` Sven Luther
2004-01-02  7:49     ` Benjamin Herrenschmidt [this message]
2004-01-04 21:03       ` Sven Luther
2004-01-04 21:45         ` Benjamin Herrenschmidt
2004-01-04 22:06           ` Sven Luther
2004-01-05 16:40             ` Sven Luther
2004-01-05 21:28               ` Benjamin Herrenschmidt
2004-01-05 21:42                 ` Sven Luther
2004-01-05 22:12                   ` Benjamin Herrenschmidt
2004-01-06  7:39                     ` Sven Luther
2004-01-06  8:00                       ` Benjamin Herrenschmidt
2004-01-06  8:11                         ` Sven Luther
2004-01-06 14:40                           ` Geert Uytterhoeven
2004-01-06 14:45                             ` Sven Luther
2004-01-06 15:33                               ` Rob Baxter
2004-01-06 17:44                                 ` Sven Luther
2004-01-06 21:37                                 ` Benjamin Herrenschmidt
2004-01-06 22:10                                   ` Marcus Barrow
2004-01-06 22:17                                   ` Rob Baxter
2004-01-06 22:31                                     ` Benjamin Herrenschmidt
2004-01-07  2:35                                   ` Sven Luther
2004-01-07  2:36                                     ` Benjamin Herrenschmidt
2004-01-07  2:40                                       ` Sven Luther
2004-01-07  9:02                                   ` Michael Schmitz
2004-01-07  9:23                                     ` Benjamin Herrenschmidt
2004-01-07  9:56                                       ` Sven Luther
2004-01-07 10:27                                       ` Michael Schmitz
2004-01-13  9:56                                   ` Sven Luther
2004-01-13 10:26                                     ` Sven Luther
2004-01-18 12:15                             ` Sven Luther
2004-01-18 13:00                               ` Michel Dänzer
2004-01-18 13:14                                 ` Sven Luther
2004-01-19  9:12                                   ` Benjamin Herrenschmidt
2004-01-18 22:27                                     ` Sven Luther
2004-01-18 22:59                                       ` Benjamin Herrenschmidt
2004-01-19  9:21                                         ` Sven Luther
2004-01-18 23:24                               ` Benjamin Herrenschmidt
2004-01-05 21:38               ` Marcus Barrow
2004-01-06  7:14                 ` Sven Luther
2004-01-06  7:56                   ` Benjamin Herrenschmidt
2004-01-06  8:20                     ` Sven Luther
2004-01-02 18:34     ` Geert Uytterhoeven
2004-01-02 15:18 ` Rob Baxter
2004-01-02 23:56   ` Benjamin Herrenschmidt
2004-01-03  0:27     ` Rob Baxter
2004-01-03  1:12       ` Benjamin Herrenschmidt
2004-01-05  0:52         ` Rob Baxter
2004-01-05  2:13           ` Benjamin Herrenschmidt
2004-01-06 20:53 Marcus Barrow
2004-01-06 21:09 Marcus Barrow
2004-01-06 22:59 ` Benjamin Herrenschmidt
2004-01-06 23:00 ` Benjamin Herrenschmidt
2004-01-18 14:44 Sven Luther
2004-01-18 16:33 ` Michel Dänzer
2004-01-18 17:28   ` Sven Luther
2004-01-18 18:24     ` Michel Dänzer
2004-01-18 22:20       ` Sven Luther
2004-01-18 23:33         ` Michel Dänzer
2004-01-19  9:55           ` Sven Luther
2004-01-19 13:48   ` Sven Luther
2004-01-19 13:54     ` Geert Uytterhoeven
2004-01-19 14:00       ` Sven Luther
2004-01-19 14:02     ` Michel Dänzer
2004-01-19 14:16       ` Sven Luther
2004-01-19 14:31         ` Michel Dänzer
2004-01-19  9:11 ` Benjamin Herrenschmidt
2004-01-18 22:33   ` Sven Luther
2004-01-18 23:23   ` Michel Dänzer
2004-01-18 23:42     ` Benjamin Herrenschmidt
2004-01-19  0:03       ` Michel Dänzer
2004-01-19 10:08   ` Geert Uytterhoeven
2004-01-19 11:41     ` Benjamin Herrenschmidt
2004-01-19 12:03       ` Sven Luther
2004-01-19 21:35         ` Benjamin Herrenschmidt
2004-01-19 22:08           ` Sven Luther

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=1073029796.1501.228.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=sven.luther@wanadoo.fr \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.