diff options
Diffstat (limited to 'arch/mips/kernel/smtc.c')
-rw-r--r-- | arch/mips/kernel/smtc.c | 36 |
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 | ||
89 | static int vpelimit = 0; | ||
90 | static int tclimit = 0; | ||
91 | static int ipibuffers = 0; | 89 | static int ipibuffers = 0; |
92 | static int nostlb = 0; | 90 | static int nostlb = 0; |
93 | static int asidmask = 0; | 91 | static int asidmask = 0; |
94 | unsigned long smtc_asid_mask = 0xff; | 92 | unsigned long smtc_asid_mask = 0xff; |
95 | 93 | ||
96 | static int __init maxvpes(char *str) | ||
97 | { | ||
98 | get_option(&str, &vpelimit); | ||
99 | return 1; | ||
100 | } | ||
101 | |||
102 | static int __init maxtcs(char *str) | ||
103 | { | ||
104 | get_option(&str, &tclimit); | ||
105 | return 1; | ||
106 | } | ||
107 | |||
108 | static int __init ipibufs(char *str) | 94 | static 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 | ||
171 | int imstuckcount[2][8]; | 155 | static 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 */ |
173 | int vpemask[2][8] = { | 157 | static 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 | */ |
543 | void smtc_boot_secondary(int cpu, struct task_struct *idle) | 527 | void __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 | ||
879 | void smtc_timer_broadcast(int vpe) | 863 | void 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 | ||
978 | static struct irqaction irq_ipi; | 962 | static struct irqaction irq_ipi = { |
963 | .handler = ipi_interrupt, | ||
964 | .flags = IRQF_DISABLED, | ||
965 | .name = "SMTC_IPI", | ||
966 | .flags = IRQF_PERCPU | ||
967 | }; | ||
979 | 968 | ||
980 | static void setup_cross_vpe_interrupts(unsigned int nvpe) | 969 | static 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 | ||