From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752733AbcF2H5S (ORCPT ); Wed, 29 Jun 2016 03:57:18 -0400 Received: from down.free-electrons.com ([37.187.137.238]:55939 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751486AbcF2H5Q (ORCPT ); Wed, 29 Jun 2016 03:57:16 -0400 Date: Wed, 29 Jun 2016 09:57:14 +0200 From: Alexandre Belloni To: Alexander Stein Cc: linux-kernel@vger.kernel.org, Russell King - ARM Linux , linux-arm-kernel@lists.infradead.org, Dave Martin , Doug Anderson , Heiko Stuebner , Nicolas Ferre Subject: Re: [PATCH v2 2/2] ARM: at91: pm: switch to the PIE infrastructure Message-ID: <20160629075714.GP29249@piout.net> References: <1467153886-21144-1-git-send-email-alexandre.belloni@free-electrons.com> <1467153886-21144-3-git-send-email-alexandre.belloni@free-electrons.com> <2349417.jWuiI2GXql@ws-stein> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2349417.jWuiI2GXql@ws-stein> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/06/2016 at 08:12:21 +0200, Alexander Stein wrote : > > +#if defined(CONFIG_CPU_V7) > > + dsb(); > > + wfi(); > > +#else > > + asm volatile ("mcr p15, 0, %0, c7, c0, 4" \ > > + : : "r" (0) : "memory"); > > +#endif > > Why not defining wfi() for __LINUX_ARM_ARCH__ < 7 as it is done for dsb() and > friends in arch/arm/include/asm/barrier.h? So you can get rid of that #if > completly. Well, Russell said it was not useful because "there's no architected WFI instruction which doesn't have CPU specific issues (hence why we have cpu_do_idle() to abstract that)" -- Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com