Changeset acee917 in mainline
- Timestamp:
- 2009-01-04T22:51:09Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 59b2adb
- Parents:
- 0e56eb1a
- Location:
- kernel/arch/ia64/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/src/smp/smp.c
r0e56eb1a racee917 74 74 static void ipi_broadcast_arch_all(int ipi) 75 75 { 76 int id, eid;76 int id, eid; 77 77 int myid, myeid; 78 78 … … 88 88 void ipi_broadcast_arch(int ipi ) 89 89 { 90 int id, eid;91 int myid, myeid;90 int id, eid; 91 int myid, myeid; 92 92 93 93 myid = ia64_get_cpu_id(); … … 107 107 108 108 /* 109 * If we have not system prepared by hello, we are not able to start109 * If we have not got system prepared by hello, we are not able to start 110 110 * AP's. This means we are running on a simulator. 111 111 */ … … 130 130 void kmp(void *arg __attribute__((unused))) 131 131 { 132 int id, eid;132 int id, eid; 133 133 int myid, myeid; 134 134 … … 166 166 #endif 167 167 168 169 #ifndef CONFIG_SMP170 171 /* This is just a hack for linking with assembler - may be removed in future. */172 void main_ap(void);173 void main_ap(void)174 {175 while(1)176 ;177 }178 179 #endif180 181 168 /** @} 182 169 */ -
kernel/arch/ia64/src/start.S
r0e56eb1a racee917 50 50 .auto 51 51 52 #ifdef CONFIG_SMP 52 53 # Identify self(CPU) in OS structures by ID / EID 53 54 … … 60 61 add r8 = r8, r9 61 62 st1 [r8] = r10 63 #endif 62 64 63 65 mov psr.l = r0 … … 80 82 mov cr.ifa = r8 81 83 82 mov r11 = cr.itir ;;83 movl r10 = (KERNEL_PAGE_WIDTH << PS_SHIFT) ;;84 or r10 = r10, r11 ;;85 mov cr.itir = r10 ;;84 mov r11 = cr.itir 85 movl r10 = (KERNEL_PAGE_WIDTH << PS_SHIFT) 86 or r10 = r10, r11 87 mov cr.itir = r10 86 88 87 89 movl r10 = (KERNEL_TRANSLATION_I) … … 96 98 itr.d dtr[r7] = r10 97 99 98 mov r11 = cr.itir ;;99 movl r10 = ~0xfc ;;100 and r10 = r10, r11 ;;101 movl r11 = (IO_PAGE_WIDTH << PS_SHIFT) ;;102 or r10 = r10, r11 ;;103 mov cr.itir = r10 ;;100 mov r11 = cr.itir 101 movl r10 = ~0xfc 102 and r10 = r10, r11 103 movl r11 = (IO_PAGE_WIDTH << PS_SHIFT) 104 or r10 = r10, r11 105 mov cr.itir = r10 104 106 105 107 movl r7 = 2 … … 111 113 # Setup mapping for fimware arrea (also SAPIC) 112 114 113 mov r11 = cr.itir ;;114 movl r10 = ~0xfc ;;115 and r10 = r10, r11 ;;116 movl r11 = (FW_PAGE_WIDTH << PS_SHIFT) ;;117 or r10 = r10, r11 ;;118 mov cr.itir = r10 ;;115 mov r11 = cr.itir 116 movl r10 = ~0xfc 117 and r10 = r10, r11 118 movl r11 = (FW_PAGE_WIDTH << PS_SHIFT) 119 or r10 = r10, r11 120 mov cr.itir = r10 119 121 120 122 movl r7 = 3 … … 143 145 * fill the upper half word of PSR. 144 146 */ 145 rfi ;;147 rfi ;; 146 148 147 149 … … 156 158 bsw.1 157 159 160 #ifdef CONFIG_SMP 158 161 # Am I BSP or AP? 159 movl r20 = bsp_started;; 160 ld8 r20 = [r20];; 161 cmp.eq p3, p2 = r20, r0;; 162 movl r20 = bsp_started ;; 163 ld8 r20 = [r20] ;; 164 cmp.eq p3, p2 = r20, r0 ;; 165 #else 166 cmp.eq p3, p2 = r0, r0 ;; /* you are BSP */ 167 #endif /* CONFIG_SMP */ 162 168 163 169 # Initialize register stack … … 196 202 srlz.d ;; 197 203 204 #ifdef CONFIG_SMP 198 205 (p2) movl r18 = main_ap ;; 199 206 (p2) mov b1 = r18 ;; … … 201 208 202 209 # Mark that BSP is on 203 mov r20=1;; 204 movl r21=bsp_started;; 205 st8 [r21]=r20;; 210 mov r20 = 1 ;; 211 movl r21 = bsp_started ;; 212 st8 [r21] = r20 ;; 213 #endif 206 214 207 215 br.call.sptk.many b0 = arch_pre_main … … 213 221 0: 214 222 br 0b 223 224 #ifdef CONFIG_SMP 225 215 226 .align 4096 216 217 227 kernel_image_ap_start: 218 228 .auto … … 230 240 231 241 # Wait for wakeup synchro signal (#3 in cpu_by_id_eid_list) 242 232 243 kernel_image_ap_start_loop: 233 244 movl r11 = kernel_image_ap_start_loop … … 235 246 mov b1 = r11 236 247 237 ld1 r20 = [r8] ;;238 movl r21 = 3 ;;239 cmp.eq p2, p3 = r20, r21 ;;248 ld1 r20 = [r8] ;; 249 movl r21 = 3 ;; 250 cmp.eq p2, p3 = r20, r21 ;; 240 251 (p3) br.call.sptk.many b0 = b1 241 252 … … 245 256 br.call.sptk.many b0 = b1 246 257 247 248 258 .align 16 249 259 .global bsp_started … … 256 266 .space 65536 257 267 268 #endif /* CONFIG_SMP */
Note:
See TracChangeset
for help on using the changeset viewer.