aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-11 00:31:24 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-11 00:31:24 -0500
commit05f6ece6f37f987e9de643f6f76e8fb5d5b9e014 (patch)
tree5244e85d0dfb2619b0af4bc80a2c99dd579f79a5 /arch
parent35d138ae22f826f95f0f8d0285947582ccf4508f (diff)
parent58b6c58caef7a34eab7ec887288fa495696653e7 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
Diffstat (limited to 'arch')
-rw-r--r--arch/parisc/kernel/cache.c20
-rw-r--r--arch/parisc/kernel/drivers.c13
-rw-r--r--arch/parisc/kernel/firmware.c2
-rw-r--r--arch/parisc/kernel/hardware.c1
-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.c16
-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.S15
-rw-r--r--arch/parisc/mm/init.c29
-rw-r--r--arch/parisc/mm/ioremap.c100
19 files changed, 147 insertions, 111 deletions
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
index a065349aee37..d8a4ca021aac 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,29 +45,29 @@ 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
54void 54void
55flush_data_cache(void) 55flush_data_cache(void)
56{ 56{
57 on_each_cpu((void (*)(void *))flush_data_cache_local, NULL, 1, 1); 57 on_each_cpu(flush_data_cache_local, NULL, 1, 1);
58} 58}
59void 59void
60flush_instruction_cache(void) 60flush_instruction_cache(void)
61{ 61{
62 on_each_cpu((void (*)(void *))flush_instruction_cache_local, NULL, 1, 1); 62 on_each_cpu(flush_instruction_cache_local, NULL, 1, 1);
63} 63}
64#endif 64#endif
65 65
66void 66void
67flush_cache_all_local(void) 67flush_cache_all_local(void)
68{ 68{
69 flush_instruction_cache_local(); 69 flush_instruction_cache_local(NULL);
70 flush_data_cache_local(); 70 flush_data_cache_local(NULL);
71} 71}
72EXPORT_SYMBOL(flush_cache_all_local); 72EXPORT_SYMBOL(flush_cache_all_local);
73 73
@@ -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..1eaa0d37f677 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 = {
@@ -515,8 +515,13 @@ alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path)
515 (iodc_data[5] << 8) | iodc_data[6]; 515 (iodc_data[5] << 8) | iodc_data[6];
516 dev->hpa.name = parisc_pathname(dev); 516 dev->hpa.name = parisc_pathname(dev);
517 dev->hpa.start = hpa; 517 dev->hpa.start = hpa;
518 if (hpa == 0xf4000000 || hpa == 0xf6000000 || 518 /* This is awkward. The STI spec says that gfx devices may occupy
519 hpa == 0xf8000000 || hpa == 0xfa000000) { 519 * 32MB or 64MB. Unfortunately, we don't know how to tell whether
520 * it's the former or the latter. Assumptions either way can hurt us.
521 */
522 if (hpa == 0xf4000000 || hpa == 0xf8000000) {
523 dev->hpa.end = hpa + 0x03ffffff;
524 } else if (hpa == 0xf6000000 || hpa == 0xfa000000) {
520 dev->hpa.end = hpa + 0x01ffffff; 525 dev->hpa.end = hpa + 0x01ffffff;
521 } else { 526 } else {
522 dev->hpa.end = hpa + 0xfff; 527 dev->hpa.end = hpa + 0xfff;
@@ -834,7 +839,7 @@ static void print_parisc_device(struct parisc_device *dev)
834 839
835 if (dev->num_addrs) { 840 if (dev->num_addrs) {
836 int k; 841 int k;
837 printk(", additional addresses: "); 842 printk(", additional addresses: ");
838 for (k = 0; k < dev->num_addrs; k++) 843 for (k = 0; k < dev->num_addrs; k++)
839 printk("0x%lx ", dev->addr[k]); 844 printk("0x%lx ", dev->addr[k]);
840 } 845 }
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/hardware.c b/arch/parisc/kernel/hardware.c
index 2071b5bba15c..3058bffd8a2c 100644
--- a/arch/parisc/kernel/hardware.c
+++ b/arch/parisc/kernel/hardware.c
@@ -551,6 +551,7 @@ static struct hp_hardware hp_hardware_list[] __initdata = {
551 {HPHW_BCPORT, 0x804, 0x0000C, 0x10, "REO I/O BC Merced Port"}, 551 {HPHW_BCPORT, 0x804, 0x0000C, 0x10, "REO I/O BC Merced Port"},
552 {HPHW_BCPORT, 0x782, 0x0000C, 0x00, "REO I/O BC Ropes Port"}, 552 {HPHW_BCPORT, 0x782, 0x0000C, 0x00, "REO I/O BC Ropes Port"},
553 {HPHW_BCPORT, 0x784, 0x0000C, 0x00, "Pluto I/O BC Ropes Port"}, 553 {HPHW_BCPORT, 0x784, 0x0000C, 0x00, "Pluto I/O BC Ropes Port"},
554 {HPHW_BRIDGE, 0x05D, 0x0000A, 0x00, "SummitHawk Dino PCI Bridge"},
554 {HPHW_BRIDGE, 0x680, 0x0000A, 0x00, "Dino PCI Bridge"}, 555 {HPHW_BRIDGE, 0x680, 0x0000A, 0x00, "Dino PCI Bridge"},
555 {HPHW_BRIDGE, 0x682, 0x0000A, 0x00, "Cujo PCI Bridge"}, 556 {HPHW_BRIDGE, 0x682, 0x0000A, 0x00, "Cujo PCI Bridge"},
556 {HPHW_BRIDGE, 0x782, 0x0000A, 0x00, "Elroy PCI Bridge"}, 557 {HPHW_BRIDGE, 0x782, 0x0000A, 0x00, "Elroy PCI Bridge"},
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..17f23c26f1ca 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -39,7 +39,7 @@
39#include <asm/atomic.h> 39#include <asm/atomic.h>
40#include <asm/current.h> 40#include <asm/current.h>
41#include <asm/delay.h> 41#include <asm/delay.h>
42#include <asm/pgalloc.h> /* for flush_tlb_all() proto/macro */ 42#include <asm/tlbflush.h>
43 43
44#include <asm/io.h> 44#include <asm/io.h>
45#include <asm/irq.h> /* for CPU_IRQ_REGION and friends */ 45#include <asm/irq.h> /* for CPU_IRQ_REGION and friends */
@@ -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);
@@ -406,12 +406,10 @@ EXPORT_SYMBOL(smp_call_function);
406 * as we want to ensure all TLB's flushed before proceeding. 406 * as we want to ensure all TLB's flushed before proceeding.
407 */ 407 */
408 408
409extern void flush_tlb_all_local(void);
410
411void 409void
412smp_flush_tlb_all(void) 410smp_flush_tlb_all(void)
413{ 411{
414 on_each_cpu((void (*)(void *))flush_tlb_all_local, NULL, 1, 1); 412 on_each_cpu(flush_tlb_all_local, NULL, 1, 1);
415} 413}
416 414
417 415
@@ -487,7 +485,7 @@ void __init smp_callin(void)
487#endif 485#endif
488 486
489 flush_cache_all_local(); /* start with known state */ 487 flush_cache_all_local(); /* start with known state */
490 flush_tlb_all_local(); 488 flush_tlb_all_local(NULL);
491 489
492 local_irq_enable(); /* Interrupts have been off until now */ 490 local_irq_enable(); /* Interrupts have been off until now */
493 491
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..6d6436a6b624 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -68,7 +68,7 @@ SECTIONS
68 RODATA 68 RODATA
69 69
70 /* writeable */ 70 /* writeable */
71 . = ALIGN(4096); /* Make sure this is paged aligned so 71 . = ALIGN(4096); /* Make sure this is page aligned so
72 that we can properly leave these 72 that we can properly leave these
73 as writable */ 73 as writable */
74 data_start = .; 74 data_start = .;
@@ -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 */
@@ -194,14 +198,7 @@ SECTIONS
194#endif 198#endif
195 } 199 }
196 200
197 /* Stabs debugging sections. */ 201 STABS_DEBUG
198 .stab 0 : { *(.stab) }
199 .stabstr 0 : { *(.stabstr) }
200 .stab.excl 0 : { *(.stab.excl) }
201 .stab.exclstr 0 : { *(.stab.exclstr) }
202 .stab.index 0 : { *(.stab.index) }
203 .stab.indexstr 0 : { *(.stab.indexstr) }
204 .comment 0 : { *(.comment) }
205 .note 0 : { *(.note) } 202 .note 0 : { *(.note) }
206 203
207} 204}
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 29b998e430e6..720287d46e55 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{
@@ -300,6 +300,13 @@ static void __init setup_bootmem(void)
300 max_pfn = start_pfn + npages; 300 max_pfn = start_pfn + npages;
301 } 301 }
302 302
303 /* IOMMU is always used to access "high mem" on those boxes
304 * that can support enough mem that a PCI device couldn't
305 * directly DMA to any physical addresses.
306 * ISA DMA support will need to revisit this.
307 */
308 max_low_pfn = max_pfn;
309
303 if ((bootmap_pfn - bootmap_start_pfn) != bootmap_pages) { 310 if ((bootmap_pfn - bootmap_start_pfn) != bootmap_pages) {
304 printk(KERN_WARNING "WARNING! bootmap sizing is messed up!\n"); 311 printk(KERN_WARNING "WARNING! bootmap sizing is messed up!\n");
305 BUG(); 312 BUG();
@@ -431,11 +438,11 @@ void free_initmem(void)
431#define SET_MAP_OFFSET(x) ((void *)(((unsigned long)(x) + VM_MAP_OFFSET) \ 438#define SET_MAP_OFFSET(x) ((void *)(((unsigned long)(x) + VM_MAP_OFFSET) \
432 & ~(VM_MAP_OFFSET-1))) 439 & ~(VM_MAP_OFFSET-1)))
433 440
434void *vmalloc_start; 441void *vmalloc_start __read_mostly;
435EXPORT_SYMBOL(vmalloc_start); 442EXPORT_SYMBOL(vmalloc_start);
436 443
437#ifdef CONFIG_PA11 444#ifdef CONFIG_PA11
438unsigned long pcxl_dma_start; 445unsigned long pcxl_dma_start __read_mostly;
439#endif 446#endif
440 447
441void __init mem_init(void) 448void __init mem_init(void)
@@ -475,7 +482,7 @@ int do_check_pgt_cache(int low, int high)
475 return 0; 482 return 0;
476} 483}
477 484
478unsigned long *empty_zero_page; 485unsigned long *empty_zero_page __read_mostly;
479 486
480void show_mem(void) 487void show_mem(void)
481{ 488{
@@ -998,7 +1005,7 @@ void flush_tlb_all(void)
998void flush_tlb_all(void) 1005void flush_tlb_all(void)
999{ 1006{
1000 spin_lock(&sid_lock); 1007 spin_lock(&sid_lock);
1001 flush_tlb_all_local(); 1008 flush_tlb_all_local(NULL);
1002 recycle_sids(); 1009 recycle_sids();
1003 spin_unlock(&sid_lock); 1010 spin_unlock(&sid_lock);
1004} 1011}
diff --git a/arch/parisc/mm/ioremap.c b/arch/parisc/mm/ioremap.c
index 5c7a1b3b9326..edd9a9559cba 100644
--- a/arch/parisc/mm/ioremap.c
+++ b/arch/parisc/mm/ioremap.c
@@ -1,12 +1,9 @@
1/* 1/*
2 * arch/parisc/mm/ioremap.c 2 * arch/parisc/mm/ioremap.c
3 * 3 *
4 * Re-map IO memory to kernel address space so that we can access it.
5 * This is needed for high PCI addresses that aren't mapped in the
6 * 640k-1MB IO memory area on PC's
7 *
8 * (C) Copyright 1995 1996 Linus Torvalds 4 * (C) Copyright 1995 1996 Linus Torvalds
9 * (C) Copyright 2001 Helge Deller <deller@gmx.de> 5 * (C) Copyright 2001 Helge Deller <deller@gmx.de>
6 * (C) Copyright 2005 Kyle McMartin <kyle@parisc-linux.org>
10 */ 7 */
11 8
12#include <linux/vmalloc.h> 9#include <linux/vmalloc.h>
@@ -14,81 +11,107 @@
14#include <linux/module.h> 11#include <linux/module.h>
15#include <asm/io.h> 12#include <asm/io.h>
16#include <asm/pgalloc.h> 13#include <asm/pgalloc.h>
14#include <asm/tlbflush.h>
15#include <asm/cacheflush.h>
17 16
18static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, 17static inline void
19 unsigned long phys_addr, unsigned long flags) 18remap_area_pte(pte_t *pte, unsigned long address, unsigned long size,
19 unsigned long phys_addr, unsigned long flags)
20{ 20{
21 unsigned long end; 21 unsigned long end, pfn;
22 pgprot_t pgprot = __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY |
23 _PAGE_ACCESSED | flags);
22 24
23 address &= ~PMD_MASK; 25 address &= ~PMD_MASK;
26
24 end = address + size; 27 end = address + size;
25 if (end > PMD_SIZE) 28 if (end > PMD_SIZE)
26 end = PMD_SIZE; 29 end = PMD_SIZE;
27 if (address >= end) 30
28 BUG(); 31 BUG_ON(address >= end);
32
33 pfn = phys_addr >> PAGE_SHIFT;
29 do { 34 do {
30 if (!pte_none(*pte)) { 35 BUG_ON(!pte_none(*pte));
31 printk(KERN_ERR "remap_area_pte: page already exists\n"); 36
32 BUG(); 37 set_pte(pte, pfn_pte(pfn, pgprot));
33 } 38
34 set_pte(pte, mk_pte_phys(phys_addr, __pgprot(_PAGE_PRESENT | _PAGE_RW |
35 _PAGE_DIRTY | _PAGE_ACCESSED | flags)));
36 address += PAGE_SIZE; 39 address += PAGE_SIZE;
37 phys_addr += PAGE_SIZE; 40 pfn++;
38 pte++; 41 pte++;
39 } while (address && (address < end)); 42 } while (address && (address < end));
40} 43}
41 44
42static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size, 45static inline int
43 unsigned long phys_addr, unsigned long flags) 46remap_area_pmd(pmd_t *pmd, unsigned long address, unsigned long size,
47 unsigned long phys_addr, unsigned long flags)
44{ 48{
45 unsigned long end; 49 unsigned long end;
46 50
47 address &= ~PGDIR_MASK; 51 address &= ~PGDIR_MASK;
52
48 end = address + size; 53 end = address + size;
49 if (end > PGDIR_SIZE) 54 if (end > PGDIR_SIZE)
50 end = PGDIR_SIZE; 55 end = PGDIR_SIZE;
56
57 BUG_ON(address >= end);
58
51 phys_addr -= address; 59 phys_addr -= address;
52 if (address >= end)
53 BUG();
54 do { 60 do {
55 pte_t * pte = pte_alloc_kernel(pmd, address); 61 pte_t *pte = pte_alloc_kernel(pmd, address);
56 if (!pte) 62 if (!pte)
57 return -ENOMEM; 63 return -ENOMEM;
58 remap_area_pte(pte, address, end - address, address + phys_addr, flags); 64
65 remap_area_pte(pte, address, end - address,
66 address + phys_addr, flags);
67
59 address = (address + PMD_SIZE) & PMD_MASK; 68 address = (address + PMD_SIZE) & PMD_MASK;
60 pmd++; 69 pmd++;
61 } while (address && (address < end)); 70 } while (address && (address < end));
71
62 return 0; 72 return 0;
63} 73}
64 74
65#if (USE_HPPA_IOREMAP) 75#if USE_HPPA_IOREMAP
66static int remap_area_pages(unsigned long address, unsigned long phys_addr, 76static int
67 unsigned long size, unsigned long flags) 77remap_area_pages(unsigned long address, unsigned long phys_addr,
78 unsigned long size, unsigned long flags)
68{ 79{
69 int error; 80 pgd_t *dir;
70 pgd_t * dir; 81 int error = 0;
71 unsigned long end = address + size; 82 unsigned long end = address + size;
72 83
84 BUG_ON(address >= end);
85
73 phys_addr -= address; 86 phys_addr -= address;
74 dir = pgd_offset(&init_mm, address); 87 dir = pgd_offset_k(address);
88
75 flush_cache_all(); 89 flush_cache_all();
76 if (address >= end) 90
77 BUG();
78 do { 91 do {
92 pud_t *pud;
79 pmd_t *pmd; 93 pmd_t *pmd;
80 pmd = pmd_alloc(&init_mm, dir, address); 94
81 error = -ENOMEM; 95 error = -ENOMEM;
96 pud = pud_alloc(&init_mm, dir, address);
97 if (!pud)
98 break;
99
100 pmd = pmd_alloc(&init_mm, pud, address);
82 if (!pmd) 101 if (!pmd)
83 break; 102 break;
103
84 if (remap_area_pmd(pmd, address, end - address, 104 if (remap_area_pmd(pmd, address, end - address,
85 phys_addr + address, flags)) 105 phys_addr + address, flags))
86 break; 106 break;
107
87 error = 0; 108 error = 0;
88 address = (address + PGDIR_SIZE) & PGDIR_MASK; 109 address = (address + PGDIR_SIZE) & PGDIR_MASK;
89 dir++; 110 dir++;
90 } while (address && (address < end)); 111 } while (address && (address < end));
112
91 flush_tlb_all(); 113 flush_tlb_all();
114
92 return error; 115 return error;
93} 116}
94#endif /* USE_HPPA_IOREMAP */ 117#endif /* USE_HPPA_IOREMAP */
@@ -123,8 +146,7 @@ EXPORT_SYMBOL(__raw_bad_addr);
123 146
124/* 147/*
125 * Remap an arbitrary physical address space into the kernel virtual 148 * Remap an arbitrary physical address space into the kernel virtual
126 * address space. Needed when the kernel wants to access high addresses 149 * address space.
127 * directly.
128 * 150 *
129 * NOTE! We need to allow non-page-aligned mappings too: we will obviously 151 * NOTE! We need to allow non-page-aligned mappings too: we will obviously
130 * have to convert them into an offset in a page-aligned mapping, but the 152 * have to convert them into an offset in a page-aligned mapping, but the
@@ -148,8 +170,8 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l
148#endif 170#endif
149 171
150#else 172#else
151 void * addr; 173 void *addr;
152 struct vm_struct * area; 174 struct vm_struct *area;
153 unsigned long offset, last_addr; 175 unsigned long offset, last_addr;
154 176
155 /* Don't allow wraparound or zero size */ 177 /* Don't allow wraparound or zero size */
@@ -167,9 +189,11 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l
167 t_addr = __va(phys_addr); 189 t_addr = __va(phys_addr);
168 t_end = t_addr + (size - 1); 190 t_end = t_addr + (size - 1);
169 191
170 for(page = virt_to_page(t_addr); page <= virt_to_page(t_end); page++) 192 for (page = virt_to_page(t_addr);
193 page <= virt_to_page(t_end); page++) {
171 if(!PageReserved(page)) 194 if(!PageReserved(page))
172 return NULL; 195 return NULL;
196 }
173 } 197 }
174 198
175 /* 199 /*
@@ -185,11 +209,13 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l
185 area = get_vm_area(size, VM_IOREMAP); 209 area = get_vm_area(size, VM_IOREMAP);
186 if (!area) 210 if (!area)
187 return NULL; 211 return NULL;
212
188 addr = area->addr; 213 addr = area->addr;
189 if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) { 214 if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) {
190 vfree(addr); 215 vfree(addr);
191 return NULL; 216 return NULL;
192 } 217 }
218
193 return (void __iomem *) (offset + (char *)addr); 219 return (void __iomem *) (offset + (char *)addr);
194#endif 220#endif
195} 221}