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 --- arch/parisc/kernel/pdc_chassis.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'arch/parisc/kernel/pdc_chassis.c') diff --git a/arch/parisc/kernel/pdc_chassis.c b/arch/parisc/kernel/pdc_chassis.c index 52004ae28d2..2a01fe1bdc9 100644 --- a/arch/parisc/kernel/pdc_chassis.c +++ b/arch/parisc/kernel/pdc_chassis.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -38,8 +39,8 @@ #ifdef CONFIG_PDC_CHASSIS -static int pdc_chassis_old = 0; -static unsigned int pdc_chassis_enabled = 1; +static int pdc_chassis_old __read_mostly = 0; +static unsigned int pdc_chassis_enabled __read_mostly = 1; /** @@ -132,7 +133,7 @@ void __init parisc_pdc_chassis_init(void) { #ifdef CONFIG_PDC_CHASSIS int handle = 0; - if (pdc_chassis_enabled) { + if (likely(pdc_chassis_enabled)) { DPRINTK(KERN_DEBUG "%s: parisc_pdc_chassis_init()\n", __FILE__); /* Let see if we have something to handle... */ @@ -142,7 +143,7 @@ void __init parisc_pdc_chassis_init(void) printk(KERN_INFO "Enabling PDC_PAT chassis codes support.\n"); handle = 1; } - else if (pdc_chassis_old) { + else if (unlikely(pdc_chassis_old)) { printk(KERN_INFO "Enabling old style chassis LED panel support.\n"); handle = 1; } @@ -178,7 +179,7 @@ int pdc_chassis_send_status(int message) /* Maybe we should do that in an other way ? */ int retval = 0; #ifdef CONFIG_PDC_CHASSIS - if (pdc_chassis_enabled) { + if (likely(pdc_chassis_enabled)) { DPRINTK(KERN_DEBUG "%s: pdc_chassis_send_status(%d)\n", __FILE__, message); @@ -214,7 +215,7 @@ int pdc_chassis_send_status(int message) } } else retval = -1; #else - if (pdc_chassis_old) { + if (unlikely(pdc_chassis_old)) { switch (message) { case PDC_CHASSIS_DIRECT_BSTART: case PDC_CHASSIS_DIRECT_BCOMPLETE: -- cgit v1.2.3