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