Re: [dpdk-dev] [PATCH v6 2/2] bus/pci: support MMIO in PCI ioport accessors

2021-02-21 Thread 谢华伟(此时此刻)
On 2021/2/19 16:52, Ferruh Yigit wrote: On 2/9/2021 2:51 PM, Ferruh Yigit wrote: On 1/29/2021 3:18 AM, 谢华伟(此时此刻) wrote: From: "huawei.xhw" With IO BAR, we get PIO(programmed IO) address. With MMIO BAR, we get mapped virtual address. We distinguish PIO(Programmed IO) and MMIO(memory mapped I

Re: [dpdk-dev] [PATCH v6 2/2] bus/pci: support MMIO in PCI ioport accessors

2021-02-19 Thread Ferruh Yigit
On 2/9/2021 2:51 PM, Ferruh Yigit wrote: On 1/29/2021 3:18 AM, 谢华伟(此时此刻) wrote: From: "huawei.xhw" With IO BAR, we get PIO(programmed IO) address. With MMIO BAR, we get mapped virtual address. We distinguish PIO(Programmed IO) and MMIO(memory mapped IO) by their address like how kernel does.

Re: [dpdk-dev] [PATCH v6 2/2] bus/pci: support MMIO in PCI ioport accessors

2021-02-18 Thread David Marchand
On Wed, Feb 17, 2021 at 3:15 PM 谢华伟(此时此刻) wrote: > > > On 2021/2/17 17:06, David Marchand wrote: > > On Fri, Jan 29, 2021 at 4:19 AM 谢华伟(此时此刻) > > wrote: > >> @@ -517,6 +525,60 @@ > >> } > >> #endif > >> > >> +static inline uint8_t ioread8(void *addr) > >> +{ > >> + uint8_t val; > >> +

Re: [dpdk-dev] [PATCH v6 2/2] bus/pci: support MMIO in PCI ioport accessors

2021-02-17 Thread 谢华伟(此时此刻)
On 2021/2/17 17:06, David Marchand wrote: On Fri, Jan 29, 2021 at 4:19 AM 谢华伟(此时此刻) wrote: @@ -517,6 +525,60 @@ } #endif +static inline uint8_t ioread8(void *addr) +{ + uint8_t val; + + val = (uint64_t)(uintptr_t)addr >= PIO_MAX ? + *(volatile uint8_t *)addr : +

Re: [dpdk-dev] [PATCH v6 2/2] bus/pci: support MMIO in PCI ioport accessors

2021-02-17 Thread David Marchand
On Fri, Jan 29, 2021 at 4:19 AM 谢华伟(此时此刻) wrote: > @@ -517,6 +525,60 @@ > } > #endif > > +static inline uint8_t ioread8(void *addr) > +{ > + uint8_t val; > + > + val = (uint64_t)(uintptr_t)addr >= PIO_MAX ? > + *(volatile uint8_t *)addr : > + inb((unsigned

Re: [dpdk-dev] [PATCH v6 2/2] bus/pci: support MMIO in PCI ioport accessors

2021-02-09 Thread Ferruh Yigit
On 1/29/2021 3:18 AM, 谢华伟(此时此刻) wrote: From: "huawei.xhw" With IO BAR, we get PIO(programmed IO) address. With MMIO BAR, we get mapped virtual address. We distinguish PIO(Programmed IO) and MMIO(memory mapped IO) by their address like how kernel does. ioread/write8/16/32 is provided to access

Re: [dpdk-dev] [PATCH v6 2/2] bus/pci: support MMIO in PCI ioport accessors

2021-02-03 Thread Maxime Coquelin
On 1/29/21 4:18 AM, 谢华伟(此时此刻) wrote: > |From: "huawei.xhw" With IO BAR, we get > PIO(programmed IO) address. With MMIO BAR, we get mapped virtual > address. We distinguish PIO(Programmed IO) and MMIO(memory mapped IO) by > their address like how kernel does. ioread/write8/16/32 is provided to >

[dpdk-dev] [PATCH v6 2/2] bus/pci: support MMIO in PCI ioport accessors

2021-01-28 Thread 谢华伟(此时此刻)
From: "huawei.xhw" With IO BAR, we get PIO(programmed IO) address. With MMIO BAR, we get mapped virtual address. We distinguish PIO(Programmed IO) and MMIO(memory mapped IO) by their address like how kernel does. ioread/write8/16/32 is provided to access PIO/MMIO. By the way, for virtio on arch