On 6 October 2016 at 19:41, Dan Kalowsky <dank(a)deadmime.org> wrote:
On Thu, Oct 6, 2016 at 4:06 AM, Tomasz Bursztyka <tomasz.bursztyka(a)linux.intel.com> wrote:
Hi Marcus,
I believe we did not make it const at the beginning due to PCI enumeration on Galileo. This was early days, and things changed then.
Pretty much this was the reason.
Actually there have been plans to move it to const, at least I remember hearing such idea from Daniel Kalowsky, for the same exact reasons you noted, it might even be in the git history, somewhere. But we were too busy to follow up at that time.
I believe we even did a move that changed it to const and then ran into an issue with a specific compiler we were to support and reverted out the change. Might have only been in a local topic branch though.
PCI enumeration currently updates the pci_dev object in the various config structures along with base_addr and irq_num, I propose to move these objects from the config struct to the runtime struct.
Cheers /Marcus
-- "Do you expect me to talk?" "No Mr. Bond, I expect you to die."