eal: fix build for 32-bit system
authorMichael Qiu <michael.qiu@intel.com>
Wed, 10 Dec 2014 10:46:41 +0000 (18:46 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 11 Dec 2014 00:42:02 +0000 (01:42 +0100)
commit3736db4f9581d64acafd33c5a6533c00104aae0e
tree29bacbaac0ffd3dabc1c5a01efed46e58662ffb8
parent3a52e64742c370bebc465b91f3197d940d5738cd
eal: fix build for 32-bit system

lib/librte_eal/linuxapp/eal/eal_memory.c:324:4: error: comparison
is always false due to limited range of data type [-Werror=type-limits]
    || (hugepage_sz == RTE_PGSIZE_16G)) {
    ^

This was introuduced by commit b77b5639:
        mem: add huge page sizes for IBM Power

The root cause is that size_t is 32-bit in i686 platform,
but RTE_PGSIZE_16M and RTE_PGSIZE_16G are always 64-bit.

Force hugepage_sz to always 64-bit to avoid this issue.

Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Suggested-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
lib/librte_eal/common/eal_common_memory.c
lib/librte_eal/common/eal_internal_cfg.h
lib/librte_eal/common/include/rte_memory.h
lib/librte_eal/common/include/rte_memzone.h
lib/librte_eal/linuxapp/eal/eal_memory.c