]> rtime.felk.cvut.cz Git - jailhouse.git/blobdiff - hypervisor/include/jailhouse/printk.h
Merge remote-tracking branch 'kiszka/master'
[jailhouse.git] / hypervisor / include / jailhouse / printk.h
index 38423adc989d6a8b99269f33cbf6fd26a8195ab3..c226352ccc80cbc275666b07e47b0c26f3eb45ef 100644 (file)
  * the COPYING file in the top-level directory.
  */
 
-#include <asm/types.h>
+#include <jailhouse/types.h>
 
 extern volatile unsigned long panic_in_progress;
-extern unsigned int panic_cpu;
+extern unsigned long panic_cpu;
 
 void printk(const char *fmt, ...);
 
 void panic_printk(const char *fmt, ...);
 
+#ifdef CONFIG_TRACE_ERROR
+#define trace_error(code) ({                                             \
+       printk("%s:%d: returning error %s\n", __FILE__, __LINE__, #code); \
+       code;                                                             \
+})
+#else /* !CONFIG_TRACE_ERROR */
+#define trace_error(code)      code
+#endif /* !CONFIG_TRACE_ERROR */
+
 void arch_dbg_write_init(void);
 void arch_dbg_write(const char *msg);