Module Name:    src
Committed By:   bouyer
Date:           Thu Sep 22 16:21:34 UTC 2022

Modified Files:
        src/sys/arch/xen/xen: xenevt.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/xen/xen/xenevt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/xen/xen/xenevt.c
diff -u src/sys/arch/xen/xen/xenevt.c:1.67 src/sys/arch/xen/xen/xenevt.c:1.68
--- src/sys/arch/xen/xen/xenevt.c:1.67	Wed Sep  7 00:40:19 2022
+++ src/sys/arch/xen/xen/xenevt.c	Thu Sep 22 16:21:34 2022
@@ -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 @@ xenevt_setipending(int l1, int l2)
 	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++;
 }

Reply via email to