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 Fixup with __HAVE_PREEMPTION code which is ...



details:   https://anonhg.NetBSD.org/src/rev/492cb49f2e16
branches:  trunk
changeset: 952914:492cb49f2e16
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Feb 21 08:31:36 2021 +0000

description:
Fixup with __HAVE_PREEMPTION code which is currently unused

diffstat:

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

diffs (39 lines):

diff -r c4344fbcea5c -r 492cb49f2e16 sys/arch/arm/pic/pic.c
--- a/sys/arch/arm/pic/pic.c    Sun Feb 21 08:27:41 2021 +0000
+++ b/sys/arch/arm/pic/pic.c    Sun Feb 21 08:31:36 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pic.c,v 1.67 2021/02/20 19:30:46 jmcneill Exp $        */
+/*     $NetBSD: pic.c,v 1.68 2021/02/21 08:31:36 skrll Exp $   */
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -33,7 +33,7 @@
 #include "opt_multiprocessor.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.67 2021/02/20 19:30:46 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.68 2021/02/21 08:31:36 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -166,7 +166,9 @@
 int
 pic_ipi_kpreempt(void *arg)
 {
-       atomic_or_uint(&curcpu()->ci_astpending, __BIT(1));
+       struct lwp *l = curlwp;
+
+       l->l_md.md_astpending |= __BIT(1);
        return 1;
 }
 #endif /* __HAVE_PREEMPTION */
@@ -569,7 +571,8 @@
        }
 #endif /* __HAVE_PIC_PENDING_INTRS */
 #ifdef __HAVE_PREEMPTION
-       if (newipl == IPL_NONE && (ci->ci_astpending & __BIT(1))) {
+       struct lwp *l = curlwp;
+       if (newipl == IPL_NONE && (l->l_md.md_astpending & __BIT(1))) {
                pic_set_priority_psw(ci, psw, IPL_SCHED);
                kpreempt(0);
        }



Home | Main Index | Thread Index | Old Index