From: jsg Date: Fri, 10 Apr 2015 05:31:25 +0000 (+0000) Subject: add irqs_disabled() and in_dbg_master() using cold and db_is_active X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e020b01ee3c93eb481b70bb7d83d47801e5bc793;p=openbsd add irqs_disabled() and in_dbg_master() using cold and db_is_active --- diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h index 897b030b40d..acf0dadf830 100644 --- a/sys/dev/pci/drm/drmP.h +++ b/sys/dev/pci/drm/drmP.h @@ -1,4 +1,4 @@ -/* $OpenBSD: drmP.h,v 1.186 2015/04/06 15:43:15 jsg Exp $ */ +/* $OpenBSD: drmP.h,v 1.187 2015/04/10 05:31:25 jsg Exp $ */ /* drmP.h -- Private header for Direct Rendering Manager -*- linux-c -*- * Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com */ @@ -54,6 +54,10 @@ #include #include +#ifdef DDB +#include +#endif + #include #include diff --git a/sys/dev/pci/drm/drm_linux.h b/sys/dev/pci/drm/drm_linux.h index 04879bac0e9..e6d71f7fa27 100644 --- a/sys/dev/pci/drm/drm_linux.h +++ b/sys/dev/pci/drm/drm_linux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: drm_linux.h,v 1.15 2015/04/08 04:03:06 jsg Exp $ */ +/* $OpenBSD: drm_linux.h,v 1.16 2015/04/10 05:31:25 jsg Exp $ */ /* * Copyright (c) 2013, 2014 Mark Kettenis * @@ -544,6 +544,21 @@ in_atomic(void) return curcpu()->ci_inatomic; } +static inline int +irqs_disabled(void) +{ + return (cold); +} + +static inline int +in_dbg_master(void) +{ +#ifdef DDB + return (db_is_active); +#endif + return (0); +} + static inline void * kmap_atomic(struct vm_page *pg) {