From 292c8e50d540735c601886acc13eb0c117ee94f8 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 29 Mar 2013 01:08:15 +0000 Subject: virtio-scsi: create VirtIOSCSICommon This patch refactors existing virtio-scsi code into VirtIOSCSICommon in order to allow virtio_scsi_init_common() to be used by both internal virtio_scsi_init() and external vhost-scsi-pci code. Cc: Michael S. Tsirkin Cc: Asias He Signed-off-by: Paolo Bonzini --- include/qemu/osdep.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/qemu/osdep.h') diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index df24400..8b465fd 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -67,6 +67,10 @@ typedef signed int int_fast16_t; #define MAX(a, b) (((a) > (b)) ? (a) : (b)) #endif +#ifndef ROUND_UP +#define ROUND_UP(n,d) (((n) + (d) - 1) & -(d)) +#endif + #ifndef DIV_ROUND_UP #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) #endif -- cgit v1.1