linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Ulrich Drepper <drepper@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	jbarnes@virtuousgeek.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	lenb@kernel.org, x86@kernel.org, linux-pci@vger.kernel.org
Subject: Re: SNB PCI root information
Date: Thu, 21 Jun 2012 11:11:20 -0700	[thread overview]
Message-ID: <CAE9FiQVncAVLGNDQYxGBxid=_PpLbzouGELHumnqvQ9_d1v3SA@mail.gmail.com> (raw)
In-Reply-To: <CAOPLpQdLSfHn4=zHVYpZMcw1cHPwtV3He-Sxng_yjGKwdpBK8A@mail.gmail.com>

On Thu, Jun 21, 2012 at 9:22 AM, Ulrich Drepper <drepper@gmail.com> wrote:
> On Thu, Jun 21, 2012 at 8:17 AM, Ulrich Drepper <drepper@gmail.com> wrote:
>> On Wed, Jun 20, 2012 at 11:50 PM, Yinghai Lu <yinghai@kernel.org> 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.

yes, but only when you have pci=busnum_node...

i changed grammar to only "busnum_node=..."

>
> 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 <drepper@gmail.com>
>
> 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;

Yes, that would be better.

Thanks

Yinghai

  reply	other threads:[~2012-06-21 18:11 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAOPLpQfUm-2ENkbnYfXEn1nf9FHnaRk3aqQTSTBWb-CsfCUCFA@mail.gmail.com>
2012-06-16  3:03 ` SNB PCI root information Yinghai Lu
2012-06-16  8:52   ` Thomas Gleixner
2012-06-16 19:36     ` Yinghai Lu
2012-06-16 21:56   ` Bjorn Helgaas
2012-06-18 22:30     ` Ulrich Drepper
2012-06-18 23:40       ` Yinghai Lu
2012-06-19 12:36         ` Bjorn Helgaas
2012-06-19 18:20           ` Yinghai Lu
2012-06-20 17:11             ` Ulrich Drepper
2012-06-20 17:17             ` Bjorn Helgaas
2012-06-20 17:59               ` Ulrich Drepper
2012-06-20 18:37                 ` Yinghai Lu
2012-06-20 18:46                 ` Bjorn Helgaas
2012-06-20 19:28                   ` Yinghai Lu
2012-06-20 19:34                     ` Ingo Molnar
2012-06-20 20:04                       ` Ulrich Drepper
2012-06-20 20:16                         ` Bjorn Helgaas
2012-06-20 21:21                           ` Ulrich Drepper
2012-06-20 23:58                         ` Yinghai Lu
2012-06-21  2:37                       ` Yinghai Lu
2012-06-21  3:50                         ` Yinghai Lu
2012-06-21 12:17                           ` Ulrich Drepper
2012-06-21 16:22                             ` Ulrich Drepper
2012-06-21 18:11                               ` Yinghai Lu [this message]
2012-06-25 17:54                                 ` Ulrich Drepper
2012-06-20 19:57                     ` Brice Goglin
2012-06-21  2:43                       ` Yinghai Lu
2012-06-21  5:56                         ` Brice Goglin
2012-06-21 19:24                           ` Yinghai Lu
2012-06-22  7:14                             ` Brice Goglin
2012-06-22 17:28                               ` Yinghai Lu
2012-06-22 20:38                                 ` Brice Goglin
2012-06-22 20:41                                   ` Yinghai Lu
2012-06-25  9:07                                     ` Brice Goglin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAE9FiQVncAVLGNDQYxGBxid=_PpLbzouGELHumnqvQ9_d1v3SA@mail.gmail.com' \
    --to=yinghai@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=drepper@gmail.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).