From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Subject: Re: [PATCH v3 05/14] ARM: mvebu: Make ll_set_cpu_coherent() more configurable Date: Mon, 14 Oct 2013 16:26:36 +0200 Message-ID: <20131014162636.1f486053@skate> References: <1381759106-15004-1-git-send-email-gregory.clement@free-electrons.com> <1381759106-15004-6-git-send-email-gregory.clement@free-electrons.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from top.free-electrons.com ([176.31.233.9]:33007 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754084Ab3JNO0j (ORCPT ); Mon, 14 Oct 2013 10:26:39 -0400 In-Reply-To: <1381759106-15004-6-git-send-email-gregory.clement@free-electrons.com> Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Gregory CLEMENT Cc: Daniel Lezcano , "Rafael J. Wysocki" , linux-pm@vger.kernel.org, lorenzo.pieralisi@arm.com, Jason Cooper , Andrew Lunn , Ezequiel Garcia , Sebastian Hesselbarth , linux-arm-kernel@lists.infradead.org, Nicolas Pitre , Lior Amsalem , Maen Suleiman , Tawfik Bayouk , Shadi Ammouri , Eran Ben-Avi , Yehuda Yitschak , Nadav Haklai , Ike Pan , Dan Frazier , Leif Lindholm , Jon Masters , David Marlin Dear Gregory CLEMENT, On Mon, 14 Oct 2013 15:58:17 +0200, Gregory CLEMENT wrote: > ll_set_cpu_coherent does two things to set the coherency for a CPU: > > - Adding the CPU to the SMP group 0 > - Enabling the snooping on the CPU > > Only the second part is needed when coming back from a CPU Idle. This > commit allows to choose to do the first part or not. I am not a fan of this change: those two boolean arguments are really mystical. If a function does do things, and sometimes must be called to do one thing, and sometimes for two things, it is really calling for a split of the functions (with potentially the second function calling the first, or the two functions being called in a row when needed). Let's have two functions: ll_set_cpu_smp_group(); ll_set_cpu_coherent(); at initialization time, both functions are called. On the exit path of idle, only the second one is called. Best regards, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com