mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Tony Luck <tony.luck@intel.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Yinghai Lu <yinghai@kernel.org>, Jiang Liu <liuj97@gmail.com>,
	Myron Stowe <myron.stowe@redhat.com>
Subject: Re: [Alternative 2][PATCH] ACPI / PCI: Set root bridge ACPI handle in advance
Date: Fri, 04 Jan 2013 12:38:35 +0100	[thread overview]
Message-ID: <1832392.tD5dEjQMy4@vostro.rjw.lan> (raw)
In-Reply-To: <20130104010038.GA11155@google.com>

On Thursday, January 03, 2013 06:00:38 PM Bjorn Helgaas wrote:
> On Thu, Jan 03, 2013 at 11:56:55PM +0100, Rafael J. Wysocki wrote:
> 
> > OK, I now have sent no less than three working version of the patch that fixes
> > the current code which _is_ insane.  You haven't even responded to the last
> > one, but for the first two the reason why you didn't like them was something
> > similar to "it may conflict with some future changes I'm planning".  Well,
> > that might be used to reject prety much any change and I'm not considering it
> > as a good enough reason for blocking a fix.  Sorry about that.
> 
> I think your memory is faulty.  My response to the first
> (https://lkml.org/lkml/2012/12/20/407) was "Thanks for cleaning this up, I
> have an interface concern, here's an outline of a possible alternative."
> 
> My response to the second (https://lkml.org/lkml/2012/12/26/72) was "I like
> this much better, Acked-by: Bjorn Helgaas."  Then Yinghai noticed the issue
> with non-ACPI host bridges, and you abandoned that approach.

I thought it was helpelss, but I was clearly wrong.  I should have spent more
time on figuring out why it failed, so thank for taking the time to do that.

> I took a few days of vacation, then spent the better part of yesterday
> exploring the reasons why x86 and ia64 don't use the "parent" argument when
> several other arches do, and worked up a patch
> (https://lkml.org/lkml/2013/1/2/285).  It turned out to have a fatal flaw,
> but was done in good faith.

I know.

> It's true I haven't responded to the third one, posted about 12 hours ago.

Oh, that's a simple patch. ;-)

But you're right, I should be more patient.  Sorry about that.

> I still like the approach of the second patch.  What would you think
> of the following incremental change to it?

I'm fine with it.

> I did reproduce Yinghai's
> issue with non-ACPI host bridges, and this change resolves it for me.

If you don't mind, I'll fold the patch below into

https://patchwork.kernel.org/patch/1910181/

and post the complete patch.

Thanks,
Rafael


> diff -u b/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
> --- b/arch/x86/pci/acpi.c
> +++ b/arch/x86/pci/acpi.c
> @@ -522,6 +522,7 @@
>  	sd = &info->sd;
>  	sd->domain = domain;
>  	sd->node = node;
> +	sd->acpi_handle = device->handle;
>  	/*
>  	 * Maybe the desired pci bus has been already scanned. In such case
>  	 * it is unnecessary to scan the pci bus with the given domain,busnum.
> @@ -596,9 +597,8 @@
>  int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge)
>  {
>  	struct pci_sysdata *sd = bridge->bus->sysdata;
> -	struct pci_root_info *info = container_of(sd, struct pci_root_info, sd);
>  
> -	ACPI_HANDLE_SET(&bridge->dev, info->bridge->handle);
> +	ACPI_HANDLE_SET(&bridge->dev, sd->acpi_handle);
>  	return 0;
>  }
>  
> --- a/arch/x86/include/asm/pci.h
> +++ b/arch/x86/include/asm/pci.h
> @@ -14,6 +14,7 @@
>  struct pci_sysdata {
>  	int		domain;		/* PCI domain */
>  	int		node;		/* NUMA node */
> +	void		*acpi_handle;
>  #ifdef CONFIG_X86_64
>  	void		*iommu;		/* IOMMU private data */
>  #endif
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  reply	other threads:[~2013-01-04 11:33 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-16 22:25 [PATCH] " Rafael J. Wysocki
2012-12-17  5:27 ` Yinghai Lu
2012-12-17  7:51   ` Rafael J. Wysocki
2012-12-17  8:09     ` Yinghai Lu
2012-12-17 12:13       ` Rafael J. Wysocki
2012-12-17 12:20 ` [Update][PATCH] " Rafael J. Wysocki
2012-12-17 17:24   ` Yinghai Lu
2012-12-17 23:13     ` Rafael J. Wysocki
2012-12-17 18:44   ` Greg Kroah-Hartman
2012-12-17 23:14     ` Rafael J. Wysocki
2012-12-17 23:30   ` [Update 2][PATCH] " Rafael J. Wysocki
2012-12-20 21:13     ` Bjorn Helgaas
2012-12-20 21:19       ` H. Peter Anvin
2012-12-20 22:56       ` Rafael J. Wysocki
2012-12-21  0:25         ` Bjorn Helgaas
2012-12-25 22:42           ` [Alternative][PATCH] " Rafael J. Wysocki
2012-12-26 18:14             ` Bjorn Helgaas
2012-12-26 22:35               ` Rafael J. Wysocki
2012-12-26 20:04             ` Yinghai Lu
2012-12-26 20:10               ` Bjorn Helgaas
2012-12-26 20:16                 ` Yinghai Lu
2012-12-26 20:41                   ` Yinghai Lu
2012-12-26 22:36                     ` Rafael J. Wysocki
2012-12-27  0:10                       ` Yinghai Lu
2012-12-27 12:47                         ` Rafael J. Wysocki
2012-12-27 13:31                           ` Rafael J. Wysocki
2012-12-27 21:25                             ` Rafael J. Wysocki
2012-12-27 21:32             ` [Alternative 2][PATCH] " Rafael J. Wysocki
2013-01-02 23:07               ` Bjorn Helgaas
2013-01-03  0:40                 ` Rafael J. Wysocki
2013-01-03 12:11                   ` Rafael J. Wysocki
2013-01-03 21:23                     ` Rafael J. Wysocki
2013-01-03 22:13                       ` Bjorn Helgaas
2013-01-03 22:56                         ` Rafael J. Wysocki
2013-01-04  1:00                           ` Bjorn Helgaas
2013-01-04 11:38                             ` Rafael J. Wysocki [this message]
2013-01-05  0:03                               ` Yinghai Lu
2013-01-05  0:14                                 ` Rafael J. Wysocki
2013-01-05  0:19                                   ` Yinghai Lu
2013-01-05  0:36                                     ` Bjorn Helgaas
2013-01-05  0:54                                       ` Rafael J. Wysocki
2013-01-03 20:44                 ` Rafael J. Wysocki
2013-01-09 21:33             ` [Alternative][PATCH] ACPI / PCI: Set root bridge ACPI handle in advance, v2 Rafael J. Wysocki
2013-01-09 22:16               ` Bjorn Helgaas
2013-01-09 23:06                 ` Rafael J. Wysocki
2013-01-09 23:27                   ` Yinghai Lu
2013-01-10  0:05                     ` Rafael J. Wysocki
2013-01-11 21:53                       ` Rafael J. Wysocki
2013-01-11 23:01                         ` Yinghai Lu
2013-01-10 22:54                   ` Yinghai Lu
2013-01-10 23:40                     ` Rafael J. Wysocki
2013-01-11 12:27                       ` Rafael J. Wysocki

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=1832392.tD5dEjQMy4@vostro.rjw.lan \
    --to=rjw@sisk.pl \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=liuj97@gmail.com \
    --cc=myron.stowe@redhat.com \
    --cc=tony.luck@intel.com \
    --cc=yinghai@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

all inboxes | Powered by JetHome®