From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932780AbcFJMMn (ORCPT ); Fri, 10 Jun 2016 08:12:43 -0400 Received: from mailout2.hostsharing.net ([83.223.90.233]:50031 "EHLO mailout2.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752078AbcFJMMl (ORCPT ); Fri, 10 Jun 2016 08:12:41 -0400 Date: Fri, 10 Jun 2016 14:16:28 +0200 From: Lukas Wunner To: Ingo Molnar Cc: Yinghai Lu , Thomas Gleixner , cmilsted@redhat.com, Rafa?? Mi??ecki , Bjorn Helgaas , "H. Peter Anvin" , Matt Fleming , Peter Zijlstra , Linux Kernel Mailing List , Linus Torvalds , Matthew Garrett , m@bues.ch, "linux-tip-commits@vger.kernel.org" Subject: Re: [tip:x86/urgent] x86/quirks: Add early quirk to reset Apple AirPort card Message-ID: <20160610121628.GA19823@wunner.de> References: <82c2548dffc6cfbc484b9111b1073f407c946061.1464477483.git.lukas@wunner.de> <20160608200929.GA18981@wunner.de> <20160609064803.GA10996@gmail.com> <20160609110424.GA19470@wunner.de> <20160609202036.GA19638@wunner.de> <20160610115845.GA27253@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160610115845.GA27253@gmail.com> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 10, 2016 at 01:58:45PM +0200, Ingo Molnar wrote: > * Yinghai Lu wrote: > > On 6/9/16, Lukas Wunner wrote: > > > Well, the PCI core would also scan such a bus twice AFAICS. > > > And the performance penalty of scanning it twice seems negligible. > > > Early quirks can prevent double execution by setting QFLAG_APPLY_ONCE. > > > (Three quirks have set that flag already.) > > > > > > So I think this shouldn't be a concern. > > > > I don't know. I would like see sth like following, and that is simple > > enough. > > > > --- linux-2.6.orig/arch/x86/kernel/early-quirks.c > > +++ linux-2.6/arch/x86/kernel/early-quirks.c > > @@ -755,10 +755,16 @@ static int __init check_dev_quirk(int nu > > return 0; > > } > > > > +static unsigned char __initdata scanned[256]; > > static void __init early_pci_scan_bus(int bus) > > { > > int slot, func; > > > > + if (scanned[bus]) > > + return; > > + > > + scanned[bus] = 1; > > + > > /* Poor man's PCI discovery */ > > for (slot = 0; slot < 32; slot++) > > for (func = 0; func < 8; func++) { > > Ok, I removed the fix from tip:x86/urgent from the time being - could you > guys please send a full version once a final approach is agreed upon? IMHO the above patch to prevent double scanning isn't needed and less code is usually better. So my suggestion would be the patch as originally sent plus the delta fix I sent yesterday, either squashed or applied separately. Since Yinghai Lu seems to disagree I guess you as the maintainer will have to make a decision. :-) Thanks, Lukas