Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp222824yba; Tue, 14 May 2019 23:34:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqyaVRqN1B5nhPs0WDX06jsBirmmLrkWWGijY3FuVzzfoINUMyD+vdEmPpbDYSMNQOFPTOaS X-Received: by 2002:a17:902:2f03:: with SMTP id s3mr15277687plb.203.1557902084670; Tue, 14 May 2019 23:34:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557902084; cv=none; d=google.com; s=arc-20160816; b=KmggwHggP3QRxazg1uJwZP4aBF1fbXTfqZg7asnYC0hoeZY8gIsQO7SjH8nee7xVdX wqfLcjT1SFMhiL2GVl7bMzQvvBd2/Bvu0lqhMV8fD4r4SnfBhRm/lpqZToomJe2kvfbC E3bDz99k7gHdxdIBfdsVZjFxMRfBuJY3frat97MqYUaSUaNEDYhsfZowtT8dyZQa1hit 6NQ/qoM5QVRxSxXzfLgwFJnzH0gPgujU1ESwrzXkzXGXOAa2Cu4ryw4lkaa+3lbOLwNF hRbZaY5XaexyPlrwfAGzVzSfabKAInP17nWVSJ12FW2EVQCkYVLTTFHLMSA2fWb/T+ZI 6W1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=VYpboAKKRJlruLKnHnCbgX43ysiaopLHLgeir/JVrpg=; b=xhuNuP+B/CqbR7QR3bcpOfGyOclZQtQM8TnDAE6FqPQPpm30M5m0xJ3MWS9E443LbV VIGFGL9CVQcEAVictEZdgu590hGMLl/vXltXZ2YKOpnJIIC9Ut/oKlTxmx+uUYls3AIG qga76lecElD2REJM8LQvtLcQ1IgTcsnaroSB+XrvLjQ/ysqIFaVeL/NZnG/Wm4IzzRrO T+NF+FExY9fRUUVmNDIkj+LoPRPD41X3FUihipSqxDGf0mkJyXqLV5EXfo2rtED1ipDp 1SH8Upjdj8WX4iO9c+Z0bvC+Nr76MhNe5x6vHrersJBSns/zAgSBUiHp28divOz07B8Z m/Og== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f67si1007258plb.439.2019.05.14.23.34.29; Tue, 14 May 2019 23:34:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726338AbfEOGcH (ORCPT + 99 others); Wed, 15 May 2019 02:32:07 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:32959 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725876AbfEOGcH (ORCPT ); Wed, 15 May 2019 02:32:07 -0400 Received: by mail-qt1-f196.google.com with SMTP id m32so2062478qtf.0; Tue, 14 May 2019 23:32:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VYpboAKKRJlruLKnHnCbgX43ysiaopLHLgeir/JVrpg=; b=lhwK/kBaXljZ2vsY3hC3jFdK5ZxxAlkDmqkOQOE0dMmBGrAVGrelktPw2mTNXvkvP+ +mJRJ80d/NjElDyg2mKeYEWOXf6Cz+FpnE0/pWh8CyzTVkMU9L1YuM746gBCsR75OVC3 EppbroDoF1QZw4HwcVsV0T017SWnEd2BOhMqQG1eVHNiR+AwZTXqaMh5mxfwMU9u5e67 whnslZSup6r2X5Ge1/8+bmLmdW1hqLJ1MRq2d0lpU0TPwa5/e3q193M/GY0VxjHcFG3E rVzV31SA8bTTRAq57G0OvF11yv9CSFreJ9jmx/FDVImue7havPX6agF9WF3e9vpJoh3g ThUg== X-Gm-Message-State: APjAAAWONfUeLR8Ktfzn0u3KrPZDT6UPUILCU3mliN1mwoOpz2jg4sKT Wrn+ul6KUDdvxTU3ZTQeRv8etli5IHwcGqfOrRE= X-Received: by 2002:ac8:2d21:: with SMTP id n30mr32593475qta.96.1557901925866; Tue, 14 May 2019 23:32:05 -0700 (PDT) MIME-Version: 1.0 References: <20190514194510.GA15465@archlinux-i9> <20190515003202.GA14522@ziepe.ca> <20190515050331.GC5225@mtr-leonro.mtl.com> In-Reply-To: <20190515050331.GC5225@mtr-leonro.mtl.com> From: Arnd Bergmann Date: Wed, 15 May 2019 08:31:49 +0200 Message-ID: Subject: Re: undefined reference to `__aeabi_uldivmod' after 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type") To: Leon Romanovsky Cc: Jason Gunthorpe , Nathan Chancellor , "fengguang.wu@intel.com" , "kbuild@01.org" , Ariel Levkovich , Eli Cohen , Mark Bloch , Doug Ledford , "linux-rdma@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 15, 2019 at 7:04 AM Leon Romanovsky 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