Changeset 965dc18 in mainline for kernel/arch/sparc64/src/smp/ipi.c
- Timestamp:
- 2008-12-05T19:59:03Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 49093a4
- Parents:
- 0258e67
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/smp/ipi.c
r0258e67 r965dc18 47 47 #include <panic.h> 48 48 49 /** Set the contents of the outgoing interrupt vector data. 50 * 51 * The first data item (data 0) will be set to the value of func, the 52 * rest of the vector will contain zeros. 53 * 54 * This is a helper function used from within the cross_call function. 55 * 56 * @param func value the first data item of the vector will be set to 57 */ 58 static inline void set_intr_w_data(void (* func)(void)) 59 { 60 #if defined (US) 61 asi_u64_write(ASI_INTR_W, ASI_UDB_INTR_W_DATA_0, (uintptr_t) func); 62 asi_u64_write(ASI_INTR_W, ASI_UDB_INTR_W_DATA_1, 0); 63 asi_u64_write(ASI_INTR_W, ASI_UDB_INTR_W_DATA_2, 0); 64 #elif defined (US3) 65 asi_u64_write(ASI_INTR_W, VA_INTR_W_DATA_0, (uintptr_t) func); 66 asi_u64_write(ASI_INTR_W, VA_INTR_W_DATA_1, 0); 67 asi_u64_write(ASI_INTR_W, VA_INTR_W_DATA_2, 0); 68 asi_u64_write(ASI_INTR_W, VA_INTR_W_DATA_3, 0); 69 asi_u64_write(ASI_INTR_W, VA_INTR_W_DATA_4, 0); 70 asi_u64_write(ASI_INTR_W, VA_INTR_W_DATA_5, 0); 71 asi_u64_write(ASI_INTR_W, VA_INTR_W_DATA_6, 0); 72 asi_u64_write(ASI_INTR_W, VA_INTR_W_DATA_7, 0); 73 #endif 74 } 75 49 76 /** Invoke function on another processor. 50 77 * … … 74 101 panic("Interrupt Dispatch Status busy bit set\n"); 75 102 103 ASSERT(!(pstate_read() & PSTATE_IE_BIT)); 104 76 105 do { 77 asi_u64_write(ASI_UDB_INTR_W, ASI_UDB_INTR_W_DATA_0, 78 (uintptr_t) func); 79 asi_u64_write(ASI_UDB_INTR_W, ASI_UDB_INTR_W_DATA_1, 0); 80 asi_u64_write(ASI_UDB_INTR_W, ASI_UDB_INTR_W_DATA_2, 0); 81 asi_u64_write(ASI_UDB_INTR_W, 106 set_intr_w_data(func); 107 asi_u64_write(ASI_INTR_W, 82 108 (mid << INTR_VEC_DISPATCH_MID_SHIFT) | 83 ASI_UDB_INTR_W_DISPATCH, 0);109 VA_INTR_W_DISPATCH, 0); 84 110 85 111 membar();
Note:
See TracChangeset
for help on using the changeset viewer.