Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen/xen Fix fallout from previous: ci_ipending is i...



details:   https://anonhg.NetBSD.org/src/rev/630aea053dfd
branches:  trunk
changeset: 370652:630aea053dfd
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Thu Sep 22 16:21:34 2022 +0000

description:
Fix fallout from previous: ci_ipending is in the low bytes of ci_istate,
so we should not left-shift by 8 the ci_ipending value we want to add there.
Should fix KASSERT in Xen's idle_block() reported by Frank Kardel in private
mail.

diffstat:

 sys/arch/xen/xen/xenevt.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 36cf3a5441cf -r 630aea053dfd sys/arch/xen/xen/xenevt.c
--- a/sys/arch/xen/xen/xenevt.c Thu Sep 22 14:46:37 2022 +0000
+++ b/sys/arch/xen/xen/xenevt.c Thu Sep 22 16:21:34 2022 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: xenevt.c,v 1.67 2022/09/07 00:40:19 knakahara Exp $      */
+/*      $NetBSD: xenevt.c,v 1.68 2022/09/22 16:21:34 bouyer Exp $      */
 
 /*
  * Copyright (c) 2005 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xenevt.c,v 1.67 2022/09/07 00:40:19 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xenevt.c,v 1.68 2022/09/22 16:21:34 bouyer Exp $");
 
 #include "opt_xen.h"
 #include <sys/param.h>
@@ -210,7 +210,7 @@
        KASSERT(xenevt_ih->ih_cpu->ci_ilevel >= IPL_HIGH);
        atomic_or_ulong(&xenevt_ev1, 1UL << l1);
        atomic_or_ulong(&xenevt_ev2[l1], 1UL << l2);
-       atomic_or_64(&xenevt_ih->ih_cpu->ci_istate, (1ULL << SIR_XENIPL_HIGH) << 8);
+       atomic_or_64(&xenevt_ih->ih_cpu->ci_istate, (1ULL << SIR_XENIPL_HIGH));
        atomic_add_int(&xenevt_ih->ih_pending, 1);
        evtsource[xenevt_ev]->ev_evcnt.ev_count++;
 }



Home | Main Index | Thread Index | Old Index