Changeset 2b698d8 in mainline
- Timestamp:
- 2010-10-01T18:57:06Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 49d871ea
- Parents:
- 9d5bb4e
- Location:
- kernel/arch/mips32
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/src/interrupt.c
r9d5bb4e r2b698d8 38 38 #include <arch.h> 39 39 #include <arch/cp0.h> 40 #include <arch/smp/dorder.h> 40 41 #include <time/clock.h> 41 42 #include <ipc/sysipc.h> … … 48 49 function virtual_timer_fnc = NULL; 49 50 static irq_t timer_irq; 51 static irq_t dorder_irq; 50 52 51 53 // TODO: This is SMP unsafe!!! … … 149 151 } 150 152 153 static irq_ownership_t dorder_claim(irq_t *irq) 154 { 155 return IRQ_ACCEPT; 156 } 157 158 static void dorder_irq_handler(irq_t *irq) 159 { 160 dorder_ipi_ack(1 << dorder_cpuid()); 161 } 162 151 163 /* Initialize basic tables for exception dispatching */ 152 164 void interrupt_init(void) … … 163 175 timer_start(); 164 176 cp0_unmask_int(TIMER_IRQ); 177 178 irq_initialize(&dorder_irq); 179 dorder_irq.devno = device_assign_devno(); 180 dorder_irq.inr = DORDER_IRQ; 181 dorder_irq.claim = dorder_claim; 182 dorder_irq.handler = dorder_irq_handler; 183 irq_register(&dorder_irq); 184 185 cp0_unmask_int(DORDER_IRQ); 165 186 } 166 187 -
kernel/arch/mips32/src/smp/dorder.c
r9d5bb4e r2b698d8 33 33 */ 34 34 35 #include <typedefs.h> 35 36 #include <smp/ipi.h> 37 #include <arch/smp/dorder.h> 38 39 #define MSIM_DORDER_ADDRESS 0xB0000004 36 40 37 41 #ifdef CONFIG_SMP 38 42 39 #define MSIM_DORDER_ADDRESS 0xB000000440 41 43 void ipi_broadcast_arch(int ipi) 42 44 { 43 *((volatile u nsigned int *) MSIM_DORDER_ADDRESS) = 0x7FFFFFFF;45 *((volatile uint32_t *) MSIM_DORDER_ADDRESS) = 0x7fffffff; 44 46 } 45 47 46 48 #endif 47 49 50 uint32_t dorder_cpuid(void) 51 { 52 return *((volatile uint32_t *) MSIM_DORDER_ADDRESS); 53 } 54 55 void dorder_ipi_ack(uint32_t mask) 56 { 57 *((volatile uint32_t *) (MSIM_DORDER_ADDRESS + 4)) = mask; 58 } 59 48 60 /** @} 49 61 */
Note:
See TracChangeset
for help on using the changeset viewer.