lkml.org 
[lkml]   [2017]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] Add new uio device for PCI with dynamic memory allocation
Date
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 not there anymore, so I have to use
> > pci_alloc_irq_vectors(). Doing tests with my PCIe HW I had some
> > problems with masking the legacy IRQs. Probably uio_pci_generic
> > suffers from the same problems.
> >
> > Can someone tell me how to properly handle legacy and MSI
> > interrupts in irqhandler()? Or should I implement a irqcontrol()
> > function?
> >
>
> These questions about above my pay grade. I've never used the code, I
> just do mechanical reviews. I'm not certain who to ask either...
>

Alright. I checked again your comments. Some are copy&paste from the
other drivers, but I can improve this. Some cannot be changed:

1) continue instead of break:
Actually size=0 makes no sense for the maps, so open() and release()
take this as abort condition (see also uio_dmem_genirq.c). The parser
continues in that case, but we could break there as well.

2) char * const buf = kstrdup(uio_dmem_sizes, GFP_KERNEL);
Since buf is a const pointer, it has to be set during declaration.
Also I'd like to keep it const.

I will post another patch set without MSI (just the same functionality
as in uio_pci_generic) and then try to add MSI(X) support to both.

Regards,
Manuel
\
 
 \ /
  Last update: 2017-10-04 11:39    [W:0.083 / U:0.072 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site