Sat Aug 29 07:16:04 2020 UTC ()
'doreti_checkast' isn't global anymore, localify.


(maxv)
diff -r1.46 -r1.47 src/sys/arch/amd64/amd64/spl.S

cvs diff -r1.46 -r1.47 src/sys/arch/amd64/amd64/spl.S (expand / switch to unified diff)

--- src/sys/arch/amd64/amd64/spl.S 2020/05/17 12:11:11 1.46
+++ src/sys/arch/amd64/amd64/spl.S 2020/08/29 07:16:03 1.47
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: spl.S,v 1.46 2020/05/17 12:11:11 ad Exp $ */ 1/* $NetBSD: spl.S,v 1.47 2020/08/29 07:16:03 maxv Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2003 Wasabi Systems, Inc. 4 * Copyright (c) 2003 Wasabi Systems, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Written by Frank van der Linden for Wasabi Systems, Inc. 7 * Written by Frank van der Linden for Wasabi Systems, Inc.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -321,41 +321,38 @@ IDTVEC(doreti) @@ -321,41 +321,38 @@ IDTVEC(doreti)
321 movl CPUVAR(IUNMASK)(,%rax,4),%eax 321 movl CPUVAR(IUNMASK)(,%rax,4),%eax
322 CLI(si) 322 CLI(si)
323 andl CPUVAR(IPENDING),%eax 323 andl CPUVAR(IPENDING),%eax
324 jz 2f 324 jz 2f
325 bsrl %eax,%eax /* slow, but not worth optimizing */ 325 bsrl %eax,%eax /* slow, but not worth optimizing */
326 btrl %eax,CPUVAR(IPENDING) 326 btrl %eax,CPUVAR(IPENDING)
327 movq CPUVAR(ISOURCES)(,%rax,8),%rax 327 movq CPUVAR(ISOURCES)(,%rax,8),%rax
328 jmp *IS_RESUME(%rax) 328 jmp *IS_RESUME(%rax)
3292: /* Check for ASTs on exit to user mode. */ 3292: /* Check for ASTs on exit to user mode. */
330 movl %ebx,CPUVAR(ILEVEL) 330 movl %ebx,CPUVAR(ILEVEL)
3315: 3315:
332 testb $SEL_RPL,TF_CS(%rsp) 332 testb $SEL_RPL,TF_CS(%rsp)
333 jz 6f 333 jz 6f
334 334.Ldoreti_checkast:
335 .type _C_LABEL(doreti_checkast), @function 
336LABEL(doreti_checkast) 
337 movq CPUVAR(CURLWP),%r14 335 movq CPUVAR(CURLWP),%r14
338 CHECK_ASTPENDING(%r14) 336 CHECK_ASTPENDING(%r14)
339 je 3f 337 je 3f
340 CLEAR_ASTPENDING(%r14) 338 CLEAR_ASTPENDING(%r14)
341 STI(si) 339 STI(si)
342 movl $T_ASTFLT,TF_TRAPNO(%rsp) /* XXX undo later.. */ 340 movl $T_ASTFLT,TF_TRAPNO(%rsp) /* XXX undo later.. */
343 /* Pushed T_ASTFLT into tf_trapno on entry. */ 341 /* Pushed T_ASTFLT into tf_trapno on entry. */
344 movq %rsp,%rdi 342 movq %rsp,%rdi
345 KMSAN_INIT_ARG(8) 343 KMSAN_INIT_ARG(8)
346 call _C_LABEL(trap) 344 call _C_LABEL(trap)
347 CLI(si) 345 CLI(si)
348 jmp doreti_checkast 346 jmp .Ldoreti_checkast
3493: 3473:
350 CHECK_DEFERRED_SWITCH 348 CHECK_DEFERRED_SWITCH
351 jnz 9f 349 jnz 9f
352 HANDLE_DEFERRED_FPU 350 HANDLE_DEFERRED_FPU
3536: 3516:
354 INTRFASTEXIT 352 INTRFASTEXIT
3559: 3539:
356 STI(si) 354 STI(si)
357 call _C_LABEL(do_pmap_load) 355 call _C_LABEL(do_pmap_load)
358 CLI(si) 356 CLI(si)
359 jmp doreti_checkast /* recheck ASTs */ 357 jmp .Ldoreti_checkast /* recheck ASTs */
360END(doreti_checkast) 
361IDTVEC_END(doreti) 358IDTVEC_END(doreti)