Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1ee27a4eedf3cc08245d395936c1bfaf80c074cc
Commit:     1ee27a4eedf3cc08245d395936c1bfaf80c074cc
Parent:     c034637967881830979b5415e55578e42f806659
Author:     Jes Sorensen <[EMAIL PROTECTED]>
AuthorDate: Mon Jun 18 17:19:05 2007 +0200
Committer:  Tony Luck <[EMAIL PROTECTED]>
CommitDate: Tue Jun 26 13:35:45 2007 -0700

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Tony Luck <[EMAIL PROTECTED]>
---
 arch/ia64/sn/pci/pcibr/pcibr_provider.c |    7 ++++---
 arch/ia64/sn/pci/tioca_provider.c       |    4 +++-
 arch/ia64/sn/pci/tioce_provider.c       |    4 +++-
 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 04a8256..b42bfca 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
@@ -15,6 +15,7 @@
 #include <asm/sn/pcibus_provider_defs.h>
 #include <asm/sn/pcidev.h>
 #include <asm/sn/sn_sal.h>
+#include <asm/sn/pic.h>
 #include <asm/sn/sn2/sn_hwperf.h>
 #include "xtalk/xwidgetdev.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));
-       soft->pbi_buscommon.bs_base =
-           (((u64) soft->pbi_buscommon.
-             bs_base << 4) >> 4) | __IA64_UNCACHED_OFFSET;
+       soft->pbi_buscommon.bs_base = (unsigned long)
+               ioremap(REGION_OFFSET(soft->pbi_buscommon.bs_base),
+                       sizeof(struct pic));
 
        spin_lock_init(&soft->pbi_lock);
 
diff --git a/arch/ia64/sn/pci/tioca_provider.c 
b/arch/ia64/sn/pci/tioca_provider.c
index b9bedbd..d798dd4 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
                return NULL;
 
        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 */
 
diff --git a/arch/ia64/sn/pci/tioce_provider.c 
b/arch/ia64/sn/pci/tioce_provider.c
index f4c0b96..84b72b2 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
                return NULL;
 
        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);
        if (tioce_kern == NULL) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to