From patchwork Thu Jun 23 21:27:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 914062 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5NLZFJ5012179 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 23 Jun 2011 21:35:37 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QZrYB-0007ok-CL; Thu, 23 Jun 2011 21:34:59 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QZrYA-0006w4-W6; Thu, 23 Jun 2011 21:34:59 +0000 Received: from na3sys009aog104.obsmtp.com ([74.125.149.73]) by canuck.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1QZrY7-0006vk-KM for linux-arm-kernel@lists.infradead.org; Thu, 23 Jun 2011 21:34:56 +0000 Received: from mail-pz0-f48.google.com ([209.85.210.48]) (using TLSv1) by na3sys009aob104.postini.com ([74.125.148.12]) with SMTP ID DSNKTgOxfe3lWHD/GLcM9OicDNzz6pXkTozG@postini.com; Thu, 23 Jun 2011 14:34:55 PDT Received: by pzk10 with SMTP id 10so1843472pzk.21 for ; Thu, 23 Jun 2011 14:34:53 -0700 (PDT) Received: by 10.68.4.161 with SMTP id l1mr1413094pbl.55.1308864433025; Thu, 23 Jun 2011 14:27:13 -0700 (PDT) Received: from localhost (c-24-19-7-36.hsd1.wa.comcast.net [24.19.7.36]) by mx.google.com with ESMTPS id i9sm1505940pbk.36.2011.06.23.14.27.11 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Jun 2011 14:27:12 -0700 (PDT) From: Kevin Hilman To: Russell King - ARM Linux Subject: Re: [PATCH 24/25] ARM: pm: hide 1st and 2nd arguments to cpu_suspend from platform code Organization: Texas Instruments, Inc. References: <20110623190900.GH9449@n2100.arm.linux.org.uk> Date: Thu, 23 Jun 2011 14:27:10 -0700 In-Reply-To: (Russell King's message of "Thu, 23 Jun 2011 20:17:08 +0100") Message-ID: <87mxh88ci9.fsf@ti.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110623_173455_901386_EA2D0BD5 X-CRM114-Status: GOOD ( 20.75 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [74.125.149.73 listed in list.dnswl.org] Cc: linux-omap@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 23 Jun 2011 21:35:37 +0000 (UTC) Russell King - ARM Linux writes: > The first and second arguments shouldn't concern platform code, so > hide them from each platforms caller. > > Signed-off-by: Russell King > --- > arch/arm/include/asm/suspend.h | 19 +++++++++++++++++++ > arch/arm/include/asm/system.h | 2 -- > arch/arm/kernel/sleep.S | 2 +- > arch/arm/mach-omap2/pm34xx.c | 5 +++-- > arch/arm/mach-pxa/palmz72.c | 1 + > arch/arm/mach-pxa/pxa25x.c | 4 ++-- > arch/arm/mach-pxa/pxa27x.c | 4 ++-- > arch/arm/mach-pxa/pxa3xx.c | 3 ++- > arch/arm/mach-pxa/zeus.c | 4 ++-- > arch/arm/mach-sa1100/pm.c | 3 ++- > arch/arm/plat-samsung/pm.c | 3 ++- > 11 files changed, 36 insertions(+), 14 deletions(-) > create mode 100644 arch/arm/include/asm/suspend.h > > diff --git a/arch/arm/include/asm/suspend.h b/arch/arm/include/asm/suspend.h > new file mode 100644 > index 0000000..8d5b446 > --- /dev/null > +++ b/arch/arm/include/asm/suspend.h > @@ -0,0 +1,19 @@ > +#ifndef __ASM_ARM_SUSPEND_H > +#define __ASM_ARM_SUSPEND_H > + > +#include > + > +extern void cpu_resume(void); > + > +/* > + * Hide the first two arguments to __cpu_suspend - these are an implementation > + * detail which platform code shouldn't have to know about. > + */ > +static inline void cpu_suspend(unsigned long arg, void (*fn)(unsigned long)) > +{ > + extern void __cpu_suspend(int, long, unsigned long, > + void (*)(unsigned long)); > + __cpu_suspend(0, PHYS_OFFSET - PAGE_OFFSET, arg, fn); > +} > + > +#endif > diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h > index 50be605..832888d 100644 > --- a/arch/arm/include/asm/system.h > +++ b/arch/arm/include/asm/system.h > @@ -106,8 +106,6 @@ extern void __show_regs(struct pt_regs *); > > extern int cpu_architecture(void); > extern void cpu_init(void); > -extern void cpu_suspend(int, long, unsigned long, void (*)(unsigned long)); > -extern void cpu_resume(void); > > void arm_machine_restart(char mode, const char *cmd); > extern void (*arm_pm_restart)(char str, const char *cmd); > diff --git a/arch/arm/kernel/sleep.S b/arch/arm/kernel/sleep.S > index 5392274..0bdcc72 100644 > --- a/arch/arm/kernel/sleep.S > +++ b/arch/arm/kernel/sleep.S > @@ -14,7 +14,7 @@ > * r3 = suspend function > * Note: does not return until system resumes > */ > -ENTRY(cpu_suspend) > +ENTRY(__cpu_suspend) You missed also changing the ENDPROC here, so it doesn't compile without: Kevin diff --git a/arch/arm/kernel/sleep.S b/arch/arm/kernel/sleep.S index 0bdcc72..c156d0e 100644 --- a/arch/arm/kernel/sleep.S +++ b/arch/arm/kernel/sleep.S @@ -56,7 +56,7 @@ ENTRY(__cpu_suspend) bl __cpuc_flush_kern_all #endif ldmfd sp!, {r0, pc} @ call suspend fn -ENDPROC(cpu_suspend) +ENDPROC(__cpu_suspend) .ltorg /*