Thread (18 messages) 18 messages, 3 authors, 2019-08-28

Re: [PATCH v3 2/5] arm64: Use correct ll/sc atomic constraints

From: Mark Rutland <mark.rutland@arm.com>
Date: 2019-08-28 16:24:17

On Wed, Aug 28, 2019 at 04:44:22PM +0100, Andrew Murray wrote:
On Wed, Aug 28, 2019 at 04:25:40PM +0100, Mark Rutland wrote:
quoted
On Wed, Aug 28, 2019 at 02:01:19PM +0100, Andrew Murray wrote:
quoted
On Thu, Aug 22, 2019 at 04:32:23PM +0100, Mark Rutland wrote:
quoted
On Mon, Aug 12, 2019 at 03:36:22PM +0100, Andrew Murray wrote:
[...]
quoted
-ATOMIC64_OPS(and, and)
-ATOMIC64_OPS(andnot, bic)
-ATOMIC64_OPS(or, orr)
-ATOMIC64_OPS(xor, eor)
+ATOMIC64_OPS(and, and, K)
+ATOMIC64_OPS(andnot, bic, )
+ATOMIC64_OPS(or, orr, K)
+ATOMIC64_OPS(xor, eor, K)
Shouldn't these be 'L'?

IIUC K is a subset of L, so if that's deliberate we should call that out
explicitly...
Oooh yes that's wrong. I guess the atomic64_[and,or,xor] are rarely called
in the kernel which perhaps is why the compiler hasn't shouted at me.

Do you agree that the and, orr and eor should all be 'L' instead of 'K'?
Yes, I think all the 64-bit logical ops should all use 'L'.
With the exception of bic? I don't think there is an appropriate constraint
for this (it requires an 8 bit immediate).
The ARM ARM doesn't mention BIC (Immediate), and AFAICT that's an
(undocumented?) alias for AND (Immediate) with a negated immediate.

Where did you find a description with an 8-bit immediate?

Regardless, yes, drop the 'L' there -- I can't find any suitable
constraint either.

Thanks,
Mark.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help