[dpdk-dev] [PATCH v15 4/7] bus/pci: implement sigbus handler ops
Thomas Monjalon
thomas at monjalon.net
Mon Oct 15 15:41:26 CEST 2018
15/10/2018 13:27, Jeff Guo:
> This patch implements the ops for the PCI bus sigbus handler. It finds the
> PCI device that is being hot-unplugged and calls the relevant ops of the
> hot-unplug handler to handle the hot-unplug failure of the device.
>
> Signed-off-by: Jeff Guo <jia.guo at intel.com>
> Acked-by: Shaopeng He <shaopeng.he at intel.com>
> Acked-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
> ---
> v15->v14:
> fix compling issue.
> ---
> +static struct rte_pci_device *
> +pci_find_device_by_addr(const void *failure_addr)
> +{
> + struct rte_pci_device *pdev = NULL;
> + uint64_t check_point, start, end, len;
> + int i;
> +
> + check_point = (uint64_t)(uintptr_t)failure_addr;
> +
> + FOREACH_DEVICE_ON_PCIBUS(pdev) {
> + for (i = 0; i != RTE_DIM(pdev->mem_resource); i++) {
> + start = (uint64_t)(uintptr_t)pdev->mem_resource[i].addr;
> + len = pdev->mem_resource[i].len;
> + end = (uint64_t)(uintptr_t)RTE_PTR_ADD(start, len);
When compiling for 32-bit, there is an error:
cast to pointer from integer of different size
start is not a pointer.
I think it must be replaced by a simple addition.
end = start + len;
More information about the dev
mailing list