linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the final tree (pci tree related)
@ 2012-06-12  4:54 Stephen Rothwell
  2012-06-12 15:31 ` Bjorn Helgaas
  0 siblings, 1 reply; 13+ messages in thread
From: Stephen Rothwell @ 2012-06-12  4:54 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-next, linux-kernel, Yinghai Lu, David S. Miller, sparclinux

[-- Attachment #1: Type: text/plain, Size: 1375 bytes --]

Hi all,

After merging the final tree, today's linux-next build (sparc64 defconfig)
failed like this:

arch/sparc/kernel/pci.c: In function 'pci_scan_one_pbm':
arch/sparc/kernel/pci.c:689:21: error: 'struct pci_pbm_info' has no member named 'pci_last_busn'

Caused by commit 2c7f691b032b ("sparc/PCI: register busn_res for root buses").

I have added the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 12 Jun 2012 14:48:39 +1000
Subject: [PATCH] sparc/PCI: fix typo

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/sparc/kernel/pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index 74e4bf3..4f92a9a 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -686,7 +686,7 @@ struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm,
 	pci_add_resource_offset(&resources, &pbm->mem_space,
 				pbm->mem_space.start);
 	pbm->busn.start = pbm->pci_first_busno;
-	pbm->busn.end	= pbm->pci_last_busn;
+	pbm->busn.end	= pbm->pci_last_busno;
 	pbm->busn.flags	= IORESOURCE_BUS;
 	pci_add_resource(&resources, &pbm->busn);
 	bus = pci_create_root_bus(parent, pbm->pci_first_busno, pbm->pci_ops,
-- 
1.7.10.280.gaa39

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: linux-next: build failure after merge of the final tree (pci tree related)
  2012-06-12  4:54 linux-next: build failure after merge of the final tree (pci tree related) Stephen Rothwell
@ 2012-06-12 15:31 ` Bjorn Helgaas
  2012-06-13  0:50   ` Stephen Rothwell
  0 siblings, 1 reply; 13+ messages in thread
From: Bjorn Helgaas @ 2012-06-12 15:31 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Yinghai Lu, David S. Miller, sparclinux

On Mon, Jun 11, 2012 at 10:54 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> After merging the final tree, today's linux-next build (sparc64 defconfig)
> failed like this:
>
> arch/sparc/kernel/pci.c: In function 'pci_scan_one_pbm':
> arch/sparc/kernel/pci.c:689:21: error: 'struct pci_pbm_info' has no member named 'pci_last_busn'
>
> Caused by commit 2c7f691b032b ("sparc/PCI: register busn_res for root buses").
>
> I have added the following patch for today:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 12 Jun 2012 14:48:39 +1000
> Subject: [PATCH] sparc/PCI: fix typo
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/sparc/kernel/pci.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
> index 74e4bf3..4f92a9a 100644
> --- a/arch/sparc/kernel/pci.c
> +++ b/arch/sparc/kernel/pci.c
> @@ -686,7 +686,7 @@ struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm,
>        pci_add_resource_offset(&resources, &pbm->mem_space,
>                                pbm->mem_space.start);
>        pbm->busn.start = pbm->pci_first_busno;
> -       pbm->busn.end   = pbm->pci_last_busn;
> +       pbm->busn.end   = pbm->pci_last_busno;
>        pbm->busn.flags = IORESOURCE_BUS;
>        pci_add_resource(&resources, &pbm->busn);
>        bus = pci_create_root_bus(parent, pbm->pci_first_busno, pbm->pci_ops,

Thanks, I folded this typo fix into the relevant patch.  I'll rebase
"next" today.  Sorry for the trouble.

Bjorn
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: linux-next: build failure after merge of the final tree (pci tree related)
  2012-06-12 15:31 ` Bjorn Helgaas
@ 2012-06-13  0:50   ` Stephen Rothwell
  2012-06-13 23:20     ` Bjorn Helgaas
  0 siblings, 1 reply; 13+ messages in thread
From: Stephen Rothwell @ 2012-06-13  0:50 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-next, linux-kernel, Yinghai Lu, David S. Miller, sparclinux

[-- Attachment #1: Type: text/plain, Size: 443 bytes --]

Hi Bjorn,

On Tue, 12 Jun 2012 09:31:49 -0600 Bjorn Helgaas <bhelgaas@google.com> wrote:
>
> Thanks, I folded this typo fix into the relevant patch.  I'll rebase
> "next" today.  Sorry for the trouble.

I am not sure what you have done, but now you have a set of duplicated
commits in your tree including both versions of the one that caused the
build failure.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: linux-next: build failure after merge of the final tree (pci tree related)
  2012-06-13  0:50   ` Stephen Rothwell
@ 2012-06-13 23:20     ` Bjorn Helgaas
  0 siblings, 0 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2012-06-13 23:20 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Yinghai Lu, David S. Miller, sparclinux

On Tue, Jun 12, 2012 at 6:50 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Bjorn,
>
> On Tue, 12 Jun 2012 09:31:49 -0600 Bjorn Helgaas <bhelgaas@google.com> wrote:
>>
>> Thanks, I folded this typo fix into the relevant patch.  I'll rebase
>> "next" today.  Sorry for the trouble.
>
> I am not sure what you have done, but now you have a set of duplicated
> commits in your tree including both versions of the one that caused the
> build failure.

This is because of my inept git usage.  I think my "next" branch ended
up with the right bits in it, but the history looked strange because I
fixed the typo in the Yinghai branch, but had a second branch that
depended on the original unfixed branch.

I rebuilt my "next" branch again and I think it's more
straightforward.  And I learned a tiny bit more about git, so thanks
for pointing this out.

Bjorn

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: linux-next: build failure after merge of the final tree (pci tree related)
  2011-12-09 20:02         ` Luck, Tony
@ 2011-12-12 20:53           ` Jesse Barnes
  0 siblings, 0 replies; 13+ messages in thread
From: Jesse Barnes @ 2011-12-12 20:53 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Bjorn Helgaas, Stephen Rothwell, linux-next, linux-kernel,
	David S. Miller

[-- Attachment #1: Type: text/plain, Size: 566 bytes --]

On Fri, 9 Dec 2011 12:02:48 -0800
"Luck, Tony" <tony.luck@intel.com> wrote:

> > Sigh, I'm sorry.  Attached are the incremental patch to fix this, and
> > an updated version of the original patch.  I'm not git-smart enough to
> > push it this time (the box where I normally do that is down at the
> > moment, along with my notes).
> 
> Bjorn,
> 
> Thanks - the incremental patch works great.

Thanks, just applied it (by hand) to the linux-next branch.  Hopefully
I didn't botch it...

Thanks,
-- 
Jesse Barnes, Intel Open Source Technology Center

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: linux-next: build failure after merge of the final tree (pci tree related)
  2011-12-09  3:53       ` Bjorn Helgaas
@ 2011-12-09 20:02         ` Luck, Tony
  2011-12-12 20:53           ` Jesse Barnes
  0 siblings, 1 reply; 13+ messages in thread
From: Luck, Tony @ 2011-12-09 20:02 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Stephen Rothwell, Jesse Barnes, linux-next, linux-kernel,
	David S. Miller

> Sigh, I'm sorry.  Attached are the incremental patch to fix this, and
> an updated version of the original patch.  I'm not git-smart enough to
> push it this time (the box where I normally do that is down at the
> moment, along with my notes).

Bjorn,

Thanks - the incremental patch works great.

-Tony

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: linux-next: build failure after merge of the final tree (pci tree related)
  2011-12-08 19:01     ` Tony Luck
@ 2011-12-09  3:53       ` Bjorn Helgaas
  2011-12-09 20:02         ` Luck, Tony
  0 siblings, 1 reply; 13+ messages in thread
From: Bjorn Helgaas @ 2011-12-09  3:53 UTC (permalink / raw)
  To: Tony Luck
  Cc: Stephen Rothwell, Jesse Barnes, linux-next, linux-kernel,
	David S. Miller

[-- Attachment #1: Type: text/plain, Size: 966 bytes --]

On Thu, Dec 8, 2011 at 12:01 PM, Tony Luck <tony.luck@intel.com> wrote:
> ia64 builds are failing to build next-20111208
>
>
> arch/ia64/pci/pci.c: In function ‘add_window’:
> arch/ia64/pci/pci.c:321: error: ‘struct acpi_resource’ has no member
> named ‘flags’
> arch/ia64/pci/pci.c:322: error: ‘struct acpi_resource’ has no member named ‘end’
> arch/ia64/pci/pci.c:322: error: ‘struct acpi_resource’ has no member
> named ‘start’
>
> problem from this commit
>
>
> commit ab57d8e403c084bf5bacae31d6bc14bef9b75a22
> Author: Bjorn Helgaas <bhelgaas@google.com>
> Date:   Fri Oct 28 16:26:31 2011 -0600
>
>    ia64/PCI: convert to pci_create_root_bus() for correct root bus resources
>
> -Tony

Sigh, I'm sorry.  Attached are the incremental patch to fix this, and
an updated version of the original patch.  I'm not git-smart enough to
push it this time (the box where I normally do that is down at the
moment, along with my notes).

Bjorn

[-- Attachment #2: patch.ia64-incremental --]
[-- Type: application/octet-stream, Size: 741 bytes --]

commit fac11d4f966fbf965b2047579074cf10ea53d2b8
Author: Bjorn Helgaas <bhelgaas@google.com>
Date:   Thu Dec 8 20:16:13 2011 -0700

diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index a848fad..5eed74c 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -318,8 +318,8 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data)
 
 	/* HP's firmware has a hack to work around a Windows bug.
 	 * Ignore these tiny memory ranges */
-	if (!((res->flags & IORESOURCE_MEM) &&
-	      (res->end - res->start < 16)))
+	if (!((window->resource.flags & IORESOURCE_MEM) &&
+	      (window->resource.end - window->resource.start < 16)))
 		pci_add_resource(&info->resources, &window->resource);
 
 	return AE_OK;

[-- Attachment #3: patch.ia64-pci-convert-to-pci_create --]
[-- Type: application/octet-stream, Size: 3497 bytes --]

commit 369a31032dc120060ebbfb5b5b95e37e1db448a5
Author: Bjorn Helgaas <bhelgaas@google.com>
Date:   Tue Oct 11 11:25:30 2011 -0600

    ia64/PCI: convert to pci_create_root_bus() for correct root bus resources
    
    Convert from pci_create_bus() to pci_create_root_bus().  This way the root
    bus resources are correct immediately.  This fixes the problem of "early"
    and "header" quirks seeing incorrect root bus resources.
    
    We can't use pci_scan_root_bus() because, like x86, ACPI hotplug currently
    requires pci_bus_add_devices() in a separate host bridge .start() method.
    
    CC: Tony Luck <tony.luck@intel.com>
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index 04f2fd9..5eed74c 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -134,6 +134,7 @@ alloc_pci_controller (int seg)
 struct pci_root_info {
 	struct acpi_device *bridge;
 	struct pci_controller *controller;
+	struct list_head resources;
 	char *name;
 };
 
@@ -315,24 +316,13 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data)
 				 &window->resource);
 	}
 
-	return AE_OK;
-}
+	/* HP's firmware has a hack to work around a Windows bug.
+	 * Ignore these tiny memory ranges */
+	if (!((window->resource.flags & IORESOURCE_MEM) &&
+	      (window->resource.end - window->resource.start < 16)))
+		pci_add_resource(&info->resources, &window->resource);
 
-static void __devinit
-pcibios_setup_root_windows(struct pci_bus *bus, struct pci_controller *ctrl)
-{
-	int i;
-
-	pci_bus_remove_resources(bus);
-	for (i = 0; i < ctrl->windows; i++) {
-		struct resource *res = &ctrl->window[i].resource;
-		/* HP's firmware has a hack to work around a Windows bug.
-		 * Ignore these tiny memory ranges */
-		if ((res->flags & IORESOURCE_MEM) &&
-		    (res->end - res->start < 16))
-			continue;
-		pci_bus_add_resource(bus, res, 0);
-	}
+	return AE_OK;
 }
 
 struct pci_bus * __devinit
@@ -343,6 +333,7 @@ pci_acpi_scan_root(struct acpi_pci_root *root)
 	int bus = root->secondary.start;
 	struct pci_controller *controller;
 	unsigned int windows = 0;
+	struct pci_root_info info;
 	struct pci_bus *pbus;
 	char *name;
 	int pxm;
@@ -359,11 +350,10 @@ pci_acpi_scan_root(struct acpi_pci_root *root)
 		controller->node = pxm_to_node(pxm);
 #endif
 
+	INIT_LIST_HEAD(&info.resources);
 	acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window,
 			&windows);
 	if (windows) {
-		struct pci_root_info info;
-
 		controller->window =
 			kmalloc_node(sizeof(*controller->window) * windows,
 				     GFP_KERNEL, controller->node);
@@ -387,9 +377,12 @@ pci_acpi_scan_root(struct acpi_pci_root *root)
 	 * should handle the case here, but it appears that IA64 hasn't
 	 * such quirk. So we just ignore the case now.
 	 */
-	pbus = pci_create_bus(NULL, bus, &pci_root_ops, controller);
-	if (!pbus)
+	pbus = pci_create_root_bus(NULL, bus, &pci_root_ops, controller,
+				   &info.resources);
+	if (!pbus) {
+		pci_free_resource_list(&info.resources);
 		return NULL;
+	}
 
 	pbus->subordinate = pci_scan_child_bus(pbus);
 	return pbus;
@@ -507,14 +500,10 @@ pcibios_fixup_bus (struct pci_bus *b)
 	if (b->self) {
 		pci_read_bridge_bases(b);
 		pcibios_fixup_bridge_resources(b->self);
-	} else {
-		pcibios_setup_root_windows(b, b->sysdata);
 	}
 	list_for_each_entry(dev, &b->devices, bus_list)
 		pcibios_fixup_device_resources(dev);
 	platform_pci_fixup_bus(b);
-
-	return;
 }
 
 void __devinit

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: linux-next: build failure after merge of the final tree (pci tree related)
  2011-12-07 20:24   ` Stephen Rothwell
@ 2011-12-08 19:01     ` Tony Luck
  2011-12-09  3:53       ` Bjorn Helgaas
  0 siblings, 1 reply; 13+ messages in thread
From: Tony Luck @ 2011-12-08 19:01 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Bjorn Helgaas, Jesse Barnes, linux-next, linux-kernel, David S. Miller

ia64 builds are failing to build next-20111208


arch/ia64/pci/pci.c: In function ‘add_window’:
arch/ia64/pci/pci.c:321: error: ‘struct acpi_resource’ has no member
named ‘flags’
arch/ia64/pci/pci.c:322: error: ‘struct acpi_resource’ has no member named ‘end’
arch/ia64/pci/pci.c:322: error: ‘struct acpi_resource’ has no member
named ‘start’

problem from this commit


commit ab57d8e403c084bf5bacae31d6bc14bef9b75a22
Author: Bjorn Helgaas <bhelgaas@google.com>
Date:   Fri Oct 28 16:26:31 2011 -0600

    ia64/PCI: convert to pci_create_root_bus() for correct root bus resources

-Tony

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: linux-next: build failure after merge of the final tree (pci tree related)
  2011-12-07 15:08 ` Bjorn Helgaas
  2011-12-07 15:25   ` Bjorn Helgaas
@ 2011-12-07 20:24   ` Stephen Rothwell
  2011-12-08 19:01     ` Tony Luck
  1 sibling, 1 reply; 13+ messages in thread
From: Stephen Rothwell @ 2011-12-07 20:24 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Jesse Barnes, linux-next, linux-kernel, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 637 bytes --]

Hi Bjorn,

On Wed, 7 Dec 2011 08:08:43 -0700 Bjorn Helgaas <bhelgaas@google.com> wrote:
>
> Thanks for doing that, sorry for the trouble.  I don't have a set of
> cross-compilers, unfortunately, but I will inspect the rest manually.
> Do we have to discover problems one-by-one, or can you tell us about
> any other arch build problems at the same time?

Well, I only have time to do a couple of arches by hand during the day,
but overnight we build almost all arches - see
http://kisskb.ellerman.id.au/linux-next .

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: linux-next: build failure after merge of the final tree (pci tree related)
  2011-12-07 15:25   ` Bjorn Helgaas
@ 2011-12-07 17:13     ` Jesse Barnes
  0 siblings, 0 replies; 13+ messages in thread
From: Jesse Barnes @ 2011-12-07 17:13 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Stephen Rothwell, linux-next, linux-kernel, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 1598 bytes --]

On Wed, 7 Dec 2011 08:25:39 -0700
Bjorn Helgaas <bhelgaas@google.com> wrote:

> On Wed, Dec 7, 2011 at 8:08 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> > On Tue, Dec 6, 2011 at 11:05 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >> Hi all,
> >>
> >> After merging the final tree, today's linux-next build (sparc64 defconfig)
> >> failed like this:
> >>
> >> arch/sparc/kernel/pci.c: In function 'pci_scan_one_pbm':
> >> arch/sparc/kernel/pci.c:697:7: error: incompatible type for argument 5 of 'pci_create_root_bus'
> >> include/linux/pci.h:665:17: note: expected 'struct list_head *' but argument is of type 'struct list_head'
> >>
> >> Caused by commit fa3cec8aff53 ("sparc/PCI: convert to pci_create_root_bus
> >> ()"). Same typo as for the powerpc tree. :-(  Please double check the
> >> rest of those changes, please.
> >>
> >> I applied the following patch for today.
> >
> > Thanks for doing that, sorry for the trouble.  I don't have a set of
> > cross-compilers, unfortunately, but I will inspect the rest manually.
> > Do we have to discover problems one-by-one, or can you tell us about
> > any other arch build problems at the same time?
> 
> I checked the rest manually and didn't find any similar problems.
> 
> The corrected patch attached (same as with Stephen's fixup) is
> attached.  Also available
> at git://github.com/bjorn-helgaas/linux.git on the "pci-scan-v5"
> branch as c0cab2621d0cf75e86fbbad44d0b2b84c3a42f97)

Squashed the fix into the original patch.  Thanks guys.

-- 
Jesse Barnes, Intel Open Source Technology Center

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: linux-next: build failure after merge of the final tree (pci tree related)
  2011-12-07 15:08 ` Bjorn Helgaas
@ 2011-12-07 15:25   ` Bjorn Helgaas
  2011-12-07 17:13     ` Jesse Barnes
  2011-12-07 20:24   ` Stephen Rothwell
  1 sibling, 1 reply; 13+ messages in thread
From: Bjorn Helgaas @ 2011-12-07 15:25 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Jesse Barnes, linux-next, linux-kernel, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 1353 bytes --]

On Wed, Dec 7, 2011 at 8:08 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> On Tue, Dec 6, 2011 at 11:05 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>> Hi all,
>>
>> After merging the final tree, today's linux-next build (sparc64 defconfig)
>> failed like this:
>>
>> arch/sparc/kernel/pci.c: In function 'pci_scan_one_pbm':
>> arch/sparc/kernel/pci.c:697:7: error: incompatible type for argument 5 of 'pci_create_root_bus'
>> include/linux/pci.h:665:17: note: expected 'struct list_head *' but argument is of type 'struct list_head'
>>
>> Caused by commit fa3cec8aff53 ("sparc/PCI: convert to pci_create_root_bus
>> ()"). Same typo as for the powerpc tree. :-(  Please double check the
>> rest of those changes, please.
>>
>> I applied the following patch for today.
>
> Thanks for doing that, sorry for the trouble.  I don't have a set of
> cross-compilers, unfortunately, but I will inspect the rest manually.
> Do we have to discover problems one-by-one, or can you tell us about
> any other arch build problems at the same time?

I checked the rest manually and didn't find any similar problems.

The corrected patch attached (same as with Stephen's fixup) is
attached.  Also available
at git://github.com/bjorn-helgaas/linux.git on the "pci-scan-v5"
branch as c0cab2621d0cf75e86fbbad44d0b2b84c3a42f97)

Bjorn

[-- Attachment #2: patch.pci-host-bridge-sparc --]
[-- Type: application/octet-stream, Size: 2211 bytes --]

commit 18313d0924b61febfbc17ff19f07fea422a38534
Author: Bjorn Helgaas <bhelgaas@google.com>
Date:   Mon Oct 10 18:14:49 2011 -0600

    sparc/PCI: convert to pci_create_root_bus()
    
    Convert from pci_create_bus() to pci_create_root_bus().  This way the root
    bus resources are correct immediately.  This patch doesn't fix a problem
    because sparc fixed the resources before scanning the bus, but it makes
    sparc more consistent with other architectures.
    
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    Acked-by: David S. Miller <davem@davemloft.net>

diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index 31111e3..49dedf2 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -685,23 +685,25 @@ static void __devinit pci_bus_register_of_sysfs(struct pci_bus *bus)
 struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm,
 					    struct device *parent)
 {
+	LIST_HEAD(resources);
 	struct device_node *node = pbm->op->dev.of_node;
 	struct pci_bus *bus;
 
 	printk("PCI: Scanning PBM %s\n", node->full_name);
 
-	bus = pci_create_bus(parent, pbm->pci_first_busno, pbm->pci_ops, pbm);
+	pci_add_resource(&resources, &pbm->io_space);
+	pci_add_resource(&resources, &pbm->mem_space);
+	bus = pci_create_root_bus(parent, pbm->pci_first_busno, pbm->pci_ops,
+				  pbm, &resources);
 	if (!bus) {
 		printk(KERN_ERR "Failed to create bus for %s\n",
 		       node->full_name);
+		pci_free_resource_list(&resources);
 		return NULL;
 	}
 	bus->secondary = pbm->pci_first_busno;
 	bus->subordinate = pbm->pci_last_busno;
 
-	bus->resource[0] = &pbm->io_space;
-	bus->resource[1] = &pbm->mem_space;
-
 	pci_of_scan_bus(pbm, node, bus);
 	pci_bus_add_devices(bus);
 	pci_bus_register_of_sysfs(bus);
@@ -711,13 +713,6 @@ struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm,
 
 void __devinit pcibios_fixup_bus(struct pci_bus *pbus)
 {
-	struct pci_pbm_info *pbm = pbus->sysdata;
-
-	/* Generic PCI bus probing sets these to point at
-	 * &io{port,mem}_resouce which is wrong for us.
-	 */
-	pbus->resource[0] = &pbm->io_space;
-	pbus->resource[1] = &pbm->mem_space;
 }
 
 void pcibios_update_irq(struct pci_dev *pdev, int irq)

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: linux-next: build failure after merge of the final tree (pci tree related)
  2011-12-07  6:05 Stephen Rothwell
@ 2011-12-07 15:08 ` Bjorn Helgaas
  2011-12-07 15:25   ` Bjorn Helgaas
  2011-12-07 20:24   ` Stephen Rothwell
  0 siblings, 2 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2011-12-07 15:08 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Jesse Barnes, linux-next, linux-kernel, David S. Miller

On Tue, Dec 6, 2011 at 11:05 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> After merging the final tree, today's linux-next build (sparc64 defconfig)
> failed like this:
>
> arch/sparc/kernel/pci.c: In function 'pci_scan_one_pbm':
> arch/sparc/kernel/pci.c:697:7: error: incompatible type for argument 5 of 'pci_create_root_bus'
> include/linux/pci.h:665:17: note: expected 'struct list_head *' but argument is of type 'struct list_head'
>
> Caused by commit fa3cec8aff53 ("sparc/PCI: convert to pci_create_root_bus
> ()"). Same typo as for the powerpc tree. :-(  Please double check the
> rest of those changes, please.
>
> I applied the following patch for today.

Thanks for doing that, sorry for the trouble.  I don't have a set of
cross-compilers, unfortunately, but I will inspect the rest manually.
Do we have to discover problems one-by-one, or can you tell us about
any other arch build problems at the same time?

> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 7 Dec 2011 17:02:12 +1100
> Subject: [PATCH] sparc/PCI: fix up typo from pci_create_root_bus conversion
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/sparc/kernel/pci.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
> index 0905dbd..bb8bc2e 100644
> --- a/arch/sparc/kernel/pci.c
> +++ b/arch/sparc/kernel/pci.c
> @@ -694,7 +694,7 @@ struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm,
>        pci_add_resource(&resources, &pbm->io_space);
>        pci_add_resource(&resources, &pbm->mem_space);
>        bus = pci_create_root_bus(parent, pbm->pci_first_busno, pbm->pci_ops,
> -                                 pbm, resources);
> +                                 pbm, &resources);
>        if (!bus) {
>                printk(KERN_ERR "Failed to create bus for %s\n",
>                       node->full_name);
> --
> 1.7.7.3
>
> --
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
> http://www.canb.auug.org.au/~sfr/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* linux-next: build failure after merge of the final tree (pci tree related)
@ 2011-12-07  6:05 Stephen Rothwell
  2011-12-07 15:08 ` Bjorn Helgaas
  0 siblings, 1 reply; 13+ messages in thread
From: Stephen Rothwell @ 2011-12-07  6:05 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: linux-next, linux-kernel, Bjorn Helgaas, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 1602 bytes --]

Hi all,

After merging the final tree, today's linux-next build (sparc64 defconfig)
failed like this:

arch/sparc/kernel/pci.c: In function 'pci_scan_one_pbm':
arch/sparc/kernel/pci.c:697:7: error: incompatible type for argument 5 of 'pci_create_root_bus'
include/linux/pci.h:665:17: note: expected 'struct list_head *' but argument is of type 'struct list_head'

Caused by commit fa3cec8aff53 ("sparc/PCI: convert to pci_create_root_bus
()"). Same typo as for the powerpc tree. :-(  Please double check the
rest of those changes, please.

I applied the following patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 7 Dec 2011 17:02:12 +1100
Subject: [PATCH] sparc/PCI: fix up typo from pci_create_root_bus conversion

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/sparc/kernel/pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index 0905dbd..bb8bc2e 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -694,7 +694,7 @@ struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm,
 	pci_add_resource(&resources, &pbm->io_space);
 	pci_add_resource(&resources, &pbm->mem_space);
 	bus = pci_create_root_bus(parent, pbm->pci_first_busno, pbm->pci_ops,
-				  pbm, resources);
+				  pbm, &resources);
 	if (!bus) {
 		printk(KERN_ERR "Failed to create bus for %s\n",
 		       node->full_name);
-- 
1.7.7.3

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-06-13 23:21 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-12  4:54 linux-next: build failure after merge of the final tree (pci tree related) Stephen Rothwell
2012-06-12 15:31 ` Bjorn Helgaas
2012-06-13  0:50   ` Stephen Rothwell
2012-06-13 23:20     ` Bjorn Helgaas
  -- strict thread matches above, loose matches on Subject: below --
2011-12-07  6:05 Stephen Rothwell
2011-12-07 15:08 ` Bjorn Helgaas
2011-12-07 15:25   ` Bjorn Helgaas
2011-12-07 17:13     ` Jesse Barnes
2011-12-07 20:24   ` Stephen Rothwell
2011-12-08 19:01     ` Tony Luck
2011-12-09  3:53       ` Bjorn Helgaas
2011-12-09 20:02         ` Luck, Tony
2011-12-12 20:53           ` Jesse Barnes

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).