Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jun 2018 09:57:21 +0200
From:      Hans Petter Selasky <hps@selasky.org>
To:        Matthew Macy <mmacy@freebsd.org>, Ryan Libby <rlibby@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org, bde@freebsd.org
Subject:   Re: svn commit: r335094 - head/sys/ofed/drivers/infiniband/core
Message-ID:  <838bc229-a54c-8fd6-ef05-d503a9e4cbe9@selasky.org>
In-Reply-To: <c14b6b39-22b3-cdb5-d387-829bad3509f3@selasky.org>
References:  <201806132330.w5DNUsrE043573@repo.freebsd.org> <CAHgpiFwQza_CEeu687s-HwnHPT%2BfcPk80nHkbU3Kn-aUM2AjHQ@mail.gmail.com> <CAPrugNq-dGjOhJ7PW5zniggowENW74P5ttCWH01U=AmXcj4gzA@mail.gmail.com> <c14b6b39-22b3-cdb5-d387-829bad3509f3@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <rlibby@freebsd.org> wrote:
>>> On Wed, Jun 13, 2018 at 4:30 PM, Matt Macy <mmacy@freebsd.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?838bc229-a54c-8fd6-ef05-d503a9e4cbe9>