Skip to content

use asm() for atomic_{read|set}

Sebastian Siewior lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2i386: use asm() like the other atomic operations already do.include/asm-i386/atomic.h+21 -610 replies
2/2x86_64: use asm() like the other atomic operations already do.include/asm-x86_64/atomic.h+39 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 0/2] use asm() for atomic_{read|set}

I converted i386+x86-64. Compiled, booted and played for a while. The description of both patches contains the file size of four kernel builds:
- "normal" is 28e8351ac22de25034e048c680014ad824323c65 as it
- "inline asm" is with this patch
- "inline volatile" is *(volatile int *)&(v)->counter as a static inline function
- "volatile" is *(volatile int *)&(v)->counter as a #define macro

I hope I don't encourage anyone to use macros over inline functions.

Sebastian