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: 914052 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5NLRIDU010576 for ; Thu, 23 Jun 2011 21:27:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759987Ab1FWV1P (ORCPT ); Thu, 23 Jun 2011 17:27:15 -0400 Received: from [74.125.149.146] ([74.125.149.146]:39022 "EHLO psmtp.com" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752784Ab1FWV1O (ORCPT ); Thu, 23 Jun 2011 17:27:14 -0400 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:27:19 +0000 (UTC) X-Greylist: delayed 8502 seconds by postgrey-1.27 at vger.kernel.org; Thu, 23 Jun 2011 17:27:13 EDT Received: from mail-pz0-f42.google.com ([209.85.210.42]) (using TLSv1) by na3sys009aob122.postini.com ([74.125.148.12]) with SMTP ID DSNKTgOvsRbztyibxuCsRG/YIURLoIbg5UaV@postini.com; Thu, 23 Jun 2011 14:27:14 PDT Received: by mail-pz0-f42.google.com with SMTP id 37so1579437pzk.29 for ; Thu, 23 Jun 2011 14:27:13 -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 Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org 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 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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 --- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 /*