public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jesse.barnes@intel.com>
To: David Miller <davem@davemloft.net>
Cc: eiichiro.oiwa.nm@hitachi.com, alan@redhat.com, greg@kroah.com,
	linux-kernel@vger.kernel.org
Subject: Re: pci_fixup_video change blows up on sparc64
Date: Thu, 19 Oct 2006 15:58:05 -0700	[thread overview]
Message-ID: <200610191558.06473.jesse.barnes@intel.com> (raw)
In-Reply-To: <20061019.153814.59655968.davem@davemloft.net>

On Thursday, October 19, 2006 3:38 pm, David Miller wrote:
> > Right, I guess we should have been a bit more careful in making
> > this code generic.  At least ia64, i386 and x86_64 systems often
> > have video BIOSes in system memory at 0xc0000 (note that this isn't
> > in PCI space).
>
> Even if it is in system memory there, accessing physical RAM using
> ioremap() and asm/io.h accessors is not exactly legal.  On sparc64,
> for example, accessing physical RAM as if it were I/O memory will
> result in a BUS ERROR and in fact that's how the bootup crashes
> on sparc64 due to this changeset.

Good point, we shouldn't use ioremap for the system memory case at all.  
Should be __va or something I guess.

> Sparc64 systems do not reserve this area of physical ram for video
> ROM, and in fact it is very common and possible to have a system
> which there is not even physical RAM located at that physical
> address.
>
> The amount of platforms-specific assumptions made by this code is
> impressive, in fact :-)

No disagreement here...  people often make the mistake when looking at 
the PCI to PCI bridge spec that it also applies to host to PCI bridges.  
And having a video ROM at 0xc0000 is common, but certainly not 
universal.

> > It sounds like on your system the regular sysfs ROM mapping code
> > should be able to see the ROM, and this 0xc0000 mapping/copying
> > shouldn't be necessary.
>
> I'm pretty sure it should use the PCI ROM bar area, just like it
> always has until this change was installed.

Yeah, that's what sysfs will do by default, but this code is overriding 
it's default behavior because some host bridge bit is set, it appears.

> > Maybe we should conditionalize it, making it only available on
> > ia64, i386 and x86_64?  Then again, I think there are some embedded
> > platforms that could use this code too?
>
> This is what should happen, at the very least.

Sounds good to me, though I think we should also add the checks I 
mentioned in my other mail just to be extra robust (of course I don't 
have a system to test on, so I'm hoping Eiichiro can do it. :)

Jesse

  reply	other threads:[~2006-10-19 22:57 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     ` Re[2]: pci_fixup_video change blows up on sparc64 eiichiro.oiwa.nm
2006-10-19 11:20       ` 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 [this message]
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=200610191558.06473.jesse.barnes@intel.com \
    --to=jesse.barnes@intel.com \
    --cc=alan@redhat.com \
    --cc=davem@davemloft.net \
    --cc=eiichiro.oiwa.nm@hitachi.com \
    --cc=greg@kroah.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