1 /* SPDX-License-Identifier: GPL-2.0 */ << 2 /* %o0: devhandle 1 /* %o0: devhandle 3 * %o1: devino 2 * %o1: devino 4 * 3 * 5 * returns %o0: sysino 4 * returns %o0: sysino 6 */ 5 */ 7 ENTRY(sun4v_devino_to_sysino) 6 ENTRY(sun4v_devino_to_sysino) 8 mov HV_FAST_INTR_DEVINO2SYSINO, %o 7 mov HV_FAST_INTR_DEVINO2SYSINO, %o5 9 ta HV_FAST_TRAP 8 ta HV_FAST_TRAP 10 retl 9 retl 11 mov %o1, %o0 10 mov %o1, %o0 12 ENDPROC(sun4v_devino_to_sysino) 11 ENDPROC(sun4v_devino_to_sysino) 13 12 14 /* %o0: sysino 13 /* %o0: sysino 15 * 14 * 16 * returns %o0: intr_enabled (HV_INTR_ 15 * returns %o0: intr_enabled (HV_INTR_{DISABLED,ENABLED}) 17 */ 16 */ 18 ENTRY(sun4v_intr_getenabled) 17 ENTRY(sun4v_intr_getenabled) 19 mov HV_FAST_INTR_GETENABLED, %o5 18 mov HV_FAST_INTR_GETENABLED, %o5 20 ta HV_FAST_TRAP 19 ta HV_FAST_TRAP 21 retl 20 retl 22 mov %o1, %o0 21 mov %o1, %o0 23 ENDPROC(sun4v_intr_getenabled) 22 ENDPROC(sun4v_intr_getenabled) 24 23 25 /* %o0: sysino 24 /* %o0: sysino 26 * %o1: intr_enabled (HV_INTR_{DISABLE 25 * %o1: intr_enabled (HV_INTR_{DISABLED,ENABLED}) 27 */ 26 */ 28 ENTRY(sun4v_intr_setenabled) 27 ENTRY(sun4v_intr_setenabled) 29 mov HV_FAST_INTR_SETENABLED, %o5 28 mov HV_FAST_INTR_SETENABLED, %o5 30 ta HV_FAST_TRAP 29 ta HV_FAST_TRAP 31 retl 30 retl 32 nop 31 nop 33 ENDPROC(sun4v_intr_setenabled) 32 ENDPROC(sun4v_intr_setenabled) 34 33 35 /* %o0: sysino 34 /* %o0: sysino 36 * 35 * 37 * returns %o0: intr_state (HV_INTR_ST 36 * returns %o0: intr_state (HV_INTR_STATE_*) 38 */ 37 */ 39 ENTRY(sun4v_intr_getstate) 38 ENTRY(sun4v_intr_getstate) 40 mov HV_FAST_INTR_GETSTATE, %o5 39 mov HV_FAST_INTR_GETSTATE, %o5 41 ta HV_FAST_TRAP 40 ta HV_FAST_TRAP 42 retl 41 retl 43 mov %o1, %o0 42 mov %o1, %o0 44 ENDPROC(sun4v_intr_getstate) 43 ENDPROC(sun4v_intr_getstate) 45 44 46 /* %o0: sysino 45 /* %o0: sysino 47 * %o1: intr_state (HV_INTR_STATE_*) 46 * %o1: intr_state (HV_INTR_STATE_*) 48 */ 47 */ 49 ENTRY(sun4v_intr_setstate) 48 ENTRY(sun4v_intr_setstate) 50 mov HV_FAST_INTR_SETSTATE, %o5 49 mov HV_FAST_INTR_SETSTATE, %o5 51 ta HV_FAST_TRAP 50 ta HV_FAST_TRAP 52 retl 51 retl 53 nop 52 nop 54 ENDPROC(sun4v_intr_setstate) 53 ENDPROC(sun4v_intr_setstate) 55 54 56 /* %o0: sysino 55 /* %o0: sysino 57 * 56 * 58 * returns %o0: cpuid 57 * returns %o0: cpuid 59 */ 58 */ 60 ENTRY(sun4v_intr_gettarget) 59 ENTRY(sun4v_intr_gettarget) 61 mov HV_FAST_INTR_GETTARGET, %o5 60 mov HV_FAST_INTR_GETTARGET, %o5 62 ta HV_FAST_TRAP 61 ta HV_FAST_TRAP 63 retl 62 retl 64 mov %o1, %o0 63 mov %o1, %o0 65 ENDPROC(sun4v_intr_gettarget) 64 ENDPROC(sun4v_intr_gettarget) 66 65 67 /* %o0: sysino 66 /* %o0: sysino 68 * %o1: cpuid 67 * %o1: cpuid 69 */ 68 */ 70 ENTRY(sun4v_intr_settarget) 69 ENTRY(sun4v_intr_settarget) 71 mov HV_FAST_INTR_SETTARGET, %o5 70 mov HV_FAST_INTR_SETTARGET, %o5 72 ta HV_FAST_TRAP 71 ta HV_FAST_TRAP 73 retl 72 retl 74 nop 73 nop 75 ENDPROC(sun4v_intr_settarget) 74 ENDPROC(sun4v_intr_settarget) 76 75 77 /* %o0: cpuid 76 /* %o0: cpuid 78 * %o1: pc 77 * %o1: pc 79 * %o2: rtba 78 * %o2: rtba 80 * %o3: arg0 79 * %o3: arg0 81 * 80 * 82 * returns %o0: status 81 * returns %o0: status 83 */ 82 */ 84 ENTRY(sun4v_cpu_start) 83 ENTRY(sun4v_cpu_start) 85 mov HV_FAST_CPU_START, %o5 84 mov HV_FAST_CPU_START, %o5 86 ta HV_FAST_TRAP 85 ta HV_FAST_TRAP 87 retl 86 retl 88 nop 87 nop 89 ENDPROC(sun4v_cpu_start) 88 ENDPROC(sun4v_cpu_start) 90 89 91 /* %o0: cpuid 90 /* %o0: cpuid 92 * 91 * 93 * returns %o0: status 92 * returns %o0: status 94 */ 93 */ 95 ENTRY(sun4v_cpu_stop) 94 ENTRY(sun4v_cpu_stop) 96 mov HV_FAST_CPU_STOP, %o5 95 mov HV_FAST_CPU_STOP, %o5 97 ta HV_FAST_TRAP 96 ta HV_FAST_TRAP 98 retl 97 retl 99 nop 98 nop 100 ENDPROC(sun4v_cpu_stop) 99 ENDPROC(sun4v_cpu_stop) 101 100 102 /* returns %o0: status */ 101 /* returns %o0: status */ 103 ENTRY(sun4v_cpu_yield) 102 ENTRY(sun4v_cpu_yield) 104 mov HV_FAST_CPU_YIELD, %o5 103 mov HV_FAST_CPU_YIELD, %o5 105 ta HV_FAST_TRAP 104 ta HV_FAST_TRAP 106 retl 105 retl 107 nop 106 nop 108 ENDPROC(sun4v_cpu_yield) 107 ENDPROC(sun4v_cpu_yield) 109 108 110 /* %o0: cpuid << 111 * << 112 * returns %o0: status << 113 */ << 114 ENTRY(sun4v_cpu_poke) << 115 mov HV_FAST_CPU_POKE, %o5 << 116 ta HV_FAST_TRAP << 117 retl << 118 nop << 119 ENDPROC(sun4v_cpu_poke) << 120 << 121 /* %o0: type 109 /* %o0: type 122 * %o1: queue paddr 110 * %o1: queue paddr 123 * %o2: num queue entries 111 * %o2: num queue entries 124 * 112 * 125 * returns %o0: status 113 * returns %o0: status 126 */ 114 */ 127 ENTRY(sun4v_cpu_qconf) 115 ENTRY(sun4v_cpu_qconf) 128 mov HV_FAST_CPU_QCONF, %o5 116 mov HV_FAST_CPU_QCONF, %o5 129 ta HV_FAST_TRAP 117 ta HV_FAST_TRAP 130 retl 118 retl 131 nop 119 nop 132 ENDPROC(sun4v_cpu_qconf) 120 ENDPROC(sun4v_cpu_qconf) 133 121 134 /* %o0: num cpus in cpu list 122 /* %o0: num cpus in cpu list 135 * %o1: cpu list paddr 123 * %o1: cpu list paddr 136 * %o2: mondo block paddr 124 * %o2: mondo block paddr 137 * 125 * 138 * returns %o0: status 126 * returns %o0: status 139 */ 127 */ 140 ENTRY(sun4v_cpu_mondo_send) 128 ENTRY(sun4v_cpu_mondo_send) 141 mov HV_FAST_CPU_MONDO_SEND, %o5 129 mov HV_FAST_CPU_MONDO_SEND, %o5 142 ta HV_FAST_TRAP 130 ta HV_FAST_TRAP 143 retl 131 retl 144 nop 132 nop 145 ENDPROC(sun4v_cpu_mondo_send) 133 ENDPROC(sun4v_cpu_mondo_send) 146 134 147 /* %o0: CPU ID 135 /* %o0: CPU ID 148 * 136 * 149 * returns %o0: -status if status non- 137 * returns %o0: -status if status non-zero, else 150 * %o0: cpu state as HV_CPU_ST 138 * %o0: cpu state as HV_CPU_STATE_* 151 */ 139 */ 152 ENTRY(sun4v_cpu_state) 140 ENTRY(sun4v_cpu_state) 153 mov HV_FAST_CPU_STATE, %o5 141 mov HV_FAST_CPU_STATE, %o5 154 ta HV_FAST_TRAP 142 ta HV_FAST_TRAP 155 brnz,pn %o0, 1f 143 brnz,pn %o0, 1f 156 sub %g0, %o0, %o0 144 sub %g0, %o0, %o0 157 mov %o1, %o0 145 mov %o1, %o0 158 1: retl 146 1: retl 159 nop 147 nop 160 ENDPROC(sun4v_cpu_state) 148 ENDPROC(sun4v_cpu_state) 161 149 162 /* %o0: virtual address 150 /* %o0: virtual address 163 * %o1: must be zero 151 * %o1: must be zero 164 * %o2: TTE 152 * %o2: TTE 165 * %o3: HV_MMU_* flags 153 * %o3: HV_MMU_* flags 166 * 154 * 167 * returns %o0: status 155 * returns %o0: status 168 */ 156 */ 169 ENTRY(sun4v_mmu_map_perm_addr) 157 ENTRY(sun4v_mmu_map_perm_addr) 170 mov HV_FAST_MMU_MAP_PERM_ADDR, %o5 158 mov HV_FAST_MMU_MAP_PERM_ADDR, %o5 171 ta HV_FAST_TRAP 159 ta HV_FAST_TRAP 172 retl 160 retl 173 nop 161 nop 174 ENDPROC(sun4v_mmu_map_perm_addr) 162 ENDPROC(sun4v_mmu_map_perm_addr) 175 163 176 /* %o0: number of TSB descriptions 164 /* %o0: number of TSB descriptions 177 * %o1: TSB descriptions real address 165 * %o1: TSB descriptions real address 178 * 166 * 179 * returns %o0: status 167 * returns %o0: status 180 */ 168 */ 181 ENTRY(sun4v_mmu_tsb_ctx0) 169 ENTRY(sun4v_mmu_tsb_ctx0) 182 mov HV_FAST_MMU_TSB_CTX0, %o5 170 mov HV_FAST_MMU_TSB_CTX0, %o5 183 ta HV_FAST_TRAP 171 ta HV_FAST_TRAP 184 retl 172 retl 185 nop 173 nop 186 ENDPROC(sun4v_mmu_tsb_ctx0) 174 ENDPROC(sun4v_mmu_tsb_ctx0) 187 175 188 /* %o0: API group number 176 /* %o0: API group number 189 * %o1: pointer to unsigned long major 177 * %o1: pointer to unsigned long major number storage 190 * %o2: pointer to unsigned long minor 178 * %o2: pointer to unsigned long minor number storage 191 * 179 * 192 * returns %o0: status 180 * returns %o0: status 193 */ 181 */ 194 ENTRY(sun4v_get_version) 182 ENTRY(sun4v_get_version) 195 mov HV_CORE_GET_VER, %o5 183 mov HV_CORE_GET_VER, %o5 196 mov %o1, %o3 184 mov %o1, %o3 197 mov %o2, %o4 185 mov %o2, %o4 198 ta HV_CORE_TRAP 186 ta HV_CORE_TRAP 199 stx %o1, [%o3] 187 stx %o1, [%o3] 200 retl 188 retl 201 stx %o2, [%o4] 189 stx %o2, [%o4] 202 ENDPROC(sun4v_get_version) 190 ENDPROC(sun4v_get_version) 203 191 204 /* %o0: API group number 192 /* %o0: API group number 205 * %o1: desired major number 193 * %o1: desired major number 206 * %o2: desired minor number 194 * %o2: desired minor number 207 * %o3: pointer to unsigned long actua 195 * %o3: pointer to unsigned long actual minor number storage 208 * 196 * 209 * returns %o0: status 197 * returns %o0: status 210 */ 198 */ 211 ENTRY(sun4v_set_version) 199 ENTRY(sun4v_set_version) 212 mov HV_CORE_SET_VER, %o5 200 mov HV_CORE_SET_VER, %o5 213 mov %o3, %o4 201 mov %o3, %o4 214 ta HV_CORE_TRAP 202 ta HV_CORE_TRAP 215 retl 203 retl 216 stx %o1, [%o4] 204 stx %o1, [%o4] 217 ENDPROC(sun4v_set_version) 205 ENDPROC(sun4v_set_version) 218 206 219 /* %o0: pointer to unsigned long time 207 /* %o0: pointer to unsigned long time 220 * 208 * 221 * returns %o0: status 209 * returns %o0: status 222 */ 210 */ 223 ENTRY(sun4v_tod_get) 211 ENTRY(sun4v_tod_get) 224 mov %o0, %o4 212 mov %o0, %o4 225 mov HV_FAST_TOD_GET, %o5 213 mov HV_FAST_TOD_GET, %o5 226 ta HV_FAST_TRAP 214 ta HV_FAST_TRAP 227 stx %o1, [%o4] 215 stx %o1, [%o4] 228 retl 216 retl 229 nop 217 nop 230 ENDPROC(sun4v_tod_get) 218 ENDPROC(sun4v_tod_get) 231 219 232 /* %o0: time 220 /* %o0: time 233 * 221 * 234 * returns %o0: status 222 * returns %o0: status 235 */ 223 */ 236 ENTRY(sun4v_tod_set) 224 ENTRY(sun4v_tod_set) 237 mov HV_FAST_TOD_SET, %o5 225 mov HV_FAST_TOD_SET, %o5 238 ta HV_FAST_TRAP 226 ta HV_FAST_TRAP 239 retl 227 retl 240 nop 228 nop 241 ENDPROC(sun4v_tod_set) 229 ENDPROC(sun4v_tod_set) 242 230 243 /* %o0: pointer to unsigned long statu 231 /* %o0: pointer to unsigned long status 244 * 232 * 245 * returns %o0: signed character 233 * returns %o0: signed character 246 */ 234 */ 247 ENTRY(sun4v_con_getchar) 235 ENTRY(sun4v_con_getchar) 248 mov %o0, %o4 236 mov %o0, %o4 249 mov HV_FAST_CONS_GETCHAR, %o5 237 mov HV_FAST_CONS_GETCHAR, %o5 250 clr %o0 238 clr %o0 251 clr %o1 239 clr %o1 252 ta HV_FAST_TRAP 240 ta HV_FAST_TRAP 253 stx %o0, [%o4] 241 stx %o0, [%o4] 254 retl 242 retl 255 sra %o1, 0, %o0 243 sra %o1, 0, %o0 256 ENDPROC(sun4v_con_getchar) 244 ENDPROC(sun4v_con_getchar) 257 245 258 /* %o0: signed long character 246 /* %o0: signed long character 259 * 247 * 260 * returns %o0: status 248 * returns %o0: status 261 */ 249 */ 262 ENTRY(sun4v_con_putchar) 250 ENTRY(sun4v_con_putchar) 263 mov HV_FAST_CONS_PUTCHAR, %o5 251 mov HV_FAST_CONS_PUTCHAR, %o5 264 ta HV_FAST_TRAP 252 ta HV_FAST_TRAP 265 retl 253 retl 266 sra %o0, 0, %o0 254 sra %o0, 0, %o0 267 ENDPROC(sun4v_con_putchar) 255 ENDPROC(sun4v_con_putchar) 268 256 269 /* %o0: buffer real address 257 /* %o0: buffer real address 270 * %o1: buffer size 258 * %o1: buffer size 271 * %o2: pointer to unsigned long bytes 259 * %o2: pointer to unsigned long bytes_read 272 * 260 * 273 * returns %o0: status 261 * returns %o0: status 274 */ 262 */ 275 ENTRY(sun4v_con_read) 263 ENTRY(sun4v_con_read) 276 mov %o2, %o4 264 mov %o2, %o4 277 mov HV_FAST_CONS_READ, %o5 265 mov HV_FAST_CONS_READ, %o5 278 ta HV_FAST_TRAP 266 ta HV_FAST_TRAP 279 brnz %o0, 1f 267 brnz %o0, 1f 280 cmp %o1, -1 /* break */ 268 cmp %o1, -1 /* break */ 281 be,a,pn %icc, 1f 269 be,a,pn %icc, 1f 282 mov %o1, %o0 270 mov %o1, %o0 283 cmp %o1, -2 /* hup */ 271 cmp %o1, -2 /* hup */ 284 be,a,pn %icc, 1f 272 be,a,pn %icc, 1f 285 mov %o1, %o0 273 mov %o1, %o0 286 stx %o1, [%o4] 274 stx %o1, [%o4] 287 1: retl 275 1: retl 288 nop 276 nop 289 ENDPROC(sun4v_con_read) 277 ENDPROC(sun4v_con_read) 290 278 291 /* %o0: buffer real address 279 /* %o0: buffer real address 292 * %o1: buffer size 280 * %o1: buffer size 293 * %o2: pointer to unsigned long bytes 281 * %o2: pointer to unsigned long bytes_written 294 * 282 * 295 * returns %o0: status 283 * returns %o0: status 296 */ 284 */ 297 ENTRY(sun4v_con_write) 285 ENTRY(sun4v_con_write) 298 mov %o2, %o4 286 mov %o2, %o4 299 mov HV_FAST_CONS_WRITE, %o5 287 mov HV_FAST_CONS_WRITE, %o5 300 ta HV_FAST_TRAP 288 ta HV_FAST_TRAP 301 stx %o1, [%o4] 289 stx %o1, [%o4] 302 retl 290 retl 303 nop 291 nop 304 ENDPROC(sun4v_con_write) 292 ENDPROC(sun4v_con_write) 305 293 306 /* %o0: soft state 294 /* %o0: soft state 307 * %o1: address of description string 295 * %o1: address of description string 308 * 296 * 309 * returns %o0: status 297 * returns %o0: status 310 */ 298 */ 311 ENTRY(sun4v_mach_set_soft_state) 299 ENTRY(sun4v_mach_set_soft_state) 312 mov HV_FAST_MACH_SET_SOFT_STATE, % 300 mov HV_FAST_MACH_SET_SOFT_STATE, %o5 313 ta HV_FAST_TRAP 301 ta HV_FAST_TRAP 314 retl 302 retl 315 nop 303 nop 316 ENDPROC(sun4v_mach_set_soft_state) 304 ENDPROC(sun4v_mach_set_soft_state) 317 305 318 /* %o0: exit code 306 /* %o0: exit code 319 * 307 * 320 * Does not return. 308 * Does not return. 321 */ 309 */ 322 ENTRY(sun4v_mach_exit) 310 ENTRY(sun4v_mach_exit) 323 mov HV_FAST_MACH_EXIT, %o5 311 mov HV_FAST_MACH_EXIT, %o5 324 ta HV_FAST_TRAP 312 ta HV_FAST_TRAP 325 retl 313 retl 326 nop 314 nop 327 ENDPROC(sun4v_mach_exit) 315 ENDPROC(sun4v_mach_exit) 328 316 329 /* %o0: buffer real address 317 /* %o0: buffer real address 330 * %o1: buffer length 318 * %o1: buffer length 331 * %o2: pointer to unsigned long real_ 319 * %o2: pointer to unsigned long real_buf_len 332 * 320 * 333 * returns %o0: status 321 * returns %o0: status 334 */ 322 */ 335 ENTRY(sun4v_mach_desc) 323 ENTRY(sun4v_mach_desc) 336 mov %o2, %o4 324 mov %o2, %o4 337 mov HV_FAST_MACH_DESC, %o5 325 mov HV_FAST_MACH_DESC, %o5 338 ta HV_FAST_TRAP 326 ta HV_FAST_TRAP 339 stx %o1, [%o4] 327 stx %o1, [%o4] 340 retl 328 retl 341 nop 329 nop 342 ENDPROC(sun4v_mach_desc) 330 ENDPROC(sun4v_mach_desc) 343 331 344 /* %o0: new timeout in milliseconds 332 /* %o0: new timeout in milliseconds 345 * %o1: pointer to unsigned long orig_ 333 * %o1: pointer to unsigned long orig_timeout 346 * 334 * 347 * returns %o0: status 335 * returns %o0: status 348 */ 336 */ 349 ENTRY(sun4v_mach_set_watchdog) 337 ENTRY(sun4v_mach_set_watchdog) 350 mov %o1, %o4 338 mov %o1, %o4 351 mov HV_FAST_MACH_SET_WATCHDOG, %o5 339 mov HV_FAST_MACH_SET_WATCHDOG, %o5 352 ta HV_FAST_TRAP 340 ta HV_FAST_TRAP 353 brnz,a,pn %o4, 0f << 354 stx %o1, [%o4] 341 stx %o1, [%o4] 355 0: retl !! 342 retl 356 nop 343 nop 357 ENDPROC(sun4v_mach_set_watchdog) 344 ENDPROC(sun4v_mach_set_watchdog) 358 EXPORT_SYMBOL(sun4v_mach_set_watchdog) << 359 345 360 /* No inputs and does not return. */ 346 /* No inputs and does not return. */ 361 ENTRY(sun4v_mach_sir) 347 ENTRY(sun4v_mach_sir) 362 mov %o1, %o4 348 mov %o1, %o4 363 mov HV_FAST_MACH_SIR, %o5 349 mov HV_FAST_MACH_SIR, %o5 364 ta HV_FAST_TRAP 350 ta HV_FAST_TRAP 365 stx %o1, [%o4] 351 stx %o1, [%o4] 366 retl 352 retl 367 nop 353 nop 368 ENDPROC(sun4v_mach_sir) 354 ENDPROC(sun4v_mach_sir) 369 355 370 /* %o0: channel 356 /* %o0: channel 371 * %o1: ra 357 * %o1: ra 372 * %o2: num_entries 358 * %o2: num_entries 373 * 359 * 374 * returns %o0: status 360 * returns %o0: status 375 */ 361 */ 376 ENTRY(sun4v_ldc_tx_qconf) 362 ENTRY(sun4v_ldc_tx_qconf) 377 mov HV_FAST_LDC_TX_QCONF, %o5 363 mov HV_FAST_LDC_TX_QCONF, %o5 378 ta HV_FAST_TRAP 364 ta HV_FAST_TRAP 379 retl 365 retl 380 nop 366 nop 381 ENDPROC(sun4v_ldc_tx_qconf) 367 ENDPROC(sun4v_ldc_tx_qconf) 382 368 383 /* %o0: channel 369 /* %o0: channel 384 * %o1: pointer to unsigned long ra 370 * %o1: pointer to unsigned long ra 385 * %o2: pointer to unsigned long num_e 371 * %o2: pointer to unsigned long num_entries 386 * 372 * 387 * returns %o0: status 373 * returns %o0: status 388 */ 374 */ 389 ENTRY(sun4v_ldc_tx_qinfo) 375 ENTRY(sun4v_ldc_tx_qinfo) 390 mov %o1, %g1 376 mov %o1, %g1 391 mov %o2, %g2 377 mov %o2, %g2 392 mov HV_FAST_LDC_TX_QINFO, %o5 378 mov HV_FAST_LDC_TX_QINFO, %o5 393 ta HV_FAST_TRAP 379 ta HV_FAST_TRAP 394 stx %o1, [%g1] 380 stx %o1, [%g1] 395 stx %o2, [%g2] 381 stx %o2, [%g2] 396 retl 382 retl 397 nop 383 nop 398 ENDPROC(sun4v_ldc_tx_qinfo) 384 ENDPROC(sun4v_ldc_tx_qinfo) 399 385 400 /* %o0: channel 386 /* %o0: channel 401 * %o1: pointer to unsigned long head_ 387 * %o1: pointer to unsigned long head_off 402 * %o2: pointer to unsigned long tail_ 388 * %o2: pointer to unsigned long tail_off 403 * %o2: pointer to unsigned long chan_ 389 * %o2: pointer to unsigned long chan_state 404 * 390 * 405 * returns %o0: status 391 * returns %o0: status 406 */ 392 */ 407 ENTRY(sun4v_ldc_tx_get_state) 393 ENTRY(sun4v_ldc_tx_get_state) 408 mov %o1, %g1 394 mov %o1, %g1 409 mov %o2, %g2 395 mov %o2, %g2 410 mov %o3, %g3 396 mov %o3, %g3 411 mov HV_FAST_LDC_TX_GET_STATE, %o5 397 mov HV_FAST_LDC_TX_GET_STATE, %o5 412 ta HV_FAST_TRAP 398 ta HV_FAST_TRAP 413 stx %o1, [%g1] 399 stx %o1, [%g1] 414 stx %o2, [%g2] 400 stx %o2, [%g2] 415 stx %o3, [%g3] 401 stx %o3, [%g3] 416 retl 402 retl 417 nop 403 nop 418 ENDPROC(sun4v_ldc_tx_get_state) 404 ENDPROC(sun4v_ldc_tx_get_state) 419 405 420 /* %o0: channel 406 /* %o0: channel 421 * %o1: tail_off 407 * %o1: tail_off 422 * 408 * 423 * returns %o0: status 409 * returns %o0: status 424 */ 410 */ 425 ENTRY(sun4v_ldc_tx_set_qtail) 411 ENTRY(sun4v_ldc_tx_set_qtail) 426 mov HV_FAST_LDC_TX_SET_QTAIL, %o5 412 mov HV_FAST_LDC_TX_SET_QTAIL, %o5 427 ta HV_FAST_TRAP 413 ta HV_FAST_TRAP 428 retl 414 retl 429 nop 415 nop 430 ENDPROC(sun4v_ldc_tx_set_qtail) 416 ENDPROC(sun4v_ldc_tx_set_qtail) 431 417 432 /* %o0: channel 418 /* %o0: channel 433 * %o1: ra 419 * %o1: ra 434 * %o2: num_entries 420 * %o2: num_entries 435 * 421 * 436 * returns %o0: status 422 * returns %o0: status 437 */ 423 */ 438 ENTRY(sun4v_ldc_rx_qconf) 424 ENTRY(sun4v_ldc_rx_qconf) 439 mov HV_FAST_LDC_RX_QCONF, %o5 425 mov HV_FAST_LDC_RX_QCONF, %o5 440 ta HV_FAST_TRAP 426 ta HV_FAST_TRAP 441 retl 427 retl 442 nop 428 nop 443 ENDPROC(sun4v_ldc_rx_qconf) 429 ENDPROC(sun4v_ldc_rx_qconf) 444 430 445 /* %o0: channel 431 /* %o0: channel 446 * %o1: pointer to unsigned long ra 432 * %o1: pointer to unsigned long ra 447 * %o2: pointer to unsigned long num_e 433 * %o2: pointer to unsigned long num_entries 448 * 434 * 449 * returns %o0: status 435 * returns %o0: status 450 */ 436 */ 451 ENTRY(sun4v_ldc_rx_qinfo) 437 ENTRY(sun4v_ldc_rx_qinfo) 452 mov %o1, %g1 438 mov %o1, %g1 453 mov %o2, %g2 439 mov %o2, %g2 454 mov HV_FAST_LDC_RX_QINFO, %o5 440 mov HV_FAST_LDC_RX_QINFO, %o5 455 ta HV_FAST_TRAP 441 ta HV_FAST_TRAP 456 stx %o1, [%g1] 442 stx %o1, [%g1] 457 stx %o2, [%g2] 443 stx %o2, [%g2] 458 retl 444 retl 459 nop 445 nop 460 ENDPROC(sun4v_ldc_rx_qinfo) 446 ENDPROC(sun4v_ldc_rx_qinfo) 461 447 462 /* %o0: channel 448 /* %o0: channel 463 * %o1: pointer to unsigned long head_ 449 * %o1: pointer to unsigned long head_off 464 * %o2: pointer to unsigned long tail_ 450 * %o2: pointer to unsigned long tail_off 465 * %o2: pointer to unsigned long chan_ 451 * %o2: pointer to unsigned long chan_state 466 * 452 * 467 * returns %o0: status 453 * returns %o0: status 468 */ 454 */ 469 ENTRY(sun4v_ldc_rx_get_state) 455 ENTRY(sun4v_ldc_rx_get_state) 470 mov %o1, %g1 456 mov %o1, %g1 471 mov %o2, %g2 457 mov %o2, %g2 472 mov %o3, %g3 458 mov %o3, %g3 473 mov HV_FAST_LDC_RX_GET_STATE, %o5 459 mov HV_FAST_LDC_RX_GET_STATE, %o5 474 ta HV_FAST_TRAP 460 ta HV_FAST_TRAP 475 stx %o1, [%g1] 461 stx %o1, [%g1] 476 stx %o2, [%g2] 462 stx %o2, [%g2] 477 stx %o3, [%g3] 463 stx %o3, [%g3] 478 retl 464 retl 479 nop 465 nop 480 ENDPROC(sun4v_ldc_rx_get_state) 466 ENDPROC(sun4v_ldc_rx_get_state) 481 467 482 /* %o0: channel 468 /* %o0: channel 483 * %o1: head_off 469 * %o1: head_off 484 * 470 * 485 * returns %o0: status 471 * returns %o0: status 486 */ 472 */ 487 ENTRY(sun4v_ldc_rx_set_qhead) 473 ENTRY(sun4v_ldc_rx_set_qhead) 488 mov HV_FAST_LDC_RX_SET_QHEAD, %o5 474 mov HV_FAST_LDC_RX_SET_QHEAD, %o5 489 ta HV_FAST_TRAP 475 ta HV_FAST_TRAP 490 retl 476 retl 491 nop 477 nop 492 ENDPROC(sun4v_ldc_rx_set_qhead) 478 ENDPROC(sun4v_ldc_rx_set_qhead) 493 479 494 /* %o0: channel 480 /* %o0: channel 495 * %o1: ra 481 * %o1: ra 496 * %o2: num_entries 482 * %o2: num_entries 497 * 483 * 498 * returns %o0: status 484 * returns %o0: status 499 */ 485 */ 500 ENTRY(sun4v_ldc_set_map_table) 486 ENTRY(sun4v_ldc_set_map_table) 501 mov HV_FAST_LDC_SET_MAP_TABLE, %o5 487 mov HV_FAST_LDC_SET_MAP_TABLE, %o5 502 ta HV_FAST_TRAP 488 ta HV_FAST_TRAP 503 retl 489 retl 504 nop 490 nop 505 ENDPROC(sun4v_ldc_set_map_table) 491 ENDPROC(sun4v_ldc_set_map_table) 506 492 507 /* %o0: channel 493 /* %o0: channel 508 * %o1: pointer to unsigned long ra 494 * %o1: pointer to unsigned long ra 509 * %o2: pointer to unsigned long num_e 495 * %o2: pointer to unsigned long num_entries 510 * 496 * 511 * returns %o0: status 497 * returns %o0: status 512 */ 498 */ 513 ENTRY(sun4v_ldc_get_map_table) 499 ENTRY(sun4v_ldc_get_map_table) 514 mov %o1, %g1 500 mov %o1, %g1 515 mov %o2, %g2 501 mov %o2, %g2 516 mov HV_FAST_LDC_GET_MAP_TABLE, %o5 502 mov HV_FAST_LDC_GET_MAP_TABLE, %o5 517 ta HV_FAST_TRAP 503 ta HV_FAST_TRAP 518 stx %o1, [%g1] 504 stx %o1, [%g1] 519 stx %o2, [%g2] 505 stx %o2, [%g2] 520 retl 506 retl 521 nop 507 nop 522 ENDPROC(sun4v_ldc_get_map_table) 508 ENDPROC(sun4v_ldc_get_map_table) 523 509 524 /* %o0: channel 510 /* %o0: channel 525 * %o1: dir_code 511 * %o1: dir_code 526 * %o2: tgt_raddr 512 * %o2: tgt_raddr 527 * %o3: lcl_raddr 513 * %o3: lcl_raddr 528 * %o4: len 514 * %o4: len 529 * %o5: pointer to unsigned long actua 515 * %o5: pointer to unsigned long actual_len 530 * 516 * 531 * returns %o0: status 517 * returns %o0: status 532 */ 518 */ 533 ENTRY(sun4v_ldc_copy) 519 ENTRY(sun4v_ldc_copy) 534 mov %o5, %g1 520 mov %o5, %g1 535 mov HV_FAST_LDC_COPY, %o5 521 mov HV_FAST_LDC_COPY, %o5 536 ta HV_FAST_TRAP 522 ta HV_FAST_TRAP 537 stx %o1, [%g1] 523 stx %o1, [%g1] 538 retl 524 retl 539 nop 525 nop 540 ENDPROC(sun4v_ldc_copy) 526 ENDPROC(sun4v_ldc_copy) 541 527 542 /* %o0: channel 528 /* %o0: channel 543 * %o1: cookie 529 * %o1: cookie 544 * %o2: pointer to unsigned long ra 530 * %o2: pointer to unsigned long ra 545 * %o3: pointer to unsigned long perm 531 * %o3: pointer to unsigned long perm 546 * 532 * 547 * returns %o0: status 533 * returns %o0: status 548 */ 534 */ 549 ENTRY(sun4v_ldc_mapin) 535 ENTRY(sun4v_ldc_mapin) 550 mov %o2, %g1 536 mov %o2, %g1 551 mov %o3, %g2 537 mov %o3, %g2 552 mov HV_FAST_LDC_MAPIN, %o5 538 mov HV_FAST_LDC_MAPIN, %o5 553 ta HV_FAST_TRAP 539 ta HV_FAST_TRAP 554 stx %o1, [%g1] 540 stx %o1, [%g1] 555 stx %o2, [%g2] 541 stx %o2, [%g2] 556 retl 542 retl 557 nop 543 nop 558 ENDPROC(sun4v_ldc_mapin) 544 ENDPROC(sun4v_ldc_mapin) 559 545 560 /* %o0: ra 546 /* %o0: ra 561 * 547 * 562 * returns %o0: status 548 * returns %o0: status 563 */ 549 */ 564 ENTRY(sun4v_ldc_unmap) 550 ENTRY(sun4v_ldc_unmap) 565 mov HV_FAST_LDC_UNMAP, %o5 551 mov HV_FAST_LDC_UNMAP, %o5 566 ta HV_FAST_TRAP 552 ta HV_FAST_TRAP 567 retl 553 retl 568 nop 554 nop 569 ENDPROC(sun4v_ldc_unmap) 555 ENDPROC(sun4v_ldc_unmap) 570 556 571 /* %o0: channel 557 /* %o0: channel 572 * %o1: cookie 558 * %o1: cookie 573 * %o2: mte_cookie 559 * %o2: mte_cookie 574 * 560 * 575 * returns %o0: status 561 * returns %o0: status 576 */ 562 */ 577 ENTRY(sun4v_ldc_revoke) 563 ENTRY(sun4v_ldc_revoke) 578 mov HV_FAST_LDC_REVOKE, %o5 564 mov HV_FAST_LDC_REVOKE, %o5 579 ta HV_FAST_TRAP 565 ta HV_FAST_TRAP 580 retl 566 retl 581 nop 567 nop 582 ENDPROC(sun4v_ldc_revoke) 568 ENDPROC(sun4v_ldc_revoke) 583 569 584 /* %o0: device handle 570 /* %o0: device handle 585 * %o1: device INO 571 * %o1: device INO 586 * %o2: pointer to unsigned long cooki 572 * %o2: pointer to unsigned long cookie 587 * 573 * 588 * returns %o0: status 574 * returns %o0: status 589 */ 575 */ 590 ENTRY(sun4v_vintr_get_cookie) 576 ENTRY(sun4v_vintr_get_cookie) 591 mov %o2, %g1 577 mov %o2, %g1 592 mov HV_FAST_VINTR_GET_COOKIE, %o5 578 mov HV_FAST_VINTR_GET_COOKIE, %o5 593 ta HV_FAST_TRAP 579 ta HV_FAST_TRAP 594 stx %o1, [%g1] 580 stx %o1, [%g1] 595 retl 581 retl 596 nop 582 nop 597 ENDPROC(sun4v_vintr_get_cookie) 583 ENDPROC(sun4v_vintr_get_cookie) 598 584 599 /* %o0: device handle 585 /* %o0: device handle 600 * %o1: device INO 586 * %o1: device INO 601 * %o2: cookie 587 * %o2: cookie 602 * 588 * 603 * returns %o0: status 589 * returns %o0: status 604 */ 590 */ 605 ENTRY(sun4v_vintr_set_cookie) 591 ENTRY(sun4v_vintr_set_cookie) 606 mov HV_FAST_VINTR_SET_COOKIE, %o5 592 mov HV_FAST_VINTR_SET_COOKIE, %o5 607 ta HV_FAST_TRAP 593 ta HV_FAST_TRAP 608 retl 594 retl 609 nop 595 nop 610 ENDPROC(sun4v_vintr_set_cookie) 596 ENDPROC(sun4v_vintr_set_cookie) 611 597 612 /* %o0: device handle 598 /* %o0: device handle 613 * %o1: device INO 599 * %o1: device INO 614 * %o2: pointer to unsigned long valid 600 * %o2: pointer to unsigned long valid_state 615 * 601 * 616 * returns %o0: status 602 * returns %o0: status 617 */ 603 */ 618 ENTRY(sun4v_vintr_get_valid) 604 ENTRY(sun4v_vintr_get_valid) 619 mov %o2, %g1 605 mov %o2, %g1 620 mov HV_FAST_VINTR_GET_VALID, %o5 606 mov HV_FAST_VINTR_GET_VALID, %o5 621 ta HV_FAST_TRAP 607 ta HV_FAST_TRAP 622 stx %o1, [%g1] 608 stx %o1, [%g1] 623 retl 609 retl 624 nop 610 nop 625 ENDPROC(sun4v_vintr_get_valid) 611 ENDPROC(sun4v_vintr_get_valid) 626 612 627 /* %o0: device handle 613 /* %o0: device handle 628 * %o1: device INO 614 * %o1: device INO 629 * %o2: valid_state 615 * %o2: valid_state 630 * 616 * 631 * returns %o0: status 617 * returns %o0: status 632 */ 618 */ 633 ENTRY(sun4v_vintr_set_valid) 619 ENTRY(sun4v_vintr_set_valid) 634 mov HV_FAST_VINTR_SET_VALID, %o5 620 mov HV_FAST_VINTR_SET_VALID, %o5 635 ta HV_FAST_TRAP 621 ta HV_FAST_TRAP 636 retl 622 retl 637 nop 623 nop 638 ENDPROC(sun4v_vintr_set_valid) 624 ENDPROC(sun4v_vintr_set_valid) 639 625 640 /* %o0: device handle 626 /* %o0: device handle 641 * %o1: device INO 627 * %o1: device INO 642 * %o2: pointer to unsigned long state 628 * %o2: pointer to unsigned long state 643 * 629 * 644 * returns %o0: status 630 * returns %o0: status 645 */ 631 */ 646 ENTRY(sun4v_vintr_get_state) 632 ENTRY(sun4v_vintr_get_state) 647 mov %o2, %g1 633 mov %o2, %g1 648 mov HV_FAST_VINTR_GET_STATE, %o5 634 mov HV_FAST_VINTR_GET_STATE, %o5 649 ta HV_FAST_TRAP 635 ta HV_FAST_TRAP 650 stx %o1, [%g1] 636 stx %o1, [%g1] 651 retl 637 retl 652 nop 638 nop 653 ENDPROC(sun4v_vintr_get_state) 639 ENDPROC(sun4v_vintr_get_state) 654 640 655 /* %o0: device handle 641 /* %o0: device handle 656 * %o1: device INO 642 * %o1: device INO 657 * %o2: state 643 * %o2: state 658 * 644 * 659 * returns %o0: status 645 * returns %o0: status 660 */ 646 */ 661 ENTRY(sun4v_vintr_set_state) 647 ENTRY(sun4v_vintr_set_state) 662 mov HV_FAST_VINTR_SET_STATE, %o5 648 mov HV_FAST_VINTR_SET_STATE, %o5 663 ta HV_FAST_TRAP 649 ta HV_FAST_TRAP 664 retl 650 retl 665 nop 651 nop 666 ENDPROC(sun4v_vintr_set_state) 652 ENDPROC(sun4v_vintr_set_state) 667 653 668 /* %o0: device handle 654 /* %o0: device handle 669 * %o1: device INO 655 * %o1: device INO 670 * %o2: pointer to unsigned long cpuid 656 * %o2: pointer to unsigned long cpuid 671 * 657 * 672 * returns %o0: status 658 * returns %o0: status 673 */ 659 */ 674 ENTRY(sun4v_vintr_get_target) 660 ENTRY(sun4v_vintr_get_target) 675 mov %o2, %g1 661 mov %o2, %g1 676 mov HV_FAST_VINTR_GET_TARGET, %o5 662 mov HV_FAST_VINTR_GET_TARGET, %o5 677 ta HV_FAST_TRAP 663 ta HV_FAST_TRAP 678 stx %o1, [%g1] 664 stx %o1, [%g1] 679 retl 665 retl 680 nop 666 nop 681 ENDPROC(sun4v_vintr_get_target) 667 ENDPROC(sun4v_vintr_get_target) 682 668 683 /* %o0: device handle 669 /* %o0: device handle 684 * %o1: device INO 670 * %o1: device INO 685 * %o2: cpuid 671 * %o2: cpuid 686 * 672 * 687 * returns %o0: status 673 * returns %o0: status 688 */ 674 */ 689 ENTRY(sun4v_vintr_set_target) 675 ENTRY(sun4v_vintr_set_target) 690 mov HV_FAST_VINTR_SET_TARGET, %o5 676 mov HV_FAST_VINTR_SET_TARGET, %o5 691 ta HV_FAST_TRAP 677 ta HV_FAST_TRAP 692 retl 678 retl 693 nop 679 nop 694 ENDPROC(sun4v_vintr_set_target) 680 ENDPROC(sun4v_vintr_set_target) 695 681 696 /* %o0: NCS sub-function 682 /* %o0: NCS sub-function 697 * %o1: sub-function arg real-address 683 * %o1: sub-function arg real-address 698 * %o2: sub-function arg size 684 * %o2: sub-function arg size 699 * 685 * 700 * returns %o0: status 686 * returns %o0: status 701 */ 687 */ 702 ENTRY(sun4v_ncs_request) 688 ENTRY(sun4v_ncs_request) 703 mov HV_FAST_NCS_REQUEST, %o5 689 mov HV_FAST_NCS_REQUEST, %o5 704 ta HV_FAST_TRAP 690 ta HV_FAST_TRAP 705 retl 691 retl 706 nop 692 nop 707 ENDPROC(sun4v_ncs_request) 693 ENDPROC(sun4v_ncs_request) 708 694 709 ENTRY(sun4v_svc_send) 695 ENTRY(sun4v_svc_send) 710 save %sp, -192, %sp 696 save %sp, -192, %sp 711 mov %i0, %o0 697 mov %i0, %o0 712 mov %i1, %o1 698 mov %i1, %o1 713 mov %i2, %o2 699 mov %i2, %o2 714 mov HV_FAST_SVC_SEND, %o5 700 mov HV_FAST_SVC_SEND, %o5 715 ta HV_FAST_TRAP 701 ta HV_FAST_TRAP 716 stx %o1, [%i3] 702 stx %o1, [%i3] 717 ret 703 ret 718 restore 704 restore 719 ENDPROC(sun4v_svc_send) 705 ENDPROC(sun4v_svc_send) 720 706 721 ENTRY(sun4v_svc_recv) 707 ENTRY(sun4v_svc_recv) 722 save %sp, -192, %sp 708 save %sp, -192, %sp 723 mov %i0, %o0 709 mov %i0, %o0 724 mov %i1, %o1 710 mov %i1, %o1 725 mov %i2, %o2 711 mov %i2, %o2 726 mov HV_FAST_SVC_RECV, %o5 712 mov HV_FAST_SVC_RECV, %o5 727 ta HV_FAST_TRAP 713 ta HV_FAST_TRAP 728 stx %o1, [%i3] 714 stx %o1, [%i3] 729 ret 715 ret 730 restore 716 restore 731 ENDPROC(sun4v_svc_recv) 717 ENDPROC(sun4v_svc_recv) 732 718 733 ENTRY(sun4v_svc_getstatus) 719 ENTRY(sun4v_svc_getstatus) 734 mov HV_FAST_SVC_GETSTATUS, %o5 720 mov HV_FAST_SVC_GETSTATUS, %o5 735 mov %o1, %o4 721 mov %o1, %o4 736 ta HV_FAST_TRAP 722 ta HV_FAST_TRAP 737 stx %o1, [%o4] 723 stx %o1, [%o4] 738 retl 724 retl 739 nop 725 nop 740 ENDPROC(sun4v_svc_getstatus) 726 ENDPROC(sun4v_svc_getstatus) 741 727 742 ENTRY(sun4v_svc_setstatus) 728 ENTRY(sun4v_svc_setstatus) 743 mov HV_FAST_SVC_SETSTATUS, %o5 729 mov HV_FAST_SVC_SETSTATUS, %o5 744 ta HV_FAST_TRAP 730 ta HV_FAST_TRAP 745 retl 731 retl 746 nop 732 nop 747 ENDPROC(sun4v_svc_setstatus) 733 ENDPROC(sun4v_svc_setstatus) 748 734 749 ENTRY(sun4v_svc_clrstatus) 735 ENTRY(sun4v_svc_clrstatus) 750 mov HV_FAST_SVC_CLRSTATUS, %o5 736 mov HV_FAST_SVC_CLRSTATUS, %o5 751 ta HV_FAST_TRAP 737 ta HV_FAST_TRAP 752 retl 738 retl 753 nop 739 nop 754 ENDPROC(sun4v_svc_clrstatus) 740 ENDPROC(sun4v_svc_clrstatus) 755 741 756 ENTRY(sun4v_mmustat_conf) 742 ENTRY(sun4v_mmustat_conf) 757 mov %o1, %o4 743 mov %o1, %o4 758 mov HV_FAST_MMUSTAT_CONF, %o5 744 mov HV_FAST_MMUSTAT_CONF, %o5 759 ta HV_FAST_TRAP 745 ta HV_FAST_TRAP 760 stx %o1, [%o4] 746 stx %o1, [%o4] 761 retl 747 retl 762 nop 748 nop 763 ENDPROC(sun4v_mmustat_conf) 749 ENDPROC(sun4v_mmustat_conf) 764 750 765 ENTRY(sun4v_mmustat_info) 751 ENTRY(sun4v_mmustat_info) 766 mov %o0, %o4 752 mov %o0, %o4 767 mov HV_FAST_MMUSTAT_INFO, %o5 753 mov HV_FAST_MMUSTAT_INFO, %o5 768 ta HV_FAST_TRAP 754 ta HV_FAST_TRAP 769 stx %o1, [%o4] 755 stx %o1, [%o4] 770 retl 756 retl 771 nop 757 nop 772 ENDPROC(sun4v_mmustat_info) 758 ENDPROC(sun4v_mmustat_info) 773 759 774 ENTRY(sun4v_mmu_demap_all) 760 ENTRY(sun4v_mmu_demap_all) 775 clr %o0 761 clr %o0 776 clr %o1 762 clr %o1 777 mov HV_MMU_ALL, %o2 763 mov HV_MMU_ALL, %o2 778 mov HV_FAST_MMU_DEMAP_ALL, %o5 764 mov HV_FAST_MMU_DEMAP_ALL, %o5 779 ta HV_FAST_TRAP 765 ta HV_FAST_TRAP 780 retl 766 retl 781 nop 767 nop 782 ENDPROC(sun4v_mmu_demap_all) 768 ENDPROC(sun4v_mmu_demap_all) 783 769 784 ENTRY(sun4v_niagara_getperf) 770 ENTRY(sun4v_niagara_getperf) 785 mov %o0, %o4 771 mov %o0, %o4 786 mov HV_FAST_GET_PERFREG, %o5 772 mov HV_FAST_GET_PERFREG, %o5 787 ta HV_FAST_TRAP 773 ta HV_FAST_TRAP 788 stx %o1, [%o4] 774 stx %o1, [%o4] 789 retl 775 retl 790 nop 776 nop 791 ENDPROC(sun4v_niagara_getperf) 777 ENDPROC(sun4v_niagara_getperf) 792 EXPORT_SYMBOL(sun4v_niagara_getperf) << 793 778 794 ENTRY(sun4v_niagara_setperf) 779 ENTRY(sun4v_niagara_setperf) 795 mov HV_FAST_SET_PERFREG, %o5 780 mov HV_FAST_SET_PERFREG, %o5 796 ta HV_FAST_TRAP 781 ta HV_FAST_TRAP 797 retl 782 retl 798 nop 783 nop 799 ENDPROC(sun4v_niagara_setperf) 784 ENDPROC(sun4v_niagara_setperf) 800 EXPORT_SYMBOL(sun4v_niagara_setperf) << 801 785 802 ENTRY(sun4v_niagara2_getperf) 786 ENTRY(sun4v_niagara2_getperf) 803 mov %o0, %o4 787 mov %o0, %o4 804 mov HV_FAST_N2_GET_PERFREG, %o5 788 mov HV_FAST_N2_GET_PERFREG, %o5 805 ta HV_FAST_TRAP 789 ta HV_FAST_TRAP 806 stx %o1, [%o4] 790 stx %o1, [%o4] 807 retl 791 retl 808 nop 792 nop 809 ENDPROC(sun4v_niagara2_getperf) 793 ENDPROC(sun4v_niagara2_getperf) 810 EXPORT_SYMBOL(sun4v_niagara2_getperf) << 811 794 812 ENTRY(sun4v_niagara2_setperf) 795 ENTRY(sun4v_niagara2_setperf) 813 mov HV_FAST_N2_SET_PERFREG, %o5 796 mov HV_FAST_N2_SET_PERFREG, %o5 814 ta HV_FAST_TRAP 797 ta HV_FAST_TRAP 815 retl 798 retl 816 nop 799 nop 817 ENDPROC(sun4v_niagara2_setperf) 800 ENDPROC(sun4v_niagara2_setperf) 818 EXPORT_SYMBOL(sun4v_niagara2_setperf) << 819 801 820 ENTRY(sun4v_reboot_data_set) 802 ENTRY(sun4v_reboot_data_set) 821 mov HV_FAST_REBOOT_DATA_SET, %o5 803 mov HV_FAST_REBOOT_DATA_SET, %o5 822 ta HV_FAST_TRAP 804 ta HV_FAST_TRAP 823 retl 805 retl 824 nop 806 nop 825 ENDPROC(sun4v_reboot_data_set) 807 ENDPROC(sun4v_reboot_data_set) 826 808 827 ENTRY(sun4v_vt_get_perfreg) 809 ENTRY(sun4v_vt_get_perfreg) 828 mov %o1, %o4 810 mov %o1, %o4 829 mov HV_FAST_VT_GET_PERFREG, %o5 811 mov HV_FAST_VT_GET_PERFREG, %o5 830 ta HV_FAST_TRAP 812 ta HV_FAST_TRAP 831 stx %o1, [%o4] 813 stx %o1, [%o4] 832 retl 814 retl 833 nop 815 nop 834 ENDPROC(sun4v_vt_get_perfreg) 816 ENDPROC(sun4v_vt_get_perfreg) 835 817 836 ENTRY(sun4v_vt_set_perfreg) 818 ENTRY(sun4v_vt_set_perfreg) 837 mov HV_FAST_VT_SET_PERFREG, %o5 819 mov HV_FAST_VT_SET_PERFREG, %o5 838 ta HV_FAST_TRAP 820 ta HV_FAST_TRAP 839 retl 821 retl 840 nop 822 nop 841 ENDPROC(sun4v_vt_set_perfreg) 823 ENDPROC(sun4v_vt_set_perfreg) 842 824 843 ENTRY(sun4v_t5_get_perfreg) 825 ENTRY(sun4v_t5_get_perfreg) 844 mov %o1, %o4 826 mov %o1, %o4 845 mov HV_FAST_T5_GET_PERFREG, %o5 827 mov HV_FAST_T5_GET_PERFREG, %o5 846 ta HV_FAST_TRAP 828 ta HV_FAST_TRAP 847 stx %o1, [%o4] 829 stx %o1, [%o4] 848 retl 830 retl 849 nop 831 nop 850 ENDPROC(sun4v_t5_get_perfreg) 832 ENDPROC(sun4v_t5_get_perfreg) 851 833 852 ENTRY(sun4v_t5_set_perfreg) 834 ENTRY(sun4v_t5_set_perfreg) 853 mov HV_FAST_T5_SET_PERFREG, %o5 835 mov HV_FAST_T5_SET_PERFREG, %o5 854 ta HV_FAST_TRAP 836 ta HV_FAST_TRAP 855 retl 837 retl 856 nop 838 nop 857 ENDPROC(sun4v_t5_set_perfreg) 839 ENDPROC(sun4v_t5_set_perfreg) 858 840 859 ENTRY(sun4v_m7_get_perfreg) 841 ENTRY(sun4v_m7_get_perfreg) 860 mov %o1, %o4 842 mov %o1, %o4 861 mov HV_FAST_M7_GET_PERFREG, %o5 843 mov HV_FAST_M7_GET_PERFREG, %o5 862 ta HV_FAST_TRAP 844 ta HV_FAST_TRAP 863 stx %o1, [%o4] 845 stx %o1, [%o4] 864 retl 846 retl 865 nop 847 nop 866 ENDPROC(sun4v_m7_get_perfreg) 848 ENDPROC(sun4v_m7_get_perfreg) 867 849 868 ENTRY(sun4v_m7_set_perfreg) 850 ENTRY(sun4v_m7_set_perfreg) 869 mov HV_FAST_M7_SET_PERFREG, %o5 851 mov HV_FAST_M7_SET_PERFREG, %o5 870 ta HV_FAST_TRAP 852 ta HV_FAST_TRAP 871 retl 853 retl 872 nop 854 nop 873 ENDPROC(sun4v_m7_set_perfreg) 855 ENDPROC(sun4v_m7_set_perfreg) 874 << 875 /* %o0: address of CCB array << 876 * %o1: size (in bytes) of CCB array << 877 * %o2: flags << 878 * %o3: reserved << 879 * << 880 * returns: << 881 * %o0: status << 882 * %o1: size (in bytes) of the CCB arr << 883 * %o2: status data << 884 * %o3: reserved << 885 */ << 886 ENTRY(sun4v_ccb_submit) << 887 mov %o5, %g1 << 888 mov HV_CCB_SUBMIT, %o5 << 889 ta HV_FAST_TRAP << 890 stx %o1, [%o4] << 891 retl << 892 stx %o2, [%g1] << 893 ENDPROC(sun4v_ccb_submit) << 894 EXPORT_SYMBOL(sun4v_ccb_submit) << 895 << 896 /* %o0: completion area ra for the ccb << 897 * << 898 * returns: << 899 * %o0: status << 900 * %o1: CCB state << 901 * %o2: position << 902 * %o3: dax unit << 903 * %o4: queue << 904 */ << 905 ENTRY(sun4v_ccb_info) << 906 mov %o1, %g1 << 907 mov HV_CCB_INFO, %o5 << 908 ta HV_FAST_TRAP << 909 sth %o1, [%g1 + CCB_INFO_OFFSET_CC << 910 sth %o2, [%g1 + CCB_INFO_OFFSET_QU << 911 sth %o3, [%g1 + CCB_INFO_OFFSET_DA << 912 retl << 913 sth %o4, [%g1 + CCB_INFO_OFFSET_QU << 914 ENDPROC(sun4v_ccb_info) << 915 EXPORT_SYMBOL(sun4v_ccb_info) << 916 << 917 /* %o0: completion area ra for the ccb << 918 * << 919 * returns: << 920 * %o0: status << 921 * %o1: result of the kill << 922 */ << 923 ENTRY(sun4v_ccb_kill) << 924 mov %o1, %g1 << 925 mov HV_CCB_KILL, %o5 << 926 ta HV_FAST_TRAP << 927 retl << 928 sth %o1, [%g1] << 929 ENDPROC(sun4v_ccb_kill) << 930 EXPORT_SYMBOL(sun4v_ccb_kill) <<
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.