Thread (103 messages) 103 messages, 16 authors, 2017-12-04

[PATCH v2 11/18] arm64: make mrs_s and msr_s macros work with LTO

From: samitolvanen@google.com (Sami Tolvanen)
Date: 2017-11-16 17:12:04
Also in: linux-kbuild, lkml

On Thu, Nov 16, 2017 at 11:01:44AM -0600, Segher Boessenkool wrote:
The thing with .purgem can work.  Inelegant, sure, but it can work :-)
It works, there are already functions in the kernel that use these
macros more than once. I agree that this might not be the most elegant
solution, but at least it allows us to use the same code path for both
compilers.
Just make sure you do the macro define, the code that uses it, and the
undefine, all in the same inline asm statement.
Yes, that's what we're doing here. Only KVM uses msr_s/msr_s directly,
everything else uses the (read|write)_sysreg_s wrappers instead, which
means the DEFINE/UNDEFINE macros are only needed in few places.

Sami
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help