Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Jun Sun <jsun@mvista.com>
To: "Gleb O. Raiko" <raiko@niisi.msk.ru>
Cc: "linux-mips@oss.sgi.com" <linux-mips@oss.sgi.com>
Subject: Re: arch/mips/pci* stuff
Date: Wed, 19 Sep 2001 11:00:57 -0700	[thread overview]
Message-ID: <3BA8DD59.C780FE46@mvista.com> (raw)
In-Reply-To: 3BA855FF.1CCD4F9@niisi.msk.ru

"Gleb O. Raiko" wrote:
> 
> Jun Sun wrote:
> > > You may control pci_scan_bridge by pcibios_assign_all_busses, just
> > > return 0 from the latter and the code in pci_scan_bridge assigns all
> > > numbers itself.
> >
> > Do you mean that we call pci_scan_brige first before scaning other devices?
> >
> 
> Yes I do. Look at drivers/pci/pci.c. The code does
> 
> for each bus (by recursion)
>         scan devices on this bus
>         for each bridge on this bus
>                 scan bridge
>                 scan bus behind bridge
> 
> The flow is pci_do_scan_bus -> pci_scan_bridge -> pci_do_scan_bus
> 
> > > You definitely can't mix device discovering and assignment of resources
> > > in one pass a on a multi-board cPCI system.
> > >
> >
> > I have not given enough thought on 3), but it is certainly desirable.
> 
> Well, your previous example works here. You perform scanning of devices
> and assignments in one pass. You find new device unassigned by
> firmware/another CPU in cPCI system, then you need find a room in a PCI
> space. You can't do that, because you don't know yet what rooms
> firmware/another CPU has allocated, so you don't know what rooms are
> free.
> 

You can if you throw away all the previous assignement done by BIOS, like
pci_auto.c approach.

> > Like I said before, this is the old style of doing things.  There are many
> > drawbacks in this approach.  Among them, one is to require lots of knowledge
> > about PCI and how the following hookup functions are called.  Not every
> > porting engineer is willing to dive into that.  There are some other problems
> > too.
> 
> Sorry, your reason doesn't convince me. I believe, a porting engineer
> must know hardware and operating system internals very well irrespective
> of what his wishes are.
> 
> Could you explain other problems, please ?

I am not actively working on PCI right now.  A couple of problems I remembered
are related to the fixup mechnisms.  If you rely on BIOS assignment, than you
cannot do fixup on a per-PCI-device basis, then you have to do fixup based on
per-device/BIOS-combo basis.

I think a couple of days ago, there was a question about the restriction of
PCI memory space being the same as CPU physical address space.  Using pci_auto
allows you to control the PCI memory region you use and deal with the
restriction more easily.

BTW, your objection seems to stem from the objection against pci_auto.  But so
far I have not seen any good reasons for not using pci_auto.  Did I miss
anything?  If pci_auto does make porting easier, is there any good reason to
go to a more difficult route?

If you compare code size, PCI auto is much much smaller than the
pci_assign_unassigned_resources().  I really don't understand what is the
complain here.

Jun

      reply	other threads:[~2001-09-19 18:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-24  9:55 arch/mips/pci* stuff Gleb O. Raiko
2001-08-24 13:33 ` Ralf Baechle
2001-08-24 16:13 ` Pete Popov
2001-08-24 17:57 ` Jun Sun
2001-08-24 18:20   ` Ralf Baechle
2001-08-28 11:22   ` Gleb O. Raiko
2001-09-11 19:19     ` Jun Sun
2001-09-17 11:21       ` Gleb O. Raiko
2001-09-17 22:37         ` Jun Sun
2001-09-19  8:23           ` Gleb O. Raiko
2001-09-19 18:00             ` Jun Sun [this message]

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=3BA8DD59.C780FE46@mvista.com \
    --to=jsun@mvista.com \
    --cc=linux-mips@oss.sgi.com \
    --cc=raiko@niisi.msk.ru \
    /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