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.c36
1 files changed, 10 insertions, 26 deletions
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
index 342d873b2ecc..16aa5d37117c 100644
--- a/arch/mips/kernel/smtc.c
+++ b/arch/mips/kernel/smtc.c
@@ -86,25 +86,11 @@ unsigned int smtc_status = 0;
86 86
87/* Boot command line configuration overrides */ 87/* Boot command line configuration overrides */
88 88
89static int vpelimit = 0;
90static int tclimit = 0;
91static int ipibuffers = 0; 89static int ipibuffers = 0;
92static int nostlb = 0; 90static int nostlb = 0;
93static int asidmask = 0; 91static int asidmask = 0;
94unsigned long smtc_asid_mask = 0xff; 92unsigned long smtc_asid_mask = 0xff;
95 93
96static int __init maxvpes(char *str)
97{
98 get_option(&str, &vpelimit);
99 return 1;
100}
101
102static int __init maxtcs(char *str)
103{
104 get_option(&str, &tclimit);
105 return 1;
106}
107
108static int __init ipibufs(char *str) 94static int __init ipibufs(char *str)
109{ 95{
110 get_option(&str, &ipibuffers); 96 get_option(&str, &ipibuffers);
@@ -137,8 +123,6 @@ static int __init asidmask_set(char *str)
137 return 1; 123 return 1;
138} 124}
139 125
140__setup("maxvpes=", maxvpes);
141__setup("maxtcs=", maxtcs);
142__setup("ipibufs=", ipibufs); 126__setup("ipibufs=", ipibufs);
143__setup("nostlb", stlb_disable); 127__setup("nostlb", stlb_disable);
144__setup("asidmask=", asidmask_set); 128__setup("asidmask=", asidmask_set);
@@ -168,9 +152,9 @@ static int __init tintq(char *str)
168 152
169__setup("tintq=", tintq); 153__setup("tintq=", tintq);
170 154
171int imstuckcount[2][8]; 155static int imstuckcount[2][8];
172/* vpemask represents IM/IE bits of per-VPE Status registers, low-to-high */ 156/* vpemask represents IM/IE bits of per-VPE Status registers, low-to-high */
173int vpemask[2][8] = { 157static int vpemask[2][8] = {
174 {0, 0, 1, 0, 0, 0, 0, 1}, 158 {0, 0, 1, 0, 0, 0, 0, 1},
175 {0, 0, 0, 0, 0, 0, 0, 1} 159 {0, 0, 0, 0, 0, 0, 0, 1}
176}; 160};
@@ -540,7 +524,7 @@ void mipsmt_prepare_cpus(void)
540 * (unsigned long)idle->thread_info the gp 524 * (unsigned long)idle->thread_info the gp
541 * 525 *
542 */ 526 */
543void smtc_boot_secondary(int cpu, struct task_struct *idle) 527void __cpuinit smtc_boot_secondary(int cpu, struct task_struct *idle)
544{ 528{
545 extern u32 kernelsp[NR_CPUS]; 529 extern u32 kernelsp[NR_CPUS];
546 long flags; 530 long flags;
@@ -876,7 +860,7 @@ void deferred_smtc_ipi(void)
876 * Send clock tick to all TCs except the one executing the funtion 860 * Send clock tick to all TCs except the one executing the funtion
877 */ 861 */
878 862
879void smtc_timer_broadcast(int vpe) 863void smtc_timer_broadcast(void)
880{ 864{
881 int cpu; 865 int cpu;
882 int myTC = cpu_data[smp_processor_id()].tc_id; 866 int myTC = cpu_data[smp_processor_id()].tc_id;
@@ -975,7 +959,12 @@ static void ipi_irq_dispatch(void)
975 do_IRQ(cpu_ipi_irq); 959 do_IRQ(cpu_ipi_irq);
976} 960}
977 961
978static struct irqaction irq_ipi; 962static struct irqaction irq_ipi = {
963 .handler = ipi_interrupt,
964 .flags = IRQF_DISABLED,
965 .name = "SMTC_IPI",
966 .flags = IRQF_PERCPU
967};
979 968
980static void setup_cross_vpe_interrupts(unsigned int nvpe) 969static void setup_cross_vpe_interrupts(unsigned int nvpe)
981{ 970{
@@ -987,13 +976,8 @@ static void setup_cross_vpe_interrupts(unsigned int nvpe)
987 976
988 set_vi_handler(MIPS_CPU_IPI_IRQ, ipi_irq_dispatch); 977 set_vi_handler(MIPS_CPU_IPI_IRQ, ipi_irq_dispatch);
989 978
990 irq_ipi.handler = ipi_interrupt;
991 irq_ipi.flags = IRQF_DISABLED;
992 irq_ipi.name = "SMTC_IPI";
993
994 setup_irq_smtc(cpu_ipi_irq, &irq_ipi, (0x100 << MIPS_CPU_IPI_IRQ)); 979 setup_irq_smtc(cpu_ipi_irq, &irq_ipi, (0x100 << MIPS_CPU_IPI_IRQ));
995 980
996 irq_desc[cpu_ipi_irq].status |= IRQ_PER_CPU;
997 set_irq_handler(cpu_ipi_irq, handle_percpu_irq); 981 set_irq_handler(cpu_ipi_irq, handle_percpu_irq);
998} 982}
999 983