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