diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-06 21:02:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-06 21:02:46 -0500 |
commit | 185d84b4e1f6febebbe30d785fe31310dcf9632a (patch) | |
tree | 95a8ece17e7f26b2f277ab45ac0145ce6636772f /arch/mips | |
parent | 03154a271012031ad6336dc3344679440ba49c24 (diff) | |
parent | 063ea774b021c70fa96139eb601f894aff8941c0 (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] IP27: Build fix
[MIPS] Wire up ioprio_set and ioprio_get.
[MIPS] Fix __raw_read_trylock() to allow multiple readers
[MIPS] Export __copy_user_inatomic.
[MIPS] R2 bitops compile fix for gcc < 4.0.
[MIPS] TX39: Remove redundant tx39_blast_icache() calls
[MIPS] Cobalt: Fix early printk
[MIPS] SMTC: De-obscure Malta hooks.
[MIPS] SMTC: Add fordward declarations for mm_struct and task_struct.
[MIPS] SMTC: <asm/mips_mt.h> must include <linux/cpumask.h>
[MIPS] SMTC: <asm/smtc_ipi.h> must include <linux/spinlock.h>
[MIPS] Atlas, Malta: Fix build warning.
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/Kconfig | 2 | ||||
-rw-r--r-- | arch/mips/cobalt/Kconfig | 7 | ||||
-rw-r--r-- | arch/mips/cobalt/console.c | 5 | ||||
-rw-r--r-- | arch/mips/kernel/mips_ksyms.c | 1 | ||||
-rw-r--r-- | arch/mips/kernel/scall32-o32.S | 2 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-64.S | 3 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-n32.S | 5 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-o32.S | 2 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/init.c | 4 | ||||
-rw-r--r-- | arch/mips/mips-boards/malta/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/mips-boards/malta/malta_smtc.c (renamed from arch/mips/mips-boards/malta/malta_smp.c) | 31 | ||||
-rw-r--r-- | arch/mips/mm/c-tx39.c | 18 | ||||
-rw-r--r-- | arch/mips/sgi-ip27/ip27-init.c | 2 |
13 files changed, 28 insertions, 56 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 4ec2dd5455f3..a1cd84f9b3bc 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -167,6 +167,7 @@ config MIPS_COBALT | |||
167 | select IRQ_CPU | 167 | select IRQ_CPU |
168 | select MIPS_GT64111 | 168 | select MIPS_GT64111 |
169 | select SYS_HAS_CPU_NEVADA | 169 | select SYS_HAS_CPU_NEVADA |
170 | select SYS_HAS_EARLY_PRINTK | ||
170 | select SYS_SUPPORTS_32BIT_KERNEL | 171 | select SYS_SUPPORTS_32BIT_KERNEL |
171 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL | 172 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL |
172 | select SYS_SUPPORTS_LITTLE_ENDIAN | 173 | select SYS_SUPPORTS_LITTLE_ENDIAN |
@@ -837,7 +838,6 @@ source "arch/mips/tx4927/Kconfig" | |||
837 | source "arch/mips/tx4938/Kconfig" | 838 | source "arch/mips/tx4938/Kconfig" |
838 | source "arch/mips/vr41xx/Kconfig" | 839 | source "arch/mips/vr41xx/Kconfig" |
839 | source "arch/mips/philips/pnx8550/common/Kconfig" | 840 | source "arch/mips/philips/pnx8550/common/Kconfig" |
840 | source "arch/mips/cobalt/Kconfig" | ||
841 | 841 | ||
842 | endmenu | 842 | endmenu |
843 | 843 | ||
diff --git a/arch/mips/cobalt/Kconfig b/arch/mips/cobalt/Kconfig deleted file mode 100644 index 7c42b088d16c..000000000000 --- a/arch/mips/cobalt/Kconfig +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | config EARLY_PRINTK | ||
2 | bool "Early console support" | ||
3 | depends on MIPS_COBALT | ||
4 | help | ||
5 | Provide early console support by direct access to the | ||
6 | on board UART. The UART must have been previously | ||
7 | initialised by the boot loader. | ||
diff --git a/arch/mips/cobalt/console.c b/arch/mips/cobalt/console.c index fff20d28114f..ca56b415b8ac 100644 --- a/arch/mips/cobalt/console.c +++ b/arch/mips/cobalt/console.c | |||
@@ -9,11 +9,8 @@ | |||
9 | #include <asm/addrspace.h> | 9 | #include <asm/addrspace.h> |
10 | #include <asm/mach-cobalt/cobalt.h> | 10 | #include <asm/mach-cobalt/cobalt.h> |
11 | 11 | ||
12 | static void putchar(int c) | 12 | void prom_putchar(char c) |
13 | { | 13 | { |
14 | if(c == '\n') | ||
15 | putchar('\r'); | ||
16 | |||
17 | while(!(COBALT_UART[UART_LSR] & UART_LSR_THRE)) | 14 | while(!(COBALT_UART[UART_LSR] & UART_LSR_THRE)) |
18 | ; | 15 | ; |
19 | 16 | ||
diff --git a/arch/mips/kernel/mips_ksyms.c b/arch/mips/kernel/mips_ksyms.c index 2ef857c3ee53..225755d0c1f6 100644 --- a/arch/mips/kernel/mips_ksyms.c +++ b/arch/mips/kernel/mips_ksyms.c | |||
@@ -37,6 +37,7 @@ EXPORT_SYMBOL(kernel_thread); | |||
37 | * Userspace access stuff. | 37 | * Userspace access stuff. |
38 | */ | 38 | */ |
39 | EXPORT_SYMBOL(__copy_user); | 39 | EXPORT_SYMBOL(__copy_user); |
40 | EXPORT_SYMBOL(__copy_user_inatomic); | ||
40 | EXPORT_SYMBOL(__bzero); | 41 | EXPORT_SYMBOL(__bzero); |
41 | EXPORT_SYMBOL(__strncpy_from_user_nocheck_asm); | 42 | EXPORT_SYMBOL(__strncpy_from_user_nocheck_asm); |
42 | EXPORT_SYMBOL(__strncpy_from_user_asm); | 43 | EXPORT_SYMBOL(__strncpy_from_user_asm); |
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index 7c0b3936ba44..0c9a9ff8cd25 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
@@ -656,6 +656,8 @@ einval: li v0, -EINVAL | |||
656 | sys sys_kexec_load 4 | 656 | sys sys_kexec_load 4 |
657 | sys sys_getcpu 3 | 657 | sys sys_getcpu 3 |
658 | sys sys_epoll_pwait 6 | 658 | sys sys_epoll_pwait 6 |
659 | sys sys_ioprio_set 3 | ||
660 | sys sys_ioprio_get 2 | ||
659 | .endm | 661 | .endm |
660 | 662 | ||
661 | /* We pre-compute the number of _instruction_ bytes needed to | 663 | /* We pre-compute the number of _instruction_ bytes needed to |
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index e569b846e9a3..23f3b118f718 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S | |||
@@ -471,3 +471,6 @@ sys_call_table: | |||
471 | PTR sys_kexec_load /* 5270 */ | 471 | PTR sys_kexec_load /* 5270 */ |
472 | PTR sys_getcpu | 472 | PTR sys_getcpu |
473 | PTR sys_epoll_pwait | 473 | PTR sys_epoll_pwait |
474 | PTR sys_ioprio_set | ||
475 | PTR sys_ioprio_get | ||
476 | .size sys_call_table,.-sys_call_table | ||
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index f17e31e3bff2..6eac28337423 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
@@ -395,5 +395,8 @@ EXPORT(sysn32_call_table) | |||
395 | PTR compat_sys_set_robust_list | 395 | PTR compat_sys_set_robust_list |
396 | PTR compat_sys_get_robust_list | 396 | PTR compat_sys_get_robust_list |
397 | PTR compat_sys_kexec_load | 397 | PTR compat_sys_kexec_load |
398 | PTR sys_getcpu | 398 | PTR sys_getcpu /* 6275 */ |
399 | PTR compat_sys_epoll_pwait | 399 | PTR compat_sys_epoll_pwait |
400 | PTR sys_ioprio_set | ||
401 | PTR sys_ioprio_get | ||
402 | .size sysn32_call_table,.-sysn32_call_table | ||
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 142c9b70c026..7e74b412a782 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
@@ -519,4 +519,6 @@ sys_call_table: | |||
519 | PTR compat_sys_kexec_load | 519 | PTR compat_sys_kexec_load |
520 | PTR sys_getcpu | 520 | PTR sys_getcpu |
521 | PTR compat_sys_epoll_pwait | 521 | PTR compat_sys_epoll_pwait |
522 | PTR sys_ioprio_set | ||
523 | PTR sys_ioprio_get /* 4315 */ | ||
522 | .size sys_call_table,.-sys_call_table | 524 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/mips-boards/generic/init.c b/arch/mips/mips-boards/generic/init.c index b11337600129..1acdf091c258 100644 --- a/arch/mips/mips-boards/generic/init.c +++ b/arch/mips/mips-boards/generic/init.c | |||
@@ -251,8 +251,6 @@ void __init mips_ejtag_setup (void) | |||
251 | 251 | ||
252 | void __init prom_init(void) | 252 | void __init prom_init(void) |
253 | { | 253 | { |
254 | u32 start, map, mask, data; | ||
255 | |||
256 | prom_argc = fw_arg0; | 254 | prom_argc = fw_arg0; |
257 | _prom_argv = (int *) fw_arg1; | 255 | _prom_argv = (int *) fw_arg1; |
258 | _prom_envp = (int *) fw_arg2; | 256 | _prom_envp = (int *) fw_arg2; |
@@ -278,6 +276,8 @@ void __init prom_init(void) | |||
278 | mips_revision_corid = MIPS_REVISION_CORID_CORE_EMUL_MSC; | 276 | mips_revision_corid = MIPS_REVISION_CORID_CORE_EMUL_MSC; |
279 | } | 277 | } |
280 | switch(mips_revision_corid) { | 278 | switch(mips_revision_corid) { |
279 | u32 start, map, mask, data; | ||
280 | |||
281 | case MIPS_REVISION_CORID_QED_RM5261: | 281 | case MIPS_REVISION_CORID_QED_RM5261: |
282 | case MIPS_REVISION_CORID_CORE_LV: | 282 | case MIPS_REVISION_CORID_CORE_LV: |
283 | case MIPS_REVISION_CORID_CORE_FPGA: | 283 | case MIPS_REVISION_CORID_CORE_FPGA: |
diff --git a/arch/mips/mips-boards/malta/Makefile b/arch/mips/mips-boards/malta/Makefile index cb7f349b0514..377d9e8f250a 100644 --- a/arch/mips/mips-boards/malta/Makefile +++ b/arch/mips/mips-boards/malta/Makefile | |||
@@ -21,4 +21,4 @@ | |||
21 | 21 | ||
22 | obj-y := malta_int.o malta_setup.o | 22 | obj-y := malta_int.o malta_setup.o |
23 | obj-$(CONFIG_MTD) += malta_mtd.o | 23 | obj-$(CONFIG_MTD) += malta_mtd.o |
24 | obj-$(CONFIG_SMP) += malta_smp.o | 24 | obj-$(CONFIG_MIPS_MT_SMTC) += malta_smtc.o |
diff --git a/arch/mips/mips-boards/malta/malta_smp.c b/arch/mips/mips-boards/malta/malta_smtc.c index cf967170fe29..d1c80f631100 100644 --- a/arch/mips/mips-boards/malta/malta_smp.c +++ b/arch/mips/mips-boards/malta/malta_smtc.c | |||
@@ -1,25 +1,14 @@ | |||
1 | /* | 1 | /* |
2 | * Malta Platform-specific hooks for SMP operation | 2 | * Malta Platform-specific hooks for SMP operation |
3 | */ | 3 | */ |
4 | #include <linux/init.h> | ||
4 | 5 | ||
5 | #include <linux/kernel.h> | 6 | #include <asm/mipsregs.h> |
6 | #include <linux/sched.h> | 7 | #include <asm/mipsmtregs.h> |
7 | #include <linux/cpumask.h> | 8 | #include <asm/smtc.h> |
8 | #include <linux/interrupt.h> | ||
9 | |||
10 | #include <asm/atomic.h> | ||
11 | #include <asm/cpu.h> | ||
12 | #include <asm/processor.h> | ||
13 | #include <asm/system.h> | ||
14 | #include <asm/hardirq.h> | ||
15 | #include <asm/mmu_context.h> | ||
16 | #include <asm/smp.h> | ||
17 | #ifdef CONFIG_MIPS_MT_SMTC | ||
18 | #include <asm/smtc_ipi.h> | 9 | #include <asm/smtc_ipi.h> |
19 | #endif /* CONFIG_MIPS_MT_SMTC */ | ||
20 | 10 | ||
21 | /* VPE/SMP Prototype implements platform interfaces directly */ | 11 | /* VPE/SMP Prototype implements platform interfaces directly */ |
22 | #if !defined(CONFIG_MIPS_MT_SMP) | ||
23 | 12 | ||
24 | /* | 13 | /* |
25 | * Cause the specified action to be performed on a targeted "CPU" | 14 | * Cause the specified action to be performed on a targeted "CPU" |
@@ -27,10 +16,8 @@ | |||
27 | 16 | ||
28 | void core_send_ipi(int cpu, unsigned int action) | 17 | void core_send_ipi(int cpu, unsigned int action) |
29 | { | 18 | { |
30 | /* "CPU" may be TC of same VPE, VPE of same CPU, or different CPU */ | 19 | /* "CPU" may be TC of same VPE, VPE of same CPU, or different CPU */ |
31 | #ifdef CONFIG_MIPS_MT_SMTC | ||
32 | smtc_send_ipi(cpu, LINUX_SMP_IPI, action); | 20 | smtc_send_ipi(cpu, LINUX_SMP_IPI, action); |
33 | #endif /* CONFIG_MIPS_MT_SMTC */ | ||
34 | } | 21 | } |
35 | 22 | ||
36 | /* | 23 | /* |
@@ -39,9 +26,7 @@ void core_send_ipi(int cpu, unsigned int action) | |||
39 | 26 | ||
40 | void prom_boot_secondary(int cpu, struct task_struct *idle) | 27 | void prom_boot_secondary(int cpu, struct task_struct *idle) |
41 | { | 28 | { |
42 | #ifdef CONFIG_MIPS_MT_SMTC | ||
43 | smtc_boot_secondary(cpu, idle); | 29 | smtc_boot_secondary(cpu, idle); |
44 | #endif /* CONFIG_MIPS_MT_SMTC */ | ||
45 | } | 30 | } |
46 | 31 | ||
47 | /* | 32 | /* |
@@ -50,7 +35,6 @@ void prom_boot_secondary(int cpu, struct task_struct *idle) | |||
50 | 35 | ||
51 | void prom_init_secondary(void) | 36 | void prom_init_secondary(void) |
52 | { | 37 | { |
53 | #ifdef CONFIG_MIPS_MT_SMTC | ||
54 | void smtc_init_secondary(void); | 38 | void smtc_init_secondary(void); |
55 | int myvpe; | 39 | int myvpe; |
56 | 40 | ||
@@ -65,7 +49,6 @@ void prom_init_secondary(void) | |||
65 | } | 49 | } |
66 | 50 | ||
67 | smtc_init_secondary(); | 51 | smtc_init_secondary(); |
68 | #endif /* CONFIG_MIPS_MT_SMTC */ | ||
69 | } | 52 | } |
70 | 53 | ||
71 | /* | 54 | /* |
@@ -93,9 +76,7 @@ void __init plat_prepare_cpus(unsigned int max_cpus) | |||
93 | 76 | ||
94 | void prom_smp_finish(void) | 77 | void prom_smp_finish(void) |
95 | { | 78 | { |
96 | #ifdef CONFIG_MIPS_MT_SMTC | ||
97 | smtc_smp_finish(); | 79 | smtc_smp_finish(); |
98 | #endif /* CONFIG_MIPS_MT_SMTC */ | ||
99 | } | 80 | } |
100 | 81 | ||
101 | /* | 82 | /* |
@@ -105,5 +86,3 @@ void prom_smp_finish(void) | |||
105 | void prom_cpus_done(void) | 86 | void prom_cpus_done(void) |
106 | { | 87 | { |
107 | } | 88 | } |
108 | |||
109 | #endif /* CONFIG_MIPS32R2_MT_SMP */ | ||
diff --git a/arch/mips/mm/c-tx39.c b/arch/mips/mm/c-tx39.c index f32ebde30ccf..560a6de96556 100644 --- a/arch/mips/mm/c-tx39.c +++ b/arch/mips/mm/c-tx39.c | |||
@@ -128,7 +128,6 @@ static inline void tx39_flush_cache_all(void) | |||
128 | return; | 128 | return; |
129 | 129 | ||
130 | tx39_blast_dcache(); | 130 | tx39_blast_dcache(); |
131 | tx39_blast_icache(); | ||
132 | } | 131 | } |
133 | 132 | ||
134 | static inline void tx39___flush_cache_all(void) | 133 | static inline void tx39___flush_cache_all(void) |
@@ -142,24 +141,19 @@ static void tx39_flush_cache_mm(struct mm_struct *mm) | |||
142 | if (!cpu_has_dc_aliases) | 141 | if (!cpu_has_dc_aliases) |
143 | return; | 142 | return; |
144 | 143 | ||
145 | if (cpu_context(smp_processor_id(), mm) != 0) { | 144 | if (cpu_context(smp_processor_id(), mm) != 0) |
146 | tx39_flush_cache_all(); | 145 | tx39_blast_dcache(); |
147 | } | ||
148 | } | 146 | } |
149 | 147 | ||
150 | static void tx39_flush_cache_range(struct vm_area_struct *vma, | 148 | static void tx39_flush_cache_range(struct vm_area_struct *vma, |
151 | unsigned long start, unsigned long end) | 149 | unsigned long start, unsigned long end) |
152 | { | 150 | { |
153 | int exec; | 151 | if (!cpu_has_dc_aliases) |
154 | 152 | return; | |
155 | if (!(cpu_context(smp_processor_id(), vma->vm_mm))) | 153 | if (!(cpu_context(smp_processor_id(), vma->vm_mm))) |
156 | return; | 154 | return; |
157 | 155 | ||
158 | exec = vma->vm_flags & VM_EXEC; | 156 | tx39_blast_dcache(); |
159 | if (cpu_has_dc_aliases || exec) | ||
160 | tx39_blast_dcache(); | ||
161 | if (exec) | ||
162 | tx39_blast_icache(); | ||
163 | } | 157 | } |
164 | 158 | ||
165 | static void tx39_flush_cache_page(struct vm_area_struct *vma, unsigned long page, unsigned long pfn) | 159 | static void tx39_flush_cache_page(struct vm_area_struct *vma, unsigned long page, unsigned long pfn) |
@@ -218,7 +212,7 @@ static void tx39_flush_cache_page(struct vm_area_struct *vma, unsigned long page | |||
218 | 212 | ||
219 | static void local_tx39_flush_data_cache_page(void * addr) | 213 | static void local_tx39_flush_data_cache_page(void * addr) |
220 | { | 214 | { |
221 | tx39_blast_dcache_page(addr); | 215 | tx39_blast_dcache_page((unsigned long)addr); |
222 | } | 216 | } |
223 | 217 | ||
224 | static void tx39_flush_data_cache_page(unsigned long addr) | 218 | static void tx39_flush_data_cache_page(unsigned long addr) |
diff --git a/arch/mips/sgi-ip27/ip27-init.c b/arch/mips/sgi-ip27/ip27-init.c index 9094baf31d0e..74158d349630 100644 --- a/arch/mips/sgi-ip27/ip27-init.c +++ b/arch/mips/sgi-ip27/ip27-init.c | |||
@@ -191,7 +191,6 @@ static inline void ioc3_eth_init(void) | |||
191 | ioc3->eier = 0; | 191 | ioc3->eier = 0; |
192 | } | 192 | } |
193 | 193 | ||
194 | extern void ip27_setup_console(void); | ||
195 | extern void ip27_time_init(void); | 194 | extern void ip27_time_init(void); |
196 | extern void ip27_reboot_setup(void); | 195 | extern void ip27_reboot_setup(void); |
197 | 196 | ||
@@ -200,7 +199,6 @@ void __init plat_mem_setup(void) | |||
200 | hubreg_t p, e, n_mode; | 199 | hubreg_t p, e, n_mode; |
201 | nasid_t nid; | 200 | nasid_t nid; |
202 | 201 | ||
203 | ip27_setup_console(); | ||
204 | ip27_reboot_setup(); | 202 | ip27_reboot_setup(); |
205 | 203 | ||
206 | /* | 204 | /* |