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] [linux-2.6.18-xen] linux/x86: make hypercall wrapper fun

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] linux/x86: make hypercall wrapper functions' arguments unsigned where possible
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 18 Jan 2008 16:30:16 -0800
Delivery-date: Fri, 18 Jan 2008 16:31:22 -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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1200674161 0
# Node ID 4b09218e65b801e937664d2a3363ba0071e0ee66
# Parent  1468ebbc3c5d7d50828251058ca229a4dce55345
linux/x86: make hypercall wrapper functions' arguments unsigned where possible
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 include/asm-i386/mach-xen/asm/hypercall.h   |   16 +++++++++-------
 include/asm-x86_64/mach-xen/asm/hypercall.h |   16 +++++++++-------
 include/xen/hypercall.h                     |    3 ++-
 3 files changed, 20 insertions(+), 15 deletions(-)

diff -r 1468ebbc3c5d -r 4b09218e65b8 include/asm-i386/mach-xen/asm/hypercall.h
--- a/include/asm-i386/mach-xen/asm/hypercall.h Fri Jan 18 16:35:24 2008 +0000
+++ b/include/asm-i386/mach-xen/asm/hypercall.h Fri Jan 18 16:36:01 2008 +0000
@@ -132,21 +132,23 @@ HYPERVISOR_set_trap_table(
 
 static inline int
 HYPERVISOR_mmu_update(
-       mmu_update_t *req, int count, int *success_count, domid_t domid)
+       mmu_update_t *req, unsigned int count, unsigned int *success_count,
+       domid_t domid)
 {
        return _hypercall4(int, mmu_update, req, count, success_count, domid);
 }
 
 static inline int
 HYPERVISOR_mmuext_op(
-       struct mmuext_op *op, int count, int *success_count, domid_t domid)
+       struct mmuext_op *op, unsigned int count, unsigned int *success_count,
+       domid_t domid)
 {
        return _hypercall4(int, mmuext_op, op, count, success_count, domid);
 }
 
 static inline int
 HYPERVISOR_set_gdt(
-       unsigned long *frame_list, int entries)
+       unsigned long *frame_list, unsigned int entries)
 {
        return _hypercall2(int, set_gdt, frame_list, entries);
 }
@@ -208,14 +210,14 @@ HYPERVISOR_platform_op(
 
 static inline int
 HYPERVISOR_set_debugreg(
-       int reg, unsigned long value)
+       unsigned int reg, unsigned long value)
 {
        return _hypercall2(int, set_debugreg, reg, value);
 }
 
 static inline unsigned long
 HYPERVISOR_get_debugreg(
-       int reg)
+       unsigned int reg)
 {
        return _hypercall1(unsigned long, get_debugreg, reg);
 }
@@ -236,7 +238,7 @@ HYPERVISOR_memory_op(
 
 static inline int
 HYPERVISOR_multicall(
-       multicall_entry_t *call_list, int nr_calls)
+       multicall_entry_t *call_list, unsigned int nr_calls)
 {
        return _hypercall2(int, multicall, call_list, nr_calls);
 }
@@ -288,7 +290,7 @@ HYPERVISOR_xen_version(
 
 static inline int
 HYPERVISOR_console_io(
-       int cmd, int count, char *str)
+       int cmd, unsigned int count, char *str)
 {
        return _hypercall3(int, console_io, cmd, count, str);
 }
diff -r 1468ebbc3c5d -r 4b09218e65b8 include/asm-x86_64/mach-xen/asm/hypercall.h
--- a/include/asm-x86_64/mach-xen/asm/hypercall.h       Fri Jan 18 16:35:24 
2008 +0000
+++ b/include/asm-x86_64/mach-xen/asm/hypercall.h       Fri Jan 18 16:36:01 
2008 +0000
@@ -138,21 +138,23 @@ HYPERVISOR_set_trap_table(
 
 static inline int
 HYPERVISOR_mmu_update(
-       mmu_update_t *req, int count, int *success_count, domid_t domid)
+       mmu_update_t *req, unsigned int count, unsigned int *success_count,
+       domid_t domid)
 {
        return _hypercall4(int, mmu_update, req, count, success_count, domid);
 }
 
 static inline int
 HYPERVISOR_mmuext_op(
-       struct mmuext_op *op, int count, int *success_count, domid_t domid)
+       struct mmuext_op *op, unsigned int count, unsigned int *success_count,
+       domid_t domid)
 {
        return _hypercall4(int, mmuext_op, op, count, success_count, domid);
 }
 
 static inline int
 HYPERVISOR_set_gdt(
-       unsigned long *frame_list, int entries)
+       unsigned long *frame_list, unsigned int entries)
 {
        return _hypercall2(int, set_gdt, frame_list, entries);
 }
@@ -211,14 +213,14 @@ HYPERVISOR_platform_op(
 
 static inline int
 HYPERVISOR_set_debugreg(
-       int reg, unsigned long value)
+       unsigned int reg, unsigned long value)
 {
        return _hypercall2(int, set_debugreg, reg, value);
 }
 
 static inline unsigned long
 HYPERVISOR_get_debugreg(
-       int reg)
+       unsigned int reg)
 {
        return _hypercall1(unsigned long, get_debugreg, reg);
 }
@@ -239,7 +241,7 @@ HYPERVISOR_memory_op(
 
 static inline int
 HYPERVISOR_multicall(
-       multicall_entry_t *call_list, int nr_calls)
+       multicall_entry_t *call_list, unsigned int nr_calls)
 {
        return _hypercall2(int, multicall, call_list, nr_calls);
 }
@@ -286,7 +288,7 @@ HYPERVISOR_xen_version(
 
 static inline int
 HYPERVISOR_console_io(
-       int cmd, int count, char *str)
+       int cmd, unsigned int count, char *str)
 {
        return _hypercall3(int, console_io, cmd, count, str);
 }
diff -r 1468ebbc3c5d -r 4b09218e65b8 include/xen/hypercall.h
--- a/include/xen/hypercall.h   Fri Jan 18 16:35:24 2008 +0000
+++ b/include/xen/hypercall.h   Fri Jan 18 16:36:01 2008 +0000
@@ -5,7 +5,7 @@
 
 static inline int
 HYPERVISOR_multicall_check(
-       multicall_entry_t *call_list, int nr_calls,
+       multicall_entry_t *call_list, unsigned int nr_calls,
        const unsigned long *rc_list)
 {
        int rc = HYPERVISOR_multicall(call_list, nr_calls);
@@ -13,6 +13,7 @@ HYPERVISOR_multicall_check(
        if (unlikely(rc < 0))
                return rc;
        BUG_ON(rc);
+       BUG_ON((int)nr_calls < 0);
 
        for ( ; nr_calls > 0; --nr_calls, ++call_list)
                if (unlikely(call_list->result != (rc_list ? *rc_list++ : 0)))

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] linux/x86: make hypercall wrapper functions' arguments unsigned where possible, Xen patchbot-linux-2.6.18-xen <=