svn commit: r335094 - head/sys/ofed/drivers/infiniband/core
Hans Petter Selasky
hps at selasky.org
Thu Jun 14 07:57:44 UTC 2018
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 at freebsd.org> wrote:
>>> On Wed, Jun 13, 2018 at 4:30 PM, Matt Macy <mmacy at 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
More information about the svn-src-all
mailing list