From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Grant Grundler <iod00d@hp.com>
Cc: Linus Torvalds <torvalds@osdl.org>, Greg KH <gregkh@suse.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
openib-general@openib.org, linville@tuxdriver.com,
yhlu <yhlu.kernel@gmail.com>
Subject: Re: [openib-general] Re: mthca and LinuxBIOS
Date: Sun, 7 Aug 2005 13:49:59 +0400 [thread overview]
Message-ID: <20050807134959.A3847@jurassic.park.msu.ru> (raw)
In-Reply-To: <20050806043354.GA27352@esmail.cup.hp.com>; from iod00d@hp.com on Fri, Aug 05, 2005 at 09:33:54PM -0700
On Fri, Aug 05, 2005 at 09:33:54PM -0700, Grant Grundler wrote:
> > ISTR making comments before about the offending patch on linux-pci mailing
> > list. Is this the same patch that assumes pci_dev->resource[i] == BAR[i] ?
>
> I meant the patch assume 1:1 for pci_dev->resource[i] and BAR[i].
> not that the two are equivalent.
This is correct assumption. For 64-bit BAR[i] only pci_dev->resource[i] is
valid, pci_dev->resource[i+1] slot is unused and contains zeroes in all
fields. So all we need is just to check that we're going to update a _valid_
resource.
[Though, if we ever want to support >4Gb bus allocations on 32-bit
architectures we need to make resource start and end fields u64.]
Ivan.
--- 2.6.13-rc5-git4/drivers/pci/setup-res.c Sun Aug 7 12:08:23 2005
+++ linux/drivers/pci/setup-res.c Sun Aug 7 13:27:54 2005
@@ -33,6 +33,11 @@ pci_update_resource(struct pci_dev *dev,
u32 new, check, mask;
int reg;
+ /* Ignore resources for unimplemented BARs and unused resource slots
+ for 64 bit BARs. */
+ if (!res->flags)
+ return;
+
pcibios_resource_to_bus(dev, ®ion, res);
pr_debug(" got res [%lx:%lx] bus [%lx:%lx] flags %lx for "
@@ -67,7 +72,7 @@ pci_update_resource(struct pci_dev *dev,
if ((new & (PCI_BASE_ADDRESS_SPACE|PCI_BASE_ADDRESS_MEM_TYPE_MASK)) ==
(PCI_BASE_ADDRESS_SPACE_MEMORY|PCI_BASE_ADDRESS_MEM_TYPE_64)) {
- new = 0; /* currently everyone zeros the high address */
+ new = region.start >> 32;
pci_write_config_dword(dev, reg + 4, new);
pci_read_config_dword(dev, reg + 4, &check);
if (check != new) {
next prev parent reply other threads:[~2005-08-07 9:50 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-28 20:31 [PATCH 0/2] REALLY final InfiniBand updates for 2.6.13 Roland Dreier
2005-07-28 20:31 ` [PATCH 1/2] [IB/cm]: Correct CM port redirect reject codes Roland Dreier
2005-07-28 20:31 ` [PATCH 2/2] [IPoIB] Handle sending of unicast RARP responses Roland Dreier
2005-08-04 0:58 ` [PATCH 1/2] [IB/cm]: Correct CM port redirect reject codes yhlu
2005-08-04 1:39 ` [openib-general] " Grant Grundler
2005-08-04 4:44 ` mthca and LinuxBIOS (was: [PATCH 1/2] [IB/cm]: Correct CM port redirect reject codes) Roland Dreier
2005-08-04 16:33 ` yhlu
2005-08-04 16:36 ` mthca and LinuxBIOS Roland Dreier
2005-08-04 17:23 ` yhlu
2005-08-04 18:01 ` yhlu
2005-08-04 18:35 ` Roland Dreier
2005-08-04 19:30 ` yhlu
2005-08-05 3:47 ` Roland Dreier
2005-08-05 18:03 ` yhlu
2005-08-05 18:07 ` yhlu
2005-08-05 18:13 ` Roland Dreier
2005-08-05 18:26 ` yhlu
2005-08-05 19:25 ` yhlu
2005-08-05 19:45 ` yhlu
2005-08-05 20:28 ` yhlu
2005-08-05 20:38 ` Linus Torvalds
2005-08-05 22:00 ` Greg KH
2005-08-05 22:25 ` yhlu
2005-08-05 23:03 ` Greg KH
2005-08-06 5:29 ` [openib-general] " Grant Grundler
2005-08-05 23:06 ` Linus Torvalds
2005-08-05 23:59 ` [openib-general] " Grant Grundler
2005-08-06 4:33 ` Grant Grundler
2005-08-06 23:52 ` yhlu
2005-08-07 9:49 ` Ivan Kokshaysky [this message]
2005-08-05 18:11 ` Roland Dreier
2005-08-06 0:57 ` yhlu
2005-08-06 1:30 ` Roland Dreier
2005-08-06 2:47 ` yhlu
2005-08-04 6:42 ` [PATCH 1/2] [IB/cm]: Correct CM port redirect reject codes Michael S. Tsirkin
2005-08-04 18:22 ` yhlu
2005-08-08 12:21 ` Michael S. Tsirkin
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=20050807134959.A3847@jurassic.park.msu.ru \
--to=ink@jurassic.park.msu.ru \
--cc=gregkh@suse.de \
--cc=iod00d@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=openib-general@openib.org \
--cc=torvalds@osdl.org \
--cc=yhlu.kernel@gmail.com \
/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®