WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-ia64-devel] [patch] dom0 kernel - sn2 use ioremap for PCI registers

To: Alex Williamson <alex.williamson@xxxxxx>
Subject: [Xen-ia64-devel] [patch] dom0 kernel - sn2 use ioremap for PCI registers
From: Jes Sorensen <jes@xxxxxxx>
Date: Mon, 18 Jun 2007 17:11:31 +0200
Cc: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 18 Jun 2007 08:09:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.4 (X11/20060527)
Hi,

Please apply this one to the dom0 kernel - I am pushing the same patch
to Linus.

This patch basically changes the SN2 specific code to call ioremap()
for PCI registers instead of simply converting the address supplied
by the prom by adding the __IA64_UNCACHED_OFFSET to it.

It's needed together with the patch I just posted for Xen to map in the
SHUB registers etc.

Cheers,
Jes

Use ioremap() on SN2 specific PIC and TIO registers rather than
manually setting the __IA64_UNCACHED_OFFSET bits in the address we get
from the PROM.

Signed-off-by: Jes Sorensen <jes@xxxxxxx>

---
 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(-)

Index: linux-2.6/arch/ia64/sn/pci/pcibr/pcibr_provider.c
===================================================================
--- linux-2.6.orig/arch/ia64/sn/pci/pcibr/pcibr_provider.c
+++ linux-2.6/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 *p
        }
 
        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);
 
Index: linux-2.6/arch/ia64/sn/pci/tioca_provider.c
===================================================================
--- linux-2.6.orig/arch/ia64/sn/pci/tioca_provider.c
+++ linux-2.6/arch/ia64/sn/pci/tioca_provider.c
@@ -610,7 +610,9 @@ tioca_bus_fixup(struct pcibus_bussoft *p
                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 */
 
Index: linux-2.6/arch/ia64/sn/pci/tioce_provider.c
===================================================================
--- linux-2.6.orig/arch/ia64/sn/pci/tioce_provider.c
+++ linux-2.6/arch/ia64/sn/pci/tioce_provider.c
@@ -1002,7 +1002,9 @@ tioce_bus_fixup(struct pcibus_bussoft *p
                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) {
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
<Prev in Thread] Current Thread [Next in Thread>