Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/pic Catch up with the per lwp astpending (rathe...



details:   https://anonhg.NetBSD.org/src/rev/ce7a2b3593ad
branches:  trunk
changeset: 368686:ce7a2b3593ad
user:      skrll <skrll%NetBSD.org@localhost>
date:      Thu Jul 28 07:15:27 2022 +0000

description:
Catch up with the per lwp astpending (rather than per cpu) flag in the
preemption code.  NFC as preemption (still) isn't enabled.

diffstat:

 sys/arch/arm/pic/pic.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r d789cca73adf -r ce7a2b3593ad sys/arch/arm/pic/pic.c
--- a/sys/arch/arm/pic/pic.c    Thu Jul 28 00:33:57 2022 +0000
+++ b/sys/arch/arm/pic/pic.c    Thu Jul 28 07:15:27 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pic.c,v 1.80 2022/06/25 12:41:56 jmcneill Exp $        */
+/*     $NetBSD: pic.c,v 1.81 2022/07/28 07:15:27 skrll Exp $   */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #include "opt_multiprocessor.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.80 2022/06/25 12:41:56 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.81 2022/07/28 07:15:27 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -150,7 +150,9 @@
 int
 pic_ipi_kpreempt(void *arg)
 {
-       atomic_or_uint(&curcpu()->ci_astpending, __BIT(1));
+       struct lwp * const l = curlwp;
+
+       l->l_md.md_astpending |= __BIT(1);
        return 1;
 }
 #endif /* __HAVE_PREEMPTION */
@@ -554,7 +556,8 @@
        }
 #endif /* __HAVE_PIC_PENDING_INTRS */
 #ifdef __HAVE_PREEMPTION
-       if (newipl == IPL_NONE && (ci->ci_astpending & __BIT(1))) {
+       struct lwp * const l = curlwp;
+       if (newipl == IPL_NONE && (l->l_md.md_astpending & __BIT(1))) {
                pic_set_priority(ci, IPL_SCHED);
                kpreempt(0);
        }



Home | Main Index | Thread Index | Old Index