diff options
author | 2015-04-10 05:31:25 +0000 | |
---|---|---|
committer | 2015-04-10 05:31:25 +0000 | |
commit | e020b01ee3c93eb481b70bb7d83d47801e5bc793 (patch) | |
tree | 48c052d3e38a1a4b96d184d9b52e60c72ed3d18b | |
parent | Don't send hostkey advertisments (hostkeys-00@openssh.com) to current (diff) | |
download | wireguard-openbsd-e020b01ee3c93eb481b70bb7d83d47801e5bc793.tar.xz wireguard-openbsd-e020b01ee3c93eb481b70bb7d83d47801e5bc793.zip |
add irqs_disabled() and in_dbg_master() using cold and db_is_active
-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) { |