Re: [PATCH v4] Add new uio device for PCI with dynamic memory allocation

2020-04-29 Thread Stahl, Manuel
On Mi, 2020-04-29 at 11:41 +0200, gre...@linuxfoundation.org wrote: > On Wed, Apr 29, 2020 at 07:51:01AM +0000, Stahl, Manuel wrote: > > On Di, 2020-04-28 at 15:54 +0200, gregkh @ linuxfoundation . org wrote: > > > On Thu, Apr 16, 2020 at 06:38:30PM +0200,

Re: [PATCH v4] Add new uio device for PCI with dynamic memory allocation

2020-04-29 Thread Stahl, Manuel
On Di, 2020-04-28 at 15:54 +0200, gregkh @ linuxfoundation . org wrote: > On Thu, Apr 16, 2020 at 06:38:30PM +0200, Manuel Stahl wrote: > > > > + * > > + * Since the driver does not declare any device ids, you must allocate > > + * id and bind the device to the driver yourself. For example: > > +

Re: [PATCH v4] Add new uio device for PCI with dynamic memory allocation

2020-04-28 Thread Stahl, Manuel
On Di, 2020-04-28 at 15:54 +0200, greg k-h wrote: > On Thu, Apr 16, 2020 at 06:38:30PM +0200, Manuel Stahl wrote: > > This device combines the uio_pci_generic driver and the uio_dmem_genirq > > driver since PCI uses a slightly different API for interrupts. > > A fixed number of DMA capable memory r

Re: [PATCH 2/2] uio: Prefer MSI(X) interrupts in PCI drivers

2020-03-04 Thread Stahl, Manuel
on.org wrote: > > On Fri, Oct 06, 2017 at 07:57:00AM -0700, Stephen Hemminger wrote: > > > On Fri, 6 Oct 2017 13:50:44 + > > > "Stahl, Manuel" wrote: > > > > > > > MSI(X) interrupts are not shared between devices. So when available > >

Re: [PATCH 2/2] uio: Prefer MSI(X) interrupts in PCI drivers

2017-10-20 Thread Stahl, Manuel
Hi Greg, it just uses MSI-X or MSI when available and falls back to legacy IRQ otherwise. Regards, Manuel On Fr, 2017-10-20 at 14:50 +0200, gre...@linuxfoundation.org wrote: > On Fri, Oct 06, 2017 at 07:57:00AM -0700, Stephen Hemminger wrote: > > On Fri, 6 Oct 2017 13:50:44 +0000 &

Re: [PATCH 2/2] uio: Prefer MSI(X) interrupts in PCI drivers

2017-10-06 Thread Stahl, Manuel
MSI(X) interrupts are not shared between devices. So when available those should be preferred over legacy interrupts. Signed-off-by: Manuel Stahl ---  drivers/uio/uio_pci_dmem_genirq.c | 27 ---  drivers/uio/uio_pci_generic.c | 24 ++--  2 files chang

[PATCH 2/2] uio: Prefer MSI(X) interrupts in PCI drivers

2017-10-06 Thread Stahl, Manuel
Signed-off-by: Manuel Stahl ---  drivers/uio/uio_pci_dmem_genirq.c | 27 ---  drivers/uio/uio_pci_generic.c | 24 ++--  2 files changed, 38 insertions(+), 13 deletions(-) diff --git a/drivers/uio/uio_pci_dmem_genirq.c b/drivers/uio/uio_pci_dmem_geni

[PATCH 1/2 v3] Add new uio device for PCI with dynamic memory allocation

2017-10-06 Thread Stahl, Manuel
This device combines the uio_pci_generic driver and the uio_dmem_genirq driver since PCI uses a slightly different API for interrupts. A fixed number of DMA capable memory regions can be defined using the module parameter "dmem_sizes". The memory is not allocated until the uio device file is opened

Re: [PATCH v2] Add new uio device for PCI with dynamic memory allocation

2017-10-04 Thread Stahl, Manuel
From 51081d316eb3078bf9ded4335fb6f5167e1ec93d Mon Sep 17 00:00:00 2001 From: Manuel Stahl Date: Mon, 2 Oct 2017 16:23:19 +0200 Subject: [PATCH] Add new uio device for PCI with dynamic memory allocation This device combines the uio_pci_generic driver and the uio_dmem_genirq driver since PCI uses a

Re: [PATCH] Add new uio device for PCI with dynamic memory allocation

2017-10-04 Thread Stahl, Manuel
On Mi, 2017-10-04 at 10:59 +0300, Dan Carpenter wrote: > On Wed, Oct 04, 2017 at 07:24:49AM +0000, Stahl, Manuel wrote: > > Hi Dan. Thanks for your comments. I can fix all of those. > > Probably there is also some upgrade needed for the MSI stuff. > > pci_disable_msi() is no

Re: [PATCH] Add new uio device for PCI with dynamic memory allocation

2017-10-04 Thread Stahl, Manuel
nts below. > > On Mon, Oct 02, 2017 at 03:02:09PM +0000, Stahl, Manuel wrote: > > +static int open(struct uio_info *info, struct inode *inode) > > +{ > > + struct uio_pci_dmem_dev *priv = to_uio_pci_dmem_dev(info); > > + struct uio_mem *uiomem; > > + i

[PATCH] Add new uio device for PCI with dynamic memory allocation

2017-10-02 Thread Stahl, Manuel
This device combines the uio_pci_generic driver and the uio_dmem_genirq driver since PCI uses a slightly different API for interrupts. A fixed number of DMA capable memory regions can be defined using the module parameter "dmem_sizes". The memory is not allocated until the uio device file is opened