Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759773Ab2FUQWk (ORCPT ); Thu, 21 Jun 2012 12:22:40 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:36150 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753408Ab2FUQWj convert rfc822-to-8bit (ORCPT ); Thu, 21 Jun 2012 12:22:39 -0400 MIME-Version: 1.0 In-Reply-To: References: <20120620193438.GB2248@gmail.com> From: Ulrich Drepper Date: Thu, 21 Jun 2012 12:22:17 -0400 Message-ID: Subject: Re: SNB PCI root information To: Yinghai Lu Cc: Ingo Molnar , Bjorn Helgaas , jbarnes@virtuousgeek.org, Linux Kernel Mailing List , lenb@kernel.org, x86@kernel.org, linux-pci@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1603 Lines: 60 On Thu, Jun 21, 2012 at 8:17 AM, Ulrich Drepper wrote: > On Wed, Jun 20, 2012 at 11:50 PM, Yinghai Lu wrote: >> please check -v3, and it will add 40 lines. > > Won't this version print out something like > >  PCI: unknown option `busnum_node=xx:yy' It does. If you apply the following patch on top of your version 3 patch it seems to work and is slightly more efficient. Signed-off-by: Ulrich Drepper diff -u b/arch/x86/pci/common.c b/arch/x86/pci/common.c --- b/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -494,16 +494,22 @@ return 0; } +static const char *busnum_node_param; + +static void remember_busnum_node(const char *str) +{ + busnum_node_param = str; +} + int get_user_busnum_node(int busnum) { int bus, node, count; - char *p; + const char *p; - p = strstr(boot_command_line, "busnum_node="); + p = busnum_node_param; if (!p) return -1; - p += 12; /* strlen("busnum_node=") */ while (*p) { count = 0; if (sscanf(p, "%x:%x%n", &bus, &node, &count) != 2) { @@ -607,6 +613,9 @@ } else if (!strcmp(str, "nocrs")) { pci_probe |= PCI_ROOT_NO_CRS; return NULL; + } else if (!strncmp(str, "busnum_node=", 12)) { + remember_busnum_node(str + 12); + return NULL; } else if (!strcmp(str, "earlydump")) { pci_early_dump_regs = 1; return NULL; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/