From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Date: Thu, 2 May 2019 11:24:53 +0200 Subject: [U-Boot] [PATCH v2 45/50] Revert "pci: Scale MAX_PCI_REGIONS based on CONFIG_NR_DRAM_BANKS" In-Reply-To: References: <20190426035922.20596-1-sjg@chromium.org> <20190426035922.20596-46-sjg@chromium.org> Message-ID: <20190502092452.GA30634@ulmo> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, May 02, 2019 at 12:09:49AM +0800, Bin Meng wrote: > +Thierry > > On Fri, Apr 26, 2019 at 12:00 PM Simon Glass wrote: > > > > This reverts commit aec4298ccb337106fd0115b91d846a022fdf301d. > > > > Unfortunately this has a dramatic impact on the pre-relocation memory > > used on x86 platforms (increasing it by 2KB) since it increases the > > overhead for each PCI device from 220 bytes to 412 bytes. > > > > The offending line is in UCLASS_DRIVER(pci): > > > > .per_device_auto_alloc_size = sizeof(struct pci_controller), > > > > This means that all PCI devices have the controller struct associated > > with them. The solution is to move the regions[] member out of the array, > > makes its size dynamic, or split UCLASS_PCI into controllers and > > non-controllers, as the comment suggests. > > > > For now, revert the commit to get things running again. > > > > Signed-off-by: Simon Glass > > --- > > > > Changes in v2: None > > > > include/pci.h | 6 +----- > > 1 file changed, 1 insertion(+), 5 deletions(-) > > > > Reviewed-by: Bin Meng Ugh... so we're trading one regression for another? Can we not live with the 2 KiB increase on x86 until this has been properly fixed? Currently this will cause Jetson TX2 to crash if it starts using PCI. Thierry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: