aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc/power.c
diff options
context:
space:
mode:
authorHelge Deller <deller@parisc-linux.org>2006-01-10 20:35:03 -0500
committerKyle McMartin <kyle@duet.int.mcmartin.ca>2006-01-10 20:35:03 -0500
commit8039de10aae3cd4cf0ef0ccebd58aff0e8810df2 (patch)
treeaf82e045c8fb3a417f78b49ec43413995b5f3c0f /drivers/parisc/power.c
parent02706647a49011ae1e7b4eca33e835d1681b094e (diff)
[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 <deller@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'drivers/parisc/power.c')
-rw-r--r--drivers/parisc/power.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/parisc/power.c b/drivers/parisc/power.c
index ff75e9296df9..54b2b7f20b96 100644
--- a/drivers/parisc/power.c
+++ b/drivers/parisc/power.c
@@ -2,7 +2,7 @@
2 * linux/arch/parisc/kernel/power.c 2 * linux/arch/parisc/kernel/power.c
3 * HP PARISC soft power switch support driver 3 * HP PARISC soft power switch support driver
4 * 4 *
5 * Copyright (c) 2001-2002 Helge Deller <deller@gmx.de> 5 * Copyright (c) 2001-2005 Helge Deller <deller@gmx.de>
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * 8 *
@@ -102,7 +102,7 @@ static DECLARE_WORK(poweroff_work, deferred_poweroff, NULL);
102 102
103static void poweroff(void) 103static void poweroff(void)
104{ 104{
105 static int powering_off; 105 static int powering_off __read_mostly;
106 106
107 if (powering_off) 107 if (powering_off)
108 return; 108 return;
@@ -113,7 +113,7 @@ static void poweroff(void)
113 113
114 114
115/* local time-counter for shutdown */ 115/* local time-counter for shutdown */
116static int shutdown_timer; 116static int shutdown_timer __read_mostly;
117 117
118/* check, give feedback and start shutdown after one second */ 118/* check, give feedback and start shutdown after one second */
119static void process_shutdown(void) 119static void process_shutdown(void)
@@ -139,7 +139,7 @@ static void process_shutdown(void)
139DECLARE_TASKLET_DISABLED(power_tasklet, NULL, 0); 139DECLARE_TASKLET_DISABLED(power_tasklet, NULL, 0);
140 140
141/* soft power switch enabled/disabled */ 141/* soft power switch enabled/disabled */
142int pwrsw_enabled = 1; 142int pwrsw_enabled __read_mostly = 1;
143 143
144/* 144/*
145 * On gecko style machines (e.g. 712/xx and 715/xx) 145 * On gecko style machines (e.g. 712/xx and 715/xx)
@@ -149,7 +149,7 @@ int pwrsw_enabled = 1;
149 */ 149 */
150static void gecko_tasklet_func(unsigned long unused) 150static void gecko_tasklet_func(unsigned long unused)
151{ 151{
152 if (!pwrsw_enabled) 152 if (unlikely(!pwrsw_enabled))
153 return; 153 return;
154 154
155 if (__getDIAG(25) & 0x80000000) { 155 if (__getDIAG(25) & 0x80000000) {
@@ -173,7 +173,7 @@ static void polling_tasklet_func(unsigned long soft_power_reg)
173{ 173{
174 unsigned long current_status; 174 unsigned long current_status;
175 175
176 if (!pwrsw_enabled) 176 if (unlikely(!pwrsw_enabled))
177 return; 177 return;
178 178
179 current_status = gsc_readl(soft_power_reg); 179 current_status = gsc_readl(soft_power_reg);