From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6E48FA0487 for ; Thu, 4 Jul 2019 17:30:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BC9351B203; Thu, 4 Jul 2019 17:30:27 +0200 (CEST) Received: from mx1.tetrasec.net (mx1.tetrasec.net [74.117.190.25]) by dpdk.org (Postfix) with ESMTP id 1ED0D5B34 for ; Thu, 4 Jul 2019 17:30:26 +0200 (CEST) Received: from mx1.tetrasec.net (mail.local [127.0.0.1]) by mx1.tetrasec.net (Postfix) with ESMTP id 0C34E9E2B3F; Thu, 4 Jul 2019 15:30:25 +0000 (UTC) Received: from ncopa-desktop.copa.dup.pw (67.63.200.37.customer.cdi.no [37.200.63.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: alpine@tanael.org) by mx1.tetrasec.net (Postfix) with ESMTPSA id 53D699E00E7; Thu, 4 Jul 2019 15:30:23 +0000 (UTC) Date: Thu, 4 Jul 2019 17:30:18 +0200 From: Natanael Copa To: Thomas Monjalon Cc: dev@dpdk.org Message-ID: <20190704173018.0445fe75@ncopa-desktop.copa.dup.pw> In-Reply-To: <2364933.uslMzlRZWI@xps> References: <20190313170657.16688-1-ncopa@alpinelinux.org> <5813741.aTzT6Pizmj@xps> <20190704141639.2334b40d@ncopa-desktop.copa.dup.pw> <2364933.uslMzlRZWI@xps> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-alpine-linux-musl) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 03/15] bus/pci: add fallback for out[lwb]_p for non GNU libc X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 04 Jul 2019 15:20:55 +0200 Thomas Monjalon wrote: > 04/07/2019 14:16, Natanael Copa: > > On Sat, 30 Mar 2019 23:22:27 +0100 > > Thomas Monjalon wrote: > > > > > 13/03/2019 18:06, Natanael Copa: > > > > Add a fallback for non-GNU libc systems like musl libc for the > > > > non-standard functions outl_p, outw_p and outb_p. > > > > > > > > This ifixes the following buildtime errors when building with musl libc: > > > > pci_uio.c:(.text+0xaa1): undefined reference to `outw_p' > > > > pci_uio.c:(.text+0xac5): undefined reference to `outl_p' > > > > pci_uio.c:(.text+0xadf): undefined reference to `outb_p' > > > > > > > > fixes https://bugs.dpdk.org/show_bug.cgi?id=35 > > > > > > Please use this syntax: > > > Bugzilla ID: 35 > > > > Ok. > > > > > > > > [...] > > > > #if defined(RTE_ARCH_X86) > > > > #include > > > > +#if defined(__GLIBC__) > > > > +#define pci_uio_outl_p outl_p > > > > +#define pci_uio_outw_p outw_p > > > > +#define pci_uio_outb_p outb_p > > > > +#else > > > > +static inline void > > > > +pci_uio_outl_p(unsigned int value, unsigned short int port) > > > > +{ > > > > + __asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80" : : "a" (value), > > > > + "Nd" (port)); > > > > +} > > > > + > > > > +static inline void > > > > +pci_uio_outw_p(unsigned short int value, unsigned short int port) > > > > +{ > > > > + __asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80" : : "a" (value), > > > > + "Nd" (port)); > > > > +} > > > > + > > > > +static inline void > > > > +pci_uio_outb_p(unsigned char value, unsigned short int port) > > > > +{ > > > > + __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80" : : "a" (value), > > > > + "Nd" (port)); > > > > +} > > > > +#endif > > > > #endif > > > [...] > > > > #if defined(RTE_ARCH_X86) > > > > - outl_p(*(const uint32_t *)s, reg); > > > > + pci_uio_outl_p(*(const uint32_t *)s, reg); > > > > #else > > > > *(volatile uint32_t *)reg = *(const uint32_t *)s; > > > > #endif > > > > > > Could we manage non-x86 case in the macros pci_uio_out? > > > > I did that in separate commit. Do you want do both in same commit? > > Maybe change the order of commits? That would mean that first commit would use a define or inline that is not yet introduced :) > Anyway I think you need to rebase and resend this series :) I'm on it. Thanks for your feedback. -nc