From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] igb_uio: fix build error with kernel < 3.2 Date: Mon, 03 Apr 2017 19:48:51 +0200 Message-ID: <5615532.S2nOutNl0d@xps13> References: <20170403164901.13133-1-ferruh.yigit@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org To: Ferruh Yigit Return-path: Received: from mail-wr0-f169.google.com (mail-wr0-f169.google.com [209.85.128.169]) by dpdk.org (Postfix) with ESMTP id 6B37C2BF5 for ; Mon, 3 Apr 2017 19:48:54 +0200 (CEST) Received: by mail-wr0-f169.google.com with SMTP id w43so179164810wrb.0 for ; Mon, 03 Apr 2017 10:48:54 -0700 (PDT) In-Reply-To: <20170403164901.13133-1-ferruh.yigit@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2017-04-03 17:49, Ferruh Yigit: > Recently added "dma_zalloc_coherent()" call is causing build error > for Linux kernels < 3.2. >=20 > compile error: > .../build/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c: > In function =E2=80=98igbuio_pci_probe=E2=80=99: > .../build/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:434:2: > error: implicit declaration of function =E2=80=98dma_zalloc_coherent=E2= =80=99 > [-Werror=3Dimplicit-function-declaration] > map_addr =3D dma_zalloc_coherent(&dev->dev, 1024, > ^ >=20 > dma_zalloc_coherent() introduced with Linux kernel 3.2, with commit > Linux: 842fa69f3e0c ("include/linux/dma-mapping.h: add dma_zalloc_coh= erent()") > Since it does not exist for older kernels, causing a build error. >=20 > Swithched to dma_alloc_coherent() API to prevent build error. >=20 > Fixes: d287e4d41be0 ("igb_uio: map dummy DMA forcing IOMMU domain att= achment") >=20 > Signed-off-by: Ferruh Yigit Applied, thanks