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-ppc-devel

[XenPPC] [xenppc-unstable] [XEN] Undo changset 13191 to make way for bet

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [xenppc-unstable] [XEN] Undo changset 13191 to make way for better patch
From: Xen patchbot-xenppc-unstable <patchbot-xenppc-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Jan 2007 22:50:14 +0000
Delivery-date: Wed, 17 Jan 2007 14:51:42 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID 02c6bf903a8e0824e0c5ac07b7f85b9669316c45
# Parent  c759c733f77d5edaa21620f37206521399842023
[XEN] Undo changset 13191 to make way for better patch

Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 xen/common/domctl.c              |   40 +++------------------------------------
 xen/include/asm-powerpc/bitops.h |    3 --
 xen/include/xen/bitops.h         |    4 ---
 3 files changed, 4 insertions(+), 43 deletions(-)

diff -r c759c733f77d -r 02c6bf903a8e xen/common/domctl.c
--- a/xen/common/domctl.c       Wed Jan 17 14:12:08 2007 -0500
+++ b/xen/common/domctl.c       Wed Jan 17 14:17:31 2007 -0500
@@ -38,36 +38,14 @@ void cpumask_to_xenctl_cpumap(
 void cpumask_to_xenctl_cpumap(
     struct xenctl_cpumap *xenctl_cpumap, cpumask_t *cpumask)
 {
-    unsigned int guest_bytes, copy_bytes, xen_bytes, i;
+    unsigned int guest_bytes, copy_bytes, i;
     uint8_t zero = 0;
-    cpumask_t local;
 
     if ( guest_handle_is_null(xenctl_cpumap->bitmap) )
         return;
 
     guest_bytes = (xenctl_cpumap->nr_cpus + 7) / 8;
-
-    xen_bytes = (NR_CPUS + 7) / 8;
-    if (bitmap_by_long) {
-        if (((guest_bytes * 8) % BITS_PER_LONG) != 0) {
-            printk("%s: Unable to translate bitmap\n", __func__);
-            return;
-        }
-
-        /* local copy */
-        memcpy(cpus_addr(local), cpus_addr(*cpumask), sizeof (local));
-
-        /* clear unused bits */
-        for (i = NR_CPUS; i < sizeof(local) * 8; i++) {
-            /* non-atomic version */
-            __clear_bit(i, cpus_addr(local));
-        }
-
-        xen_bytes = sizeof(local);
-        cpumask = &local;
-    }
-
-    copy_bytes  = min_t(unsigned int, guest_bytes, xen_bytes);
+    copy_bytes  = min_t(unsigned int, guest_bytes, (NR_CPUS + 7) / 8);
 
     copy_to_guest(xenctl_cpumap->bitmap,
                   (uint8_t *)cpus_addr(*cpumask),
@@ -80,20 +58,10 @@ void xenctl_cpumap_to_cpumask(
 void xenctl_cpumap_to_cpumask(
     cpumask_t *cpumask, struct xenctl_cpumap *xenctl_cpumap)
 {
-    unsigned int guest_bytes, copy_bytes, xen_bytes;
+    unsigned int guest_bytes, copy_bytes;
 
     guest_bytes = (xenctl_cpumap->nr_cpus + 7) / 8;
-    xen_bytes = (NR_CPUS + 7) / 8;
-
-    if (bitmap_by_long) {
-        if (((guest_bytes * 8) % BITS_PER_LONG) != 0) {
-            printk("%s: Unable to translate bitmap\n", __func__);
-            return;
-        }
-        xen_bytes = sizeof(*cpumask);
-    }
-
-    copy_bytes  = min_t(unsigned int, guest_bytes, xen_bytes);
+    copy_bytes  = min_t(unsigned int, guest_bytes, (NR_CPUS + 7) / 8);
 
     cpus_clear(*cpumask);
 
diff -r c759c733f77d -r 02c6bf903a8e xen/include/asm-powerpc/bitops.h
--- a/xen/include/asm-powerpc/bitops.h  Wed Jan 17 14:12:08 2007 -0500
+++ b/xen/include/asm-powerpc/bitops.h  Wed Jan 17 14:17:31 2007 -0500
@@ -41,9 +41,6 @@
 #define _PPC64_BITOPS_H
 
 #include <asm/memory.h>
-
-/* The following indicates that bitops are implemented as described above */
-#define bitmap_by_long (1)
 
 /*
  * clear_bit doesn't imply a memory barrier
diff -r c759c733f77d -r 02c6bf903a8e xen/include/xen/bitops.h
--- a/xen/include/xen/bitops.h  Wed Jan 17 14:12:08 2007 -0500
+++ b/xen/include/xen/bitops.h  Wed Jan 17 14:17:31 2007 -0500
@@ -75,10 +75,6 @@ static __inline__ int generic_fls(int x)
  * scope
  */
 #include <asm/bitops.h>
-
-#ifndef bitmap_by_long
-#define bitmap_by_long (0)
-#endif
 
 
 static inline int generic_fls64(__u64 x)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [xenppc-unstable] [XEN] Undo changset 13191 to make way for better patch, Xen patchbot-xenppc-unstable <=