aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--arch/parisc/kernel/cache.c12
-rw-r--r--arch/parisc/kernel/drivers.c2
-rw-r--r--arch/parisc/kernel/firmware.c2
-rw-r--r--arch/parisc/kernel/inventory.c6
-rw-r--r--arch/parisc/kernel/pci-dma.c6
-rw-r--r--arch/parisc/kernel/pdc_chassis.c13
-rw-r--r--arch/parisc/kernel/perf.c6
-rw-r--r--arch/parisc/kernel/process.c2
-rw-r--r--arch/parisc/kernel/processor.c8
-rw-r--r--arch/parisc/kernel/setup.c10
-rw-r--r--arch/parisc/kernel/smp.c8
-rw-r--r--arch/parisc/kernel/time.c4
-rw-r--r--arch/parisc/kernel/topology.c3
-rw-r--r--arch/parisc/kernel/unaligned.c2
-rw-r--r--arch/parisc/kernel/unwind.c2
-rw-r--r--arch/parisc/kernel/vmlinux.lds.S4
-rw-r--r--arch/parisc/mm/init.c20
-rw-r--r--drivers/parisc/eisa.c4
-rw-r--r--drivers/parisc/lasi.c2
-rw-r--r--drivers/parisc/lba_pci.c2
-rw-r--r--drivers/parisc/led.c18
-rw-r--r--drivers/parisc/pdc_stable.c2
-rw-r--r--drivers/parisc/power.c12
-rw-r--r--include/linux/cache.h2
24 files changed, 79 insertions, 73 deletions
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
index a065349aee37..63047c6d2d04 100644
--- a/arch/parisc/kernel/cache.c
+++ b/arch/parisc/kernel/cache.c
@@ -29,9 +29,9 @@
29#include <asm/processor.h> 29#include <asm/processor.h>
30#include <asm/sections.h> 30#include <asm/sections.h>
31 31
32int split_tlb; 32int split_tlb __read_mostly;
33int dcache_stride; 33int dcache_stride __read_mostly;
34int icache_stride; 34int icache_stride __read_mostly;
35EXPORT_SYMBOL(dcache_stride); 35EXPORT_SYMBOL(dcache_stride);
36 36
37 37
@@ -45,9 +45,9 @@ DEFINE_SPINLOCK(pa_tlb_lock);
45EXPORT_SYMBOL(pa_tlb_lock); 45EXPORT_SYMBOL(pa_tlb_lock);
46#endif 46#endif
47 47
48struct pdc_cache_info cache_info; 48struct pdc_cache_info cache_info __read_mostly;
49#ifndef CONFIG_PA20 49#ifndef CONFIG_PA20
50static struct pdc_btlb_info btlb_info; 50static struct pdc_btlb_info btlb_info __read_mostly;
51#endif 51#endif
52 52
53#ifdef CONFIG_SMP 53#ifdef CONFIG_SMP
@@ -332,7 +332,7 @@ void clear_user_page_asm(void *page, unsigned long vaddr)
332} 332}
333 333
334#define FLUSH_THRESHOLD 0x80000 /* 0.5MB */ 334#define FLUSH_THRESHOLD 0x80000 /* 0.5MB */
335int parisc_cache_flush_threshold = FLUSH_THRESHOLD; 335int parisc_cache_flush_threshold __read_mostly = FLUSH_THRESHOLD;
336 336
337void parisc_setup_cache_timing(void) 337void parisc_setup_cache_timing(void)
338{ 338{
diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c
index d016d672ec2b..041524d24ef1 100644
--- a/arch/parisc/kernel/drivers.c
+++ b/arch/parisc/kernel/drivers.c
@@ -39,7 +39,7 @@
39#include <asm/parisc-device.h> 39#include <asm/parisc-device.h>
40 40
41/* See comments in include/asm-parisc/pci.h */ 41/* See comments in include/asm-parisc/pci.h */
42struct hppa_dma_ops *hppa_dma_ops; 42struct hppa_dma_ops *hppa_dma_ops __read_mostly;
43EXPORT_SYMBOL(hppa_dma_ops); 43EXPORT_SYMBOL(hppa_dma_ops);
44 44
45static struct device root = { 45static struct device root = {
diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c
index 553f8fe03224..2dc06b8e1817 100644
--- a/arch/parisc/kernel/firmware.c
+++ b/arch/parisc/kernel/firmware.c
@@ -80,7 +80,7 @@ static unsigned long pdc_result2[32] __attribute__ ((aligned (8)));
80 80
81/* Firmware needs to be initially set to narrow to determine the 81/* Firmware needs to be initially set to narrow to determine the
82 * actual firmware width. */ 82 * actual firmware width. */
83int parisc_narrow_firmware = 1; 83int parisc_narrow_firmware __read_mostly = 1;
84#endif 84#endif
85 85
86/* On most currently-supported platforms, IODC I/O calls are 32-bit calls 86/* On most currently-supported platforms, IODC I/O calls are 32-bit calls
diff --git a/arch/parisc/kernel/inventory.c b/arch/parisc/kernel/inventory.c
index 8f563871e83c..4e847ba53180 100644
--- a/arch/parisc/kernel/inventory.c
+++ b/arch/parisc/kernel/inventory.c
@@ -38,7 +38,7 @@
38*/ 38*/
39#undef DEBUG_PAT 39#undef DEBUG_PAT
40 40
41int pdc_type = PDC_TYPE_ILLEGAL; 41int pdc_type __read_mostly = PDC_TYPE_ILLEGAL;
42 42
43void __init setup_pdc(void) 43void __init setup_pdc(void)
44{ 44{
@@ -120,8 +120,8 @@ set_pmem_entry(physmem_range_t *pmem_ptr, unsigned long start,
120 * pdc info is bad in this case). 120 * pdc info is bad in this case).
121 */ 121 */
122 122
123 if ( ((start & (PAGE_SIZE - 1)) != 0) 123 if (unlikely( ((start & (PAGE_SIZE - 1)) != 0)
124 || ((pages4k & ((1UL << PDC_PAGE_ADJ_SHIFT) - 1)) != 0) ) { 124 || ((pages4k & ((1UL << PDC_PAGE_ADJ_SHIFT) - 1)) != 0) )) {
125 125
126 panic("Memory range doesn't align with page size!\n"); 126 panic("Memory range doesn't align with page size!\n");
127 } 127 }
diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c
index f94a02ef3d95..a6caf1073085 100644
--- a/arch/parisc/kernel/pci-dma.c
+++ b/arch/parisc/kernel/pci-dma.c
@@ -33,10 +33,10 @@
33#include <asm/uaccess.h> 33#include <asm/uaccess.h>
34#include <asm/tlbflush.h> /* for purge_tlb_*() macros */ 34#include <asm/tlbflush.h> /* for purge_tlb_*() macros */
35 35
36static struct proc_dir_entry * proc_gsc_root = NULL; 36static struct proc_dir_entry * proc_gsc_root __read_mostly = NULL;
37static int pcxl_proc_info(char *buffer, char **start, off_t offset, int length); 37static int pcxl_proc_info(char *buffer, char **start, off_t offset, int length);
38static unsigned long pcxl_used_bytes = 0; 38static unsigned long pcxl_used_bytes __read_mostly = 0;
39static unsigned long pcxl_used_pages = 0; 39static unsigned long pcxl_used_pages __read_mostly = 0;
40 40
41extern unsigned long pcxl_dma_start; /* Start of pcxl dma mapping area */ 41extern unsigned long pcxl_dma_start; /* Start of pcxl dma mapping area */
42static spinlock_t pcxl_res_lock; 42static spinlock_t pcxl_res_lock;
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
41static int pdc_chassis_old = 0; 42static int pdc_chassis_old __read_mostly = 0;
42static unsigned int pdc_chassis_enabled = 1; 43static 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:
diff --git a/arch/parisc/kernel/perf.c b/arch/parisc/kernel/perf.c
index f6fec62b6a2f..79dcbcccecb8 100644
--- a/arch/parisc/kernel/perf.c
+++ b/arch/parisc/kernel/perf.c
@@ -66,10 +66,10 @@ struct rdr_tbl_ent {
66 uint8_t write_control; 66 uint8_t write_control;
67}; 67};
68 68
69static int perf_processor_interface = UNKNOWN_INTF; 69static int perf_processor_interface __read_mostly = UNKNOWN_INTF;
70static int perf_enabled = 0; 70static int perf_enabled __read_mostly = 0;
71static spinlock_t perf_lock; 71static spinlock_t perf_lock;
72struct parisc_device *cpu_device = NULL; 72struct parisc_device *cpu_device __read_mostly = NULL;
73 73
74/* RDRs to write for PCX-W */ 74/* RDRs to write for PCX-W */
75static int perf_rdrs_W[] = 75static int perf_rdrs_W[] =
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
index fee4f1f09adc..4eb70a40ec7e 100644
--- a/arch/parisc/kernel/process.c
+++ b/arch/parisc/kernel/process.c
@@ -54,7 +54,7 @@
54#include <asm/uaccess.h> 54#include <asm/uaccess.h>
55#include <asm/unwind.h> 55#include <asm/unwind.h>
56 56
57static int hlt_counter; 57static int hlt_counter __read_mostly;
58 58
59/* 59/*
60 * Power off function, if any 60 * Power off function, if any
diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c
index 4f5bbcf1f5a4..6df9f62cecb5 100644
--- a/arch/parisc/kernel/processor.c
+++ b/arch/parisc/kernel/processor.c
@@ -44,10 +44,10 @@
44#include <asm/irq.h> /* for struct irq_region */ 44#include <asm/irq.h> /* for struct irq_region */
45#include <asm/parisc-device.h> 45#include <asm/parisc-device.h>
46 46
47struct system_cpuinfo_parisc boot_cpu_data; 47struct system_cpuinfo_parisc boot_cpu_data __read_mostly;
48EXPORT_SYMBOL(boot_cpu_data); 48EXPORT_SYMBOL(boot_cpu_data);
49 49
50struct cpuinfo_parisc cpu_data[NR_CPUS]; 50struct cpuinfo_parisc cpu_data[NR_CPUS] __read_mostly;
51 51
52/* 52/*
53** PARISC CPU driver - claim "device" and initialize CPU data structures. 53** PARISC CPU driver - claim "device" and initialize CPU data structures.
@@ -378,12 +378,12 @@ show_cpuinfo (struct seq_file *m, void *v)
378 return 0; 378 return 0;
379} 379}
380 380
381static struct parisc_device_id processor_tbl[] = { 381static struct parisc_device_id processor_tbl[] __read_mostly = {
382 { HPHW_NPROC, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, SVERSION_ANY_ID }, 382 { HPHW_NPROC, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, SVERSION_ANY_ID },
383 { 0, } 383 { 0, }
384}; 384};
385 385
386static struct parisc_driver cpu_driver = { 386static struct parisc_driver cpu_driver __read_mostly = {
387 .name = "CPU", 387 .name = "CPU",
388 .id_table = processor_tbl, 388 .id_table = processor_tbl,
389 .probe = processor_probe 389 .probe = processor_probe
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c
index 73e9c34b0948..4a36ec3f6ac1 100644
--- a/arch/parisc/kernel/setup.c
+++ b/arch/parisc/kernel/setup.c
@@ -46,15 +46,15 @@
46#include <asm/io.h> 46#include <asm/io.h>
47#include <asm/setup.h> 47#include <asm/setup.h>
48 48
49char command_line[COMMAND_LINE_SIZE]; 49char command_line[COMMAND_LINE_SIZE] __read_mostly;
50 50
51/* Intended for ccio/sba/cpu statistics under /proc/bus/{runway|gsc} */ 51/* Intended for ccio/sba/cpu statistics under /proc/bus/{runway|gsc} */
52struct proc_dir_entry * proc_runway_root = NULL; 52struct proc_dir_entry * proc_runway_root __read_mostly = NULL;
53struct proc_dir_entry * proc_gsc_root = NULL; 53struct proc_dir_entry * proc_gsc_root __read_mostly = NULL;
54struct proc_dir_entry * proc_mckinley_root = NULL; 54struct proc_dir_entry * proc_mckinley_root __read_mostly = NULL;
55 55
56#if !defined(CONFIG_PA20) && (defined(CONFIG_IOMMU_CCIO) || defined(CONFIG_IOMMU_SBA)) 56#if !defined(CONFIG_PA20) && (defined(CONFIG_IOMMU_CCIO) || defined(CONFIG_IOMMU_SBA))
57int parisc_bus_is_phys = 1; /* Assume no IOMMU is present */ 57int parisc_bus_is_phys __read_mostly = 1; /* Assume no IOMMU is present */
58EXPORT_SYMBOL(parisc_bus_is_phys); 58EXPORT_SYMBOL(parisc_bus_is_phys);
59#endif 59#endif
60 60
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
index ce89da0f654d..fb3ca84f1b97 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -58,9 +58,9 @@ DEFINE_SPINLOCK(smp_lock);
58 58
59volatile struct task_struct *smp_init_current_idle_task; 59volatile struct task_struct *smp_init_current_idle_task;
60 60
61static volatile int cpu_now_booting = 0; /* track which CPU is booting */ 61static volatile int cpu_now_booting __read_mostly = 0; /* track which CPU is booting */
62 62
63static int parisc_max_cpus = 1; 63static int parisc_max_cpus __read_mostly = 1;
64 64
65/* online cpus are ones that we've managed to bring up completely 65/* online cpus are ones that we've managed to bring up completely
66 * possible cpus are all valid cpu 66 * possible cpus are all valid cpu
@@ -71,8 +71,8 @@ static int parisc_max_cpus = 1;
71 * empty in the beginning. 71 * empty in the beginning.
72 */ 72 */
73 73
74cpumask_t cpu_online_map = CPU_MASK_NONE; /* Bitmap of online CPUs */ 74cpumask_t cpu_online_map __read_mostly = CPU_MASK_NONE; /* Bitmap of online CPUs */
75cpumask_t cpu_possible_map = CPU_MASK_ALL; /* Bitmap of Present CPUs */ 75cpumask_t cpu_possible_map __read_mostly = CPU_MASK_ALL; /* Bitmap of Present CPUs */
76 76
77EXPORT_SYMBOL(cpu_online_map); 77EXPORT_SYMBOL(cpu_online_map);
78EXPORT_SYMBOL(cpu_possible_map); 78EXPORT_SYMBOL(cpu_possible_map);
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c
index cded25680787..594930bc4bcf 100644
--- a/arch/parisc/kernel/time.c
+++ b/arch/parisc/kernel/time.c
@@ -36,8 +36,8 @@
36/* xtime and wall_jiffies keep wall-clock time */ 36/* xtime and wall_jiffies keep wall-clock time */
37extern unsigned long wall_jiffies; 37extern unsigned long wall_jiffies;
38 38
39static long clocktick; /* timer cycles per tick */ 39static long clocktick __read_mostly; /* timer cycles per tick */
40static long halftick; 40static long halftick __read_mostly;
41 41
42#ifdef CONFIG_SMP 42#ifdef CONFIG_SMP
43extern void smp_do_timer(struct pt_regs *regs); 43extern void smp_do_timer(struct pt_regs *regs);
diff --git a/arch/parisc/kernel/topology.c b/arch/parisc/kernel/topology.c
index ac2a40681414..3ba040050e4c 100644
--- a/arch/parisc/kernel/topology.c
+++ b/arch/parisc/kernel/topology.c
@@ -20,8 +20,9 @@
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/smp.h> 21#include <linux/smp.h>
22#include <linux/cpu.h> 22#include <linux/cpu.h>
23#include <linux/cache.h>
23 24
24static struct cpu cpu_devices[NR_CPUS]; 25static struct cpu cpu_devices[NR_CPUS] __read_mostly;
25 26
26static int __init topology_init(void) 27static int __init topology_init(void)
27{ 28{
diff --git a/arch/parisc/kernel/unaligned.c b/arch/parisc/kernel/unaligned.c
index eaae8a021f9f..de0a1b21cb40 100644
--- a/arch/parisc/kernel/unaligned.c
+++ b/arch/parisc/kernel/unaligned.c
@@ -122,7 +122,7 @@
122#define ERR_NOTHANDLED -1 122#define ERR_NOTHANDLED -1
123#define ERR_PAGEFAULT -2 123#define ERR_PAGEFAULT -2
124 124
125int unaligned_enabled = 1; 125int unaligned_enabled __read_mostly = 1;
126 126
127void die_if_kernel (char *str, struct pt_regs *regs, long err); 127void die_if_kernel (char *str, struct pt_regs *regs, long err);
128 128
diff --git a/arch/parisc/kernel/unwind.c b/arch/parisc/kernel/unwind.c
index db141108412e..cc1c1afc3187 100644
--- a/arch/parisc/kernel/unwind.c
+++ b/arch/parisc/kernel/unwind.c
@@ -35,7 +35,7 @@ static spinlock_t unwind_lock;
35 * we can call unwind_init as early in the bootup process as 35 * we can call unwind_init as early in the bootup process as
36 * possible (before the slab allocator is initialized) 36 * possible (before the slab allocator is initialized)
37 */ 37 */
38static struct unwind_table kernel_unwind_table; 38static struct unwind_table kernel_unwind_table __read_mostly;
39static LIST_HEAD(unwind_tables); 39static LIST_HEAD(unwind_tables);
40 40
41static inline const struct unwind_table_entry * 41static inline const struct unwind_table_entry *
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S
index e5fac3e08c7a..b8b9174f6425 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -105,6 +105,10 @@ SECTIONS
105 . = ALIGN(16); 105 . = ALIGN(16);
106 .data.lock_aligned : { *(.data.lock_aligned) } 106 .data.lock_aligned : { *(.data.lock_aligned) }
107 107
108 /* rarely changed data like cpu maps */
109 . = ALIGN(16);
110 .data.read_mostly : { *(.data.read_mostly) }
111
108 _edata = .; /* End of data section */ 112 _edata = .; /* End of data section */
109 113
110 . = ALIGN(16384); /* init_task */ 114 . = ALIGN(16384); /* init_task */
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 29b998e430e6..a992cb8cfe61 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -36,9 +36,9 @@ extern char _end; /* end of BSS, defined by linker */
36extern char __init_begin, __init_end; 36extern char __init_begin, __init_end;
37 37
38#ifdef CONFIG_DISCONTIGMEM 38#ifdef CONFIG_DISCONTIGMEM
39struct node_map_data node_data[MAX_NUMNODES]; 39struct node_map_data node_data[MAX_NUMNODES] __read_mostly;
40bootmem_data_t bmem_data[MAX_NUMNODES]; 40bootmem_data_t bmem_data[MAX_NUMNODES] __read_mostly;
41unsigned char pfnnid_map[PFNNID_MAP_MAX]; 41unsigned char pfnnid_map[PFNNID_MAP_MAX] __read_mostly;
42#endif 42#endif
43 43
44static struct resource data_resource = { 44static struct resource data_resource = {
@@ -58,14 +58,14 @@ static struct resource pdcdata_resource = {
58 .flags = IORESOURCE_BUSY | IORESOURCE_MEM, 58 .flags = IORESOURCE_BUSY | IORESOURCE_MEM,
59}; 59};
60 60
61static struct resource sysram_resources[MAX_PHYSMEM_RANGES]; 61static struct resource sysram_resources[MAX_PHYSMEM_RANGES] __read_mostly;
62 62
63/* The following array is initialized from the firmware specific 63/* The following array is initialized from the firmware specific
64 * information retrieved in kernel/inventory.c. 64 * information retrieved in kernel/inventory.c.
65 */ 65 */
66 66
67physmem_range_t pmem_ranges[MAX_PHYSMEM_RANGES]; 67physmem_range_t pmem_ranges[MAX_PHYSMEM_RANGES] __read_mostly;
68int npmem_ranges; 68int npmem_ranges __read_mostly;
69 69
70#ifdef __LP64__ 70#ifdef __LP64__
71#define MAX_MEM (~0UL) 71#define MAX_MEM (~0UL)
@@ -73,7 +73,7 @@ int npmem_ranges;
73#define MAX_MEM (3584U*1024U*1024U) 73#define MAX_MEM (3584U*1024U*1024U)
74#endif /* !__LP64__ */ 74#endif /* !__LP64__ */
75 75
76static unsigned long mem_limit = MAX_MEM; 76static unsigned long mem_limit __read_mostly = MAX_MEM;
77 77
78static void __init mem_limit_func(void) 78static void __init mem_limit_func(void)
79{ 79{
@@ -431,11 +431,11 @@ void free_initmem(void)
431#define SET_MAP_OFFSET(x) ((void *)(((unsigned long)(x) + VM_MAP_OFFSET) \ 431#define SET_MAP_OFFSET(x) ((void *)(((unsigned long)(x) + VM_MAP_OFFSET) \
432 & ~(VM_MAP_OFFSET-1))) 432 & ~(VM_MAP_OFFSET-1)))
433 433
434void *vmalloc_start; 434void *vmalloc_start __read_mostly;
435EXPORT_SYMBOL(vmalloc_start); 435EXPORT_SYMBOL(vmalloc_start);
436 436
437#ifdef CONFIG_PA11 437#ifdef CONFIG_PA11
438unsigned long pcxl_dma_start; 438unsigned long pcxl_dma_start __read_mostly;
439#endif 439#endif
440 440
441void __init mem_init(void) 441void __init mem_init(void)
@@ -475,7 +475,7 @@ int do_check_pgt_cache(int low, int high)
475 return 0; 475 return 0;
476} 476}
477 477
478unsigned long *empty_zero_page; 478unsigned long *empty_zero_page __read_mostly;
479 479
480void show_mem(void) 480void show_mem(void)
481{ 481{
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
58static DEFINE_SPINLOCK(eisa_irq_lock); 58static DEFINE_SPINLOCK(eisa_irq_lock);
59 59
60void __iomem *eisa_eeprom_addr; 60void __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 */
144static unsigned int eisa_irq_level; /* default to edge triggered */ 144static 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
153static unsigned long lasi_power_off_hpa; 153static unsigned long lasi_power_off_hpa __read_mostly;
154 154
155static void lasi_power_off(void) 155static 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)
170static void __iomem *astro_iop_base; 170static 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
59static int led_type = -1; 59static int led_type __read_mostly = -1;
60static unsigned char lastleds; /* LED state from most recent update */ 60static unsigned char lastleds; /* LED state from most recent update */
61static unsigned int led_heartbeat = 1; 61static unsigned int led_heartbeat __read_mostly = 1;
62static unsigned int led_diskio = 1; 62static unsigned int led_diskio __read_mostly = 1;
63static unsigned int led_lanrxtx = 1; 63static unsigned int led_lanrxtx __read_mostly = 1;
64static char lcd_text[32]; 64static char lcd_text[32] __read_mostly;
65static char lcd_text_default[32]; 65static char lcd_text_default[32] __read_mostly;
66 66
67 67
68static struct workqueue_struct *led_wq; 68static 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. */
110static struct pdc_chassis_lcd_info_ret_block 110static struct pdc_chassis_lcd_info_ret_block
111lcd_info __attribute__((aligned(8))) = 111lcd_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)
144device_initcall(start_task); 144device_initcall(start_task);
145 145
146/* ptr to LCD/LED-specific function */ 146/* ptr to LCD/LED-specific function */
147static void (*led_func_ptr) (unsigned char); 147static void (*led_func_ptr) (unsigned char) __read_mostly;
148 148
149#ifdef CONFIG_PROC_FS 149#ifdef CONFIG_PROC_FS
150static int led_proc_read(char *page, char **start, off_t off, int count, 150static 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");
70MODULE_LICENSE("GPL"); 70MODULE_LICENSE("GPL");
71MODULE_VERSION(PDCS_VERSION); 71MODULE_VERSION(PDCS_VERSION);
72 72
73static unsigned long pdcs_size = 0; 73static 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 */
76struct pdcspath_entry { 76struct 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
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);
diff --git a/include/linux/cache.h b/include/linux/cache.h
index ffe52210fc4f..d22e632f41fb 100644
--- a/include/linux/cache.h
+++ b/include/linux/cache.h
@@ -13,7 +13,7 @@
13#define SMP_CACHE_BYTES L1_CACHE_BYTES 13#define SMP_CACHE_BYTES L1_CACHE_BYTES
14#endif 14#endif
15 15
16#if defined(CONFIG_X86) || defined(CONFIG_SPARC64) || defined(CONFIG_IA64) 16#if defined(CONFIG_X86) || defined(CONFIG_SPARC64) || defined(CONFIG_IA64) || defined(CONFIG_PARISC)
17#define __read_mostly __attribute__((__section__(".data.read_mostly"))) 17#define __read_mostly __attribute__((__section__(".data.read_mostly")))
18#else 18#else
19#define __read_mostly 19#define __read_mostly