Restore the assert in RUMP's softint_schedule_cpu() and just ensure

curcpu() in the caller.
This commit is contained in:
rmind 2014-06-09 13:03:16 +00:00
parent ce450355ec
commit 264c0a1580
2 changed files with 7 additions and 7 deletions

View File

@ -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 @@ pktq_rps_hash(const struct mbuf *m __unused)
* => 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());

View File

@ -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 @@ softint_schedule_cpu(void *arg, struct cpu_info *ci)
{
/*
* TODO: implement this properly
* KASSERT(curcpu() == ci);
*/
KASSERT(curcpu() == ci);
softint_schedule(arg);
}