From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Subject: Re: [PATCH v2 4/6] ARM: firmware: add prepare_idle() operation Date: Thu, 13 Feb 2014 09:37:05 -0700 Message-ID: <52FCF4B1.5030208@wwwdotorg.org> References: <1391747706-1847-1-git-send-email-acourbot@nvidia.com> <1391747706-1847-5-git-send-email-acourbot@nvidia.com> <52FCA5FC.80504@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <52FCA5FC.80504-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Tomasz Figa , Alexandre Courbot , Thierry Reding , Russell King Cc: Olof Johansson , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org List-Id: linux-tegra@vger.kernel.org On 02/13/2014 04:01 AM, Tomasz Figa wrote: > Hi Alexandre, > > On 07.02.2014 05:35, Alexandre Courbot wrote: >> Some firmwares do not put the CPU into idle mode themselves, but still >> need to be informed that the CPU is about to enter idle mode before this >> happens. Add a prepare_idle() operation to the firmware_ops structure to >> handle such cases. >> >> Signed-off-by: Alexandre Courbot >> --- >> arch/arm/include/asm/firmware.h | 4 ++++ >> 1 file changed, 4 insertions(+) > > I wonder if .do_idle() couldn't simply return an appropriate error code > to let the upper layer know that it should proceed with normal CPU idle > activation, while still letting the firmware know that the CPU is going > to idle. That seems to disagree with the naming of the operation, and the semantics I assume it has, though. It seems clearer to add an explicit separate op for this. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752204AbaBMQhL (ORCPT ); Thu, 13 Feb 2014 11:37:11 -0500 Received: from avon.wwwdotorg.org ([70.85.31.133]:45067 "EHLO avon.wwwdotorg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752114AbaBMQhJ (ORCPT ); Thu, 13 Feb 2014 11:37:09 -0500 Message-ID: <52FCF4B1.5030208@wwwdotorg.org> Date: Thu, 13 Feb 2014 09:37:05 -0700 From: Stephen Warren User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Tomasz Figa , Alexandre Courbot , Thierry Reding , Russell King CC: Olof Johansson , linux-arm-kernel@lists.infradead.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, gnurou@gmail.com Subject: Re: [PATCH v2 4/6] ARM: firmware: add prepare_idle() operation References: <1391747706-1847-1-git-send-email-acourbot@nvidia.com> <1391747706-1847-5-git-send-email-acourbot@nvidia.com> <52FCA5FC.80504@samsung.com> In-Reply-To: <52FCA5FC.80504@samsung.com> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/13/2014 04:01 AM, Tomasz Figa wrote: > Hi Alexandre, > > On 07.02.2014 05:35, Alexandre Courbot wrote: >> Some firmwares do not put the CPU into idle mode themselves, but still >> need to be informed that the CPU is about to enter idle mode before this >> happens. Add a prepare_idle() operation to the firmware_ops structure to >> handle such cases. >> >> Signed-off-by: Alexandre Courbot >> --- >> arch/arm/include/asm/firmware.h | 4 ++++ >> 1 file changed, 4 insertions(+) > > I wonder if .do_idle() couldn't simply return an appropriate error code > to let the upper layer know that it should proceed with normal CPU idle > activation, while still letting the firmware know that the CPU is going > to idle. That seems to disagree with the naming of the operation, and the semantics I assume it has, though. It seems clearer to add an explicit separate op for this. From mboxrd@z Thu Jan 1 00:00:00 1970 From: swarren@wwwdotorg.org (Stephen Warren) Date: Thu, 13 Feb 2014 09:37:05 -0700 Subject: [PATCH v2 4/6] ARM: firmware: add prepare_idle() operation In-Reply-To: <52FCA5FC.80504@samsung.com> References: <1391747706-1847-1-git-send-email-acourbot@nvidia.com> <1391747706-1847-5-git-send-email-acourbot@nvidia.com> <52FCA5FC.80504@samsung.com> Message-ID: <52FCF4B1.5030208@wwwdotorg.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 02/13/2014 04:01 AM, Tomasz Figa wrote: > Hi Alexandre, > > On 07.02.2014 05:35, Alexandre Courbot wrote: >> Some firmwares do not put the CPU into idle mode themselves, but still >> need to be informed that the CPU is about to enter idle mode before this >> happens. Add a prepare_idle() operation to the firmware_ops structure to >> handle such cases. >> >> Signed-off-by: Alexandre Courbot >> --- >> arch/arm/include/asm/firmware.h | 4 ++++ >> 1 file changed, 4 insertions(+) > > I wonder if .do_idle() couldn't simply return an appropriate error code > to let the upper layer know that it should proceed with normal CPU idle > activation, while still letting the firmware know that the CPU is going > to idle. That seems to disagree with the naming of the operation, and the semantics I assume it has, though. It seems clearer to add an explicit separate op for this.