* [minios] Fix test application link when pcifront is not enabled
@ 2012-11-28 20:28 Samuel Thibault
2012-11-29 11:08 ` Ian Campbell
0 siblings, 1 reply; 5+ messages in thread
From: Samuel Thibault @ 2012-11-28 20:28 UTC (permalink / raw)
To: xen-devel, Keir Fraser
When pcifront is not enabled, the test application needs to disable the
PCI test.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
diff -r 321f8487379b extras/mini-os/test.c
--- a/extras/mini-os/test.c Thu Nov 15 10:25:29 2012 +0000
+++ b/extras/mini-os/test.c Wed Nov 28 21:27:22 2012 +0100
@@ -413,6 +413,7 @@
}
}
+#ifdef CONFIG_PCIFRONT
static struct pcifront_dev *pci_dev;
static void print_pcidev(unsigned int domain, unsigned int bus, unsigned int slot, unsigned int fun)
@@ -436,6 +437,7 @@
printk("PCI devices:\n");
pcifront_scan(pci_dev, print_pcidev);
}
+#endif
int app_main(start_info_t *si)
{
@@ -446,7 +448,9 @@
create_thread("blkfront", blkfront_thread, si);
create_thread("fbfront", fbfront_thread, si);
create_thread("kbdfront", kbdfront_thread, si);
+#ifdef CONFIG_PCIFRONT
create_thread("pcifront", pcifront_thread, si);
+#endif
return 0;
}
@@ -464,6 +468,8 @@
if (kbd_dev)
shutdown_kbdfront(kbd_dev);
+#ifdef CONFIG_PCIFRONT
if (pci_dev)
shutdown_pcifront(pci_dev);
+#endif
}
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [minios] Fix test application link when pcifront is not enabled 2012-11-28 20:28 [minios] Fix test application link when pcifront is not enabled Samuel Thibault @ 2012-11-29 11:08 ` Ian Campbell 2012-11-29 11:13 ` Samuel Thibault 2013-01-07 21:47 ` [minios] Fix test application link when various fronts are " Samuel Thibault 0 siblings, 2 replies; 5+ messages in thread From: Ian Campbell @ 2012-11-29 11:08 UTC (permalink / raw) To: Samuel Thibault; +Cc: Keir (Xen.org), xen-devel@lists.xen.org On Wed, 2012-11-28 at 20:28 +0000, Samuel Thibault wrote: > When pcifront is not enabled, the test application needs to disable the > PCI test. > > Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Acked-by: Ian Campbell <ian.campbell@citrix.com> I take it this is not built by default. Should it be? Does something similar apply to the other *front ? Ian. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [minios] Fix test application link when pcifront is not enabled 2012-11-29 11:08 ` Ian Campbell @ 2012-11-29 11:13 ` Samuel Thibault 2013-01-07 21:47 ` [minios] Fix test application link when various fronts are " Samuel Thibault 1 sibling, 0 replies; 5+ messages in thread From: Samuel Thibault @ 2012-11-29 11:13 UTC (permalink / raw) To: Ian Campbell; +Cc: Keir (Xen.org), xen-devel@lists.xen.org Ian Campbell, le Thu 29 Nov 2012 11:08:04 +0000, a écrit : > On Wed, 2012-11-28 at 20:28 +0000, Samuel Thibault wrote: > > When pcifront is not enabled, the test application needs to disable the > > PCI test. > > > > Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> > > Acked-by: Ian Campbell <ian.campbell@citrix.com> > > I take it this is not built by default. Should it be? > > Does something similar apply to the other *front ? Ah, there are indeed *front macros which need handling indeed. I don't know any reason for not enabling pcifront by default. Samuel ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [minios] Fix test application link when various fronts are not enabled 2012-11-29 11:08 ` Ian Campbell 2012-11-29 11:13 ` Samuel Thibault @ 2013-01-07 21:47 ` Samuel Thibault 2013-01-07 21:52 ` Samuel Thibault 1 sibling, 1 reply; 5+ messages in thread From: Samuel Thibault @ 2013-01-07 21:47 UTC (permalink / raw) To: Ian Campbell; +Cc: Keir (Xen.org), xen-devel@lists.xen.org Ian Campbell, le Thu 29 Nov 2012 11:08:04 +0000, a écrit : > On Wed, 2012-11-28 at 20:28 +0000, Samuel Thibault wrote: > > When pcifront is not enabled, the test application needs to disable the > > PCI test. > > > > Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> > > Does something similar apply to the other *front ? Right, here is a patch. Samuel Fix test application link when various fronts are not enabled. When fronts are not enabled, the test application needs to disable the corresponding tests. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> diff -r 64b36dde26bc extras/mini-os/test.c --- a/extras/mini-os/test.c Fri Jan 04 15:58:37 2013 +0000 +++ b/extras/mini-os/test.c Mon Jan 07 22:45:46 2013 +0100 @@ -45,9 +45,7 @@ #include <xen/features.h> #include <xen/version.h> -static struct netfront_dev *net_dev; -static struct semaphore net_sem = __SEMAPHORE_INITIALIZER(net_sem, 0); - +#ifdef CONFIG_XENBUS void test_xenbus(void); static void xenbus_tester(void *p) @@ -55,6 +53,7 @@ printk("Xenbus tests disabled, because of a Xend bug.\n"); /* test_xenbus(); */ } +#endif static void periodic_thread(void *p) { @@ -68,12 +67,18 @@ } } +#ifdef CONFIG_NETFRONT +static struct netfront_dev *net_dev; +static struct semaphore net_sem = __SEMAPHORE_INITIALIZER(net_sem, 0); + static void netfront_thread(void *p) { net_dev = init_netfront(NULL, NULL, NULL, NULL); up(&net_sem); } +#endif +#ifdef CONFIG_BLKFRONT static struct blkfront_dev *blk_dev; static struct blkfront_info blk_info; static uint64_t blk_size_read; @@ -242,7 +247,9 @@ } up(&blk_sem); } +#endif +#if defined(CONFIG_FBFRONT) && defined(CONFIG_KBDFRONT) #define WIDTH 800 #define HEIGHT 600 #define DEPTH 32 @@ -432,6 +439,7 @@ } up(&kbd_sem); } +#endif #ifdef CONFIG_PCIFRONT static struct pcifront_dev *pci_dev; @@ -465,20 +473,26 @@ void shutdown_frontends(void) { +#ifdef CONFIG_NETFRONT down(&net_sem); if (net_dev) shutdown_netfront(net_dev); +#endif +#ifdef CONFIG_BLKFRONT down(&blk_sem); if (blk_dev) shutdown_blkfront(blk_dev); +#endif +#if defined(CONFIG_FBFRONT) && defined(CONFIG_KBDFRONT) if (fb_dev) shutdown_fbfront(fb_dev); down(&kbd_sem); if (kbd_dev) shutdown_kbdfront(kbd_dev); +#endif #ifdef CONFIG_PCIFRONT down(&pci_sem); @@ -487,6 +501,7 @@ #endif } +#ifdef CONFIG_XENBUS static void shutdown_thread(void *p) { DEFINE_WAIT(w); @@ -506,19 +521,30 @@ HYPERVISOR_shutdown(shutdown_reason); } +#endif int app_main(start_info_t *si) { printk("Test main: start_info=%p\n", si); +#ifdef CONFIG_XENBUS create_thread("xenbus_tester", xenbus_tester, si); +#endif create_thread("periodic_thread", periodic_thread, si); +#ifdef CONFIG_NETFRONT create_thread("netfront", netfront_thread, si); +#endif +#ifdef CONFIG_BLKFRONT create_thread("blkfront", blkfront_thread, si); +#endif +#if defined(CONFIG_FBFRONT) && defined(CONFIG_KBDFRONT) create_thread("fbfront", fbfront_thread, si); create_thread("kbdfront", kbdfront_thread, si); +#endif #ifdef CONFIG_PCIFRONT create_thread("pcifront", pcifront_thread, si); #endif +#ifdef CONFIG_XENBUS create_thread("shutdown", shutdown_thread, si); +#endif return 0; } ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [minios] Fix test application link when various fronts are not enabled 2013-01-07 21:47 ` [minios] Fix test application link when various fronts are " Samuel Thibault @ 2013-01-07 21:52 ` Samuel Thibault 0 siblings, 0 replies; 5+ messages in thread From: Samuel Thibault @ 2013-01-07 21:52 UTC (permalink / raw) To: Ian Campbell, xen-devel@lists.xen.org, Keir (Xen.org) Samuel Thibault, le Mon 07 Jan 2013 22:47:09 +0100, a écrit : > Ian Campbell, le Thu 29 Nov 2012 11:08:04 +0000, a écrit : > > On Wed, 2012-11-28 at 20:28 +0000, Samuel Thibault wrote: > > > When pcifront is not enabled, the test application needs to disable the > > > PCI test. > > > > > > Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> > > > > Does something similar apply to the other *front ? > > Right, here is a patch. Ah, wait, there is also the shutdown fix before that, here is patch to be applied on top of it instead. Fix test application link when various fronts are not enabled. When fronts are not enabled, the test application needs to disable the corresponding tests. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> --- a/extras/mini-os/test.c +++ b/extras/mini-os/test.c @@ -45,13 +45,13 @@ #include <xen/features.h> #include <xen/version.h> +#ifdef CONFIG_XENBUS static unsigned int do_shutdown = 0; static unsigned int shutdown_reason; static DECLARE_WAIT_QUEUE_HEAD(shutdown_queue); +#endif -static struct netfront_dev *net_dev; -static struct semaphore net_sem = __SEMAPHORE_INITIALIZER(net_sem, 0); - +#ifdef CONFIG_XENBUS void test_xenbus(void); static void xenbus_tester(void *p) @@ -59,6 +59,7 @@ static void xenbus_tester(void *p) printk("Xenbus tests disabled, because of a Xend bug.\n"); /* test_xenbus(); */ } +#endif static void periodic_thread(void *p) { @@ -72,12 +73,18 @@ static void periodic_thread(void *p) } } +#ifdef CONFIG_NETFRONT +static struct netfront_dev *net_dev; +static struct semaphore net_sem = __SEMAPHORE_INITIALIZER(net_sem, 0); + static void netfront_thread(void *p) { net_dev = init_netfront(NULL, NULL, NULL, NULL); up(&net_sem); } +#endif +#ifdef CONFIG_BLKFRONT static struct blkfront_dev *blk_dev; static struct blkfront_info blk_info; static uint64_t blk_size_read; @@ -246,7 +253,9 @@ static void blkfront_thread(void *p) } up(&blk_sem); } +#endif +#if defined(CONFIG_FBFRONT) && defined(CONFIG_KBDFRONT) #define WIDTH 800 #define HEIGHT 600 #define DEPTH 32 @@ -436,6 +445,7 @@ static void kbdfront_thread(void *p) } up(&kbd_sem); } +#endif #ifdef CONFIG_PCIFRONT static struct pcifront_dev *pci_dev; @@ -469,20 +479,26 @@ static void pcifront_thread(void *p) void shutdown_frontends(void) { +#ifdef CONFIG_NETFRONT down(&net_sem); if (net_dev) shutdown_netfront(net_dev); +#endif +#ifdef CONFIG_BLKFRONT down(&blk_sem); if (blk_dev) shutdown_blkfront(blk_dev); +#endif +#if defined(CONFIG_FBFRONT) && defined(CONFIG_KBDFRONT) if (fb_dev) shutdown_fbfront(fb_dev); down(&kbd_sem); if (kbd_dev) shutdown_kbdfront(kbd_dev); +#endif #ifdef CONFIG_PCIFRONT down(&pci_sem); @@ -491,6 +507,7 @@ void shutdown_frontends(void) #endif } +#ifdef CONFIG_XENBUS void app_shutdown(unsigned reason) { shutdown_reason = reason; @@ -519,19 +536,30 @@ static void shutdown_thread(void *p) HYPERVISOR_shutdown(shutdown_reason); } +#endif int app_main(start_info_t *si) { printk("Test main: start_info=%p\n", si); +#ifdef CONFIG_XENBUS create_thread("xenbus_tester", xenbus_tester, si); +#endif create_thread("periodic_thread", periodic_thread, si); +#ifdef CONFIG_NETFRONT create_thread("netfront", netfront_thread, si); +#endif +#ifdef CONFIG_BLKFRONT create_thread("blkfront", blkfront_thread, si); +#endif +#if defined(CONFIG_FBFRONT) && defined(CONFIG_KBDFRONT) create_thread("fbfront", fbfront_thread, si); create_thread("kbdfront", kbdfront_thread, si); +#endif #ifdef CONFIG_PCIFRONT create_thread("pcifront", pcifront_thread, si); #endif +#ifdef CONFIG_XENBUS create_thread("shutdown", shutdown_thread, si); +#endif return 0; } ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-01-07 21:52 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-11-28 20:28 [minios] Fix test application link when pcifront is not enabled Samuel Thibault 2012-11-29 11:08 ` Ian Campbell 2012-11-29 11:13 ` Samuel Thibault 2013-01-07 21:47 ` [minios] Fix test application link when various fronts are " Samuel Thibault 2013-01-07 21:52 ` Samuel Thibault
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.