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 /drivers | |
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 'drivers')
-rw-r--r-- | drivers/parisc/eisa.c | 4 | ||||
-rw-r--r-- | drivers/parisc/lasi.c | 2 | ||||
-rw-r--r-- | drivers/parisc/lba_pci.c | 2 | ||||
-rw-r--r-- | drivers/parisc/led.c | 18 | ||||
-rw-r--r-- | drivers/parisc/pdc_stable.c | 2 | ||||
-rw-r--r-- | drivers/parisc/power.c | 12 |
6 files changed, 20 insertions, 20 deletions
diff --git a/drivers/parisc/eisa.c b/drivers/parisc/eisa.c index 6362bf99eff6..3d94d86c1c9f 100644 --- a/drivers/parisc/eisa.c +++ b/drivers/parisc/eisa.c | |||
@@ -57,7 +57,7 @@ | |||
57 | 57 | ||
58 | static DEFINE_SPINLOCK(eisa_irq_lock); | 58 | static DEFINE_SPINLOCK(eisa_irq_lock); |
59 | 59 | ||
60 | void __iomem *eisa_eeprom_addr; | 60 | void __iomem *eisa_eeprom_addr __read_mostly; |
61 | 61 | ||
62 | /* We can only have one EISA adapter in the system because neither | 62 | /* We can only have one EISA adapter in the system because neither |
63 | * implementation can be flexed. | 63 | * implementation can be flexed. |
@@ -141,7 +141,7 @@ static int slave_mask; | |||
141 | * in the furure. | 141 | * in the furure. |
142 | */ | 142 | */ |
143 | /* irq 13,8,2,1,0 must be edge */ | 143 | /* irq 13,8,2,1,0 must be edge */ |
144 | static unsigned int eisa_irq_level; /* default to edge triggered */ | 144 | static unsigned int eisa_irq_level __read_mostly; /* default to edge triggered */ |
145 | 145 | ||
146 | 146 | ||
147 | /* called by free irq */ | 147 | /* called by free irq */ |
diff --git a/drivers/parisc/lasi.c b/drivers/parisc/lasi.c index a8c20396ffbe..2b3ba1dcf332 100644 --- a/drivers/parisc/lasi.c +++ b/drivers/parisc/lasi.c | |||
@@ -150,7 +150,7 @@ void __init lasi_led_init(unsigned long lasi_hpa) | |||
150 | * | 150 | * |
151 | */ | 151 | */ |
152 | 152 | ||
153 | static unsigned long lasi_power_off_hpa; | 153 | static unsigned long lasi_power_off_hpa __read_mostly; |
154 | 154 | ||
155 | static void lasi_power_off(void) | 155 | static void lasi_power_off(void) |
156 | { | 156 | { |
diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c index 5e495dcbc58a..4f6bdf0881b5 100644 --- a/drivers/parisc/lba_pci.c +++ b/drivers/parisc/lba_pci.c | |||
@@ -167,7 +167,7 @@ | |||
167 | 167 | ||
168 | /* non-postable I/O port space, densely packed */ | 168 | /* non-postable I/O port space, densely packed */ |
169 | #define LBA_PORT_BASE (PCI_F_EXTEND | 0xfee00000UL) | 169 | #define LBA_PORT_BASE (PCI_F_EXTEND | 0xfee00000UL) |
170 | static void __iomem *astro_iop_base; | 170 | static void __iomem *astro_iop_base __read_mostly; |
171 | 171 | ||
172 | #define ELROY_HVERS 0x782 | 172 | #define ELROY_HVERS 0x782 |
173 | #define MERCURY_HVERS 0x783 | 173 | #define MERCURY_HVERS 0x783 |
diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c index 315be4770d3e..f357d3f60360 100644 --- a/drivers/parisc/led.c +++ b/drivers/parisc/led.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * (c) Copyright 2000 Red Hat Software | 4 | * (c) Copyright 2000 Red Hat Software |
5 | * (c) Copyright 2000 Helge Deller <hdeller@redhat.com> | 5 | * (c) Copyright 2000 Helge Deller <hdeller@redhat.com> |
6 | * (c) Copyright 2001-2004 Helge Deller <deller@gmx.de> | 6 | * (c) Copyright 2001-2005 Helge Deller <deller@gmx.de> |
7 | * (c) Copyright 2001 Randolph Chung <tausq@debian.org> | 7 | * (c) Copyright 2001 Randolph Chung <tausq@debian.org> |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
@@ -56,13 +56,13 @@ | |||
56 | relatively large amount of CPU time, some of the calculations can be | 56 | relatively large amount of CPU time, some of the calculations can be |
57 | turned off with the following variables (controlled via procfs) */ | 57 | turned off with the following variables (controlled via procfs) */ |
58 | 58 | ||
59 | static int led_type = -1; | 59 | static int led_type __read_mostly = -1; |
60 | static unsigned char lastleds; /* LED state from most recent update */ | 60 | static unsigned char lastleds; /* LED state from most recent update */ |
61 | static unsigned int led_heartbeat = 1; | 61 | static unsigned int led_heartbeat __read_mostly = 1; |
62 | static unsigned int led_diskio = 1; | 62 | static unsigned int led_diskio __read_mostly = 1; |
63 | static unsigned int led_lanrxtx = 1; | 63 | static unsigned int led_lanrxtx __read_mostly = 1; |
64 | static char lcd_text[32]; | 64 | static char lcd_text[32] __read_mostly; |
65 | static char lcd_text_default[32]; | 65 | static char lcd_text_default[32] __read_mostly; |
66 | 66 | ||
67 | 67 | ||
68 | static struct workqueue_struct *led_wq; | 68 | static struct workqueue_struct *led_wq; |
@@ -108,7 +108,7 @@ struct pdc_chassis_lcd_info_ret_block { | |||
108 | /* lcd_info is pre-initialized to the values needed to program KittyHawk LCD's | 108 | /* lcd_info is pre-initialized to the values needed to program KittyHawk LCD's |
109 | * HP seems to have used Sharp/Hitachi HD44780 LCDs most of the time. */ | 109 | * HP seems to have used Sharp/Hitachi HD44780 LCDs most of the time. */ |
110 | static struct pdc_chassis_lcd_info_ret_block | 110 | static struct pdc_chassis_lcd_info_ret_block |
111 | lcd_info __attribute__((aligned(8))) = | 111 | lcd_info __attribute__((aligned(8))) __read_mostly = |
112 | { | 112 | { |
113 | .model = DISPLAY_MODEL_LCD, | 113 | .model = DISPLAY_MODEL_LCD, |
114 | .lcd_width = 16, | 114 | .lcd_width = 16, |
@@ -144,7 +144,7 @@ static int start_task(void) | |||
144 | device_initcall(start_task); | 144 | device_initcall(start_task); |
145 | 145 | ||
146 | /* ptr to LCD/LED-specific function */ | 146 | /* ptr to LCD/LED-specific function */ |
147 | static void (*led_func_ptr) (unsigned char); | 147 | static void (*led_func_ptr) (unsigned char) __read_mostly; |
148 | 148 | ||
149 | #ifdef CONFIG_PROC_FS | 149 | #ifdef CONFIG_PROC_FS |
150 | static int led_proc_read(char *page, char **start, off_t off, int count, | 150 | static int led_proc_read(char *page, char **start, off_t off, int count, |
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c index 273a74179720..11750cbb05c6 100644 --- a/drivers/parisc/pdc_stable.c +++ b/drivers/parisc/pdc_stable.c | |||
@@ -70,7 +70,7 @@ MODULE_DESCRIPTION("sysfs interface to HP PDC Stable Storage data"); | |||
70 | MODULE_LICENSE("GPL"); | 70 | MODULE_LICENSE("GPL"); |
71 | MODULE_VERSION(PDCS_VERSION); | 71 | MODULE_VERSION(PDCS_VERSION); |
72 | 72 | ||
73 | static unsigned long pdcs_size = 0; | 73 | static unsigned long pdcs_size __read_mostly; |
74 | 74 | ||
75 | /* This struct defines what we need to deal with a parisc pdc path entry */ | 75 | /* This struct defines what we need to deal with a parisc pdc path entry */ |
76 | struct pdcspath_entry { | 76 | struct pdcspath_entry { |
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 | ||
103 | static void poweroff(void) | 103 | static 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 */ |
116 | static int shutdown_timer; | 116 | static 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 */ |
119 | static void process_shutdown(void) | 119 | static void process_shutdown(void) |
@@ -139,7 +139,7 @@ static void process_shutdown(void) | |||
139 | DECLARE_TASKLET_DISABLED(power_tasklet, NULL, 0); | 139 | DECLARE_TASKLET_DISABLED(power_tasklet, NULL, 0); |
140 | 140 | ||
141 | /* soft power switch enabled/disabled */ | 141 | /* soft power switch enabled/disabled */ |
142 | int pwrsw_enabled = 1; | 142 | int 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 | */ |
150 | static void gecko_tasklet_func(unsigned long unused) | 150 | static 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); |