__HAVE_PREEEMPTION -> __HAVE_PREEMPTION

This commit is contained in:
jmcneill 2015-04-14 22:36:53 +00:00
parent 786bf0b470
commit 6c00453054
6 changed files with 19 additions and 19 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu_machdep.c,v 1.1 2014/08/10 05:47:37 matt Exp $ */
/* $NetBSD: cpu_machdep.c,v 1.2 2015/04/14 22:36:54 jmcneill Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(1, "$NetBSD: cpu_machdep.c,v 1.1 2014/08/10 05:47:37 matt Exp $");
__KERNEL_RCSID(1, "$NetBSD: cpu_machdep.c,v 1.2 2015/04/14 22:36:54 jmcneill Exp $");
#include "opt_pic.h"
@ -112,7 +112,7 @@ dosoftints(void)
KASSERT((softints != 0) == ((ci->ci_softints >> opl) != 0));
KASSERT(opl == IPL_NONE || (softints & (1 << (opl - IPL_SOFTCLOCK))) == 0);
if (softints == 0) {
#ifdef __HAVE_PREEEMPTION
#ifdef __HAVE_PREEMPTION
if (ci->ci_want_resched & RESCHED_KPREEMPT) {
ci->ci_want_resched &= ~RESCHED_KPREEMPT;
splsched();
@ -332,7 +332,7 @@ cpu_kpreempt_enter(uintptr_t where, int s)
KASSERT(curcpu()->ci_mtx_count == 0);
return true;
}
atomic_or_uint(curcpu()->ci_want_resched, RESCHED_KPREEEMPT);
atomic_or_uint(curcpu()->ci_want_resched, RESCHED_KPREEMPT);
#endif
return false;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: ast.c,v 1.26 2015/04/08 18:10:08 matt Exp $ */
/* $NetBSD: ast.c,v 1.27 2015/04/14 22:36:53 jmcneill Exp $ */
/*
* Copyright (c) 1994,1995 Mark Brinicombe
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ast.c,v 1.26 2015/04/08 18:10:08 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: ast.c,v 1.27 2015/04/14 22:36:53 jmcneill Exp $");
#include "opt_ddb.h"
@ -123,7 +123,7 @@ ast(struct trapframe *tf)
KASSERT(VALID_R15_PSR(tf->tf_pc, tf->tf_spsr));
#endif
#ifdef __HAVE_PREEEMPTION
#ifdef __HAVE_PREEMPTION
kpreempt_disable();
#endif
struct cpu_info * const ci = curcpu();
@ -131,13 +131,13 @@ ast(struct trapframe *tf)
ci->ci_data.cpu_ntrap++;
KDASSERT(ci->ci_cpl == IPL_NONE);
#ifdef __HAVE_PREEEMPTION
#ifdef __HAVE_PREEMPTION
atomic_and_uint(&ci->ci_astpending, ~__BIT(0));
#else
ci->ci_astpending = 0;
#endif
const int want_resched = ci->ci_want_resched;
#ifdef __HAVE_PREEEMPTION
#ifdef __HAVE_PREEMPTION
kpreempt_enable();
#endif

View File

@ -219,7 +219,7 @@ curcpu(void)
}
#elif !defined(MULTIPROCESSOR)
#define curcpu() (&cpu_info_store)
#elif !defined(__HAVE_PREEEMPTION)
#elif !defined(__HAVE_PREEMPTION)
#error MULTIPROCESSOR && !__HAVE_PREEMPTION requires TPIDRPRW_IS_CURCPU or TPIDRPRW_IS_CURLWP
#else
#error MULTIPROCESSOR && __HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP

View File

@ -1,4 +1,4 @@
/* $NetBSD: pic.c,v 1.32 2015/04/12 15:32:19 matt Exp $ */
/* $NetBSD: pic.c,v 1.33 2015/04/14 22:36:54 jmcneill 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.32 2015/04/12 15:32:19 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.33 2015/04/14 22:36:54 jmcneill Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@ -556,7 +556,7 @@ pic_do_pending_ints(register_t psw, int newipl, void *frame)
percpu_putref(pic_pending_percpu);
#endif
#endif /* __HAVE_PIC_PENDING_INTRS */
#ifdef __HAVE_PREEEMPTION
#ifdef __HAVE_PREEMPTION
if (newipl == IPL_NONE && (ci->ci_astpending & __BIT(1))) {
pic_set_priority(ci, IPL_SCHED);
kpreempt(0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipifuncs.c,v 1.7 2014/05/19 22:47:53 rmind Exp $ */
/* $NetBSD: ipifuncs.c,v 1.8 2015/04/14 22:36:53 jmcneill Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@ -32,7 +32,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.7 2014/05/19 22:47:53 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.8 2015/04/14 22:36:53 jmcneill Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@ -84,7 +84,7 @@ ipi_syncicache(struct cpu_info *ci)
pmap_tlb_syncicache_wanted(ci);
}
#ifdef __HAVE_PREEEMPTION
#ifdef __HAVE_PREEMPTION
static inline void
ipi_kpreempt(struct cpu_info *ci)
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: e500_intr.c,v 1.32 2015/01/23 09:02:42 nonaka Exp $ */
/* $NetBSD: e500_intr.c,v 1.33 2015/04/14 22:36:54 jmcneill Exp $ */
/*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@ -41,7 +41,7 @@
#define __INTR_PRIVATE
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: e500_intr.c,v 1.32 2015/01/23 09:02:42 nonaka Exp $");
__KERNEL_RCSID(0, "$NetBSD: e500_intr.c,v 1.33 2015/04/14 22:36:54 jmcneill Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@ -1279,7 +1279,7 @@ e500_intr_cpu_send_ipi(cpuid_t target, uint32_t ipimsg)
typedef void (*ipifunc_t)(void);
#ifdef __HAVE_PREEEMPTION
#ifdef __HAVE_PREEMPTION
static void
e500_ipi_kpreempt(void)
{