mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Rose <johnrose@austin.ibm.com>
To: ink@jurassic.park.msu.ru
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: pci_size() error condition
Date: Wed, 13 Jul 2005 17:53:13 -0500	[thread overview]
Message-ID: <1121295192.23038.15.camel@sinatra.austin.ibm.com> (raw)

Can anyone lend an explanation of the following?

	/* base == maxbase can be valid only if the BAR has
	   already been programmed with all 1s.  */
	if (base == maxbase && ((base | size) & mask) != mask) {
		printk("%s: 2 returning 0\n", __FUNCTION__);
		return 0;
	}

Before a recent change, mask was a 64-bit number.  The second part of
the if statement would always resolve to true, since the 32-bit bitop
would never equal the 64-bit mask.  So the second part of the if
statement was ineffectual up until very recently.

After the recent change, this is no longer the case.  Nonzero PCI sizes
are generating bogus resource records for some PPC64 devices.  So for
cases of base == maxbase, why would we ever want to return a nonzero
value?  What is the intended purpose of the second part of that
conditional?

Thanks-
John


             reply	other threads:[~2005-07-13 23:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-13 22:53 John Rose [this message]
2005-07-13 23:40 ` Ivan Kokshaysky
2005-07-14 16:04   ` John Rose
2005-07-14 22:33     ` Ivan Kokshaysky

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=1121295192.23038.15.camel@sinatra.austin.ibm.com \
    --to=johnrose@austin.ibm.com \
    --cc=ink@jurassic.park.msu.ru \
    --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

all inboxes | Powered by JetHome®