mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 22:14:36 -04:00
ad0a2e4c2f20510d7e3f2bc110cf74f8578547f0
Use sync_try_cmpxchg() instead of sync_cmpxchg(*ptr, old, new) == old
in clear_masked_cond(), clear_linked() and
gnttab_end_foreign_access_ref_v1(). x86 CMPXCHG instruction returns
success in ZF flag, so this change saves a compare after cmpxchg
(and related move instruction in front of cmpxchg), improving the
cmpxchg loop in gnttab_end_foreign_access_ref_v1() from:
174: eb 0e jmp 184 <...>
176: 89 d0 mov %edx,%eax
178: f0 66 0f b1 31 lock cmpxchg %si,(%rcx)
17d: 66 39 c2 cmp %ax,%dx
180: 74 11 je 193 <...>
182: 89 c2 mov %eax,%edx
184: 89 d6 mov %edx,%esi
186: 66 83 e6 18 and $0x18,%si
18a: 74 ea je 176 <...>
to:
614: 89 c1 mov %eax,%ecx
616: 66 83 e1 18 and $0x18,%cx
61a: 75 11 jne 62d <...>
61c: f0 66 0f b1 0a lock cmpxchg %cx,(%rdx)
621: 75 f1 jne 614 <...>
No functional change intended.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Juergen Gross <jgross@suse.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Merge tag 'asoc-fix-v6.6-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
Linux kernel
============
There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.
In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``. The formatted documentation can also be read online at:
https://www.kernel.org/doc/html/latest/
There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
Languages
C
97%
Assembly
1%
Shell
0.6%
Rust
0.5%
Python
0.4%
Other
0.3%