* [dpdk-dev] [Bug 35] Does not compile with musl libc: drivers/bus/pci/linux/pci_uio.c
@ 2018-05-03 10:33 bugzilla
0 siblings, 0 replies; only message in thread
From: bugzilla @ 2018-05-03 10:33 UTC (permalink / raw)
To: dev
https://dpdk.org/tracker/show_bug.cgi?id=35
Bug ID: 35
Summary: Does not compile with musl libc:
drivers/bus/pci/linux/pci_uio.c
Product: DPDK
Version: 18.05
Hardware: All
OS: All
Status: CONFIRMED
Severity: normal
Priority: Normal
Component: ethdev
Assignee: dev@dpdk.org
Reporter: dpdk@stormmq.com
Target Milestone: ---
This does not compile on X86 because it assumes the presence of the glibc-only
functions `outl_p`, `outw_p` and `outb_p`. This can be fixed reliably for all c
libraries and operating systems by simply importing our own definitions, viz:-
```
#if defined(RTE_ARCH_X86)
#include <sys/io.h>
// Used in pci_uio_ioport_write, these functions are present in glibc
// in <sys/io.h> (without the pci_uio_ prefix) but not in the
// musl lib c.
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));
}
```
And then prefixing the usages of the glibc-only functions with `pci_uio_`, eg
`outl_p` becomes `pci_uio_outlw_p`.
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-05-03 10:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-03 10:33 [dpdk-dev] [Bug 35] Does not compile with musl libc: drivers/bus/pci/linux/pci_uio.c bugzilla
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).