From: Bart Van Assche Date: Thu, 14 Feb 2013 17:10:01 +0000 (+0000) Subject: Add support for the Linux ioctl IB_USER_MAD_ENABLE_PKEY X-Git-Tag: svn/VALGRIND_3_9_0~394 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a367a2d4fe86df76e734fecb16cc5e5193a23ebc;p=thirdparty%2Fvalgrind.git Add support for the Linux ioctl IB_USER_MAD_ENABLE_PKEY git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13287 --- diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index b2f1f33923..46bc7361fe 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -4797,6 +4797,9 @@ PRE(sys_ioctl) /* User input device creation */ case VKI_UI_DEV_CREATE: case VKI_UI_DEV_DESTROY: + + /* InfiniBand */ + case VKI_IB_USER_MAD_ENABLE_PKEY: PRINT("sys_ioctl ( %ld, 0x%lx )",ARG1,ARG2); PRE_REG_READ2(long, "ioctl", unsigned int, fd, unsigned int, request); @@ -6237,6 +6240,7 @@ POST(sys_ioctl) case VKI_TCSETS: case VKI_TCSETSW: case VKI_TCSETSF: + case VKI_IB_USER_MAD_ENABLE_PKEY: break; case VKI_TCGETS: POST_MEM_WRITE( ARG3, sizeof(struct vki_termios) ); diff --git a/include/vki/vki-linux.h b/include/vki/vki-linux.h index 9e0991fd55..f789aa7837 100644 --- a/include/vki/vki-linux.h +++ b/include/vki/vki-linux.h @@ -3014,6 +3014,19 @@ struct vki_hwtstamp_config { #define VKI_UI_SET_SWBIT _VKI_IOW(VKI_UINPUT_IOCTL_BASE, 109, int) #define VKI_UI_SET_PROPBIT _VKI_IOW(VKI_UINPUT_IOCTL_BASE, 110, int) +//---------------------------------------------------------------------- +// From linux-2.6/include/uapi/rdma/ib_user_mad.h +//---------------------------------------------------------------------- + +#define VKI_IB_IOCTL_MAGIC 0x1b + +#define VKI_IB_USER_MAD_REGISTER_AGENT _VKI_IOWR(VKI_IB_IOCTL_MAGIC, 1, \ + struct ib_user_mad_reg_req) + +#define VKI_IB_USER_MAD_UNREGISTER_AGENT _VKI_IOW(VKI_IB_IOCTL_MAGIC, 2, __u32) + +#define VKI_IB_USER_MAD_ENABLE_PKEY _VKI_IO(VKI_IB_IOCTL_MAGIC, 3) + //---------------------------------------------------------------------- // Xen privcmd IOCTL //----------------------------------------------------------------------