Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ee27a4e authored by Jes Sorensen's avatar Jes Sorensen Committed by Tony Luck
Browse files

[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: default avatarJes Sorenson <jes@sgi.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent c0346379
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -15,6 +15,7 @@
#include <asm/sn/pcibus_provider_defs.h>
#include <asm/sn/pcibus_provider_defs.h>
#include <asm/sn/pcidev.h>
#include <asm/sn/pcidev.h>
#include <asm/sn/sn_sal.h>
#include <asm/sn/sn_sal.h>
#include <asm/sn/pic.h>
#include <asm/sn/sn2/sn_hwperf.h>
#include <asm/sn/sn2/sn_hwperf.h>
#include "xtalk/xwidgetdev.h"
#include "xtalk/xwidgetdev.h"
#include "xtalk/hubdev.h"
#include "xtalk/hubdev.h"
@@ -130,9 +131,9 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
	}
	}


	memcpy(soft, prom_bussoft, sizeof(struct pcibus_info));
	memcpy(soft, prom_bussoft, sizeof(struct pcibus_info));
	soft->pbi_buscommon.bs_base =
	soft->pbi_buscommon.bs_base = (unsigned long)
	    (((u64) soft->pbi_buscommon.
		ioremap(REGION_OFFSET(soft->pbi_buscommon.bs_base),
	      bs_base << 4) >> 4) | __IA64_UNCACHED_OFFSET;
			sizeof(struct pic));


	spin_lock_init(&soft->pbi_lock);
	spin_lock_init(&soft->pbi_lock);


+3 −1
Original line number Original line Diff line number Diff line
@@ -610,7 +610,9 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
		return NULL;
		return NULL;


	memcpy(tioca_common, prom_bussoft, sizeof(struct tioca_common));
	memcpy(tioca_common, prom_bussoft, sizeof(struct tioca_common));
	tioca_common->ca_common.bs_base |= __IA64_UNCACHED_OFFSET;
	tioca_common->ca_common.bs_base = (unsigned long)
		ioremap(REGION_OFFSET(tioca_common->ca_common.bs_base),
			sizeof(struct tioca_common));


	/* init kernel-private area */
	/* init kernel-private area */


+3 −1
Original line number Original line Diff line number Diff line
@@ -1002,7 +1002,9 @@ tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
		return NULL;
		return NULL;


	memcpy(tioce_common, prom_bussoft, sizeof(struct tioce_common));
	memcpy(tioce_common, prom_bussoft, sizeof(struct tioce_common));
	tioce_common->ce_pcibus.bs_base |= __IA64_UNCACHED_OFFSET;
	tioce_common->ce_pcibus.bs_base = (unsigned long)
		ioremap(REGION_OFFSET(tioce_common->ce_pcibus.bs_base),
			sizeof(struct tioce_common));


	tioce_kern = tioce_kern_init(tioce_common);
	tioce_kern = tioce_kern_init(tioce_common);
	if (tioce_kern == NULL) {
	if (tioce_kern == NULL) {