On Tue, Jul 31, 2018 at 08:55:52AM +1000, NeilBrown wrote: > On Mon, Jul 30 2018, Sergio Paracuellos wrote: > > > This patch series include an attempt to avoid the use of custom > > read and writes in driver code and use PCI subsystem common ones. > > > > In order to do this 'map_bus' callback is implemented and also > > data structures for driver are included. The regs base address > > is being readed from device tree and the driver gets clean a lot > > of code. > > > > Also the driver get removes all legacy PCI code using now PCI_DRIVERS_GENERIC. > > > > Changes in v6: > > - Reorder patches to be each patch correct in itself. > > - PATCH 1 adds also Kconfig to do the step from legacy to generic code > > - PATCH 1 remaps io space using devm_pci_remap_iospace for io resource in > > a new function called 'mt7621_pci_parse_request_of_pci_ranges'. > > - Other patches rebased and adapted with this changes. > > No noticeable difference. > Still hangs after > [ 8.630000] ahci 0000:01:00.0: enabling device (0000 -> 0002) > > the readl() at the start of ahci_enable_ahci() hangs, reading c4017004. > > I built on a merge of > Merge: 527838d470e3 b9f13084580c > > linus' master + staging/staging-testing > > dmesg below. > > Thanks, > NeilBrown > > [ 0.000000] Linux version 4.18.0-rc7+ (neilb@noble) (gcc version 7.2.0 (GCC)) #254 SMP Tue Jul 31 08:49:52 AEST 2018 > [ 0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3 > [ 0.000000] bootconsole [early0] enabled > [ 0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc) > [ 0.000000] MIPS: machine is GB-PC1 > [ 0.000000] Determined physical RAM map: > [ 0.000000] memory: 1c000000 @ 00000000 (usable) > [ 0.000000] memory: 04000000 @ 20000000 (usable) > [ 0.000000] Initrd not found or empty - disabling initrd > [ 0.000000] VPE topology {2,2} total 4 > [ 0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes. > [ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes > [ 0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes. > [ 0.000000] Zone ranges: > [ 0.000000] Normal [mem 0x0000000000000000-0x000000001fffffff] > [ 0.000000] HighMem [mem 0x0000000020000000-0x0000000023ffffff] > [ 0.000000] Movable zone start for each node > [ 0.000000] Early memory node ranges > [ 0.000000] node 0: [mem 0x0000000000000000-0x000000001bffffff] > [ 0.000000] node 0: [mem 0x0000000020000000-0x0000000023ffffff] > [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000023ffffff] > [ 0.000000] random: get_random_bytes called from start_kernel+0xb4/0x4ec with crng_init=0 > [ 0.000000] percpu: Embedded 15 pages/cpu @(ptrval) s30480 r8192 d22768 u61440 > [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 130048 > [ 0.000000] Kernel command line: console=ttyS0,57600 > [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) > [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) > [ 0.000000] Writing ErrCtl register=00010882 > [ 0.000000] Readback ErrCtl register=00010882 > [ 0.000000] Memory: 504788K/524288K available (6135K kernel code, 228K rwdata, 1052K rodata, 6524K init, 241K bss, 19500K reserved, 0K cma-reserved, 65536K highmem) > [ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 > [ 0.000000] Hierarchical RCU implementation. > [ 0.000000] NR_IRQS: 256 > [ 0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcf914c9718, max_idle_ns: 440795231327 ns > [ 0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns > [ 0.010000] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032) > [ 0.070000] pid_max: default: 32768 minimum: 301 > [ 0.080000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) > [ 0.090000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) > [ 0.100000] Hierarchical SRCU implementation. > [ 0.110000] smp: Bringing up secondary CPUs ... > [ 0.120000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes. > [ 0.120000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes > [ 0.120000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes. > [ 0.120000] CPU1 revision is: 0001992f (MIPS 1004Kc) > [ 0.180000] Synchronize counters for CPU 1: done. > [ 0.220000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes. > [ 0.220000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes > [ 0.220000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes. > [ 0.220000] CPU2 revision is: 0001992f (MIPS 1004Kc) > [ 0.280000] Synchronize counters for CPU 2: done. > [ 0.320000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes. > [ 0.320000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes > [ 0.320000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes. > [ 0.320000] CPU3 revision is: 0001992f (MIPS 1004Kc) > [ 0.380000] Synchronize counters for CPU 3: done. > [ 0.420000] smp: Brought up 1 node, 4 CPUs > [ 0.430000] devtmpfs: initialized > [ 0.480000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns > [ 0.490000] futex hash table entries: 1024 (order: 3, 32768 bytes) > [ 0.500000] pinctrl core: initialized pinctrl subsystem > [ 0.510000] NET: Registered protocol family 16 > [ 0.570000] mt7621-pci 1e140000.pcie: host bridge /pcie@1e140000 ranges: > [ 0.580000] mt7621-pci 1e140000.pcie: MEM 0x60000000..0x6fffffff -> 0x00000000 > [ 0.600000] mt7621-pci 1e140000.pcie: IO 0x1e160000..0x1e16ffff -> 0x00000000 > [ 0.910000] ***** Xtal 40MHz ***** > [ 0.920000] Port 0 N_FTS = 1b102800 > [ 0.930000] Port 1 N_FTS = 1b102800 > [ 0.930000] Port 2 N_FTS = 1b102800 > [ 1.990000] PCIE0 enabled > [ 2.000000] PCIE1 enabled > [ 2.000000] PCIE2 enabled > [ 2.010000] mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00 > [ 2.020000] pci_bus 0000:00: root bus resource [bus 00-ff] > [ 2.030000] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff] (bus address [0x00000000-0x0fffffff]) > [ 2.060000] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring > [ 2.070000] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring > [ 2.090000] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring > [ 2.110000] pci 0000:00:00.0: PCI bridge to [bus 01-ff] > [ 2.120000] pci 0000:00:01.0: PCI bridge to [bus 02-ff] > [ 2.130000] pci 0000:00:02.0: PCI bridge to [bus 03-ff] > [ 2.140000] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000] > [ 2.160000] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000] > [ 2.170000] pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000] > [ 2.180000] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000] > [ 2.200000] pci 0000:00:02.0: BAR 0: no space for [mem size 0x80000000] > [ 2.210000] pci 0000:00:02.0: BAR 0: failed to assign [mem size 0x80000000] > [ 2.220000] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff] > [ 2.240000] pci 0000:00:00.0: BAR 9: assigned [mem 0x60100000-0x601fffff pref] > [ 2.250000] pci 0000:00:01.0: BAR 8: assigned [mem 0x60200000-0x602fffff] > [ 2.260000] pci 0000:00:01.0: BAR 9: assigned [mem 0x60300000-0x603fffff pref] > [ 2.280000] pci 0000:00:02.0: BAR 8: assigned [mem 0x60400000-0x604fffff] > [ 2.290000] pci 0000:00:02.0: BAR 9: assigned [mem 0x60500000-0x605fffff pref] > [ 2.300000] pci 0000:00:00.0: BAR 1: assigned [mem 0x60600000-0x6060ffff] > [ 2.320000] pci 0000:00:01.0: BAR 1: assigned [mem 0x60610000-0x6061ffff] > [ 2.330000] pci 0000:00:02.0: BAR 1: assigned [mem 0x60620000-0x6062ffff] > [ 2.340000] pci 0000:00:00.0: BAR 7: no space for [io size 0x1000] > [ 2.360000] pci 0000:00:00.0: BAR 7: failed to assign [io size 0x1000] > [ 2.370000] pci 0000:00:01.0: BAR 7: no space for [io size 0x1000] > [ 2.380000] pci 0000:00:01.0: BAR 7: failed to assign [io size 0x1000] > [ 2.390000] pci 0000:00:02.0: BAR 7: no space for [io size 0x1000] > [ 2.410000] pci 0000:00:02.0: BAR 7: failed to assign [io size 0x1000] > [ 2.420000] pci 0000:01:00.0: BAR 5: assigned [mem 0x60000000-0x600001ff] > [ 2.430000] pci 0000:01:00.0: BAR 4: no space for [io size 0x0010] > [ 2.450000] pci 0000:01:00.0: BAR 4: failed to assign [io size 0x0010] > [ 2.460000] pci 0000:01:00.0: BAR 0: no space for [io size 0x0008] > [ 2.470000] pci 0000:01:00.0: BAR 0: failed to assign [io size 0x0008] > [ 2.480000] pci 0000:01:00.0: BAR 2: no space for [io size 0x0008] > [ 2.500000] pci 0000:01:00.0: BAR 2: failed to assign [io size 0x0008] > [ 2.510000] pci 0000:01:00.0: BAR 1: no space for [io size 0x0004] > [ 2.520000] pci 0000:01:00.0: BAR 1: failed to assign [io size 0x0004] > [ 2.530000] pci 0000:01:00.0: BAR 3: no space for [io size 0x0004] > [ 2.550000] pci 0000:01:00.0: BAR 3: failed to assign [io size 0x0004] > [ 2.560000] pci 0000:00:00.0: PCI bridge to [bus 01] > [ 2.570000] pci 0000:00:00.0: bridge window [mem 0x60000000-0x600fffff] > [ 2.580000] pci 0000:00:00.0: bridge window [mem 0x60100000-0x601fffff pref] > [ 2.600000] pci 0000:02:00.0: BAR 5: assigned [mem 0x60200000-0x602001ff] > [ 2.610000] pci 0000:02:00.0: BAR 4: no space for [io size 0x0010] > [ 2.620000] pci 0000:02:00.0: BAR 4: failed to assign [io size 0x0010] > [ 2.640000] pci 0000:02:00.0: BAR 0: no space for [io size 0x0008] > [ 2.650000] pci 0000:02:00.0: BAR 0: failed to assign [io size 0x0008] > [ 2.660000] pci 0000:02:00.0: BAR 2: no space for [io size 0x0008] > [ 2.670000] pci 0000:02:00.0: BAR 2: failed to assign [io size 0x0008] > [ 2.690000] pci 0000:02:00.0: BAR 1: no space for [io size 0x0004] > [ 2.700000] pci 0000:02:00.0: BAR 1: failed to assign [io size 0x0004] > [ 2.710000] pci 0000:02:00.0: BAR 3: no space for [io size 0x0004] > [ 2.720000] pci 0000:02:00.0: BAR 3: failed to assign [io size 0x0004] > [ 2.740000] pci 0000:00:01.0: PCI bridge to [bus 02] > [ 2.750000] pci 0000:00:01.0: bridge window [mem 0x60200000-0x602fffff] > [ 2.760000] pci 0000:00:01.0: bridge window [mem 0x60300000-0x603fffff pref] > [ 2.770000] pci 0000:03:00.0: BAR 5: assigned [mem 0x60400000-0x604001ff] > [ 2.790000] pci 0000:03:00.0: BAR 4: no space for [io size 0x0010] > [ 2.800000] pci 0000:03:00.0: BAR 4: failed to assign [io size 0x0010] > [ 2.810000] pci 0000:03:00.0: BAR 0: no space for [io size 0x0008] > [ 2.820000] pci 0000:03:00.0: BAR 0: failed to assign [io size 0x0008] > [ 2.840000] pci 0000:03:00.0: BAR 2: no space for [io size 0x0008] > [ 2.850000] pci 0000:03:00.0: BAR 2: failed to assign [io size 0x0008] > [ 2.860000] pci 0000:03:00.0: BAR 1: no space for [io size 0x0004] > [ 2.870000] pci 0000:03:00.0: BAR 1: failed to assign [io size 0x0004] > [ 2.890000] pci 0000:03:00.0: BAR 3: no space for [io size 0x0004] > [ 2.900000] pci 0000:03:00.0: BAR 3: failed to assign [io size 0x0004] > [ 2.910000] pci 0000:00:02.0: PCI bridge to [bus 03] > [ 2.920000] pci 0000:00:02.0: bridge window [mem 0x60400000-0x604fffff] > [ 2.940000] pci 0000:00:02.0: bridge window [mem 0x60500000-0x605fffff pref] > [ 3.020000] SCSI subsystem initialized > [ 3.030000] random: fast init done > [ 3.040000] clocksource: Switched to clocksource GIC > [ 3.060000] NET: Registered protocol family 2 > [ 3.070000] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes) > [ 3.080000] TCP established hash table entries: 4096 (order: 2, 16384 bytes) > [ 3.100000] TCP bind hash table entries: 4096 (order: 3, 32768 bytes) > [ 3.110000] TCP: Hash tables configured (established 4096 bind 4096) > [ 3.120000] UDP hash table entries: 256 (order: 1, 8192 bytes) > [ 3.140000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes) > [ 3.150000] NET: Registered protocol family 1 > [ 8.130000] Initialise system trusted keyrings > [ 8.140000] workingset: timestamp_bits=30 max_order=17 bucket_order=0 > [ 8.270000] squashfs: version 4.0 (2009/01/31) Phillip Lougher > [ 8.280000] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc. > [ 8.310000] SGI XFS with security attributes, no debug enabled > [ 8.360000] Key type asymmetric registered > [ 8.370000] Asymmetric key parser 'x509' registered > [ 8.380000] bounce: pool size: 64 pages > [ 8.390000] io scheduler noop registered > [ 8.400000] io scheduler deadline registered (default) > [ 8.410000] io scheduler mq-deadline registered (default) > [ 8.420000] io scheduler kyber registered > [ 8.430000] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled > [ 8.460000] console [ttyS0] disabled > [ 8.460000] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 18, base_baud = 3125000) is a 16550A > [ 8.480000] console [ttyS0] enabled > [ 8.480000] console [ttyS0] enabled > [ 8.500000] bootconsole [early0] disabled > [ 8.500000] bootconsole [early0] disabled > [ 8.510000] cacheinfo: Failed to find cpu0 device node > [ 8.520000] cacheinfo: Unable to detect cache hierarchy for CPU 0 > [ 8.610000] loop: module loaded > [ 8.620000] pci 0000:00:00.0: enabling device (0004 -> 0006) > [ 8.630000] ahci 0000:01:00.0: enabling device (0000 -> 0002) > > > Though messages were a little different first time: > > [ 0.000000] Linux version 4.18.0-rc7+ (neilb@noble) (gcc version 7.2.0 (GCC)) #253 SMP Tue Jul 31 08:41:34 AEST 2018 > [ 0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3 > [ 0.000000] bootconsole [early0] enabled > [ 0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc) > [ 0.000000] MIPS: machine is GB-PC1 > [ 0.000000] Determined physical RAM map: > [ 0.000000] memory: 1c000000 @ 00000000 (usable) > [ 0.000000] memory: 04000000 @ 20000000 (usable) > [ 0.000000] Initrd not found or empty - disabling initrd > [ 0.000000] VPE topology {2,2} total 4 > [ 0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes. > [ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes > [ 0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes. > [ 0.000000] Zone ranges: > [ 0.000000] Normal [mem 0x0000000000000000-0x000000001fffffff] > [ 0.000000] HighMem [mem 0x0000000020000000-0x0000000023ffffff] > [ 0.000000] Movable zone start for each node > [ 0.000000] Early memory node ranges > [ 0.000000] node 0: [mem 0x0000000000000000-0x000000001bffffff] > [ 0.000000] node 0: [mem 0x0000000020000000-0x0000000023ffffff] > [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000023ffffff] > [ 0.000000] random: get_random_bytes called from start_kernel+0xb4/0x4ec with crng_init=0 > [ 0.000000] percpu: Embedded 15 pages/cpu @(ptrval) s30480 r8192 d22768 u61440 > [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 130048 > [ 0.000000] Kernel command line: console=ttyS0,57600 > [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) > [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) > [ 0.000000] Writing ErrCtl register=000108a2 > [ 0.000000] Readback ErrCtl register=000108a2 > [ 0.000000] Memory: 504788K/524288K available (6135K kernel code, 228K rwdata, 1052K rodata, 6524K init, 241K bss, 19500K reserved, 0K cma-reserved, 65536K highmem) > [ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 > [ 0.000000] Hierarchical RCU implementation. > [ 0.000000] NR_IRQS: 256 > [ 0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcf914c9718, max_idle_ns: 440795231327 ns > [ 0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns > [ 0.010000] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032) > [ 0.070000] pid_max: default: 32768 minimum: 301 > [ 0.080000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) > [ 0.090000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) > [ 0.100000] Hierarchical SRCU implementation. > [ 0.110000] smp: Bringing up secondary CPUs ... > [ 0.120000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes. > [ 0.120000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes > [ 0.120000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes. > [ 0.120000] CPU1 revision is: 0001992f (MIPS 1004Kc) > [ 0.180000] Synchronize counters for CPU 1: done. > [ 0.220000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes. > [ 0.220000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes > [ 0.220000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes. > [ 0.220000] CPU2 revision is: 0001992f (MIPS 1004Kc) > [ 0.280000] Synchronize counters for CPU 2: done. > [ 0.320000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes. > [ 0.320000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes > [ 0.320000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes. > [ 0.320000] CPU3 revision is: 0001992f (MIPS 1004Kc) > [ 0.380000] Synchronize counters for CPU 3: done. > [ 0.420000] smp: Brought up 1 node, 4 CPUs > [ 0.430000] devtmpfs: initialized > [ 0.480000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns > [ 0.490000] futex hash table entries: 1024 (order: 3, 32768 bytes) > [ 0.500000] pinctrl core: initialized pinctrl subsystem > [ 0.510000] NET: Registered protocol family 16 > [ 0.570000] mt7621-pci 1e140000.pcie: host bridge /pcie@1e140000 ranges: > [ 0.580000] mt7621-pci 1e140000.pcie: MEM 0x60000000..0x6fffffff -> 0x00000000 > [ 0.600000] mt7621-pci 1e140000.pcie: IO 0x1e160000..0x1e16ffff -> 0x00000000 > [ 0.910000] ***** Xtal 40MHz ***** > [ 0.920000] Port 0 N_FTS = 1b105000 > [ 0.930000] Port 1 N_FTS = 1b105000 > [ 0.930000] Port 2 N_FTS = 1b105000 > [ 1.990000] PCIE0 enabled > [ 2.000000] PCIE1 enabled > [ 2.000000] PCIE2 enabled > [ 2.010000] mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00 > [ 2.020000] pci_bus 0000:00: root bus resource [bus 00-ff] > [ 2.030000] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff] (bus address [0x00000000-0x0fffffff]) > [ 2.050000] pci 0000:00:00.0: reg 0x14: initial BAR value 0x60300000 invalid > [ 2.070000] pci 0000:00:01.0: reg 0x14: initial BAR value 0x60310000 invalid > [ 2.080000] pci 0000:00:02.0: reg 0x14: initial BAR value 0x60320000 invalid > [ 2.100000] pci 0000:00:00.0: PCI bridge to [bus 01-ff] > [ 2.110000] pci 0000:00:01.0: PCI bridge to [bus 02-ff] > [ 2.130000] pci 0000:00:02.0: PCI bridge to [bus 03-ff] > [ 2.140000] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000] > [ 2.150000] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000] > [ 2.160000] pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000] > [ 2.180000] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000] > [ 2.190000] pci 0000:00:02.0: BAR 0: no space for [mem size 0x80000000] > [ 2.200000] pci 0000:00:02.0: BAR 0: failed to assign [mem size 0x80000000] > [ 2.220000] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff] > [ 2.230000] pci 0000:00:01.0: BAR 8: assigned [mem 0x60100000-0x601fffff] > [ 2.240000] pci 0000:00:02.0: BAR 8: assigned [mem 0x60200000-0x602fffff] > [ 2.260000] pci 0000:00:00.0: BAR 1: assigned [mem 0x60300000-0x6030ffff] > [ 2.270000] pci 0000:00:01.0: BAR 1: assigned [mem 0x60310000-0x6031ffff] > [ 2.280000] pci 0000:00:02.0: BAR 1: assigned [mem 0x60320000-0x6032ffff] > [ 2.300000] pci 0000:00:00.0: BAR 7: no space for [io size 0x1000] > [ 2.310000] pci 0000:00:00.0: BAR 7: failed to assign [io size 0x1000] > [ 2.320000] pci 0000:00:01.0: BAR 7: no space for [io size 0x1000] > [ 2.330000] pci 0000:00:01.0: BAR 7: failed to assign [io size 0x1000] > [ 2.350000] pci 0000:00:02.0: BAR 7: no space for [io size 0x1000] > [ 2.360000] pci 0000:00:02.0: BAR 7: failed to assign [io size 0x1000] > [ 2.370000] pci 0000:01:00.0: BAR 5: assigned [mem 0x60000000-0x600001ff] > [ 2.390000] pci 0000:01:00.0: BAR 4: no space for [io size 0x0010] > [ 2.400000] pci 0000:01:00.0: BAR 4: failed to assign [io size 0x0010] > [ 2.410000] pci 0000:01:00.0: BAR 0: no space for [io size 0x0008] > [ 2.420000] pci 0000:01:00.0: BAR 0: failed to assign [io size 0x0008] > [ 2.440000] pci 0000:01:00.0: BAR 2: no space for [io size 0x0008] > [ 2.450000] pci 0000:01:00.0: BAR 2: failed to assign [io size 0x0008] > [ 2.460000] pci 0000:01:00.0: BAR 1: no space for [io size 0x0004] > [ 2.470000] pci 0000:01:00.0: BAR 1: failed to assign [io size 0x0004] > [ 2.490000] pci 0000:01:00.0: BAR 3: no space for [io size 0x0004] > [ 2.500000] pci 0000:01:00.0: BAR 3: failed to assign [io size 0x0004] > [ 2.510000] pci 0000:00:00.0: PCI bridge to [bus 01] > [ 2.520000] pci 0000:00:00.0: bridge window [mem 0x60000000-0x600fffff] > [ 2.530000] pci 0000:02:00.0: BAR 5: assigned [mem 0x60100000-0x601001ff] > [ 2.550000] pci 0000:02:00.0: BAR 4: no space for [io size 0x0010] > [ 2.560000] pci 0000:02:00.0: BAR 4: failed to assign [io size 0x0010] > [ 2.570000] pci 0000:02:00.0: BAR 0: no space for [io size 0x0008] > [ 2.590000] pci 0000:02:00.0: BAR 0: failed to assign [io size 0x0008] > [ 2.600000] pci 0000:02:00.0: BAR 2: no space for [io size 0x0008] > [ 2.610000] pci 0000:02:00.0: BAR 2: failed to assign [io size 0x0008] > [ 2.620000] pci 0000:02:00.0: BAR 1: no space for [io size 0x0004] > [ 2.640000] pci 0000:02:00.0: BAR 1: failed to assign [io size 0x0004] > [ 2.650000] pci 0000:02:00.0: BAR 3: no space for [io size 0x0004] > [ 2.660000] pci 0000:02:00.0: BAR 3: failed to assign [io size 0x0004] > [ 2.670000] pci 0000:00:01.0: PCI bridge to [bus 02] > [ 2.680000] pci 0000:00:01.0: bridge window [mem 0x60100000-0x601fffff] > [ 2.700000] pci 0000:03:00.0: BAR 5: assigned [mem 0x60200000-0x602001ff] > [ 2.710000] pci 0000:03:00.0: BAR 4: no space for [io size 0x0010] > [ 2.720000] pci 0000:03:00.0: BAR 4: failed to assign [io size 0x0010] > [ 2.740000] pci 0000:03:00.0: BAR 0: no space for [io size 0x0008] > [ 2.750000] pci 0000:03:00.0: BAR 0: failed to assign [io size 0x0008] > [ 2.760000] pci 0000:03:00.0: BAR 2: no space for [io size 0x0008] > [ 2.770000] pci 0000:03:00.0: BAR 2: failed to assign [io size 0x0008] > [ 2.790000] pci 0000:03:00.0: BAR 1: no space for [io size 0x0004] > [ 2.800000] pci 0000:03:00.0: BAR 1: failed to assign [io size 0x0004] > [ 2.810000] pci 0000:03:00.0: BAR 3: no space for [io size 0x0004] > [ 2.820000] pci 0000:03:00.0: BAR 3: failed to assign [io size 0x0004] > [ 2.840000] pci 0000:00:02.0: PCI bridge to [bus 03] > [ 2.850000] pci 0000:00:02.0: bridge window [mem 0x60200000-0x602fffff] > [ 2.930000] SCSI subsystem initialized > [ 2.940000] random: fast init done > [ 2.960000] clocksource: Switched to clocksource GIC > [ 2.990000] NET: Registered protocol family 2 > [ 3.000000] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes) > [ 3.020000] TCP established hash table entries: 4096 (order: 2, 16384 bytes) > [ 3.030000] TCP bind hash table entries: 4096 (order: 3, 32768 bytes) > [ 3.040000] TCP: Hash tables configured (established 4096 bind 4096) > [ 3.060000] UDP hash table entries: 256 (order: 1, 8192 bytes) > [ 3.070000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes) > [ 3.080000] NET: Registered protocol family 1 > [ 8.070000] Initialise system trusted keyrings > [ 8.080000] workingset: timestamp_bits=30 max_order=17 bucket_order=0 > [ 8.210000] squashfs: version 4.0 (2009/01/31) Phillip Lougher > [ 8.220000] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc. > [ 8.250000] SGI XFS with security attributes, no debug enabled > [ 8.300000] Key type asymmetric registered > [ 8.310000] Asymmetric key parser 'x509' registered > [ 8.320000] bounce: pool size: 64 pages > [ 8.330000] io scheduler noop registered > [ 8.330000] io scheduler deadline registered (default) > [ 8.340000] io scheduler mq-deadline registered (default) > [ 8.350000] io scheduler kyber registered > [ 8.370000] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled > [ 8.390000] console [ttyS0] disabled > [ 8.400000] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 18, base_baud = 3125000) is a 16550A > [ 8.420000] console [ttyS0] enabled > [ 8.420000] console [ttyS0] enabled > [ 8.430000] bootconsole [early0] disabled > [ 8.430000] bootconsole [early0] disabled > [ 8.450000] cacheinfo: Failed to find cpu0 device node > [ 8.460000] cacheinfo: Unable to detect cache hierarchy for CPU 0 > [ 8.550000] loop: module loaded > [ 8.560000] ahci 0000:01:00.0: enabling device (0000 -> 0002) > Second though... I think we should try together the two tests I have just described in my last email: - Get back the function to fix something about the memory resources - Call it from IO_MEMRESOURCE. - Move the dt parse function call after the initialization code. Because the N_FTS values are also different getting the ranges parse stuff before doing the init code. If we call it after that the trace should be pretty much the same as the one in the original code. Hope this helps. Best regards, Sergio Paracuellos _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel