virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] BLOCK=n , LGUEST=m/y compile error
@ 2007-07-29 15:18 Gabriel C
  2007-07-30  0:25 ` [PATCH] Make lguest compile with CONFIG_BLOCK=n and CONFIG_NET=n Rusty Russell
  0 siblings, 1 reply; 4+ messages in thread
From: Gabriel C @ 2007-07-29 15:18 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: virtualization

Hi Rusty,

Lguest should depend on BLOCK too , without BLOCK set I get this error:

...

drivers/block/lguest_blk.c: In function 'end_entire_request':
drivers/block/lguest_blk.c:80: error: implicit declaration of function 'end_that_request_first'
drivers/block/lguest_blk.c:80: error: dereferencing pointer to incomplete type
drivers/block/lguest_blk.c:82: error: implicit declaration of function 'add_disk_randomness'
drivers/block/lguest_blk.c:82: error: dereferencing pointer to incomplete type
drivers/block/lguest_blk.c:83: error: implicit declaration of function 'blkdev_dequeue_request'
drivers/block/lguest_blk.c:84: error: implicit declaration of function 'end_that_request_last'
drivers/block/lguest_blk.c: In function 'lgb_irq':
drivers/block/lguest_blk.c:128: error: implicit declaration of function 'blk_start_queue'
drivers/block/lguest_blk.c:128: error: dereferencing pointer to incomplete type
drivers/block/lguest_blk.c: In function 'req_to_dma':
drivers/block/lguest_blk.c:148: error: implicit declaration of function 'rq_for_each_bio'
drivers/block/lguest_blk.c:148: error: expected ';' before '{' token
drivers/block/lguest_blk.c:145: warning: unused variable 'idx'
drivers/block/lguest_blk.c:145: warning: unused variable 'i'
drivers/block/lguest_blk.c: In function 'setup_req':
drivers/block/lguest_blk.c:185: error: dereferencing pointer to incomplete type
drivers/block/lguest_blk.c: In function 'do_write':
drivers/block/lguest_blk.c:202: error: dereferencing pointer to incomplete type
drivers/block/lguest_blk.c: In function 'do_read':
drivers/block/lguest_blk.c:215: error: dereferencing pointer to incomplete type
drivers/block/lguest_blk.c: In function 'do_lgb_request':
drivers/block/lguest_blk.c:234: error: implicit declaration of function 'elv_next_request'
drivers/block/lguest_blk.c:234: warning: assignment makes pointer from integer without a cast
drivers/block/lguest_blk.c:239: error: dereferencing pointer to incomplete type
drivers/block/lguest_blk.c:246: error: implicit declaration of function 'blk_fs_request'
drivers/block/lguest_blk.c:247: error: dereferencing pointer to incomplete type
drivers/block/lguest_blk.c:248: error: dereferencing pointer to incomplete type
drivers/block/lguest_blk.c:253: error: implicit declaration of function 'rq_data_dir'
drivers/block/lguest_blk.c:260: error: implicit declaration of function 'blk_stop_queue'
drivers/block/lguest_blk.c: In function 'lguestblk_probe':
drivers/block/lguest_blk.c:304: error: implicit declaration of function 'register_blkdev'
drivers/block/lguest_blk.c:313: error: implicit declaration of function 'alloc_disk'
drivers/block/lguest_blk.c:313: warning: assignment makes pointer from integer without a cast
drivers/block/lguest_blk.c:322: error: dereferencing pointer to incomplete type
drivers/block/lguest_blk.c:322: error: implicit declaration of function 'blk_init_queue'
drivers/block/lguest_blk.c:323: error: dereferencing pointer to incomplete type
drivers/block/lguest_blk.c:335: error: implicit declaration of function 'blk_queue_max_hw_segments'
drivers/block/lguest_blk.c:335: error: dereferencing pointer to incomplete type
drivers/block/lguest_blk.c:341: error: implicit declaration of function 'blk_queue_segment_boundary'
drivers/block/lguest_blk.c:341: error: dereferencing pointer to incomplete type
drivers/block/lguest_blk.c:349: error: dereferencing pointer to incomplete type
drivers/block/lguest_blk.c:360: error: dereferencing pointer to incomplete type
drivers/block/lguest_blk.c:373: error: dereferencing pointer to incomplete type
drivers/block/lguest_blk.c:374: error: dereferencing pointer to incomplete type
drivers/block/lguest_blk.c:375: error: dereferencing pointer to incomplete type
drivers/block/lguest_blk.c:376: error: dereferencing pointer to incomplete type
drivers/block/lguest_blk.c:378: error: implicit declaration of function 'set_capacity'
drivers/block/lguest_blk.c:379: error: implicit declaration of function 'add_disk'
drivers/block/lguest_blk.c:382: error: dereferencing pointer to incomplete type
drivers/block/lguest_blk.c:392: error: implicit declaration of function 'blk_cleanup_queue'
drivers/block/lguest_blk.c:392: error: dereferencing pointer to incomplete type
drivers/block/lguest_blk.c:394: error: implicit declaration of function 'put_disk'
drivers/block/lguest_blk.c:396: error: implicit declaration of function 'unregister_blkdev'
make[2]: *** [drivers/block/lguest_blk.o] Error 1
make[1]: *** [drivers/block] Error 2

....

Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>

---

 Documentation/lguest/lguest.txt |    1 +
 drivers/lguest/Kconfig          |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Documentation/lguest/lguest.txt b/Documentation/lguest/lguest.txt
index 821617b..4e7408c 100644
--- a/Documentation/lguest/lguest.txt
+++ b/Documentation/lguest/lguest.txt
@@ -33,6 +33,7 @@ Running Lguest:
   CONFIG_EXPERIMENTAL=y ("Prompt for development and/or incomplete code/drivers")
   CONFIG_PARAVIRT=y ("Paravirtualization support (EXPERIMENTAL)")
   CONFIG_LGUEST=y/m ("Linux hypervisor example code")
+  CONFIG_BLOCK=y  ("Enable the block layer")
 
   and I recommend:
   CONFIG_HZ=100 ("Timer frequency")[2]
diff --git a/drivers/lguest/Kconfig b/drivers/lguest/Kconfig
index 43d901f..4bc0577 100644
--- a/drivers/lguest/Kconfig
+++ b/drivers/lguest/Kconfig
@@ -1,6 +1,6 @@
 config LGUEST
 	tristate "Linux hypervisor example code"
-	depends on X86 && PARAVIRT && NET && EXPERIMENTAL && !X86_PAE
+	depends on X86 && PARAVIRT && NET && EXPERIMENTAL && BLOCK && !X86_PAE
 	select LGUEST_GUEST
 	select HVC_DRIVER
 	---help---

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] Make lguest compile with CONFIG_BLOCK=n and CONFIG_NET=n
  2007-07-29 15:18 [PATCH] BLOCK=n , LGUEST=m/y compile error Gabriel C
@ 2007-07-30  0:25 ` Rusty Russell
  2007-07-30  0:48   ` Satyam Sharma
  2007-07-30  1:29   ` Gabriel C
  0 siblings, 2 replies; 4+ messages in thread
From: Rusty Russell @ 2007-07-30  0:25 UTC (permalink / raw)
  To: Gabriel C, Linus Torvalds; +Cc: Linux Kernel Mailing List, virtualization

On Sun, 2007-07-29 at 17:18 +0200, Gabriel C wrote:
> Hi Rusty,
> 
> Lguest should depend on BLOCK too , without BLOCK set I get this error:

Hi Gabriel,

	Thanks for the report!  It's probably better to fix this properly
rather than hack it as I did for NET.

Linus, please apply:

Gabriel C reports lguest doesn't compile with CONFIG_BLOCK=n.  Fix
this by introducing a config var for the block device, which depends
on LGUEST && BLOCK.  Do the same for the net driver, rather then
depending gratuitously on CONFIG_NET.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

diff -r 9e987fcabb16 drivers/block/Makefile
--- a/drivers/block/Makefile	Mon Jul 30 09:47:25 2007 +1000
+++ b/drivers/block/Makefile	Mon Jul 30 10:02:32 2007 +1000
@@ -31,4 +31,4 @@ obj-$(CONFIG_BLK_DEV_UB)	+= ub.o
 obj-$(CONFIG_BLK_DEV_UB)	+= ub.o
 
 obj-$(CONFIG_XEN_BLKDEV_FRONTEND)	+= xen-blkfront.o
-obj-$(CONFIG_LGUEST_GUEST)	+= lguest_blk.o
+obj-$(CONFIG_LGUEST_BLOCK)	+= lguest_blk.o
diff -r 9e987fcabb16 drivers/lguest/Kconfig
--- a/drivers/lguest/Kconfig	Mon Jul 30 09:47:25 2007 +1000
+++ b/drivers/lguest/Kconfig	Mon Jul 30 10:03:39 2007 +1000
@@ -1,6 +1,6 @@ config LGUEST
 config LGUEST
 	tristate "Linux hypervisor example code"
-	depends on X86 && PARAVIRT && NET && EXPERIMENTAL && !X86_PAE
+	depends on X86 && PARAVIRT && EXPERIMENTAL && !X86_PAE
 	select LGUEST_GUEST
 	select HVC_DRIVER
 	---help---
@@ -18,3 +18,11 @@ config LGUEST_GUEST
 	  The guest needs code built-in, even if the host has lguest
 	  support as a module.  The drivers are tiny, so we build them
 	  in too.
+
+config LGUEST_NET
+	tristate
+	depends on LGUEST_GUEST && NET
+
+config LGUEST_BLOCK
+	tristate
+	depends on LGUEST_GUEST && BLOCK
diff -r 9e987fcabb16 drivers/net/Makefile
--- a/drivers/net/Makefile	Mon Jul 30 09:47:25 2007 +1000
+++ b/drivers/net/Makefile	Mon Jul 30 10:02:22 2007 +1000
@@ -177,7 +177,7 @@ obj-$(CONFIG_HPLANCE) += hplance.o 7990.
 obj-$(CONFIG_HPLANCE) += hplance.o 7990.o
 obj-$(CONFIG_MVME147_NET) += mvme147.o 7990.o
 obj-$(CONFIG_EQUALIZER) += eql.o
-obj-$(CONFIG_LGUEST_GUEST) += lguest_net.o
+obj-$(CONFIG_LGUEST_NET) += lguest_net.o
 obj-$(CONFIG_MIPS_JAZZ_SONIC) += jazzsonic.o
 obj-$(CONFIG_MIPS_AU1X00_ENET) += au1000_eth.o
 obj-$(CONFIG_MIPS_SIM_NET) += mipsnet.o

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Make lguest compile with CONFIG_BLOCK=n and CONFIG_NET=n
  2007-07-30  0:25 ` [PATCH] Make lguest compile with CONFIG_BLOCK=n and CONFIG_NET=n Rusty Russell
@ 2007-07-30  0:48   ` Satyam Sharma
  2007-07-30  1:29   ` Gabriel C
  1 sibling, 0 replies; 4+ messages in thread
From: Satyam Sharma @ 2007-07-30  0:48 UTC (permalink / raw)
  To: Rusty Russell
  Cc: Gabriel C, Linus Torvalds, Linux Kernel Mailing List,
	virtualization

On 7/30/07, Rusty Russell <rusty@rustcorp.com.au> wrote:
> [...]
> Gabriel C reports lguest doesn't compile with CONFIG_BLOCK=n.  Fix
> this by introducing a config var for the block device, which depends
> on LGUEST && BLOCK.  Do the same for the net driver, rather then
> depending gratuitously on CONFIG_NET.
> [...]
> diff -r 9e987fcabb16 drivers/lguest/Kconfig
> --- a/drivers/lguest/Kconfig    Mon Jul 30 09:47:25 2007 +1000
> +++ b/drivers/lguest/Kconfig    Mon Jul 30 10:03:39 2007 +1000
> @@ -1,6 +1,6 @@ config LGUEST
>  config LGUEST
>         tristate "Linux hypervisor example code"
> -       depends on X86 && PARAVIRT && NET && EXPERIMENTAL && !X86_PAE
> +       depends on X86 && PARAVIRT && EXPERIMENTAL && !X86_PAE
>         select LGUEST_GUEST
>         select HVC_DRIVER
>         ---help---
> @@ -18,3 +18,11 @@ config LGUEST_GUEST
>           The guest needs code built-in, even if the host has lguest
>           support as a module.  The drivers are tiny, so we build them
>           in too.
> +
> +config LGUEST_NET
> +       tristate
> +       depends on LGUEST_GUEST && NET

default y ?

> +
> +config LGUEST_BLOCK
> +       tristate
> +       depends on LGUEST_GUEST && BLOCK

default y ?

I /think/ the default "y" would also automatically become "m" if any of the
dependencies are modules ... probably need to test this, though.


Satyam

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Make lguest compile with CONFIG_BLOCK=n and CONFIG_NET=n
  2007-07-30  0:25 ` [PATCH] Make lguest compile with CONFIG_BLOCK=n and CONFIG_NET=n Rusty Russell
  2007-07-30  0:48   ` Satyam Sharma
@ 2007-07-30  1:29   ` Gabriel C
  1 sibling, 0 replies; 4+ messages in thread
From: Gabriel C @ 2007-07-30  1:29 UTC (permalink / raw)
  To: Rusty Russell; +Cc: Linus Torvalds, Linux Kernel Mailing List, virtualization

Rusty Russell wrote:
> On Sun, 2007-07-29 at 17:18 +0200, Gabriel C wrote:
>> Hi Rusty,
>>
>> Lguest should depend on BLOCK too , without BLOCK set I get this error:
> 
> Hi Gabriel,
> 
> 	Thanks for the report!  It's probably better to fix this properly
> rather than hack it as I did for NET.
> 

You are welcome :)

Yes your solution is better :)


Gabriel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-07-30  1:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-29 15:18 [PATCH] BLOCK=n , LGUEST=m/y compile error Gabriel C
2007-07-30  0:25 ` [PATCH] Make lguest compile with CONFIG_BLOCK=n and CONFIG_NET=n Rusty Russell
2007-07-30  0:48   ` Satyam Sharma
2007-07-30  1:29   ` Gabriel C

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).