* Re: [PATCH] xen: fix p2m section mismatches
From: Stephen Hemminger @ 2011-03-24 21:48 UTC (permalink / raw)
To: Randy Dunlap
Cc: akpm, xen-devel, Jeremy Fitzhardinge, Konrad Rzeszutek Wilk,
virtualization
In-Reply-To: <20110324133432.544092e4.randy.dunlap@oracle.com>
On Thu, 24 Mar 2011 13:34:32 -0700
Randy Dunlap <randy.dunlap@oracle.com> wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> Fix section mismatch warnings:
> set_phys_range_identity() is called by __init xen_set_identity(),
> so also mark set_phys_range_identity() as __init.
> then:
> __early_alloc_p2m() is called set_phys_range_identity(), so also mark
> __early_alloc_p2m() as __init.
>
> WARNING: arch/x86/built-in.o(.text+0x7856): Section mismatch in reference from the function __early_alloc_p2m() to the function .init.text:extend_brk()
> The function __early_alloc_p2m() references
> the function __init extend_brk().
> This is often because __early_alloc_p2m lacks a __init
> annotation or the annotation of extend_brk is wrong.
>
> WARNING: arch/x86/built-in.o(.text+0x7967): Section mismatch in reference from the function set_phys_range_identity() to the function .init.text:extend_brk()
> The function set_phys_range_identity() references
> the function __init extend_brk().
> This is often because set_phys_range_identity lacks a __init
> annotation or the annotation of extend_brk is wrong.
>
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> ---
> arch/x86/xen/p2m.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> --- linux-2.6.38-git13.orig/arch/x86/xen/p2m.c
> +++ linux-2.6.38-git13/arch/x86/xen/p2m.c
> @@ -497,7 +497,7 @@ static bool alloc_p2m(unsigned long pfn)
> return true;
> }
>
> -bool __early_alloc_p2m(unsigned long pfn)
> +bool __init __early_alloc_p2m(unsigned long pfn)
__early_alloc_p2m could be static as well.
--
^ permalink raw reply
* [PATCH] xen: fix p2m section mismatches
From: Randy Dunlap @ 2011-03-24 20:34 UTC (permalink / raw)
To: xen-devel, virtualization, akpm
Cc: Jeremy Fitzhardinge, Konrad Rzeszutek Wilk
From: Randy Dunlap <randy.dunlap@oracle.com>
Fix section mismatch warnings:
set_phys_range_identity() is called by __init xen_set_identity(),
so also mark set_phys_range_identity() as __init.
then:
__early_alloc_p2m() is called set_phys_range_identity(), so also mark
__early_alloc_p2m() as __init.
WARNING: arch/x86/built-in.o(.text+0x7856): Section mismatch in reference from the function __early_alloc_p2m() to the function .init.text:extend_brk()
The function __early_alloc_p2m() references
the function __init extend_brk().
This is often because __early_alloc_p2m lacks a __init
annotation or the annotation of extend_brk is wrong.
WARNING: arch/x86/built-in.o(.text+0x7967): Section mismatch in reference from the function set_phys_range_identity() to the function .init.text:extend_brk()
The function set_phys_range_identity() references
the function __init extend_brk().
This is often because set_phys_range_identity lacks a __init
annotation or the annotation of extend_brk is wrong.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
arch/x86/xen/p2m.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-2.6.38-git13.orig/arch/x86/xen/p2m.c
+++ linux-2.6.38-git13/arch/x86/xen/p2m.c
@@ -497,7 +497,7 @@ static bool alloc_p2m(unsigned long pfn)
return true;
}
-bool __early_alloc_p2m(unsigned long pfn)
+bool __init __early_alloc_p2m(unsigned long pfn)
{
unsigned topidx, mididx, idx;
@@ -530,7 +530,7 @@ bool __early_alloc_p2m(unsigned long pfn
}
return idx != 0;
}
-unsigned long set_phys_range_identity(unsigned long pfn_s,
+unsigned long __init set_phys_range_identity(unsigned long pfn_s,
unsigned long pfn_e)
{
unsigned long pfn;
^ permalink raw reply
* ICAC2011 Poster Deadline Extended to April 1 (8th International Conference on Autonomic Computing)
From: Ming Zhao @ 2011-03-24 11:33 UTC (permalink / raw)
To: virtualization
NOTE: The deadline for poster submissions to the ICAC 2011 has
been extended by one week. New deadline is April 1, 2011. Below
you will find the call for posters.
***************************************************************
* 8th International Conference on Autonomic Computing *
* ICAC 2011 *
* Karlsruhe, June 14-18, 2011 *
* http://icac2011.cs.fiu.edu *
* *
* CALL FOR POSTERS *
* *
********************** Deadline April 1 ***********************
ICAC is the leading conference on autonomic computing applications,
technology and foundations. Autonomic computing refers to methods and
means for reducing the human burden of managing computing systems.
Systems introducing new autonomic features are becoming increasingly
prevalent, motivating research that spans a variety of areas, from
computer systems, architecture, databases and networks to machine
learning, control theory, and bio-inspired computing.
Posters are an excellent opportunity for presenting innovative research
ideas, projects and results. Accepted papers for posters (2 page) will
be published in proceedings by ACM, which will be distributed at the
conference. Posters will be displayed at the conference.
Posters are invited on a wide variety of topics relating to autonomic
computing:
** Applications of autonomic computing **
Contributions and experiences are sought with prototyped or deployed
systems and applications that focus on advancing system independence and
increasing system ability to adapt to an unpredictable environment.
** Autonomic computing components and services **
Descriptions of protocols, system-level support, services, or
application components that enhance aspects of system autonomy,
self-management, self-tuning, self-configuration, self-diagnosis, and
self-healing, or improve adaptive capabilities.
** Algorithms, theory and foundations of autonomic computing **
Analytic foundations for building efficient autonomic systems,
predicting their behavior, quantifying their performance, analyzing
their stability, guaranteeing their specifications, or optimizing their
efficacy
Poster manuscripts will be reviewed and judged on merits including
correctness, originality, technical strength, quality of presentation,
and relevance to the conference themes. Submitted posters must include
original work, and may not be under consideration for another conference
or journal.
They should also not be under review to another forum during the ICAC
review process. Authors of accepted posters are expected to present
their poster at the conference.
Detailed submission instructions are available at the ICAC 2011 web
site (http://icac2011.cs.fiu.edu).
^ permalink raw reply
* [PATCH 16/16] Staging: hv: Make the function stor_vsc_on_host_reset() static
From: K. Y. Srinivasan @ 2011-03-23 17:50 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization
Cc: K. Y. Srinivasan, Haiyang Zhang, Hank Janssen
In-Reply-To: <1300902635-1347-1-git-send-email-kys@microsoft.com>
Make stor_vsc_on_host_reset() a static function.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/storvsc_api.h | 1 -
drivers/staging/hv/storvsc_drv.c | 2 +-
2 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/hv/storvsc_api.h b/drivers/staging/hv/storvsc_api.h
index d46b4de..5f41ef6 100644
--- a/drivers/staging/hv/storvsc_api.h
+++ b/drivers/staging/hv/storvsc_api.h
@@ -163,7 +163,6 @@ static inline void put_stor_device(struct hv_device *device)
}
/* Interface */
-int stor_vsc_on_host_reset(struct hv_device *device);
int stor_vsc_on_device_add(struct hv_device *device,
void *additional_info);
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index e0a1195..127d122 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -233,7 +233,7 @@ static int storvsc_drv_init(void)
}
-int stor_vsc_on_host_reset(struct hv_device *device)
+static int stor_vsc_on_host_reset(struct hv_device *device)
{
struct storvsc_device *stor_device;
struct storvsc_request_extension *request;
--
1.7.4.1
^ permalink raw reply related
* [PATCH 15/16] Staging: hv: Move the definition of the function stor_vsc_on_host_reset()
From: K. Y. Srinivasan @ 2011-03-23 17:50 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization
Cc: K. Y. Srinivasan, Haiyang Zhang, Hank Janssen
In-Reply-To: <1300902635-1347-1-git-send-email-kys@microsoft.com>
stor_vsc_on_host_reset() function is only used in storvsc_drv.c.
Move this function from storvsc.c to storvsc_drv.c
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/storvsc.c | 56 ------------------------------------
drivers/staging/hv/storvsc_drv.c | 59 ++++++++++++++++++++++++++++++++++++++
2 files changed, 59 insertions(+), 56 deletions(-)
diff --git a/drivers/staging/hv/storvsc.c b/drivers/staging/hv/storvsc.c
index c576e7b..6801e37 100644
--- a/drivers/staging/hv/storvsc.c
+++ b/drivers/staging/hv/storvsc.c
@@ -522,62 +522,6 @@ int stor_vsc_on_device_remove(struct hv_device *device)
return 0;
}
-int stor_vsc_on_host_reset(struct hv_device *device)
-{
- struct storvsc_device *stor_device;
- struct storvsc_request_extension *request;
- struct vstor_packet *vstor_packet;
- int ret;
-
- DPRINT_INFO(STORVSC, "resetting host adapter...");
-
- stor_device = get_stor_device(device);
- if (!stor_device) {
- DPRINT_ERR(STORVSC, "unable to get stor device..."
- "device being destroyed?");
- return -1;
- }
-
- request = &stor_device->reset_request;
- vstor_packet = &request->vstor_packet;
-
- init_waitqueue_head(&request->wait_event);
-
- vstor_packet->operation = VSTOR_OPERATION_RESET_BUS;
- vstor_packet->flags = REQUEST_COMPLETION_FLAG;
- vstor_packet->vm_srb.path_id = stor_device->path_id;
-
- request->wait_condition = 0;
- ret = vmbus_sendpacket(device->channel, vstor_packet,
- sizeof(struct vstor_packet),
- (unsigned long)&stor_device->reset_request,
- VM_PKT_DATA_INBAND,
- VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
- if (ret != 0) {
- DPRINT_ERR(STORVSC, "Unable to send reset packet %p ret %d",
- vstor_packet, ret);
- goto cleanup;
- }
-
- wait_event_timeout(request->wait_event, request->wait_condition,
- msecs_to_jiffies(1000));
- if (request->wait_condition == 0) {
- ret = -ETIMEDOUT;
- goto cleanup;
- }
-
- DPRINT_INFO(STORVSC, "host adapter reset completed");
-
- /*
- * At this point, all outstanding requests in the adapter
- * should have been flushed out and return to us
- */
-
-cleanup:
- put_stor_device(device);
- return ret;
-}
-
/*
* stor_vsc_on_io_request - Callback to initiate an I/O request
*/
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index 2c51a07..e0a1195 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -36,6 +36,8 @@
#include "version_info.h"
#include "vmbus.h"
#include "storvsc_api.h"
+#include "vstorage.h"
+#include "channel.h"
static const char *g_driver_name = "storvsc";
@@ -230,6 +232,63 @@ static int storvsc_drv_init(void)
return ret;
}
+
+int stor_vsc_on_host_reset(struct hv_device *device)
+{
+ struct storvsc_device *stor_device;
+ struct storvsc_request_extension *request;
+ struct vstor_packet *vstor_packet;
+ int ret;
+
+ DPRINT_INFO(STORVSC, "resetting host adapter...");
+
+ stor_device = get_stor_device(device);
+ if (!stor_device) {
+ DPRINT_ERR(STORVSC, "unable to get stor device..."
+ "device being destroyed?");
+ return -1;
+ }
+
+ request = &stor_device->reset_request;
+ vstor_packet = &request->vstor_packet;
+
+ init_waitqueue_head(&request->wait_event);
+
+ vstor_packet->operation = VSTOR_OPERATION_RESET_BUS;
+ vstor_packet->flags = REQUEST_COMPLETION_FLAG;
+ vstor_packet->vm_srb.path_id = stor_device->path_id;
+
+ request->wait_condition = 0;
+ ret = vmbus_sendpacket(device->channel, vstor_packet,
+ sizeof(struct vstor_packet),
+ (unsigned long)&stor_device->reset_request,
+ VM_PKT_DATA_INBAND,
+ VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
+ if (ret != 0) {
+ DPRINT_ERR(STORVSC, "Unable to send reset packet %p ret %d",
+ vstor_packet, ret);
+ goto cleanup;
+ }
+
+ wait_event_timeout(request->wait_event, request->wait_condition,
+ msecs_to_jiffies(1000));
+ if (request->wait_condition == 0) {
+ ret = -ETIMEDOUT;
+ goto cleanup;
+ }
+
+ DPRINT_INFO(STORVSC, "host adapter reset completed");
+
+ /*
+ * At this point, all outstanding requests in the adapter
+ * should have been flushed out and return to us
+ */
+
+cleanup:
+ put_stor_device(device);
+ return ret;
+}
+
static int storvsc_drv_exit_cb(struct device *dev, void *data)
{
struct device **curr = (struct device **)data;
--
1.7.4.1
^ permalink raw reply related
* [PATCH 14/16] Staging: hv: Move the definition of the function put_stor_device()
From: K. Y. Srinivasan @ 2011-03-23 17:50 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization; +Cc: Haiyang Zhang
In-Reply-To: <1300902635-1347-1-git-send-email-kys@microsoft.com>
In preparation for further cleaning up storvsc.c move the definition
of the inline function put_stor_device() from storvsc.c to
storvsc_api.h.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/storvsc.c | 9 ---------
drivers/staging/hv/storvsc_api.h | 10 ++++++++++
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/hv/storvsc.c b/drivers/staging/hv/storvsc.c
index 357f5dd..c576e7b 100644
--- a/drivers/staging/hv/storvsc.c
+++ b/drivers/staging/hv/storvsc.c
@@ -71,15 +71,6 @@ static inline struct storvsc_device *must_get_stor_device(
return stor_device;
}
-static inline void put_stor_device(struct hv_device *device)
-{
- struct storvsc_device *stor_device;
-
- stor_device = (struct storvsc_device *)device->ext;
-
- atomic_dec(&stor_device->ref_count);
-}
-
/* Drop ref count to 1 to effectively disable get_stor_device() */
static inline struct storvsc_device *release_stor_device(
struct hv_device *device)
diff --git a/drivers/staging/hv/storvsc_api.h b/drivers/staging/hv/storvsc_api.h
index 4e66507..d46b4de 100644
--- a/drivers/staging/hv/storvsc_api.h
+++ b/drivers/staging/hv/storvsc_api.h
@@ -152,6 +152,16 @@ static inline struct storvsc_device *get_stor_device(struct hv_device *device)
return stor_device;
}
+
+static inline void put_stor_device(struct hv_device *device)
+{
+ struct storvsc_device *stor_device;
+
+ stor_device = (struct storvsc_device *)device->ext;
+
+ atomic_dec(&stor_device->ref_count);
+}
+
/* Interface */
int stor_vsc_on_host_reset(struct hv_device *device);
--
1.7.4.1
^ permalink raw reply related
* [PATCH 13/16] Staging: hv: Move the definition of the function get_stor_device()
From: K. Y. Srinivasan @ 2011-03-23 17:50 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization; +Cc: Haiyang Zhang
In-Reply-To: <1300902635-1347-1-git-send-email-kys@microsoft.com>
In preparation for further cleaning up storvsc.c move the definition
of the inline function get_stor_device() from storvsc.c to
storvsc_api.h.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/storvsc.c | 14 --------------
drivers/staging/hv/storvsc_api.h | 15 +++++++++++++++
2 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/hv/storvsc.c b/drivers/staging/hv/storvsc.c
index 83d012b..357f5dd 100644
--- a/drivers/staging/hv/storvsc.c
+++ b/drivers/staging/hv/storvsc.c
@@ -56,20 +56,6 @@ static inline void free_stor_device(struct storvsc_device *device)
kfree(device);
}
-/* Get the stordevice object iff exists and its refcount > 1 */
-static inline struct storvsc_device *get_stor_device(struct hv_device *device)
-{
- struct storvsc_device *stor_device;
-
- stor_device = (struct storvsc_device *)device->ext;
- if (stor_device && atomic_read(&stor_device->ref_count) > 1)
- atomic_inc(&stor_device->ref_count);
- else
- stor_device = NULL;
-
- return stor_device;
-}
-
/* Get the stordevice object iff exists and its refcount > 0 */
static inline struct storvsc_device *must_get_stor_device(
struct hv_device *device)
diff --git a/drivers/staging/hv/storvsc_api.h b/drivers/staging/hv/storvsc_api.h
index d985bbf..4e66507 100644
--- a/drivers/staging/hv/storvsc_api.h
+++ b/drivers/staging/hv/storvsc_api.h
@@ -137,6 +137,21 @@ struct storvsc_device {
struct storvsc_request_extension reset_request;
};
+
+/* Get the stordevice object iff exists and its refcount > 1 */
+static inline struct storvsc_device *get_stor_device(struct hv_device *device)
+{
+ struct storvsc_device *stor_device;
+
+ stor_device = (struct storvsc_device *)device->ext;
+ if (stor_device && atomic_read(&stor_device->ref_count) > 1)
+ atomic_inc(&stor_device->ref_count);
+ else
+ stor_device = NULL;
+
+ return stor_device;
+}
+
/* Interface */
int stor_vsc_on_host_reset(struct hv_device *device);
--
1.7.4.1
^ permalink raw reply related
* [PATCH 12/16] Staging: hv: Cleanup initialization of blkvsc driver
From: K. Y. Srinivasan @ 2011-03-23 17:50 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization; +Cc: Haiyang Zhang
In-Reply-To: <1300902635-1347-1-git-send-email-kys@microsoft.com>
Cleanup the initialization sequence for the block driver.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/blkvsc_drv.c | 8 ++++----
drivers/staging/hv/storvsc_api.h | 1 -
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index 1d602a1..824080d 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -155,7 +155,7 @@ static int blk_vsc_on_device_add(struct hv_device *device,
}
-int blk_vsc_initialize(struct hv_driver *driver)
+static int blk_vsc_initialize(struct hv_driver *driver)
{
struct storvsc_driver_object *stor_driver;
int ret = 0;
@@ -243,7 +243,7 @@ static const struct block_device_operations block_ops = {
/*
* blkvsc_drv_init - BlkVsc driver initialization.
*/
-static int blkvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
+static int blkvsc_drv_init(void)
{
struct storvsc_driver_object *storvsc_drv_obj = &g_blkvsc_drv;
struct hv_driver *drv = &g_blkvsc_drv.base;
@@ -254,7 +254,7 @@ static int blkvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
drv->priv = storvsc_drv_obj;
/* Callback to client driver to complete the initialization */
- drv_init(&storvsc_drv_obj->base);
+ blk_vsc_initialize(&storvsc_drv_obj->base);
drv->driver.name = storvsc_drv_obj->base.name;
@@ -1552,7 +1552,7 @@ static int __init blkvsc_init(void)
DPRINT_INFO(BLKVSC_DRV, "Blkvsc initializing....");
- ret = blkvsc_drv_init(blk_vsc_initialize);
+ ret = blkvsc_drv_init();
return ret;
}
diff --git a/drivers/staging/hv/storvsc_api.h b/drivers/staging/hv/storvsc_api.h
index 9a452f2..d985bbf 100644
--- a/drivers/staging/hv/storvsc_api.h
+++ b/drivers/staging/hv/storvsc_api.h
@@ -139,7 +139,6 @@ struct storvsc_device {
/* Interface */
int stor_vsc_on_host_reset(struct hv_device *device);
-int blk_vsc_initialize(struct hv_driver *driver);
int stor_vsc_on_device_add(struct hv_device *device,
void *additional_info);
--
1.7.4.1
^ permalink raw reply related
* [PATCH 11/16] Staging: hv: Get rid of the file blkvsc.c
From: K. Y. Srinivasan @ 2011-03-23 17:50 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization; +Cc: Haiyang Zhang
In-Reply-To: <1300902635-1347-1-git-send-email-kys@microsoft.com>
Now delete the file.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/blkvsc.c | 103 -------------------------------------------
1 files changed, 0 insertions(+), 103 deletions(-)
delete mode 100644 drivers/staging/hv/blkvsc.c
diff --git a/drivers/staging/hv/blkvsc.c b/drivers/staging/hv/blkvsc.c
deleted file mode 100644
index ebe511a..0000000
--- a/drivers/staging/hv/blkvsc.c
+++ /dev/null
@@ -1,103 +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>
- *
- */
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include "logging.h"
-#include "hv_api.h"
-#include "storvsc_api.h"
-
-static const char *g_blk_driver_name = "blkvsc";
-
-/* {32412632-86cb-44a2-9b5c-50d1417354f5} */
-static const struct hv_guid g_blk_device_type = {
- .data = {
- 0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44,
- 0x9b, 0x5c, 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5
- }
-};
-
-static int blk_vsc_on_device_add(struct hv_device *device, void *additional_info)
-{
- struct storvsc_device_info *device_info;
- int ret = 0;
-
- device_info = (struct storvsc_device_info *)additional_info;
-
- ret = stor_vsc_on_device_add(device, additional_info);
- if (ret != 0)
- return ret;
-
- /*
- * We need to use the device instance guid to set the path and target
- * id. For IDE devices, the device instance id is formatted as
- * <bus id> * - <device id> - 8899 - 000000000000.
- */
- device_info->path_id = device->dev_instance.data[3] << 24 |
- device->dev_instance.data[2] << 16 |
- device->dev_instance.data[1] << 8 |
- device->dev_instance.data[0];
-
- device_info->target_id = device->dev_instance.data[5] << 8 |
- device->dev_instance.data[4];
-
- return ret;
-}
-
-int blk_vsc_initialize(struct hv_driver *driver)
-{
- struct storvsc_driver_object *stor_driver;
- int ret = 0;
-
- stor_driver = (struct storvsc_driver_object *)driver;
-
- /* Make sure we are at least 2 pages since 1 page is used for control */
- /* ASSERT(stor_driver->RingBufferSize >= (PAGE_SIZE << 1)); */
-
- driver->name = g_blk_driver_name;
- memcpy(&driver->dev_type, &g_blk_device_type, sizeof(struct hv_guid));
-
- stor_driver->request_ext_size = sizeof(struct storvsc_request_extension);
-
- /*
- * Divide the ring buffer data size (which is 1 page less than the ring
- * buffer size since that page is reserved for the ring buffer indices)
- * by the max request size (which is
- * vmbus_channel_packet_multipage_buffer + struct vstor_packet + u64)
- */
- stor_driver->max_outstanding_req_per_channel =
- ((stor_driver->ring_buffer_size - PAGE_SIZE) /
- ALIGN(MAX_MULTIPAGE_BUFFER_PACKET +
- sizeof(struct vstor_packet) + sizeof(u64),
- sizeof(u64)));
-
- DPRINT_INFO(BLKVSC, "max io outstd %u",
- stor_driver->max_outstanding_req_per_channel);
-
- /* Setup the dispatch table */
- stor_driver->base.dev_add = blk_vsc_on_device_add;
- stor_driver->base.dev_rm = stor_vsc_on_device_remove;
- stor_driver->base.cleanup = stor_vsc_on_cleanup;
- stor_driver->on_io_request = stor_vsc_on_io_request;
-
- return ret;
-}
--
1.7.4.1
^ permalink raw reply related
* [PATCH 10/16] Staging: hv: Move the contents of blkvsc.c to blkvsc_drv.c
From: K. Y. Srinivasan @ 2011-03-23 17:50 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization
Cc: K. Y. Srinivasan, Haiyang Zhang, Hank Janssen
In-Reply-To: <1300902635-1347-1-git-send-email-kys@microsoft.com>
In preparation for getting rid of the file blkvsc.c, move its contents
to the appropriate file.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/Makefile | 2 +-
drivers/staging/hv/blkvsc_drv.c | 79 +++++++++++++++++++++++++++++++++++++++
2 files changed, 80 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/hv/Makefile b/drivers/staging/hv/Makefile
index a733154..3004674 100644
--- a/drivers/staging/hv/Makefile
+++ b/drivers/staging/hv/Makefile
@@ -9,6 +9,6 @@ hv_vmbus-y := vmbus_drv.o \
hv.o connection.o channel.o \
channel_mgmt.o ring_buffer.o
hv_storvsc-y := storvsc_drv.o storvsc.o
-hv_blkvsc-y := blkvsc_drv.o blkvsc.o storvsc.o
+hv_blkvsc-y := blkvsc_drv.o storvsc.o
hv_netvsc-y := netvsc_drv.o netvsc.o rndis_filter.o
hv_utils-y := hv_util.o hv_kvp.o
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index 6e02f1b..1d602a1 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -116,6 +116,85 @@ struct block_device_context {
};
+static const char *g_blk_driver_name = "blkvsc";
+
+/* {32412632-86cb-44a2-9b5c-50d1417354f5} */
+static const struct hv_guid g_blk_device_type = {
+ .data = {
+ 0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44,
+ 0x9b, 0x5c, 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5
+ }
+};
+
+static int blk_vsc_on_device_add(struct hv_device *device,
+ void *additional_info)
+{
+ struct storvsc_device_info *device_info;
+ int ret = 0;
+
+ device_info = (struct storvsc_device_info *)additional_info;
+
+ ret = stor_vsc_on_device_add(device, additional_info);
+ if (ret != 0)
+ return ret;
+
+ /*
+ * We need to use the device instance guid to set the path and target
+ * id. For IDE devices, the device instance id is formatted as
+ * <bus id> * - <device id> - 8899 - 000000000000.
+ */
+ device_info->path_id = device->dev_instance.data[3] << 24 |
+ device->dev_instance.data[2] << 16 |
+ device->dev_instance.data[1] << 8 |
+ device->dev_instance.data[0];
+
+ device_info->target_id = device->dev_instance.data[5] << 8 |
+ device->dev_instance.data[4];
+
+ return ret;
+}
+
+
+int blk_vsc_initialize(struct hv_driver *driver)
+{
+ struct storvsc_driver_object *stor_driver;
+ int ret = 0;
+
+ stor_driver = (struct storvsc_driver_object *)driver;
+
+ /* Make sure we are at least 2 pages since 1 page is used for control */
+ /* ASSERT(stor_driver->RingBufferSize >= (PAGE_SIZE << 1)); */
+
+ driver->name = g_blk_driver_name;
+ memcpy(&driver->dev_type, &g_blk_device_type, sizeof(struct hv_guid));
+
+ stor_driver->request_ext_size =
+ sizeof(struct storvsc_request_extension);
+
+ /*
+ * Divide the ring buffer data size (which is 1 page less than the ring
+ * buffer size since that page is reserved for the ring buffer indices)
+ * by the max request size (which is
+ * vmbus_channel_packet_multipage_buffer + struct vstor_packet + u64)
+ */
+ stor_driver->max_outstanding_req_per_channel =
+ ((stor_driver->ring_buffer_size - PAGE_SIZE) /
+ ALIGN(MAX_MULTIPAGE_BUFFER_PACKET +
+ sizeof(struct vstor_packet) + sizeof(u64),
+ sizeof(u64)));
+
+ DPRINT_INFO(BLKVSC, "max io outstd %u",
+ stor_driver->max_outstanding_req_per_channel);
+
+ /* Setup the dispatch table */
+ stor_driver->base.dev_add = blk_vsc_on_device_add;
+ stor_driver->base.dev_rm = stor_vsc_on_device_remove;
+ stor_driver->base.cleanup = stor_vsc_on_cleanup;
+ stor_driver->on_io_request = stor_vsc_on_io_request;
+
+ return ret;
+}
+
/* Static decl */
static DEFINE_MUTEX(blkvsc_mutex);
static int blkvsc_probe(struct device *dev);
--
1.7.4.1
^ permalink raw reply related
* [PATCH 09/16] Staging: hv: Cleanup the initialization of storvsc driver
From: K. Y. Srinivasan @ 2011-03-23 17:50 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization; +Cc: Haiyang Zhang
In-Reply-To: <1300902635-1347-1-git-send-email-kys@microsoft.com>
Cleanup the initialization sequence for the storvsc driver.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/storvsc_drv.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index af6a37d..2c51a07 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -191,7 +191,7 @@ static struct scsi_host_template scsi_driver = {
/*
* storvsc_drv_init - StorVsc driver initialization.
*/
-static int storvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
+static int storvsc_drv_init(void)
{
int ret;
struct storvsc_driver_object *storvsc_drv_obj = &g_storvsc_drv;
@@ -200,7 +200,7 @@ static int storvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
storvsc_drv_obj->ring_buffer_size = storvsc_ringbuffer_size;
/* Callback to client driver to complete the initialization */
- drv_init(&storvsc_drv_obj->base);
+ stor_vsc_initialize(&storvsc_drv_obj->base);
drv->priv = storvsc_drv_obj;
@@ -986,7 +986,7 @@ static int __init storvsc_init(void)
int ret;
DPRINT_INFO(STORVSC_DRV, "Storvsc initializing....");
- ret = storvsc_drv_init(stor_vsc_initialize);
+ ret = storvsc_drv_init();
return ret;
}
--
1.7.4.1
^ permalink raw reply related
* [PATCH 08/16] Staging: hv: Make the function stor_vsc_initialize() static
From: K. Y. Srinivasan @ 2011-03-23 17:50 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization; +Cc: Haiyang Zhang
In-Reply-To: <1300902635-1347-1-git-send-email-kys@microsoft.com>
Make the function stor_vsc_initialize() a static function.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/storvsc_api.h | 1 -
drivers/staging/hv/storvsc_drv.c | 2 +-
2 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/hv/storvsc_api.h b/drivers/staging/hv/storvsc_api.h
index 141b8fd..9a452f2 100644
--- a/drivers/staging/hv/storvsc_api.h
+++ b/drivers/staging/hv/storvsc_api.h
@@ -138,7 +138,6 @@ struct storvsc_device {
};
/* Interface */
-int stor_vsc_initialize(struct hv_driver *driver);
int stor_vsc_on_host_reset(struct hv_device *device);
int blk_vsc_initialize(struct hv_driver *driver);
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index 5ea09da..af6a37d 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -77,7 +77,7 @@ struct storvsc_cmd_request {
/*
* stor_vsc_initialize - Main entry point
*/
-int stor_vsc_initialize(struct hv_driver *driver)
+static int stor_vsc_initialize(struct hv_driver *driver)
{
struct storvsc_driver_object *stor_driver;
--
1.7.4.1
^ permalink raw reply related
* [PATCH 07/16] Staging: hv: Move the definition of stor_vsc_initialize()
From: K. Y. Srinivasan @ 2011-03-23 17:50 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization; +Cc: Haiyang Zhang
In-Reply-To: <1300902635-1347-1-git-send-email-kys@microsoft.com>
Since stor_vsc_initialize() is only used in storvs_drv.c, move this
function to storvsc_drv.c.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/storvsc.c | 64 --------------------------------------
drivers/staging/hv/storvsc_drv.c | 63 +++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+), 64 deletions(-)
diff --git a/drivers/staging/hv/storvsc.c b/drivers/staging/hv/storvsc.c
index 1f05aa6..83d012b 100644
--- a/drivers/staging/hv/storvsc.c
+++ b/drivers/staging/hv/storvsc.c
@@ -33,18 +33,6 @@
#include "channel.h"
-
-static const char *g_driver_name = "storvsc";
-
-/* {ba6163d9-04a1-4d29-b605-72e2ffb1dc7f} */
-static const struct hv_guid gStorVscDeviceType = {
- .data = {
- 0xd9, 0x63, 0x61, 0xba, 0xa1, 0x04, 0x29, 0x4d,
- 0xb6, 0x05, 0x72, 0xe2, 0xff, 0xb1, 0xdc, 0x7f
- }
-};
-
-
static inline struct storvsc_device *alloc_stor_device(struct hv_device *device)
{
struct storvsc_device *stor_device;
@@ -711,55 +699,3 @@ void stor_vsc_on_cleanup(struct hv_driver *driver)
{
}
-/*
- * stor_vsc_initialize - Main entry point
- */
-int stor_vsc_initialize(struct hv_driver *driver)
-{
- struct storvsc_driver_object *stor_driver;
-
- stor_driver = (struct storvsc_driver_object *)driver;
-
- DPRINT_DBG(STORVSC, "sizeof(STORVSC_REQUEST)=%zd "
- "sizeof(struct storvsc_request_extension)=%zd "
- "sizeof(struct vstor_packet)=%zd, "
- "sizeof(struct vmscsi_request)=%zd",
- sizeof(struct hv_storvsc_request),
- sizeof(struct storvsc_request_extension),
- sizeof(struct vstor_packet),
- sizeof(struct vmscsi_request));
-
- /* Make sure we are at least 2 pages since 1 page is used for control */
-
- driver->name = g_driver_name;
- memcpy(&driver->dev_type, &gStorVscDeviceType,
- sizeof(struct hv_guid));
-
- stor_driver->request_ext_size =
- sizeof(struct storvsc_request_extension);
-
- /*
- * Divide the ring buffer data size (which is 1 page less
- * than the ring buffer size since that page is reserved for
- * the ring buffer indices) by the max request size (which is
- * vmbus_channel_packet_multipage_buffer + struct vstor_packet + u64)
- */
- stor_driver->max_outstanding_req_per_channel =
- ((stor_driver->ring_buffer_size - PAGE_SIZE) /
- ALIGN(MAX_MULTIPAGE_BUFFER_PACKET +
- sizeof(struct vstor_packet) + sizeof(u64),
- sizeof(u64)));
-
- DPRINT_INFO(STORVSC, "max io %u, currently %u\n",
- stor_driver->max_outstanding_req_per_channel,
- STORVSC_MAX_IO_REQUESTS);
-
- /* Setup the dispatch table */
- stor_driver->base.dev_add = stor_vsc_on_device_add;
- stor_driver->base.dev_rm = stor_vsc_on_device_remove;
- stor_driver->base.cleanup = stor_vsc_on_cleanup;
-
- stor_driver->on_io_request = stor_vsc_on_io_request;
-
- return 0;
-}
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index e6462a2..5ea09da 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -38,6 +38,16 @@
#include "storvsc_api.h"
+static const char *g_driver_name = "storvsc";
+
+/* {ba6163d9-04a1-4d29-b605-72e2ffb1dc7f} */
+static const struct hv_guid gStorVscDeviceType = {
+ .data = {
+ 0xd9, 0x63, 0x61, 0xba, 0xa1, 0x04, 0x29, 0x4d,
+ 0xb6, 0x05, 0x72, 0xe2, 0xff, 0xb1, 0xdc, 0x7f
+ }
+};
+
struct host_device_context {
/* must be 1st field
* FIXME this is a bug */
@@ -64,6 +74,59 @@ struct storvsc_cmd_request {
};
+/*
+ * stor_vsc_initialize - Main entry point
+ */
+int stor_vsc_initialize(struct hv_driver *driver)
+{
+ struct storvsc_driver_object *stor_driver;
+
+ stor_driver = (struct storvsc_driver_object *)driver;
+
+ DPRINT_DBG(STORVSC, "sizeof(STORVSC_REQUEST)=%zd "
+ "sizeof(struct storvsc_request_extension)=%zd "
+ "sizeof(struct vstor_packet)=%zd, "
+ "sizeof(struct vmscsi_request)=%zd",
+ sizeof(struct hv_storvsc_request),
+ sizeof(struct storvsc_request_extension),
+ sizeof(struct vstor_packet),
+ sizeof(struct vmscsi_request));
+
+ /* Make sure we are at least 2 pages since 1 page is used for control */
+
+ driver->name = g_driver_name;
+ memcpy(&driver->dev_type, &gStorVscDeviceType,
+ sizeof(struct hv_guid));
+
+ stor_driver->request_ext_size =
+ sizeof(struct storvsc_request_extension);
+
+ /*
+ * Divide the ring buffer data size (which is 1 page less
+ * than the ring buffer size since that page is reserved for
+ * the ring buffer indices) by the max request size (which is
+ * vmbus_channel_packet_multipage_buffer + struct vstor_packet + u64)
+ */
+ stor_driver->max_outstanding_req_per_channel =
+ ((stor_driver->ring_buffer_size - PAGE_SIZE) /
+ ALIGN(MAX_MULTIPAGE_BUFFER_PACKET +
+ sizeof(struct vstor_packet) + sizeof(u64),
+ sizeof(u64)));
+
+ DPRINT_INFO(STORVSC, "max io %u, currently %u\n",
+ stor_driver->max_outstanding_req_per_channel,
+ STORVSC_MAX_IO_REQUESTS);
+
+ /* Setup the dispatch table */
+ stor_driver->base.dev_add = stor_vsc_on_device_add;
+ stor_driver->base.dev_rm = stor_vsc_on_device_remove;
+ stor_driver->base.cleanup = stor_vsc_on_cleanup;
+
+ stor_driver->on_io_request = stor_vsc_on_io_request;
+
+ return 0;
+}
+
/* Static decl */
static int storvsc_probe(struct device *dev);
static int storvsc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *scmnd);
--
1.7.4.1
^ permalink raw reply related
* [PATCH 06/16] Staging: hv: Get rid of dead code in storvsc.c
From: K. Y. Srinivasan @ 2011-03-23 17:50 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization; +Cc: Haiyang Zhang
In-Reply-To: <1300902635-1347-1-git-send-email-kys@microsoft.com>
Get rid of some "dead code" from storvsc.c
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/storvsc.c | 33 ---------------------------------
1 files changed, 0 insertions(+), 33 deletions(-)
diff --git a/drivers/staging/hv/storvsc.c b/drivers/staging/hv/storvsc.c
index c8d7ff7..1f05aa6 100644
--- a/drivers/staging/hv/storvsc.c
+++ b/drivers/staging/hv/storvsc.c
@@ -65,7 +65,6 @@ static inline struct storvsc_device *alloc_stor_device(struct hv_device *device)
static inline void free_stor_device(struct storvsc_device *device)
{
- /* ASSERT(atomic_read(&device->ref_count) == 0); */
kfree(device);
}
@@ -103,10 +102,8 @@ static inline void put_stor_device(struct hv_device *device)
struct storvsc_device *stor_device;
stor_device = (struct storvsc_device *)device->ext;
- /* ASSERT(stor_device); */
atomic_dec(&stor_device->ref_count);
- /* ASSERT(atomic_read(&stor_device->ref_count)); */
}
/* Drop ref count to 1 to effectively disable get_stor_device() */
@@ -116,7 +113,6 @@ static inline struct storvsc_device *release_stor_device(
struct storvsc_device *stor_device;
stor_device = (struct storvsc_device *)device->ext;
- /* ASSERT(stor_device); */
/* Busy wait until the ref drop to 2, then set it to 1 */
while (atomic_cmpxchg(&stor_device->ref_count, 2, 1) != 2)
@@ -132,7 +128,6 @@ static inline struct storvsc_device *final_release_stor_device(
struct storvsc_device *stor_device;
stor_device = (struct storvsc_device *)device->ext;
- /* ASSERT(stor_device); */
/* Busy wait until the ref drop to 1, then set it to 0 */
while (atomic_cmpxchg(&stor_device->ref_count, 1, 0) != 1)
@@ -341,12 +336,8 @@ static void stor_vsc_on_io_completion(struct hv_device *device,
"completed bytes xfer %u", request_ext,
vstor_packet->vm_srb.data_transfer_length);
- /* ASSERT(request_ext != NULL); */
- /* ASSERT(request_ext->request != NULL); */
-
request = request_ext->request;
- /* ASSERT(request->OnIOCompletion != NULL); */
/* Copy over the status...etc */
request->status = vstor_packet->vm_srb.scsi_status;
@@ -366,8 +357,6 @@ static void stor_vsc_on_io_completion(struct hv_device *device,
"valid - len %d\n", request_ext,
vstor_packet->vm_srb.sense_info_length);
- /* ASSERT(vstor_packet->vm_srb.sense_info_length <= */
- /* request->SenseBufferSize); */
memcpy(request->sense_buffer,
vstor_packet->vm_srb.sense_data,
vstor_packet->vm_srb.sense_info_length);
@@ -418,7 +407,6 @@ static void stor_vsc_on_channel_callback(void *context)
struct storvsc_request_extension *request;
int ret;
- /* ASSERT(device); */
stor_device = must_get_stor_device(device);
if (!stor_device) {
@@ -435,21 +423,12 @@ static void stor_vsc_on_channel_callback(void *context)
DPRINT_DBG(STORVSC, "receive %d bytes - tid %llx",
bytes_recvd, request_id);
- /* ASSERT(bytes_recvd ==
- sizeof(struct vstor_packet)); */
request = (struct storvsc_request_extension *)
(unsigned long)request_id;
- /* ASSERT(request);c */
- /* if (vstor_packet.Flags & SYNTHETIC_FLAG) */
if ((request == &stor_device->init_request) ||
(request == &stor_device->reset_request)) {
- /* DPRINT_INFO(STORVSC,
- * "reset completion - operation "
- * "%u status %u",
- * vstor_packet.Operation,
- * vstor_packet.Status); */
memcpy(&request->vstor_packet, packet,
sizeof(struct vstor_packet));
@@ -461,7 +440,6 @@ static void stor_vsc_on_channel_callback(void *context)
request);
}
} else {
- /* DPRINT_DBG(STORVSC, "nothing else to read..."); */
break;
}
} while (1);
@@ -508,7 +486,6 @@ int stor_vsc_on_device_add(struct hv_device *device,
void *additional_info)
{
struct storvsc_device *stor_device;
- /* struct vmstorage_channel_properties *props; */
struct storvsc_device_info *device_info;
int ret = 0;
@@ -520,8 +497,6 @@ int stor_vsc_on_device_add(struct hv_device *device,
}
/* Save the channel properties to our storvsc channel */
- /* props = (struct vmstorage_channel_properties *)
- * channel->offerMsg.Offer.u.Standard.UserDefined; */
/* FIXME: */
/*
@@ -530,15 +505,10 @@ int stor_vsc_on_device_add(struct hv_device *device,
* scsi channel prior to the bus scan
*/
- /* storChannel->PortNumber = 0;
- storChannel->PathId = props->PathId;
- storChannel->TargetId = props->TargetId; */
-
stor_device->port_number = device_info->port_number;
/* Send it back up */
ret = stor_vsc_connect_to_vsp(device);
- /* device_info->PortNumber = stor_device->PortNumber; */
device_info->path_id = stor_device->path_id;
device_info->target_id = stor_device->target_id;
@@ -673,8 +643,6 @@ int stor_vsc_on_io_request(struct hv_device *device,
return -2;
}
- /* print_hex_dump_bytes("", DUMP_PREFIX_NONE, request->Cdb,
- * request->CdbLen); */
request_extension->request = request;
request_extension->device = device;
@@ -762,7 +730,6 @@ int stor_vsc_initialize(struct hv_driver *driver)
sizeof(struct vmscsi_request));
/* Make sure we are at least 2 pages since 1 page is used for control */
- /* ASSERT(stor_driver->RingBufferSize >= (PAGE_SIZE << 1)); */
driver->name = g_driver_name;
memcpy(&driver->dev_type, &gStorVscDeviceType,
--
1.7.4.1
^ permalink raw reply related
* [PATCH 05/16] Staging: hv: Get rid of the include of storvsc.c from blkvsc.c
From: K. Y. Srinivasan @ 2011-03-23 17:50 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization
Cc: K. Y. Srinivasan, Haiyang Zhang, Hank Janssen
In-Reply-To: <1300902635-1347-1-git-send-email-kys@microsoft.com>
Now that all the structure definitions have been moved to a header file,
get rid of the inclusion of storvsc.c from blkvsc.c.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/Makefile | 2 +-
drivers/staging/hv/blkvsc.c | 2 +-
drivers/staging/hv/storvsc.c | 8 ++++----
drivers/staging/hv/storvsc_api.h | 9 +++++++++
4 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/hv/Makefile b/drivers/staging/hv/Makefile
index abeb2f7..a733154 100644
--- a/drivers/staging/hv/Makefile
+++ b/drivers/staging/hv/Makefile
@@ -9,6 +9,6 @@ hv_vmbus-y := vmbus_drv.o \
hv.o connection.o channel.o \
channel_mgmt.o ring_buffer.o
hv_storvsc-y := storvsc_drv.o storvsc.o
-hv_blkvsc-y := blkvsc_drv.o blkvsc.o
+hv_blkvsc-y := blkvsc_drv.o blkvsc.o storvsc.o
hv_netvsc-y := netvsc_drv.o netvsc.o rndis_filter.o
hv_utils-y := hv_util.o hv_kvp.o
diff --git a/drivers/staging/hv/blkvsc.c b/drivers/staging/hv/blkvsc.c
index 88d6e3c..ebe511a 100644
--- a/drivers/staging/hv/blkvsc.c
+++ b/drivers/staging/hv/blkvsc.c
@@ -22,8 +22,8 @@
*/
#include <linux/kernel.h>
#include <linux/mm.h>
+#include "logging.h"
#include "hv_api.h"
-#include "storvsc.c"
#include "storvsc_api.h"
static const char *g_blk_driver_name = "blkvsc";
diff --git a/drivers/staging/hv/storvsc.c b/drivers/staging/hv/storvsc.c
index be1c77a..c8d7ff7 100644
--- a/drivers/staging/hv/storvsc.c
+++ b/drivers/staging/hv/storvsc.c
@@ -504,7 +504,7 @@ static int stor_vsc_connect_to_vsp(struct hv_device *device)
* stor_vsc_on_device_add - Callback when the device belonging to this driver
* is added
*/
-static int stor_vsc_on_device_add(struct hv_device *device,
+int stor_vsc_on_device_add(struct hv_device *device,
void *additional_info)
{
struct storvsc_device *stor_device;
@@ -553,7 +553,7 @@ cleanup:
/*
* stor_vsc_on_device_remove - Callback when the our device is being removed
*/
-static int stor_vsc_on_device_remove(struct hv_device *device)
+int stor_vsc_on_device_remove(struct hv_device *device)
{
struct storvsc_device *stor_device;
@@ -646,7 +646,7 @@ cleanup:
/*
* stor_vsc_on_io_request - Callback to initiate an I/O request
*/
-static int stor_vsc_on_io_request(struct hv_device *device,
+int stor_vsc_on_io_request(struct hv_device *device,
struct hv_storvsc_request *request)
{
struct storvsc_device *stor_device;
@@ -739,7 +739,7 @@ static int stor_vsc_on_io_request(struct hv_device *device,
/*
* stor_vsc_on_cleanup - Perform any cleanup when the driver is removed
*/
-static void stor_vsc_on_cleanup(struct hv_driver *driver)
+void stor_vsc_on_cleanup(struct hv_driver *driver)
{
}
diff --git a/drivers/staging/hv/storvsc_api.h b/drivers/staging/hv/storvsc_api.h
index 7f780c5..141b8fd 100644
--- a/drivers/staging/hv/storvsc_api.h
+++ b/drivers/staging/hv/storvsc_api.h
@@ -142,4 +142,13 @@ int stor_vsc_initialize(struct hv_driver *driver);
int stor_vsc_on_host_reset(struct hv_device *device);
int blk_vsc_initialize(struct hv_driver *driver);
+int stor_vsc_on_device_add(struct hv_device *device,
+ void *additional_info);
+int stor_vsc_on_device_remove(struct hv_device *device);
+
+int stor_vsc_on_io_request(struct hv_device *device,
+ struct hv_storvsc_request *request);
+void stor_vsc_on_cleanup(struct hv_driver *driver);
+
+
#endif /* _STORVSC_API_H_ */
--
1.7.4.1
^ permalink raw reply related
* [PATCH 04/16] Staging: hv: Cleanup struct storvsc_device
From: K. Y. Srinivasan @ 2011-03-23 17:50 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization; +Cc: Haiyang Zhang
In-Reply-To: <1300902635-1347-1-git-send-email-kys@microsoft.com>
Get rid of some dated comments from struct storvsc_device.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/storvsc_api.h | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/hv/storvsc_api.h b/drivers/staging/hv/storvsc_api.h
index 2b814bd..7f780c5 100644
--- a/drivers/staging/hv/storvsc_api.h
+++ b/drivers/staging/hv/storvsc_api.h
@@ -132,9 +132,6 @@ struct storvsc_device {
unsigned char path_id;
unsigned char target_id;
- /* LIST_ENTRY OutstandingRequestList; */
- /* HANDLE OutstandingRequestLock; */
-
/* Used for vsc/vsp channel reset process */
struct storvsc_request_extension init_request;
struct storvsc_request_extension reset_request;
--
1.7.4.1
^ permalink raw reply related
* [PATCH 03/16] Staging: hv: Move the definition of struct storvsc_device
From: K. Y. Srinivasan @ 2011-03-23 17:50 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization
Cc: K. Y. Srinivasan, Haiyang Zhang, Hank Janssen
In-Reply-To: <1300902635-1347-1-git-send-email-kys@microsoft.com>
In preparation for getting rid of the inclusion of storvsc.c from
blkvsc.c, move the definition of struct storvsc_device
from storvsc.c to storvsc_api.h.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/storvsc.c | 26 --------------------------
drivers/staging/hv/storvsc_api.h | 26 ++++++++++++++++++++++++++
2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/drivers/staging/hv/storvsc.c b/drivers/staging/hv/storvsc.c
index 56f3cc9..be1c77a 100644
--- a/drivers/staging/hv/storvsc.c
+++ b/drivers/staging/hv/storvsc.c
@@ -33,32 +33,6 @@
#include "channel.h"
-/* A storvsc device is a device object that contains a vmbus channel */
-struct storvsc_device {
- struct hv_device *device;
-
- /* 0 indicates the device is being destroyed */
- atomic_t ref_count;
-
- atomic_t num_outstanding_req;
-
- /*
- * Each unique Port/Path/Target represents 1 channel ie scsi
- * controller. In reality, the pathid, targetid is always 0
- * and the port is set by us
- */
- unsigned int port_number;
- unsigned char path_id;
- unsigned char target_id;
-
- /* LIST_ENTRY OutstandingRequestList; */
- /* HANDLE OutstandingRequestLock; */
-
- /* Used for vsc/vsp channel reset process */
- struct storvsc_request_extension init_request;
- struct storvsc_request_extension reset_request;
-};
-
static const char *g_driver_name = "storvsc";
diff --git a/drivers/staging/hv/storvsc_api.h b/drivers/staging/hv/storvsc_api.h
index 629144c..2b814bd 100644
--- a/drivers/staging/hv/storvsc_api.h
+++ b/drivers/staging/hv/storvsc_api.h
@@ -114,6 +114,32 @@ struct storvsc_request_extension {
struct vstor_packet vstor_packet;
};
+/* A storvsc device is a device object that contains a vmbus channel */
+struct storvsc_device {
+ struct hv_device *device;
+
+ /* 0 indicates the device is being destroyed */
+ atomic_t ref_count;
+
+ atomic_t num_outstanding_req;
+
+ /*
+ * Each unique Port/Path/Target represents 1 channel ie scsi
+ * controller. In reality, the pathid, targetid is always 0
+ * and the port is set by us
+ */
+ unsigned int port_number;
+ unsigned char path_id;
+ unsigned char target_id;
+
+ /* LIST_ENTRY OutstandingRequestList; */
+ /* HANDLE OutstandingRequestLock; */
+
+ /* Used for vsc/vsp channel reset process */
+ struct storvsc_request_extension init_request;
+ struct storvsc_request_extension reset_request;
+};
+
/* Interface */
int stor_vsc_initialize(struct hv_driver *driver);
int stor_vsc_on_host_reset(struct hv_device *device);
--
1.7.4.1
^ permalink raw reply related
* [PATCH 02/16] Staging: hv: Move the definition of struct storvsc_request_extension
From: K. Y. Srinivasan @ 2011-03-23 17:50 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization; +Cc: Haiyang Zhang
In-Reply-To: <1300902635-1347-1-git-send-email-kys@microsoft.com>
In preparation for getting rid of the inclusion of storvsc.c from
blkvsc.c, move the definition of struct storvsc_request_extension
from storvsc.c to storvsc_api.h.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/blkvsc.c | 1 +
drivers/staging/hv/storvsc.c | 13 -------------
drivers/staging/hv/storvsc_api.h | 12 ++++++++++++
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/hv/blkvsc.c b/drivers/staging/hv/blkvsc.c
index 7c8729b..88d6e3c 100644
--- a/drivers/staging/hv/blkvsc.c
+++ b/drivers/staging/hv/blkvsc.c
@@ -24,6 +24,7 @@
#include <linux/mm.h>
#include "hv_api.h"
#include "storvsc.c"
+#include "storvsc_api.h"
static const char *g_blk_driver_name = "blkvsc";
diff --git a/drivers/staging/hv/storvsc.c b/drivers/staging/hv/storvsc.c
index e2ad729..56f3cc9 100644
--- a/drivers/staging/hv/storvsc.c
+++ b/drivers/staging/hv/storvsc.c
@@ -33,19 +33,6 @@
#include "channel.h"
-struct storvsc_request_extension {
- /* LIST_ENTRY ListEntry; */
-
- struct hv_storvsc_request *request;
- struct hv_device *device;
-
- /* Synchronize the request/response if needed */
- int wait_condition;
- wait_queue_head_t wait_event;
-
- struct vstor_packet vstor_packet;
-};
-
/* A storvsc device is a device object that contains a vmbus channel */
struct storvsc_device {
struct hv_device *device;
diff --git a/drivers/staging/hv/storvsc_api.h b/drivers/staging/hv/storvsc_api.h
index fbf5755..629144c 100644
--- a/drivers/staging/hv/storvsc_api.h
+++ b/drivers/staging/hv/storvsc_api.h
@@ -25,6 +25,7 @@
#ifndef _STORVSC_API_H_
#define _STORVSC_API_H_
+#include "vstorage.h"
#include "vmbus_api.h"
/* Defines */
@@ -102,6 +103,17 @@ struct storvsc_device_info {
unsigned char target_id;
};
+struct storvsc_request_extension {
+ struct hv_storvsc_request *request;
+ struct hv_device *device;
+
+ /* Synchronize the request/response if needed */
+ int wait_condition;
+ wait_queue_head_t wait_event;
+
+ struct vstor_packet vstor_packet;
+};
+
/* Interface */
int stor_vsc_initialize(struct hv_driver *driver);
int stor_vsc_on_host_reset(struct hv_device *device);
--
1.7.4.1
^ permalink raw reply related
* [PATCH 01/16] Staging: hv: Add the inclusion guard for vstorage.h
From: K. Y. Srinivasan @ 2011-03-23 17:50 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization; +Cc: Haiyang Zhang
In-Reply-To: <1300902537-1290-1-git-send-email-kys@microsoft.com>
In preparation for getting rid of the inclusion of storvsc.c from
blkvsc.c, add inclusion guard to vstorage.h
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/vstorage.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/staging/hv/vstorage.h b/drivers/staging/hv/vstorage.h
index ebb4d67..83060cd 100644
--- a/drivers/staging/hv/vstorage.h
+++ b/drivers/staging/hv/vstorage.h
@@ -25,6 +25,9 @@
/* to alert the user that structure sizes may be mismatched even though the */
/* protocol versions match. */
+#ifndef _VSTORAGE_H_
+#define _VSTORAGE_H_
+
#define REVISION_STRING(REVISION_) #REVISION_
#define FILL_VMSTOR_REVISION(RESULT_LVALUE_) \
do { \
@@ -190,3 +193,5 @@ struct vstor_packet {
/* This is the set of flags that the vsc can set in any packets it sends */
#define VSC_LEGAL_FLAGS (REQUEST_COMPLETION_FLAG)
+
+#endif /* _VSTORAGE_H_ */
--
1.7.4.1
^ permalink raw reply related
* [PATCH 00/16] Staging: hv: Cleanup storage drivers - Phase I
From: K. Y. Srinivasan @ 2011-03-23 17:48 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization; +Cc: K. Y. Srinivasan
This is first in a series of patch-sets aimed at cleaning up the storage
drivers for Hyper-V. Before I get into the details of this patch-set, I think
it is useful to give a brief overview of the storage related front-end
drivers currently in the tree for Linux on Hyper-V:
On the host side, Windows emulates the standard PC hardware
to permit hosting of fully virtualized operating systems.
To enhance disk I/O performance, we support a virtual block driver.
This block driver currently handles disks that have been setup as IDE
disks for the guest - as specified in the guest configuration.
On the SCSI side, we emulate a SCSI HBA. Devices configured
under the SCSI controller for the guest are handled via this
emulated HBA (SCSI front-end). So, SCSI disks configured for
the guest are handled through native SCSI upper-level drivers.
If this SCSI front-end driver is not loaded, currently, the guest
cannot see devices that have been configured as SCSI devices.
So, while the virtual block driver described earlier could potentially
handle all block devices, the implementation choices made on the host
may not permit it. Also, the only SCSI device that can be currently
configured for the guest is a disk device.
Both the block device driver (hv_blkvsc) and the SCSI front-end
driver (hv_storvsc) communicate with the host via unique channels
that are implemented as bi-directional ring-buffers. Each
(storage) channel carries with it enough state to uniquely
identify the device on the host side. Microsoft has chosen to
use SCSI verbs for this storage channel communication.
In this patch-set I have addressed the following issues in the Hyper-V
storage drivers (virtual block and SCSI front-end):
1) Get rid of the inclusion of storvsc.c from blockvsc.c
2) Cleanup storvsc.c
3) Get rid of the file blkvsc.c
4) Cleanup the initialization sequence for both block and
SCSI front-end drivers.
Regards,
K. Y
^ permalink raw reply
* Re: [PULL net-2.6] vhost: cleanups and fixes
From: David Miller @ 2011-03-21 2:08 UTC (permalink / raw)
To: mst
Cc: kvm, virtualization, netdev, linux-kernel, eric.dumazet, jasowang,
krkumar2
In-Reply-To: <20110317140403.GA16390@redhat.com>
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Thu, 17 Mar 2011 16:04:04 +0200
> The following changes since commit 1fc050a13473348f5c439de2bb41c8e92dba5588:
>
> ipv4: Cache source address in nexthop entries. (2011-03-07 20:54:48 -0800)
>
> are available in the git repository at:
> git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost-net-next
>
> Jason Wang (3):
> vhost-net: check the support of mergeable buffer outside the receive loop
> vhost-net: Unify the code of mergeable and big buffer handling
> vhost: lock receive queue, not the socket
>
> Krishna Kumar (1):
> vhost: Cleanup vhost.c and net.c
>
> Michael S. Tsirkin (2):
> vhost: copy_from_user -> __copy_from_user
> vhost-net: remove unlocked use of receive_queue
Pulled, thanks.
^ permalink raw reply
* ICGC11 deadline extended to March 28 (2nd International Green Computing Conference)
From: Ming Zhao @ 2011-03-20 10:26 UTC (permalink / raw)
To: virtualization
* Update:
Call for Papers Deadline has been extended to March 28.
Please visit the website (www.green-conf.org) to find out more about how to submit a paper as well as information about this conference that will be held in Orlando, Florida, USA on July 25 - 28, 2011
SECOND INTERNATIONAL GREEN COMPUTING CONFERENCE (IGCC'11):
Moto: Sustainable Computing and Computing for Sustainability
Orlando, Florida, USA, (The Holiday Inn at Disneyworld) July 25-28,
2011, www.green-conf.org
The Second International Green Computing Conference, technically
cosponsored by IEEE, addresses key issues and topics related to energy
efficiency in computing and promoting environmentally friendly
computer technologies and systems. The conference provides a forum for
discussing, sharing and investigating the state-of-the-art for all
aspects of green computing, which include energy-efficient use of
computers, design of algorithms and systems for
environmentally-friendly computer technologies, and a wide range of
related topics. The conference seeks papers with unpublished material
and previously unsubmitted material pertaining to the design and use
of sustainable hardware and software systems, algorithms, and
applications. The conference will hold forums, workshops, and
tutorials on hot topics related to how the carbon footprint of
computing can be reduced and how computers can contribute to the
environment and overall well-being of the planet.
Topics of interest are:
* Power-aware software
* Configurable and renewable energy
* Code profiling and transformation for power management
* Low power electronics
* Power-aware middleware
* Embedded systems, ASICs and FPGSs
* Power-efficient architectures and chip designs
* Power leakage and dissipation
* Resource management to optimize performance and power
* Power implications for portable and mobile computing
* Runtime systems that assist in power saving
* Power aware networking
* Models for collective optimization of power and performance
* Reliability of Power-aware computers
* Monitoring tools for power and performance
* Use of sensors for climate monitoring
* Algorithms for reduced power, energy and heat
* Smart control for eco-friendly buildings
* Power-aware applications
* Thermal control of data centers
* Static and dynamic data allocation for distributed servers
* Energy recycling
* Efficient circuit design for energy harvesting
* Energy efficient power and cooling infrastructure
* Power efficient cluster and enterprise computing
* Configurable and renewable energy
* Component level power management, e.g., memory, disk.
* Low power electronics
* Power leakage and dissipation
* Embedded systems, ASICs and FPGSs
Review of Manuscripts
All submitted manuscripts will be reviewed by the conference Technical
Committee and evaluated on correctness, originality, technical
strength, significance, quality of presentation, interest and
relevance to the conference scope. Papers must be received by the
submission deadline to be considered for inclusion in the conference.
Best Paper Awards
Awards will be given for best papers in different categories.
Important Dates:
* Submission Deadline: Monday, March 28, 2011
* Paper notification: May 13, 2011
* Camera ready papers due: June 6, 2011
The final appearance of the accepted papers in the official conference
proceedings (through IEEE Digital Library) is contingent on two
conditions: (1) that at least one author of an accepted paper
registers for the conference at the time of the submission of the
final manuscript and (2) that one of the authors presents the paper at
the conference in person. Full details of the conference may be found
at the conference website: www.green-conf.org. To directly access
submission please go to
https://www.easychair.org/login.cgi?conf=igcc101
Workshops
Several workshops on related topics will be held in conjunction with
the Green Computing conference.
1. Energy Consumption and Reliability of Storage Systems; Co-Chairs:
Ali Butt, Virginia Tech.; and Chris Gniady, U. of Arizona;
2. Power Measurement and Profiling; Weisong Shi (Wayne State);
3. Thermal Management Dhireesha Kudithipudi, RIT;
4. Low Power System on Chip, Partha Pande, WSU.
Committees
* General Co-Chairs: Ishfaq Ahmad, University of Texas at Arlington,
and Sanjay Ranka, University of Florida.
* Technical Committee: Co-Chairs: Israel Koren, University of
Massachusetts, and Daniel Mosse University of Pittsburgh;
* Members: Tarek Abdelzaher, UIUC; David Albonesi, Cornell; Ahmed
Amer, Santa Clara Univ; Martin Arlitt, HP Labs and University of
Calgary; Hakan Aydin, George Mason Univ; Luca Benini, Univ. of
Bologna; Ricardo Bianchini, Rutgers; John Carter, IBM; Ranveer
Chandra, Microsoft Research; Vince Freeh, NCSU; Rong Ge, Marquette
Univ; Sameh Gobriel, Intel Research; Rajesh Gupta, UCSD; Tohru
Ishihara, Kyushu Univ; Randy Katz, UC Berkeley; Uli Kremer, Rutgers;
C. Mani Krishna, U Mass.; Rakesh Kumar, UIUC; Alvin Lebeck, Duke
University; Yann-Hang Lee, ASU; Julius Leite, UFF/Brazil; Xue Liu,
UNL; Satoshi Matsouka, TITECH-Japan; Rami G. Melhem, University of
Pittsburgh; Avi Mendelson. Microsoft, Israel; Bruce Normad, Lawrence
Berkeley Lab; Lucy Nowell, DOE: Partha Ranganathan, HP Labs; Tajana
Rosing, UCSD; Efi Rotem, Intel:; Anthony Rowe, CMU; Martin Schulz,
LLNL; Ankur Srivastva, University of Maryland; Osman Unsal, BSC,
Barcelona; Shengquan Wang, Michigan; Dakai Zhu, UTSA.
* Workshop Chair: Sanjay Ranka, University of Florida, USA.
* Publication Chair: Saeed Rajput, Nova Southeastern University, USA
* Publicity Co-Chairs: Javier Alonso, Technical University of
Catalonia, Spain; Ming Zhao Florida International University, USA.
* Steering Committee: Behrooz Shirazi (Co-Chair), Washington State
University, USA; Ishfaq Ahmad (Co-Chair), University of Texas at
Arlington, USA; Rajesh Gupta, University of California at San Diego,
USA; Sandeep Gupta, Arizona State University, USA; Ali Hurson,
Missouri University of Science and Technology, USA; Ashfaq Khokhar,
University of Illinois at Chicago, USA; Francis Lau, University of
Hong Kong, China; Sanjay Ranka, University of Florida, USA.
Keynote Speaker: David Culler, UC Berkeley.
We look forward to receiving your submission(s), and hope you will be
able to join us in Orlando in July.
Sincerely,
IGCC'11 Organizing Committee
^ permalink raw reply
* [patch 2/2] xen-gntdev: unlock on error path in gntdev_mmap()
From: Dan Carpenter @ 2011-03-19 5:45 UTC (permalink / raw)
To: Jeremy Fitzhardinge
Cc: kernel-janitors, xen-devel, virtualization, Konrad Rzeszutek Wilk
We should unlock here and also decrement the number of &map->users.
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
I'm not very familiar with this code. Please review carefully.
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
index 017ce60..b0f9e8f 100644
--- a/drivers/xen/gntdev.c
+++ b/drivers/xen/gntdev.c
@@ -662,7 +662,7 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma)
if (map->flags) {
if ((vma->vm_flags & VM_WRITE) &&
(map->flags & GNTMAP_readonly))
- return -EINVAL;
+ goto out_unlock_put;
} else {
map->flags = GNTMAP_host_map;
if (!(vma->vm_flags & VM_WRITE))
@@ -700,6 +700,8 @@ unlock_out:
spin_unlock(&priv->lock);
return err;
+out_unlock_put:
+ spin_unlock(&priv->lock);
out_put_map:
if (use_ptemod)
map->vma = NULL;
^ permalink raw reply related
* [patch 1/2] xen-gntdev: return -EFAULT on copy_to_user failure
From: Dan Carpenter @ 2011-03-19 5:44 UTC (permalink / raw)
To: Jeremy Fitzhardinge
Cc: kernel-janitors, xen-devel, virtualization, Konrad Rzeszutek Wilk
copy_to_user() returns the amount of data remaining to be copied. We
want to return a negative error code here. The upper layers just
call WARN_ON() if we return non-zero so this doesn't change the
behavior. But returning -EFAULT is still cleaner.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
index 017ce60..b0f9e8f 100644
--- a/drivers/xen/gntdev.c
+++ b/drivers/xen/gntdev.c
@@ -273,7 +273,7 @@ static int __unmap_grant_pages(struct grant_map *map, int offset, int pages)
map->vma->vm_start + map->notify.addr;
err = copy_to_user(tmp, &err, 1);
if (err)
- return err;
+ return -EFAULT;
map->notify.flags &= ~UNMAP_NOTIFY_CLEAR_BYTE;
} else if (pgno >= offset && pgno < offset + pages) {
uint8_t *tmp = kmap(map->pages[pgno]);
^ permalink raw reply related
* Re: [PATCH 00/12] Staging: hv: Cleanup vmbus driver - Phase II
From: Valdis.Kletnieks @ 2011-03-17 22:58 UTC (permalink / raw)
To: Greg KH; +Cc: K. Y. Srinivasan, linux-kernel, devel, virtualization
In-Reply-To: <20110317214537.GA28608@suse.de>
[-- Attachment #1: Type: text/plain, Size: 743 bytes --]
On Thu, 17 Mar 2011 14:45:37 PDT, Greg KH said:
> On Thu, Mar 17, 2011 at 05:39:27PM -0400, Valdis.Kletnieks@vt.edu wrote:
> > Is that Linus's merge window, or your window to freeze a for-linus tree?
>
> My window.
>
> Linus's merge window is for the subsystem maintainers. Everything that
> is to be sent during Linus's merge window had to be in the linux-next
> tree for a bit of time before the merge window opens.
OK, that's what I suspected, but wasn't 100% sure, because..
> I also posted the "my tree is now closed for .39 stuff" message to the
> devel mailing list, so there shouldn't have been any questions about
> this.
some of us are only on lkml, where usually it's Linus who gets to say
"The 2.6.N merge window is closed".
[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox