From: Huawei Xie Date: Tue, 8 Mar 2016 15:33:40 +0000 (+0800) Subject: pci: use new compiler flag for x86 X-Git-Tag: spdx-start~7519 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b00eca4e5cbd353368a5387e300345872c84486f;p=dpdk.git pci: use new compiler flag for x86 Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu Acked-by: David Marchand Signed-off-by: Thomas Monjalon --- diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c index 77e9cb3eb6..2d16d782d8 100644 --- a/lib/librte_eal/bsdapp/eal/eal_pci.c +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c @@ -51,7 +51,7 @@ #include #include -#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) +#if defined(RTE_ARCH_X86) #include #include #endif @@ -491,7 +491,7 @@ rte_eal_pci_ioport_map(struct rte_pci_device *dev, int bar, int ret; switch (dev->kdrv) { -#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) +#if defined(RTE_ARCH_X86) case RTE_KDRV_NIC_UIO: if ((uintptr_t) dev->mem_resource[bar].addr <= UINT16_MAX) { p->base = (uintptr_t)dev->mem_resource[bar].addr; @@ -515,7 +515,7 @@ static void pci_uio_ioport_read(struct rte_pci_ioport *p, void *data, size_t len, off_t offset) { -#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) +#if defined(RTE_ARCH_X86) uint8_t *d; int size; unsigned short reg = p->base + offset; @@ -557,7 +557,7 @@ static void pci_uio_ioport_write(struct rte_pci_ioport *p, const void *data, size_t len, off_t offset) { -#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) +#if defined(RTE_ARCH_X86) const uint8_t *s; int size; unsigned short reg = p->base + offset; @@ -601,7 +601,7 @@ rte_eal_pci_ioport_unmap(struct rte_pci_ioport *p) int ret; switch (p->dev->kdrv) { -#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) +#if defined(RTE_ARCH_X86) case RTE_KDRV_NIC_UIO: ret = 0; break; diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 364f303cdc..8aafd519fd 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -50,7 +50,7 @@ #include #include #include -#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) +#if defined(RTE_ARCH_X86) #include #endif @@ -712,7 +712,7 @@ rte_eal_mcfg_complete(void) int rte_eal_iopl_init(void) { -#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) +#if defined(RTE_ARCH_X86) if (iopl(3) != 0) return -1; return 0; diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index 4c45452067..d2e8a09e4a 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -543,7 +543,7 @@ int rte_eal_pci_write_config(const struct rte_pci_device *device, } } -#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) +#if defined(RTE_ARCH_X86) static int pci_ioport_map(struct rte_pci_device *dev, int bar __rte_unused, struct rte_pci_ioport *p) @@ -622,7 +622,7 @@ rte_eal_pci_ioport_map(struct rte_pci_device *dev, int bar, ret = pci_uio_ioport_map(dev, bar, p); break; default: -#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) +#if defined(RTE_ARCH_X86) /* special case for x86 ... */ ret = pci_ioport_map(dev, bar, p); #else @@ -652,7 +652,7 @@ rte_eal_pci_ioport_read(struct rte_pci_ioport *p, pci_uio_ioport_read(p, data, len, offset); break; default: -#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) +#if defined(RTE_ARCH_X86) /* special case for x86 ... */ pci_uio_ioport_read(p, data, len, offset); #endif @@ -675,7 +675,7 @@ rte_eal_pci_ioport_write(struct rte_pci_ioport *p, pci_uio_ioport_write(p, data, len, offset); break; default: -#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) +#if defined(RTE_ARCH_X86) /* special case for x86 ... */ pci_uio_ioport_write(p, data, len, offset); #endif @@ -701,7 +701,7 @@ rte_eal_pci_ioport_unmap(struct rte_pci_ioport *p) ret = pci_uio_ioport_unmap(p); break; default: -#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) +#if defined(RTE_ARCH_X86) /* special case for x86 ... nothing to do */ ret = 0; #else diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c index db22d31ed2..068694dcf4 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c @@ -39,7 +39,7 @@ #include #include -#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) +#if defined(RTE_ARCH_X86) #include #endif @@ -372,7 +372,7 @@ int pci_uio_ioport_map(struct rte_pci_device *dev, int bar, struct rte_pci_ioport *p) { -#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) +#if defined(RTE_ARCH_X86) char dirname[PATH_MAX]; char filename[PATH_MAX]; int uio_num; @@ -424,7 +424,7 @@ void pci_uio_ioport_read(struct rte_pci_ioport *p, void *data, size_t len, off_t offset) { -#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) +#if defined(RTE_ARCH_X86) uint8_t *d; int size; unsigned short reg = p->base + offset; @@ -453,7 +453,7 @@ void pci_uio_ioport_write(struct rte_pci_ioport *p, const void *data, size_t len, off_t offset) { -#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) +#if defined(RTE_ARCH_X86) const uint8_t *s; int size; unsigned short reg = p->base + offset; @@ -482,7 +482,7 @@ int pci_uio_ioport_unmap(struct rte_pci_ioport *p) { RTE_SET_USED(p); -#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) +#if defined(RTE_ARCH_X86) /* FIXME close intr fd ? */ return 0; #else