[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>

authored by Jes Sorensen and committed by Tony Luck 1ee27a4e c0346379

+10 -5
+4 -3
arch/ia64/sn/pci/pcibr/pcibr_provider.c
··· 15 15 #include <asm/sn/pcibus_provider_defs.h> 16 16 #include <asm/sn/pcidev.h> 17 17 #include <asm/sn/sn_sal.h> 18 + #include <asm/sn/pic.h> 18 19 #include <asm/sn/sn2/sn_hwperf.h> 19 20 #include "xtalk/xwidgetdev.h" 20 21 #include "xtalk/hubdev.h" ··· 131 130 } 132 131 133 132 memcpy(soft, prom_bussoft, sizeof(struct pcibus_info)); 134 - soft->pbi_buscommon.bs_base = 135 - (((u64) soft->pbi_buscommon. 136 - bs_base << 4) >> 4) | __IA64_UNCACHED_OFFSET; 133 + soft->pbi_buscommon.bs_base = (unsigned long) 134 + ioremap(REGION_OFFSET(soft->pbi_buscommon.bs_base), 135 + sizeof(struct pic)); 137 136 138 137 spin_lock_init(&soft->pbi_lock); 139 138
+3 -1
arch/ia64/sn/pci/tioca_provider.c
··· 610 610 return NULL; 611 611 612 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 617 /* init kernel-private area */ 616 618
+3 -1
arch/ia64/sn/pci/tioce_provider.c
··· 1002 1002 return NULL; 1003 1003 1004 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 1009 tioce_kern = tioce_kern_init(tioce_common); 1008 1010 if (tioce_kern == NULL) {