From patchwork Thu Nov 19 00:14:56 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Keller X-Patchwork-Id: 61214 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAJ0FGHv007894 for ; Thu, 19 Nov 2009 00:15:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751371AbZKSAPF (ORCPT ); Wed, 18 Nov 2009 19:15:05 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751656AbZKSAPF (ORCPT ); Wed, 18 Nov 2009 19:15:05 -0500 Received: from g1t0026.austin.hp.com ([15.216.28.33]:27056 "EHLO g1t0026.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751371AbZKSAPD (ORCPT ); Wed, 18 Nov 2009 19:15:03 -0500 Received: from smtp2.fc.hp.com (smtp2.fc.hp.com [15.11.136.114]) by g1t0026.austin.hp.com (Postfix) with ESMTP id D02EEC20C; Thu, 19 Nov 2009 00:15:08 +0000 (UTC) Received: from [10.100.100.77] (lart.fc.hp.com [15.11.146.31]) by smtp2.fc.hp.com (Postfix) with ESMTP id 536F92CDD35; Wed, 18 Nov 2009 23:34:30 +0000 (UTC) Subject: Re: Memory allocation bug in pci hotplug From: Patrick Keller Reply-To: patrick.keller@hp.com To: Eric Biederman Cc: "jbarnes@virtuousgeek.org" , "linux-pci@vger.kernel.org" In-Reply-To: References: <1258404228.12110.14.camel@pLaptop> <1258408014.12110.15.camel@pLaptop> <1258573178.12110.21.camel@pLaptop> Date: Wed, 18 Nov 2009 17:14:56 -0700 Message-ID: <1258589696.12110.80.camel@pLaptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org --- goodboot.txt 2009-11-18 17:03:28.000000000 -0700 +++ badboot.txt 2009-11-18 17:06:04.000000000 -0700 @@ -38,58 +38,66 @@ pci 0000:00:03.0: PCI bridge, secondary pci 0000:00:03.0: IO window: disabled pci 0000:00:03.0: MEM window: disabled pci 0000:00:03.0: PREFETCH window: disabled +pci 0000:17:00.0: BAR 8: can't allocate mem resource [0xfe000000-0xfdffffff] +pci 0000:18:01.0: BAR 8: can't allocate mem resource [0x100000-0x2fffff] +pci 0000:18:08.0: BAR 8: can't allocate mem resource [0x100000-0x2fffff] +pci 0000:18:09.0: BAR 8: can't allocate mem resource [0x100000-0x2fffff] pci 0000:18:01.0: PCI bridge, secondary bus 0000:25 -pci 0000:18:01.0: IO window: disabled +pci 0000:18:01.0: IO window: 0x6000-0x6fff pci 0000:18:01.0: MEM window: disabled -pci 0000:18:01.0: PREFETCH window: disabled +pci 0000:18:01.0: PREFETCH window: 0x000000d0200000-0x000000d03fffff pci 0000:18:02.0: PCI bridge, secondary bus 0000:22 pci 0000:18:02.0: IO window: disabled pci 0000:18:02.0: MEM window: disabled pci 0000:18:02.0: PREFETCH window: disabled pci 0000:18:08.0: PCI bridge, secondary bus 0000:19 -pci 0000:18:08.0: IO window: disabled +pci 0000:18:08.0: IO window: 0x7000-0x7fff pci 0000:18:08.0: MEM window: disabled -pci 0000:18:08.0: PREFETCH window: disabled +pci 0000:18:08.0: PREFETCH window: 0x000000d0400000-0x000000d05fffff pci 0000:18:09.0: PCI bridge, secondary bus 0000:1c -pci 0000:18:09.0: IO window: disabled +pci 0000:18:09.0: IO window: 0x8000-0x8fff pci 0000:18:09.0: MEM window: disabled -pci 0000:18:09.0: PREFETCH window: disabled +pci 0000:18:09.0: PREFETCH window: 0x000000d0600000-0x000000d07fffff pci 0000:18:0a.0: PCI bridge, secondary bus 0000:1f pci 0000:18:0a.0: IO window: disabled pci 0000:18:0a.0: MEM window: disabled pci 0000:18:0a.0: PREFETCH window: disabled pci 0000:17:00.0: PCI bridge, secondary bus 0000:18 -pci 0000:17:00.0: IO window: disabled +pci 0000:17:00.0: IO window: 0x6000-0x8fff pci 0000:17:00.0: MEM window: disabled -pci 0000:17:00.0: PREFETCH window: disabled +pci 0000:17:00.0: PREFETCH window: 0x000000d0200000-0x000000d07fffff pci 0000:00:04.0: PCI bridge, secondary bus 0000:17 -pci 0000:00:04.0: IO window: disabled +pci 0000:00:04.0: IO window: 0x6000-0x8fff pci 0000:00:04.0: MEM window: 0xfdf00000-0xfdffffff -pci 0000:00:04.0: PREFETCH window: disabled +pci 0000:00:04.0: PREFETCH window: 0x000000d0200000-0x000000d07fffff pci 0000:00:05.0: PCI bridge, secondary bus 0000:28 pci 0000:00:05.0: IO window: disabled pci 0000:00:05.0: MEM window: disabled pci 0000:00:05.0: PREFETCH window: disabled +pci 0000:0c:01.0: BAR 8: can't allocate mem resource [0xfdf00000-0xfdefffff] +pci 0000:0c:09.0: BAR 8: can't allocate mem resource [0xfdf00000-0xfdefffff] +pci 0000:0c:01.0: BAR 7: can't allocate I/O resource [0x6000-0x5fff] +pci 0000:0c:09.0: BAR 7: can't allocate I/O resource [0x6000-0x5fff] pci 0000:0c:00.0: PCI bridge, secondary bus 0000:13 pci 0000:0c:00.0: IO window: 0x5000-0x5fff pci 0000:0c:00.0: MEM window: 0xfde00000-0xfdefffff -pci 0000:0c:00.0: PREFETCH window: 0xd0200000-0xd02fffff +pci 0000:0c:00.0: PREFETCH window: 0xd0800000-0xd08fffff pci 0000:0c:01.0: PCI bridge, secondary bus 0000:10 pci 0000:0c:01.0: IO window: disabled pci 0000:0c:01.0: MEM window: disabled -pci 0000:0c:01.0: PREFETCH window: disabled +pci 0000:0c:01.0: PREFETCH window: 0x000000d0900000-0x000000d0afffff pci 0000:0c:09.0: PCI bridge, secondary bus 0000:0d pci 0000:0c:09.0: IO window: disabled pci 0000:0c:09.0: MEM window: disabled -pci 0000:0c:09.0: PREFETCH window: disabled +pci 0000:0c:09.0: PREFETCH window: 0x000000d0b00000-0x000000d0cfffff pci 0000:0b:00.0: PCI bridge, secondary bus 0000:0c pci 0000:0b:00.0: IO window: 0x5000-0x5fff pci 0000:0b:00.0: MEM window: 0xfde00000-0xfdefffff -pci 0000:0b:00.0: PREFETCH window: 0xd0200000-0xd02fffff +pci 0000:0b:00.0: PREFETCH window: 0xd0800000-0xd0cfffff pci 0000:00:06.0: PCI bridge, secondary bus 0000:0b pci 0000:00:06.0: IO window: 0x5000-0x5fff pci 0000:00:06.0: MEM window: 0xfdd00000-0xfdefffff -pci 0000:00:06.0: PREFETCH window: 0xd0200000-0xd02fffff +pci 0000:00:06.0: PREFETCH window: 0xd0800000-0xd0cfffff pci 0000:00:07.0: PCI bridge, secondary bus 0000:16 pci 0000:00:07.0: IO window: disabled pci 0000:00:07.0: MEM window: disabled @@ -97,7 +105,7 @@ pci 0000:00:07.0: PREFETCH window: dis pci 0000:00:1c.0: PCI bridge, secondary bus 0000:02 pci 0000:00:1c.0: IO window: 0x4000-0x4fff pci 0000:00:1c.0: MEM window: 0xf7d00000-0xf7efffff -pci 0000:00:1c.0: PREFETCH window: 0xd0300000-0xd03fffff +pci 0000:00:1c.0: PREFETCH window: 0xd0d00000-0xd0dfffff pci 0000:00:1e.0: PCI bridge, secondary bus 0000:01 pci 0000:00:1e.0: IO window: 0x2000-0x3fff pci 0000:00:1e.0: MEM window: 0xf7b00000-0xf7cfffff Here's the /proc/iomem output from both the good boot without your patch, and the bad boot with your patch. dl580g5:~# diff -Nurp goodiomem.txt badiomem.txt --- goodiomem.txt 2009-11-18 17:14:10.000000000 -0700 +++ badiomem.txt 2009-11-18 17:10:31.000000000 -0700 @@ -2,8 +2,8 @@ 0009f400-0009ffff : reserved 000f0000-000fffff : reserved 00100000-cfd42fff : System RAM - 01000000-012a1da6 : Kernel code - 012a1da7-0143cb5f : Kernel data + 01000000-012a1e46 : Kernel code + 012a1e47-0143cb5f : Kernel data 014d2000-015991bb : Kernel bss cfd43000-cfd4bfff : ACPI Tables cfd4c000-cfd4cfff : System RAM @@ -16,13 +16,20 @@ d0000000-d01fffff : PCI Bus 0000:03 d0100000-d01fffff : PCI Bus 0000:07 d0100000-d01fffff : PCI Bus 0000:08 d0100000-d011ffff : 0000:08:00.0 -d0200000-d02fffff : PCI Bus 0000:0b - d0200000-d02fffff : PCI Bus 0000:0c - d0200000-d02fffff : PCI Bus 0000:13 - d0200000-d023ffff : 0000:13:00.0 - d0240000-d027ffff : 0000:13:00.1 -d0300000-d03fffff : PCI Bus 0000:02 - d0300000-d033ffff : 0000:02:00.0 +d0200000-d07fffff : PCI Bus 0000:17 + d0200000-d07fffff : PCI Bus 0000:18 + d0200000-d03fffff : PCI Bus 0000:25 + d0400000-d05fffff : PCI Bus 0000:19 + d0600000-d07fffff : PCI Bus 0000:1c +d0800000-d0cfffff : PCI Bus 0000:0b + d0800000-d0cfffff : PCI Bus 0000:0c + d0800000-d08fffff : PCI Bus 0000:13 + d0800000-d083ffff : 0000:13:00.0 + d0840000-d087ffff : 0000:13:00.1 + d0900000-d0afffff : PCI Bus 0000:10 + d0b00000-d0cfffff : PCI Bus 0000:0d +d0d00000-d0dfffff : PCI Bus 0000:02 + d0d00000-d0d3ffff : 0000:02:00.0 d8000000-dfffffff : PCI Bus 0000:01 d8000000-dfffffff : 0000:01:03.0 e0000000-efffffff : PCI MMCONFIG 0 [00-ff] @@ -59,13 +66,13 @@ f7f00000-fbffffff : PCI Bus 0000:03 fa000000-fbffffff : 0000:08:00.0 fa000000-fbffffff : bnx2 fdd00000-fdefffff : PCI Bus 0000:0b - fdd00000-fddfffff : PCI Bus 0000:0c - fdd00000-fddfffff : PCI Bus 0000:13 - fdd00000-fdd03fff : 0000:13:00.0 - fdd00000-fdd03fff : qla2xxx - fdd04000-fdd07fff : 0000:13:00.1 - fdd04000-fdd07fff : qla2xxx - fde00000-fde1ffff : 0000:0b:00.0 + fdde0000-fddfffff : 0000:0b:00.0 + fde00000-fdefffff : PCI Bus 0000:0c + fde00000-fdefffff : PCI Bus 0000:13 + fdee0000-fdee3fff : 0000:13:00.1 + fdee0000-fdee3fff : qla2xxx + fdef0000-fdef3fff : 0000:13:00.0 + fdef0000-fdef3fff : qla2xxx fdf00000-fdffffff : PCI Bus 0000:17 fdfe0000-fdffffff : 0000:17:00.0 fe000000-febfffff : pnp 00:01