The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/2] x86: Use "er" asm constriant for add/sub
@ 2026-08-03  9:47 David Laight
  2026-08-03  9:47 ` [PATCH 1/2] lib: mul_u64_add_u64_div_u64: Fix addition of large constants David Laight
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: David Laight @ 2026-08-03  9:47 UTC (permalink / raw)
  To: Borislav Betkov, Ingo Molnar, Thomas Gleinxer, Dave Hansen, x86,
	Andrew Morton, linux-kernel
  Cc: David Laight, Nicolas Pitre, H. Peter Anvin, Peter Zijlstra,
	Uwe Kleine-König, rodrigo.alencar, jic23

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.

David Laight (2):
  lib: mul_u64_add_u64_div_u64: Fix addition of large constants
  x86/local: local_add/local_sub: Support large immediate values

 arch/x86/include/asm/div64.h | 2 +-
 arch/x86/include/asm/local.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.39.5


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-08-03 15:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-03  9:47 [PATCH 0/2] x86: Use "er" asm constriant for add/sub David Laight
2026-08-03  9:47 ` [PATCH 1/2] lib: mul_u64_add_u64_div_u64: Fix addition of large constants David Laight
2026-08-03 10:08   ` H. Peter Anvin
2026-08-03  9:47 ` [PATCH 2/2] x86/local: local_add/local_sub: Support large immediate values David Laight
2026-08-03 10:01   ` Peter Zijlstra
2026-08-03 10:07   ` H. Peter Anvin
2026-08-03  9:59 ` [PATCH 0/2] x86: Use "er" asm constriant for add/sub Peter Zijlstra
2026-08-03 14:49 ` Nicolas Pitre
2026-08-03 15:39   ` David Laight

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox