linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* undefined reference to `__aeabi_uldivmod' after 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type")
@ 2019-05-14 19:45 Nathan Chancellor
  2019-05-15  0:32 ` Jason Gunthorpe
  2019-05-15  0:34 ` Jason Gunthorpe
  0 siblings, 2 replies; 11+ messages in thread
From: Nathan Chancellor @ 2019-05-14 19:45 UTC (permalink / raw)
  To: Ariel Levkovich, Eli Cohen, Mark Bloch, Leon Romanovsky,
	Jason Gunthorpe, Doug Ledford
  Cc: linux-rdma, linux-kernel

Hi all,

I checked the RDMA mailing list and trees and I haven't seen this
reported/fixed yet (forgive me if it has) but when building for arm32
with multi_v7_defconfig and the following configs (distilled from
allyesconfig):

CONFIG_INFINIBAND=y
CONFIG_INFINIBAND_ON_DEMAND_PAGING=y
CONFIG_INFINIBAND_USER_ACCESS=y
CONFIG_MLX5_CORE=y
CONFIG_MLX5_INFINIBAND=y

The following link time errors occur:

arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/main.o: in function `mlx5_ib_alloc_dm':
main.c:(.text+0x60c): undefined reference to `__aeabi_uldivmod'
arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/cmd.o: in function `mlx5_cmd_alloc_sw_icm':
cmd.c:(.text+0x6d4): undefined reference to `__aeabi_uldivmod'
arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/cmd.o: in function `mlx5_cmd_dealloc_sw_icm':
cmd.c:(.text+0x9ec): undefined reference to `__aeabi_uldivmod'

Bisect log:

git bisect start
# good: [e93c9c99a629c61837d5a7fc2120cd2b6c70dbdd] Linux 5.1
git bisect good e93c9c99a629c61837d5a7fc2120cd2b6c70dbdd
# bad: [63863ee8e2f6f6ae47be3dff4af2f2806f5ca2dd] Merge tag 'gcc-plugins-v5.2-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/kees/linux
git bisect bad 63863ee8e2f6f6ae47be3dff4af2f2806f5ca2dd
# good: [80f232121b69cc69a31ccb2b38c1665d770b0710] Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
git bisect good 80f232121b69cc69a31ccb2b38c1665d770b0710
# good: [a2d635decbfa9c1e4ae15cb05b68b2559f7f827c] Merge tag 'drm-next-2019-05-09' of git://anongit.freedesktop.org/drm/drm
git bisect good a2d635decbfa9c1e4ae15cb05b68b2559f7f827c
# bad: [8e4ff713ce313dcabbb60e6ede1ffc193e67631f] Merge tag 'rtc-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
git bisect bad 8e4ff713ce313dcabbb60e6ede1ffc193e67631f
# good: [055128ee008b00fba14e3638e7e84fc2cff8d77d] Merge tag 'dmaengine-5.2-rc1' of git://git.infradead.org/users/vkoul/slave-dma
git bisect good 055128ee008b00fba14e3638e7e84fc2cff8d77d
# bad: [abde77eb5c66b2f98539c4644b54f34b7e179e6b] Merge branch 'for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
git bisect bad abde77eb5c66b2f98539c4644b54f34b7e179e6b
# good: [3b70508a6bfbdc78b565e9da22fd98483263494e] RDMA/mlx5: Create flow table with max size supported
git bisect good 3b70508a6bfbdc78b565e9da22fd98483263494e
# bad: [e7a5b4aafd82771f8924905c208d5d236ddcb671] RDMA/device: Don't fire uevent before device is fully initialized
git bisect bad e7a5b4aafd82771f8924905c208d5d236ddcb671
# good: [dd05cb828d0ebecd3d772075fccb85ec3618bedf] RDMA: Get rid of iw_cm_verbs
git bisect good dd05cb828d0ebecd3d772075fccb85ec3618bedf
# bad: [a808273a495c657e33281b181fd7fcc2bb28f662] RDMA/verbs: Add a DMA iterator to return aligned contiguous memory blocks
git bisect bad a808273a495c657e33281b181fd7fcc2bb28f662
# good: [3a4ef2e2b5cf9a34bcc66c0d33f7eba180a14535] RDMA/rdmavt: Catch use-after-free access of AH structures
git bisect good 3a4ef2e2b5cf9a34bcc66c0d33f7eba180a14535
# bad: [33cde96fb5d7ae36207541c8a832d7fae3cadbde] IB/mlx5: Device resource control for privileged DEVX user
git bisect bad 33cde96fb5d7ae36207541c8a832d7fae3cadbde
# good: [4056b12efd43248d8331b6ed93df5ea5250106a9] IB/mlx5: Warn on allocated MEMIC buffers during cleanup
git bisect good 4056b12efd43248d8331b6ed93df5ea5250106a9
# bad: [25c13324d03d004f9e8071bf5bf5d5c6fdace71e] IB/mlx5: Add steering SW ICM device memory type
git bisect bad 25c13324d03d004f9e8071bf5bf5d5c6fdace71e
# first bad commit: [25c13324d03d004f9e8071bf5bf5d5c6fdace71e] IB/mlx5: Add steering SW ICM device memory type

DIV_ROUND_UP is u64 / u32 in this case. I think DIV_ROUND_UP_ULL is
needed but I am not sure if that has any unintended side effects so I
didn't want to send a patch.

I would appreciate if you guys could look into this.

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: undefined reference to `__aeabi_uldivmod' after 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type")
  2019-05-14 19:45 undefined reference to `__aeabi_uldivmod' after 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type") Nathan Chancellor
@ 2019-05-15  0:32 ` Jason Gunthorpe
  2019-05-15  5:03   ` Leon Romanovsky
  2019-05-15  0:34 ` Jason Gunthorpe
  1 sibling, 1 reply; 11+ messages in thread
From: Jason Gunthorpe @ 2019-05-15  0:32 UTC (permalink / raw)
  To: Nathan Chancellor, fengguang.wu, kbuild
  Cc: Ariel Levkovich, Eli Cohen, Mark Bloch, Leon Romanovsky,
	Doug Ledford, linux-rdma, linux-kernel

On Tue, May 14, 2019 at 12:45:10PM -0700, Nathan Chancellor wrote:
> Hi all,
> 
> I checked the RDMA mailing list and trees and I haven't seen this
> reported/fixed yet (forgive me if it has) but when building for arm32
> with multi_v7_defconfig and the following configs (distilled from
> allyesconfig):
> 
> CONFIG_INFINIBAND=y
> CONFIG_INFINIBAND_ON_DEMAND_PAGING=y
> CONFIG_INFINIBAND_USER_ACCESS=y
> CONFIG_MLX5_CORE=y
> CONFIG_MLX5_INFINIBAND=y
> 
> The following link time errors occur:
> 
> arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/main.o: in function `mlx5_ib_alloc_dm':
> main.c:(.text+0x60c): undefined reference to `__aeabi_uldivmod'
> arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/cmd.o: in function `mlx5_cmd_alloc_sw_icm':
> cmd.c:(.text+0x6d4): undefined reference to `__aeabi_uldivmod'
> arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/cmd.o: in function `mlx5_cmd_dealloc_sw_icm':
> cmd.c:(.text+0x9ec): undefined reference to `__aeabi_uldivmod'

Fengguang, I'm surprised that 0-day didn't report this earlier.. 

and come to think of it, I haven't seen a success email from 0-day for
the rdma trees in some time - is it still working?

Thanks,
Jason

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: undefined reference to `__aeabi_uldivmod' after 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type")
  2019-05-14 19:45 undefined reference to `__aeabi_uldivmod' after 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type") Nathan Chancellor
  2019-05-15  0:32 ` Jason Gunthorpe
@ 2019-05-15  0:34 ` Jason Gunthorpe
  2019-05-15  5:04   ` Leon Romanovsky
  1 sibling, 1 reply; 11+ messages in thread
From: Jason Gunthorpe @ 2019-05-15  0:34 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Ariel Levkovich, Eli Cohen, Mark Bloch, Leon Romanovsky,
	Doug Ledford, linux-rdma, linux-kernel

On Tue, May 14, 2019 at 12:45:10PM -0700, Nathan Chancellor wrote:
> DIV_ROUND_UP is u64 / u32 in this case. I think DIV_ROUND_UP_ULL is
> needed but I am not sure if that has any unintended side effects so I
> didn't want to send a patch.

Hmm. Most likely those u64 length's should really be size_t. 

Ariel?

Jason

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: undefined reference to `__aeabi_uldivmod' after 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type")
  2019-05-15  0:32 ` Jason Gunthorpe
@ 2019-05-15  5:03   ` Leon Romanovsky
  2019-05-15  6:31     ` Arnd Bergmann
  0 siblings, 1 reply; 11+ messages in thread
From: Leon Romanovsky @ 2019-05-15  5:03 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Nathan Chancellor, fengguang.wu, kbuild, Ariel Levkovich,
	Eli Cohen, Mark Bloch, Doug Ledford, linux-rdma, linux-kernel

On Tue, May 14, 2019 at 09:32:02PM -0300, Jason Gunthorpe wrote:
> On Tue, May 14, 2019 at 12:45:10PM -0700, Nathan Chancellor wrote:
> > Hi all,
> >
> > I checked the RDMA mailing list and trees and I haven't seen this
> > reported/fixed yet (forgive me if it has) but when building for arm32
> > with multi_v7_defconfig and the following configs (distilled from
> > allyesconfig):
> >
> > CONFIG_INFINIBAND=y
> > CONFIG_INFINIBAND_ON_DEMAND_PAGING=y
> > CONFIG_INFINIBAND_USER_ACCESS=y
> > CONFIG_MLX5_CORE=y
> > CONFIG_MLX5_INFINIBAND=y
> >
> > The following link time errors occur:
> >
> > arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/main.o: in function `mlx5_ib_alloc_dm':
> > main.c:(.text+0x60c): undefined reference to `__aeabi_uldivmod'
> > arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/cmd.o: in function `mlx5_cmd_alloc_sw_icm':
> > cmd.c:(.text+0x6d4): undefined reference to `__aeabi_uldivmod'
> > arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/cmd.o: in function `mlx5_cmd_dealloc_sw_icm':
> > cmd.c:(.text+0x9ec): undefined reference to `__aeabi_uldivmod'
>
> Fengguang, I'm surprised that 0-day didn't report this earlier..

I got many successful emails after I pushed this patch to 0-day testing.

>
> and come to think of it, I haven't seen a success email from 0-day for
> the rdma trees in some time - is it still working?
>
> Thanks,
> Jason

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: undefined reference to `__aeabi_uldivmod' after 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type")
  2019-05-15  0:34 ` Jason Gunthorpe
@ 2019-05-15  5:04   ` Leon Romanovsky
  0 siblings, 0 replies; 11+ messages in thread
From: Leon Romanovsky @ 2019-05-15  5:04 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Nathan Chancellor, Ariel Levkovich, Eli Cohen, Mark Bloch,
	Doug Ledford, linux-rdma, linux-kernel

On Wed, May 15, 2019 at 12:34:00AM +0000, Jason Gunthorpe wrote:
> On Tue, May 14, 2019 at 12:45:10PM -0700, Nathan Chancellor wrote:
> > DIV_ROUND_UP is u64 / u32 in this case. I think DIV_ROUND_UP_ULL is
> > needed but I am not sure if that has any unintended side effects so I
> > didn't want to send a patch.
>
> Hmm. Most likely those u64 length's should really be size_t.

Indeed, it should be size_t.

>
> Ariel?
>
> Jason

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: undefined reference to `__aeabi_uldivmod' after 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type")
  2019-05-15  5:03   ` Leon Romanovsky
@ 2019-05-15  6:31     ` Arnd Bergmann
  2019-05-15  6:40       ` Nathan Chancellor
  0 siblings, 1 reply; 11+ messages in thread
From: Arnd Bergmann @ 2019-05-15  6:31 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Jason Gunthorpe, Nathan Chancellor, fengguang.wu, kbuild,
	Ariel Levkovich, Eli Cohen, Mark Bloch, Doug Ledford, linux-rdma,
	linux-kernel

On Wed, May 15, 2019 at 7:04 AM Leon Romanovsky <leonro@mellanox.com> wrote:
> On Tue, May 14, 2019 at 09:32:02PM -0300, Jason Gunthorpe wrote:
> > On Tue, May 14, 2019 at 12:45:10PM -0700, Nathan Chancellor wrote:
> > > Hi all,
> > >
> > > I checked the RDMA mailing list and trees and I haven't seen this
> > > reported/fixed yet (forgive me if it has) but when building for arm32
> > > with multi_v7_defconfig and the following configs (distilled from
> > > allyesconfig):
> > >
> > > CONFIG_INFINIBAND=y
> > > CONFIG_INFINIBAND_ON_DEMAND_PAGING=y
> > > CONFIG_INFINIBAND_USER_ACCESS=y
> > > CONFIG_MLX5_CORE=y
> > > CONFIG_MLX5_INFINIBAND=y
> > >
> > > The following link time errors occur:
> > >
> > > arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/main.o: in function `mlx5_ib_alloc_dm':
> > > main.c:(.text+0x60c): undefined reference to `__aeabi_uldivmod'
> > > arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/cmd.o: in function `mlx5_cmd_alloc_sw_icm':
> > > cmd.c:(.text+0x6d4): undefined reference to `__aeabi_uldivmod'
> > > arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/cmd.o: in function `mlx5_cmd_dealloc_sw_icm':
> > > cmd.c:(.text+0x9ec): undefined reference to `__aeabi_uldivmod'
> >
> > Fengguang, I'm surprised that 0-day didn't report this earlier..
>
> I got many successful emails after I pushed this patch to 0-day testing.

The long division warnings can compiler specific, and depend on certain
optimization options, as compilers can optimize out certain divisions and
replace them with multiplications and/or shifts, or prove that they can be
replaced with a 32-bit division. If this is a case that gcc manages to
optimize but clang does not, it might be worth looking into whether an
optimization can be added to clang, in addition to improving the source.

     Arnd

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: undefined reference to `__aeabi_uldivmod' after 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type")
  2019-05-15  6:31     ` Arnd Bergmann
@ 2019-05-15  6:40       ` Nathan Chancellor
  2019-05-15  6:42         ` Arnd Bergmann
  0 siblings, 1 reply; 11+ messages in thread
From: Nathan Chancellor @ 2019-05-15  6:40 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Leon Romanovsky, Jason Gunthorpe, fengguang.wu, kbuild,
	Ariel Levkovich, Eli Cohen, Mark Bloch, Doug Ledford, linux-rdma,
	linux-kernel

On Wed, May 15, 2019 at 08:31:49AM +0200, Arnd Bergmann wrote:
> On Wed, May 15, 2019 at 7:04 AM Leon Romanovsky <leonro@mellanox.com> wrote:
> > On Tue, May 14, 2019 at 09:32:02PM -0300, Jason Gunthorpe wrote:
> > > On Tue, May 14, 2019 at 12:45:10PM -0700, Nathan Chancellor wrote:
> > > > Hi all,
> > > >
> > > > I checked the RDMA mailing list and trees and I haven't seen this
> > > > reported/fixed yet (forgive me if it has) but when building for arm32
> > > > with multi_v7_defconfig and the following configs (distilled from
> > > > allyesconfig):
> > > >
> > > > CONFIG_INFINIBAND=y
> > > > CONFIG_INFINIBAND_ON_DEMAND_PAGING=y
> > > > CONFIG_INFINIBAND_USER_ACCESS=y
> > > > CONFIG_MLX5_CORE=y
> > > > CONFIG_MLX5_INFINIBAND=y
> > > >
> > > > The following link time errors occur:
> > > >
> > > > arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/main.o: in function `mlx5_ib_alloc_dm':
> > > > main.c:(.text+0x60c): undefined reference to `__aeabi_uldivmod'
> > > > arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/cmd.o: in function `mlx5_cmd_alloc_sw_icm':
> > > > cmd.c:(.text+0x6d4): undefined reference to `__aeabi_uldivmod'
> > > > arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/cmd.o: in function `mlx5_cmd_dealloc_sw_icm':
> > > > cmd.c:(.text+0x9ec): undefined reference to `__aeabi_uldivmod'
> > >
> > > Fengguang, I'm surprised that 0-day didn't report this earlier..
> >
> > I got many successful emails after I pushed this patch to 0-day testing.
> 
> The long division warnings can compiler specific, and depend on certain
> optimization options, as compilers can optimize out certain divisions and
> replace them with multiplications and/or shifts, or prove that they can be
> replaced with a 32-bit division. If this is a case that gcc manages to
> optimize but clang does not, it might be worth looking into whether an
> optimization can be added to clang, in addition to improving the source.
> 
>      Arnd

While I did run initially run into this with clang, the errors above are
with gcc (mainly to show this was going to be a universal problem and
not just something with clang).

Nathan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: undefined reference to `__aeabi_uldivmod' after 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type")
  2019-05-15  6:40       ` Nathan Chancellor
@ 2019-05-15  6:42         ` Arnd Bergmann
  2019-05-15  6:49           ` Nathan Chancellor
  0 siblings, 1 reply; 11+ messages in thread
From: Arnd Bergmann @ 2019-05-15  6:42 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Leon Romanovsky, Jason Gunthorpe, fengguang.wu, kbuild,
	Ariel Levkovich, Eli Cohen, Mark Bloch, Doug Ledford, linux-rdma,
	linux-kernel

On Wed, May 15, 2019 at 8:40 AM Nathan Chancellor
<natechancellor@gmail.com> wrote:
> On Wed, May 15, 2019 at 08:31:49AM +0200, Arnd Bergmann wrote:
> > On Wed, May 15, 2019 at 7:04 AM Leon Romanovsky <leonro@mellanox.com> wrote:
> > > On Tue, May 14, 2019 at 09:32:02PM -0300, Jason Gunthorpe wrote:
> > > > On Tue, May 14, 2019 at 12:45:10PM -0700, Nathan Chancellor wrote:
> > > > > Hi all,
> > > > >
> > > > > I checked the RDMA mailing list and trees and I haven't seen this
> > > > > reported/fixed yet (forgive me if it has) but when building for arm32
> > > > > with multi_v7_defconfig and the following configs (distilled from
> > > > > allyesconfig):
> > > > >
> > > > > CONFIG_INFINIBAND=y
> > > > > CONFIG_INFINIBAND_ON_DEMAND_PAGING=y
> > > > > CONFIG_INFINIBAND_USER_ACCESS=y
> > > > > CONFIG_MLX5_CORE=y
> > > > > CONFIG_MLX5_INFINIBAND=y
> > > > >
> > > > > The following link time errors occur:
> > > > >
> > > > > arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/main.o: in function `mlx5_ib_alloc_dm':
> > > > > main.c:(.text+0x60c): undefined reference to `__aeabi_uldivmod'
> > > > > arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/cmd.o: in function `mlx5_cmd_alloc_sw_icm':
> > > > > cmd.c:(.text+0x6d4): undefined reference to `__aeabi_uldivmod'
> > > > > arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/cmd.o: in function `mlx5_cmd_dealloc_sw_icm':
> > > > > cmd.c:(.text+0x9ec): undefined reference to `__aeabi_uldivmod'
> > > >
> > > > Fengguang, I'm surprised that 0-day didn't report this earlier..
> > >
> > > I got many successful emails after I pushed this patch to 0-day testing.
> >
> > The long division warnings can compiler specific, and depend on certain
> > optimization options, as compilers can optimize out certain divisions and
> > replace them with multiplications and/or shifts, or prove that they can be
> > replaced with a 32-bit division. If this is a case that gcc manages to
> > optimize but clang does not, it might be worth looking into whether an
> > optimization can be added to clang, in addition to improving the source.
>
> While I did run initially run into this with clang, the errors above are
> with gcc (mainly to show this was going to be a universal problem and
> not just something with clang).

Which gcc version did you use here? Anything particularly old or particularly
new? I think 0-day is on a fairly recent gcc-8, but not the latest gcc-9
release.

    Arnd

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: undefined reference to `__aeabi_uldivmod' after 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type")
  2019-05-15  6:42         ` Arnd Bergmann
@ 2019-05-15  6:49           ` Nathan Chancellor
  2019-05-16  2:21             ` Fengguang Wu
  0 siblings, 1 reply; 11+ messages in thread
From: Nathan Chancellor @ 2019-05-15  6:49 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Leon Romanovsky, Jason Gunthorpe, fengguang.wu, kbuild,
	Ariel Levkovich, Eli Cohen, Mark Bloch, Doug Ledford, linux-rdma,
	linux-kernel

On Wed, May 15, 2019 at 08:42:13AM +0200, Arnd Bergmann wrote:
> On Wed, May 15, 2019 at 8:40 AM Nathan Chancellor
> <natechancellor@gmail.com> wrote:
> > On Wed, May 15, 2019 at 08:31:49AM +0200, Arnd Bergmann wrote:
> > > On Wed, May 15, 2019 at 7:04 AM Leon Romanovsky <leonro@mellanox.com> wrote:
> > > > On Tue, May 14, 2019 at 09:32:02PM -0300, Jason Gunthorpe wrote:
> > > > > On Tue, May 14, 2019 at 12:45:10PM -0700, Nathan Chancellor wrote:
> > > > > > Hi all,
> > > > > >
> > > > > > I checked the RDMA mailing list and trees and I haven't seen this
> > > > > > reported/fixed yet (forgive me if it has) but when building for arm32
> > > > > > with multi_v7_defconfig and the following configs (distilled from
> > > > > > allyesconfig):
> > > > > >
> > > > > > CONFIG_INFINIBAND=y
> > > > > > CONFIG_INFINIBAND_ON_DEMAND_PAGING=y
> > > > > > CONFIG_INFINIBAND_USER_ACCESS=y
> > > > > > CONFIG_MLX5_CORE=y
> > > > > > CONFIG_MLX5_INFINIBAND=y
> > > > > >
> > > > > > The following link time errors occur:
> > > > > >
> > > > > > arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/main.o: in function `mlx5_ib_alloc_dm':
> > > > > > main.c:(.text+0x60c): undefined reference to `__aeabi_uldivmod'
> > > > > > arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/cmd.o: in function `mlx5_cmd_alloc_sw_icm':
> > > > > > cmd.c:(.text+0x6d4): undefined reference to `__aeabi_uldivmod'
> > > > > > arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/cmd.o: in function `mlx5_cmd_dealloc_sw_icm':
> > > > > > cmd.c:(.text+0x9ec): undefined reference to `__aeabi_uldivmod'
> > > > >
> > > > > Fengguang, I'm surprised that 0-day didn't report this earlier..
> > > >
> > > > I got many successful emails after I pushed this patch to 0-day testing.
> > >
> > > The long division warnings can compiler specific, and depend on certain
> > > optimization options, as compilers can optimize out certain divisions and
> > > replace them with multiplications and/or shifts, or prove that they can be
> > > replaced with a 32-bit division. If this is a case that gcc manages to
> > > optimize but clang does not, it might be worth looking into whether an
> > > optimization can be added to clang, in addition to improving the source.
> >
> > While I did run initially run into this with clang, the errors above are
> > with gcc (mainly to show this was going to be a universal problem and
> > not just something with clang).
> 
> Which gcc version did you use here? Anything particularly old or particularly
> new? I think 0-day is on a fairly recent gcc-8, but not the latest gcc-9
> release.

8.2.0 it seems (I've been meaning to build from the 9.x branch though
since it appears that Arch's arm-linux-gnueabi-gcc isn't going to get
updated since it's in the AUR).

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: undefined reference to `__aeabi_uldivmod' after 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type")
  2019-05-15  6:49           ` Nathan Chancellor
@ 2019-05-16  2:21             ` Fengguang Wu
  2019-05-16 12:57               ` Chen, Rong A
  0 siblings, 1 reply; 11+ messages in thread
From: Fengguang Wu @ 2019-05-16  2:21 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Arnd Bergmann, Leon Romanovsky, Jason Gunthorpe, kbuild,
	Ariel Levkovich, Eli Cohen, Mark Bloch, Doug Ledford, linux-rdma,
	linux-kernel, Philip Li, Rong Chen

CC current 0day kbuild test maintainers Philip and Rong. -fengguang

On Tue, May 14, 2019 at 11:49:18PM -0700, Nathan Chancellor wrote:
>On Wed, May 15, 2019 at 08:42:13AM +0200, Arnd Bergmann wrote:
>> On Wed, May 15, 2019 at 8:40 AM Nathan Chancellor
>> <natechancellor@gmail.com> wrote:
>> > On Wed, May 15, 2019 at 08:31:49AM +0200, Arnd Bergmann wrote:
>> > > On Wed, May 15, 2019 at 7:04 AM Leon Romanovsky <leonro@mellanox.com> wrote:
>> > > > On Tue, May 14, 2019 at 09:32:02PM -0300, Jason Gunthorpe wrote:
>> > > > > On Tue, May 14, 2019 at 12:45:10PM -0700, Nathan Chancellor wrote:
>> > > > > > Hi all,
>> > > > > >
>> > > > > > I checked the RDMA mailing list and trees and I haven't seen this
>> > > > > > reported/fixed yet (forgive me if it has) but when building for arm32
>> > > > > > with multi_v7_defconfig and the following configs (distilled from
>> > > > > > allyesconfig):
>> > > > > >
>> > > > > > CONFIG_INFINIBAND=y
>> > > > > > CONFIG_INFINIBAND_ON_DEMAND_PAGING=y
>> > > > > > CONFIG_INFINIBAND_USER_ACCESS=y
>> > > > > > CONFIG_MLX5_CORE=y
>> > > > > > CONFIG_MLX5_INFINIBAND=y
>> > > > > >
>> > > > > > The following link time errors occur:
>> > > > > >
>> > > > > > arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/main.o: in function `mlx5_ib_alloc_dm':
>> > > > > > main.c:(.text+0x60c): undefined reference to `__aeabi_uldivmod'
>> > > > > > arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/cmd.o: in function `mlx5_cmd_alloc_sw_icm':
>> > > > > > cmd.c:(.text+0x6d4): undefined reference to `__aeabi_uldivmod'
>> > > > > > arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/cmd.o: in function `mlx5_cmd_dealloc_sw_icm':
>> > > > > > cmd.c:(.text+0x9ec): undefined reference to `__aeabi_uldivmod'
>> > > > >
>> > > > > Fengguang, I'm surprised that 0-day didn't report this earlier..
>> > > >
>> > > > I got many successful emails after I pushed this patch to 0-day testing.
>> > >
>> > > The long division warnings can compiler specific, and depend on certain
>> > > optimization options, as compilers can optimize out certain divisions and
>> > > replace them with multiplications and/or shifts, or prove that they can be
>> > > replaced with a 32-bit division. If this is a case that gcc manages to
>> > > optimize but clang does not, it might be worth looking into whether an
>> > > optimization can be added to clang, in addition to improving the source.
>> >
>> > While I did run initially run into this with clang, the errors above are
>> > with gcc (mainly to show this was going to be a universal problem and
>> > not just something with clang).
>>
>> Which gcc version did you use here? Anything particularly old or particularly
>> new? I think 0-day is on a fairly recent gcc-8, but not the latest gcc-9
>> release.
>
>8.2.0 it seems (I've been meaning to build from the 9.x branch though
>since it appears that Arch's arm-linux-gnueabi-gcc isn't going to get
>updated since it's in the AUR).
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: undefined reference to `__aeabi_uldivmod' after 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type")
  2019-05-16  2:21             ` Fengguang Wu
@ 2019-05-16 12:57               ` Chen, Rong A
  0 siblings, 0 replies; 11+ messages in thread
From: Chen, Rong A @ 2019-05-16 12:57 UTC (permalink / raw)
  To: Fengguang Wu, Nathan Chancellor
  Cc: Arnd Bergmann, Leon Romanovsky, Jason Gunthorpe, kbuild,
	Ariel Levkovich, Eli Cohen, Mark Bloch, Doug Ledford, linux-rdma,
	linux-kernel, Philip Li

Hi,

On 5/16/2019 10:21 AM, Fengguang Wu wrote:
> CC current 0day kbuild test maintainers Philip and Rong. -fengguang
>
> On Tue, May 14, 2019 at 11:49:18PM -0700, Nathan Chancellor wrote:
>> On Wed, May 15, 2019 at 08:42:13AM +0200, Arnd Bergmann wrote:
>>> On Wed, May 15, 2019 at 8:40 AM Nathan Chancellor
>>> <natechancellor@gmail.com> wrote:
>>> > On Wed, May 15, 2019 at 08:31:49AM +0200, Arnd Bergmann wrote:
>>> > > On Wed, May 15, 2019 at 7:04 AM Leon Romanovsky 
>>> <leonro@mellanox.com> wrote:
>>> > > > On Tue, May 14, 2019 at 09:32:02PM -0300, Jason Gunthorpe wrote:
>>> > > > > On Tue, May 14, 2019 at 12:45:10PM -0700, Nathan Chancellor 
>>> wrote:
>>> > > > > > Hi all,
>>> > > > > >
>>> > > > > > I checked the RDMA mailing list and trees and I haven't 
>>> seen this
>>> > > > > > reported/fixed yet (forgive me if it has) but when 
>>> building for arm32
>>> > > > > > with multi_v7_defconfig and the following configs 
>>> (distilled from
>>> > > > > > allyesconfig):
>>> > > > > >
>>> > > > > > CONFIG_INFINIBAND=y
>>> > > > > > CONFIG_INFINIBAND_ON_DEMAND_PAGING=y
>>> > > > > > CONFIG_INFINIBAND_USER_ACCESS=y
>>> > > > > > CONFIG_MLX5_CORE=y
>>> > > > > > CONFIG_MLX5_INFINIBAND=y
>>> > > > > >
>>> > > > > > The following link time errors occur:
>>> > > > > >
>>> > > > > > arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/main.o: 
>>> in function `mlx5_ib_alloc_dm':
>>> > > > > > main.c:(.text+0x60c): undefined reference to 
>>> `__aeabi_uldivmod'
>>> > > > > > arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/cmd.o: in 
>>> function `mlx5_cmd_alloc_sw_icm':
>>> > > > > > cmd.c:(.text+0x6d4): undefined reference to 
>>> `__aeabi_uldivmod'
>>> > > > > > arm-linux-gnueabi-ld: drivers/infiniband/hw/mlx5/cmd.o: in 
>>> function `mlx5_cmd_dealloc_sw_icm':
>>> > > > > > cmd.c:(.text+0x9ec): undefined reference to 
>>> `__aeabi_uldivmod'
>>> > > > >
>>> > > > > Fengguang, I'm surprised that 0-day didn't report this 
>>> earlier..
>>> > > >
>>> > > > I got many successful emails after I pushed this patch to 
>>> 0-day testing.
>>> > >
>>> > > The long division warnings can compiler specific, and depend on 
>>> certain
>>> > > optimization options, as compilers can optimize out certain 
>>> divisions and
>>> > > replace them with multiplications and/or shifts, or prove that 
>>> they can be
>>> > > replaced with a 32-bit division. If this is a case that gcc 
>>> manages to
>>> > > optimize but clang does not, it might be worth looking into 
>>> whether an
>>> > > optimization can be added to clang, in addition to improving the 
>>> source.
>>> >
>>> > While I did run initially run into this with clang, the errors 
>>> above are
>>> > with gcc (mainly to show this was going to be a universal problem and
>>> > not just something with clang).
>>>
>>> Which gcc version did you use here? Anything particularly old or 
>>> particularly
>>> new? I think 0-day is on a fairly recent gcc-8, but not the latest 
>>> gcc-9
>>> release.
>>
>> 8.2.0 it seems (I've been meaning to build from the 9.x branch though
>> since it appears that Arch's arm-linux-gnueabi-gcc isn't going to get
>> updated since it's in the AUR).
>>
Thanks for the reminding, we met some problems with gcc 8.1.0 once,

then we uses "arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0" as the 
default gcc for arm,

It seems we have missed some build issues detected by new gcc. we're 
going to upgrade gcc ASAP.

Best Regards,
Rong Chen

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-05-16 12:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-14 19:45 undefined reference to `__aeabi_uldivmod' after 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type") Nathan Chancellor
2019-05-15  0:32 ` Jason Gunthorpe
2019-05-15  5:03   ` Leon Romanovsky
2019-05-15  6:31     ` Arnd Bergmann
2019-05-15  6:40       ` Nathan Chancellor
2019-05-15  6:42         ` Arnd Bergmann
2019-05-15  6:49           ` Nathan Chancellor
2019-05-16  2:21             ` Fengguang Wu
2019-05-16 12:57               ` Chen, Rong A
2019-05-15  0:34 ` Jason Gunthorpe
2019-05-15  5:04   ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).