Received: by 2002:ab2:5d18:0:b0:1ef:7a0f:c32d with SMTP id j24csp203336lqk; Sat, 9 Mar 2024 06:35:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX9hLQZwvro9bmfcer4as9Sz1FnLsu7JLAm41yYqB9E+dMzON9jJu1mktPuOYc5pRR3o2yJLFRtkIvu9CmVn0T/gx3eFL1zLquY25Hl7w== X-Google-Smtp-Source: AGHT+IFKIh1ts5+O6zgVPbz5fIGtH2R4iJ3Hx66ltF0Dh5BIU7bCDQKhKT4qQ2uaUmYDTkfJVMyD X-Received: by 2002:a50:cd98:0:b0:568:171:f82a with SMTP id p24-20020a50cd98000000b005680171f82amr1365884edi.20.1709994911957; Sat, 09 Mar 2024 06:35:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709994911; cv=pass; d=google.com; s=arc-20160816; b=Elie857uBhHE7LLUMEfXMv2t69Dc+gg4rw8ZHL7Z2EyqZ/zWJZri7QMvrKwzFPJvTb SMqpfEoDqSlYxnvrP8105PoKz9hc9lPKG5CZpEynSSqb59lVcg8efakEVtalTtJjr21S rtlR2SsZR8bzof60gJzPGRv+fwfDtlOYtGfc1IhmUmPqAUzbsehgkxw+JiD3HMI3LwHd TfAUmv+w/Gbqe998re05MAwiovcKo1uqWxNbaAQw8XEVmFjvPexuGDpHHIHK9Ar5Tt2b CZ2ySN2zFoF+Z5E8/XE1S7U6AYvuwKKP+EjPh5oDUGPdymn8VfjaDYcdHemiwBwpWLnN ANIw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from; bh=DeXcToSeBseu397sf1gTMHBaxb0bD1Sr9H3S34DTwY8=; fh=J3A2avU01maHP2my+zFWg+fPyyxFIM73MqUdq/CyoP8=; b=T6dmEw+yEpryiUzNwndiy5N41cB4LnLWpJNGDoWNsmyl5BpYpMzC9dLy6DLOKToVZR R073qc8gCO3IkiSxpcwLrOFNQnVxhLIlN3WZZBon/9wDl7VRb+KoiSLbeRpQmQYufC4n O3jkgFruCZcoe9aCnkc4iBS+5HaPTwVzeBwJHgD0XRWwxemGcPK02eZ00dyXWR8VF67b ob0lAi3YWp4zWgDNi6uGSzLsQSNwkHgp1C5uUrL8yqVw12I6dKbp8WDJnqpD00OEbfd9 PTTz4bdOTIVrlqrI89UO7orpCfShWphj5G96P4jOgoqVK4xXt81aNipIkrg0I2tuXrCA HZzw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=aculab.com dmarc=pass fromdomain=aculab.com); spf=pass (google.com: domain of linux-kernel+bounces-97920-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97920-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id es19-20020a056402381300b005669ec88572si828883edb.236.2024.03.09.06.35.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Mar 2024 06:35:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97920-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=aculab.com dmarc=pass fromdomain=aculab.com); spf=pass (google.com: domain of linux-kernel+bounces-97920-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97920-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 764F21F2163D for ; Sat, 9 Mar 2024 14:35:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 650753BBD3; Sat, 9 Mar 2024 14:35:04 +0000 (UTC) Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) (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 1F9702F22 for ; Sat, 9 Mar 2024 14:35:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.58.86.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709994903; cv=none; b=Ivo3o1ke8XxVxvuQ4ELdMuKgwhYn3Og4buhdNOZcY76pFBf8DldaRpUp5ifl995kD0+pqoyWtoqVRH+xaS3OlZlYlwnTKCo4T/oz/nJjcM8gkBlF7pEexq34bl5iFCXoyx8+M0G7ZIgTh6MXrD/r0jvv6tctGLDQ0JjFH7ynug0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709994903; c=relaxed/simple; bh=ds0BIkru2EQH9Tc9HwHJJTJfwfJeUmksK9jbB2Cr3Ac=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: MIME-Version:Content-Type; b=PTZNs3aoS14Nt1UUN4ZI6TgIzLmD6VFskZotYSE2Id+7mHyFg7BSCKxyF9z68+fGV4j5YqOBwQkaUkUdkN4Zm8TvfsE+M5ld8otWn+lVBbp/z2sdMOkEe6nw0ijDTMQa/MkDGXy6Z18qFo1pc5FkpYbW3TzkEgnJZjT/tRqGaVI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM; spf=pass smtp.mailfrom=aculab.com; arc=none smtp.client-ip=185.58.86.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aculab.com 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable From: Maxime Ripard > Sent: 04 March 2024 11:46 >=20 > 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-202403= 04. > > > > > > 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 =3D drm_encoder_to_sun4i_hdmi(encoder); > > - unsigned long rate =3D mode->clock * 1000; > > - unsigned long diff =3D rate / 200; /* +-0.5% allowed by HDMI sp= ec */ > > + const struct sun4i_hdmi *hdmi =3D drm_connector_to_sun4i_hdmi(c= onnector); > > + unsigned long diff =3D clock / 200; /* +-0.5% allowed by HDMI s= pec */ > > 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(). >=20 > I sent a fix for it this morning: > https://lore.kernel.org/r/20240304091225.366325-1-mripard@kernel.org >=20 > The framework will pass an unsigned long long because HDMI character > rates can go up to 5.9GHz. You could do: =09/* The max clock is 5.9GHz, split the divide */ =09u32 diff =3D (u32)(clock / 8) / (200/8); The code should really use u32 and u64. Otherwise the sizes are different on 32bit. =09David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1= PT, UK Registration No: 1397386 (Wales)