[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170315025549.GA13191@bhelgaas-glaptop.roam.corp.google.com>
Date: Tue, 14 Mar 2017 21:55:49 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Andi Kleen <andi@...stfloor.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Andi Kleen <ak@...ux.intel.com>, bhelgaas@...gle.com,
x86@...nel.org, linux-pci@...r.kernel.org, eranian@...gle.com,
Peter Zijlstra <peterz@...radead.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/4] x86, pci: Add interface to force mmconfig
On Tue, Mar 14, 2017 at 07:24:14PM -0700, Andi Kleen wrote:
> > I agree that it should be fairly safe to do ECAM/MMCONFIG without
> > locking. Can we handle the decision part by adding a "lockless" bit
> > to struct pci_ops? Old ops don't mention that bit, so it will be
> > initialized to zero and we'll do locking as today. ECAM/MMCONFIG ops
> > can set it and we can skip the locking.
>
> That's what my other patch already did.
Yes, your 1/4 patch does add the "ll_allowed" bit in struct pci_ops.
What I was wondering, but didn't explain very well, was whether
instead of setting that bit at run-time in pci_mmcfg_arch_init(), we
could set it statically in the pci_ops definition, e.g.,
static struct pci_ops ecam_ops = {
.lockless = 1,
.read = ecam_read,
.write = ecam_write,
};
I think it would be easier to read if the lockless-ness were declared
right next to the accessors that need it (or don't need it).
But it is a little confusing with all the different paths, at least on
x86, so maybe it wouldn't be quite that simple.
Bjorn
Powered by blists - more mailing lists