linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Marc Leeman <marc.leeman@gmail.com>
To: Linux PPC Mailing List <linuxppc-dev@ozlabs.org>
Subject: Re: 2.4 -> 2.6: problem probing PCI
Date: Wed, 17 Nov 2004 16:51:53 +0100	[thread overview]
Message-ID: <1f729c48041117075151960f69@mail.gmail.com> (raw)
In-Reply-To: <1f729c480411110036445cd8aa@mail.gmail.com>

I am currently comparing the 2.6.9 (failing code) PCI DBG output with
the 2.4.28-rc1 (working code) DBG output:

2.6.9:
> PCI: Probing PCI hardware
> PCI: bridge rsrc 0..bfffff (100), parent c0172188
> PCI: reparented dma1 [0..1f] under PCI host bridge
> PCI: reparented pic1 [20..3f] under PCI host bridge
> PCI: reparented timer [40..5f] under PCI host bridge
> PCI: reparented dma page reg [80..8f] under PCI host bridge
> PCI: reparented pic2 [a0..bf] under PCI host bridge
> PCI: reparented dma2 [c0..df] under PCI host bridge
> PCI: bridge rsrc 80000000..fcffffff (200), parent c017216c
> PCI:0000:00:00.0: Resource 1: 00000000-00000fff (f=3D200)
> PCI: Cannot allocate resource region 1 of device 0000:00:00.0
> PCI:  parent is c01b6054: 80000000-fcffffff (f=3D200)
> PCI:0000:00:10.0: Resource 0: bffff000-bfffffff (f=3D200)
> PCI:0000:00:10.0: Resource 1: 00bfffc0-00bfffff (f=3D101)
> PCI:0000:00:10.0: Resource 2: bffc0000-bffdffff (f=3D200)
> PCI:0000:00:11.0: Resource 0: bffbf000-bffbffff (f=3D200)
> PCI:0000:00:11.0: Resource 1: 00bfff80-00bfffbf (f=3D101)
> PCI:0000:00:11.0: Resource 2: bff80000-bff9ffff (f=3D200)
> PCI:0000:00:12.0: Resource 0: bf800000-bfbfffff (f=3D1208)
> PCI:0000:00:12.0: Resource 1: bf000000-bf7fffff (f=3D200)
> PCI:0000:00:12.0: Resource 2: 00bfff70-00bfff7f (f=3D101)
> PCI:0000:00:13.0: Resource 0: 00bfff60-00bfff6f (f=3D101)
> PCI:0000:00:13.0: Resource 1: befffff0-beffffff (f=3D200)

2.4.28-rc1
PCI: Probing PCI hardware
PCI:00:00.0 Resource 1 [00000000-00000fff] is unassigned
Fixup res 1 (101) of dev 00:10.0: bfffc0 -> febfffc0
Fixup res 1 (101) of dev 00:11.0: bfff80 -> febfff80
Fixup res 2 (101) of dev 00:12.0: bfff70 -> febfff70
Fixup res 0 (101) of dev 00:13.0: bfff60 -> febfff60
PCI: bridge rsrc fe000000..febfffff (100), parent c012aee8
PCI: bridge rsrc 80000000..fcffffff (200), parent c012aecc
PCI:00:10.0: Resource 0: bffff000-bfffffff (f=3D200)
PCI:00:10.0: Resource 1: febfffc0-febfffff (f=3D101)
PCI:00:10.0: Resource 2: bffc0000-bffdffff (f=3D200)
PCI:00:11.0: Resource 0: bffbf000-bffbffff (f=3D200)
PCI:00:11.0: Resource 1: febfff80-febfffbf (f=3D101)
PCI:00:11.0: Resource 2: bff80000-bff9ffff (f=3D200)
PCI:00:12.0: Resource 0: bf800000-bfbfffff (f=3D1208)
PCI:00:12.0: Resource 1: bf000000-bf7fffff (f=3D200)
PCI:00:12.0: Resource 2: febfff70-febfff7f (f=3D101)
PCI:00:13.0: Resource 0: febfff60-febfff6f (f=3D101)
PCI:00:13.0: Resource 1: befffff0-beffffff (f=3D200)

The first important difference is that a number of fixups are no
longer performed in the 2.6.9 kernel; which account for the
differences in the PCI address ranges.

The problem seems to be in=20
arch/ppc/kernel/pci.c

When comparing (but not yet fixed), some minor changes have been made:

line 16 changed from
   if (!res->start || res->end =3D=3D 0xffffffff) {
to
   if (res->end =3D=3D 0xffffffff) {

which disables the flow to enter the body in this case.

another relevant piece of code that gets me into troubles is the
computation of the offset
                } else if (res->flags & IORESOURCE_IO) {
                        offset =3D (unsigned long) hose->io_base_virt;
                                - isa_io_base;
                }

both values are equal to 0xfe000000, giving a final offset of 0 and no
adjustment.

I tried commenting out 'isa_io_base' but this gets me in resource
allocation conflicts later on (even though I get the ranges identical
to the ones in the 2.4.28 kernel).

Anyway, insights are welcome, I'm still investigating...

--=20
ash nazg durbatul=FBk, ash nazg gimbatul,
ash nazg thrakatul=FBk agh burzum-ishi krimpatul

  reply	other threads:[~2004-11-17 15:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-11  8:36 2.4 -> 2.6: problem probing PCI Marc Leeman
2004-11-17 15:51 ` Marc Leeman [this message]
2004-11-18 13:28   ` Marc Leeman

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=1f729c48041117075151960f69@mail.gmail.com \
    --to=marc.leeman@gmail.com \
    --cc=linuxppc-dev@ozlabs.org \
    /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).