|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] how to read value from xenstore inside kernel
In netback.c , I intialized a target_watch struct and a callback function target_watch. Now for registering it , I used the below function in " static int __init netback_init(void) "
spin_lock_init(&net_schedule_list_lock);
INIT_LIST_HEAD(&net_schedule_list);
netif_xenbus_init(); //ADDED CODE err = register_xenbus_watch(&target_watch); if(IS_ERR(err)) { printk(KERN_NOTICE "In netback.c::init Failed to initialize watcher\n");
} else { printk(KERN_NOTICE " In netback.c::init xenbus watcher initialized\n"); } ///END OF ADD
When I reboot , it is hung at the point above the 'register_xenbus_watch(&target_watch)' .
Neither of the printk messages are dispayed.
On Fri, Aug 28, 2009 at 2:37 PM, James Harper <james.harper@xxxxxxxxxxxxxxxx> wrote:
> When I am using
> char * test;
> const char *nodename = "vif/2/0";
> test = xenbus_read(XBT_NIL, nodename, "mac", NULL);
>
> in netback .c ,I am getting this error when the kernel is rebooted.
>
> guest1 BUG: scheduling while atomic: xenwatch/0x00000100/13
>
That will be because the xenbus_read involves a wait of some sort, and
you can't do that in that sort of function.
Basically the rx and tx and other hardware event handlers need to
execute as fast as possible, which precludes any waiting for xenbus
responses to arrive.
Read your value at startup, or put a watch in at startup and read it
when it changes.
James
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] how to read value from xenstore inside kernel, Kuriakose Mathew
- Re: [Xen-devel] how to read value from xenstore inside kernel, Konrad Rzeszutek Wilk
- Re: [Xen-devel] how to read value from xenstore inside kernel, Kuriakose Mathew
- Re: [Xen-devel] how to read value from xenstore inside kernel, Kuriakose Mathew
- RE: [Xen-devel] how to read value from xenstore inside kernel, James Harper
- Re: [Xen-devel] how to read value from xenstore inside kernel,
Kuriakose Mathew <=
- RE: [Xen-devel] how to read value from xenstore inside kernel, James Harper
- Re: [Xen-devel] how to read value from xenstore inside kernel, Kuriakose Mathew
- RE: [Xen-devel] how to read value from xenstore inside kernel, James Harper
- Re: [Xen-devel] how to read value from xenstore inside kernel, Kuriakose Mathew
- Re: [Xen-devel] how to read value from xenstore inside kernel, Kuriakose Mathew
- Re: [Xen-devel] how to read value from xenstore inside kernel, Kuriakose Mathew
|
|
|
|
|