diff options
author | Helge Deller <deller@parisc-linux.org> | 2006-01-10 20:35:03 -0500 |
---|---|---|
committer | Kyle McMartin <kyle@duet.int.mcmartin.ca> | 2006-01-10 20:35:03 -0500 |
commit | 8039de10aae3cd4cf0ef0ccebd58aff0e8810df2 (patch) | |
tree | af82e045c8fb3a417f78b49ec43413995b5f3c0f /arch/parisc/kernel/pdc_chassis.c | |
parent | 02706647a49011ae1e7b4eca33e835d1681b094e (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 'arch/parisc/kernel/pdc_chassis.c')
-rw-r--r-- | arch/parisc/kernel/pdc_chassis.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/parisc/kernel/pdc_chassis.c b/arch/parisc/kernel/pdc_chassis.c index 52004ae28d20..2a01fe1bdc98 100644 --- a/arch/parisc/kernel/pdc_chassis.c +++ b/arch/parisc/kernel/pdc_chassis.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/reboot.h> | 31 | #include <linux/reboot.h> |
32 | #include <linux/notifier.h> | 32 | #include <linux/notifier.h> |
33 | #include <linux/cache.h> | ||
33 | 34 | ||
34 | #include <asm/pdc_chassis.h> | 35 | #include <asm/pdc_chassis.h> |
35 | #include <asm/processor.h> | 36 | #include <asm/processor.h> |
@@ -38,8 +39,8 @@ | |||
38 | 39 | ||
39 | 40 | ||
40 | #ifdef CONFIG_PDC_CHASSIS | 41 | #ifdef CONFIG_PDC_CHASSIS |
41 | static int pdc_chassis_old = 0; | 42 | static int pdc_chassis_old __read_mostly = 0; |
42 | static unsigned int pdc_chassis_enabled = 1; | 43 | static unsigned int pdc_chassis_enabled __read_mostly = 1; |
43 | 44 | ||
44 | 45 | ||
45 | /** | 46 | /** |
@@ -132,7 +133,7 @@ void __init parisc_pdc_chassis_init(void) | |||
132 | { | 133 | { |
133 | #ifdef CONFIG_PDC_CHASSIS | 134 | #ifdef CONFIG_PDC_CHASSIS |
134 | int handle = 0; | 135 | int handle = 0; |
135 | if (pdc_chassis_enabled) { | 136 | if (likely(pdc_chassis_enabled)) { |
136 | DPRINTK(KERN_DEBUG "%s: parisc_pdc_chassis_init()\n", __FILE__); | 137 | DPRINTK(KERN_DEBUG "%s: parisc_pdc_chassis_init()\n", __FILE__); |
137 | 138 | ||
138 | /* Let see if we have something to handle... */ | 139 | /* Let see if we have something to handle... */ |
@@ -142,7 +143,7 @@ void __init parisc_pdc_chassis_init(void) | |||
142 | printk(KERN_INFO "Enabling PDC_PAT chassis codes support.\n"); | 143 | printk(KERN_INFO "Enabling PDC_PAT chassis codes support.\n"); |
143 | handle = 1; | 144 | handle = 1; |
144 | } | 145 | } |
145 | else if (pdc_chassis_old) { | 146 | else if (unlikely(pdc_chassis_old)) { |
146 | printk(KERN_INFO "Enabling old style chassis LED panel support.\n"); | 147 | printk(KERN_INFO "Enabling old style chassis LED panel support.\n"); |
147 | handle = 1; | 148 | handle = 1; |
148 | } | 149 | } |
@@ -178,7 +179,7 @@ int pdc_chassis_send_status(int message) | |||
178 | /* Maybe we should do that in an other way ? */ | 179 | /* Maybe we should do that in an other way ? */ |
179 | int retval = 0; | 180 | int retval = 0; |
180 | #ifdef CONFIG_PDC_CHASSIS | 181 | #ifdef CONFIG_PDC_CHASSIS |
181 | if (pdc_chassis_enabled) { | 182 | if (likely(pdc_chassis_enabled)) { |
182 | 183 | ||
183 | DPRINTK(KERN_DEBUG "%s: pdc_chassis_send_status(%d)\n", __FILE__, message); | 184 | DPRINTK(KERN_DEBUG "%s: pdc_chassis_send_status(%d)\n", __FILE__, message); |
184 | 185 | ||
@@ -214,7 +215,7 @@ int pdc_chassis_send_status(int message) | |||
214 | } | 215 | } |
215 | } else retval = -1; | 216 | } else retval = -1; |
216 | #else | 217 | #else |
217 | if (pdc_chassis_old) { | 218 | if (unlikely(pdc_chassis_old)) { |
218 | switch (message) { | 219 | switch (message) { |
219 | case PDC_CHASSIS_DIRECT_BSTART: | 220 | case PDC_CHASSIS_DIRECT_BSTART: |
220 | case PDC_CHASSIS_DIRECT_BCOMPLETE: | 221 | case PDC_CHASSIS_DIRECT_BCOMPLETE: |