aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/smtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/smtc.c')
-rw-r--r--arch/mips/kernel/smtc.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
index 1d47843d3cc0..7186222dc5bb 100644
--- a/arch/mips/kernel/smtc.c
+++ b/arch/mips/kernel/smtc.c
@@ -41,6 +41,7 @@
41#include <asm/addrspace.h> 41#include <asm/addrspace.h>
42#include <asm/smtc.h> 42#include <asm/smtc.h>
43#include <asm/smtc_proc.h> 43#include <asm/smtc_proc.h>
44#include <asm/setup.h>
44 45
45/* 46/*
46 * SMTC Kernel needs to manipulate low-level CPU interrupt mask 47 * SMTC Kernel needs to manipulate low-level CPU interrupt mask
@@ -235,7 +236,7 @@ static void smtc_configure_tlb(void)
235 mips_ihb(); 236 mips_ihb();
236 /* No need to un-Halt - that happens later anyway */ 237 /* No need to un-Halt - that happens later anyway */
237 for (i=0; i < vpes; i++) { 238 for (i=0; i < vpes; i++) {
238 write_tc_c0_tcbind(i); 239 write_tc_c0_tcbind(i);
239 /* 240 /*
240 * To be 100% sure we're really getting the right 241 * To be 100% sure we're really getting the right
241 * information, we exit the configuration state 242 * information, we exit the configuration state
@@ -286,7 +287,7 @@ static void smtc_configure_tlb(void)
286 287
287/* 288/*
288 * Incrementally build the CPU map out of constituent MIPS MT cores, 289 * Incrementally build the CPU map out of constituent MIPS MT cores,
289 * using the specified available VPEs and TCs. Plaform code needs 290 * using the specified available VPEs and TCs. Plaform code needs
290 * to ensure that each MIPS MT core invokes this routine on reset, 291 * to ensure that each MIPS MT core invokes this routine on reset,
291 * one at a time(!). 292 * one at a time(!).
292 * 293 *
@@ -348,7 +349,7 @@ static void smtc_tc_setup(int vpe, int tc, int cpu)
348 { 349 {
349 /* 350 /*
350 * FIXME: Multi-core SMTC hasn't been tested and the 351 * FIXME: Multi-core SMTC hasn't been tested and the
351 * maximum number of VPEs may change. 352 * maximum number of VPEs may change.
352 */ 353 */
353 cp1contexts[0] = smtc_nconf1[0] - 1; 354 cp1contexts[0] = smtc_nconf1[0] - 1;
354 cp1contexts[1] = smtc_nconf1[1]; 355 cp1contexts[1] = smtc_nconf1[1];
@@ -761,9 +762,9 @@ void smtc_forward_irq(struct irq_data *d)
761 * mask has been purged of bits corresponding to nonexistent and 762 * mask has been purged of bits corresponding to nonexistent and
762 * offline "CPUs", and to TCs bound to VPEs other than the VPE 763 * offline "CPUs", and to TCs bound to VPEs other than the VPE
763 * connected to the physical interrupt input for the interrupt 764 * connected to the physical interrupt input for the interrupt
764 * in question. Otherwise we have a nasty problem with interrupt 765 * in question. Otherwise we have a nasty problem with interrupt
765 * mask management. This is best handled in non-performance-critical 766 * mask management. This is best handled in non-performance-critical
766 * platform IRQ affinity setting code, to minimize interrupt-time 767 * platform IRQ affinity setting code, to minimize interrupt-time
767 * checks. 768 * checks.
768 */ 769 */
769 770
@@ -899,10 +900,10 @@ void smtc_send_ipi(int cpu, int type, unsigned int action)
899 mips_ihb(); 900 mips_ihb();
900 901
901 /* 902 /*
902 * Inspect TCStatus - if IXMT is set, we have to queue 903 * Inspect TCStatus - if IXMT is set, we have to queue
903 * a message. Otherwise, we set up the "interrupt" 904 * a message. Otherwise, we set up the "interrupt"
904 * of the other TC 905 * of the other TC
905 */ 906 */
906 tcstatus = read_tc_c0_tcstatus(); 907 tcstatus = read_tc_c0_tcstatus();
907 908
908 if ((tcstatus & TCSTATUS_IXMT) != 0) { 909 if ((tcstatus & TCSTATUS_IXMT) != 0) {
@@ -964,7 +965,7 @@ static void post_direct_ipi(int cpu, struct smtc_ipi *pipi)
964 * CU bit of Status is indicator that TC was 965 * CU bit of Status is indicator that TC was
965 * already running on a kernel stack... 966 * already running on a kernel stack...
966 */ 967 */
967 if (tcstatus & ST0_CU0) { 968 if (tcstatus & ST0_CU0) {
968 /* Note that this "- 1" is pointer arithmetic */ 969 /* Note that this "- 1" is pointer arithmetic */
969 kstack = ((struct pt_regs *)read_tc_gpr_sp()) - 1; 970 kstack = ((struct pt_regs *)read_tc_gpr_sp()) - 1;
970 } else { 971 } else {
@@ -1288,7 +1289,7 @@ void smtc_idle_loop_hook(void)
1288 for (tc = 0; tc < hook_ntcs; tc++) { 1289 for (tc = 0; tc < hook_ntcs; tc++) {
1289 tcnoprog[tc] = 0; 1290 tcnoprog[tc] = 0;
1290 clock_hang_reported[tc] = 0; 1291 clock_hang_reported[tc] = 0;
1291 } 1292 }
1292 for (vpe = 0; vpe < 2; vpe++) 1293 for (vpe = 0; vpe < 2; vpe++)
1293 for (im = 0; im < 8; im++) 1294 for (im = 0; im < 8; im++)
1294 imstuckcount[vpe][im] = 0; 1295 imstuckcount[vpe][im] = 0;
@@ -1485,7 +1486,7 @@ static int halt_state_save[NR_CPUS];
1485 1486
1486/* 1487/*
1487 * To really, really be sure that nothing is being done 1488 * To really, really be sure that nothing is being done
1488 * by other TCs, halt them all. This code assumes that 1489 * by other TCs, halt them all. This code assumes that
1489 * a DVPE has already been done, so while their Halted 1490 * a DVPE has already been done, so while their Halted
1490 * state is theoretically architecturally unstable, in 1491 * state is theoretically architecturally unstable, in
1491 * practice, it's not going to change while we're looking 1492 * practice, it's not going to change while we're looking