From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 D1DE024DCF6 for ; Mon, 3 Aug 2026 09:59:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785751178; cv=none; b=kf1CPJHWb7OTlDlERFDaRQoeQbvt15H+jJnmh2P3JUHPacYvlB2HQ5VV7Jqp21u1yVgYGP40sKSURVho5AKvqfbii7j4j/SYjgC81P67nZD6/Ad0AG3weQRbnyf9z3Z+feFx+/VNLFKoQvqwDjDWPLJmop0dXP5lk4ZEQSun8y0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785751178; c=relaxed/simple; bh=7NmBNSLb6nvcWhKEZNurBumrFYnGbH7CupWmJuQPwog=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=vAq2CBgTptX9hZUt+4EmPuwzLX+kjCNy2TON55HyLht3UHMP62kaxgksGD6g8uLbV8nkpGN2szdjCJ94msQXwRjpsnD8UurBxg1g+zvGxXQ6AoseNRfrYBczmOHHm+SxG6w/bvxVyAN4QZD9GpNwEhttPFiCAKS0o4yw7YT8/N4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=lQk6u7Hz; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="lQk6u7Hz" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=bEtP1cRSiTyqi/xEsx7/GiKQLw6iaweCEj0pvnrNalc=; b=lQk6u7Hz+7ZfedjaNVKle9L5T/ L6QWvQjThXM1gXbpk9ulynPkkXc+mhYKZ00cwcmFQQ/ThOxuBIBj/CUMjP45yep/61upj3R0u/+Nq Zo4A1ubcVT00eIGh8695bWHH5e41yS8AueZQohQhkBRDFroH6vHP++/vFknsmWEL597bv6PccEalb SjYnbg6S5zm+/qm6PemPJgeb4SFt1cDQBHT0YSUxLSAXZb4zuqkX6h0+br1KvdWx+pKeJ3bDN3IfK QMNJZFbiQ9PRfxmKhm63fT5cKvjc5Oh1uOVI7n7oAbK9p3Wu3lDcdD9iSIwk4sg8wDCOJR6eaTfN8 +HLSsccA==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.99.2 #2 (Red Hat Linux)) id 1wqpSA-00000008s5w-2saQ; Mon, 03 Aug 2026 09:59:27 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 63EAD301127; Mon, 03 Aug 2026 11:59:25 +0200 (CEST) Date: Mon, 3 Aug 2026 11:59:25 +0200 From: Peter Zijlstra To: David Laight Cc: Borislav Betkov , Ingo Molnar , Thomas Gleinxer , Dave Hansen , x86@kernel.org, Andrew Morton , linux-kernel@vger.kernel.org, Nicolas Pitre , "H. Peter Anvin" , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , rodrigo.alencar@analog.com, jic23@kernel.org Subject: Re: [PATCH 0/2] x86: Use "er" asm constriant for add/sub Message-ID: <20260803095925.GF49951@noisy.programming.kicks-ass.net> References: <20260803094702.3852-1-david.laight.linux@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260803094702.3852-1-david.laight.linux@gmail.com> On Mon, Aug 03, 2026 at 10:47:00AM +0100, 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. I suppose the percpu stuff works because of __pcpu_cast_4 truncating the value to u32 and then ignoring the whole signed/unsigned business. And __pcpu_reg_imm_8 has "re".