Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1857773lqg; Mon, 4 Mar 2024 06:08:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVF3iFS9GHoHwBZ+xLep5LItKkNQsjxFNspdJ9PIW9wl1mPN1q5/pPfru+kQWi0CKNtOnmW76ONnKZlXkjs2LazHmhn6fAbPvJzlkWjGQ== X-Google-Smtp-Source: AGHT+IELNtWQt4QL0C0UwW/gknZkvZgQf1JUYSTj72NhW08rJX1FQAYtsD9GqY0rSm8H9exAZ6Rf X-Received: by 2002:a05:6a00:1707:b0:6e2:d162:6315 with SMTP id h7-20020a056a00170700b006e2d1626315mr9488914pfc.29.1709561284294; Mon, 04 Mar 2024 06:08:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709561284; cv=pass; d=google.com; s=arc-20160816; b=N5Znrn1xcVppS8qoBg6RihG7je6nx5lIqSeEAqI327INsM9BnqfETnE/6tTLsS+fD2 kBIGOVZIu2Fx5dN9P1jHdAgnlJ/LLjs1K//kU7tDnKVP7tWcJvpz8iRQHNfVGPzAsbZK l+6i3/spuSChDKyNVWfTWMSefJOrevoQPJ1Vu5GUbIXQnA6xLYCthpd+U3CoHoir3pRI RUMmC2twgIFIRM5y2t+mPFmYsYBxaMqabzm992npEWf92VASEp4GTIGzThTmJw6PnAYk AI6kLsQc63p6IIyF5CzxxvyNj+NTHKumoID8e7v58tyM+gA2Bwb0qe9APfhODCsuApy1 1dKQ== 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=BRaQGMUhZF+5gvPmzCZj10RTFRpRoCHi8lIQAFa6I38=; fh=QkNh/M1hrDzc/C9cdw7E/hCbS3JnCacFosWslMdmFrw=; b=hRw+AFr2eQHEa55qQi2/FpbXuxtOxymISoaWhtQRngBGQttHW2HZqRLNUkMLHcZG7O pnUJrWLK6ifRhYfg8DC8eLPgfh66CxYj57ODgX29bO1mdL1ftPn7Rsm/+nVt/O6FSLls b6TJq6NS+EIa2W6GV2HfTE7Ofdv+5bqpm21aYcL0u5yVxR7bsIdGuS2SBY5fVNfBnjA3 o2tb6ZMHC726n2HinqURsVkxYYSKhs8wzzQSz+TZ7pMNqRih1+YnRFMGSHV5TyHQlWZg ysmvZn9UvGNZk/pXmh0phF3cdUAmhC207ZO2P0+lXk4BierHwieRBnCgoHo/OWedgq9i GTnQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=AmWRSk25; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="VAgEIm/0"; 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-90678-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90678-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id bq21-20020a056a02045500b005ceb4a70188si9011650pgb.375.2024.03.04.06.08.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 06:08:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90678-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=AmWRSk25; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="VAgEIm/0"; 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-90678-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90678-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 5F4D1B22FA2 for ; Mon, 4 Mar 2024 13:49:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A62A73EA94; Mon, 4 Mar 2024 13:49:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="AmWRSk25"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="VAgEIm/0" Received: from fout5-smtp.messagingengine.com (fout5-smtp.messagingengine.com [103.168.172.148]) (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 B09CC3D542 for ; Mon, 4 Mar 2024 13:49:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.148 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709560160; cv=none; b=FizWN0bjx41XEPIWJCF0+YZVt/IiQuALBlb16vpBtOK+p2PpdPrUAJYMKM9QX3Au+DLyfvSOAMvMCd8/7ae7lKL2/+sgXq9E8OlZf1Q/tmEXNG95fWDwMCVGJnFi1WhD3RkLIPfg0gL80KOK6Ovi93d6nKHBe9/3LfKA5SkWsNw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709560160; c=relaxed/simple; bh=FjRTxTcDPieY+TUIG9nrUIHRLmgaFcGm7LwfN+LNBow=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=BMSQ8eL+Zyk0gnhVfIII1Q3rk0sJGzz1q1BjTvQBoRxozvz0/x5JqH1OkoKCE8HfB2+4sH8tsi1cDvKx6wt3aQU6rlbsg2mC59VtEAtSzo+9Nc7vmm+8l2LiT1jbGJQ9m4obkTkN+YKciQK2TuDUngI97yJBV7AfxxfXWFtSzB0= 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=AmWRSk25; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=VAgEIm/0; arc=none smtp.client-ip=103.168.172.148 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 D5B5C138010B; Mon, 4 Mar 2024 08:49:17 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Mon, 04 Mar 2024 08:49:17 -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=1709560157; x=1709646557; bh=BRaQGMUhZF +5gvPmzCZj10RTFRpRoCHi8lIQAFa6I38=; b=AmWRSk25knneYEOIKlZQ9P4pod w7Zzklals0aZcGl24S0l5doNkX4rUc+l/jiTAnJ/Xu98d07n5cwfJjFcHjGU+0H3 4KWQcEyS9eesEKaQ4qvMetqJC3l60ZMQ0EMx6kHOWPNU3eIBPrmgNXq+JdokN/fC mDnl/nlvqVNSaJUKopHul8y4fnIdnUNdtIVOjHwiBPrDzTXUR/xsEr08hOeDcXN6 aPhMTbEyA0gc74n/Jy4DyzcQ94hW7d8+IHuQS8lBDd6t3WEcdQomwnKRTl9tKEhD U17Es/Ue/hGgfpc2nD/JwwsM6gQ4gKnzoslNEeHTYlyvG1PwnnjLHSpyZeBQ== 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=1709560157; x=1709646557; bh=BRaQGMUhZF+5gvPmzCZj10RTFRpR oCHi8lIQAFa6I38=; b=VAgEIm/0E/dM3PQQEGcKjdRAkjB52xCRMiOmUHipXPF6 EOjCeHBFpV2jWZSMmSh9YRunduraSrgp0nFYo7MpzsPyFvOv5bMeDohJYa8chrBw CcgjFk2vHzMCs8pm0IaZ8u+DFTY4AFd+zF55rtpDE89bTaa0jmAXsgw0CGc2+RpH bxPz5scghGuO8wLvtNzkqnkPXutoJKXAX06OJDOWRXQmYzeBc2C3H4NIqdQq1WOj ttakdq2RKGiz9c/5s1H28skDrExUU3kkMJV5lSNjk+R/DeLc8DKa7Q+mV03XTScq wxfcNb0bwfb3Nn3OhkV3ePgtB0ZssPOsut5T/rttIA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrheejgdehhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdetrhhn ugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtth gvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedtkeet ffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrh hnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 9AD75B6008D; Mon, 4 Mar 2024 08:49:17 -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: <61aa333f-aa13-4068-b73f-eeae615f4640@app.fastmail.com> In-Reply-To: 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 14:48:56 +0100 From: "Arnd Bergmann" To: "Ard Biesheuvel" Cc: "Andre Przywara" , "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" 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 14:01, Ard Biesheuvel wrote: > On Mon, 4 Mar 2024 at 13:35, Arnd Bergmann wrote: >> On Mon, Mar 4, 2024, at 12:45, Andre Przywara wrote: >> 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. >> > > Clang does not implement that optimization for 64-bit division. That > is how we ended up with this error in the first place. I meant it will use the optimization after the patch to convert the plain '/' to div_u64(). > Perhaps it is worthwhile to make div_u64() check its divisor, e.g., > > --- a/include/linux/math64.h > +++ b/include/linux/math64.h > @@ -127,6 +127,9 @@ > static inline u64 div_u64(u64 dividend, u32 divisor) > { > u32 remainder; > + > + if (IS_ENABLED(CONFIG_CC_IS_GCC) && __builtin_constant_p(divisor)) > + return dividend / divisor; > return div_u64_rem(dividend, divisor, &remainder); > } I think the div_u64()->do_div()->__div64_const32()->__arch_xprod_64() optimization in asm-generic/div64.h already produces what we want on both compilers. Is there something missing there? Arnd