diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2015-04-10 05:31:26 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2015-04-10 05:31:26 +0000 |
commit | 5498222837b1ceb0bef9c843b1f73c62d6b40224 (patch) | |
tree | e14c582b57dd4d31ab4adf76c467f78121729208 /sys/dev/pci/drm | |
parent | d079c77a85fc6a58405babf993f3285dc0c1fb85 (diff) |
add irqs_disabled() and in_dbg_master() using cold and db_is_active
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r-- | sys/dev/pci/drm/drmP.h | 6 | ||||
-rw-r--r-- | sys/dev/pci/drm/drm_linux.h | 17 |
2 files changed, 21 insertions, 2 deletions
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 <sys/extent.h> #include <sys/rwlock.h> +#ifdef DDB +#include <ddb/db_var.h> +#endif + #include <uvm/uvm_extern.h> #include <uvm/uvm_object.h> 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) { |