From 8039de10aae3cd4cf0ef0ccebd58aff0e8810df2 Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Tue, 10 Jan 2006 20:35:03 -0500 Subject: [PARISC] Add __read_mostly section for parisc Flag a whole bunch of things as __read_mostly on parisc. Also flag a few branches as unlikely() and cleanup a bit of code. Signed-off-by: Helge Deller Signed-off-by: Kyle McMartin --- drivers/parisc/power.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/parisc/power.c') diff --git a/drivers/parisc/power.c b/drivers/parisc/power.c index ff75e9296df..54b2b7f20b9 100644 --- a/drivers/parisc/power.c +++ b/drivers/parisc/power.c @@ -2,7 +2,7 @@ * linux/arch/parisc/kernel/power.c * HP PARISC soft power switch support driver * - * Copyright (c) 2001-2002 Helge Deller + * Copyright (c) 2001-2005 Helge Deller * All rights reserved. * * @@ -102,7 +102,7 @@ static DECLARE_WORK(poweroff_work, deferred_poweroff, NULL); static void poweroff(void) { - static int powering_off; + static int powering_off __read_mostly; if (powering_off) return; @@ -113,7 +113,7 @@ static void poweroff(void) /* local time-counter for shutdown */ -static int shutdown_timer; +static int shutdown_timer __read_mostly; /* check, give feedback and start shutdown after one second */ static void process_shutdown(void) @@ -139,7 +139,7 @@ static void process_shutdown(void) DECLARE_TASKLET_DISABLED(power_tasklet, NULL, 0); /* soft power switch enabled/disabled */ -int pwrsw_enabled = 1; +int pwrsw_enabled __read_mostly = 1; /* * On gecko style machines (e.g. 712/xx and 715/xx) @@ -149,7 +149,7 @@ int pwrsw_enabled = 1; */ static void gecko_tasklet_func(unsigned long unused) { - if (!pwrsw_enabled) + if (unlikely(!pwrsw_enabled)) return; if (__getDIAG(25) & 0x80000000) { @@ -173,7 +173,7 @@ static void polling_tasklet_func(unsigned long soft_power_reg) { unsigned long current_status; - if (!pwrsw_enabled) + if (unlikely(!pwrsw_enabled)) return; current_status = gsc_readl(soft_power_reg); -- cgit v1.2.3