]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
cpuidle: powerpc: read mostly for common globals
authorNicholas Piggin <npiggin@gmail.com>
Wed, 14 Jun 2017 13:02:40 +0000 (23:02 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 28 Jun 2017 03:08:12 +0000 (13:08 +1000)
Ensure these don't get put into bouncing cachelines.

Reviewed-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/cpuidle/cpuidle-powernv.c
drivers/cpuidle/cpuidle-pseries.c

index 50b3c2e0306f9565151f58d26f86c8c115db242d..9d03326ac05e052c4cfc0c531ae0977a2af9ba5a 100644 (file)
@@ -32,18 +32,18 @@ static struct cpuidle_driver powernv_idle_driver = {
        .owner            = THIS_MODULE,
 };
 
-static int max_idle_state;
-static struct cpuidle_state *cpuidle_state_table;
+static int max_idle_state __read_mostly;
+static struct cpuidle_state *cpuidle_state_table __read_mostly;
 
 struct stop_psscr_table {
        u64 val;
        u64 mask;
 };
 
-static struct stop_psscr_table stop_psscr_table[CPUIDLE_STATE_MAX];
+static struct stop_psscr_table stop_psscr_table[CPUIDLE_STATE_MAX] __read_mostly;
 
-static u64 snooze_timeout;
-static bool snooze_timeout_en;
+static u64 snooze_timeout __read_mostly;
+static bool snooze_timeout_en __read_mostly;
 
 static int snooze_loop(struct cpuidle_device *dev,
                        struct cpuidle_driver *drv,
index 7b12bb2ea70f563c1e5a6589f21a169357c8dec1..a404f352d284f9731b37caf22782e0413276abf9 100644 (file)
@@ -25,10 +25,10 @@ struct cpuidle_driver pseries_idle_driver = {
        .owner            = THIS_MODULE,
 };
 
-static int max_idle_state;
-static struct cpuidle_state *cpuidle_state_table;
-static u64 snooze_timeout;
-static bool snooze_timeout_en;
+static int max_idle_state __read_mostly;
+static struct cpuidle_state *cpuidle_state_table __read_mostly;
+static u64 snooze_timeout __read_mostly;
+static bool snooze_timeout_en __read_mostly;
 
 static inline void idle_loop_prolog(unsigned long *in_purr)
 {