From: "Xueming(Steven) Li" <xuemingl@nvidia.com>
To: NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,
"stable@dpdk.org" <stable@dpdk.org>
Cc: Natanael Copa <ncopa@alpinelinux.org>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
David Marchand <david.marchand@redhat.com>
Subject: Re: [dpdk-stable] [PATCH 20.11] bus/pci: support I/O port operations with musl
Date: Mon, 31 May 2021 11:32:20 +0000 [thread overview]
Message-ID: <DM4PR12MB53736A69853B8BDCE8BFE3B5A13F9@DM4PR12MB5373.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20210528092111.19414-1-thomas@monjalon.net>
Thanks, applied into 20.11 work queue
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Friday, May 28, 2021 5:21 PM
> To: stable@dpdk.org
> Cc: Xueming(Steven) Li <xuemingl@nvidia.com>; Natanael Copa <ncopa@alpinelinux.org>; Andrew Rybchenko
> <andrew.rybchenko@oktetlabs.ru>; David Marchand <david.marchand@redhat.com>
> Subject: [PATCH 20.11] bus/pci: support I/O port operations with musl
>
> [ 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 <ncopa@alpinelinux.org>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Acked-by: David Marchand <david.marchand@redhat.com>
> ---
> 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
prev parent reply other threads:[~2021-05-31 11:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-28 9:21 Thomas Monjalon
2021-05-31 11:32 ` Xueming(Steven) Li [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DM4PR12MB53736A69853B8BDCE8BFE3B5A13F9@DM4PR12MB5373.namprd12.prod.outlook.com \
--to=xuemingl@nvidia.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=david.marchand@redhat.com \
--cc=ncopa@alpinelinux.org \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).