From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Date: Sun, 03 Jan 2016 09:12:44 +0000 Subject: Re: [PATCH v2 17/32] arm: define __smp_xxx Message-Id: <20160103110158-mutt-send-email-mst@redhat.com> List-Id: References: <1451572003-2440-1-git-send-email-mst@redhat.com> <1451572003-2440-18-git-send-email-mst@redhat.com> <20160102112438.GU8644@n2100.arm.linux.org.uk> In-Reply-To: <20160102112438.GU8644@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Russell King - ARM Linux Cc: linux-mips@linux-mips.org, linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, Peter Zijlstra , virtualization@lists.linux-foundation.org, "H. Peter Anvin" , sparclinux@vger.kernel.org, Ingo Molnar , linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, Arnd Bergmann , x86@kernel.org, Tony Lindgren , xen-devel@lists.xenproject.org, Ingo Molnar , linux-xtensa@linux-xtensa.org, user-mode-linux-devel@lists.sourceforge.net, Stefano Stabellini , Andrey Konovalov , adi-buildroot-devel@lists.sourceforge.net, Thomas Gleixner , linux-metag@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Andrew Cooper , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org On Sat, Jan 02, 2016 at 11:24:38AM +0000, Russell King - ARM Linux wrote: > On Thu, Dec 31, 2015 at 09:07:59PM +0200, Michael S. Tsirkin wrote: > > This defines __smp_xxx barriers for arm, > > for use by virtualization. > > > > smp_xxx barriers are removed as they are > > defined correctly by asm-generic/barriers.h > > > > This reduces the amount of arch-specific boiler-plate code. > > > > Signed-off-by: Michael S. Tsirkin > > Acked-by: Arnd Bergmann > > In combination with patch 14, this looks like it should result in no > change to the resulting code. > > Acked-by: Russell King > > 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. > -- > RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/ > FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up > according to speedtest.net. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751828AbcACJM6 (ORCPT ); Sun, 3 Jan 2016 04:12:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41465 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751282AbcACJMy (ORCPT ); Sun, 3 Jan 2016 04:12:54 -0500 Date: Sun, 3 Jan 2016 11:12:44 +0200 From: "Michael S. Tsirkin" To: Russell King - ARM Linux Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Arnd Bergmann , linux-arch@vger.kernel.org, Andrew Cooper , virtualization@lists.linux-foundation.org, Stefano Stabellini , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , David Miller , linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-metag@vger.kernel.org, linux-mips@linux-mips.org, x86@kernel.org, user-mode-linux-devel@lists.sourceforge.net, adi-buildroot-devel@lists.sourceforge.net, linux-sh@vger.kernel.org, linux-xtensa@linux-xtensa.org, xen-devel@lists.xenproject.org, Ingo Molnar , Tony Lindgren , Andrey Konovalov Subject: Re: [PATCH v2 17/32] arm: define __smp_xxx Message-ID: <20160103110158-mutt-send-email-mst@redhat.com> References: <1451572003-2440-1-git-send-email-mst@redhat.com> <1451572003-2440-18-git-send-email-mst@redhat.com> <20160102112438.GU8644@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160102112438.GU8644@n2100.arm.linux.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 02, 2016 at 11:24:38AM +0000, Russell King - ARM Linux wrote: > On Thu, Dec 31, 2015 at 09:07:59PM +0200, Michael S. Tsirkin wrote: > > This defines __smp_xxx barriers for arm, > > for use by virtualization. > > > > smp_xxx barriers are removed as they are > > defined correctly by asm-generic/barriers.h > > > > This reduces the amount of arch-specific boiler-plate code. > > > > Signed-off-by: Michael S. Tsirkin > > Acked-by: Arnd Bergmann > > In combination with patch 14, this looks like it should result in no > change to the resulting code. > > Acked-by: Russell King > > 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. > -- > RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/ > FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up > according to speedtest.net. From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH v2 17/32] arm: define __smp_xxx Date: Sun, 3 Jan 2016 11:12:44 +0200 Message-ID: <20160103110158-mutt-send-email-mst@redhat.com> References: <1451572003-2440-1-git-send-email-mst@redhat.com> <1451572003-2440-18-git-send-email-mst@redhat.com> <20160102112438.GU8644@n2100.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20160102112438.GU8644@n2100.arm.linux.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org List-Archive: List-Post: To: Russell King - ARM Linux Cc: linux-mips@linux-mips.org, linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, Peter Zijlstra , virtualization@lists.linux-foundation.org, "H. Peter Anvin" , sparclinux@vger.kernel.org, Ingo Molnar , linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, Arnd Bergmann , x86@kernel.org, Tony Lindgren , xen-devel@lists.xenproject.org, Ingo Molnar , linux-xtensa@linux-xtensa.org, user-mode-linux-devel@lists.sourceforge.net, Stefano Stabellini , Andrey Konovalov , adi-buildroot-devel@lists.sourceforge.net, Thomas Gleixner , linux-metag@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Andrew Cooper , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org List-ID: On Sat, Jan 02, 2016 at 11:24:38AM +0000, Russell King - ARM Linux wrote: > On Thu, Dec 31, 2015 at 09:07:59PM +0200, Michael S. Tsirkin wrote: > > This defines __smp_xxx barriers for arm, > > for use by virtualization. > > > > smp_xxx barriers are removed as they are > > defined correctly by asm-generic/barriers.h > > > > This reduces the amount of arch-specific boiler-plate code. > > > > Signed-off-by: Michael S. Tsirkin > > Acked-by: Arnd Bergmann > > In combination with patch 14, this looks like it should result in no > change to the resulting code. > > Acked-by: Russell King > > 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. > -- > RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/ > FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up > according to speedtest.net. From mboxrd@z Thu Jan 1 00:00:00 1970 From: mst@redhat.com (Michael S. Tsirkin) Date: Sun, 3 Jan 2016 11:12:44 +0200 Subject: [PATCH v2 17/32] arm: define __smp_xxx In-Reply-To: <20160102112438.GU8644@n2100.arm.linux.org.uk> References: <1451572003-2440-1-git-send-email-mst@redhat.com> <1451572003-2440-18-git-send-email-mst@redhat.com> <20160102112438.GU8644@n2100.arm.linux.org.uk> Message-ID: <20160103110158-mutt-send-email-mst@redhat.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Sat, Jan 02, 2016 at 11:24:38AM +0000, Russell King - ARM Linux wrote: > On Thu, Dec 31, 2015 at 09:07:59PM +0200, Michael S. Tsirkin wrote: > > This defines __smp_xxx barriers for arm, > > for use by virtualization. > > > > smp_xxx barriers are removed as they are > > defined correctly by asm-generic/barriers.h > > > > This reduces the amount of arch-specific boiler-plate code. > > > > Signed-off-by: Michael S. Tsirkin > > Acked-by: Arnd Bergmann > > In combination with patch 14, this looks like it should result in no > change to the resulting code. > > Acked-by: Russell King > > 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. > -- > RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/ > FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up > according to speedtest.net.