[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180319183734.GA77194@bhelgaas-glaptop.roam.corp.google.com>
Date: Mon, 19 Mar 2018 13:37:34 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Lukas Wunner <lukas@...ner.de>
Cc: Christoph Hellwig <hch@...radead.org>, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org,
"Rafael J. Wysocki" <rjw@...ysocki.net>, linux-pm@...r.kernel.org,
Keith Busch <keith.busch@...el.com>,
Sinan Kaya <okaya@...eaurora.org>,
Frederick Lawler <fred@...dlawl.com>
Subject: Re: [PATCH v2 08/13] PCI/portdrv: Simplify PCIe feature permission
checking
On Mon, Mar 12, 2018 at 03:20:59PM +0100, Lukas Wunner wrote:
> On Mon, Mar 12, 2018 at 09:03:16AM -0500, Bjorn Helgaas wrote:
> > On Mon, Mar 12, 2018 at 01:04:02AM -0700, Christoph Hellwig wrote:
> > > > + * We assume we can manage these PCIe features. Some systems may
> > > > + * reserve these for use by the platform itself, e.g., an ACPI BIOS
> > > > + * may implement its own AER handling and use _OSC to prevent the
> > > > + * OS from interfering.
> > > > + */
> > > > + bridge->use_aer = 1;
> > > > + bridge->use_hotplug = 1;
> > > > + bridge->use_pme = 1;
> > >
> > > If we start out with enabled maybe these should be disable_foo flags
> > > instead?
> >
> > I went back and forth on that. "disable_foo" is nice because the
> > default value is correct (zero means enabled). But then you end up
> > with things like:
> >
> > if (pcie_ports_native || !host->disable_hotplug)
> >
> > where the "!host->disable_hotplug" is a double negative, and I have a
> > really hard time reading that.
>
> native_hotplug or, if you want it reversed, platform_hotplug
> (or firmware_hotplug?) might improve readability.
Thanks, I like that. I renamed them to "native_aer", etc.
Powered by blists - more mailing lists