Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Restore the assert in RUMP's softint_schedule_cpu() and ...
details: https://anonhg.NetBSD.org/src/rev/e48b57041c76
branches: trunk
changeset: 329788:e48b57041c76
user: rmind <rmind%NetBSD.org@localhost>
date: Mon Jun 09 13:03:16 2014 +0000
description:
Restore the assert in RUMP's softint_schedule_cpu() and just ensure
curcpu() in the caller.
diffstat:
sys/net/pktqueue.c | 8 ++++----
sys/rump/librump/rumpkern/intr.c | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diffs (58 lines):
diff -r a9399c1c45a2 -r e48b57041c76 sys/net/pktqueue.c
--- a/sys/net/pktqueue.c Mon Jun 09 12:57:04 2014 +0000
+++ b/sys/net/pktqueue.c Mon Jun 09 13:03:16 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pktqueue.c,v 1.2 2014/06/09 12:57:04 rmind Exp $ */
+/* $NetBSD: pktqueue.c,v 1.3 2014/06/09 13:03:16 rmind Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pktqueue.c,v 1.2 2014/06/09 12:57:04 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pktqueue.c,v 1.3 2014/06/09 13:03:16 rmind Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -204,9 +204,9 @@
* => Returns false on failure; caller is responsible to free the packet.
*/
bool
-pktq_enqueue(pktqueue_t *pq, struct mbuf *m, const u_int hash)
+pktq_enqueue(pktqueue_t *pq, struct mbuf *m, const u_int hash __unused)
{
- const unsigned cpuid = hash % ncpu;
+ const unsigned cpuid = curcpu()->ci_index /* hash % ncpu */;
KASSERT(kpreempt_disabled());
diff -r a9399c1c45a2 -r e48b57041c76 sys/rump/librump/rumpkern/intr.c
--- a/sys/rump/librump/rumpkern/intr.c Mon Jun 09 12:57:04 2014 +0000
+++ b/sys/rump/librump/rumpkern/intr.c Mon Jun 09 13:03:16 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.c,v 1.44 2014/06/08 15:24:34 rmind Exp $ */
+/* $NetBSD: intr.c,v 1.45 2014/06/09 13:03:16 rmind Exp $ */
/*
* Copyright (c) 2008-2010 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.44 2014/06/08 15:24:34 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.45 2014/06/09 13:03:16 rmind Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -329,8 +329,8 @@
{
/*
* TODO: implement this properly
- * KASSERT(curcpu() == ci);
*/
+ KASSERT(curcpu() == ci);
softint_schedule(arg);
}
Home |
Main Index |
Thread Index |
Old Index