From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 66E62C54798 for ; Sat, 9 Mar 2024 14:33:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8b442iD5sq/TfR+uf4fd/7JLJQn/fzGXa/nIjvT0BAw=; b=YKrxGJblUsWbiY 2ai02Ve3aDOsouGx+YY746Q1cPrHg5fJYBWywG9HGjis8/cwRo4zepf0sk0MVy73KhDBgdVOYJ9vi g8FlfADBX/NuikFS+gv6BTCtLju+59cSf5eL5ISaF4GaZQAeVyrCbFkNgQX3m2VG0kRAAAn72djW0 01dOBZIzYWRrZfJfOojJWABSDBqRBpO/gGzZdRLtcqvqlmatbPTqaH3wTt2hkyYO5w7hnMKcHEmCT rm6Fw8t7uB0oOtSf0kgaKMTx2pv4fLbQ3IfLM0crRzX1NVGtQ/pWIYoJ52CPDrgmXNSbxceRmF9Zv ar+SeUPWZxhuDFHzTXew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rixlO-0000000DXLy-3Zx9; Sat, 09 Mar 2024 14:33:26 +0000 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rixlK-0000000DXKr-0Z0k for linux-arm-kernel@lists.infradead.org; Sat, 09 Mar 2024 14:33:25 +0000 Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-253-14N-Did4PAW8hIsoNs_d-Q-1; Sat, 09 Mar 2024 14:33:12 +0000 X-MC-Unique: 14N-Did4PAW8hIsoNs_d-Q-1 Received: from AcuMS.Aculab.com (10.202.163.6) by AcuMS.aculab.com (10.202.163.6) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sat, 9 Mar 2024 14:33:26 +0000 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Sat, 9 Mar 2024 14:33:26 +0000 From: David Laight To: 'Maxime Ripard' , Arnd Bergmann CC: Naresh Kamboju , open list , Linux ARM , "linux-sunxi@lists.linux.dev" , "dri-devel@lists.freedesktop.org" , "lkft-triage@lists.linaro.org" , Dave Airlie , "Dan Carpenter" , Ard Biesheuvel Subject: RE: arm: ERROR: modpost: "__aeabi_uldivmod" [drivers/gpu/drm/sun4i/sun4i-drm-hdmi.ko] undefined! Thread-Topic: arm: ERROR: modpost: "__aeabi_uldivmod" [drivers/gpu/drm/sun4i/sun4i-drm-hdmi.ko] undefined! Thread-Index: AQHabimenIC0ADhmjUqxSQo36gIP17EvfaYA Date: Sat, 9 Mar 2024 14:33:26 +0000 Message-ID: <85b807289ff2400ea5887ced63655862@AcuMS.aculab.com> References: <338c89bb-a70b-4f35-b71b-f974e90e3383@app.fastmail.com> <20240304-brawny-goshawk-of-sorcery-860cef@houat> In-Reply-To: <20240304-brawny-goshawk-of-sorcery-860cef@houat> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240309_063322_496816_B9A31988 X-CRM114-Status: GOOD ( 13.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Maxime Ripard > Sent: 04 March 2024 11:46 > > On Mon, Mar 04, 2024 at 12:11:36PM +0100, Arnd Bergmann wrote: > > On Mon, Mar 4, 2024, at 09:07, Naresh Kamboju wrote: > > > The arm defconfig builds failed on today's Linux next tag next-20240304. > > > > > > Build log: > > > --------- > > > ERROR: modpost: "__aeabi_uldivmod" > > > [drivers/gpu/drm/sun4i/sun4i-drm-hdmi.ko] undefined! > > > > > > > Apparently caused by the 64-bit division in 358e76fd613a > > ("drm/sun4i: hdmi: Consolidate atomic_check and mode_valid"): > > > > > > +static enum drm_mode_status > > +sun4i_hdmi_connector_clock_valid(const struct drm_connector *connector, > > + const struct drm_display_mode *mode, > > + unsigned long long clock) > > { > > - struct sun4i_hdmi *hdmi = drm_encoder_to_sun4i_hdmi(encoder); > > - unsigned long rate = mode->clock * 1000; > > - unsigned long diff = rate / 200; /* +-0.5% allowed by HDMI spec */ > > + const struct sun4i_hdmi *hdmi = drm_connector_to_sun4i_hdmi(connector); > > + unsigned long diff = clock / 200; /* +-0.5% allowed by HDMI spec */ > > long rounded_rate; > > > > 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(). > > I sent a fix for it this morning: > https://lore.kernel.org/r/20240304091225.366325-1-mripard@kernel.org > > The framework will pass an unsigned long long because HDMI character > rates can go up to 5.9GHz. You could do: /* The max clock is 5.9GHz, split the divide */ u32 diff = (u32)(clock / 8) / (200/8); The code should really use u32 and u64. Otherwise the sizes are different on 32bit. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel