[PATCH v2 09/18] pci: Add config for Enhanced Allocation
Bin Meng
bmeng.cn at gmail.com
Fri Apr 22 09:44:50 CEST 2022
On Thu, Apr 14, 2022 at 3:59 PM Andrew Scull <ascull at google.com> wrote:
>
> On Thu, 14 Apr 2022 at 01:42, Bin Meng <bmeng.cn at gmail.com> wrote:
> >
> > On Thu, Apr 14, 2022 at 12:30 AM Andrew Scull <ascull at google.com> wrote:
> > >
> > > > > diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
> > > > > index 47cd074aa1..fd2203420c 100644
> > > > > --- a/drivers/pci/Kconfig
> > > > > +++ b/drivers/pci/Kconfig
> > > > > @@ -67,6 +67,13 @@ config PCI_SRIOV
> > > > > if available on a PCI Physical Function device and probe for
> > > > > applicable drivers.
> > > > >
> > > > > +config PCI_ENHANCED_ALLOCATION
> > > > > + bool "Enable support for Enhanced Allocation of resources"
> > > > > + default y
> > > > > + help
> > > > > + Enable support for Enhanced Allocation which can be used by supported
> > > > > + devices in place of traditional BARS for allocation of resources.
> > > > > +
> > > >
> > > > Why do we need a config option for EA as it can be figured out in the run time?
> > >
> > > I wanted to have the option to disable the logic for handling EA at
> > > runtime. A glance at the code suggested there's a whole other rabbit
> > > hole of missing safety checks that I've opted to leave for another
> > > day.
> >
> > We cannot have a single global option to work for one device using EA
> > but another device using BAR.
>
> Sorry, I don't understand what you mean. This config will just mean
> the u-boot doesn't look for, or handle, the EA capability; it disables
> u-boot's support for this feature. If a system relies on EA, they'll
> need to have it enabled which is the default state. If a system
> doesn't then it can be turned off and the suspect logic disabled.
>
> Could you help me understand your concern?
I was thinking of 2 PCI devices, one uses the normal BAR mechanism
while the other one uses the EA. In such a case, this config option is
mandated to be turned on. I just see no value in providing a config
option while it can be determined at runtime.
Is that for footprint or some other concern why you wanted to introduce it?
Regards,
Bin
More information about the U-Boot
mailing list