mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
tests: Rename PAGE_SIZE definitions
As per POSIX specification of limits.h [1], OS libc may define PAGE_SIZE in limits.h. Self defined PAGE_SIZE is frequently used in tests, to prevent collosion of definition, we give PAGE_SIZE definitons reasonable prefixs. [1]: https://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210118063808.12471-7-jiaxun.yang@flygoat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
2d0fc797fa
commit
d2c4f3841d
6 changed files with 74 additions and 74 deletions
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include "qemu-common.h"
|
||||
|
||||
#define PAGE_SIZE (4096)
|
||||
#define ALLOC_PAGE_SIZE (4096)
|
||||
|
||||
void pc_alloc_init(QGuestAllocator *s, QTestState *qts, QAllocOpts flags)
|
||||
{
|
||||
|
@ -26,7 +26,7 @@ void pc_alloc_init(QGuestAllocator *s, QTestState *qts, QAllocOpts flags)
|
|||
QFWCFG *fw_cfg = pc_fw_cfg_init(qts);
|
||||
|
||||
ram_size = qfw_cfg_get_u64(fw_cfg, FW_CFG_RAM_SIZE);
|
||||
alloc_init(s, flags, 1 << 20, MIN(ram_size, 0xE0000000), PAGE_SIZE);
|
||||
alloc_init(s, flags, 1 << 20, MIN(ram_size, 0xE0000000), ALLOC_PAGE_SIZE);
|
||||
|
||||
/* clean-up */
|
||||
pc_fw_cfg_uninit(fw_cfg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue