diff options
38 files changed, 221 insertions, 219 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 | ||
74 | static int filldir(void * __buf, const char * name, int namlen, loff_t offset, | 74 | static 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 | ||
107 | int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count) | 106 | int 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 | |||
972 | intr_check_resched: | 957 | intr_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 | ||
2058 | syscall_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 | |||
2076 | syscall_check_resched: | 2042 | syscall_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 |
2249 | ENDPROC(syscall_exit) | 2215 | ENDPROC(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 | ||
41 | static struct hp_hardware hp_hardware_list[] __initdata = { | 41 | static 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 | ||
1302 | char *cpu_name_version[][2] = { | 1303 | const 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 | ||
1317 | const char * __init | 1319 | const char * __devinit |
1318 | parisc_hardware_description(struct parisc_device_id *id) | 1320 | parisc_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) */ |
1356 | enum cpu_type __init | 1358 | enum cpu_type __cpuinit |
1357 | parisc_get_cpu_type(unsigned long hversion) | 1359 | parisc_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 |
297 | ENDPROC(os_hpmc) | 297 | ENDPROC(os_hpmc) |
298 | 298 | ENTRY(os_hpmc_end) /* this label used to compute os_hpmc checksum */ | |
299 | /* this label used to compute os_hpmc checksum */ | ||
300 | ENTRY(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 *); | |||
46 | static volatile unsigned long cpu_eiem = 0; | 46 | static 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 | */ |
53 | static volatile unsigned long global_ack_eiem = ~0UL; | ||
54 | /* | ||
55 | ** Local bitmap, same as above but for per-cpu interrupts | ||
56 | */ | ||
57 | static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL; | 53 | static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL; |
58 | 54 | ||
59 | static void cpu_disable_irq(unsigned int irq) | 55 | static 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 | ||
36 | static struct proc_dir_entry * proc_gsc_root __read_mostly = NULL; | 37 | static struct proc_dir_entry * proc_gsc_root __read_mostly = NULL; |
37 | static int pcxl_proc_info(char *buffer, char **start, off_t offset, int length); | ||
38 | static unsigned long pcxl_used_bytes __read_mostly = 0; | 38 | static unsigned long pcxl_used_bytes __read_mostly = 0; |
39 | static unsigned long pcxl_used_pages __read_mostly = 0; | 39 | static 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 | ||
333 | static 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 | |||
368 | static int proc_pcxl_dma_open(struct inode *inode, struct file *file) | ||
369 | { | ||
370 | return single_open(file, proc_pcxl_dma_show, NULL); | ||
371 | } | ||
372 | |||
373 | static 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 | |||
333 | static int __init | 381 | static int __init |
334 | pcxl_dma_init(void) | 382 | pcxl_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 | |||
556 | static 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 | */ |
176 | static const uint64_t perf_bitmasks_piranha[] = { | 176 | static 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 | */ |
79 | static int __init processor_probe(struct parisc_device *dev) | 79 | static 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 | */ |
339 | int | 339 | int |
340 | show_cpuinfo (struct seq_file *m, void *v) | 340 | show_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 | ||
384 | static struct parisc_device_id processor_tbl[] __read_mostly = { | 384 | static 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 | ||
389 | static struct parisc_driver cpu_driver __read_mostly = { | 389 | static 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 | ||
48 | char __initdata command_line[COMMAND_LINE_SIZE]; | 48 | static 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} */ |
51 | struct proc_dir_entry * proc_runway_root __read_mostly = NULL; | 51 | struct 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 | */ |
168 | extern int show_cpuinfo (struct seq_file *m, void *v); | 168 | extern 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 | */ |
119 | struct compat_regfile { | 119 | struct 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 | */ |
464 | int __init smp_boot_one_cpu(int cpuid) | 464 | int __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 | */ |
557 | void __init smp_prepare_cpus(unsigned int max_cpus) | 557 | void __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))) |
316 | static int filldir32 (void *__buf, const char *name, int namlen, | 315 | static 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 | ||
373 | out_putf: | 378 | out_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 | */ |
552 | cas_action: | 552 | cas_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 | ||
803 | int __init check_ivt(void *iva) | 803 | int __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 | ||
diff --git a/drivers/net/lasi_82596.c b/drivers/net/lasi_82596.c index 6b49fc4bd1a1..741780e14b2c 100644 --- a/drivers/net/lasi_82596.c +++ b/drivers/net/lasi_82596.c | |||
@@ -83,6 +83,7 @@ | |||
83 | #include <linux/init.h> | 83 | #include <linux/init.h> |
84 | #include <linux/types.h> | 84 | #include <linux/types.h> |
85 | #include <linux/bitops.h> | 85 | #include <linux/bitops.h> |
86 | #include <linux/dma-mapping.h> | ||
86 | 87 | ||
87 | #include <asm/io.h> | 88 | #include <asm/io.h> |
88 | #include <asm/pgtable.h> | 89 | #include <asm/pgtable.h> |
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index 894fdb9d44c0..b3c4dbff26b8 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/types.h> | 34 | #include <linux/types.h> |
35 | #include <linux/kernel.h> | ||
35 | #include <linux/init.h> | 36 | #include <linux/init.h> |
36 | #include <linux/mm.h> | 37 | #include <linux/mm.h> |
37 | #include <linux/spinlock.h> | 38 | #include <linux/spinlock.h> |
@@ -292,7 +293,6 @@ static int ioc_count; | |||
292 | #define PDIR_INDEX(iovp) ((iovp)>>IOVP_SHIFT) | 293 | #define PDIR_INDEX(iovp) ((iovp)>>IOVP_SHIFT) |
293 | #define MKIOVP(pdir_idx) ((long)(pdir_idx) << IOVP_SHIFT) | 294 | #define MKIOVP(pdir_idx) ((long)(pdir_idx) << IOVP_SHIFT) |
294 | #define MKIOVA(iovp,offset) (dma_addr_t)((long)iovp | (long)offset) | 295 | #define MKIOVA(iovp,offset) (dma_addr_t)((long)iovp | (long)offset) |
295 | #define ROUNDUP(x,y) ((x + ((y)-1)) & ~((y)-1)) | ||
296 | 296 | ||
297 | /* | 297 | /* |
298 | ** Don't worry about the 150% average search length on a miss. | 298 | ** Don't worry about the 150% average search length on a miss. |
@@ -668,7 +668,7 @@ ccio_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt) | |||
668 | size_t saved_byte_cnt; | 668 | size_t saved_byte_cnt; |
669 | 669 | ||
670 | /* round up to nearest page size */ | 670 | /* round up to nearest page size */ |
671 | saved_byte_cnt = byte_cnt = ROUNDUP(byte_cnt, IOVP_SIZE); | 671 | saved_byte_cnt = byte_cnt = ALIGN(byte_cnt, IOVP_SIZE); |
672 | 672 | ||
673 | while(byte_cnt > 0) { | 673 | while(byte_cnt > 0) { |
674 | /* invalidate one page at a time */ | 674 | /* invalidate one page at a time */ |
@@ -751,7 +751,7 @@ ccio_map_single(struct device *dev, void *addr, size_t size, | |||
751 | offset = ((unsigned long) addr) & ~IOVP_MASK; | 751 | offset = ((unsigned long) addr) & ~IOVP_MASK; |
752 | 752 | ||
753 | /* round up to nearest IOVP_SIZE */ | 753 | /* round up to nearest IOVP_SIZE */ |
754 | size = ROUNDUP(size + offset, IOVP_SIZE); | 754 | size = ALIGN(size + offset, IOVP_SIZE); |
755 | spin_lock_irqsave(&ioc->res_lock, flags); | 755 | spin_lock_irqsave(&ioc->res_lock, flags); |
756 | 756 | ||
757 | #ifdef CCIO_MAP_STATS | 757 | #ifdef CCIO_MAP_STATS |
@@ -814,7 +814,7 @@ ccio_unmap_single(struct device *dev, dma_addr_t iova, size_t size, | |||
814 | 814 | ||
815 | iova ^= offset; /* clear offset bits */ | 815 | iova ^= offset; /* clear offset bits */ |
816 | size += offset; | 816 | size += offset; |
817 | size = ROUNDUP(size, IOVP_SIZE); | 817 | size = ALIGN(size, IOVP_SIZE); |
818 | 818 | ||
819 | spin_lock_irqsave(&ioc->res_lock, flags); | 819 | spin_lock_irqsave(&ioc->res_lock, flags); |
820 | 820 | ||
@@ -1227,7 +1227,7 @@ ccio_get_iotlb_size(struct parisc_device *dev) | |||
1227 | #endif /* 0 */ | 1227 | #endif /* 0 */ |
1228 | 1228 | ||
1229 | /* We *can't* support JAVA (T600). Venture there at your own risk. */ | 1229 | /* We *can't* support JAVA (T600). Venture there at your own risk. */ |
1230 | static struct parisc_device_id ccio_tbl[] = { | 1230 | static const struct parisc_device_id ccio_tbl[] = { |
1231 | { HPHW_IOA, HVERSION_REV_ANY_ID, U2_IOA_RUNWAY, 0xb }, /* U2 */ | 1231 | { HPHW_IOA, HVERSION_REV_ANY_ID, U2_IOA_RUNWAY, 0xb }, /* U2 */ |
1232 | { HPHW_IOA, HVERSION_REV_ANY_ID, UTURN_IOA_RUNWAY, 0xb }, /* UTurn */ | 1232 | { HPHW_IOA, HVERSION_REV_ANY_ID, UTURN_IOA_RUNWAY, 0xb }, /* UTurn */ |
1233 | { 0, } | 1233 | { 0, } |
@@ -1370,7 +1370,7 @@ ccio_ioc_init(struct ioc *ioc) | |||
1370 | } | 1370 | } |
1371 | } | 1371 | } |
1372 | 1372 | ||
1373 | static void | 1373 | static void __init |
1374 | ccio_init_resource(struct resource *res, char *name, void __iomem *ioaddr) | 1374 | ccio_init_resource(struct resource *res, char *name, void __iomem *ioaddr) |
1375 | { | 1375 | { |
1376 | int result; | 1376 | int result; |
@@ -1537,7 +1537,7 @@ int ccio_request_resource(const struct parisc_device *dev, | |||
1537 | * If so, initialize the chip and tell other partners in crime they | 1537 | * If so, initialize the chip and tell other partners in crime they |
1538 | * have work to do. | 1538 | * have work to do. |
1539 | */ | 1539 | */ |
1540 | static int ccio_probe(struct parisc_device *dev) | 1540 | static int __init ccio_probe(struct parisc_device *dev) |
1541 | { | 1541 | { |
1542 | int i; | 1542 | int i; |
1543 | struct ioc *ioc, **ioc_p = &ioc_list; | 1543 | struct ioc *ioc, **ioc_p = &ioc_list; |
diff --git a/drivers/parisc/eisa.c b/drivers/parisc/eisa.c index 309076b39853..771cef592542 100644 --- a/drivers/parisc/eisa.c +++ b/drivers/parisc/eisa.c | |||
@@ -307,7 +307,7 @@ static void init_eisa_pic(void) | |||
307 | 307 | ||
308 | #define is_mongoose(dev) (dev->id.sversion == 0x00076) | 308 | #define is_mongoose(dev) (dev->id.sversion == 0x00076) |
309 | 309 | ||
310 | static int __devinit eisa_probe(struct parisc_device *dev) | 310 | static int __init eisa_probe(struct parisc_device *dev) |
311 | { | 311 | { |
312 | int i, result; | 312 | int i, result; |
313 | 313 | ||
@@ -387,7 +387,7 @@ static int __devinit eisa_probe(struct parisc_device *dev) | |||
387 | return 0; | 387 | return 0; |
388 | } | 388 | } |
389 | 389 | ||
390 | static struct parisc_device_id eisa_tbl[] = { | 390 | static const struct parisc_device_id eisa_tbl[] = { |
391 | { HPHW_BA, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00076 }, /* Mongoose */ | 391 | { HPHW_BA, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00076 }, /* Mongoose */ |
392 | { HPHW_BA, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00090 }, /* Wax EISA */ | 392 | { HPHW_BA, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00090 }, /* Wax EISA */ |
393 | { 0, } | 393 | { 0, } |
diff --git a/drivers/parisc/iommu-helpers.h b/drivers/parisc/iommu-helpers.h index 38d9e1aba1d0..0a1f99a2e93e 100644 --- a/drivers/parisc/iommu-helpers.h +++ b/drivers/parisc/iommu-helpers.h | |||
@@ -138,7 +138,7 @@ iommu_coalesce_chunks(struct ioc *ioc, struct scatterlist *startsg, int nents, | |||
138 | ** exceed DMA_CHUNK_SIZE if we coalesce the | 138 | ** exceed DMA_CHUNK_SIZE if we coalesce the |
139 | ** next entry. | 139 | ** next entry. |
140 | */ | 140 | */ |
141 | if(unlikely(ROUNDUP(dma_len + dma_offset + startsg->length, | 141 | if(unlikely(ALIGN(dma_len + dma_offset + startsg->length, |
142 | IOVP_SIZE) > DMA_CHUNK_SIZE)) | 142 | IOVP_SIZE) > DMA_CHUNK_SIZE)) |
143 | break; | 143 | break; |
144 | 144 | ||
@@ -158,7 +158,7 @@ iommu_coalesce_chunks(struct ioc *ioc, struct scatterlist *startsg, int nents, | |||
158 | ** Allocate space for DMA stream. | 158 | ** Allocate space for DMA stream. |
159 | */ | 159 | */ |
160 | sg_dma_len(contig_sg) = dma_len; | 160 | sg_dma_len(contig_sg) = dma_len; |
161 | dma_len = ROUNDUP(dma_len + dma_offset, IOVP_SIZE); | 161 | dma_len = ALIGN(dma_len + dma_offset, IOVP_SIZE); |
162 | sg_dma_address(contig_sg) = | 162 | sg_dma_address(contig_sg) = |
163 | PIDE_FLAG | 163 | PIDE_FLAG |
164 | | (iommu_alloc_range(ioc, dma_len) << IOVP_SHIFT) | 164 | | (iommu_alloc_range(ioc, dma_len) << IOVP_SHIFT) |
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c index 815e445c3125..924ef0609460 100644 --- a/drivers/parisc/pdc_stable.c +++ b/drivers/parisc/pdc_stable.c | |||
@@ -1067,7 +1067,7 @@ pdc_stable_init(void) | |||
1067 | error = subsys_create_file(&stable_subsys, attr); | 1067 | error = subsys_create_file(&stable_subsys, attr); |
1068 | 1068 | ||
1069 | /* register the paths subsys as a subsystem of stable subsys */ | 1069 | /* register the paths subsys as a subsystem of stable subsys */ |
1070 | kset_set_kset_s(&paths_subsys, stable_subsys); | 1070 | kobj_set_kset_s(&paths_subsys, stable_subsys); |
1071 | if ((rc = subsystem_register(&paths_subsys))) | 1071 | if ((rc = subsystem_register(&paths_subsys))) |
1072 | goto fail_subsysreg; | 1072 | goto fail_subsysreg; |
1073 | 1073 | ||
diff --git a/drivers/parisc/power.c b/drivers/parisc/power.c index 6dedbdef7106..90cca5e3805f 100644 --- a/drivers/parisc/power.c +++ b/drivers/parisc/power.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/reboot.h> | 41 | #include <linux/reboot.h> |
42 | #include <linux/sched.h> | 42 | #include <linux/sched.h> |
43 | #include <linux/kthread.h> | 43 | #include <linux/kthread.h> |
44 | #include <linux/pm.h> | ||
44 | 45 | ||
45 | #include <asm/pdc.h> | 46 | #include <asm/pdc.h> |
46 | #include <asm/io.h> | 47 | #include <asm/io.h> |
diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c index 322957ac2ad1..d044c48323e6 100644 --- a/drivers/parisc/sba_iommu.c +++ b/drivers/parisc/sba_iommu.c | |||
@@ -113,8 +113,6 @@ module_param(sba_reserve_agpgart, int, 0444); | |||
113 | MODULE_PARM_DESC(sba_reserve_agpgart, "Reserve half of IO pdir as AGPGART"); | 113 | MODULE_PARM_DESC(sba_reserve_agpgart, "Reserve half of IO pdir as AGPGART"); |
114 | #endif | 114 | #endif |
115 | 115 | ||
116 | #define ROUNDUP(x,y) ((x + ((y)-1)) & ~((y)-1)) | ||
117 | |||
118 | 116 | ||
119 | /************************************ | 117 | /************************************ |
120 | ** SBA register read and write support | 118 | ** SBA register read and write support |
@@ -352,7 +350,7 @@ sba_search_bitmap(struct ioc *ioc, unsigned long bits_wanted) | |||
352 | ** SBA HW features in the unmap path. | 350 | ** SBA HW features in the unmap path. |
353 | */ | 351 | */ |
354 | unsigned long o = 1 << get_order(bits_wanted << PAGE_SHIFT); | 352 | unsigned long o = 1 << get_order(bits_wanted << PAGE_SHIFT); |
355 | uint bitshiftcnt = ROUNDUP(ioc->res_bitshift, o); | 353 | uint bitshiftcnt = ALIGN(ioc->res_bitshift, o); |
356 | unsigned long mask; | 354 | unsigned long mask; |
357 | 355 | ||
358 | if (bitshiftcnt >= BITS_PER_LONG) { | 356 | if (bitshiftcnt >= BITS_PER_LONG) { |
@@ -779,7 +777,7 @@ sba_unmap_single(struct device *dev, dma_addr_t iova, size_t size, | |||
779 | offset = iova & ~IOVP_MASK; | 777 | offset = iova & ~IOVP_MASK; |
780 | iova ^= offset; /* clear offset bits */ | 778 | iova ^= offset; /* clear offset bits */ |
781 | size += offset; | 779 | size += offset; |
782 | size = ROUNDUP(size, IOVP_SIZE); | 780 | size = ALIGN(size, IOVP_SIZE); |
783 | 781 | ||
784 | spin_lock_irqsave(&ioc->res_lock, flags); | 782 | spin_lock_irqsave(&ioc->res_lock, flags); |
785 | 783 | ||
diff --git a/drivers/parisc/superio.c b/drivers/parisc/superio.c index 1fd97f7c8b98..a708c329675e 100644 --- a/drivers/parisc/superio.c +++ b/drivers/parisc/superio.c | |||
@@ -389,7 +389,7 @@ int superio_fixup_irq(struct pci_dev *pcidev) | |||
389 | return local_irq; | 389 | return local_irq; |
390 | } | 390 | } |
391 | 391 | ||
392 | static void __devinit superio_serial_init(void) | 392 | static void __init superio_serial_init(void) |
393 | { | 393 | { |
394 | #ifdef CONFIG_SERIAL_8250 | 394 | #ifdef CONFIG_SERIAL_8250 |
395 | int retval; | 395 | int retval; |
@@ -423,7 +423,7 @@ static void __devinit superio_serial_init(void) | |||
423 | } | 423 | } |
424 | 424 | ||
425 | 425 | ||
426 | static void __devinit superio_parport_init(void) | 426 | static void __init superio_parport_init(void) |
427 | { | 427 | { |
428 | #ifdef CONFIG_PARPORT_PC | 428 | #ifdef CONFIG_PARPORT_PC |
429 | if (!parport_pc_probe_port(sio_dev.pp_base, | 429 | if (!parport_pc_probe_port(sio_dev.pp_base, |
@@ -450,7 +450,7 @@ static void superio_fixup_pci(struct pci_dev *pdev) | |||
450 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415, superio_fixup_pci); | 450 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415, superio_fixup_pci); |
451 | 451 | ||
452 | 452 | ||
453 | static int __devinit | 453 | static int __init |
454 | superio_probe(struct pci_dev *dev, const struct pci_device_id *id) | 454 | superio_probe(struct pci_dev *dev, const struct pci_device_id *id) |
455 | { | 455 | { |
456 | struct superio_device *sio = &sio_dev; | 456 | struct superio_device *sio = &sio_dev; |
@@ -485,7 +485,7 @@ superio_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
485 | return -ENODEV; | 485 | return -ENODEV; |
486 | } | 486 | } |
487 | 487 | ||
488 | static struct pci_device_id superio_tbl[] = { | 488 | static const struct pci_device_id superio_tbl[] = { |
489 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_LIO) }, | 489 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_LIO) }, |
490 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_USB) }, | 490 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_USB) }, |
491 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415) }, | 491 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415) }, |
diff --git a/drivers/parport/parport_gsc.c b/drivers/parport/parport_gsc.c index 17bf9937d276..43652ba523eb 100644 --- a/drivers/parport/parport_gsc.c +++ b/drivers/parport/parport_gsc.c | |||
@@ -350,7 +350,7 @@ struct parport *__devinit parport_gsc_probe_port (unsigned long base, | |||
350 | 350 | ||
351 | #define PARPORT_GSC_OFFSET 0x800 | 351 | #define PARPORT_GSC_OFFSET 0x800 |
352 | 352 | ||
353 | static int __initdata parport_count; | 353 | static int __devinitdata parport_count; |
354 | 354 | ||
355 | static int __devinit parport_init_chip(struct parisc_device *dev) | 355 | static int __devinit parport_init_chip(struct parisc_device *dev) |
356 | { | 356 | { |
diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c index 717b360d0415..870017d44970 100644 --- a/drivers/video/console/sticore.c +++ b/drivers/video/console/sticore.c | |||
@@ -240,7 +240,7 @@ static void sti_flush(unsigned long from, unsigned long len) | |||
240 | flush_icache_range(from, from+len); | 240 | flush_icache_range(from, from+len); |
241 | } | 241 | } |
242 | 242 | ||
243 | void __init | 243 | void __devinit |
244 | sti_rom_copy(unsigned long base, unsigned long count, void *dest) | 244 | sti_rom_copy(unsigned long base, unsigned long count, void *dest) |
245 | { | 245 | { |
246 | unsigned long dest_len = count; | 246 | unsigned long dest_len = count; |
@@ -269,7 +269,7 @@ sti_rom_copy(unsigned long base, unsigned long count, void *dest) | |||
269 | static char default_sti_path[21] __read_mostly; | 269 | static char default_sti_path[21] __read_mostly; |
270 | 270 | ||
271 | #ifndef MODULE | 271 | #ifndef MODULE |
272 | static int __init sti_setup(char *str) | 272 | static int __devinit sti_setup(char *str) |
273 | { | 273 | { |
274 | if (str) | 274 | if (str) |
275 | strlcpy (default_sti_path, str, sizeof (default_sti_path)); | 275 | strlcpy (default_sti_path, str, sizeof (default_sti_path)); |
@@ -288,12 +288,12 @@ __setup("sti=", sti_setup); | |||
288 | 288 | ||
289 | 289 | ||
290 | 290 | ||
291 | static char __initdata *font_name[MAX_STI_ROMS] = { "VGA8x16", }; | 291 | static char __devinitdata *font_name[MAX_STI_ROMS] = { "VGA8x16", }; |
292 | static int __initdata font_index[MAX_STI_ROMS], | 292 | static int __devinitdata font_index[MAX_STI_ROMS], |
293 | font_height[MAX_STI_ROMS], | 293 | font_height[MAX_STI_ROMS], |
294 | font_width[MAX_STI_ROMS]; | 294 | font_width[MAX_STI_ROMS]; |
295 | #ifndef MODULE | 295 | #ifndef MODULE |
296 | static int __init sti_font_setup(char *str) | 296 | static int __devinit sti_font_setup(char *str) |
297 | { | 297 | { |
298 | char *x; | 298 | char *x; |
299 | int i = 0; | 299 | int i = 0; |
@@ -346,7 +346,7 @@ __setup("sti_font=", sti_font_setup); | |||
346 | 346 | ||
347 | 347 | ||
348 | 348 | ||
349 | static void __init | 349 | static void __devinit |
350 | sti_dump_globcfg(struct sti_glob_cfg *glob_cfg, unsigned int sti_mem_request) | 350 | sti_dump_globcfg(struct sti_glob_cfg *glob_cfg, unsigned int sti_mem_request) |
351 | { | 351 | { |
352 | struct sti_glob_cfg_ext *cfg; | 352 | struct sti_glob_cfg_ext *cfg; |
@@ -386,7 +386,7 @@ sti_dump_globcfg(struct sti_glob_cfg *glob_cfg, unsigned int sti_mem_request) | |||
386 | cfg->sti_mem_addr, sti_mem_request)); | 386 | cfg->sti_mem_addr, sti_mem_request)); |
387 | } | 387 | } |
388 | 388 | ||
389 | static void __init | 389 | static void __devinit |
390 | sti_dump_outptr(struct sti_struct *sti) | 390 | sti_dump_outptr(struct sti_struct *sti) |
391 | { | 391 | { |
392 | DPRINTK((KERN_INFO | 392 | DPRINTK((KERN_INFO |
@@ -400,7 +400,7 @@ sti_dump_outptr(struct sti_struct *sti) | |||
400 | sti->outptr.attributes)); | 400 | sti->outptr.attributes)); |
401 | } | 401 | } |
402 | 402 | ||
403 | static int __init | 403 | static int __devinit |
404 | sti_init_glob_cfg(struct sti_struct *sti, | 404 | sti_init_glob_cfg(struct sti_struct *sti, |
405 | unsigned long rom_address, unsigned long hpa) | 405 | unsigned long rom_address, unsigned long hpa) |
406 | { | 406 | { |
@@ -482,7 +482,7 @@ sti_init_glob_cfg(struct sti_struct *sti, | |||
482 | } | 482 | } |
483 | 483 | ||
484 | #ifdef CONFIG_FB | 484 | #ifdef CONFIG_FB |
485 | struct sti_cooked_font * __init | 485 | struct sti_cooked_font * __devinit |
486 | sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) | 486 | sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) |
487 | { | 487 | { |
488 | const struct font_desc *fbfont; | 488 | const struct font_desc *fbfont; |
@@ -538,14 +538,14 @@ sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) | |||
538 | return cooked_font; | 538 | return cooked_font; |
539 | } | 539 | } |
540 | #else | 540 | #else |
541 | struct sti_cooked_font * __init | 541 | struct sti_cooked_font * __devinit |
542 | sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) | 542 | sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) |
543 | { | 543 | { |
544 | return NULL; | 544 | return NULL; |
545 | } | 545 | } |
546 | #endif | 546 | #endif |
547 | 547 | ||
548 | struct sti_cooked_font * __init | 548 | struct sti_cooked_font * __devinit |
549 | sti_select_font(struct sti_cooked_rom *rom, | 549 | sti_select_font(struct sti_cooked_rom *rom, |
550 | int (*search_font_fnc) (struct sti_cooked_rom *,int,int) ) | 550 | int (*search_font_fnc) (struct sti_cooked_rom *,int,int) ) |
551 | { | 551 | { |
@@ -572,7 +572,7 @@ sti_select_font(struct sti_cooked_rom *rom, | |||
572 | } | 572 | } |
573 | 573 | ||
574 | 574 | ||
575 | static void __init | 575 | static void __devinit |
576 | sti_dump_rom(struct sti_rom *rom) | 576 | sti_dump_rom(struct sti_rom *rom) |
577 | { | 577 | { |
578 | printk(KERN_INFO " id %04x-%04x, conforms to spec rev. %d.%02x\n", | 578 | printk(KERN_INFO " id %04x-%04x, conforms to spec rev. %d.%02x\n", |
@@ -590,7 +590,7 @@ sti_dump_rom(struct sti_rom *rom) | |||
590 | } | 590 | } |
591 | 591 | ||
592 | 592 | ||
593 | static int __init | 593 | static int __devinit |
594 | sti_cook_fonts(struct sti_cooked_rom *cooked_rom, | 594 | sti_cook_fonts(struct sti_cooked_rom *cooked_rom, |
595 | struct sti_rom *raw_rom) | 595 | struct sti_rom *raw_rom) |
596 | { | 596 | { |
@@ -625,7 +625,7 @@ sti_cook_fonts(struct sti_cooked_rom *cooked_rom, | |||
625 | } | 625 | } |
626 | 626 | ||
627 | 627 | ||
628 | static int __init | 628 | static int __devinit |
629 | sti_search_font(struct sti_cooked_rom *rom, int height, int width) | 629 | sti_search_font(struct sti_cooked_rom *rom, int height, int width) |
630 | { | 630 | { |
631 | struct sti_cooked_font *font; | 631 | struct sti_cooked_font *font; |
@@ -642,7 +642,7 @@ sti_search_font(struct sti_cooked_rom *rom, int height, int width) | |||
642 | #define BMODE_RELOCATE(offset) offset = (offset) / 4; | 642 | #define BMODE_RELOCATE(offset) offset = (offset) / 4; |
643 | #define BMODE_LAST_ADDR_OFFS 0x50 | 643 | #define BMODE_LAST_ADDR_OFFS 0x50 |
644 | 644 | ||
645 | static void * __init | 645 | static void * __devinit |
646 | sti_bmode_font_raw(struct sti_cooked_font *f) | 646 | sti_bmode_font_raw(struct sti_cooked_font *f) |
647 | { | 647 | { |
648 | unsigned char *n, *p, *q; | 648 | unsigned char *n, *p, *q; |
@@ -660,7 +660,7 @@ sti_bmode_font_raw(struct sti_cooked_font *f) | |||
660 | return n + 3; | 660 | return n + 3; |
661 | } | 661 | } |
662 | 662 | ||
663 | static void __init | 663 | static void __devinit |
664 | sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest) | 664 | sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest) |
665 | { | 665 | { |
666 | unsigned long dest_len = count; | 666 | unsigned long dest_len = count; |
@@ -675,7 +675,7 @@ sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest) | |||
675 | sti_flush(dest_start, dest_len); | 675 | sti_flush(dest_start, dest_len); |
676 | } | 676 | } |
677 | 677 | ||
678 | static struct sti_rom * __init | 678 | static struct sti_rom * __devinit |
679 | sti_get_bmode_rom (unsigned long address) | 679 | sti_get_bmode_rom (unsigned long address) |
680 | { | 680 | { |
681 | struct sti_rom *raw; | 681 | struct sti_rom *raw; |
@@ -711,7 +711,7 @@ sti_get_bmode_rom (unsigned long address) | |||
711 | return raw; | 711 | return raw; |
712 | } | 712 | } |
713 | 713 | ||
714 | struct sti_rom * __init | 714 | struct sti_rom * __devinit |
715 | sti_get_wmode_rom (unsigned long address) | 715 | sti_get_wmode_rom (unsigned long address) |
716 | { | 716 | { |
717 | struct sti_rom *raw; | 717 | struct sti_rom *raw; |
@@ -727,7 +727,7 @@ sti_get_wmode_rom (unsigned long address) | |||
727 | return raw; | 727 | return raw; |
728 | } | 728 | } |
729 | 729 | ||
730 | int __init | 730 | int __devinit |
731 | sti_read_rom(int wordmode, struct sti_struct *sti, unsigned long address) | 731 | sti_read_rom(int wordmode, struct sti_struct *sti, unsigned long address) |
732 | { | 732 | { |
733 | struct sti_cooked_rom *cooked; | 733 | struct sti_cooked_rom *cooked; |
@@ -783,7 +783,7 @@ out_err: | |||
783 | return 0; | 783 | return 0; |
784 | } | 784 | } |
785 | 785 | ||
786 | static struct sti_struct * __init | 786 | static struct sti_struct * __devinit |
787 | sti_try_rom_generic(unsigned long address, unsigned long hpa, struct pci_dev *pd) | 787 | sti_try_rom_generic(unsigned long address, unsigned long hpa, struct pci_dev *pd) |
788 | { | 788 | { |
789 | struct sti_struct *sti; | 789 | struct sti_struct *sti; |
@@ -898,7 +898,7 @@ out_err: | |||
898 | return NULL; | 898 | return NULL; |
899 | } | 899 | } |
900 | 900 | ||
901 | static void __init sticore_check_for_default_sti(struct sti_struct *sti, char *path) | 901 | static void __devinit sticore_check_for_default_sti(struct sti_struct *sti, char *path) |
902 | { | 902 | { |
903 | if (strcmp (path, default_sti_path) == 0) | 903 | if (strcmp (path, default_sti_path) == 0) |
904 | default_sti = sti; | 904 | default_sti = sti; |
@@ -909,7 +909,7 @@ static void __init sticore_check_for_default_sti(struct sti_struct *sti, char *p | |||
909 | * in the additional address field addr[1] while on | 909 | * in the additional address field addr[1] while on |
910 | * older Systems the PDC stores it in page0->proc_sti | 910 | * older Systems the PDC stores it in page0->proc_sti |
911 | */ | 911 | */ |
912 | static int __init sticore_pa_init(struct parisc_device *dev) | 912 | static int __devinit sticore_pa_init(struct parisc_device *dev) |
913 | { | 913 | { |
914 | char pa_path[21]; | 914 | char pa_path[21]; |
915 | struct sti_struct *sti = NULL; | 915 | struct sti_struct *sti = NULL; |
@@ -1015,7 +1015,7 @@ static struct parisc_driver pa_sti_driver = { | |||
1015 | 1015 | ||
1016 | static int sticore_initialized __read_mostly; | 1016 | static int sticore_initialized __read_mostly; |
1017 | 1017 | ||
1018 | static void __init sti_init_roms(void) | 1018 | static void __devinit sti_init_roms(void) |
1019 | { | 1019 | { |
1020 | if (sticore_initialized) | 1020 | if (sticore_initialized) |
1021 | return; | 1021 | return; |
diff --git a/include/asm-parisc/hardware.h b/include/asm-parisc/hardware.h index 76d880dc4bae..4e9626836bab 100644 --- a/include/asm-parisc/hardware.h +++ b/include/asm-parisc/hardware.h | |||
@@ -31,10 +31,11 @@ enum cpu_type { | |||
31 | pcxw = 8, /* pa8500 pa 2.0 */ | 31 | pcxw = 8, /* pa8500 pa 2.0 */ |
32 | pcxw_ = 9, /* pa8600 (w+) pa 2.0 */ | 32 | pcxw_ = 9, /* pa8600 (w+) pa 2.0 */ |
33 | pcxw2 = 10, /* pa8700 pa 2.0 */ | 33 | pcxw2 = 10, /* pa8700 pa 2.0 */ |
34 | mako = 11 /* pa8800 pa 2.0 */ | 34 | mako = 11, /* pa8800 pa 2.0 */ |
35 | mako2 = 12 /* pa8900 pa 2.0 */ | ||
35 | }; | 36 | }; |
36 | 37 | ||
37 | extern char *cpu_name_version[][2]; /* mapping from enum cpu_type to strings */ | 38 | extern const char * const cpu_name_version[][2]; /* mapping from enum cpu_type to strings */ |
38 | 39 | ||
39 | struct parisc_driver; | 40 | struct parisc_driver; |
40 | 41 | ||
diff --git a/include/asm-parisc/linkage.h b/include/asm-parisc/linkage.h index 7a09d911b538..ad8cd0d069ea 100644 --- a/include/asm-parisc/linkage.h +++ b/include/asm-parisc/linkage.h | |||
@@ -8,8 +8,10 @@ | |||
8 | 8 | ||
9 | /* | 9 | /* |
10 | * In parisc assembly a semicolon marks a comment while a | 10 | * In parisc assembly a semicolon marks a comment while a |
11 | * exclamation mark is used to seperate independend lines. | 11 | * exclamation mark is used to seperate independent lines. |
12 | */ | 12 | */ |
13 | #ifdef __ASSEMBLY__ | ||
14 | |||
13 | #define ENTRY(name) \ | 15 | #define ENTRY(name) \ |
14 | .export name !\ | 16 | .export name !\ |
15 | ALIGN !\ | 17 | ALIGN !\ |
@@ -24,5 +26,6 @@ name: | |||
24 | END(name) | 26 | END(name) |
25 | #endif | 27 | #endif |
26 | 28 | ||
29 | #endif /* __ASSEMBLY__ */ | ||
27 | 30 | ||
28 | #endif /* __ASM_PARISC_LINKAGE_H */ | 31 | #endif /* __ASM_PARISC_LINKAGE_H */ |
diff --git a/include/asm-parisc/processor.h b/include/asm-parisc/processor.h index d2f396721d3e..6b294fb07a23 100644 --- a/include/asm-parisc/processor.h +++ b/include/asm-parisc/processor.h | |||
@@ -69,8 +69,8 @@ struct system_cpuinfo_parisc { | |||
69 | char sys_model_name[81]; /* PDC-ROM returnes this model name */ | 69 | char sys_model_name[81]; /* PDC-ROM returnes this model name */ |
70 | } pdc; | 70 | } pdc; |
71 | 71 | ||
72 | char *cpu_name; /* e.g. "PA7300LC (PCX-L2)" */ | 72 | const char *cpu_name; /* e.g. "PA7300LC (PCX-L2)" */ |
73 | char *family_name; /* e.g. "1.1e" */ | 73 | const char *family_name; /* e.g. "1.1e" */ |
74 | }; | 74 | }; |
75 | 75 | ||
76 | 76 | ||
@@ -334,8 +334,8 @@ extern unsigned long get_wchan(struct task_struct *p); | |||
334 | static inline int parisc_requires_coherency(void) | 334 | static inline int parisc_requires_coherency(void) |
335 | { | 335 | { |
336 | #ifdef CONFIG_PA8X00 | 336 | #ifdef CONFIG_PA8X00 |
337 | /* FIXME: also pa8900 - when we see one */ | 337 | return (boot_cpu_data.cpu_type == mako) || |
338 | return boot_cpu_data.cpu_type == mako; | 338 | (boot_cpu_data.cpu_type == mako2); |
339 | #else | 339 | #else |
340 | return 0; | 340 | return 0; |
341 | #endif | 341 | #endif |
diff --git a/include/asm-parisc/unistd.h b/include/asm-parisc/unistd.h index 2f7c40861c91..f74099bdca3c 100644 --- a/include/asm-parisc/unistd.h +++ b/include/asm-parisc/unistd.h | |||
@@ -792,8 +792,19 @@ | |||
792 | #define __NR_epoll_pwait (__NR_Linux + 297) | 792 | #define __NR_epoll_pwait (__NR_Linux + 297) |
793 | #define __NR_statfs64 (__NR_Linux + 298) | 793 | #define __NR_statfs64 (__NR_Linux + 298) |
794 | #define __NR_fstatfs64 (__NR_Linux + 299) | 794 | #define __NR_fstatfs64 (__NR_Linux + 299) |
795 | #define __NR_kexec_load (__NR_Linux + 300) | ||
796 | #define __NR_utimensat (__NR_Linux + 301) | ||
797 | #define __NR_signalfd (__NR_Linux + 302) | ||
798 | #define __NR_timerfd (__NR_Linux + 303) | ||
799 | #define __NR_eventfd (__NR_Linux + 304) | ||
800 | |||
801 | #define __NR_Linux_syscalls (__NR_eventfd + 1) | ||
802 | |||
803 | |||
804 | #define __IGNORE_select /* newselect */ | ||
805 | #define __IGNORE_fadvise64 /* fadvise64_64 */ | ||
806 | #define __IGNORE_utimes /* utime */ | ||
795 | 807 | ||
796 | #define __NR_Linux_syscalls (__NR_fstatfs64 + 1) | ||
797 | 808 | ||
798 | #define HPUX_GATEWAY_ADDR 0xC0000004 | 809 | #define HPUX_GATEWAY_ADDR 0xC0000004 |
799 | #define LINUX_GATEWAY_ADDR 0x100 | 810 | #define LINUX_GATEWAY_ADDR 0x100 |