[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 12/20] exec: use macro ROUND_UP for alignment
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 12/20] exec: use macro ROUND_UP for alignment |
Date: |
Wed, 12 Aug 2015 15:37:05 +0200 |
From: Chen Hanxiao <address@hidden>
Use ROUND_UP instead.
Signed-off-by: Chen Hanxiao <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
exec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/exec.c b/exec.c
index 0a4a0c5..54cd70a 100644
--- a/exec.c
+++ b/exec.c
@@ -1210,7 +1210,7 @@ static void *file_ram_alloc(RAMBlock *block,
unlink(filename);
g_free(filename);
- memory = (memory+hpagesize-1) & ~(hpagesize-1);
+ memory = ROUND_UP(memory, hpagesize);
/*
* ftruncate is not supported by hugetlbfs in older
--
2.4.3
- [Qemu-devel] [PULL 02/20] scsi-disk: fix cmd.mode field typo, (continued)
- [Qemu-devel] [PULL 02/20] scsi-disk: fix cmd.mode field typo, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 01/20] virtio-scsi: use virtqueue_map_sg() when loading requests, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 04/20] scsi-disk: Fix assertion failure on WRITE SAME, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 05/20] virtio-scsi-test: Add test case for tail unaligned WRITE SAME, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 06/20] vhost/scsi: call vhost_dev_cleanup() at unrealize() time, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 08/20] cpu_defs: Simplify CPUTLB padding logic, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 09/20] configure: Default to enable module build, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 07/20] cpu-exec: Do not invalidate original TB in cpu_exec_nocache(), Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 10/20] exec: drop cpu_can_do_io, just read cpu->can_do_io, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 11/20] rcu: Allow calling rcu_(un)register_thread() during synchronize_rcu(), Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 12/20] exec: use macro ROUND_UP for alignment,
Paolo Bonzini <=
- [Qemu-devel] [PULL 14/20] qemu-nbd: remove unnecessary qemu_notify_event(), Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 15/20] configure: only add CONFIG_RDMA to config-host.h once, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 13/20] vhost-scsi: Clarify vhost_virtqueue_mask argument, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 16/20] scsi: create restart bottom half in the right AioContext, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 18/20] scsi-generic: identify AIO callbacks more clearly, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 17/20] scsi-disk: identify AIO callbacks more clearly, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 20/20] disas: Defeature print_target_address, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 19/20] hw: fix mask for ColdFire UART command register, Paolo Bonzini, 2015/08/12
- Re: [Qemu-devel] [PULL 00/20] SCSI, build, TCG, RCU, misc patches for 2015-08-12, Peter Maydell, 2015/08/13