diff options
| author | riastradh <riastradh@NetBSD.org> | 2019-12-03 15:20:59 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2019-12-03 15:20:59 +0000 |
| commit | b5b20adbea3adf34becdd1c66da286bf10aadace (patch) | |
| tree | 0f731a2fa4ef751bcde3dcaace4d2c79151556ef /sys/arch/usermode/dev | |
| parent | 60ec520939a2465b0fc5e8f446926afba85dfb71 (diff) | |
Use __insn_barrier to enforce ordering in l_ncsw loops.
(Only need ordering observable by interruption, not by other CPUs.)
Diffstat (limited to 'sys/arch/usermode/dev')
| -rw-r--r-- | sys/arch/usermode/dev/cpu.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/usermode/dev/cpu.c b/sys/arch/usermode/dev/cpu.c index 1cf1de2c01b..172dc134971 100644 --- a/sys/arch/usermode/dev/cpu.c +++ b/sys/arch/usermode/dev/cpu.c @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.82 2019/12/01 14:52:14 ad Exp $ */ +/* $NetBSD: cpu.c,v 1.83 2019/12/03 15:20:59 riastradh Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca> @@ -30,7 +30,7 @@ #include "opt_hz.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.82 2019/12/01 14:52:14 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.83 2019/12/03 15:20:59 riastradh Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -535,7 +535,9 @@ cpu_intr_p(void) l = curlwp; do { ncsw = l->l_ncsw; + __insn_barrier(); idepth = l->l_cpu->ci_idepth; + __insn_barrier(); } while (__predict_false(ncsw != l->l_ncsw)); return idepth >= 0; |
