#define cpu_up(x) (-EOPNOTSUPP)
#endif
-#ifdef CONFIG_SMP
-#endif
static int __do_suspend(void *ignore)
{
int i, j;
suspend_record_t *suspend_record;
- /* Hmmm... a cleaner interface to suspend/resume blkdevs would be nice. */
- /* XXX SMH: yes it would :-( */
-
#ifdef CONFIG_XEN_USB_FRONTEND
extern void usbif_resume();
#else
#if defined(CONFIG_SMP) && !defined(CONFIG_HOTPLUG_CPU)
if (num_online_cpus() > 1) {
- printk(KERN_WARNING "Can't suspend SMP guests without CONFIG_HOTPLUG_CPU\n");
+ printk(KERN_WARNING
+ "Can't suspend SMP guests without CONFIG_HOTPLUG_CPU\n");
return -EOPNOTSUPP;
}
#endif
#define DEBUG 0
#if 1
-#define ERR(_f, _a...) fprintf ( stderr, _f , ## _a ); fflush(stderr)
+#define ERR(_f, _a...) do { fprintf ( stderr, _f , ## _a ); fflush(stderr); } while(0)
#else
#define ERR(_f, _a...) ((void)0)
#endif
#if DEBUG
-#define DPRINTF(_f, _a...) fprintf ( stdout, _f , ## _a ); fflush(stdout)
+#define DPRINTF(_f, _a...) do { fprintf ( stdout, _f , ## _a ); fflush(stdout); } while (0)
#else
#define DPRINTF(_f, _a...) ((void)0)
#endif
struct mmuext_op pin[MAX_PIN_BATCH];
unsigned int nr_pins = 0;
- DPRINTF("xc_linux_restore start\n");
+ DPRINTF("xc_linux_restore start: nr_pfns = %lx\n", nr_pfns);
if (mlock(&ctxt, sizeof(ctxt))) {
/* needed for when we do the build dom0 op,
err = xc_domain_memory_increase_reservation(xc_handle, dom,
nr_pfns * PAGE_SIZE / 1024);
if (err != 0) {
+ ERR("Failed to increate reservation by %lx\n",
+ nr_pfns * PAGE_SIZE / 1024);
errno = ENOMEM;
goto out;
}