smp-mt.c (9cdf083f981b8d37b3212400a359368661385099) | smp-mt.c (97dcb82de6cc99a5669eb8e342efc24cceb1e77e) |
---|---|
1/* 2 * This program is free software; you can distribute it and/or modify it 3 * under the terms of the GNU General Public License (Version 2) as 4 * published by the Free Software Foundation. 5 * 6 * This program is distributed in the hope it will be useful, but WITHOUT 7 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 8 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --- 21 unchanged lines hidden (view full) --- 30#include <asm/system.h> 31#include <asm/hardirq.h> 32#include <asm/mmu_context.h> 33#include <asm/smp.h> 34#include <asm/time.h> 35#include <asm/mipsregs.h> 36#include <asm/mipsmtregs.h> 37#include <asm/mips_mt.h> | 1/* 2 * This program is free software; you can distribute it and/or modify it 3 * under the terms of the GNU General Public License (Version 2) as 4 * published by the Free Software Foundation. 5 * 6 * This program is distributed in the hope it will be useful, but WITHOUT 7 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 8 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --- 21 unchanged lines hidden (view full) --- 30#include <asm/system.h> 31#include <asm/hardirq.h> 32#include <asm/mmu_context.h> 33#include <asm/smp.h> 34#include <asm/time.h> 35#include <asm/mipsregs.h> 36#include <asm/mipsmtregs.h> 37#include <asm/mips_mt.h> |
38#include <asm/mips-boards/maltaint.h> /* This is f*cking wrong */ | |
39 40#define MIPS_CPU_IPI_RESCHED_IRQ 0 41#define MIPS_CPU_IPI_CALL_IRQ 1 42 43static int cpu_ipi_resched_irq, cpu_ipi_call_irq; 44 45#if 0 46static void dump_mtregisters(int vpe, int tc) --- 56 unchanged lines hidden (view full) --- 103 } 104 } 105 106 clear_c0_mvpcontrol(MVPCONTROL_VPC); 107} 108 109static void ipi_resched_dispatch(void) 110{ | 38 39#define MIPS_CPU_IPI_RESCHED_IRQ 0 40#define MIPS_CPU_IPI_CALL_IRQ 1 41 42static int cpu_ipi_resched_irq, cpu_ipi_call_irq; 43 44#if 0 45static void dump_mtregisters(int vpe, int tc) --- 56 unchanged lines hidden (view full) --- 102 } 103 } 104 105 clear_c0_mvpcontrol(MVPCONTROL_VPC); 106} 107 108static void ipi_resched_dispatch(void) 109{ |
111 do_IRQ(MIPSCPU_INT_BASE + MIPS_CPU_IPI_RESCHED_IRQ); | 110 do_IRQ(MIPS_CPU_IRQ_BASE + MIPS_CPU_IPI_RESCHED_IRQ); |
112} 113 114static void ipi_call_dispatch(void) 115{ | 111} 112 113static void ipi_call_dispatch(void) 114{ |
116 do_IRQ(MIPSCPU_INT_BASE + MIPS_CPU_IPI_CALL_IRQ); | 115 do_IRQ(MIPS_CPU_IRQ_BASE + MIPS_CPU_IPI_CALL_IRQ); |
117} 118 119static irqreturn_t ipi_resched_interrupt(int irq, void *dev_id) 120{ 121 return IRQ_HANDLED; 122} 123 124static irqreturn_t ipi_call_interrupt(int irq, void *dev_id) --- 140 unchanged lines hidden (view full) --- 265void __init plat_prepare_cpus(unsigned int max_cpus) 266{ 267 /* set up ipi interrupts */ 268 if (cpu_has_vint) { 269 set_vi_handler(MIPS_CPU_IPI_RESCHED_IRQ, ipi_resched_dispatch); 270 set_vi_handler(MIPS_CPU_IPI_CALL_IRQ, ipi_call_dispatch); 271 } 272 | 116} 117 118static irqreturn_t ipi_resched_interrupt(int irq, void *dev_id) 119{ 120 return IRQ_HANDLED; 121} 122 123static irqreturn_t ipi_call_interrupt(int irq, void *dev_id) --- 140 unchanged lines hidden (view full) --- 264void __init plat_prepare_cpus(unsigned int max_cpus) 265{ 266 /* set up ipi interrupts */ 267 if (cpu_has_vint) { 268 set_vi_handler(MIPS_CPU_IPI_RESCHED_IRQ, ipi_resched_dispatch); 269 set_vi_handler(MIPS_CPU_IPI_CALL_IRQ, ipi_call_dispatch); 270 } 271 |
273 cpu_ipi_resched_irq = MIPSCPU_INT_BASE + MIPS_CPU_IPI_RESCHED_IRQ; 274 cpu_ipi_call_irq = MIPSCPU_INT_BASE + MIPS_CPU_IPI_CALL_IRQ; | 272 cpu_ipi_resched_irq = MIPS_CPU_IRQ_BASE + MIPS_CPU_IPI_RESCHED_IRQ; 273 cpu_ipi_call_irq = MIPS_CPU_IRQ_BASE + MIPS_CPU_IPI_CALL_IRQ; |
275 276 setup_irq(cpu_ipi_resched_irq, &irq_resched); 277 setup_irq(cpu_ipi_call_irq, &irq_call); 278 279 /* need to mark IPI's as IRQ_PER_CPU */ 280 irq_desc[cpu_ipi_resched_irq].status |= IRQ_PER_CPU; 281 set_irq_handler(cpu_ipi_resched_irq, handle_percpu_irq); 282 irq_desc[cpu_ipi_call_irq].status |= IRQ_PER_CPU; --- 96 unchanged lines hidden --- | 274 275 setup_irq(cpu_ipi_resched_irq, &irq_resched); 276 setup_irq(cpu_ipi_call_irq, &irq_call); 277 278 /* need to mark IPI's as IRQ_PER_CPU */ 279 irq_desc[cpu_ipi_resched_irq].status |= IRQ_PER_CPU; 280 set_irq_handler(cpu_ipi_resched_irq, handle_percpu_irq); 281 irq_desc[cpu_ipi_call_irq].status |= IRQ_PER_CPU; --- 96 unchanged lines hidden --- |