aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJes Sorensen <jes@sgi.com>2007-06-18 11:19:05 -0400
committerTony Luck <tony.luck@intel.com>2007-06-26 16:35:45 -0400
commit1ee27a4eedf3cc08245d395936c1bfaf80c074cc (patch)
tree7d36f5c38b3a45fc4db63b8301ff11ee3e013cde
parentc034637967881830979b5415e55578e42f806659 (diff)
[IA64] Make SN2 PCI code use ioremap rather than manually mangle the address
This one changes the SN2 specific PCI drivers to use ioremap() for obtaining the real address to access for the PCI registers instead of manually calculating them with __IA64_UNCACHED_OFFSET. The patch should have no real change when running on a normal Linux kernel, but when running as a paravirtualized it is needed. Signed-off-by: Jes Sorenson <jes@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r--arch/ia64/sn/pci/pcibr/pcibr_provider.c7
-rw-r--r--arch/ia64/sn/pci/tioca_provider.c4
-rw-r--r--arch/ia64/sn/pci/tioce_provider.c4
3 files changed, 10 insertions, 5 deletions
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
index 04a8256017eb..b42bfcae6f91 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
@@ -15,6 +15,7 @@
15#include <asm/sn/pcibus_provider_defs.h> 15#include <asm/sn/pcibus_provider_defs.h>
16#include <asm/sn/pcidev.h> 16#include <asm/sn/pcidev.h>
17#include <asm/sn/sn_sal.h> 17#include <asm/sn/sn_sal.h>
18#include <asm/sn/pic.h>
18#include <asm/sn/sn2/sn_hwperf.h> 19#include <asm/sn/sn2/sn_hwperf.h>
19#include "xtalk/xwidgetdev.h" 20#include "xtalk/xwidgetdev.h"
20#include "xtalk/hubdev.h" 21#include "xtalk/hubdev.h"
@@ -130,9 +131,9 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
130 } 131 }
131 132
132 memcpy(soft, prom_bussoft, sizeof(struct pcibus_info)); 133 memcpy(soft, prom_bussoft, sizeof(struct pcibus_info));
133 soft->pbi_buscommon.bs_base = 134 soft->pbi_buscommon.bs_base = (unsigned long)
134 (((u64) soft->pbi_buscommon. 135 ioremap(REGION_OFFSET(soft->pbi_buscommon.bs_base),
135 bs_base << 4) >> 4) | __IA64_UNCACHED_OFFSET; 136 sizeof(struct pic));
136 137
137 spin_lock_init(&soft->pbi_lock); 138 spin_lock_init(&soft->pbi_lock);
138 139
diff --git a/arch/ia64/sn/pci/tioca_provider.c b/arch/ia64/sn/pci/tioca_provider.c
index b9bedbd6e1d6..d798dd4d0dc4 100644
--- a/arch/ia64/sn/pci/tioca_provider.c
+++ b/arch/ia64/sn/pci/tioca_provider.c
@@ -610,7 +610,9 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
610 return NULL; 610 return NULL;
611 611
612 memcpy(tioca_common, prom_bussoft, sizeof(struct tioca_common)); 612 memcpy(tioca_common, prom_bussoft, sizeof(struct tioca_common));
613 tioca_common->ca_common.bs_base |= __IA64_UNCACHED_OFFSET; 613 tioca_common->ca_common.bs_base = (unsigned long)
614 ioremap(REGION_OFFSET(tioca_common->ca_common.bs_base),
615 sizeof(struct tioca_common));
614 616
615 /* init kernel-private area */ 617 /* init kernel-private area */
616 618
diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c
index f4c0b961a939..84b72b27e27f 100644
--- a/arch/ia64/sn/pci/tioce_provider.c
+++ b/arch/ia64/sn/pci/tioce_provider.c
@@ -1002,7 +1002,9 @@ tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
1002 return NULL; 1002 return NULL;
1003 1003
1004 memcpy(tioce_common, prom_bussoft, sizeof(struct tioce_common)); 1004 memcpy(tioce_common, prom_bussoft, sizeof(struct tioce_common));
1005 tioce_common->ce_pcibus.bs_base |= __IA64_UNCACHED_OFFSET; 1005 tioce_common->ce_pcibus.bs_base = (unsigned long)
1006 ioremap(REGION_OFFSET(tioce_common->ce_pcibus.bs_base),
1007 sizeof(struct tioce_common));
1006 1008
1007 tioce_kern = tioce_kern_init(tioce_common); 1009 tioce_kern = tioce_kern_init(tioce_common);
1008 if (tioce_kern == NULL) { 1010 if (tioce_kern == NULL) {