From 5921ed7cda98e52c36d3c090127abac091336c29 Mon Sep 17 00:00:00 2001 From: ad Date: Thu, 6 Dec 2007 13:58:38 +0000 Subject: [PATCH] Share cpu_intr_p() with xen. Why xen has its own intr.c is a mystery. --- sys/arch/x86/x86/intr.c | 11 ++--------- sys/arch/x86/x86/x86_machdep.c | 11 +++++++++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/arch/x86/x86/intr.c b/sys/arch/x86/x86/intr.c index 1ec2033302c6..afcaae1bd6df 100644 --- a/sys/arch/x86/x86/intr.c +++ b/sys/arch/x86/x86/intr.c @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.36 2007/12/03 15:34:27 ad Exp $ */ +/* $NetBSD: intr.c,v 1.37 2007/12/06 13:58:38 ad Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -140,7 +140,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.36 2007/12/03 15:34:27 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.37 2007/12/06 13:58:38 ad Exp $"); #include "opt_multiprocessor.h" #include "opt_acpi.h" @@ -999,10 +999,3 @@ softint_init_md(lwp_t *l, u_int level, uintptr_t *machdep) intr_calculatemasks(ci); } - -bool -cpu_intr_p(void) -{ - - return (curcpu()->ci_idepth >= 0); -} diff --git a/sys/arch/x86/x86/x86_machdep.c b/sys/arch/x86/x86/x86_machdep.c index 01933f6735bd..3b221a951df3 100644 --- a/sys/arch/x86/x86/x86_machdep.c +++ b/sys/arch/x86/x86/x86_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: x86_machdep.c,v 1.14 2007/11/12 19:02:29 ad Exp $ */ +/* $NetBSD: x86_machdep.c,v 1.15 2007/12/06 13:58:38 ad Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.14 2007/11/12 19:02:29 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.15 2007/12/06 13:58:38 ad Exp $"); #include #include @@ -171,3 +171,10 @@ cpu_need_proftick(struct lwp *l) l->l_pflag |= LP_OWEUPC; aston(l); } + +bool +cpu_intr_p(void) +{ + + return (curcpu()->ci_idepth >= 0); +}