agp/intel: Use CPU physical address, not bus address, for ioremap()
authorBjorn Helgaas <bhelgaas@google.com>
Mon, 6 Jan 2014 21:43:13 +0000 (14:43 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 7 Jan 2014 18:37:18 +0000 (11:37 -0700)
commitd3572532993c7e8635ad8e5b50f8f613bf855ee2
tree4e6b9b4650bbc60add44d824469b357b831b2264
parentb5e350f919acb8ef6961bc1b62e395f53cea123a
agp/intel: Use CPU physical address, not bus address, for ioremap()

In i810_setup(), i830_setup(), and i9xx_setup(), we use the result of
pci_bus_address() as an argument to ioremap() and to compute gtt_phys_addr.
These should use pci_resource_start() instead because we want the CPU
physical address, not the bus address.

If there were an AGP device behind a host bridge that translated addresses,
e.g., a PNP0A08 device with _TRA != 0, this would fix a bug.  I'm not aware
of any of those, but they are possible.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/char/agp/intel-gtt.c