aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-14 21:36:21 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-14 21:36:21 -0400
commitaba297927d1d558c7a94548135133bdf9172708a (patch)
treed107c53de78175124ba5c3ade07fc295c48f9331 /arch
parent08f3dfe8c4b91189890019d307aad236c3633515 (diff)
parent462b529f91b618f4bd144bbc6184f616dfb58a1e (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (30 commits) [PARISC] remove global_ack_eiem [PARISC] Fix kernel panic in check_ivt [PARISC] Fix bug when syscall nr is __NR_Linux_syscalls [PARISC] be more defensive in process.c::get_wchan [PARISC] fix "reduce size of task_struct on 64-bit machines" fallout [PARISC] fix null ptr deref in unwind.c [PARISC] fix trivial spelling nit in asm/linkage.h [PARISC] remove remnants of parisc-specific softirq code [PARISC] fix section mismatch in smp.c [PARISC] fix "ENTRY" macro redefinition [PARISC] Wire up utimensat/signalfd/timerfd/eventfd syscalls [PARISC] fix section mismatch in superio serial drivers [PARISC] fix section mismatch in parisc eisa driver [PARISC] fix section mismatches in arch/parisc/kernel [PARISC] fix section mismatch in ccio-dma [PARISC] fix section mismatch in parisc STI video drivers [PARISC] fix section mismatch in parport_gsc [PARISC] fix lasi_82596 build [PARISC] Build fixes for power.c [PARISC] kobject is embedded in subsys, not kset ...
Diffstat (limited to 'arch')
-rw-r--r--arch/parisc/hpux/fs.c5
-rw-r--r--arch/parisc/kernel/entry.S40
-rw-r--r--arch/parisc/kernel/firmware.c4
-rw-r--r--arch/parisc/kernel/hardware.c14
-rw-r--r--arch/parisc/kernel/hpmc.S5
-rw-r--r--arch/parisc/kernel/irq.c26
-rw-r--r--arch/parisc/kernel/pci-dma.c94
-rw-r--r--arch/parisc/kernel/perf.c18
-rw-r--r--arch/parisc/kernel/process.c4
-rw-r--r--arch/parisc/kernel/processor.c14
-rw-r--r--arch/parisc/kernel/setup.c5
-rw-r--r--arch/parisc/kernel/signal32.h2
-rw-r--r--arch/parisc/kernel/smp.c8
-rw-r--r--arch/parisc/kernel/sys_parisc32.c13
-rw-r--r--arch/parisc/kernel/syscall.S12
-rw-r--r--arch/parisc/kernel/syscall_table.S16
-rw-r--r--arch/parisc/kernel/time.c2
-rw-r--r--arch/parisc/kernel/traps.c9
-rw-r--r--arch/parisc/kernel/unwind.c4
-rw-r--r--arch/parisc/math-emu/dbl_float.h4
-rw-r--r--arch/parisc/math-emu/dfsqrt.c2
-rw-r--r--arch/parisc/math-emu/sfsqrt.c2
-rw-r--r--arch/parisc/math-emu/sgl_float.h4
-rw-r--r--arch/parisc/mm/init.c10
24 files changed, 152 insertions, 165 deletions
diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c
index d86e15776779..f2042e6466a4 100644
--- a/arch/parisc/hpux/fs.c
+++ b/arch/parisc/hpux/fs.c
@@ -21,6 +21,7 @@
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */ 22 */
23 23
24#include <linux/kernel.h>
24#include <linux/mm.h> 25#include <linux/mm.h>
25#include <linux/sched.h> 26#include <linux/sched.h>
26#include <linux/file.h> 27#include <linux/file.h>
@@ -69,7 +70,6 @@ struct getdents_callback {
69}; 70};
70 71
71#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de))) 72#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))
72#define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1))
73 73
74static int filldir(void * __buf, const char * name, int namlen, loff_t offset, 74static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
75 u64 ino, unsigned d_type) 75 u64 ino, unsigned d_type)
@@ -77,7 +77,7 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
77 struct hpux_dirent __user * dirent; 77 struct hpux_dirent __user * dirent;
78 struct getdents_callback * buf = (struct getdents_callback *) __buf; 78 struct getdents_callback * buf = (struct getdents_callback *) __buf;
79 ino_t d_ino; 79 ino_t d_ino;
80 int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1); 80 int reclen = ALIGN(NAME_OFFSET(dirent) + namlen + 1, sizeof(long));
81 81
82 buf->error = -EINVAL; /* only used if we fail.. */ 82 buf->error = -EINVAL; /* only used if we fail.. */
83 if (reclen > buf->count) 83 if (reclen > buf->count)
@@ -102,7 +102,6 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
102} 102}
103 103
104#undef NAME_OFFSET 104#undef NAME_OFFSET
105#undef ROUND_UP
106 105
107int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count) 106int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count)
108{ 107{
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S
index 8474f9e5ca10..42598abf4576 100644
--- a/arch/parisc/kernel/entry.S
+++ b/arch/parisc/kernel/entry.S
@@ -954,21 +954,6 @@ intr_return:
954 /* NOTE: Need to enable interrupts incase we schedule. */ 954 /* NOTE: Need to enable interrupts incase we schedule. */
955 ssm PSW_SM_I, %r0 955 ssm PSW_SM_I, %r0
956 956
957 /* Check for software interrupts */
958
959 .import irq_stat,data
960
961 load32 irq_stat,%r19
962#ifdef CONFIG_SMP
963 mfctl %cr30,%r1
964 ldw TI_CPU(%r1),%r1 /* get cpu # - int */
965 /* shift left ____cacheline_aligned (aka L1_CACHE_BYTES) amount
966 ** irq_stat[] is defined using ____cacheline_aligned.
967 */
968 SHLREG %r1,L1_CACHE_SHIFT,%r20
969 add %r19,%r20,%r19 /* now have &irq_stat[smp_processor_id()] */
970#endif /* CONFIG_SMP */
971
972intr_check_resched: 957intr_check_resched:
973 958
974 /* check for reschedule */ 959 /* check for reschedule */
@@ -2034,10 +2019,9 @@ ENTRY(syscall_exit)
2034 STREG %r28,TASK_PT_GR28(%r1) 2019 STREG %r28,TASK_PT_GR28(%r1)
2035 2020
2036#ifdef CONFIG_HPUX 2021#ifdef CONFIG_HPUX
2037
2038/* <linux/personality.h> cannot be easily included */ 2022/* <linux/personality.h> cannot be easily included */
2039#define PER_HPUX 0x10 2023#define PER_HPUX 0x10
2040 LDREG TASK_PERSONALITY(%r1),%r19 2024 ldw TASK_PERSONALITY(%r1),%r19
2041 2025
2042 /* We can't use "CMPIB<> PER_HPUX" since "im5" field is sign extended */ 2026 /* We can't use "CMPIB<> PER_HPUX" since "im5" field is sign extended */
2043 ldo -PER_HPUX(%r19), %r19 2027 ldo -PER_HPUX(%r19), %r19
@@ -2055,24 +2039,6 @@ ENTRY(syscall_exit)
2055 */ 2039 */
2056 loadgp 2040 loadgp
2057 2041
2058syscall_check_bh:
2059
2060 /* Check for software interrupts */
2061
2062 .import irq_stat,data
2063
2064 load32 irq_stat,%r19
2065
2066#ifdef CONFIG_SMP
2067 /* sched.h: int processor */
2068 /* %r26 is used as scratch register to index into irq_stat[] */
2069 ldw TI_CPU-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r26 /* cpu # */
2070
2071 /* shift left ____cacheline_aligned (aka L1_CACHE_BYTES) bits */
2072 SHLREG %r26,L1_CACHE_SHIFT,%r20
2073 add %r19,%r20,%r19 /* now have &irq_stat[smp_processor_id()] */
2074#endif /* CONFIG_SMP */
2075
2076syscall_check_resched: 2042syscall_check_resched:
2077 2043
2078 /* check for reschedule */ 2044 /* check for reschedule */
@@ -2114,7 +2080,7 @@ syscall_restore:
2114 /* Are we being ptraced? */ 2080 /* Are we being ptraced? */
2115 LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 2081 LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
2116 2082
2117 LDREG TASK_PTRACE(%r1), %r19 2083 ldw TASK_PTRACE(%r1), %r19
2118 bb,< %r19,31,syscall_restore_rfi 2084 bb,< %r19,31,syscall_restore_rfi
2119 nop 2085 nop
2120 2086
@@ -2244,7 +2210,7 @@ syscall_do_resched:
2244#else 2210#else
2245 nop 2211 nop
2246#endif 2212#endif
2247 b syscall_check_bh /* if resched, we start over again */ 2213 b syscall_check_resched /* if resched, we start over again */
2248 nop 2214 nop
2249ENDPROC(syscall_exit) 2215ENDPROC(syscall_exit)
2250 2216
diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c
index 39dc835bf89e..fd6552c4c08c 100644
--- a/arch/parisc/kernel/firmware.c
+++ b/arch/parisc/kernel/firmware.c
@@ -634,7 +634,7 @@ EXPORT_SYMBOL(pdc_lan_station_id);
634 * pdc_stable_read - Read data from Stable Storage. 634 * pdc_stable_read - Read data from Stable Storage.
635 * @staddr: Stable Storage address to access. 635 * @staddr: Stable Storage address to access.
636 * @memaddr: The memory address where Stable Storage data shall be copied. 636 * @memaddr: The memory address where Stable Storage data shall be copied.
637 * @count: number of bytes to transfert. count is multiple of 4. 637 * @count: number of bytes to transfer. count is multiple of 4.
638 * 638 *
639 * This PDC call reads from the Stable Storage address supplied in staddr 639 * This PDC call reads from the Stable Storage address supplied in staddr
640 * and copies count bytes to the memory address memaddr. 640 * and copies count bytes to the memory address memaddr.
@@ -660,7 +660,7 @@ EXPORT_SYMBOL(pdc_stable_read);
660 * pdc_stable_write - Write data to Stable Storage. 660 * pdc_stable_write - Write data to Stable Storage.
661 * @staddr: Stable Storage address to access. 661 * @staddr: Stable Storage address to access.
662 * @memaddr: The memory address where Stable Storage data shall be read from. 662 * @memaddr: The memory address where Stable Storage data shall be read from.
663 * @count: number of bytes to transfert. count is multiple of 4. 663 * @count: number of bytes to transfer. count is multiple of 4.
664 * 664 *
665 * This PDC call reads count bytes from the supplied memaddr address, 665 * This PDC call reads count bytes from the supplied memaddr address,
666 * and copies count bytes to the Stable Storage address staddr. 666 * and copies count bytes to the Stable Storage address staddr.
diff --git a/arch/parisc/kernel/hardware.c b/arch/parisc/kernel/hardware.c
index 18ba4cb9159b..04848b2b381c 100644
--- a/arch/parisc/kernel/hardware.c
+++ b/arch/parisc/kernel/hardware.c
@@ -38,7 +38,7 @@
38 * so don't reference this table after starting the init process 38 * so don't reference this table after starting the init process
39 */ 39 */
40 40
41static struct hp_hardware hp_hardware_list[] __initdata = { 41static struct hp_hardware hp_hardware_list[] __devinitdata = {
42 {HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"}, 42 {HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"},
43 {HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"}, 43 {HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"},
44 {HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"}, 44 {HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"},
@@ -1219,7 +1219,7 @@ static struct hp_cpu_type_mask {
1219 unsigned short model; 1219 unsigned short model;
1220 unsigned short mask; 1220 unsigned short mask;
1221 enum cpu_type cpu; 1221 enum cpu_type cpu;
1222} hp_cpu_type_mask_list[] __initdata = { 1222} hp_cpu_type_mask_list[] __devinitdata = {
1223 1223
1224 { 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */ 1224 { 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */
1225 { 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */ 1225 { 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */
@@ -1296,10 +1296,11 @@ static struct hp_cpu_type_mask {
1296 { 0x05f0, 0x0ff0, pcxw2 }, /* 0x05f0 - 0x05ff */ 1296 { 0x05f0, 0x0ff0, pcxw2 }, /* 0x05f0 - 0x05ff */
1297 { 0x0600, 0x0fe0, pcxl }, /* 0x0600 - 0x061f */ 1297 { 0x0600, 0x0fe0, pcxl }, /* 0x0600 - 0x061f */
1298 { 0x0880, 0x0ff0, mako }, /* 0x0880 - 0x088f */ 1298 { 0x0880, 0x0ff0, mako }, /* 0x0880 - 0x088f */
1299 { 0x0890, 0x0ff0, mako2 }, /* 0x0890 - 0x089f */
1299 { 0x0000, 0x0000, pcx } /* terminate table */ 1300 { 0x0000, 0x0000, pcx } /* terminate table */
1300}; 1301};
1301 1302
1302char *cpu_name_version[][2] = { 1303const char * const cpu_name_version[][2] = {
1303 [pcx] = { "PA7000 (PCX)", "1.0" }, 1304 [pcx] = { "PA7000 (PCX)", "1.0" },
1304 [pcxs] = { "PA7000 (PCX-S)", "1.1a" }, 1305 [pcxs] = { "PA7000 (PCX-S)", "1.1a" },
1305 [pcxt] = { "PA7100 (PCX-T)", "1.1b" }, 1306 [pcxt] = { "PA7100 (PCX-T)", "1.1b" },
@@ -1311,10 +1312,11 @@ char *cpu_name_version[][2] = {
1311 [pcxw] = { "PA8500 (PCX-W)", "2.0" }, 1312 [pcxw] = { "PA8500 (PCX-W)", "2.0" },
1312 [pcxw_] = { "PA8600 (PCX-W+)", "2.0" }, 1313 [pcxw_] = { "PA8600 (PCX-W+)", "2.0" },
1313 [pcxw2] = { "PA8700 (PCX-W2)", "2.0" }, 1314 [pcxw2] = { "PA8700 (PCX-W2)", "2.0" },
1314 [mako] = { "PA8800 (Mako)", "2.0" } 1315 [mako] = { "PA8800 (Mako)", "2.0" },
1316 [mako2] = { "PA8900 (Shortfin)", "2.0" }
1315}; 1317};
1316 1318
1317const char * __init 1319const char * __devinit
1318parisc_hardware_description(struct parisc_device_id *id) 1320parisc_hardware_description(struct parisc_device_id *id)
1319{ 1321{
1320 struct hp_hardware *listptr; 1322 struct hp_hardware *listptr;
@@ -1353,7 +1355,7 @@ parisc_hardware_description(struct parisc_device_id *id)
1353 1355
1354 1356
1355/* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */ 1357/* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */
1356enum cpu_type __init 1358enum cpu_type __cpuinit
1357parisc_get_cpu_type(unsigned long hversion) 1359parisc_get_cpu_type(unsigned long hversion)
1358{ 1360{
1359 struct hp_cpu_type_mask *ptr; 1361 struct hp_cpu_type_mask *ptr;
diff --git a/arch/parisc/kernel/hpmc.S b/arch/parisc/kernel/hpmc.S
index d8baa158d8a0..43b41df0b541 100644
--- a/arch/parisc/kernel/hpmc.S
+++ b/arch/parisc/kernel/hpmc.S
@@ -295,8 +295,5 @@ os_hpmc_6:
295 b . 295 b .
296 nop 296 nop
297ENDPROC(os_hpmc) 297ENDPROC(os_hpmc)
298 298ENTRY(os_hpmc_end) /* this label used to compute os_hpmc checksum */
299 /* this label used to compute os_hpmc checksum */
300ENTRY(os_hpmc_end)
301
302 nop 299 nop
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
index c5c9125dacec..76ce5e3b0050 100644
--- a/arch/parisc/kernel/irq.c
+++ b/arch/parisc/kernel/irq.c
@@ -46,14 +46,10 @@ extern irqreturn_t ipi_interrupt(int, void *);
46static volatile unsigned long cpu_eiem = 0; 46static volatile unsigned long cpu_eiem = 0;
47 47
48/* 48/*
49** ack bitmap ... habitually set to 1, but reset to zero 49** local ACK bitmap ... habitually set to 1, but reset to zero
50** between ->ack() and ->end() of the interrupt to prevent 50** between ->ack() and ->end() of the interrupt to prevent
51** re-interruption of a processing interrupt. 51** re-interruption of a processing interrupt.
52*/ 52*/
53static volatile unsigned long global_ack_eiem = ~0UL;
54/*
55** Local bitmap, same as above but for per-cpu interrupts
56*/
57static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL; 53static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL;
58 54
59static void cpu_disable_irq(unsigned int irq) 55static void cpu_disable_irq(unsigned int irq)
@@ -94,13 +90,11 @@ void cpu_ack_irq(unsigned int irq)
94 int cpu = smp_processor_id(); 90 int cpu = smp_processor_id();
95 91
96 /* Clear in EIEM so we can no longer process */ 92 /* Clear in EIEM so we can no longer process */
97 if (CHECK_IRQ_PER_CPU(irq_desc[irq].status)) 93 per_cpu(local_ack_eiem, cpu) &= ~mask;
98 per_cpu(local_ack_eiem, cpu) &= ~mask;
99 else
100 global_ack_eiem &= ~mask;
101 94
102 /* disable the interrupt */ 95 /* disable the interrupt */
103 set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu)); 96 set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu));
97
104 /* and now ack it */ 98 /* and now ack it */
105 mtctl(mask, 23); 99 mtctl(mask, 23);
106} 100}
@@ -111,13 +105,10 @@ void cpu_end_irq(unsigned int irq)
111 int cpu = smp_processor_id(); 105 int cpu = smp_processor_id();
112 106
113 /* set it in the eiems---it's no longer in process */ 107 /* set it in the eiems---it's no longer in process */
114 if (CHECK_IRQ_PER_CPU(irq_desc[irq].status)) 108 per_cpu(local_ack_eiem, cpu) |= mask;
115 per_cpu(local_ack_eiem, cpu) |= mask;
116 else
117 global_ack_eiem |= mask;
118 109
119 /* enable the interrupt */ 110 /* enable the interrupt */
120 set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu)); 111 set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu));
121} 112}
122 113
123#ifdef CONFIG_SMP 114#ifdef CONFIG_SMP
@@ -354,8 +345,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
354 local_irq_disable(); 345 local_irq_disable();
355 irq_enter(); 346 irq_enter();
356 347
357 eirr_val = mfctl(23) & cpu_eiem & global_ack_eiem & 348 eirr_val = mfctl(23) & cpu_eiem & per_cpu(local_ack_eiem, cpu);
358 per_cpu(local_ack_eiem, cpu);
359 if (!eirr_val) 349 if (!eirr_val)
360 goto set_out; 350 goto set_out;
361 irq = eirr_to_irq(eirr_val); 351 irq = eirr_to_irq(eirr_val);
@@ -381,7 +371,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
381 return; 371 return;
382 372
383 set_out: 373 set_out:
384 set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu)); 374 set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu));
385 goto out; 375 goto out;
386} 376}
387 377
diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c
index 0c3aecb85a5c..23c1388df1f5 100644
--- a/arch/parisc/kernel/pci-dma.c
+++ b/arch/parisc/kernel/pci-dma.c
@@ -21,6 +21,7 @@
21#include <linux/mm.h> 21#include <linux/mm.h>
22#include <linux/pci.h> 22#include <linux/pci.h>
23#include <linux/proc_fs.h> 23#include <linux/proc_fs.h>
24#include <linux/seq_file.h>
24#include <linux/slab.h> 25#include <linux/slab.h>
25#include <linux/string.h> 26#include <linux/string.h>
26#include <linux/types.h> 27#include <linux/types.h>
@@ -34,7 +35,6 @@
34#include <asm/tlbflush.h> /* for purge_tlb_*() macros */ 35#include <asm/tlbflush.h> /* for purge_tlb_*() macros */
35 36
36static struct proc_dir_entry * proc_gsc_root __read_mostly = NULL; 37static struct proc_dir_entry * proc_gsc_root __read_mostly = NULL;
37static int pcxl_proc_info(char *buffer, char **start, off_t offset, int length);
38static unsigned long pcxl_used_bytes __read_mostly = 0; 38static unsigned long pcxl_used_bytes __read_mostly = 0;
39static unsigned long pcxl_used_pages __read_mostly = 0; 39static unsigned long pcxl_used_pages __read_mostly = 0;
40 40
@@ -330,6 +330,54 @@ pcxl_free_range(unsigned long vaddr, size_t size)
330 dump_resmap(); 330 dump_resmap();
331} 331}
332 332
333static int proc_pcxl_dma_show(struct seq_file *m, void *v)
334{
335#if 0
336 u_long i = 0;
337 unsigned long *res_ptr = (u_long *)pcxl_res_map;
338#endif
339 unsigned long total_pages = pcxl_res_size << 3; /* 8 bits per byte */
340
341 seq_printf(m, "\nDMA Mapping Area size : %d bytes (%ld pages)\n",
342 PCXL_DMA_MAP_SIZE, total_pages);
343
344 seq_printf(m, "Resource bitmap : %d bytes\n", pcxl_res_size);
345
346 seq_puts(m, " total: free: used: % used:\n");
347 seq_printf(m, "blocks %8d %8ld %8ld %8ld%%\n", pcxl_res_size,
348 pcxl_res_size - pcxl_used_bytes, pcxl_used_bytes,
349 (pcxl_used_bytes * 100) / pcxl_res_size);
350
351 seq_printf(m, "pages %8ld %8ld %8ld %8ld%%\n", total_pages,
352 total_pages - pcxl_used_pages, pcxl_used_pages,
353 (pcxl_used_pages * 100 / total_pages));
354
355#if 0
356 seq_puts(m, "\nResource bitmap:");
357
358 for(; i < (pcxl_res_size / sizeof(u_long)); ++i, ++res_ptr) {
359 if ((i & 7) == 0)
360 seq_puts(m,"\n ");
361 seq_printf(m, "%s %08lx", buf, *res_ptr);
362 }
363#endif
364 seq_putc(m, '\n');
365 return 0;
366}
367
368static int proc_pcxl_dma_open(struct inode *inode, struct file *file)
369{
370 return single_open(file, proc_pcxl_dma_show, NULL);
371}
372
373static const struct file_operations proc_pcxl_dma_ops = {
374 .owner = THIS_MODULE,
375 .open = proc_pcxl_dma_open,
376 .read = seq_read,
377 .llseek = seq_lseek,
378 .release = single_release,
379};
380
333static int __init 381static int __init
334pcxl_dma_init(void) 382pcxl_dma_init(void)
335{ 383{
@@ -348,9 +396,10 @@ pcxl_dma_init(void)
348 "pcxl_dma_init: Unable to create gsc /proc dir entry\n"); 396 "pcxl_dma_init: Unable to create gsc /proc dir entry\n");
349 else { 397 else {
350 struct proc_dir_entry* ent; 398 struct proc_dir_entry* ent;
351 ent = create_proc_info_entry("pcxl_dma", 0, 399 ent = create_proc_entry("pcxl_dma", 0, proc_gsc_root);
352 proc_gsc_root, pcxl_proc_info); 400 if (ent)
353 if (!ent) 401 ent->proc_fops = &proc_pcxl_dma_ops;
402 else
354 printk(KERN_WARNING 403 printk(KERN_WARNING
355 "pci-dma.c: Unable to create pcxl_dma /proc entry.\n"); 404 "pci-dma.c: Unable to create pcxl_dma /proc entry.\n");
356 } 405 }
@@ -551,40 +600,3 @@ struct hppa_dma_ops pcx_dma_ops = {
551 .dma_sync_sg_for_cpu = pa11_dma_sync_sg_for_cpu, 600 .dma_sync_sg_for_cpu = pa11_dma_sync_sg_for_cpu,
552 .dma_sync_sg_for_device = pa11_dma_sync_sg_for_device, 601 .dma_sync_sg_for_device = pa11_dma_sync_sg_for_device,
553}; 602};
554
555
556static int pcxl_proc_info(char *buf, char **start, off_t offset, int len)
557{
558#if 0
559 u_long i = 0;
560 unsigned long *res_ptr = (u_long *)pcxl_res_map;
561#endif
562 unsigned long total_pages = pcxl_res_size << 3; /* 8 bits per byte */
563
564 sprintf(buf, "\nDMA Mapping Area size : %d bytes (%ld pages)\n",
565 PCXL_DMA_MAP_SIZE, total_pages);
566
567 sprintf(buf, "%sResource bitmap : %d bytes\n", buf, pcxl_res_size);
568
569 strcat(buf, " total: free: used: % used:\n");
570 sprintf(buf, "%sblocks %8d %8ld %8ld %8ld%%\n", buf, pcxl_res_size,
571 pcxl_res_size - pcxl_used_bytes, pcxl_used_bytes,
572 (pcxl_used_bytes * 100) / pcxl_res_size);
573
574 sprintf(buf, "%spages %8ld %8ld %8ld %8ld%%\n", buf, total_pages,
575 total_pages - pcxl_used_pages, pcxl_used_pages,
576 (pcxl_used_pages * 100 / total_pages));
577
578#if 0
579 strcat(buf, "\nResource bitmap:");
580
581 for(; i < (pcxl_res_size / sizeof(u_long)); ++i, ++res_ptr) {
582 if ((i & 7) == 0)
583 strcat(buf,"\n ");
584 sprintf(buf, "%s %08lx", buf, *res_ptr);
585 }
586#endif
587 strcat(buf, "\n");
588 return strlen(buf);
589}
590
diff --git a/arch/parisc/kernel/perf.c b/arch/parisc/kernel/perf.c
index a46bc62b643e..89d6d5ad44b5 100644
--- a/arch/parisc/kernel/perf.c
+++ b/arch/parisc/kernel/perf.c
@@ -171,7 +171,7 @@ static const uint64_t perf_bitmasks[] = {
171 171
172/* 172/*
173 * Write control bitmasks for Pa-8700 processor given 173 * Write control bitmasks for Pa-8700 processor given
174 * somethings have changed slightly. 174 * some things have changed slightly.
175 */ 175 */
176static const uint64_t perf_bitmasks_piranha[] = { 176static const uint64_t perf_bitmasks_piranha[] = {
177 0x0000000000000000ul, /* first dbl word must be zero */ 177 0x0000000000000000ul, /* first dbl word must be zero */
@@ -511,10 +511,12 @@ static int __init perf_init(void)
511 } else if (boot_cpu_data.cpu_type == pcxw || 511 } else if (boot_cpu_data.cpu_type == pcxw ||
512 boot_cpu_data.cpu_type == pcxw_ || 512 boot_cpu_data.cpu_type == pcxw_ ||
513 boot_cpu_data.cpu_type == pcxw2 || 513 boot_cpu_data.cpu_type == pcxw2 ||
514 boot_cpu_data.cpu_type == mako) { 514 boot_cpu_data.cpu_type == mako ||
515 boot_cpu_data.cpu_type == mako2) {
515 perf_processor_interface = CUDA_INTF; 516 perf_processor_interface = CUDA_INTF;
516 if (boot_cpu_data.cpu_type == pcxw2 || 517 if (boot_cpu_data.cpu_type == pcxw2 ||
517 boot_cpu_data.cpu_type == mako) 518 boot_cpu_data.cpu_type == mako ||
519 boot_cpu_data.cpu_type == mako2)
518 bitmask_array = perf_bitmasks_piranha; 520 bitmask_array = perf_bitmasks_piranha;
519 } else { 521 } else {
520 perf_processor_interface = UNKNOWN_INTF; 522 perf_processor_interface = UNKNOWN_INTF;
@@ -574,27 +576,27 @@ static int perf_stop_counters(uint32_t *raddr)
574 if (!perf_rdr_read_ubuf(16, userbuf)) 576 if (!perf_rdr_read_ubuf(16, userbuf))
575 return -13; 577 return -13;
576 578
577 /* Counter0 is bits 1398 thru 1429 */ 579 /* Counter0 is bits 1398 to 1429 */
578 tmp64 = (userbuf[21] << 22) & 0x00000000ffc00000; 580 tmp64 = (userbuf[21] << 22) & 0x00000000ffc00000;
579 tmp64 |= (userbuf[22] >> 42) & 0x00000000003fffff; 581 tmp64 |= (userbuf[22] >> 42) & 0x00000000003fffff;
580 /* OR sticky0 (bit 1430) to counter0 bit 32 */ 582 /* OR sticky0 (bit 1430) to counter0 bit 32 */
581 tmp64 |= (userbuf[22] >> 10) & 0x0000000080000000; 583 tmp64 |= (userbuf[22] >> 10) & 0x0000000080000000;
582 raddr[0] = (uint32_t)tmp64; 584 raddr[0] = (uint32_t)tmp64;
583 585
584 /* Counter1 is bits 1431 thru 1462 */ 586 /* Counter1 is bits 1431 to 1462 */
585 tmp64 = (userbuf[22] >> 9) & 0x00000000ffffffff; 587 tmp64 = (userbuf[22] >> 9) & 0x00000000ffffffff;
586 /* OR sticky1 (bit 1463) to counter1 bit 32 */ 588 /* OR sticky1 (bit 1463) to counter1 bit 32 */
587 tmp64 |= (userbuf[22] << 23) & 0x0000000080000000; 589 tmp64 |= (userbuf[22] << 23) & 0x0000000080000000;
588 raddr[1] = (uint32_t)tmp64; 590 raddr[1] = (uint32_t)tmp64;
589 591
590 /* Counter2 is bits 1464 thru 1495 */ 592 /* Counter2 is bits 1464 to 1495 */
591 tmp64 = (userbuf[22] << 24) & 0x00000000ff000000; 593 tmp64 = (userbuf[22] << 24) & 0x00000000ff000000;
592 tmp64 |= (userbuf[23] >> 40) & 0x0000000000ffffff; 594 tmp64 |= (userbuf[23] >> 40) & 0x0000000000ffffff;
593 /* OR sticky2 (bit 1496) to counter2 bit 32 */ 595 /* OR sticky2 (bit 1496) to counter2 bit 32 */
594 tmp64 |= (userbuf[23] >> 8) & 0x0000000080000000; 596 tmp64 |= (userbuf[23] >> 8) & 0x0000000080000000;
595 raddr[2] = (uint32_t)tmp64; 597 raddr[2] = (uint32_t)tmp64;
596 598
597 /* Counter3 is bits 1497 thru 1528 */ 599 /* Counter3 is bits 1497 to 1528 */
598 tmp64 = (userbuf[23] >> 7) & 0x00000000ffffffff; 600 tmp64 = (userbuf[23] >> 7) & 0x00000000ffffffff;
599 /* OR sticky3 (bit 1529) to counter3 bit 32 */ 601 /* OR sticky3 (bit 1529) to counter3 bit 32 */
600 tmp64 |= (userbuf[23] << 25) & 0x0000000080000000; 602 tmp64 |= (userbuf[23] << 25) & 0x0000000080000000;
@@ -616,7 +618,7 @@ static int perf_stop_counters(uint32_t *raddr)
616 userbuf[23] = 0; 618 userbuf[23] = 0;
617 619
618 /* 620 /*
619 * Write back the zero'ed bytes + the image given 621 * Write back the zeroed bytes + the image given
620 * the read was destructive. 622 * the read was destructive.
621 */ 623 */
622 perf_rdr_write(16, userbuf); 624 perf_rdr_write(16, userbuf);
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
index 0dd3847f494c..355664812b83 100644
--- a/arch/parisc/kernel/process.c
+++ b/arch/parisc/kernel/process.c
@@ -381,6 +381,10 @@ get_wchan(struct task_struct *p)
381 struct unwind_frame_info info; 381 struct unwind_frame_info info;
382 unsigned long ip; 382 unsigned long ip;
383 int count = 0; 383 int count = 0;
384
385 if (!p || p == current || p->state == TASK_RUNNING)
386 return 0;
387
384 /* 388 /*
385 * These bracket the sleeping functions.. 389 * These bracket the sleeping functions..
386 */ 390 */
diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c
index 566226d78bc9..549f5484342c 100644
--- a/arch/parisc/kernel/processor.c
+++ b/arch/parisc/kernel/processor.c
@@ -63,7 +63,7 @@ extern int update_cr16_clocksource(void); /* from time.c */
63** will call register_parisc_driver(&cpu_driver) before calling do_inventory(). 63** will call register_parisc_driver(&cpu_driver) before calling do_inventory().
64** 64**
65** The goal of consolidating CPU initialization into one place is 65** The goal of consolidating CPU initialization into one place is
66** to make sure all CPU's get initialized the same way. 66** to make sure all CPUs get initialized the same way.
67** The code path not shared is how PDC hands control of the CPU to the OS. 67** The code path not shared is how PDC hands control of the CPU to the OS.
68** The initialization of OS data structures is the same (done below). 68** The initialization of OS data structures is the same (done below).
69*/ 69*/
@@ -76,7 +76,7 @@ extern int update_cr16_clocksource(void); /* from time.c */
76 * (return 1). If so, initialize the chip and tell other partners in crime 76 * (return 1). If so, initialize the chip and tell other partners in crime
77 * they have work to do. 77 * they have work to do.
78 */ 78 */
79static int __init processor_probe(struct parisc_device *dev) 79static int __cpuinit processor_probe(struct parisc_device *dev)
80{ 80{
81 unsigned long txn_addr; 81 unsigned long txn_addr;
82 unsigned long cpuid; 82 unsigned long cpuid;
@@ -166,7 +166,7 @@ static int __init processor_probe(struct parisc_device *dev)
166#endif 166#endif
167 167
168 /* 168 /*
169 ** CONFIG_SMP: init_smp_config() will attempt to get CPU's into 169 ** CONFIG_SMP: init_smp_config() will attempt to get CPUs into
170 ** OS control. RENDEZVOUS is the default state - see mem_set above. 170 ** OS control. RENDEZVOUS is the default state - see mem_set above.
171 ** p->state = STATE_RENDEZVOUS; 171 ** p->state = STATE_RENDEZVOUS;
172 */ 172 */
@@ -334,7 +334,7 @@ int __init init_per_cpu(int cpunum)
334} 334}
335 335
336/* 336/*
337 * Display cpu info for all cpu's. 337 * Display CPU info for all CPUs.
338 */ 338 */
339int 339int
340show_cpuinfo (struct seq_file *m, void *v) 340show_cpuinfo (struct seq_file *m, void *v)
@@ -381,19 +381,19 @@ show_cpuinfo (struct seq_file *m, void *v)
381 return 0; 381 return 0;
382} 382}
383 383
384static struct parisc_device_id processor_tbl[] __read_mostly = { 384static const struct parisc_device_id processor_tbl[] = {
385 { HPHW_NPROC, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, SVERSION_ANY_ID }, 385 { HPHW_NPROC, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, SVERSION_ANY_ID },
386 { 0, } 386 { 0, }
387}; 387};
388 388
389static struct parisc_driver cpu_driver __read_mostly = { 389static struct parisc_driver cpu_driver = {
390 .name = "CPU", 390 .name = "CPU",
391 .id_table = processor_tbl, 391 .id_table = processor_tbl,
392 .probe = processor_probe 392 .probe = processor_probe
393}; 393};
394 394
395/** 395/**
396 * processor_init - Processor initalization procedure. 396 * processor_init - Processor initialization procedure.
397 * 397 *
398 * Register this driver. 398 * Register this driver.
399 */ 399 */
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c
index 9818919571fd..c44b8c51f5d1 100644
--- a/arch/parisc/kernel/setup.c
+++ b/arch/parisc/kernel/setup.c
@@ -45,7 +45,7 @@
45#include <asm/io.h> 45#include <asm/io.h>
46#include <asm/setup.h> 46#include <asm/setup.h>
47 47
48char __initdata command_line[COMMAND_LINE_SIZE]; 48static char __initdata command_line[COMMAND_LINE_SIZE];
49 49
50/* Intended for ccio/sba/cpu statistics under /proc/bus/{runway|gsc} */ 50/* Intended for ccio/sba/cpu statistics under /proc/bus/{runway|gsc} */
51struct proc_dir_entry * proc_runway_root __read_mostly = NULL; 51struct proc_dir_entry * proc_runway_root __read_mostly = NULL;
@@ -162,7 +162,7 @@ void __init setup_arch(char **cmdline_p)
162} 162}
163 163
164/* 164/*
165 * Display cpu info for all cpu's. 165 * Display CPU info for all CPUs.
166 * for parisc this is in processor.c 166 * for parisc this is in processor.c
167 */ 167 */
168extern int show_cpuinfo (struct seq_file *m, void *v); 168extern int show_cpuinfo (struct seq_file *m, void *v);
@@ -225,6 +225,7 @@ static void __init parisc_proc_mkdir(void)
225 } 225 }
226 break; 226 break;
227 case mako: 227 case mako:
228 case mako2:
228 if (NULL == proc_mckinley_root) 229 if (NULL == proc_mckinley_root)
229 { 230 {
230 proc_mckinley_root = proc_mkdir("bus/mckinley", NULL); 231 proc_mckinley_root = proc_mkdir("bus/mckinley", NULL);
diff --git a/arch/parisc/kernel/signal32.h b/arch/parisc/kernel/signal32.h
index e39b38a67a87..c7800846422c 100644
--- a/arch/parisc/kernel/signal32.h
+++ b/arch/parisc/kernel/signal32.h
@@ -113,7 +113,7 @@ int copy_siginfo_from_user32 (siginfo_t *to, compat_siginfo_t __user *from);
113/* In a deft move of uber-hackery, we decide to carry the top half of all 113/* In a deft move of uber-hackery, we decide to carry the top half of all
114 * 64-bit registers in a non-portable, non-ABI, hidden structure. 114 * 64-bit registers in a non-portable, non-ABI, hidden structure.
115 * Userspace can read the hidden structure if it *wants* but is never 115 * Userspace can read the hidden structure if it *wants* but is never
116 * guaranteed to be in the same place. Infact the uc_sigmask from the 116 * guaranteed to be in the same place. In fact the uc_sigmask from the
117 * ucontext_t structure may push the hidden register file downards 117 * ucontext_t structure may push the hidden register file downards
118 */ 118 */
119struct compat_regfile { 119struct compat_regfile {
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
index 6ba9257fdb7f..04c7e1d36cea 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -8,7 +8,7 @@
8** Lots of stuff stolen from arch/alpha/kernel/smp.c 8** Lots of stuff stolen from arch/alpha/kernel/smp.c
9** ...and then parisc stole from arch/ia64/kernel/smp.c. Thanks David! :^) 9** ...and then parisc stole from arch/ia64/kernel/smp.c. Thanks David! :^)
10** 10**
11** Thanks to John Curry and Ullas Ponnadi. I learned alot from their work. 11** Thanks to John Curry and Ullas Ponnadi. I learned a lot from their work.
12** -grant (1/12/2001) 12** -grant (1/12/2001)
13** 13**
14** This program is free software; you can redistribute it and/or modify 14** This program is free software; you can redistribute it and/or modify
@@ -419,7 +419,7 @@ smp_cpu_init(int cpunum)
419 BUG(); 419 BUG();
420 enter_lazy_tlb(&init_mm, current); 420 enter_lazy_tlb(&init_mm, current);
421 421
422 init_IRQ(); /* make sure no IRQ's are enabled or pending */ 422 init_IRQ(); /* make sure no IRQs are enabled or pending */
423 start_cpu_itimer(); 423 start_cpu_itimer();
424} 424}
425 425
@@ -461,7 +461,7 @@ void __init smp_callin(void)
461/* 461/*
462 * Bring one cpu online. 462 * Bring one cpu online.
463 */ 463 */
464int __init smp_boot_one_cpu(int cpuid) 464int __cpuinit smp_boot_one_cpu(int cpuid)
465{ 465{
466 struct task_struct *idle; 466 struct task_struct *idle;
467 long timeout; 467 long timeout;
@@ -552,7 +552,7 @@ void __devinit smp_prepare_boot_cpu(void)
552 552
553/* 553/*
554** inventory.c:do_inventory() hasn't yet been run and thus we 554** inventory.c:do_inventory() hasn't yet been run and thus we
555** don't 'discover' the additional CPU's until later. 555** don't 'discover' the additional CPUs until later.
556*/ 556*/
557void __init smp_prepare_cpus(unsigned int max_cpus) 557void __init smp_prepare_cpus(unsigned int max_cpus)
558{ 558{
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c
index ce3245f87fdd..bb23ff71c28e 100644
--- a/arch/parisc/kernel/sys_parisc32.c
+++ b/arch/parisc/kernel/sys_parisc32.c
@@ -311,14 +311,13 @@ struct readdir32_callback {
311 int count; 311 int count;
312}; 312};
313 313
314#define ROUND_UP(x,a) ((__typeof__(x))(((unsigned long)(x) + ((a) - 1)) & ~((a) - 1)))
315#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de))) 314#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))
316static int filldir32 (void *__buf, const char *name, int namlen, 315static int filldir32 (void *__buf, const char *name, int namlen,
317 loff_t offset, u64 ino, unsigned int d_type) 316 loff_t offset, u64 ino, unsigned int d_type)
318{ 317{
319 struct linux32_dirent __user * dirent; 318 struct linux32_dirent __user * dirent;
320 struct getdents32_callback * buf = (struct getdents32_callback *) __buf; 319 struct getdents32_callback * buf = (struct getdents32_callback *) __buf;
321 int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1, 4); 320 int reclen = ALIGN(NAME_OFFSET(dirent) + namlen + 1, 4);
322 u32 d_ino; 321 u32 d_ino;
323 322
324 buf->error = -EINVAL; /* only used if we fail.. */ 323 buf->error = -EINVAL; /* only used if we fail.. */
@@ -350,6 +349,10 @@ sys32_getdents (unsigned int fd, void __user * dirent, unsigned int count)
350 struct getdents32_callback buf; 349 struct getdents32_callback buf;
351 int error; 350 int error;
352 351
352 error = -EFAULT;
353 if (!access_ok(VERIFY_WRITE, dirent, count))
354 goto out;
355
353 error = -EBADF; 356 error = -EBADF;
354 file = fget(fd); 357 file = fget(fd);
355 if (!file) 358 if (!file)
@@ -366,8 +369,10 @@ sys32_getdents (unsigned int fd, void __user * dirent, unsigned int count)
366 error = buf.error; 369 error = buf.error;
367 lastdirent = buf.previous; 370 lastdirent = buf.previous;
368 if (lastdirent) { 371 if (lastdirent) {
369 put_user(file->f_pos, &lastdirent->d_off); 372 if (put_user(file->f_pos, &lastdirent->d_off))
370 error = count - buf.count; 373 error = -EFAULT;
374 else
375 error = count - buf.count;
371 } 376 }
372 377
373out_putf: 378out_putf:
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
index 10859f53e94f..56f6231cb863 100644
--- a/arch/parisc/kernel/syscall.S
+++ b/arch/parisc/kernel/syscall.S
@@ -181,7 +181,7 @@ linux_gateway_entry:
181 /* Are we being ptraced? */ 181 /* Are we being ptraced? */
182 mfctl %cr30, %r1 182 mfctl %cr30, %r1
183 LDREG TI_TASK(%r1),%r1 183 LDREG TI_TASK(%r1),%r1
184 LDREG TASK_PTRACE(%r1), %r1 184 ldw TASK_PTRACE(%r1), %r1
185 bb,<,n %r1,31,.Ltracesys 185 bb,<,n %r1,31,.Ltracesys
186 186
187 /* Note! We cannot use the syscall table that is mapped 187 /* Note! We cannot use the syscall table that is mapped
@@ -198,7 +198,7 @@ linux_gateway_entry:
198 ldil L%sys_call_table, %r1 198 ldil L%sys_call_table, %r1
199 ldo R%sys_call_table(%r1), %r19 199 ldo R%sys_call_table(%r1), %r19
200#endif 200#endif
201 comiclr,>>= __NR_Linux_syscalls, %r20, %r0 201 comiclr,>> __NR_Linux_syscalls, %r20, %r0
202 b,n .Lsyscall_nosys 202 b,n .Lsyscall_nosys
203 203
204 LDREGX %r20(%r19), %r19 204 LDREGX %r20(%r19), %r19
@@ -501,7 +501,7 @@ lws_compare_and_swap:
501 shlw %r20, 4, %r20 501 shlw %r20, 4, %r20
502 add %r20, %r28, %r20 502 add %r20, %r28, %r20
503 503
504# ifdef ENABLE_LWS_DEBUG 504# if ENABLE_LWS_DEBUG
505 /* 505 /*
506 DEBUG, check for deadlock! 506 DEBUG, check for deadlock!
507 If the thread register values are the same 507 If the thread register values are the same
@@ -550,7 +550,7 @@ cas_wouldblock:
550 perspective 550 perspective
551 */ 551 */
552cas_action: 552cas_action:
553#if defined CONFIG_SMP && defined ENABLE_LWS_DEBUG 553#if defined CONFIG_SMP && ENABLE_LWS_DEBUG
554 /* DEBUG */ 554 /* DEBUG */
555 mfctl %cr27, %r1 555 mfctl %cr27, %r1
556 stw %r1, 4(%sr2,%r20) 556 stw %r1, 4(%sr2,%r20)
@@ -562,7 +562,7 @@ cas_action:
562#ifdef CONFIG_SMP 562#ifdef CONFIG_SMP
563 /* Free lock */ 563 /* Free lock */
564 stw %r20, 0(%sr2,%r20) 564 stw %r20, 0(%sr2,%r20)
565# ifdef ENABLE_LWS_DEBUG 565# if ENABLE_LWS_DEBUG
566 /* Clear thread register indicator */ 566 /* Clear thread register indicator */
567 stw %r0, 4(%sr2,%r20) 567 stw %r0, 4(%sr2,%r20)
568# endif 568# endif
@@ -576,7 +576,7 @@ cas_action:
576#ifdef CONFIG_SMP 576#ifdef CONFIG_SMP
577 /* Free lock */ 577 /* Free lock */
578 stw %r20, 0(%sr2,%r20) 578 stw %r20, 0(%sr2,%r20)
579# ifdef ENABLE_LWS_DEBUG 579# if ENABLE_LWS_DEBUG
580 stw %r0, 4(%sr2,%r20) 580 stw %r0, 4(%sr2,%r20)
581# endif 581# endif
582#endif 582#endif
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
index 8bf87e5d9c37..627f3c28ad8c 100644
--- a/arch/parisc/kernel/syscall_table.S
+++ b/arch/parisc/kernel/syscall_table.S
@@ -30,11 +30,6 @@
30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 */ 31 */
32 32
33#undef ENTRY_SAME
34#undef ENTRY_DIFF
35#undef ENTRY_UHOH
36#undef ENTRY_COMP
37#undef ENTRY_OURS
38#if defined(CONFIG_64BIT) && !defined(SYSCALL_TABLE_64BIT) 33#if defined(CONFIG_64BIT) && !defined(SYSCALL_TABLE_64BIT)
39/* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and 34/* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and
40 * narrow palinux. Use ENTRY_DIFF for those where a 32-bit specific 35 * narrow palinux. Use ENTRY_DIFF for those where a 32-bit specific
@@ -405,5 +400,16 @@
405 ENTRY_SAME(epoll_pwait) 400 ENTRY_SAME(epoll_pwait)
406 ENTRY_COMP(statfs64) 401 ENTRY_COMP(statfs64)
407 ENTRY_COMP(fstatfs64) 402 ENTRY_COMP(fstatfs64)
403 ENTRY_COMP(kexec_load) /* 300 */
404 ENTRY_COMP(utimensat)
405 ENTRY_COMP(signalfd)
406 ENTRY_COMP(timerfd)
407 ENTRY_SAME(eventfd)
408
408 /* Nothing yet */ 409 /* Nothing yet */
409 410
411#undef ENTRY_SAME
412#undef ENTRY_DIFF
413#undef ENTRY_UHOH
414#undef ENTRY_COMP
415#undef ENTRY_OURS
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c
index 07a991aa9b0c..8b3062a5c812 100644
--- a/arch/parisc/kernel/time.c
+++ b/arch/parisc/kernel/time.c
@@ -191,7 +191,7 @@ int update_cr16_clocksource(void)
191{ 191{
192 int change = 0; 192 int change = 0;
193 193
194 /* since the cr16 cycle counters are not syncronized across CPUs, 194 /* since the cr16 cycle counters are not synchronized across CPUs,
195 we'll check if we should switch to a safe clocksource: */ 195 we'll check if we should switch to a safe clocksource: */
196 if (clocksource_cr16.rating != 0 && num_online_cpus() > 1) { 196 if (clocksource_cr16.rating != 0 && num_online_cpus() > 1) {
197 clocksource_change_rating(&clocksource_cr16, 0); 197 clocksource_change_rating(&clocksource_cr16, 0);
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
index 745ff741490a..c3ec9f1ec0f3 100644
--- a/arch/parisc/kernel/traps.c
+++ b/arch/parisc/kernel/traps.c
@@ -615,7 +615,7 @@ void handle_interruption(int code, struct pt_regs *regs)
615 615
616 case 13: 616 case 13:
617 /* Conditional Trap 617 /* Conditional Trap
618 The condition succees in an instruction which traps 618 The condition succeeds in an instruction which traps
619 on condition */ 619 on condition */
620 if(user_mode(regs)){ 620 if(user_mode(regs)){
621 si.si_signo = SIGFPE; 621 si.si_signo = SIGFPE;
@@ -802,13 +802,14 @@ void handle_interruption(int code, struct pt_regs *regs)
802 802
803int __init check_ivt(void *iva) 803int __init check_ivt(void *iva)
804{ 804{
805 extern const u32 os_hpmc[];
806 extern const u32 os_hpmc_end[];
807
805 int i; 808 int i;
806 u32 check = 0; 809 u32 check = 0;
807 u32 *ivap; 810 u32 *ivap;
808 u32 *hpmcp; 811 u32 *hpmcp;
809 u32 length; 812 u32 length;
810 extern void os_hpmc(void);
811 extern void os_hpmc_end(void);
812 813
813 if (strcmp((char *)iva, "cows can fly")) 814 if (strcmp((char *)iva, "cows can fly"))
814 return -1; 815 return -1;
@@ -820,7 +821,7 @@ int __init check_ivt(void *iva)
820 821
821 /* Compute Checksum for HPMC handler */ 822 /* Compute Checksum for HPMC handler */
822 823
823 length = (u32)((unsigned long)os_hpmc_end - (unsigned long)os_hpmc); 824 length = os_hpmc_end - os_hpmc;
824 ivap[7] = length; 825 ivap[7] = length;
825 826
826 hpmcp = (u32 *)os_hpmc; 827 hpmcp = (u32 *)os_hpmc;
diff --git a/arch/parisc/kernel/unwind.c b/arch/parisc/kernel/unwind.c
index 89c03707eccc..e70f57e27643 100644
--- a/arch/parisc/kernel/unwind.c
+++ b/arch/parisc/kernel/unwind.c
@@ -216,8 +216,10 @@ static void unwind_frame_regs(struct unwind_frame_info *info)
216 /* Handle some frequent special cases.... */ 216 /* Handle some frequent special cases.... */
217 { 217 {
218 char symname[KSYM_NAME_LEN+1]; 218 char symname[KSYM_NAME_LEN+1];
219 char *modname;
219 220
220 kallsyms_lookup(info->ip, NULL, NULL, NULL, symname); 221 kallsyms_lookup(info->ip, NULL, NULL, &modname,
222 symname);
221 223
222 dbg("info->ip = 0x%lx, name = %s\n", info->ip, symname); 224 dbg("info->ip = 0x%lx, name = %s\n", info->ip, symname);
223 225
diff --git a/arch/parisc/math-emu/dbl_float.h b/arch/parisc/math-emu/dbl_float.h
index 1570e2e0a327..0c2fa9a951b3 100644
--- a/arch/parisc/math-emu/dbl_float.h
+++ b/arch/parisc/math-emu/dbl_float.h
@@ -22,7 +22,7 @@
22 PA header file -- do not include this header file for non-PA builds. 22 PA header file -- do not include this header file for non-PA builds.
23#endif 23#endif
24 24
25/* 32-bit word grabing functions */ 25/* 32-bit word grabbing functions */
26#define Dbl_firstword(value) Dallp1(value) 26#define Dbl_firstword(value) Dallp1(value)
27#define Dbl_secondword(value) Dallp2(value) 27#define Dbl_secondword(value) Dallp2(value)
28#define Dbl_thirdword(value) dummy_location 28#define Dbl_thirdword(value) dummy_location
@@ -37,7 +37,7 @@
37#define Dbl_allp1(object) Dallp1(object) 37#define Dbl_allp1(object) Dallp1(object)
38#define Dbl_allp2(object) Dallp2(object) 38#define Dbl_allp2(object) Dallp2(object)
39 39
40/* dbl_and_signs ands the sign bits of each argument and puts the result 40/* dbl_and_signs ANDs the sign bits of each argument and puts the result
41 * into the first argument. dbl_or_signs ors those same sign bits */ 41 * into the first argument. dbl_or_signs ors those same sign bits */
42#define Dbl_and_signs( src1dst, src2) \ 42#define Dbl_and_signs( src1dst, src2) \
43 Dallp1(src1dst) = (Dallp1(src2)|~((unsigned int)1<<31)) & Dallp1(src1dst) 43 Dallp1(src1dst) = (Dallp1(src2)|~((unsigned int)1<<31)) & Dallp1(src1dst)
diff --git a/arch/parisc/math-emu/dfsqrt.c b/arch/parisc/math-emu/dfsqrt.c
index b6ed1066f1e4..9542c6d281a5 100644
--- a/arch/parisc/math-emu/dfsqrt.c
+++ b/arch/parisc/math-emu/dfsqrt.c
@@ -76,7 +76,7 @@ dbl_fsqrt(
76 } 76 }
77 /* 77 /*
78 * Return quiet NaN or positive infinity. 78 * Return quiet NaN or positive infinity.
79 * Fall thru to negative test if negative infinity. 79 * Fall through to negative test if negative infinity.
80 */ 80 */
81 if (Dbl_iszero_sign(srcp1) || 81 if (Dbl_iszero_sign(srcp1) ||
82 Dbl_isnotzero_mantissa(srcp1,srcp2)) { 82 Dbl_isnotzero_mantissa(srcp1,srcp2)) {
diff --git a/arch/parisc/math-emu/sfsqrt.c b/arch/parisc/math-emu/sfsqrt.c
index cd3f6db1f6fb..4657a12c9107 100644
--- a/arch/parisc/math-emu/sfsqrt.c
+++ b/arch/parisc/math-emu/sfsqrt.c
@@ -76,7 +76,7 @@ sgl_fsqrt(
76 } 76 }
77 /* 77 /*
78 * Return quiet NaN or positive infinity. 78 * Return quiet NaN or positive infinity.
79 * Fall thru to negative test if negative infinity. 79 * Fall through to negative test if negative infinity.
80 */ 80 */
81 if (Sgl_iszero_sign(src) || Sgl_isnotzero_mantissa(src)) { 81 if (Sgl_iszero_sign(src) || Sgl_isnotzero_mantissa(src)) {
82 *dstptr = src; 82 *dstptr = src;
diff --git a/arch/parisc/math-emu/sgl_float.h b/arch/parisc/math-emu/sgl_float.h
index 82519a5c2ba5..4ee4cc95e4bf 100644
--- a/arch/parisc/math-emu/sgl_float.h
+++ b/arch/parisc/math-emu/sgl_float.h
@@ -23,7 +23,7 @@
23 PA header file -- do not include this header file for non-PA builds. 23 PA header file -- do not include this header file for non-PA builds.
24#endif 24#endif
25 25
26/* 32-bit word grabing functions */ 26/* 32-bit word grabbing functions */
27#define Sgl_firstword(value) Sall(value) 27#define Sgl_firstword(value) Sall(value)
28#define Sgl_secondword(value) dummy_location 28#define Sgl_secondword(value) dummy_location
29#define Sgl_thirdword(value) dummy_location 29#define Sgl_thirdword(value) dummy_location
@@ -36,7 +36,7 @@
36#define Sgl_exponentmantissa(object) Sexponentmantissa(object) 36#define Sgl_exponentmantissa(object) Sexponentmantissa(object)
37#define Sgl_all(object) Sall(object) 37#define Sgl_all(object) Sall(object)
38 38
39/* sgl_and_signs ands the sign bits of each argument and puts the result 39/* sgl_and_signs ANDs the sign bits of each argument and puts the result
40 * into the first argument. sgl_or_signs ors those same sign bits */ 40 * into the first argument. sgl_or_signs ors those same sign bits */
41#define Sgl_and_signs( src1dst, src2) \ 41#define Sgl_and_signs( src1dst, src2) \
42 Sall(src1dst) = (Sall(src2)|~((unsigned int)1<<31)) & Sall(src1dst) 42 Sall(src1dst) = (Sall(src2)|~((unsigned int)1<<31)) & Sall(src1dst)
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 75ea9f2a8a41..e724b362c49a 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -890,7 +890,7 @@ void __init paging_init(void)
890#ifdef CONFIG_PA20 890#ifdef CONFIG_PA20
891 891
892/* 892/*
893 * Currently, all PA20 chips have 18 bit protection id's, which is the 893 * Currently, all PA20 chips have 18 bit protection IDs, which is the
894 * limiting factor (space ids are 32 bits). 894 * limiting factor (space ids are 32 bits).
895 */ 895 */
896 896
@@ -899,10 +899,10 @@ void __init paging_init(void)
899#else 899#else
900 900
901/* 901/*
902 * Currently we have a one-to-one relationship between space id's and 902 * Currently we have a one-to-one relationship between space IDs and
903 * protection id's. Older parisc chips (PCXS, PCXT, PCXL, PCXL2) only 903 * protection IDs. Older parisc chips (PCXS, PCXT, PCXL, PCXL2) only
904 * support 15 bit protection id's, so that is the limiting factor. 904 * support 15 bit protection IDs, so that is the limiting factor.
905 * PCXT' has 18 bit protection id's, but only 16 bit spaceids, so it's 905 * PCXT' has 18 bit protection IDs, but only 16 bit spaceids, so it's
906 * probably not worth the effort for a special case here. 906 * probably not worth the effort for a special case here.
907 */ 907 */
908 908