Hello community, here is the log from the commit of package ofed checked in at Wed Oct 3 01:07:43 CEST 2007. -------- --- ofed/ofed.changes 2007-08-20 21:38:36.000000000 +0200 +++ /mounts/work_src_done/STABLE/ofed/ofed.changes 2007-09-21 19:31:16.000000000 +0200 @@ -1,0 +2,6 @@ +Fri Sep 21 19:27:36 CEST 2007 - pmullaney@suse.de + +- added patch for RT compat semaphore usage in user_mad.c +- patch applied after configure as configure applies ofed patches + +------------------------------------------------------------------- New: ---- user_mad-rt-semaphore.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ofed.spec ++++++ --- /var/tmp/diff_new_pack.D20645/_old 2007-10-03 01:07:37.000000000 +0200 +++ /var/tmp/diff_new_pack.D20645/_new 2007-10-03 01:07:37.000000000 +0200 @@ -15,7 +15,7 @@ Group: System/Base Summary: Infiniband Kernel Modules Version: 1.2.5 -Release: 1 +Release: 19 Source: ofa_kernel-1.2.5.tgz Source1: conf.modutils Source2: conf.ifcfg @@ -23,7 +23,8 @@ Source4: info Source5: ofed-docs-1.2.5.tar.bz2 Patch0: ofed-1.2-init.patch -URL: http://www.openfabrics.org +Patch1: user_mad-rt-semaphore.patch +Url: http://www.openfabrics.org License: GPL v2 or later BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: kernel-source kernel-syms module-init-tools quilt @@ -80,6 +81,7 @@ --with-ipath_inf-mod \ %endif --kernel-version=%kver-$flavor --kernel-sources=/usr/src/linux-obj/%_target_cpu/$flavor + patch -p1 < %{P:1} make popd done @@ -124,21 +126,20 @@ %files %defattr(-, root, root) - %_sysconfdir/infiniband %config %_sysconfdir/modprobe.d/infiniband - %_sysconfdir/udev %config %_sysconfdir/sysconfig/network/ifcfg-ib* /var/adm/fillup-templates/sysconfig.infiniband - %_sysconfdir/init.d/openibd %files doc %defattr(-, root, root) %doc source/ofed-docs-1.2.5/* - %changelog +* Fri Sep 21 2007 - pmullaney@suse.de +- added patch for RT compat semaphore usage in user_mad.c +- patch applied after configure as configure applies ofed patches * Mon Aug 20 2007 - hvogel@suse.de - Update to OFED 1.2.5 version - enabled mlx4 module build ++++++ user_mad-rt-semaphore.patch ++++++ --- ofa_kernel-1.2.5.orig/drivers/infiniband/core/user_mad.c 2007-08-14 11:35:11.000000000 -0400 +++ ofa_kernel-1.2.5/drivers/infiniband/core/user_mad.c 2007-09-20 13:46:43.000000000 -0400 @@ -85,6 +85,20 @@ enum { * we clear the umad_port[] entries. */ +#ifdef CONFIG_PREEMPT_RT +#define RW_DOWN_READ compat_down_read +#define RW_UP_READ compat_up_read +#define RW_DOWN_WRITE compat_down_write +#define RW_UP_WRITE compat_up_write +#define RW_DOWNGRADE_WRITE compat_downgrade_write +#else +#define RW_DOWN_READ down_read +#define RW_UP_READ up_read +#define RW_DOWN_WRITE down_write +#define RW_UP_WRITE up_write +#define RW_DOWNGRADE_WRITE downgrade_write +#endif + struct ib_umad_port { struct cdev *dev; struct class_device *class_dev; @@ -93,7 +107,12 @@ struct ib_umad_port { struct class_device *sm_class_dev; struct semaphore sm_sem; +#ifdef CONFIG_PREEMPT_RT + struct compat_rw_semaphore mutex; +#else struct rw_semaphore mutex; +#endif + struct list_head file_list; struct ib_device *ib_dev; @@ -159,7 +178,7 @@ static int queue_packet(struct ib_umad_f { int ret = 1; - down_read(&file->port->mutex); + RW_DOWN_READ(&file->port->mutex); for (packet->mad.hdr.id = 0; packet->mad.hdr.id < IB_UMAD_MAX_AGENTS; @@ -173,7 +192,7 @@ static int queue_packet(struct ib_umad_f break; } - up_read(&file->port->mutex); + RW_UP_READ(&file->port->mutex); return ret; } @@ -461,7 +480,7 @@ static ssize_t ib_umad_write(struct file goto err; } - down_read(&file->port->mutex); + RW_DOWN_READ(&file->port->mutex); agent = __get_agent(file, packet->mad.hdr.id); if (!agent) { @@ -558,7 +577,7 @@ static ssize_t ib_umad_write(struct file if (ret) goto err_send; - up_read(&file->port->mutex); + RW_UP_READ(&file->port->mutex); return count; err_send: @@ -568,7 +587,7 @@ err_msg: err_ah: ib_destroy_ah(ah); err_up: - up_read(&file->port->mutex); + RW_UP_READ(&file->port->mutex); err: kfree(packet); return ret; @@ -597,7 +616,7 @@ static int ib_umad_reg_agent(struct ib_u int agent_id; int ret; - down_write(&file->port->mutex); + RW_DOWN_WRITE(&file->port->mutex); if (!file->port->ib_dev) { ret = -EPIPE; @@ -650,7 +669,7 @@ found: ret = 0; out: - up_write(&file->port->mutex); + RW_UP_WRITE(&file->port->mutex); return ret; } @@ -663,7 +682,7 @@ static int ib_umad_unreg_agent(struct ib if (get_user(id, (u32 __user *) arg)) return -EFAULT; - down_write(&file->port->mutex); + RW_DOWN_WRITE(&file->port->mutex); if (id < 0 || id >= IB_UMAD_MAX_AGENTS || !__get_agent(file, id)) { ret = -EINVAL; @@ -674,7 +693,7 @@ static int ib_umad_unreg_agent(struct ib file->agent[id] = NULL; out: - up_write(&file->port->mutex); + RW_UP_WRITE(&file->port->mutex); if (agent) ib_unregister_mad_agent(agent); @@ -710,7 +729,7 @@ static int ib_umad_open(struct inode *in if (!port) return -ENXIO; - down_write(&port->mutex); + RW_DOWN_WRITE(&port->mutex); if (!port->ib_dev) { ret = -ENXIO; @@ -736,7 +755,7 @@ static int ib_umad_open(struct inode *in list_add_tail(&file->port_list, &port->file_list); out: - up_write(&port->mutex); + RW_UP_WRITE(&port->mutex); return ret; } @@ -748,7 +767,7 @@ static int ib_umad_close(struct inode *i int already_dead; int i; - down_write(&file->port->mutex); + RW_DOWN_WRITE(&file->port->mutex); already_dead = file->agents_dead; file->agents_dead = 1; @@ -761,14 +780,14 @@ static int ib_umad_close(struct inode *i list_del(&file->port_list); - downgrade_write(&file->port->mutex); + RW_DOWNGRADE_WRITE(&file->port->mutex); if (!already_dead) for (i = 0; i < IB_UMAD_MAX_AGENTS; ++i) if (file->agent[i]) ib_unregister_mad_agent(file->agent[i]); - up_read(&file->port->mutex); + RW_UP_READ(&file->port->mutex); kfree(file); kref_put(&dev->ref, ib_umad_release_dev); @@ -839,10 +858,10 @@ static int ib_umad_sm_close(struct inode }; int ret = 0; - down_write(&port->mutex); + RW_DOWN_WRITE(&port->mutex); if (port->ib_dev) ret = ib_modify_port(port->ib_dev, port->port_num, 0, &props); - up_write(&port->mutex); + RW_UP_WRITE(&port->mutex); up(&port->sm_sem); @@ -992,7 +1011,7 @@ static void ib_umad_kill_port(struct ib_ umad_port[port->dev_num] = NULL; spin_unlock(&port_lock); - down_write(&port->mutex); + RW_DOWN_WRITE(&port->mutex); port->ib_dev = NULL; @@ -1017,17 +1036,17 @@ static void ib_umad_kill_port(struct ib_ file->agents_dead = 1; list_del_init(&file->port_list); - downgrade_write(&port->mutex); + RW_DOWNGRADE_WRITE(&port->mutex); for (id = 0; id < IB_UMAD_MAX_AGENTS; ++id) if (file->agent[id]) ib_unregister_mad_agent(file->agent[id]); - up_read(&port->mutex); - down_write(&port->mutex); + RW_UP_WRITE(&port->mutex); + RW_DOWN_WRITE(&port->mutex); } - up_write(&port->mutex); + RW_UP_WRITE(&port->mutex); clear_bit(port->dev_num, dev_map); } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org