diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2011-05-12 19:34:23 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-17 11:46:17 -0700 |
commit | f63c9149d052c86113fc84edd4ce138db44e768a (patch) | |
tree | e87a9ded17759c8ff25dc2c18a30b540713c084a | |
parent | c35470b2297f0e05596a7aeebff8a67f4c6e3552 (diff) | |
download | linux-3.10-f63c9149d052c86113fc84edd4ce138db44e768a.tar.gz linux-3.10-f63c9149d052c86113fc84edd4ce138db44e768a.tar.bz2 linux-3.10-f63c9149d052c86113fc84edd4ce138db44e768a.zip |
Staging: hv: Move the contents of logging.h to hyperv.h
Move the contents of logging.h to hyperv.h.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/hv/blkvsc_drv.c | 1 | ||||
-rw-r--r-- | drivers/staging/hv/channel.c | 1 | ||||
-rw-r--r-- | drivers/staging/hv/channel_mgmt.c | 1 | ||||
-rw-r--r-- | drivers/staging/hv/connection.c | 1 | ||||
-rw-r--r-- | drivers/staging/hv/hv.c | 1 | ||||
-rw-r--r-- | drivers/staging/hv/hv_kvp.c | 1 | ||||
-rw-r--r-- | drivers/staging/hv/hv_mouse.c | 1 | ||||
-rw-r--r-- | drivers/staging/hv/hv_util.c | 1 | ||||
-rw-r--r-- | drivers/staging/hv/hyperv.h | 68 | ||||
-rw-r--r-- | drivers/staging/hv/logging.h | 98 | ||||
-rw-r--r-- | drivers/staging/hv/netvsc.c | 1 | ||||
-rw-r--r-- | drivers/staging/hv/netvsc_drv.c | 1 | ||||
-rw-r--r-- | drivers/staging/hv/ring_buffer.c | 1 | ||||
-rw-r--r-- | drivers/staging/hv/rndis_filter.c | 1 | ||||
-rw-r--r-- | drivers/staging/hv/storvsc.c | 1 | ||||
-rw-r--r-- | drivers/staging/hv/storvsc_drv.c | 1 | ||||
-rw-r--r-- | drivers/staging/hv/vmbus_drv.c | 1 |
17 files changed, 68 insertions, 113 deletions
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c index 039bc633d22..5059e448ca6 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c @@ -34,7 +34,6 @@ #include "hyperv.h" #include "hv_api.h" -#include "logging.h" #include "vmbus.h" #include "storvsc_api.h" diff --git a/drivers/staging/hv/channel.c b/drivers/staging/hv/channel.c index 071556268d9..21cdfdea914 100644 --- a/drivers/staging/hv/channel.c +++ b/drivers/staging/hv/channel.c @@ -29,7 +29,6 @@ #include "hyperv.h" #include "hv_api.h" -#include "logging.h" #include "vmbus_private.h" #define NUM_PAGES_SPANNED(addr, len) \ diff --git a/drivers/staging/hv/channel_mgmt.c b/drivers/staging/hv/channel_mgmt.c index 1184fffce0d..ed1883fbc7e 100644 --- a/drivers/staging/hv/channel_mgmt.c +++ b/drivers/staging/hv/channel_mgmt.c @@ -31,7 +31,6 @@ #include "hyperv.h" #include "hv_api.h" -#include "logging.h" #include "vmbus_private.h" #include "utils.h" diff --git a/drivers/staging/hv/connection.c b/drivers/staging/hv/connection.c index 0128b50f5a9..6ebc10618ff 100644 --- a/drivers/staging/hv/connection.c +++ b/drivers/staging/hv/connection.c @@ -31,7 +31,6 @@ #include "hyperv.h" #include "hv_api.h" -#include "logging.h" #include "vmbus_private.h" diff --git a/drivers/staging/hv/hv.c b/drivers/staging/hv/hv.c index a28fc31ca85..2ceced20a26 100644 --- a/drivers/staging/hv/hv.c +++ b/drivers/staging/hv/hv.c @@ -28,7 +28,6 @@ #include "hyperv.h" #include "hv_api.h" -#include "logging.h" #include "vmbus_private.h" /* The one and only */ diff --git a/drivers/staging/hv/hv_kvp.c b/drivers/staging/hv/hv_kvp.c index c4f49d68af0..237a42dd226 100644 --- a/drivers/staging/hv/hv_kvp.c +++ b/drivers/staging/hv/hv_kvp.c @@ -28,7 +28,6 @@ #include <linux/workqueue.h> #include "hyperv.h" -#include "logging.h" #include "hv_api.h" #include "vmbus.h" #include "vmbus_private.h" diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c index 7b82bae41c5..fbe3536996a 100644 --- a/drivers/staging/hv/hv_mouse.c +++ b/drivers/staging/hv/hv_mouse.c @@ -28,7 +28,6 @@ #include "hyperv.h" #include "hv_api.h" -#include "logging.h" #include "vmbus.h" #include "vmbus_api.h" diff --git a/drivers/staging/hv/hv_util.c b/drivers/staging/hv/hv_util.c index 31e067274cc..2e2ea5d29f2 100644 --- a/drivers/staging/hv/hv_util.c +++ b/drivers/staging/hv/hv_util.c @@ -30,7 +30,6 @@ #include <linux/pci.h> #include "hyperv.h" -#include "logging.h" #include "hv_api.h" #include "vmbus.h" #include "vmbus_private.h" diff --git a/drivers/staging/hv/hyperv.h b/drivers/staging/hv/hyperv.h index 45c45f2bb6e..a596039d02a 100644 --- a/drivers/staging/hv/hyperv.h +++ b/drivers/staging/hv/hyperv.h @@ -689,4 +689,72 @@ extern void vmbus_get_debug_info(struct vmbus_channel *channel, extern void vmbus_ontimer(unsigned long data); + +#define LOWORD(dw) ((unsigned short)(dw)) +#define HIWORD(dw) ((unsigned short)(((unsigned int) (dw) >> 16) & 0xFFFF)) + + +#define VMBUS 0x0001 +#define STORVSC 0x0002 +#define NETVSC 0x0004 +#define INPUTVSC 0x0008 +#define BLKVSC 0x0010 +#define VMBUS_DRV 0x0100 +#define STORVSC_DRV 0x0200 +#define NETVSC_DRV 0x0400 +#define INPUTVSC_DRV 0x0800 +#define BLKVSC_DRV 0x1000 + +#define ALL_MODULES (VMBUS |\ + STORVSC |\ + NETVSC |\ + INPUTVSC |\ + BLKVSC |\ + VMBUS_DRV |\ + STORVSC_DRV |\ + NETVSC_DRV |\ + INPUTVSC_DRV|\ + BLKVSC_DRV) + +/* Logging Level */ +#define ERROR_LVL 3 +#define WARNING_LVL 4 +#define INFO_LVL 6 +#define DEBUG_LVL 7 +#define DEBUG_LVL_ENTEREXIT 8 +#define DEBUG_RING_LVL 9 + +extern unsigned int vmbus_loglevel; + +#define DPRINT(mod, lvl, fmt, args...) do {\ + if ((mod & (HIWORD(vmbus_loglevel))) && \ + (lvl <= LOWORD(vmbus_loglevel))) \ + printk(KERN_DEBUG #mod": %s() " fmt "\n", __func__, ## args);\ + } while (0) + +#define DPRINT_DBG(mod, fmt, args...) do {\ + if ((mod & (HIWORD(vmbus_loglevel))) && \ + (DEBUG_LVL <= LOWORD(vmbus_loglevel))) \ + printk(KERN_DEBUG #mod": %s() " fmt "\n", __func__, ## args);\ + } while (0) + +#define DPRINT_INFO(mod, fmt, args...) do {\ + if ((mod & (HIWORD(vmbus_loglevel))) && \ + (INFO_LVL <= LOWORD(vmbus_loglevel))) \ + printk(KERN_INFO #mod": " fmt "\n", ## args);\ + } while (0) + +#define DPRINT_WARN(mod, fmt, args...) do {\ + if ((mod & (HIWORD(vmbus_loglevel))) && \ + (WARNING_LVL <= LOWORD(vmbus_loglevel))) \ + printk(KERN_WARNING #mod": WARNING! " fmt "\n", ## args);\ + } while (0) + +#define DPRINT_ERR(mod, fmt, args...) do {\ + if ((mod & (HIWORD(vmbus_loglevel))) && \ + (ERROR_LVL <= LOWORD(vmbus_loglevel))) \ + printk(KERN_ERR #mod": %s() ERROR!! " fmt "\n", \ + __func__, ## args);\ + } while (0) + #endif /* _HYPERV_H */ diff --git a/drivers/staging/hv/logging.h b/drivers/staging/hv/logging.h deleted file mode 100644 index 17999515ce0..00000000000 --- a/drivers/staging/hv/logging.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * - * Copyright (c) 2009, Microsoft Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place - Suite 330, Boston, MA 02111-1307 USA. - * - * Authors: - * Haiyang Zhang <haiyangz@microsoft.com> - * Hank Janssen <hjanssen@microsoft.com> - * - */ - - -#ifndef _LOGGING_H_ -#define _LOGGING_H_ - -#define LOWORD(dw) ((unsigned short)(dw)) -#define HIWORD(dw) ((unsigned short)(((unsigned int) (dw) >> 16) & 0xFFFF)) - -/* #include <linux/init.h> */ -/* #include <linux/module.h> */ - - -#define VMBUS 0x0001 -#define STORVSC 0x0002 -#define NETVSC 0x0004 -#define INPUTVSC 0x0008 -#define BLKVSC 0x0010 -#define VMBUS_DRV 0x0100 -#define STORVSC_DRV 0x0200 -#define NETVSC_DRV 0x0400 -#define INPUTVSC_DRV 0x0800 -#define BLKVSC_DRV 0x1000 - -#define ALL_MODULES (VMBUS |\ - STORVSC |\ - NETVSC |\ - INPUTVSC |\ - BLKVSC |\ - VMBUS_DRV |\ - STORVSC_DRV |\ - NETVSC_DRV |\ - INPUTVSC_DRV|\ - BLKVSC_DRV) - -/* Logging Level */ -#define ERROR_LVL 3 -#define WARNING_LVL 4 -#define INFO_LVL 6 -#define DEBUG_LVL 7 -#define DEBUG_LVL_ENTEREXIT 8 -#define DEBUG_RING_LVL 9 - -extern unsigned int vmbus_loglevel; - -#define DPRINT(mod, lvl, fmt, args...) do {\ - if ((mod & (HIWORD(vmbus_loglevel))) && \ - (lvl <= LOWORD(vmbus_loglevel))) \ - printk(KERN_DEBUG #mod": %s() " fmt "\n", __func__, ## args);\ - } while (0) - -#define DPRINT_DBG(mod, fmt, args...) do {\ - if ((mod & (HIWORD(vmbus_loglevel))) && \ - (DEBUG_LVL <= LOWORD(vmbus_loglevel))) \ - printk(KERN_DEBUG #mod": %s() " fmt "\n", __func__, ## args);\ - } while (0) - -#define DPRINT_INFO(mod, fmt, args...) do {\ - if ((mod & (HIWORD(vmbus_loglevel))) && \ - (INFO_LVL <= LOWORD(vmbus_loglevel))) \ - printk(KERN_INFO #mod": " fmt "\n", ## args);\ - } while (0) - -#define DPRINT_WARN(mod, fmt, args...) do {\ - if ((mod & (HIWORD(vmbus_loglevel))) && \ - (WARNING_LVL <= LOWORD(vmbus_loglevel))) \ - printk(KERN_WARNING #mod": WARNING! " fmt "\n", ## args);\ - } while (0) - -#define DPRINT_ERR(mod, fmt, args...) do {\ - if ((mod & (HIWORD(vmbus_loglevel))) && \ - (ERROR_LVL <= LOWORD(vmbus_loglevel))) \ - printk(KERN_ERR #mod": %s() ERROR!! " fmt "\n", \ - __func__, ## args);\ - } while (0) - -#endif /* _LOGGING_H_ */ diff --git a/drivers/staging/hv/netvsc.c b/drivers/staging/hv/netvsc.c index 3a0a67e08db..447cca75ea7 100644 --- a/drivers/staging/hv/netvsc.c +++ b/drivers/staging/hv/netvsc.c @@ -30,7 +30,6 @@ #include "hyperv.h" #include "hv_api.h" -#include "logging.h" #include "netvsc.h" #include "rndis_filter.h" diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 3b04cfaa2e5..6f4aeebcc82 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c @@ -41,7 +41,6 @@ #include "hyperv.h" #include "hv_api.h" -#include "logging.h" #include "vmbus.h" #include "netvsc_api.h" diff --git a/drivers/staging/hv/ring_buffer.c b/drivers/staging/hv/ring_buffer.c index 809bce28aea..60aa1c63f6a 100644 --- a/drivers/staging/hv/ring_buffer.c +++ b/drivers/staging/hv/ring_buffer.c @@ -27,7 +27,6 @@ #include <linux/mm.h> #include "hyperv.h" -#include "logging.h" #include "ring_buffer.h" diff --git a/drivers/staging/hv/rndis_filter.c b/drivers/staging/hv/rndis_filter.c index 5eff454bf58..c6cb810a511 100644 --- a/drivers/staging/hv/rndis_filter.c +++ b/drivers/staging/hv/rndis_filter.c @@ -28,7 +28,6 @@ #include <linux/netdevice.h> #include "hyperv.h" -#include "logging.h" #include "hv_api.h" #include "netvsc_api.h" #include "rndis_filter.h" diff --git a/drivers/staging/hv/storvsc.c b/drivers/staging/hv/storvsc.c index 10db64dd015..b594fbf3972 100644 --- a/drivers/staging/hv/storvsc.c +++ b/drivers/staging/hv/storvsc.c @@ -30,7 +30,6 @@ #include "hyperv.h" #include "hv_api.h" -#include "logging.h" #include "storvsc_api.h" #include "vstorage.h" diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c index 165d266b237..852cf632c68 100644 --- a/drivers/staging/hv/storvsc_drv.c +++ b/drivers/staging/hv/storvsc_drv.c @@ -35,7 +35,6 @@ #include "hyperv.h" #include "hv_api.h" -#include "logging.h" #include "vmbus.h" #include "storvsc_api.h" #include "vstorage.h" diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index d6c08c55e2f..935fab3a894 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -37,7 +37,6 @@ #include "hyperv.h" #include "hv_api.h" -#include "logging.h" #include "vmbus.h" #include "vmbus_private.h" |