From: Kevin Hilman <khilman@ti.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
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
Date: Thu, 23 Jun 2011 14:27:10 -0700 [thread overview]
Message-ID: <87mxh88ci9.fsf@ti.com> (raw)
In-Reply-To: <E1QZpOm-0005nx-T1@rmk-PC.arm.linux.org.uk> (Russell King's message of "Thu, 23 Jun 2011 20:17:08 +0100")
Russell King - ARM Linux <linux@arm.linux.org.uk> writes:
> The first and second arguments shouldn't concern platform code, so
> hide them from each platforms caller.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> 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 <asm/memory.h>
> +
> +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:
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
/*
Kevin
WARNING: multiple messages have this Message-ID (diff)
From: khilman@ti.com (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 24/25] ARM: pm: hide 1st and 2nd arguments to cpu_suspend from platform code
Date: Thu, 23 Jun 2011 14:27:10 -0700 [thread overview]
Message-ID: <87mxh88ci9.fsf@ti.com> (raw)
In-Reply-To: <E1QZpOm-0005nx-T1@rmk-PC.arm.linux.org.uk> (Russell King's message of "Thu, 23 Jun 2011 20:17:08 +0100")
Russell King - ARM Linux <linux@arm.linux.org.uk> writes:
> The first and second arguments shouldn't concern platform code, so
> hide them from each platforms caller.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> 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 <asm/memory.h>
> +
> +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:
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
/*
Kevin
next prev parent reply other threads:[~2011-06-23 21:27 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-23 19:09 [PATCH 00/25] Re-jig cpu_suspend for a saner calling convention Russell King - ARM Linux
2011-06-23 19:09 ` Russell King - ARM Linux
2011-06-23 19:09 ` [PATCH 01/25] ARM: pm: ensure ARMv7 CPUs save and restore the TLS register Russell King - ARM Linux
2011-06-23 19:09 ` Russell King - ARM Linux
2011-06-23 19:09 ` [PATCH 02/25] ARM: pm: arrange for cpu_proc_init() to be called on resume Russell King - ARM Linux
2011-06-23 19:09 ` Russell King - ARM Linux
2011-06-23 19:10 ` [PATCH 03/25] ARM: pm: sa1100: no need to re-enable clock switching Russell King - ARM Linux
2011-06-23 19:10 ` Russell King - ARM Linux
2011-06-23 19:10 ` [PATCH 04/25] ARM: pm: make MULTI_CPU and !MULTI_CPU resume paths the same Russell King - ARM Linux
2011-06-23 19:10 ` Russell King - ARM Linux
2011-06-23 19:10 ` [PATCH 05/25] ARM: pm: move return address (for cpu_resume) to top of stack Russell King - ARM Linux
2011-06-23 19:10 ` Russell King - ARM Linux
2011-06-23 19:11 ` [PATCH 06/25] ARM: pm: extract common code from MULTI_CPU/!MULTI_CPU paths Russell King - ARM Linux
2011-06-23 19:11 ` Russell King - ARM Linux
2011-06-23 19:11 ` [PATCH 07/25] ARM: pm: preserve r4 - r11 across a suspend Russell King - ARM Linux
2011-06-23 19:11 ` Russell King - ARM Linux
2011-06-23 19:11 ` [PATCH 08/25] ARM: pm: reallocate registers to avoid r2, r3 Russell King - ARM Linux
2011-06-23 19:11 ` Russell King - ARM Linux
2011-06-23 19:12 ` [PATCH 09/25] ARM: pm: rejig suspend follow-on function calling convention Russell King - ARM Linux
2011-06-23 19:12 ` Russell King - ARM Linux
2011-06-23 19:12 ` [PATCH 10/25] ARM: pm: move sa1100 to use proper suspend func arg0 Russell King - ARM Linux
2011-06-23 19:12 ` Russell King - ARM Linux
2011-06-23 19:12 ` [PATCH 11/25] ARM: pm: convert cpu_suspend() to a normal function Russell King - ARM Linux
2011-06-23 19:12 ` Russell King - ARM Linux
2011-06-23 19:13 ` [PATCH 12/25] ARM: pm: move cpu_init() call into core code Russell King - ARM Linux
2011-06-23 19:13 ` Russell King - ARM Linux
2011-06-23 19:13 ` [PATCH 13/25] ARM: pm: sa1100: move cpu_suspend into C code Russell King - ARM Linux
2011-06-23 19:13 ` Russell King - ARM Linux
2011-06-23 19:13 ` [PATCH 14/25] ARM: pm: plat-s3c24xx: cleanup s3c_cpu_save Russell King - ARM Linux
2011-06-23 19:13 ` Russell King - ARM Linux
2011-06-24 6:48 ` Kukjin Kim
2011-06-24 6:48 ` Kukjin Kim
2011-06-23 19:14 ` [PATCH 15/25] ARM: pm: mach-s5pv210: " Russell King - ARM Linux
2011-06-23 19:14 ` Russell King - ARM Linux
2011-06-23 19:14 ` [PATCH 16/25] ARM: pm: mach-exynos4: " Russell King - ARM Linux
2011-06-23 19:14 ` Russell King - ARM Linux
2011-06-23 19:14 ` [PATCH 17/25] ARM: pm: mach-s3c64xx: " Russell King - ARM Linux
2011-06-23 19:14 ` Russell King - ARM Linux
2011-06-23 19:15 ` [PATCH 18/25] ARM: pm: samsung: move cpu_suspend into C code Russell King - ARM Linux
2011-06-23 19:15 ` Russell King - ARM Linux
2011-06-23 19:15 ` [PATCH 19/25] ARM: pm: samsung: no need to call flush_cache_all() Russell King - ARM Linux
2011-06-23 19:15 ` Russell King - ARM Linux
2011-06-23 19:15 ` [PATCH 20/25] ARM: pm: pxa: move cpu_suspend into C code Russell King - ARM Linux
2011-06-23 19:15 ` Russell King - ARM Linux
2011-06-23 19:16 ` [PATCH 21/25] ARM: pm: omap34xx: no need to save all registers in sleep34xx.S Russell King - ARM Linux
2011-06-23 19:16 ` Russell King - ARM Linux
2011-06-23 19:16 ` [PATCH 22/25] ARM: pm: omap34xx: remove misleading comment and use of r9 Russell King - ARM Linux
2011-06-23 19:16 ` Russell King - ARM Linux
2011-06-23 19:16 ` [PATCH 23/25] ARM: pm: omap34xx: convert to generic suspend/resume support Russell King - ARM Linux
2011-06-23 19:16 ` Russell King - ARM Linux
2011-06-24 7:37 ` Jean Pihet
2011-06-24 7:37 ` Jean Pihet
2011-06-24 7:42 ` Russell King - ARM Linux
2011-06-24 7:42 ` Russell King - ARM Linux
2011-06-23 19:17 ` [PATCH 24/25] ARM: pm: hide 1st and 2nd arguments to cpu_suspend from platform code Russell King - ARM Linux
2011-06-23 19:17 ` Russell King - ARM Linux
2011-06-23 21:27 ` Kevin Hilman [this message]
2011-06-23 21:27 ` Kevin Hilman
2011-06-23 19:17 ` [PATCH 25/25] ARM: pm: ensure our temporary page table entry is removed from the TLB Russell King - ARM Linux
2011-06-23 19:17 ` Russell King - ARM Linux
2011-06-23 22:14 ` [PATCH 00/25] Re-jig cpu_suspend for a saner calling convention Kevin Hilman
2011-06-23 22:14 ` Kevin Hilman
2011-06-24 7:43 ` Jean Pihet
2011-06-24 7:43 ` Jean Pihet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mxh88ci9.fsf@ti.com \
--to=khilman@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.