public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: <eiichiro.oiwa.nm@hitachi.com>
To: "David Miller" <davem@davemloft.net>
Cc: <alan@redhat.com>, <jesse.barnes@intel.com>, <greg@kroah.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re[2]: pci_fixup_video change blows up on sparc64
Date: Thu, 19 Oct 2006 19:01:06 +0900	[thread overview]
Message-ID: <XNM1$9$0$4$$3$3$7$A$9002706U45374cd7@hitachi.com> (raw)
In-Reply-To: 20061019.013732.30184567.davem@davemloft.net

>> If an expansion ROM exists on ATI Radeon or ATY128 card, pci_map_rom returns
>> the expansion ROM base address instead of 0xC0000 because fixup_video checks
>> the VGA Enable bit in the Bridge Control register.
>
>It is not valid to expect the bridge control register to return
>anything meaningful on PCI "host bridge".  The Radeon card here sits
>on the root, just under the PCI Host Controller.  The code in
>fixup_video appears to assume that every bus up to the root from
>the VGA device is a PCI-PCI bridge, which is not a valid assumption.
>There can be a PCI host bridge at the root.

Have you ever read the PCI-to-PCI Bridge Architecture Specification?
The default of VGA Enable bit is 0. This mean video ROM doesn't forward
system RAM at 0xC0000. 

There is your VGA card under 0001:00:00.0 Host bridge. The VGA Enable bit
in this host bridge will return 0 and IORESOURCE_ROM_SHADOW won't set.

>Also, and more importantly, you cannot use the 0xc0000 address in a
>raw way like this.  There are multiple PCI domains possible in a
>given system, and the 0xc0000 address you wish to use must be relative
>to that PCI domain.
>
>Therefore, in the presence of multiple PCI domains:
>
>	x = ioremap(0xc0000, ...);
>
>doesn't make any sense, is extremely non-portable, and will crash
>on many non-x86 systems.

It's impossible that multiple VGA cards, which have not the expansion
ROM, exist in a system regardless of multiple PCI domain system.

>All of this pci_fixup_video code was perfectly fine when it was only
>used on x86, where assumptions like this happened to work, but it is
>not possible to continue making these assumptions if this code will
>now run on every single architecture.

pci_fixup_video is also perfectly fine on IA64. And VGA is historical
device of x86 platform.

  parent reply	other threads:[~2006-10-19 10:01 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-19  6:31 pci_fixup_video change blows up on sparc64 David Miller
2006-10-19  7:54 ` eiichiro.oiwa.nm
2006-10-19  8:37   ` pci_fixup_video " David Miller
2006-10-19  9:22     ` Alan Cox
2006-10-19  9:25       ` David Miller
2006-10-19 10:49         ` eiichiro.oiwa.nm
2006-10-19 22:32           ` David Miller
2006-10-20  2:41             ` Greg KH
2006-10-20  3:21               ` eiichiro.oiwa.nm
2006-10-20  4:03                 ` Greg KH
2006-10-20  4:28                   ` eiichiro.oiwa.nm
2006-10-20 14:20                   ` eiichiro.oiwa.nm
2006-10-20 19:31                     ` David Miller
2006-10-23  6:14                       ` eiichiro.oiwa.nm
2006-10-23  8:53                         ` David Miller
2006-10-23 18:39                           ` Greg KH
2006-10-23 21:02                             ` David Miller
2006-10-27 18:05                         ` patch pci-fix-pci_fixup_video-as-it-blows-up-on-sparc64.patch added to gregkh-2.6 tree gregkh
2006-10-19 10:01     ` eiichiro.oiwa.nm [this message]
2006-10-19 11:20       ` Re[2]: pci_fixup_video change blows up on sparc64 Alan Cox
2006-10-19 11:38         ` eiichiro.oiwa.nm
2006-10-19 18:03       ` Jesse Barnes
2006-10-19 22:58         ` David Miller
2006-10-20  2:57           ` eiichiro.oiwa.nm
2006-10-20  3:21             ` David Miller
2006-10-20  4:25               ` Re[2]: " eiichiro.oiwa.nm
2006-10-19 16:52     ` Jesse Barnes
2006-10-19 22:38       ` David Miller
2006-10-19 22:58         ` Jesse Barnes
2006-10-19 23:17           ` David Miller

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='XNM1$9$0$4$$3$3$7$A$9002706U45374cd7@hitachi.com' \
    --to=eiichiro.oiwa.nm@hitachi.com \
    --cc=alan@redhat.com \
    --cc=davem@davemloft.net \
    --cc=greg@kroah.com \
    --cc=jesse.barnes@intel.com \
    --cc=linux-kernel@vger.kernel.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