Received: by 10.192.165.148 with SMTP id m20csp3352110imm; Mon, 7 May 2018 10:45:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo9dTLqHGUGcyL+17oOHGV6heKS0MordzlON4h1qNW3ES9JGwPhEhQZKhPcKL6GvEj399rD X-Received: by 2002:a6b:957:: with SMTP id j84-v6mr41757721ioi.232.1525715123522; Mon, 07 May 2018 10:45:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525715123; cv=none; d=google.com; s=arc-20160816; b=AmjLyGt86zIJU2TgsPQTRrhWGpx2VD1g8gobZKUwJz6QwePoM3q3jvUfuQqSiWqVVT FMFP79ktyh9vmSpH/lSeus80cc6niUnn9DSFzjP7fng8Y3+sD24D/nlFHXJaGxCtJemM S1YzVf5L0Mzaz6CP9jAIZJAW1lt6gSMhpAFj4UFeRAkMgeCZKoTxTPxmKh4OpMB+g2xE HtL2cepmO94i0LEVd6L4pOHYgpgUq3azDTPCY7o0eOBZBoR9COcqtQNKEDmYiP66Go9l jACFNNg/YN2702xTcpRz/dacdfY9WokKe+l5kmVndhGB+6gq2PGxdd5KLkk0hEqe7XB3 qI0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=wSazBHwKaHKJA/XWIccnTgd/BHO3lJkpP5a4eBVqJo0=; b=C7nnpcL1omAJgig+Z1DpRBliiiNJy6cT7op/hoo1/ruhCpxBtQF+Nr1wFlc4ZoVdx+ uts77IS5MJqzEyWadPYF9/97zIq7O24nXumbSfL/eGXSvcqdL/RUmybeQQvbnj//VWxp dDSGYDBpHFeMH57k12/GElW49sA0GSFlGMQ2J6zyyOf9UticLLFqrWy/oPpZzjz5Wzgq +jRdnrpf2qtlvDdDkp9z1jKPyoBJa2uoei4MRbgX1PKOALP9tsIiJfoiTDwqnzm/2gvy uNaAmC74KR8+c8DbTL8yF3DR3uJzboqqnHXEDrni+Bhr0xChUt4ar0Ak8JtLX10xNL2o WRzQ== 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i14-v6si12807687ioo.12.2018.05.07.10.45.10; Mon, 07 May 2018 10:45:23 -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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752656AbeEGRog (ORCPT + 99 others); Mon, 7 May 2018 13:44:36 -0400 Received: from mga06.intel.com ([134.134.136.31]:19341 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751931AbeEGRod (ORCPT ); Mon, 7 May 2018 13:44:33 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 May 2018 10:44:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,375,1520924400"; d="scan'208";a="53156710" Received: from btopel-mobl1.isw.intel.com (HELO btopel-mobl1.ger.corp.intel.com) ([10.103.211.155]) by fmsmga001.fm.intel.com with ESMTP; 07 May 2018 10:44:30 -0700 From: =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= To: ast@fb.com, daniel@iogearbox.net, netdev@vger.kernel.org Cc: =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Randy Dunlap , Stephen Rothwell , magnus.karlsson@intel.com, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH bpf-next] xsk: fix 64-bit division Date: Mon, 7 May 2018 19:43:50 +0200 Message-Id: <20180507174350.3534-1-bjorn.topel@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Björn Töpel i386 builds report: net/xdp/xdp_umem.o: In function `xdp_umem_reg': xdp_umem.c:(.text+0x47e): undefined reference to `__udivdi3' This fix uses div_u64 instead of the GCC built-in. Fixes: c0c77d8fb787 ("xsk: add user memory registration support sockopt") Signed-off-by: Björn Töpel --- net/xdp/xdp_umem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/xdp/xdp_umem.c b/net/xdp/xdp_umem.c index 881dfdefe235..2b47a1dd7c6c 100644 --- a/net/xdp/xdp_umem.c +++ b/net/xdp/xdp_umem.c @@ -209,7 +209,7 @@ int xdp_umem_reg(struct xdp_umem *umem, struct xdp_umem_reg *mr) if ((addr + size) < addr) return -EINVAL; - nframes = size / frame_size; + nframes = (unsigned int)div_u64(size, frame_size); if (nframes == 0 || nframes > UINT_MAX) return -EINVAL; -- 2.14.1