linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Greg KH <greg@kroah.com>,
	helgehaf@aitel.hist.no
Subject: Re: Ignore disabled ROM resources at setup
Date: Mon, 29 Aug 2005 21:09:24 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0508292056530.3243@g5.osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0508292045590.3243@g5.osdl.org>



On Mon, 29 Aug 2005, Linus Torvalds wrote:
> 
> What you want is a "zombie state", where we write the partial information 
> to hardware. It's what we used to do, but it's certainly no more logical 
> than what it does now, and it led to problem reports.

Btw, the fundamental reason for the change is that x86 used to not ever 
touch any ROM resources _at_all_ by default, unless you used the "pci=rom" 
kernel command line switch.

But that got changed, and in an effort to make x86 more like all the other
architectures, it now uses the generic setup-bus stuff (which used to be
"generic, but not x86", since the BIOS tends to set up all PCI buses on
PC's) that probes all resources (including rom resources) to see how big
they are etc.

That meant that suddenly the ROM resources _did_ get sized up and written,
even if they didn't actually get enabled. So on an x86, 2.6.12 would never
touch the ROM resource at all, while for a while in 2.6.13-rc it would
write it with a disabled value by default.

And that's the thing that broke. 

So 2.6.13 is being "safe". It allocates the space for the ROM in the
resource tables, but it neither enables it nor does it write the
(disabled) address out to the device, since both of those actions have
been shown to break on PC's. And sadly (or happily, depends on your
viewpoint), PC's have a _much_ wider range of hardware, so they are the
ones we have to work around.

So yes, behaviour changed, but it changed exactly because not changing it 
leads to problems. So what you will find is that /sbin/lspci actually 
understands this situation:

	01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility M7 LW [Radeon Mobility 7500] (prog-if 00 [VGA])
		...
	        [virtual] Expansion ROM at 90220000 [disabled] [size=128K]
		...
	30: 00 00 00 00 58 00 00 00 00 00 00 00 0a 01 08 00

Notice how the hardware ROM base at 0x30 is set to "00 00 00 00", but 
because the resource allocation has been made and the resource shows up in 
/sys, lspci shows the disabled allocation correctly. That's really how any 
kernel user will need to understand it too: the allocation exists, but 
since it's not enabled, the hardware hasn't been told.

			Linus

  reply	other threads:[~2005-08-30  4:11 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200508261859.j7QIxT0I016917@hera.kernel.org>
2005-08-30  2:38 ` Ignore disabled ROM resources at setup Benjamin Herrenschmidt
2005-08-30  3:15   ` Linus Torvalds
2005-08-30  4:47     ` Jon Smirl
2005-08-30  3:19   ` Benjamin Herrenschmidt
2005-08-30  3:52     ` Linus Torvalds
2005-08-30  4:09       ` Linus Torvalds [this message]
2005-08-30  4:20         ` David S. Miller
2005-08-30  4:37           ` Benjamin Herrenschmidt
2005-08-30  4:40           ` Linus Torvalds
2005-08-30  4:49             ` Benjamin Herrenschmidt
2005-08-30  5:29               ` Linus Torvalds
2005-08-30  6:46                 ` Benjamin Herrenschmidt
2005-08-31  4:16                 ` Benjamin Herrenschmidt
2005-08-30  4:51             ` Jon Smirl
2005-08-30  4:54               ` Benjamin Herrenschmidt
2005-08-30  5:15               ` Linus Torvalds
2005-08-30 14:39                 ` Alan Cox
2005-08-30 15:29                 ` Petr Vandrovec
2005-08-30  4:33       ` Benjamin Herrenschmidt
2005-08-30  5:03         ` Linus Torvalds
2005-08-30  6:40           ` Benjamin Herrenschmidt
2005-08-30  4:35   ` Jon Smirl
2005-08-30  5:32     ` David S. Miller
2005-08-30  6:43       ` Benjamin Herrenschmidt

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=Pine.LNX.4.58.0508292056530.3243@g5.osdl.org \
    --to=torvalds@osdl.org \
    --cc=benh@kernel.crashing.org \
    --cc=greg@kroah.com \
    --cc=helgehaf@aitel.hist.no \
    --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;
as well as URLs for NNTP newsgroup(s).