All of lore.kernel.org
 help / color / mirror / Atom feed
From: shawn.guo@linaro.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] ARM: cache-l2x0: remove __init annotation from initialization functions
Date: Tue,  6 Sep 2011 13:48:26 +0800	[thread overview]
Message-ID: <1315288107-14689-2-git-send-email-shawn.guo@linaro.org> (raw)
In-Reply-To: <1315288107-14689-1-git-send-email-shawn.guo@linaro.org>

If ARM core gets powered off during suspend, L2 cache controller
has to be reinitialized by resume procedure.

The patch removes __init annotation from a few initialization
functions to make the reinitialization possible.  For example,
platform resume function can call l2x0_of_init() to get L2 cache
back to work.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 arch/arm/include/asm/hardware/cache-l2x0.h |    2 +-
 arch/arm/mm/cache-l2x0.c                   |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h
index d22765c..d270310 100644
--- a/arch/arm/include/asm/hardware/cache-l2x0.h
+++ b/arch/arm/include/asm/hardware/cache-l2x0.h
@@ -89,7 +89,7 @@
 #define L2X0_ADDR_FILTER_EN		1
 
 #ifndef __ASSEMBLY__
-extern void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask);
+extern void l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask);
 #if defined(CONFIG_CACHE_L2X0) && defined(CONFIG_OF)
 extern int l2x0_of_init(__u32 aux_val, __u32 aux_mask);
 #else
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index c035b9a..7835cb6 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -280,7 +280,7 @@ static void l2x0_disable(void)
 	spin_unlock_irqrestore(&l2x0_lock, flags);
 }
 
-void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
+void l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
 {
 	__u32 aux;
 	__u32 cache_id;
@@ -356,7 +356,7 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
 }
 
 #ifdef CONFIG_OF
-static void __init l2x0_of_setup(const struct device_node *np,
+static void l2x0_of_setup(const struct device_node *np,
 				 __u32 *aux_val, __u32 *aux_mask)
 {
 	u32 data[2] = { 0, 0 };
@@ -390,7 +390,7 @@ static void __init l2x0_of_setup(const struct device_node *np,
 	*aux_mask &= ~mask;
 }
 
-static void __init pl310_of_setup(const struct device_node *np,
+static void pl310_of_setup(const struct device_node *np,
 				  __u32 *aux_val, __u32 *aux_mask)
 {
 	u32 data[3] = { 0, 0, 0 };
@@ -424,14 +424,14 @@ static void __init pl310_of_setup(const struct device_node *np,
 	}
 }
 
-static const struct of_device_id l2x0_ids[] __initconst = {
+static const struct of_device_id l2x0_ids[] = {
 	{ .compatible = "arm,pl310-cache", .data = pl310_of_setup },
 	{ .compatible = "arm,l220-cache", .data = l2x0_of_setup },
 	{ .compatible = "arm,l210-cache", .data = l2x0_of_setup },
 	{}
 };
 
-int __init l2x0_of_init(__u32 aux_val, __u32 aux_mask)
+int l2x0_of_init(__u32 aux_val, __u32 aux_mask)
 {
 	struct device_node *np;
 	void (*l2_setup)(const struct device_node *np,
-- 
1.7.4.1

  reply	other threads:[~2011-09-06  5:48 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-06  5:48 [PATCH v2 0/2] make reinitialization of ARM core components possible Shawn Guo
2011-09-06  5:48 ` Shawn Guo [this message]
2011-09-06  7:19   ` [PATCH v2 1/2] ARM: cache-l2x0: remove __init annotation from initialization functions Linus Walleij
2011-09-12  5:27     ` Shawn Guo
2011-09-14  8:42   ` Russell King - ARM Linux
2011-09-14  8:53     ` Santosh
2011-09-14 19:05       ` Russell King - ARM Linux
2011-09-14  9:59     ` Barry Song
2011-09-15  1:39     ` Shawn Guo
2011-09-15  8:32       ` Russell King - ARM Linux
2011-09-16  3:24         ` Barry Song
2011-09-17 10:45           ` Russell King - ARM Linux
2011-09-17 14:41             ` Barry Song
2011-09-17 14:56               ` Russell King - ARM Linux
2011-09-19  3:36                 ` Barry Song
2011-09-19  5:33                 ` Barry Song
2011-09-23 20:55                   ` Russell King - ARM Linux
2011-09-26  2:43                     ` Barry Song
2011-09-17 15:14             ` Shawn Guo
2011-09-06  5:48 ` [PATCH v2 2/2] ARM: smp_scu: remove __init annotation from scu_enable() Shawn Guo
2011-09-17  8:32   ` Shawn Guo
2011-09-22 15:04     ` Shawn Guo
2011-09-23 20:49       ` Russell King - ARM Linux
2011-09-24 10:39         ` Shawn Guo
2011-09-24 10:38           ` Russell King - ARM Linux
2011-09-06  6:01 ` [PATCH v2 0/2] make reinitialization of ARM core components possible Santosh
2011-09-06  7:02   ` Santosh
2011-09-12  5:41   ` Shawn Guo
2011-09-14 19:07     ` Russell King - ARM Linux
2011-09-15  1:53       ` Shawn Guo
2011-09-15  8:43         ` Russell King - ARM Linux

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=1315288107-14689-2-git-send-email-shawn.guo@linaro.org \
    --to=shawn.guo@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.