Re: [PATCH 0/2] x86: Use "er" asm constriant for add/sub
From: Jonathan Cameron
Date: Mon Sep 07 2026 - 18:16:48 EST
On Tue, 1 Sep 2026 17:51:01 +0100
Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> On Sun, 23 Aug 2026 23:35:36 +0100
> Jonathan Cameron <jonathan.cameron@xxxxxxxxxxxxxxxx> wrote:
>
> > On Mon, 3 Aug 2026 16:39:55 +0100
> > David Laight <david.laight.linux@xxxxxxxxx> wrote:
> >
> > > On Mon, 3 Aug 2026 10:49:40 -0400 (EDT)
> > > Nicolas Pitre <nico@xxxxxxxxxxx> wrote:
> > >
> > > > On Mon, 3 Aug 2026, David Laight wrote:
> > > >
> > > > > The x86 instruction set only supports 32bit signed immediate values
> > > > > for add/sub.
> > > > > Replace the "ir" constraint with "er" to avoid build errors.
> > > > >
> > > > > Found by a patch that added used mul_u64_add_u64_div_u64() to
> > > > > do a rounding divide by 2^32 (perhaps not the best way to do this).
> > > > >
> > > > > A quick grep only found one other affected file.
> > > >
> > > > Would be a good idea adding those cases to the test module.
> > >
> > > They fail to compile so it isn't a big deal.
> > >
> > David, thanks for sorting this (and all for reviewing)
> >
> > Seems like everyone is happy. What route is this taking upstream?
> >
> > I held Rodrigo's driver to avoid the build breakage and would like to
> > get it queued up early in next cycle. So not that urgent but nice
> > to be able to tick it off the list!
> >
>
> Given I have a driver queued up behind this, shall I just take it through
> the drivers/iio tree?
>
> I can do an immutable branch just in case anyone else needs it this cycle.
>
I went ahead and picked these up on
https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git ib-iio-x86-asm-fix-7.3
and merged that into the main IIO branch. I want to give plenty of time in next
for the driver that was relying on them.
Currently this is all in my testing branch but I'll push that out as a non rebasing
(ideally) branch a bit later in the week.
Thanks
Jonathan
> Jonathan
>
>
> > Thanks,
> >
> > Jonathan
> >
> > > David
> > >
> > > >
> > > >
> > > > Nicolas
> > >
> >
>
>