From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH] metag: Fix atomic_*_return inline asm constraints Date: Tue, 3 May 2016 10:52:46 +0200 Message-ID: <20160503085246.GK3430@twins.programming.kicks-ass.net> References: <1462264859-26544-1-git-send-email-james.hogan@imgtec.com> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: <1462264859-26544-1-git-send-email-james.hogan-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org> Sender: linux-metag-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: James Hogan Cc: linux-metag-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Tue, May 03, 2016 at 09:40:59AM +0100, James Hogan wrote: > The argument i of atomic_*_return() operations is given to inline asm > with the "bd" constraint, which means "An Op2 register where Op1 is a > data unit register and the instruction supports O2R", however Op1 is > constrained by "da" which allows an address unit register to be used. > > Fix the constraint to use "br", meaning "An Op2 register and the > instruction supports O2R", i.e. not requiring Op1 to be a data unit > register. > > Fixes: d6dfe2509da9 ("locking,arch,metag: Fold atomic_ops") > Signed-off-by: James Hogan > Cc: Peter Zijlstra > Cc: linux-metag-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Thanks James, I'd give an ack, but I really don't know about these funny constraints you have, so I'm not sure it'd actually mean something.