Thank you for the quick response... I have attached the trace. Please excuse the extra debug messages you will see... Those were added by me while debugging the problem. Venu > -----Original Message----- > From: linux-pci-owner@xxxxxxxxxxxxxxx [mailto:linux-pci- > owner@xxxxxxxxxxxxxxx] On Behalf Of Matthew Wilcox > Sent: Tuesday, November 18, 2008 01:03 PM > To: Venugopal Busireddy > Cc: linux-pci@xxxxxxxxxxxxxxx > Subject: Re: Allocation of resources - VF BARs... > > On Tue, Nov 18, 2008 at 05:59:43PM +0000, Venu Busireddy wrote: > > During the resource setup phase, I have noticed that > pci_update_resource() > > gets called with resno 0 (BAR 0), 6 (PCI_ROM_RESOURCE), 2 (BAR 2), 7 > > (VF BAR 0), 9 (VF BAR 2), 11 (VF BAR 4), and 4 (BAR 4), in that order. > > > > resno 0 (BAR 0) gets bus range 0x80000000-0x807fffff allocated to it. > > > > resno 6 (PCI_ROM_RESOURCE) gets bus range 0x80800000-0x8087ffff. > > > > resno 2 (BAR 2) gets bus range 0x80880000-0x80880fff. > > > > So far so good... > > > > Now, resno 7 (VF BAR 0) gets bus range 0x80881000-0x88880fff allocated > > to it. But when 0x8088100c is written to VF BAR 0, the adpater returns > > 0x8080000c. The adapter seems to expect the region to fall on a 8MB > > boundary, but the address we assigned falls on a 4K boundary. > > Could you recompile with CONFIG_PCI_DEBUG=y and send all the resulting > messages from dmesg? You may need to increase the size of your > CONFIG_LOG_BUF_SHIFT to fit all the extra messages in. > > -- > Matthew Wilcox Intel Open Source Technology Centre > "Bill, look, we understand that you're interested in selling us this > operating system, but compare it to ours. We can't possibly take such > a retrograde step." > -- > To unsubscribe from this list: send the line "unsubscribe linux-pci" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html
Using Kilauea machine description Linux version 2.6.28-rc4 (root@ocho) (gcc version 4.2.4) #69 Tue Nov 18 13:44:27 CST 2008 Found initrd at 0xcfc41000:0xcff14000 Found legacy serial port 0 for /plb/opb/serial@ef600200 mem=ef600200, taddr=ef600200, irq=0, clk=11059200, speed=0 Found legacy serial port 1 for /plb/opb/serial@ef600300 mem=ef600300, taddr=ef600300, irq=0, clk=11059200, speed=0 Top of RAM: 0x10000000, Total RAM: 0x10000000 Memory hole size: 0MB Zone PFN ranges: DMA 0x00000000 -> 0x00010000 Normal 0x00010000 -> 0x00010000 Movable zone start PFN for each node early_node_map[1] active PFN ranges 0: 0x00000000 -> 0x00010000 On node 0 totalpages: 65536 free_area_init_node: node 0, pgdat c02a85d8, node_mem_map c0403000 DMA zone: 512 pages used for memmap DMA zone: 0 pages reserved DMA zone: 65024 pages, LIFO batch:15 Normal zone: 0 pages used for memmap Movable zone: 0 pages used for memmap Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024 Kernel command line: console=ttyS0,115200 mtdparts=fc000000.nor_flash:0x60000@0x3fa0000(u-boot),0x20000@0x3f80000(u-boot_env),0x20000@0x3f60000(u-boot_env2),0x60000@0x3f00000(u-boot_bootscript),0x500000@0x3a00000(firmware1),0x500000@0x3500000(firmware2),0x500000@0x3000000(Userdisk) ip=10.30.138.76:10.20.0.15:10.30.0.1:255.255.0.0:kilauea-2:eth0 panic=1 UIC0 (32 IRQ sources) at DCR 0xc0 UIC1 (32 IRQ sources) at DCR 0xd0 UIC2 (32 IRQ sources) at DCR 0xe0 PID hash table entries: 1024 (order: 10, 4096 bytes) time_init: decrementer frequency = 400.000000 MHz time_init: processor frequency = 400.000000 MHz clocksource: timebase mult[a00000] shift[22] registered clockevent: decrementer mult[6666] shift[16] cpu[0] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) Inode-cache hash table entries: 16384 (order: 4, 65536 bytes) Memory: 253568k/262144k available (2620k kernel code, 8260k reserved, 108k data, 330k bss, 140k init) SLUB: Genslabs=10, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 Calibrating delay loop... 798.72 BogoMIPS (lpj=1597440) Mount-cache hash table entries: 512 net_namespace: 484 bytes NET: Registered protocol family 16 PCIE0: Checking link... PCIE0: Device detected, waiting for link... PCIE0: link is up ! PCI host bridge /plb/pciex@0a0000000 (primary) ranges: pci_process_bridge_OF_ranges: rlen = 48, pna = 1, np = 6 pci_process_bridge_OF_ranges: pci_space = 02000000 pci_process_bridge_OF_ranges: pci_addr = 0x0000000080000000 pci_process_bridge_OF_ranges: cpu_addr = 0x0000000090000000 pci_process_bridge_OF_ranges: size = 0x0000000010000000 pci_process_bridge_OF_ranges: type = 2 MEM 0x0000000090000000..0x000000009fffffff -> 0x0000000080000000 pci_process_bridge_OF_ranges: pci_space = 01000000 pci_process_bridge_OF_ranges: pci_addr = 0x0000000000000000 pci_process_bridge_OF_ranges: cpu_addr = 0x00000000e0000000 pci_process_bridge_OF_ranges: size = 0x0000000000010000 pci_process_bridge_OF_ranges: type = 1 IO 0x00000000e0000000..0x00000000e000ffff -> 0x0000000000000000 4xx PCI DMA offset set to 0x00000000 ppc4xx_configure_pciex_POMs: mbase = D1004000 ppc4xx_configure_pciex_POMs: res->start = 0000000090000000, lah = 0x00000000, lal = 0x90000000 ppc4xx_configure_pciex_POMs: hose->pci_mem_offset = 0000000090000000, pciah = 0x00000000, pcial = 0x90000000 ppc4xx_configure_pciex_POMs: sa = 0x10000000 PCIE0: successfully set as root-complex PCI: Probing PCI hardware PCI: Scanning bus 0000:00 pci 0000:00:00.0: found [aaa0:bed0] class 000604 header type 01 pci 0000:00:00.0: reg 10 32bit mmio: [0x000000-0x7fffffff] pci 0000:00:00.0: calling 0xc0213414 pci 0000:00:00.0: calling 0xc0017690 PCI: Hiding 4xx host bridge resources 0000:00:00.0 PCI: Fixups for bus 0000:00 pci 0000:00:00.0: scanning behind bridge, config 3f0100, pass 0 PCI: Scanning bus 0000:01 pci 0000:01:00.0: found [XXXX:XXXX] class 000200 header type 00 pci 0000:01:00.0: reg 10 64bit mmio: [0x000000-0x7fffff] pci 0000:01:00.0: reg 18 64bit mmio: [0x000000-0x000fff] pci 0000:01:00.0: reg 20 64bit mmio: [0x000000-0x0000ff] pci 0000:01:00.0: reg 30 32bit mmio: [0x000000-0x07ffff] pci 0000:01:00.0: calling 0xc0213414 pci 0000:01:00.0: calling 0xc0017690 pci 0000:01:00.0: supports D1 D2 pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot pci 0000:01:00.0: PME# disabled pci 0000:01:00.0: reg 194 64bit mmio: [0x000000-0x7fffff] pci 0000:01:00.0: reg 19c 64bit mmio: [0x000000-0x001fff] pci 0000:01:00.0: reg 1a4 64bit mmio: [0x000000-0x001fff] PCI: Fixups for bus 0000:01 pci 0000:00:00.0: bridge io port: [0x00-0xfff] pci 0000:00:00.0: bridge 32bit mmio: [0x000000-0x0fffff] pci 0000:00:00.0: bridge 64bit mmio pref: [0x000000-0x0fffff] PCI: Bus scan for 0000:01 returning with max=02 pci 0000:00:00.0: scanning behind bridge, config 3f0100, pass 1 PCI: Bus scan for 0000:00 returning with max=3f pci_update_resource: dev = 0000:01:00.0: resno = 0, res->flags = 0x2002120C pcibios_resource_to_bus: res->flags = 0x2002120C pcibios_resource_to_bus: hose->io_base_virt = 0xD1020000, _IO_BASE = 0xD1020000 pcibios_resource_to_bus: res->start = 0x90000000, res->end = 0x907FFFFF pcibios_resource_to_bus: offset = 0x10000000, hose->pci_mem_offset = 0x10000000 pcibios_resource_to_bus: region->start = 0x80000000, region->end = 0x807FFFFF pci 0000:01:00.0: BAR 0: got res [0x90000000-0x907fffff] bus [0x80000000-0x807fffff] flags 0x2002120c pci_update_resource: BAR 0: got res [0x90000000-0x907fffff] bus [0x80000000-0x807fffff], flags = 0x2002120c pci 0000:01:00.0: BAR 0: moved to bus [0x80000000-0x807fffff] flags 0x2120c pci_update_resource: dev = 0000:01:00.0: resno = 6, res->flags = 0x20027200 pcibios_resource_to_bus: res->flags = 0x20027200 pcibios_resource_to_bus: hose->io_base_virt = 0xD1020000, _IO_BASE = 0xD1020000 pcibios_resource_to_bus: res->start = 0x90800000, res->end = 0x9087FFFF pcibios_resource_to_bus: offset = 0x10000000, hose->pci_mem_offset = 0x10000000 pcibios_resource_to_bus: region->start = 0x80800000, region->end = 0x8087FFFF pci 0000:01:00.0: BAR 6: got res [0x90800000-0x9087ffff] bus [0x80800000-0x8087ffff] flags 0x20027200 pci_update_resource: BAR 6: got res [0x90800000-0x9087ffff] bus [0x80800000-0x8087ffff], flags = 0x20027200 pci_update_resource: dev = 0000:01:00.0: resno = 2, res->flags = 0x2002120C pcibios_resource_to_bus: res->flags = 0x2002120C pcibios_resource_to_bus: hose->io_base_virt = 0xD1020000, _IO_BASE = 0xD1020000 pcibios_resource_to_bus: res->start = 0x90880000, res->end = 0x90880FFF pcibios_resource_to_bus: offset = 0x10000000, hose->pci_mem_offset = 0x10000000 pcibios_resource_to_bus: region->start = 0x80880000, region->end = 0x80880FFF pci 0000:01:00.0: BAR 2: got res [0x90880000-0x90880fff] bus [0x80880000-0x80880fff] flags 0x2002120c pci_update_resource: BAR 2: got res [0x90880000-0x90880fff] bus [0x80880000-0x80880fff], flags = 0x2002120c pci 0000:01:00.0: BAR 2: moved to bus [0x80880000-0x80880fff] flags 0x2120c pci_update_resource: dev = 0000:01:00.0: resno = 7, res->flags = 0x0000120C pcibios_resource_to_bus: res->flags = 0x0000120C pcibios_resource_to_bus: hose->io_base_virt = 0xD1020000, _IO_BASE = 0xD1020000 pcibios_resource_to_bus: res->start = 0x90881000, res->end = 0x98880FFF pcibios_resource_to_bus: offset = 0x10000000, hose->pci_mem_offset = 0x10000000 pcibios_resource_to_bus: region->start = 0x80881000, region->end = 0x88880FFF pci 0000:01:00.0: BAR 7: got res [0x90881000-0x98880fff] bus [0x80881000-0x88880fff] flags 0x120c pci_update_resource: BAR 7: got res [0x90881000-0x98880fff] bus [0x80881000-0x88880fff], flags = 0x120c pci 0000:01:00.0: BAR 7: error updating (0x8088100c != 0x8080000c) pci 0000:01:00.0: BAR 7: moved to bus [0x80881000-0x88880fff] flags 0x120c pci_update_resource: dev = 0000:01:00.0: resno = 9, res->flags = 0x0000120C pcibios_resource_to_bus: res->flags = 0x0000120C pcibios_resource_to_bus: hose->io_base_virt = 0xD1020000, _IO_BASE = 0xD1020000 pcibios_resource_to_bus: res->start = 0x98881000, res->end = 0x988A0FFF pcibios_resource_to_bus: offset = 0x10000000, hose->pci_mem_offset = 0x10000000 pcibios_resource_to_bus: region->start = 0x88881000, region->end = 0x888A0FFF pci 0000:01:00.0: BAR 9: got res [0x98881000-0x988a0fff] bus [0x88881000-0x888a0fff] flags 0x120c pci_update_resource: BAR 9: got res [0x98881000-0x988a0fff] bus [0x88881000-0x888a0fff], flags = 0x120c pci 0000:01:00.0: BAR 9: error updating (0x8888100c != 0x8888000c) pci 0000:01:00.0: BAR 9: moved to bus [0x88881000-0x888a0fff] flags 0x120c pci_update_resource: dev = 0000:01:00.0: resno = 11, res->flags = 0x0000120C pcibios_resource_to_bus: res->flags = 0x0000120C pcibios_resource_to_bus: hose->io_base_virt = 0xD1020000, _IO_BASE = 0xD1020000 pcibios_resource_to_bus: res->start = 0x988A1000, res->end = 0x988C0FFF pcibios_resource_to_bus: offset = 0x10000000, hose->pci_mem_offset = 0x10000000 pcibios_resource_to_bus: region->start = 0x888A1000, region->end = 0x888C0FFF pci 0000:01:00.0: BAR 11: got res [0x988a1000-0x988c0fff] bus [0x888a1000-0x888c0fff] flags 0x120c pci_update_resource: BAR 11: got res [0x988a1000-0x988c0fff] bus [0x888a1000-0x888c0fff], flags = 0x120c pci 0000:01:00.0: BAR 11: error updating (0x888a100c != 0x888a000c) pci 0000:01:00.0: BAR 11: moved to bus [0x888a1000-0x888c0fff] flags 0x120c pci_update_resource: dev = 0000:01:00.0: resno = 4, res->flags = 0x2002120C pcibios_resource_to_bus: res->flags = 0x2002120C pcibios_resource_to_bus: hose->io_base_virt = 0xD1020000, _IO_BASE = 0xD1020000 pcibios_resource_to_bus: res->start = 0x988C1000, res->end = 0x988C10FF pcibios_resource_to_bus: offset = 0x10000000, hose->pci_mem_offset = 0x10000000 pcibios_resource_to_bus: region->start = 0x888C1000, region->end = 0x888C10FF pci 0000:01:00.0: BAR 4: got res [0x988c1000-0x988c10ff] bus [0x888c1000-0x888c10ff] flags 0x2002120c pci_update_resource: BAR 4: got res [0x988c1000-0x988c10ff] bus [0x888c1000-0x888c10ff], flags = 0x2002120c pci 0000:01:00.0: BAR 4: moved to bus [0x888c1000-0x888c10ff] flags 0x2120c pci 0000:00:00.0: PCI bridge, secondary bus 0000:01 pcibios_resource_to_bus: res->flags = 0x00000000 pcibios_resource_to_bus: hose->io_base_virt = 0xD1020000, _IO_BASE = 0xD1020000 pcibios_resource_to_bus: res->start = 0x00000000, res->end = 0x00000FFF pcibios_resource_to_bus: offset = 0x00000000, hose->pci_mem_offset = 0x10000000 pcibios_resource_to_bus: region->start = 0x00000000, region->end = 0x00000FFF pci 0000:00:00.0: IO window: disabled pcibios_resource_to_bus: res->flags = 0x00000000 pcibios_resource_to_bus: hose->io_base_virt = 0xD1020000, _IO_BASE = 0xD1020000 pcibios_resource_to_bus: res->start = 0x10000000, res->end = 0x100FFFFF pcibios_resource_to_bus: offset = 0x00000000, hose->pci_mem_offset = 0x10000000 pcibios_resource_to_bus: region->start = 0x10000000, region->end = 0x100FFFFF pci 0000:00:00.0: MEM window: disabled pcibios_resource_to_bus: res->flags = 0x00001200 pcibios_resource_to_bus: hose->io_base_virt = 0xD1020000, _IO_BASE = 0xD1020000 pcibios_resource_to_bus: res->start = 0x90000000, res->end = 0x98BFFFFF pcibios_resource_to_bus: offset = 0x10000000, hose->pci_mem_offset = 0x10000000 pcibios_resource_to_bus: region->start = 0x80000000, region->end = 0x88BFFFFF pci 0000:00:00.0: PREFETCH window: 0x00000080000000-0x00000088bfffff bus: 00 index 0 io port: [0x00-0xffff] bus: 00 index 1 mmio: [0x90000000-0x9fffffff] bus: 01 index 0 mmio: [0x0-0xfff] bus: 01 index 1 mmio: [0x10000000-0x100fffff] bus: 01 index 2 mmio: [0x90000000-0x98bfffff] bus: 01 index 3 mmio: [0x0-0x0] NET: Registered protocol family 2 IP route cache hash table entries: 2048 (order: 1, 8192 bytes) TCP established hash table entries: 8192 (order: 4, 65536 bytes) TCP bind hash table entries: 8192 (order: 3, 32768 bytes) TCP: Hash tables configured (established 8192 bind 8192) TCP reno registered NET: Registered protocol family 1 checking if image is initramfs...it isn't (bad gzip magic numbers); looks like an initrd Freeing initrd memory: 2892k freed Setting up PPC4xx MSI support squashfs: version 3.4 (2008/08/26) Phillip Lougher JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc. aufs 20080915 msgmni has been set to 501 io scheduler noop registered (default) pci 0000:00:00.0: calling 0xc0125458 pci 0000:00:00.0: calling 0xc0218f5c pci 0000:01:00.0: calling 0xc0125458 pci 0000:01:00.0: calling 0xc0218f5c pcieport-driver 0000:00:00.0: found MSI capability pci_express 0000:00:00.0:pcie00: allocate port service pci_express 0000:00:00.0:pcie01: allocate port service aer 0000:00:00.0:pcie01: service driver aer loaded pci_hotplug: PCI Hot Plug PCI Core version: 0.5 Serial: 8250/16550 driver4 ports, IRQ sharing enabled serial8250.0: ttyS0 at MMIO 0xef600200 (irq = 26) is a 16550A console [ttyS0] enabled serial8250.0: ttyS1 at MMIO 0xef600300 (irq = 17) is a 16550A ef600200.serial: ttyS0 at MMIO 0xef600200 (irq = 26) is a 16550A ef600300.serial: ttyS1 at MMIO 0xef600300 (irq = 17) is a 16550A brd: module loaded loop: module loaded PPC 4xx OCP EMAC driver, version 3.54 MAL v2 /plb/mcmal, 2 TX channels, 2 RX channels RGMII /plb/opb/emac-rgmii@ef600b00 initialized with MDIO support /plb/opb/emac-rgmii@ef600b00: input 0 in RGMII mode eth0: EMAC-0 /plb/opb/ethernet@ef600900, MAC 00:06:4b:10:20:1a eth0: found Marvell 88E1111 Ethernet PHY (0x01) /plb/opb/emac-rgmii@ef600b00: input 1 in RGMII mode eth1: EMAC-1 /plb/opb/ethernet@ef600a00, MAC 00:00:00:00:00:00 eth1: found Marvell 88E1111 Ethernet PHY (0x02) fc000000.nor_flash: Found 1 x16 devices at 0x0 in 16-bit bank Amd/Fujitsu Extended Query Table at 0x0040 fc000000.nor_flash: CFI does not contain boot bank location. Assuming top. number of CFI chips: 1 cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness. 7 cmdlinepart partitions found on MTD device fc000000.nor_flash Creating 7 MTD partitions on "fc000000.nor_flash": 0x03fa0000-0x04000000 : "u-boot" 0x03f80000-0x03fa0000 : "u-boot_env" 0x03f60000-0x03f80000 : "u-boot_env2" 0x03f00000-0x03f60000 : "u-boot_bootscript" 0x03a00000-0x03f00000 : "firmware1" 0x03500000-0x03a00000 : "firmware2" 0x03000000-0x03500000 : "Userdisk" i2c /dev entries driver i2c-gpio i2c-gpio.2: using pins 13 (SDA) and 12 (SCL) IBM GPIO IIC driver v0.1 TCP cubic registered NET: Registered protocol family 10 IPv6 over IPv4 tunneling driver NET: Registered protocol family 17 RPC: Registered udp transport module. RPC: Registered tcp transport module. Freeing unused kernel memory: 140k init eth0: link is up, 100 FDX, pause enabled eth0: no IPv6 routers present