From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D4E82A0547 for ; Fri, 28 May 2021 11:21:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B307C40040; Fri, 28 May 2021 11:21:32 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by mails.dpdk.org (Postfix) with ESMTP id 5AFD940040 for ; Fri, 28 May 2021 11:21:31 +0200 (CEST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 85A4E5C0067; Fri, 28 May 2021 05:21:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 28 May 2021 05:21:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm1; bh=hz16ig9ENDcURW6hBNScwvTSWF JXsYzB58VzC0Ae2s4=; b=XtSVLq5DmdE2CPzLCbCNHxzBgqw2LY9jLMRmsXdUOu mP06/vQglfY6p33fCX3fsQ0D/SNTLYN4uKAbfsVNu4EHlvKecU8PwAKhD3wraPLf SD0cAI85TnmaYWQBFjrnPaCc+RBMUvStDHFBdfK4v5sMKbS4Ol6POardzAljPE6D 2o0NMqM9jsSc99ltlY3CMdy3sKwJD/0xuLWnfld8hGkcTq424ROmdBzil+A2QLw5 otKkrwPqyL2A/g2koPysGWTv1z/4lv9j6R2K167V81/MHSVhw5AChsOdvTkkv2dZ F8p5t/VUvzDjTFqTu7exD03Z0oxZfoImDIc2Repi6lQA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=hz16ig9ENDcURW6hB NScwvTSWFJXsYzB58VzC0Ae2s4=; b=osWnOAsrVrCibZgjMJIoGYMdPBSnC4Dxy RkNA3/t4A6SMeJYp6b/ytGv7iJNqicTMLdydFkBdHutElUe4kdVvohFcGaTwSIgQ UCLDrWGsyBCDl/LGZpajiKzVbL5f8iuj6czHJ3m14F6+OnN46OMkCd2W/DQScxng sev6ayYkrQXspx0wS5Qe5GPQ60+zTgEuJEbvH0Oc370nAXUtaCVEbohiUgeiYH8V RbRNkKrhldmOHP8JKPWvKXKJgtbXr8ssbEKNSVzSpi4oWjvia1ltcKqDFTgZ/PaC atRg3amDNbfDbie8SuEw5rJH0m8qHyyNhjyH/HCaryz++m2m0k7kw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdekjedgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgrshcu ofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecuggftrf grthhtvghrnhepvdelvdduhedvudduveeuvdevheegudelgeeigfejheduhedttdegudff jeeihffgnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhn rdhnvght X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 28 May 2021 05:21:28 -0400 (EDT) From: Thomas Monjalon To: stable@dpdk.org Cc: xuemingl@nvidia.com, Natanael Copa , Andrew Rybchenko , David Marchand Date: Fri, 28 May 2021 11:21:11 +0200 Message-Id: <20210528092111.19414-1-thomas@monjalon.net> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH 20.11] bus/pci: support I/O port operations with musl X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" [ upstream commit 204a7f44bc457b2c75c9eeb56468214664c830f0 ] Add a fallback for non-GNU libc systems like musl libc for the non-standard functions outl_p, outw_p and outb_p. It solves the following errors when building with musl libc: pci_uio.c: undefined reference to 'outw_p' pci_uio.c: undefined reference to 'outl_p' pci_uio.c: undefined reference to 'outb_p' Bugzilla ID: 35 Fixes: 756ce64b1ecd ("eal: introduce PCI ioport API") Cc: stable@dpdk.org Reported-by: Natanael Copa Signed-off-by: Thomas Monjalon Acked-by: Andrew Rybchenko Acked-by: David Marchand --- drivers/bus/pci/linux/pci_uio.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/bus/pci/linux/pci_uio.c b/drivers/bus/pci/linux/pci_uio.c index f3305a2f28..624b2e2ecf 100644 --- a/drivers/bus/pci/linux/pci_uio.c +++ b/drivers/bus/pci/linux/pci_uio.c @@ -535,21 +535,33 @@ pci_uio_ioport_write(struct rte_pci_ioport *p, if (len >= 4) { size = 4; #if defined(RTE_ARCH_X86) +#ifdef __GLIBC__ outl_p(*(const uint32_t *)s, reg); +#else + outl(*(const uint32_t *)s, reg); +#endif #else *(volatile uint32_t *)reg = *(const uint32_t *)s; #endif } else if (len >= 2) { size = 2; #if defined(RTE_ARCH_X86) +#ifdef __GLIBC__ outw_p(*(const uint16_t *)s, reg); +#else + outw(*(const uint16_t *)s, reg); +#endif #else *(volatile uint16_t *)reg = *(const uint16_t *)s; #endif } else { size = 1; #if defined(RTE_ARCH_X86) +#ifdef __GLIBC__ outb_p(*s, reg); +#else + outb(*s, reg); +#endif #else *(volatile uint8_t *)reg = *s; #endif -- 2.31.1