drivers: replace page size definitions with function
authorThomas Monjalon <thomas@monjalon.net>
Thu, 25 Feb 2021 00:07:56 +0000 (01:07 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 23 Mar 2021 07:41:05 +0000 (08:41 +0100)
commit924e6b76342aeb60bd33a7c7a6071ec0aa0dce41
treea6908202ec628e2d800561445c578c0f83e62bd3
parente0473c6d5b18560dd11fd4d7ebc81dea6774f33e
drivers: replace page size definitions with function

The page size is often retrieved from the macro PAGE_SIZE.
If PAGE_SIZE is not defined, it is either using hard coded default,
or getting the system value from the UNIX-only function sysconf().

Such definitions are replaced with the generic function
rte_mem_page_size() defined for each supported OS.

Removing PAGE_SIZE definitions will fix dlb drivers for musl libc,
because #ifdef checks were missing, causing redefinition errors.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Boyer <aboyer@pensando.io>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
26 files changed:
drivers/bus/pci/linux/pci_vfio.c
drivers/bus/vmbus/linux/vmbus_uio.c
drivers/bus/vmbus/private.h
drivers/bus/vmbus/rte_vmbus_reg.h
drivers/bus/vmbus/vmbus_common_uio.c
drivers/crypto/virtio/virtio_pci.h
drivers/event/dlb/dlb.c
drivers/event/dlb/dlb_priv.h
drivers/event/dlb/pf/base/dlb_osdep.h
drivers/event/dlb/pf/dlb_main.h
drivers/event/dlb/pf/dlb_pf.c
drivers/event/dlb2/dlb2_priv.h
drivers/event/dlb2/pf/base/dlb2_osdep.h
drivers/event/dlb2/pf/dlb2_main.h
drivers/event/dlb2/pf/dlb2_pf.c
drivers/net/bnx2x/ecore_fw_defs.h
drivers/net/ionic/ionic_lif.c
drivers/net/ionic/ionic_main.c
drivers/net/ionic/ionic_osdep.h
drivers/net/netvsc/hn_rndis.c
drivers/net/netvsc/hn_rxtx.c
drivers/net/netvsc/hn_var.h
drivers/net/virtio/virtio.h
drivers/net/virtio/virtio_ethdev.c
drivers/net/virtio/virtio_ethdev.h
drivers/vdpa/ifc/ifcvf_vdpa.c