From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753497Ab2IPAaG (ORCPT ); Sat, 15 Sep 2012 20:30:06 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:58011 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752553Ab2IPAaD (ORCPT ); Sat, 15 Sep 2012 20:30:03 -0400 Date: Sat, 15 Sep 2012 17:29:57 -0700 From: Olof Johansson To: Catalin Marinas Cc: "linux-arch@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Will Deacon , "linux-kernel@vger.kernel.org" , Arnd Bergmann Subject: Re: [PATCH v2 07/31] arm64: Process management Message-ID: <20120916002957.GB7028@quad.lixom.net> References: <1344966752-16102-1-git-send-email-catalin.marinas@arm.com> <1344966752-16102-8-git-send-email-catalin.marinas@arm.com> <20120814235013.GC19607@quad.lixom.net> <20120914173352.GC2927@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120914173352.GC2927@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 14, 2012 at 06:33:52PM +0100, Catalin Marinas wrote: > On Wed, Aug 15, 2012 at 12:50:13AM +0100, Olof Johansson wrote: > > On Tue, Aug 14, 2012 at 06:52:08PM +0100, Catalin Marinas wrote: > > > > > diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c > > > new file mode 100644 > > > index 0000000..c4a4e1c > > > --- /dev/null > > > +++ b/arch/arm64/kernel/process.c > > > @@ -0,0 +1,416 @@ > > > > [...] > > > +/* > > > + * Function pointers to optional machine specific functions > > > + */ > > > +void (*pm_power_off)(void); > > > +EXPORT_SYMBOL(pm_power_off); > > > + > > > +void (*pm_restart)(const char *cmd); > > > +EXPORT_SYMBOL_GPL(pm_restart); > > [...] > > > +void (*pm_idle)(void) = default_idle; > > > +EXPORT_SYMBOL(pm_idle); > > > > Does it really make sense to export these to modules? > > Changed them to _GPL now but we may still want them exported to modules. > Who knows, we may just have the SoC code in a loadable module (from > initramfs). Ok, keeping the option open for that makes some sense. > > I find the powerpc way of having a machine descriptor structure with these > > (and other) function pointers in it a bit cleaner, since it gives you > > one place to plug it all in. I'd recommend that you consider doing that > > here as well, for these three and potentially other cases in the future. > > > > (See arch/powerpc/include/asm/machdep.h, struct machdep_calls). > > At some point we may add them but currently I want the SoC code to be > minimal. It's not about the size of the code, it's about having one place where the SoC divergence is exposed instead of adding hooks here and there. But agreed, it could be moved to over time. -Olof