Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1004493rdb; Wed, 6 Dec 2023 06:17:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IFEW4ch85jJeuTAEVMZ8YJUmKiCi3+LVJBVVtaE5P6A1J/Rek0YmkfkHu8lJ3KIv/xc4NSH X-Received: by 2002:a05:6a00:2788:b0:6ce:2732:28f with SMTP id bd8-20020a056a00278800b006ce2732028fmr840538pfb.62.1701872254093; Wed, 06 Dec 2023 06:17:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701872254; cv=none; d=google.com; s=arc-20160816; b=0oAoBL7GtDMfZyHbJEVOtRCPbCjCaPXAiiDifnX0Uah7lDGhGwTJAF7blhHvJy2Q2M 6qK1kuf2GyOYESzG9vKfEvE6+qB1zSbsOCL7B0IWyPCZqXGA86Sid3anQPsFbAlCQQjS h3sGyzZjDf2XpJccd3nmm2qcdAHGu7xwqmhUxjCroLJ4vcQTxA/JmtFMP4AwMsYJNyPP r7KJ1fTMNjYSL5VfUBRAGBpN4zzM4Fz5ncNeSCQsizQPEJofbhKS0x1x+J3R2N250B2m P1hsaAeEtjpOXLKf/b4CcKfKu3hQweG/uSGckAEU8wtJg4NGDg9cfk4ZFRDKvYxiSNG6 akUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Q07GwXoEwnVCd58Gn15u+JjEJPT2iy1EgFKR8djuNyA=; fh=6vy4eHJZhQZyt3AHKkPDiWfUVoKnF3LNlx/EVk5/jBM=; b=uXlUX7BE7Fq8IMzw62UkVIKxm0KZ8BWJ2T+QSJjnuHLDThj9btci5qzt5UUW6WXGc2 MjrLl04THnOhu0P3soArxgpwtKJhOGh3EHKK6qe4ammcYzbNOz6hznW40i5lcdG+vkXz z0gWyopPV+YOrG4ixLzfKC2CBFKB585FQwBqIQwcgAVIYyfqg1mV8M54FfSbxjULDMOu DRoBCW5QxksVN73OFQq2zAtaHvng86bTNfFpml0BHWIlvNwe3cunl6K9SMcBq/QywHsB hV2N8Wxo7YXHJ6+Qma1PU5Sf9AwFFgRC83S2f3g0wbERpgpuEZF/5nFhSbIII8+9Np3r Jwqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id y21-20020a656c15000000b005c278e32054si12038490pgu.677.2023.12.06.06.17.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 06:17:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 5E21B80B1BCE; Wed, 6 Dec 2023 06:17:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378735AbjLFORL (ORCPT + 99 others); Wed, 6 Dec 2023 09:17:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378679AbjLFORJ (ORCPT ); Wed, 6 Dec 2023 09:17:09 -0500 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07EB21A2 for ; Wed, 6 Dec 2023 06:17:16 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rAshz-00046l-92; Wed, 06 Dec 2023 15:17:03 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rAshy-00Dyxm-6P; Wed, 06 Dec 2023 15:17:02 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1rAshx-00FWPh-TA; Wed, 06 Dec 2023 15:17:01 +0100 Date: Wed, 6 Dec 2023 15:16:58 +0100 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Arnd Bergmann Cc: Bjorn Andersson , Arnd Bergmann , Andy Gross , Konrad Dybcio , Stephen Boyd , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] soc: qcom: stats: fix 64-bit division Message-ID: <20231206141658.kjpjwjy7utdux6b5@pengutronix.de> References: <20231206123717.524009-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bt3retbuplb4zmrk" Content-Disposition: inline In-Reply-To: <20231206123717.524009-1-arnd@kernel.org> X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 06 Dec 2023 06:17:27 -0800 (PST) --bt3retbuplb4zmrk Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hallo Arnd, On Wed, Dec 06, 2023 at 01:37:06PM +0100, Arnd Bergmann wrote: > Unguarded 64-bit division is not allowed on 32-bit kernels because this > is very slow. The result of trying anyway is a link failure: >=20 > arm-linux-gnueabi-ld: drivers/soc/qcom/qcom_stats.o: in function `qcom_dd= r_stats_show': > qcom_stats.c:(.text+0x334): undefined reference to `__aeabi_uldivmod' >=20 > As this function is only used for debugging and not performance critical, > rewrite it to use div_u64() instead. ARCH_TIMER_FREQ is a multiple of > MSEC_PER_SEC anyway, so there is no loss in precisison. Maybe add this information in a comment? We have #define ARCH_TIMER_FREQ 19200000 so it's a multiple of MSEC_PER_SEC (=3D 1000) indeed. Reviewed-by: Uwe Kleine-K=F6nig Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --bt3retbuplb4zmrk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmVwgloACgkQj4D7WH0S /k5/EQgAjoPq0DwSBp9X9Iw7m71/SG3pDFB7cCoO87XsgX3HZcF0OkXvXPg35ls3 Ai4k8vvrjnmR+JgG7gOcGTHEeszInVUaRptidX8DejmgCet0CveSYp1LCnhk+ZxP GjfYwWBDyx7YwMMvT1bLjBGg2p1DBEfXyaz4+MBaGkblJX24w1CvHqGQHjAXN5SL YAl9RqqN2l+2+Bdx6BwKAXAPD6MdZva0/xOiHunIa0g5r2wYnRoxaQQnWnRPmzaC tvt9C4NSuKCKSW8+VhVCiBgcYtUKFq0qT/dqmaahPX33SmRL0wyQTVNR6vIeJ14i SGw6GGmjZRuGf+SDNQfFlwzwyVbv5g== =X2bc -----END PGP SIGNATURE----- --bt3retbuplb4zmrk--