Re: Implementation details of PCI Managed (devres) Functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tejun,

On Thu, 2023-11-09 at 08:52 -1000, Tejun Heo wrote:
> Hello, Philipp.
> 
> On Wed, Nov 08, 2023 at 10:02:29PM +0100, Philipp Stanner wrote:
> ...
> > That struct keeps track of the requested BARs. That's why there can
> > only be one mapping per BAR, because that table is statically
> > allocated
> > and is indexed with the bar-number.
> > pcim_iomap_table() now only ever returns the table with the
> > pointers to
> > the BARs. Adding tables to that struct that keep track of which
> > mappings exist in which bars would be a bit tricky and require
> > probably
> > an API change for everyone who currently uses pcim_iomap_table(),
> > and
> > that's more than 100 C-files.
> > 
> > So, it seems that a concern back in 2007 was to keep things simple
> > and
> > skip the more complex data structures necessary for keeping track
> > of
> > the various mappings within a bar.
> 
> It was so long ago that I don't remember much but I do remember
> taking a
> shortcut there for convenience / simplicity. I'm sure it's already
> clear but
> there's no deeper reason, so if you wanna put in the work to make it
> consistent, that'd be great.
> 

Alright, it's good to know that there seems to be no functional or
semantic reason or something behind it.

I'll think it through. Maybe we can design something clever

P.


> Thanks.
> 





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux