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

[Xen-changelog] [xen-unstable] Clean up the DMADOM physical upper limit

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Clean up the DMADOM physical upper limit handling to properly honour
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 28 Nov 2006 20:00:18 +0000
Delivery-date: Tue, 28 Nov 2006 12:00:18 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID a4ba47e9bc1fa54cc1071e137c5344ae7aa62944
# Parent  9493864f7a3c82932fb67aed2f4a68b373d39111
Clean up the DMADOM physical upper limit handling to properly honour
settings in config.h.

Set the upper limit for DMADOM and swiotlb allocations to be 30 bits
(1G) instead of 31 bits, to allow the b44 NIC driver to work.

Signed-off-by: Stephen Tweedie <sct@xxxxxxxxxx>
---
 linux-2.6-xen-sparse/arch/i386/kernel/swiotlb.c |    4 ++--
 xen/common/memory.c                             |    4 ++--
 xen/include/asm-ia64/config.h                   |    4 +++-
 xen/include/asm-x86/config.h                    |    4 +++-
 4 files changed, 10 insertions(+), 6 deletions(-)

diff -r 9493864f7a3c -r a4ba47e9bc1f 
linux-2.6-xen-sparse/arch/i386/kernel/swiotlb.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/swiotlb.c   Wed Nov 22 14:25:07 
2006 -0700
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/swiotlb.c   Tue Nov 28 16:41:45 
2006 +0000
@@ -47,8 +47,8 @@ EXPORT_SYMBOL(swiotlb);
  */
 #define IO_TLB_SHIFT 11
 
-/* Width of DMA addresses in the IO TLB. 31 bits is an aacraid limitation. */
-#define IO_TLB_DMA_BITS 31
+/* Width of DMA addresses in the IO TLB. 30 bits is a b44 limitation. */
+#define IO_TLB_DMA_BITS 30
 
 static int swiotlb_force;
 static char *iotlb_virt_start;
diff -r 9493864f7a3c -r a4ba47e9bc1f xen/common/memory.c
--- a/xen/common/memory.c       Wed Nov 22 14:25:07 2006 -0700
+++ b/xen/common/memory.c       Tue Nov 28 16:41:45 2006 +0000
@@ -328,7 +328,7 @@ static long memory_exchange(XEN_GUEST_HA
          (exch.out.address_bits <
           (get_order_from_pages(max_page) + PAGE_SHIFT)) )
     {
-        if ( exch.out.address_bits < 31 )
+        if ( exch.out.address_bits < MAX_DMADOM_BITS )
         {
             rc = -ENOMEM;
             goto fail_early;
@@ -541,7 +541,7 @@ long do_memory_op(unsigned long cmd, XEN
              (reservation.address_bits <
               (get_order_from_pages(max_page) + PAGE_SHIFT)) )
         {
-            if ( reservation.address_bits < 31 )
+            if ( reservation.address_bits < MAX_DMADOM_BITS )
                 return start_extent;
             args.memflags = MEMF_dma;
         }
diff -r 9493864f7a3c -r a4ba47e9bc1f xen/include/asm-ia64/config.h
--- a/xen/include/asm-ia64/config.h     Wed Nov 22 14:25:07 2006 -0700
+++ b/xen/include/asm-ia64/config.h     Tue Nov 28 16:41:45 2006 +0000
@@ -41,7 +41,9 @@
 #define CONFIG_IOSAPIC
 #define supervisor_mode_kernel (0)
 
-#define MAX_DMADOM_PFN (0x7FFFFFFFUL >> PAGE_SHIFT) /* 31 addressable bits */
+#define MAX_DMADOM_BITS 30
+#define MAX_DMADOM_MASK ((1UL << MAX_DMADOM_BITS) - 1)
+#define MAX_DMADOM_PFN  (MAX_DMADOM_MASK >> PAGE_SHIFT)
 
 /* If PERFC is used, include privop maps.  */
 #ifdef PERF_COUNTERS
diff -r 9493864f7a3c -r a4ba47e9bc1f xen/include/asm-x86/config.h
--- a/xen/include/asm-x86/config.h      Wed Nov 22 14:25:07 2006 -0700
+++ b/xen/include/asm-x86/config.h      Tue Nov 28 16:41:45 2006 +0000
@@ -82,7 +82,9 @@
 /* Debug stack is restricted to 8kB by guard pages. */
 #define DEBUG_STACK_SIZE 8192
 
-#define MAX_DMADOM_PFN 0x7FFFFUL /* 31 addressable bits */
+#define MAX_DMADOM_BITS 30
+#define MAX_DMADOM_MASK ((1UL << MAX_DMADOM_BITS) - 1)
+#define MAX_DMADOM_PFN  (MAX_DMADOM_MASK >> PAGE_SHIFT)
 
 #ifndef __ASSEMBLY__
 extern unsigned long _end; /* standard ELF symbol */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Clean up the DMADOM physical upper limit handling to properly honour, Xen patchbot-unstable <=