aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-11 14:41:00 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-11 14:41:00 -0400
commit22353f35c895acb7a8ca27ebdc6397c993b4213e (patch)
treeb1b52ca357ac2e5bb1428dea948bd4d175e40e07 /arch
parent3e2ce4dae98f6b246eaeb12833914d22fd83e31d (diff)
parentff72b7a6188088976bf7d77d3309a9b2f1716071 (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] Fix smp barriers in test_and_{change,clear,set}_bit [MIPS] Fix IP27 build [MIPS] Fix modpost warnings by making start_secondary __cpuinit [MIPS] SMTC: Fix build error caused by nonsense code. [MIPS] SMTC: The MT ASE requires to initialize c0_pagemask and c0_wired. [MIPS] SMTC: Don't continue in set_vi_srs_handler on detected bad arguments. [MIPS] SMTC: Fix warning. [MIPS] Wire up utimensat, signalfd, timerfd, eventfd [MIPS] Atlas: Fix build. [MIPS] Always install the DSP exception handler. [MIPS] SMTC: Don't set and restore irqregs ptr from self_ipi. [MIPS] Fix KMODE for the R3000
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/kernel/scall32-o32.S6
-rw-r--r--arch/mips/kernel/scall64-64.S4
-rw-r--r--arch/mips/kernel/scall64-n32.S4
-rw-r--r--arch/mips/kernel/scall64-o32.S4
-rw-r--r--arch/mips/kernel/smp.c2
-rw-r--r--arch/mips/kernel/smtc-asm.S3
-rw-r--r--arch/mips/kernel/smtc.c4
-rw-r--r--arch/mips/kernel/traps.c15
-rw-r--r--arch/mips/mips-boards/atlas/atlas_int.c5
-rw-r--r--arch/mips/mips-boards/generic/time.c16
-rw-r--r--arch/mips/sgi-ip27/ip27-memory.c2
11 files changed, 36 insertions, 29 deletions
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
index 0c9a9ff8cd25..ae985d1fcca1 100644
--- a/arch/mips/kernel/scall32-o32.S
+++ b/arch/mips/kernel/scall32-o32.S
@@ -657,7 +657,11 @@ einval: li v0, -EINVAL
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 659 sys sys_ioprio_set 3
660 sys sys_ioprio_get 2 660 sys sys_ioprio_get 2 /* 4315 */
661 sys sys_utimensat 4
662 sys sys_signalfd 3
663 sys sys_timerfd 4
664 sys sys_eventfd 1
661 .endm 665 .endm
662 666
663 /* We pre-compute the number of _instruction_ bytes needed to 667 /* 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 23f3b118f718..7bcd5a1a85f5 100644
--- a/arch/mips/kernel/scall64-64.S
+++ b/arch/mips/kernel/scall64-64.S
@@ -473,4 +473,8 @@ sys_call_table:
473 PTR sys_epoll_pwait 473 PTR sys_epoll_pwait
474 PTR sys_ioprio_set 474 PTR sys_ioprio_set
475 PTR sys_ioprio_get 475 PTR sys_ioprio_get
476 PTR sys_utimensat /* 5275 */
477 PTR sys_signalfd
478 PTR sys_timerfd
479 PTR sys_eventfd
476 .size sys_call_table,.-sys_call_table 480 .size sys_call_table,.-sys_call_table
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index 1631035ffc24..532a2f3b42fc 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -399,4 +399,8 @@ EXPORT(sysn32_call_table)
399 PTR compat_sys_epoll_pwait 399 PTR compat_sys_epoll_pwait
400 PTR sys_ioprio_set 400 PTR sys_ioprio_set
401 PTR sys_ioprio_get 401 PTR sys_ioprio_get
402 PTR compat_sys_utimensat
403 PTR compat_sys_signalfd /* 5280 */
404 PTR compat_sys_timerfd
405 PTR sys_eventfd
402 .size sysn32_call_table,.-sysn32_call_table 406 .size sysn32_call_table,.-sysn32_call_table
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index 2aa99426ac1c..6bbe0f4ed8ba 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -521,4 +521,8 @@ sys_call_table:
521 PTR compat_sys_epoll_pwait 521 PTR compat_sys_epoll_pwait
522 PTR sys_ioprio_set 522 PTR sys_ioprio_set
523 PTR sys_ioprio_get /* 4315 */ 523 PTR sys_ioprio_get /* 4315 */
524 PTR compat_sys_utimensat
525 PTR compat_sys_signalfd
526 PTR compat_sys_timerfd
527 PTR sys_eventfd
524 .size sys_call_table,.-sys_call_table 528 .size sys_call_table,.-sys_call_table
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index c46e479c992b..67edfa7ed93a 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -68,7 +68,7 @@ extern ATTRIB_NORET void cpu_idle(void);
68 * First C code run on the secondary CPUs after being started up by 68 * First C code run on the secondary CPUs after being started up by
69 * the master. 69 * the master.
70 */ 70 */
71asmlinkage void start_secondary(void) 71asmlinkage __cpuinit void start_secondary(void)
72{ 72{
73 unsigned int cpu; 73 unsigned int cpu;
74 74
diff --git a/arch/mips/kernel/smtc-asm.S b/arch/mips/kernel/smtc-asm.S
index 921207c4a83c..20938a4cb52d 100644
--- a/arch/mips/kernel/smtc-asm.S
+++ b/arch/mips/kernel/smtc-asm.S
@@ -121,10 +121,7 @@ LEAF(self_ipi)
121 subu t1,sp,PT_SIZE 121 subu t1,sp,PT_SIZE
122 sw ra,PT_EPC(t1) 122 sw ra,PT_EPC(t1)
123 sw a0,PT_PADSLOT4(t1) 123 sw a0,PT_PADSLOT4(t1)
124 LONG_L s0, TI_REGS($28)
125 LONG_S sp, TI_REGS($28)
126 la t2,ipi_decode 124 la t2,ipi_decode
127 LONG_S s0, TI_REGS($28)
128 sw t2,PT_PADSLOT5(t1) 125 sw t2,PT_PADSLOT5(t1)
129 /* Save pre-disable value of TCStatus */ 126 /* Save pre-disable value of TCStatus */
130 sw t0,PT_TCSTATUS(t1) 127 sw t0,PT_TCSTATUS(t1)
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
index b361edb83dc6..21eb5993a19f 100644
--- a/arch/mips/kernel/smtc.c
+++ b/arch/mips/kernel/smtc.c
@@ -611,12 +611,12 @@ void smtc_cpus_done(void)
611int setup_irq_smtc(unsigned int irq, struct irqaction * new, 611int setup_irq_smtc(unsigned int irq, struct irqaction * new,
612 unsigned long hwmask) 612 unsigned long hwmask)
613{ 613{
614#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG
614 unsigned int vpe = current_cpu_data.vpe_id; 615 unsigned int vpe = current_cpu_data.vpe_id;
615 616
616 irq_hwmask[irq] = hwmask;
617#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG
618 vpemask[vpe][irq - MIPSCPU_INT_BASE] = 1; 617 vpemask[vpe][irq - MIPSCPU_INT_BASE] = 1;
619#endif 618#endif
619 irq_hwmask[irq] = hwmask;
620 620
621 return setup_irq(irq, new); 621 return setup_irq(irq, new);
622} 622}
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 3f58b6ac1358..a7a17eb9bfcd 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -11,6 +11,7 @@
11 * Copyright (C) 2000, 01 MIPS Technologies, Inc. 11 * Copyright (C) 2000, 01 MIPS Technologies, Inc.
12 * Copyright (C) 2002, 2003, 2004, 2005 Maciej W. Rozycki 12 * Copyright (C) 2002, 2003, 2004, 2005 Maciej W. Rozycki
13 */ 13 */
14#include <linux/bug.h>
14#include <linux/init.h> 15#include <linux/init.h>
15#include <linux/mm.h> 16#include <linux/mm.h>
16#include <linux/module.h> 17#include <linux/module.h>
@@ -1190,8 +1191,8 @@ static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs)
1190 1191
1191 memcpy (b, &except_vec_vi, handler_len); 1192 memcpy (b, &except_vec_vi, handler_len);
1192#ifdef CONFIG_MIPS_MT_SMTC 1193#ifdef CONFIG_MIPS_MT_SMTC
1193 if (n > 7) 1194 BUG_ON(n > 7); /* Vector index %d exceeds SMTC maximum. */
1194 printk("Vector index %d exceeds SMTC maximum\n", n); 1195
1195 w = (u32 *)(b + mori_offset); 1196 w = (u32 *)(b + mori_offset);
1196 *w = (*w & 0xffff0000) | (0x100 << n); 1197 *w = (*w & 0xffff0000) | (0x100 << n);
1197#endif /* CONFIG_MIPS_MT_SMTC */ 1198#endif /* CONFIG_MIPS_MT_SMTC */
@@ -1383,6 +1384,13 @@ void __init per_cpu_trap_init(void)
1383 cpu_cache_init(); 1384 cpu_cache_init();
1384 tlb_init(); 1385 tlb_init();
1385#ifdef CONFIG_MIPS_MT_SMTC 1386#ifdef CONFIG_MIPS_MT_SMTC
1387 } else if (!secondaryTC) {
1388 /*
1389 * First TC in non-boot VPE must do subset of tlb_init()
1390 * for MMU countrol registers.
1391 */
1392 write_c0_pagemask(PM_DEFAULT_MASK);
1393 write_c0_wired(0);
1386 } 1394 }
1387#endif /* CONFIG_MIPS_MT_SMTC */ 1395#endif /* CONFIG_MIPS_MT_SMTC */
1388} 1396}
@@ -1531,8 +1539,7 @@ void __init trap_init(void)
1531 if (cpu_has_mipsmt) 1539 if (cpu_has_mipsmt)
1532 set_except_vector(25, handle_mt); 1540 set_except_vector(25, handle_mt);
1533 1541
1534 if (cpu_has_dsp) 1542 set_except_vector(26, handle_dsp);
1535 set_except_vector(26, handle_dsp);
1536 1543
1537 if (cpu_has_vce) 1544 if (cpu_has_vce)
1538 /* Special exception: R4[04]00 uses also the divec space. */ 1545 /* Special exception: R4[04]00 uses also the divec space. */
diff --git a/arch/mips/mips-boards/atlas/atlas_int.c b/arch/mips/mips-boards/atlas/atlas_int.c
index dfa0acbd7fc2..9f49da95aacf 100644
--- a/arch/mips/mips-boards/atlas/atlas_int.c
+++ b/arch/mips/mips-boards/atlas/atlas_int.c
@@ -248,14 +248,13 @@ void __init arch_init_irq(void)
248 case MIPS_REVISION_CORID_CORE_24K: 248 case MIPS_REVISION_CORID_CORE_24K:
249 case MIPS_REVISION_CORID_CORE_EMUL_MSC: 249 case MIPS_REVISION_CORID_CORE_EMUL_MSC:
250 if (cpu_has_veic) 250 if (cpu_has_veic)
251 init_msc_irqs (MSC01E_INT_BASE, 251 init_msc_irqs (MSC01E_INT_BASE, MSC01E_INT_BASE,
252 msc_eicirqmap, msc_nr_eicirqs); 252 msc_eicirqmap, msc_nr_eicirqs);
253 else 253 else
254 init_msc_irqs (MSC01C_INT_BASE, 254 init_msc_irqs (MSC01E_INT_BASE, MSC01C_INT_BASE,
255 msc_irqmap, msc_nr_irqs); 255 msc_irqmap, msc_nr_irqs);
256 } 256 }
257 257
258
259 if (cpu_has_veic) { 258 if (cpu_has_veic) {
260 set_vi_handler (MSC01E_INT_ATLAS, atlas_hw0_irqdispatch); 259 set_vi_handler (MSC01E_INT_ATLAS, atlas_hw0_irqdispatch);
261 setup_irq (MSC01E_INT_BASE + MSC01E_INT_ATLAS, &atlasirq); 260 setup_irq (MSC01E_INT_BASE + MSC01E_INT_ATLAS, &atlasirq);
diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c
index 37735bfc3afd..b41db9e7ab1f 100644
--- a/arch/mips/mips-boards/generic/time.c
+++ b/arch/mips/mips-boards/generic/time.c
@@ -88,8 +88,6 @@ irqreturn_t mips_timer_interrupt(int irq, void *dev_id)
88 * the general MIPS timer_interrupt routine. 88 * the general MIPS timer_interrupt routine.
89 */ 89 */
90 90
91 int vpflags;
92
93 /* 91 /*
94 * We could be here due to timer interrupt, 92 * We could be here due to timer interrupt,
95 * perf counter overflow, or both. 93 * perf counter overflow, or both.
@@ -98,15 +96,6 @@ irqreturn_t mips_timer_interrupt(int irq, void *dev_id)
98 perf_irq(); 96 perf_irq();
99 97
100 if (read_c0_cause() & (1 << 30)) { 98 if (read_c0_cause() & (1 << 30)) {
101 /* If timer interrupt, make it de-assert */
102 write_c0_compare (read_c0_count() - 1);
103 /*
104 * DVPE is necessary so long as cross-VPE interrupts
105 * are done via read-modify-write of Cause register.
106 */
107 vpflags = dvpe();
108 clear_c0_cause(CPUCTR_IMASKBIT);
109 evpe(vpflags);
110 /* 99 /*
111 * There are things we only want to do once per tick 100 * There are things we only want to do once per tick
112 * in an "MP" system. One TC of each VPE will take 101 * in an "MP" system. One TC of each VPE will take
@@ -115,14 +104,13 @@ irqreturn_t mips_timer_interrupt(int irq, void *dev_id)
115 * the tick on VPE 0 to run the full timer_interrupt(). 104 * the tick on VPE 0 to run the full timer_interrupt().
116 */ 105 */
117 if (cpu_data[cpu].vpe_id == 0) { 106 if (cpu_data[cpu].vpe_id == 0) {
118 timer_interrupt(irq, NULL); 107 timer_interrupt(irq, NULL);
119 smtc_timer_broadcast(cpu_data[cpu].vpe_id);
120 } else { 108 } else {
121 write_c0_compare(read_c0_count() + 109 write_c0_compare(read_c0_count() +
122 (mips_hpt_frequency/HZ)); 110 (mips_hpt_frequency/HZ));
123 local_timer_interrupt(irq, dev_id); 111 local_timer_interrupt(irq, dev_id);
124 smtc_timer_broadcast(cpu_data[cpu].vpe_id);
125 } 112 }
113 smtc_timer_broadcast(cpu_data[cpu].vpe_id);
126 } 114 }
127#else /* CONFIG_MIPS_MT_SMTC */ 115#else /* CONFIG_MIPS_MT_SMTC */
128 int r2 = cpu_has_mips_r2; 116 int r2 = cpu_has_mips_r2;
diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c
index fe8a1066aec1..e5e023f50a07 100644
--- a/arch/mips/sgi-ip27/ip27-memory.c
+++ b/arch/mips/sgi-ip27/ip27-memory.c
@@ -517,7 +517,7 @@ void __init paging_init(void)
517 pfn_t start_pfn = slot_getbasepfn(node, 0); 517 pfn_t start_pfn = slot_getbasepfn(node, 0);
518 pfn_t end_pfn = node_getmaxclick(node) + 1; 518 pfn_t end_pfn = node_getmaxclick(node) + 1;
519 519
520 zones_size[ZONE_DMA] = end_pfn - start_pfn; 520 zones_size[ZONE_NORMAL] = end_pfn - start_pfn;
521 free_area_init_node(node, NODE_DATA(node), 521 free_area_init_node(node, NODE_DATA(node),
522 zones_size, start_pfn, NULL); 522 zones_size, start_pfn, NULL);
523 523