Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1916882imm; Tue, 10 Jul 2018 09:58:20 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdOYqwI5rrKkyIevi8RWB8ZHZz42z/uHiHslOIGz6UDUM4R/QBRytWGYjm6U0JP0eGspsB9 X-Received: by 2002:a62:93d4:: with SMTP id r81-v6mr26185285pfk.55.1531241900802; Tue, 10 Jul 2018 09:58:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531241900; cv=none; d=google.com; s=arc-20160816; b=x0XO8nrims0dxUfjrjwAPWH1DUdPAcAvuG2AufPUub4HCR6mNr8M8dIenaEQqXeEO4 noUgZIrUWdrAyGaSOY5t4VSfq+8YJBOUanbNHlpuvTAw1djzMSxBFg0D168NWK3+QaCJ S/uD9L2/+I+6j2V7ebngeEQkzpkIxGtyVt4F12xVTU5u+jbnOQz/4FkgRC88BMV7Z1Qa /pxBI6ksdaS5d8E+9oAwOQC9Fq0e4F9N9hFJgurcjt+jvPKuW5jStEHqTKMx4+jN7AFG 3SejjnW/dyhkuCjQjxyEGFqTGvw37BKb3Fjrwjbc/+40sj38PFjuAsBQrTC7wGcTXq5C fD2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=dSTb+yBYkPj+3y8KOwyhsjHb2CgGeIljMeZfOb+W8Mc=; b=VVopQvMCLn5Ds38hAAyYhorMgP6gh4p9ZMxiDl1EstCAzFDBZqG6cSspiHO4zzB3c8 q3NgGJIK/Xshz13mdjk4ZsSe00m6qUVLUHNHXiQjYrNB18+ChEdyq00qX/CRT9nTAUJP XgPQUABf2Zf6Njjm9V9edh5LN2Cy+LsMhSDjRxAg6fqaZ7z8XdtDPHCQ04Jjv7YrCje2 YSkHIQ0BOSgaTaoDYOI38FvpsX8NgkF+R2c5uCAGuVmxmE/FUntZlBK3V6yfLczhLGg9 0jWJXcFC2BBtX1iy38hny70emmGOzJR57gsLw0w6gTnO0Ql0X/3Upc4iUMuy7CRut4Zz 4DHA== 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 o64-v6si17235185pfb.20.2018.07.10.09.58.05; Tue, 10 Jul 2018 09:58:20 -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 S934233AbeGJPV5 (ORCPT + 99 others); Tue, 10 Jul 2018 11:21:57 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:40773 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934064AbeGJPVz (ORCPT ); Tue, 10 Jul 2018 11:21:55 -0400 Received: from wuerfel.lan ([46.223.138.35]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0LibhV-1gDKbe2WGz-00cyuN; Tue, 10 Jul 2018 17:21:47 +0200 From: Arnd Bergmann To: Jens Axboe Cc: Arnd Bergmann , Tejun Heo , Josef Bacik , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] block: iolatency: avoid 64-bit division Date: Tue, 10 Jul 2018 17:21:34 +0200 Message-Id: <20180710152146.2371336-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:XyocjbQFefAhj3c/bBIEQ15lCKAaGoxSg9237vfr9dEN8XZkfbU WWAZf6Waok7o8dp+g/lNtmVlOs7p+HurBsmWWBfKrH2zZR49JuCxrovK7Bg5Ac7cFDsPkEY o0XbBwSKrybbDNcjo9oUolaIrUvNZwUxYoBSStaS9oM8DuB6mB7ySZObAm4tuezVgHVZVtI ell4rX/Idyevjig3J3qQQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:+9NDxLDRql0=:f1V6LWvmkqTjc91JNmh/X9 950MUw3uL5eSP/jsn+IJqmlkALQ1DEfwvLdENF9Gsf2dm0oSeXPDJ0x22K8dA+oPz3GaPtKxT KDYc97/lfqN+66RzZJICZf5xJ89v8+h9gc9pTlntxLc5d7cD6Z2fhmXGfLJ+Z2bLYOXEN8+6i fsZuOmupy8vQkqHduUqKyZRZ+4SGhW+gyMEm272mU8vWaIiWk1XMDI4qTlDg1lq+R18G749De PizaabuzHdHiF5t/nPtnEMAK2RUuR9ssP4Xk6iaUSw1uHJSNC0Dqm5w3WZACbPsq85dczmOyo Ttat7HWuQtgrbTSiRzmnugMSCI7V1bJ+freExm82theUsJixhUw5HsXLawJl7RtuUtSli53t9 cms1XY/IcV7RMn8MyrwtcW3KWLLdEYKLksPvqEAusQZ0IzmMGRBpY3+ghORaGBTOJNpJaPFfY yky9Q8bfuPMt3pB+3rMjFluZrSXU4wtNZS7nudsIcybgW6S3LezQOJXsZXySGXWIrqmXkHOnQ lToVDyKCy1ptxoBG5MrCtmksgfkpr8fyaE7Xmuq60Vhii+wZoszWS8LL22+T5rK8p7VEmquAn UZmeFwrwssQDmJjlTeqfKSLM19aZmynKIwvBLevv7+TvuntA+/m6T28R4tjvT6rZh+LDTHQqB BHJ6FDpe+2sjI2MR1XNDdMWsncDEYtKreVWviEoc40p6LJ05ZeQBxnOzi6+3w0HttiMY= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 32-bit architectures, dividing a 64-bit number needs to use the do_div() function or something like it to avoid a link failure: block/blk-iolatency.o: In function `iolatency_prfill_limit': blk-iolatency.c:(.text+0x8cc): undefined reference to `__aeabi_uldivmod' Using div_u64() gives us the best output and avoids the need for an explicit cast. Fixes: d70675121546 ("block: introduce blk-iolatency io controller") Signed-off-by: Arnd Bergmann --- block/blk-iolatency.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c index a35a1f580337..56ddb2c68752 100644 --- a/block/blk-iolatency.c +++ b/block/blk-iolatency.c @@ -798,8 +798,7 @@ static u64 iolatency_prfill_limit(struct seq_file *sf, if (!dname || !iolat->min_lat_nsec) return 0; seq_printf(sf, "%s target=%llu\n", - dname, - (unsigned long long)iolat->min_lat_nsec / NSEC_PER_USEC); + dname, div_u64(iolat->min_lat_nsec, NSEC_PER_USEC)); return 0; } -- 2.9.0