Thread (45 messages) 45 messages, 7 authors, 2020-06-08

Re: [PATCH v5] alpha: fix memory barriers so that they conform to the specification

From: Maciej W. Rozycki <hidden>
Date: 2020-05-25 16:39:21
Also in: linux-rtc, linux-serial

On Mon, 25 May 2020, Mikulas Patocka wrote:
quoted
quoted
The functions __raw_read* are already extern inline, so the compiler will 
inline/noinline them depending on the macros trivial_io_bw and 
trivial_io_lq - so we can just call them from read*_relaxed without 
repeating the extern inline pattern.
 The whole point of this peculiar arrangement for cooked accessors is to 
avoid having barriers inserted inline around out-of-line calls to raw 
accessors,
I see, but why do we want to avoid that? Linux kernel has no binary 
compatibility, so it doesn't matter if the barriers are inlined in the 
drivers or not.
 It does matter as it expands code unnecessarily (at all call sites), as I 
noted in the original review.  This has nothing to do with compatibility.
Anyway, I've sent a next version of the patch that makes read*_relaxed 
extern inline.
 Thanks, I'll have a look.  And now that you have this update, please run 
`size' on ALPHA_GENERIC `vmlinux', preferably monolithic, to see what the 
difference is between `read*_relaxed' handlers `static inline' and keyed 
with `*trivial_rw_*'.

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