From owner-svn-src-head@freebsd.org Thu Jun 14 07:57:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEB93100D63C; Thu, 14 Jun 2018 07:57:43 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CEC87B72C; Thu, 14 Jun 2018 07:57:43 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id CD84B260199; Thu, 14 Jun 2018 09:57:38 +0200 (CEST) Subject: Re: svn commit: r335094 - head/sys/ofed/drivers/infiniband/core From: Hans Petter Selasky To: Matthew Macy , Ryan Libby Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, bde@freebsd.org References: <201806132330.w5DNUsrE043573@repo.freebsd.org> Message-ID: <838bc229-a54c-8fd6-ef05-d503a9e4cbe9@selasky.org> Date: Thu, 14 Jun 2018 09:57:21 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jun 2018 07:57:44 -0000 On 06/14/18 09:26, Hans Petter Selasky wrote: > On 06/14/18 02:03, Matthew Macy wrote: >> On Wed, Jun 13, 2018 at 4:47 PM, Ryan Libby wrote: >>> On Wed, Jun 13, 2018 at 4:30 PM, Matt Macy wrote: >>>> Author: mmacy >>>> Date: Wed Jun 13 23:30:54 2018 >>>> New Revision: 335094 >>>> URL: https://svnweb.freebsd.org/changeset/base/335094 >>>> >>>> Log: >>>>    fix OFED build after r335053 >>>> >>>> Modified: >>>>    head/sys/ofed/drivers/infiniband/core/ib_user_mad.c >>>> >>>> Modified: head/sys/ofed/drivers/infiniband/core/ib_user_mad.c >>>> ============================================================================== >>>> >>>> --- head/sys/ofed/drivers/infiniband/core/ib_user_mad.c Wed Jun 13 >>>> 23:19:54 2018        (r335093) >>>> +++ head/sys/ofed/drivers/infiniband/core/ib_user_mad.c Wed Jun 13 >>>> 23:30:54 2018        (r335094) >>>> @@ -130,7 +130,8 @@ struct ib_umad_packet { >>>> >>>>   static struct class *umad_class; >>>> >>>> -static const dev_t base_dev = MKDEV(IB_UMAD_MAJOR, >>>> IB_UMAD_MINOR_BASE); >>>> +#define IBMKDEV(x, y)  (((dev_t)(x) << 32) | (unsigned)(y)) >>>> +static const dev_t base_dev = IBMKDEV(IB_UMAD_MAJOR, >>>> IB_UMAD_MINOR_BASE); >>>> >>>>   static DEFINE_SPINLOCK(port_lock); >>>>   static DECLARE_BITMAP(dev_map, IB_UMAD_MAX_PORTS); >>>> >>> >>> The scheme for major/minor encoding is different as of r335053.  Won't >>> that matter? >> >> Yes. >> >>> In sys/ofed/drivers/infiniband/core/{ib_ucm.c,ib_uverbs_main.c} the >>> pattern is to #define the MKDEV().  Following that would in >>> ib_user_mad.c would also resolve this.  Or makedev could be >>> re-macroized with the new scheme. >> >> That's probably the best course of action. >> Will follow up. >> >> > > Hi, > > Please revert this patch and fix MKDEV() in: > compat/linuxkpi/common/include/linux/kdev_t.h > > Instead. > > The value returned by MKDEV() must be passable through MAJOR() and > MINOR() to restore the two arguments. Please make sure this is the case. > Else the code gets broken. > > --HPS > See r335123. --HPS