U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Bradley Morgan <bradley.morgan@linux.dev>
Cc: "Josef Schlehofer" <pepe.schlehofer@gmail.com>,
	u-boot@lists.u-boot-project.org,
	"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
	"Marek Behún" <kabel@kernel.org>,
	"Marek Mojík" <marek.mojik@nic.cz>, "Peng Fan" <peng.fan@nxp.com>,
	"Priyanka Jain" <priyanka.jain@nxp.com>,
	"Qiang Zhao" <qiang.zhao@nxp.com>,
	"Shengzhou Liu" <Shengzhou.Liu@nxp.com>,
	"Mario Six" <mario.six@gdsys.cc>,
	"Dario Binacchi" <dario.binacchi@amarulasolutions.com>,
	"Michael Trimarchi" <michael@amarulasolutions.com>,
	"Heiko Schocher" <hs@nabladev.com>,
	"Holger Brunck" <holger.brunck@hitachienergy.com>,
	"Simon Glass" <sjg@chromium.org>,
	"Bradley Morgan" <brads@mainlining.org>
Subject: Re: [PATCH v3 04/14] powerpc: lib: Add 64-bit division to the private libgcc
Date: Fri, 20 Nov 2026 10:16:03 -0600	[thread overview]
Message-ID: <20261120161603.GE3176972@bill-the-cat> (raw)
In-Reply-To: <F019A142-D66C-4402-A174-AC9B1BF960CB@linux.dev>

[-- Attachment #1: Type: text/plain, Size: 1241 bytes --]

On Fri, Nov 20, 2026 at 04:04:10PM +0000, Bradley Morgan wrote:
> On 20 November 2026 09:08:54 GMT, Josef Schlehofer
> <pepe.schlehofer@gmail.com> wrote:
> >Hi Bradley,
> >
> >On 19. 11. 26 19:55, Bradley Morgan wrote:
> >> Well, Christophe has the concern, he can assess, also mind answering my
> >> question about the user?
> >
> >Tom asked to update the common code, so v4 will convert the callers and
> >drop this patch.
> 
> Oof.. (also please don't keep doing new threads, it's a pain)
> 
> >
> >As for usec2ticks() in arch/powerpc/lib/time.c, a 64-bit implementation
> >would divide by the constant 1000000. With a constant divisor, do_div()
> >uses reciprocal multiplication, and lldiv() relies on the same
> >implementation, as does usec_to_tick() in lib/time.c. GCC 14 at -Os
> >compiles this without any call to a division helper.
> >
> >However, the overflow described in the comment is in the 32-bit tick
> >count itself, not in an intermediate calculation. Fixing it would
> >therefore require usec2ticks() to return 64-bit tick counts and
> >wait_ticks() to accept them as well.
> 
> hmm. any way overflow could be stopped?

The question is, is it an overflow we might ever encounter?

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-11-20 16:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 13:32 [PATCH v3 00/14] powerpc: Enable LTO on mpc85xx Josef Schlehofer
2026-11-19 13:32 ` [PATCH v3 01/14] board: nxp: p1_p2_rdb_pc, p1010rdb: Drop unused SPL gd copy Josef Schlehofer
2026-11-19 13:32 ` [PATCH v3 02/14] powerpc: Make the global data pointer LTO safe Josef Schlehofer
2026-11-19 13:32 ` [PATCH v3 03/14] powerpc: lib: Add GPR save and restore routines to the private libgcc Josef Schlehofer
2026-11-19 13:33 ` [PATCH v3 04/14] powerpc: lib: Add 64-bit division " Josef Schlehofer
2026-11-19 14:21   ` Christophe Leroy (CS GROUP)
2026-11-19 16:01     ` Bradley Morgan
2026-11-19 18:42       ` Josef Schlehofer
2026-11-19 18:55         ` Bradley Morgan
2026-11-20  9:08           ` Josef Schlehofer
2026-11-20 16:04             ` Bradley Morgan
2026-11-20 16:16               ` Tom Rini [this message]
2026-11-20 16:18                 ` Bradley Morgan
2026-11-19 20:09         ` Tom Rini
2026-11-19 13:33 ` [PATCH v3 05/14] powerpc: mpc85xx: Use the private libgcc with LTO Josef Schlehofer
2026-11-19 13:33 ` [PATCH v3 06/14] powerpc: mpc85xx: Discard LTO keep-syms sections Josef Schlehofer
2026-11-19 13:33 ` [PATCH v3 07/14] powerpc: Drop -ffunction-sections and -fdata-sections with LTO Josef Schlehofer
2026-11-19 13:33 ` [PATCH v3 08/14] powerpc: mpc85xx: Allow LTO Josef Schlehofer
2026-11-19 13:33 ` [PATCH v3 09/14] xpl: Pass the make jobserver to the xPL link Josef Schlehofer
2026-11-19 13:33 ` [PATCH v3 10/14] configs: turris_1x: Enable LTO Josef Schlehofer
2026-11-19 13:33 ` [PATCH v3 11/14] mtd: rawnand: fsl_elbc: Select NAND_ECC_BCH Josef Schlehofer
2026-11-19 13:33 ` [PATCH v3 12/14] board: CZ.NIC: turris_1x: Make NVMe and SCSI boot targets conditional Josef Schlehofer
2026-11-19 13:33 ` [PATCH v3 13/14] configs: turris_1x_nor: Enable CMD_UBI, drop NVMe and SCSI Josef Schlehofer
2026-11-19 13:33 ` [PATCH v3 14/14] board: CZ.NIC: turris_1x: Fix up MACs and serial number from OTP Josef Schlehofer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261120161603.GE3176972@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=Shengzhou.Liu@nxp.com \
    --cc=bradley.morgan@linux.dev \
    --cc=brads@mainlining.org \
    --cc=chleroy@kernel.org \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=holger.brunck@hitachienergy.com \
    --cc=hs@nabladev.com \
    --cc=kabel@kernel.org \
    --cc=marek.mojik@nic.cz \
    --cc=mario.six@gdsys.cc \
    --cc=michael@amarulasolutions.com \
    --cc=peng.fan@nxp.com \
    --cc=pepe.schlehofer@gmail.com \
    --cc=priyanka.jain@nxp.com \
    --cc=qiang.zhao@nxp.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.u-boot-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox