Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1459839 > unrolled thread

[PATCH] ARM: cpuidle: declare cpuidle_ops __read_mostly

Started byJisheng Zhang <jszhang@marvell.com>
First post2016-08-10 22:30 +0200
Last post2016-08-10 22:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] ARM: cpuidle: declare cpuidle_ops __read_mostly Jisheng Zhang <jszhang@marvell.com> - 2016-08-10 22:30 +0200

#1459839 — [PATCH] ARM: cpuidle: declare cpuidle_ops __read_mostly

FromJisheng Zhang <jszhang@marvell.com>
Date2016-08-10 22:30 +0200
Subject[PATCH] ARM: cpuidle: declare cpuidle_ops __read_mostly
Message-ID<s4Gqo-b4-121@gated-at.bofh.it>
cpuidle_ops is initialized once by arm_cpuidle_read_ops() during
initialization, and thereafter is mostly read in arm_cpuidle_suspend()

The fact that it is mostly read and not written to makes it candidates
for __read_mostly declarations.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
---
 arch/arm/kernel/cpuidle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/kernel/cpuidle.c b/arch/arm/kernel/cpuidle.c
index 7dccc96..762e0929 100644
--- a/arch/arm/kernel/cpuidle.c
+++ b/arch/arm/kernel/cpuidle.c
@@ -19,7 +19,7 @@ extern struct of_cpuidle_method __cpuidle_method_of_table[];
 static const struct of_cpuidle_method __cpuidle_method_of_table_sentinel
 	__used __section(__cpuidle_method_of_table_end);
 
-static struct cpuidle_ops cpuidle_ops[NR_CPUS];
+static struct cpuidle_ops cpuidle_ops[NR_CPUS] __read_mostly;
 
 /**
  * arm_cpuidle_simple_enter() - a wrapper to cpu_do_idle()
-- 
2.8.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web