From: Bjorn Helgaas <bhelgaas@google.com>
To: linux-pci@vger.kernel.org, Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: David Airlie <airlied@linux.ie>, Yinghai Lu <yinghai@kernel.org>,
Guo Chao <yan@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 00/15] PCI: Allocate 64-bit BARs above 4G when possible
Date: Fri, 10 Jan 2014 14:34:02 -0700 [thread overview]
Message-ID: <20140110213402.GB25635@google.com> (raw)
In-Reply-To: <20140107005003.10786.85164.stgit@bhelgaas-glaptop.roam.corp.google.com>
On Mon, Jan 06, 2014 at 05:55:12PM -0700, Bjorn Helgaas wrote:
> This is basically v7 of Yinghai's patch series:
> http://lkml.kernel.org/r/1387485843-17403-1-git-send-email-yinghai@kernel.org
>
> The goal is to try to put 64-bit BARs above 4G so we can preserve the
> 32-bit bus address space for 32-bit BARs.
I added Daniel's Reviewed-by to the AGP patches (except the trivial
PCI_COMMAND change in ati_configure()).
I added the incremental patch below to fix these warnings found by
Fengguang's autobuilder in the original b1e0e392f5dd commit:
drivers/char/agp/amd-k7-agp.c:115:38: warning: 'addr' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/pci/bus.c:105:5: warning: large integer implicitly truncated to unsigned type [-Woverflow]
Finally, I merged the pci/resource branch with these changes into my "next"
branch, so it should appear in v3.14-rc1.
Dave, let me know if you have any issue with these AGP changes going
through my tree.
Bjorn
diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c
index e8c2e9167e89..3661a51e93e2 100644
--- a/drivers/char/agp/amd-k7-agp.c
+++ b/drivers/char/agp/amd-k7-agp.c
@@ -148,8 +148,8 @@ static int amd_create_gatt_table(struct agp_bridge_data *bridge)
* used to program the agp master not the cpu
*/
- agp_bridge->gart_bus_addr = pci_bus_address(agp_bridge->dev,
- AGP_APERTURE_BAR);
+ addr = pci_bus_address(agp_bridge->dev, AGP_APERTURE_BAR);
+ agp_bridge->gart_bus_addr = addr;
/* Calculate the agp offset */
for (i = 0; i < value->num_entries / 1024; i++, addr += 0x00400000) {
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index 107ad9a5b8aa..86fb8ec5e448 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -99,10 +99,12 @@ void pci_bus_remove_resources(struct pci_bus *bus)
}
static struct pci_bus_region pci_32_bit = {0, 0xffffffffULL};
+#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
static struct pci_bus_region pci_64_bit = {0,
- (resource_size_t) 0xffffffffffffffffULL};
-static struct pci_bus_region pci_high = {(resource_size_t) 0x100000000ULL,
- (resource_size_t) 0xffffffffffffffffULL};
+ (dma_addr_t) 0xffffffffffffffffULL};
+static struct pci_bus_region pci_high = {(dma_addr_t) 0x100000000ULL,
+ (dma_addr_t) 0xffffffffffffffffULL};
+#endif
/*
* @res contains CPU addresses. Clip it so the corresponding bus addresses
@@ -207,6 +209,7 @@ int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
resource_size_t),
void *alignf_data)
{
+#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
int rc;
if (res->flags & IORESOURCE_MEM_64) {
@@ -220,6 +223,7 @@ int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
type_mask, alignf, alignf_data,
&pci_64_bit);
}
+#endif
return pci_bus_alloc_from_region(bus, res, size, align, min,
type_mask, alignf, alignf_data,
next prev parent reply other threads:[~2014-01-10 21:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-07 0:55 [PATCH v7 00/15] PCI: Allocate 64-bit BARs above 4G when possible Bjorn Helgaas
2014-01-07 0:55 ` [PATCH v7 01/15] PCI: Change pci_bus_region addresses to dma_addr_t Bjorn Helgaas
2014-01-07 0:55 ` [PATCH v7 02/15] PCI: Convert pcibios_resource_to_bus() to take a pci_bus, not a pci_dev Bjorn Helgaas
2014-01-07 0:55 ` [PATCH v7 03/15] PCI: Add pci_bus_address() to get bus address of a BAR Bjorn Helgaas
2014-01-07 0:55 ` [PATCH v7 04/15] agp: Support 64-bit APBASE Bjorn Helgaas
2014-01-07 0:55 ` [PATCH v7 05/15] agp: Use pci_resource_start() to get CPU physical address for BAR Bjorn Helgaas
2014-01-07 0:55 ` [PATCH v7 06/15] drm/i915: Rename gtt_bus_addr to gtt_phys_addr Bjorn Helgaas
2014-01-07 0:56 ` [PATCH v7 07/15] agp/intel: " Bjorn Helgaas
2014-01-07 0:56 ` [PATCH v7 08/15] agp/intel: Support 64-bit GMADR Bjorn Helgaas
2014-01-07 0:56 ` [PATCH v7 09/15] agp/intel: Use pci_bus_address() to get MMADR bus address Bjorn Helgaas
2014-01-07 0:56 ` [PATCH v7 10/15] agp/intel: Use pci_bus_address() to get GTTADR " Bjorn Helgaas
2014-01-07 0:56 ` [PATCH v7 11/15] agp/intel: Use CPU physical address, not bus address, for ioremap() Bjorn Helgaas
2014-01-07 0:56 ` [PATCH v7 12/15] agp/ati: Use PCI_COMMAND instead of hard-coded 4 Bjorn Helgaas
2014-01-07 0:56 ` [PATCH v7 13/15] PCI: Split out bridge window override of minimum allocation address Bjorn Helgaas
2014-01-07 0:56 ` [PATCH v7 14/15] PCI: Enforce bus address limits in resource allocation Bjorn Helgaas
2014-01-07 0:56 ` [PATCH v7 15/15] PCI: Allocate 64-bit BARs above 4G when possible Bjorn Helgaas
2014-01-07 10:46 ` [PATCH v7 00/15] " Daniel Vetter
2014-01-07 18:46 ` Bjorn Helgaas
2014-01-10 21:34 ` Bjorn Helgaas [this message]
2014-01-15 5:14 ` Dave Airlie
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=20140110213402.GB25635@google.com \
--to=bhelgaas@google.com \
--cc=airlied@linux.ie \
--cc=daniel.vetter@ffwll.ch \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=yan@linux.vnet.ibm.com \
--cc=yinghai@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.