Thread (20 messages) 20 messages, 4 authors, 2017-08-04

Re: [PATCH v9 14/14] powerpc: rewrite local_t using soft_irq

flat view

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2017-08-04 09:04:44

On Fri, 04 Aug 2017 11:40:43 +1000
Benjamin Herrenschmidt [off-list ref] wrote:
On Fri, 2017-08-04 at 03:50 +1000, Nicholas Piggin wrote:
quoted
Hey, so... why are any of these implemented in asm? We should
just do them all in C, right? I looked a bit harder at code gen
and a couple of them are still emitting larx/stcx.  
As long as we can guarantee that the C compiler won't play games
moving stuff around. But yes, I tend to agree.

I believe so. I mean we already depend on the same pattern for any
other sequence of local_irq_disable(); c code; local_irq_enable();
so we'd have other problems if we couldn't.

I can easily believe there have been bugs with the fixed r13
handling in gcc in the past, but it looks like it does the right
thing now AFAIKS.

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