WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] ]PATCH] Modular blktap

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Charles Coffing" <CCOFFING@xxxxxxxxxx>
Subject: Re: [Xen-devel] ]PATCH] Modular blktap
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Tue, 31 Oct 2006 09:41:59 +0100
Delivery-date: Thu, 02 Nov 2006 13:37:18 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <45462ED7.D169.003C.0@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <45462ED7.D169.003C.0@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> "Charles Coffing" <ccoffing@xxxxxxxxxx> 31.10.06 00:56 >>>
>Kconfig allows blktap to be built as a module, but drivers/xen/blktap/Makefile
>doesn't work.  The attached patch fixes the makefile to match Kconfig.

Hmm, I'm a little surprised you sent this version, when we know there are
two more issues (zap_page_range not being exported and __setup()
having no effect in a module).
Also, as a general note to the list, I think there was agreement that the
use of zap_page_range() in blktap is superfluous and/or inappropriate,
but it seems no-one submitted a patch to address this, yet. Once such
a patch appears, the exporting of zap_page_range() should obviously
be reverted.

>However, due to the linux build system, drivers/xen/blktap/blktap.c
>must be renamed (it can't be the same name as the resulting module).
>Rename it to "blocktap.c" before applying the patch.

Jan

Index: head-2006-10-16/drivers/xen/blktap/Makefile
===================================================================
--- head-2006-10-16.orig/drivers/xen/blktap/Makefile    2006-10-26 
10:29:04.000000000 +0200
+++ head-2006-10-16/drivers/xen/blktap/Makefile 2006-10-16 11:09:39.000000000 
+0200
@@ -1,3 +1,4 @@
 LINUXINCLUDE += -I../xen/include/public/io
-obj-y  := xenbus.o interface.o blktap.o 
+obj-$(CONFIG_XEN_BLKDEV_TAP) := blktap.o
+blkbktap-y     := xenbus.o interface.o blocktap.o
 
Index: head-2006-10-16/drivers/xen/blktap/blktap.c
===================================================================
--- head-2006-10-16.orig/drivers/xen/blktap/blktap.c    2006-10-16 
10:36:03.000000000 +0200
+++ head-2006-10-16/drivers/xen/blktap/blktap.c 2006-10-26 12:10:54.000000000 
+0200
@@ -134,13 +134,7 @@ typedef struct domid_translate {
 static domid_translate_t  translate_domid[MAX_TAP_DEV];
 static tap_blkif_t *tapfds[MAX_TAP_DEV];
 
-static int __init set_blkif_reqs(char *str)
-{
-       get_option(&str, &blkif_reqs);
-       return 1;
-}
-__setup("blkif_reqs=", set_blkif_reqs);
-
+module_param(blkif_reqs, int, 0);
 /* Run-time switchable: /sys/module/blktap/parameters/ */
 static unsigned int log_stats = 0;
 static unsigned int debug_lvl = 0;
Index: head-2006-10-16/mm/memory.c
===================================================================
--- head-2006-10-16.orig/mm/memory.c    2006-10-26 10:29:04.000000000 +0200
+++ head-2006-10-16/mm/memory.c 2006-10-16 11:49:54.000000000 +0200
@@ -895,6 +895,8 @@ unsigned long zap_page_range(struct vm_a
        return end;
 }
 
+EXPORT_SYMBOL_GPL(zap_page_range);
+
 /*
  * Do a quick page-table lookup for a single page.
  */


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>