[U-Boot] [PATCH v4 3/4] Revert "pci: Scale MAX_PCI_REGIONS based on CONFIG_NR_DRAM_BANKS"
Bin Meng
bmeng.cn at gmail.com
Wed May 8 04:43:23 UTC 2019
On Wed, May 8, 2019 at 11:41 AM Simon Glass <sjg at chromium.org> 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.
>
> Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
>
> include/pci.h | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
applied to u-boot-x86, thanks!
More information about the U-Boot
mailing list