Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1805062lqg; Mon, 4 Mar 2024 04:35:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVfEj0HzK1DQBeZluf7QS1TIEoWpZXOjJNOsKF4CGvUaA9Q3VwCljCz2mvVr4v+9nKCwB/Y2ffNunYJMXkwxISjuem0hNjS+TndCYgOjA== X-Google-Smtp-Source: AGHT+IGG9/UgC0r8dYICO4hS4fF2wP8oT0kxst3DV3bWX+EpATSRjZ5zKjvL9QRLly9yci8qo+df X-Received: by 2002:a17:902:a3c8:b0:1dc:cdf6:70c6 with SMTP id q8-20020a170902a3c800b001dccdf670c6mr7987417plb.5.1709555730079; Mon, 04 Mar 2024 04:35:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709555730; cv=pass; d=google.com; s=arc-20160816; b=YYEbEAAhNcZhLg3DLGA0rz1yd0T7VXU30l1TLXxDAuW33jZxK6jancOLWeK13glTwS M5bhkXfpuPgc9pYStaFaXam18cU2jafAEcY9MgOQprKEHPj6yrlKty0EHDspWXWdpOEi U3d67qJWQNivOqjJIF1bYeV+7hUNtRU9yeulKgBbPN38sL2tfd+WT9L2dLlNAkAnwo9M jF7oIAZBJYDQ9ifGAn5sm9O2Y53HfvLSWss5MOjhqxcLme7zJIbDcoyJjwNTMCEUIX/5 3NaNIp7P4Mqk4t3HN2XWDJeEJNuyAifi6qbI8I3pvQQsigud7SF8s9b+Ed24H0cFQ7QZ Eozw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:feedback-id:dkim-signature:dkim-signature; bh=+TroZF8jeBzIowpYrGF9jrP9uh+0X1BM1HbguhEHK/Y=; fh=RUPPUOSRew9SNBP2nVbo7ztXKUNhWCqF2dzrMe0rAxI=; b=wUqyDUMg+qqf6KaIvXHLtbilpU9ymR5UpTdpR/XJNYbchxMmiVth0Tb5Oir9Qnt8Ha yuCxdojJvjDP8ttSNnC46e386Ekkl7EZdgyBMKYiYujEiNsDaaKUNQ4ofvBE7HNp52aU p8tw+k2kn+m7nUwqbcXANIZA48GQZRvcP33MbzxiLoWPuCawlUsMaCNoP7sjwcv0EHoK 0iL6Vt1XHuAahhp0mas+n30xOsdy8GymGiv6Zu/2DT2EHEQgbjDzfqh0vkJ6Na15l4ru C189WQ/BHla4APkDF9CKKnUYoPfcjd+UoHJgaLAg+VTTHUAsrglXNuJy7DE8iNrA6fSm OBDw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b="T9/BQtSi"; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=E6PLUkad; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-90582-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90582-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q8-20020a17090311c800b001dcf7b51791si4329645plh.124.2024.03.04.04.35.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 04:35:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90582-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b="T9/BQtSi"; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=E6PLUkad; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-90582-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90582-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id BF1DE289D3B for ; Mon, 4 Mar 2024 12:35:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0E5F23BB28; Mon, 4 Mar 2024 12:35:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="T9/BQtSi"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="E6PLUkad" Received: from fout4-smtp.messagingengine.com (fout4-smtp.messagingengine.com [103.168.172.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE85C1E506 for ; Mon, 4 Mar 2024 12:35:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.147 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709555712; cv=none; b=hLF83F1eQt/WWCyKUtVLnS+ZxtvWkpMCIS8ogrS3x5ZCJ8b4oaglzJ/chb7FcP/o0JlkSfdHgxYi4bCZZXxeof01200CrgCLQiDRKyWlYEcVn0X5hu1N4pVPzFtvrCexvLjXiIvGt/L/IuhLHQnhmgYZJNbprTVbQu0X9l9vYxM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709555712; c=relaxed/simple; bh=/Np2risLVk0Wnw2e+uGrNOir2LUcu73+mKUufe6y1yA=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=PFDWGrCND93nOd632M5dZfo5ySNum5mylUVgKYjmlZRbYLXu1vcfmfWnDaazWOSB8rRksi5i7fKhpZSMf4pvS5OulvjtUdlUNUSN7bjkTmEb01leEYshMBt66KvjZ7/NQQs1+PnNjuEpO6P+p/cSzeU6fRqa2JypZin/oHu16G4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=T9/BQtSi; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=E6PLUkad; arc=none smtp.client-ip=103.168.172.147 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id 08E0713800B1; Mon, 4 Mar 2024 07:35:10 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Mon, 04 Mar 2024 07:35:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1709555710; x=1709642110; bh=+TroZF8jeB zIowpYrGF9jrP9uh+0X1BM1HbguhEHK/Y=; b=T9/BQtSiILQpMCnqJv+UGt4nim DKXKwfSy6GCSmU9MI/Pjsfj44Z3Wenf6/LEy+I4ZoIzLMkMgMHF+PhBwQrEQSd4R 3rZ34vnDWPzOLcBAQ62+F62GS/PCSwLGOjzWb+4HYu61h70JZQCIMRnQeh4xv94L RqYEnHdxXR+DuyS6xSsASBQtPM6SWEa9H5ufn4ujyn/GfVm6eqdJVo0J2tl1Q9JN osTb1ZoBQT/GDSHLKe+qDqnCkft9Ctrbkk5rdzz0PysbgoloPjWfVGYPC/WFEi3S fwraymKJf8Oz5X0l6etK+pq0APaTc34fcxeJ/yGvKIwwpEcW1Cueh3TlRW2Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1709555710; x=1709642110; bh=+TroZF8jeBzIowpYrGF9jrP9uh+0 X1BM1HbguhEHK/Y=; b=E6PLUkad/4kqaHFHfUpwwh4uJpCKtRVopl24PVUHG9Mw LECgX5ZE9tMDn2FoHcmaohB658HUZmtIEw/WZy3lnp1a/CWLhvo2ivZz6E7VADD0 62B/D08u2/oLOME9TQj8WnUl4qtdfDQvJoaRgVNeIrOzjw+tSSGK8jYnQdxMteWO B68q0Iind1V77AMyiOD0AvrLeopaQo55R7a69/krkZWyZVLFhaPCYOUN6nDofW94 sxV5UjKcnlMguzeNrZFy9PHtSJbq8oMRGtSY1qWVoWlxqqrTvJjKoCzJMaxjcR0z PA3GyhuUq7W/yzGqROK+aw8iiAxFUrplNkVwb/B/ew== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrheejgdegtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdetrhhn ugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtth gvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedtkeet ffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrh hnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id AA096B6008F; Mon, 4 Mar 2024 07:35:09 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-205-g4dbcac4545-fm-20240301.001-g4dbcac45 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: In-Reply-To: <20240304114546.4e8e1e32@donnerap.manchester.arm.com> References: <338c89bb-a70b-4f35-b71b-f974e90e3383@app.fastmail.com> <20240304112441.707ded23@donnerap.manchester.arm.com> <1baf9a7f-b0e4-45d8-ac57-0727a213d82d@app.fastmail.com> <20240304114546.4e8e1e32@donnerap.manchester.arm.com> Date: Mon, 04 Mar 2024 13:34:49 +0100 From: "Arnd Bergmann" To: "Andre Przywara" Cc: "Naresh Kamboju" , "open list" , "Linux ARM" , linux-sunxi@lists.linux.dev, dri-devel@lists.freedesktop.org, lkft-triage@lists.linaro.org, "Maxime Ripard" , "Dave Airlie" , "Dan Carpenter" , "Ard Biesheuvel" Subject: Re: arm: ERROR: modpost: "__aeabi_uldivmod" [drivers/gpu/drm/sun4i/sun4i-drm-hdmi.ko] undefined! Content-Type: text/plain On Mon, Mar 4, 2024, at 12:45, Andre Przywara wrote: > On Mon, 04 Mar 2024 12:26:46 +0100 > "Arnd Bergmann" wrote: > >> On Mon, Mar 4, 2024, at 12:24, Andre Przywara wrote: >> > On Mon, 04 Mar 2024 12:11:36 +0100 "Arnd Bergmann" wrote: >> >> >> >> This used to be a 32-bit division. If the rate is never more than >> >> 4.2GHz, clock could be turned back into 'unsigned long' to avoid >> >> the expensive div_u64(). >> > >> > Wouldn't "div_u64(clock, 200)" solve this problem? >> >> Yes, that's why I mentioned it as the worse of the two obvious >> solutions. ;-) > > Argh, should have cleaned my glasses first ;-) > > I guess I was put somehow put off by the word "expensive". While it's > admittedly not trivial, I wonder if we care about the (hidden) complexity > of that function? I mean it's neither core code nor something called > frequently? It's not critical if this is called infrequently, and as Maxime just replied, the 64-bit division is in fact required here. Since we are dividing by a constant value (200), there is a good chance that this will be get turned into fairly efficient multiply/shift code. > I don't think we have any clock exceeding 3GHz at the moment, but it > sounds fishy to rely on that. Right, it's just important to look at each case individually. The cost of 64-bit division is crazy if it gets called repeatedly, which is of course the entire reason we don't provide a __aeabi_uldivmod() function and require developers to think before adding div_u64(). Arnd