Thread (85 messages) 85 messages, 12 authors, 2016-01-11

Re: [PATCH v2 17/32] arm: define __smp_xxx

From: Peter Zijlstra <peterz@infradead.org>
Date: 2016-01-04 13:37:13
Also in: linux-arch, linux-arm-kernel, linux-s390, linux-sh, linux-um, linuxppc-dev, lkml, sparclinux

On Sun, Jan 03, 2016 at 11:12:44AM +0200, Michael S. Tsirkin wrote:
On Sat, Jan 02, 2016 at 11:24:38AM +0000, Russell King - ARM Linux wrote:
quoted
My only concern is that it gives people an additional handle onto a
"new" set of barriers - just because they're prefixed with __*
unfortunately doesn't stop anyone from using it (been there with
other arch stuff before.)

I wonder whether we should consider making the smp memory barriers
inline functions, so these __smp_xxx() variants can be undef'd
afterwards, thereby preventing drivers getting their hands on these
new macros?
That'd be tricky to do cleanly since asm-generic depends on
ifndef to add generic variants where needed.

But it would be possible to add a checkpatch test for this.
Wasn't the whole purpose of these things for 'drivers' (namely
virtio/xen hypervisor interaction) to use these?

And I suppose most of virtio would actually be modules, so you cannot do
what I did with preempt_enable_no_resched() either.

But yes, it would be good to limit the use of these things.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help