Skip to content

Commit

Permalink
cpuidle: powerpc: read mostly for common globals
Browse files Browse the repository at this point in the history
Ensure these don't get put into bouncing cachelines.

Reviewed-by: Vaidyanathan Srinivasan <[email protected]>
Reviewed-by: Gautham R. Shenoy <[email protected]>
Signed-off-by: Nicholas Piggin <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
  • Loading branch information
npiggin authored and mpe committed Jun 28, 2017
1 parent 3fc5ee9 commit 624e46d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions drivers/cpuidle/cpuidle-powernv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions drivers/cpuidle/cpuidle-pseries.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 624e46d

Please sign in to comment.