All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hante Meuleman <meuleman@broadcom.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Will Deacon <will.deacon@arm.com>,
	Arend Van Spriel <arend@broadcom.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	David Miller <davem@davemloft.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	brcm80211-dev-list <brcm80211-dev-list@broadcom.com>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: RE: using DMA-API on ARM
Date: Mon, 8 Dec 2014 13:47:38 +0000	[thread overview]
Message-ID: <F51492713EF10846800D8C0ED37A7DCE01902076@SJEXCHMB15.corp.ad.broadcom.com> (raw)
In-Reply-To: <F51492713EF10846800D8C0ED37A7DCE01901765@SJEXCHMB15.corp.ad.broadcom.com>

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

Still using outlook, but will limit the line length, I hope that works for the
moment. Attached is a log with the requested information, it is a little
bit non-standard though. The dump code from the mm was copied in
the driver and called from there, mapping the prints back to our local
printf, but it should produce the same. I did this because I didn't realize
the table is static.

Some background on the test setup: I'm using a Broadcom reference 
design AP platform with an BRCM 4708 host SOC. For the AP router 
platform the opensource packet OpenWRT was used. Some small
modifications were made to get it to work on our HW. Only one core
is enabled for the moment (no time to figure out how to enable the
other one). Openwrt was configured to use kernel 3.18-rc2 and 
the brcmfmac of the compat-wireless code was updated with our 
latest code (minor patches, which have been submitted already). 
The device used is 43602 pcie device. Some modifications to the build
system were made to enable PCIE. The test is to connect with a 
client to the AP and run iperf (TCP). The test can run for many hours
without a problem, but sometimes fails very quickly.

The log: first the ring allocation info is printed. Starting at
16.124847, ring 2, 3 and 4 are rings used for device to host. In this
log the failure is on a read of ring 3. Ring 3 is 1024 entries of each
16 bytes. The next thing printed is the kernel page tables. Then some 
OpenWRT info and the logging of part of the connection setup. Then at 
1780.130752 the logging of the failure starts. The sequence number is 
modulo 253 with ring size of 1024 matches an "old" entry (read 40, 
expected 52). Then the different pointers are printed followed by 
the kernel page table. The code does then a cache invalidate on the 
dma_handle and the next read the sequence number is correct.

Regards,
Hante



Please wrap your message - replying to a message which looks like this in
my editor is far from easy, and gives me much more work to /manually/
reformat it before I can reply to it:

On Fri, Dec 05, 2014 at 12:56:45PM +0000, Hante Meuleman wrote:
> The problem is with data coming from device, so DMA from device to host. The $
>
> However: this indicates that dma_alloc_coherent on an ARM target may result i$
>
> Regards,
> Hante

Thanks.

On Fri, Dec 05, 2014 at 12:56:45PM +0000, Hante Meuleman wrote:
> However: this indicates that dma_alloc_coherent on an ARM target may
> result in a memory buffer which can be cached which conflicts with
> the API of this function.

If the memory has an alias which is cacheable, it is possible for cache
lines to get allocated via that alias, even if the alias has no explicit
accesses to it.

This is something which I've been going on for quite literally /years/ -
mismatched cache attributes can cause unpredictable behaviour.  I've had
a lot of push back from people who are of the opinion that "if it works
for me, then there isn't a problem" and I eventually gave up fighting
the battle, especially as the ARM architecture people weakened my
reasoning behind it by publishing a relaxation of the "no differing
attributes" issue.  This was particularly true of those who wanted to
use ioremap() on system memory - and cases such as
dma_init_coherent_memory().

So, I never fixed this problem in the original DMA allocator code; I
basically gave up with it.  It's a latent bug which did need to be fixed,
and is still present today in the non-CMA case.

The symptoms which you are reporting sound very much like this kind of
problem - the virtual address for the memory returned by
dma_alloc_coherent() will not be cacheable memory - it will have been
remapped using map_vm_area().  However, there could very well be a fully
cacheable lowmem mapping of that memory, which if a read (speculative or
otherwise) will bring a cache line in, and because the caches are VIPT
or PIPT, that cache line can be hit via the non-cacheable mapping too.

What I /really/ need is more evidence of this to tell those disbelievers
where to stick their flawed arguments. :)

-- 
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.

[-- Attachment #2: cache_fail_dmesg.txt --]
[-- Type: text/plain, Size: 35592 bytes --]

root@OpenWrt:/# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.18.0-rc2 (developer@meuleman-test) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r43121) ) #66 SMP Mon Dec 8 12:38:39 CET 2014
[    0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7),c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Buffalo WZR-1750DHP (BCM4708)
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat c038ee00, node_mem_map c7efb000
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] PERCPU: Embedded 9 pages/cpu @c7ee3000 s6528 r8192 d22144 u36864
[    0.000000] pcpu-alloc: s6528 r8192 d22144 u36864 alloc=9*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 125936K/131072K available (2682K kernel code, 103K rwdata, 744K rodata, 164K init, 188K bss, 5136K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xffe00000   (2048 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff000000   ( 872 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0360dc4   (3428 kB)
[    0.000000]       .init : 0xc0361000 - 0xc038a000   ( 164 kB)
[    0.000000]       .data : 0xc038a000 - 0xc03a3eb8   ( 104 kB)
[    0.000000]        .bss : 0xc03a3eb8 - 0xc03d2ebc   ( 189 kB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] PL310 OF: cache setting yield illegal associativity
[    0.000000] PL310 OF: -1069781724 calculated, only 8 and 16 legal
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 cache controller enabled, 16 ways, 256 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x4e130001
[    0.000017] sched_clock: 64 bits at 400MHz, resolution 2ns, wraps every 2748779069440ns
[    0.000315] Calibrating delay loop... 1594.16 BogoMIPS (lpj=7970816)
[    0.090133] pid_max: default: 32768 minimum: 301
[    0.090299] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090312] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090822] CPU: Testing write buffer coherency: ok
[    0.091084] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.091152] Setting up static identity map for 0x11728 - 0x1175c
[    0.092455] Brought up 1 CPUs
[    0.092471] SMP: Total of 1 processors activated.
[    0.092481] CPU: All CPU(s) started in SVC mode.
[    0.099682] NET: Registered protocol family 16
[    0.100425] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.106341] usbcore: registered new interface driver usbfs
[    0.106422] usbcore: registered new interface driver hub
[    0.106500] usbcore: registered new device driver usb
[    0.107259] Switched to clocksource arm_global_timer
[    0.108567] NET: Registered protocol family 2
[    0.109224] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.109251] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.109278] TCP: Hash tables configured (established 1024 bind 1024)
[    0.109350] TCP: reno registered
[    0.109368] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.109404] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.109669] NET: Registered protocol family 1
[    0.109737] PCI: CLS 0 bytes, default 64
[    0.110768] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.111905] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.111932] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.112155] msgmni has been set to 245
[    0.113050] io scheduler noop registered
[    0.113073] io scheduler deadline registered (default)
[    0.113329] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.113952] console [ttyS0] disabled
[    0.114026] of_serial 18000300.serial: ttyS0 at MMIO 0x18000300 (irq = 117, base_baud = 6250000) is a 16550
[    0.514919] console [ttyS0] enabled
[    0.518713] of_serial 18000400.serial: ttyS1 at MMIO 0x18000400 (irq = 117, base_baud = 6250000) is a 16550
[    0.603994] no nvram found
[    0.606975] Unsupported SPROM revision 0 detected. Will extract v1
[    0.613693] bcmnand: Broadcom NAND Controller driver loaded
[    0.620439] bgmac: Broadcom 47xx GBit MAC driver loaded
[    0.625723] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.632256] ehci-pci: EHCI PCI platform driver
[    0.636742] ehci-platform: EHCI generic platform driver
[    0.642218] bcma: bus0: Found chip with id 53010, rev 0x00 and package 0x02
[    0.649209] bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x2A, class 0x0)
[    0.657791] bcma: bus0: Core 1 found: Chipcommon B (manuf 0x4BF, id 0x50B, rev 0x01, class 0x0)
[    0.666522] bcma: bus0: Core 2 found: DMA (manuf 0x4BF, id 0x502, rev 0x01, class 0x0)
[    0.674477] bcma: bus0: Core 3 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x05, class 0x0)
[    0.682858] bcma: bus0: Core 4 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x05, class 0x0)
[    0.691249] bcma: bus0: Core 5 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x05, class 0x0)
[    0.699635] bcma: bus0: Core 6 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x05, class 0x0)
[    0.707993] bcma: bus0: Core 7 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x01, class 0x0)
[    0.716528] bcma: bus0: Core 8 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x01, class 0x0)
[    0.725074] bcma: bus0: Core 9 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x01, class 0x0)
[    0.733641] bcma: bus0: Core 10 found: ARM Cortex A9 core (ihost) (manuf 0x4BF, id 0x510, rev 0x01, class 0x0)
[    0.743658] bcma: bus0: Core 11 found: USB 2.0 (manuf 0x4BF, id 0x504, rev 0x01, class 0x0)
[    0.752036] bcma: bus0: Core 12 found: USB 3.0 (manuf 0x4BF, id 0x505, rev 0x01, class 0x0)
[    0.760426] bcma: bus0: Core 13 found: SDIO3 (manuf 0x4BF, id 0x503, rev 0x01, class 0x0)
[    0.768626] bcma: bus0: Core 14 found: ARM Cortex A9 JTAG (manuf 0x4BF, id 0x506, rev 0x01, class 0x0)
[    0.777962] bcma: bus0: Core 15 found: Denali DDR2/DDR3 memory controller (manuf 0x4BF, id 0x507, rev 0x01, class 0x0)
[    0.788681] bcma: bus0: Core 16 found: ROM (manuf 0x4BF, id 0x508, rev 0x01, class 0x0)
[    0.796726] bcma: bus0: Core 17 found: NAND flash controller (manuf 0x4BF, id 0x509, rev 0x01, class 0x0)
[    0.806325] bcma: bus0: Core 18 found: SPI flash controller (manuf 0x4BF, id 0x50A, rev 0x01, class 0x0)
[    0.820252] bcmnand: NAND Controller rev 6.1
[    0.840228] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xdc
[    0.846565] nand: Micron NAND 512MiB 3,3V 8-bit
[    0.851094] nand: 512MiB, SLC, page size: 2048, OOB size: 64
[    1.220976] bcm53xxspiflash spi32766.0: mx25l25635e (32768 Kbytes)
[    2.585498] next_part_offset limited to 1000000
[    2.590014] 5 bcm47xxpart partitions found on MTD device spi32766.0
[    2.596260] Creating 5 MTD partitions on "spi32766.0":
[    2.601389] 0x000000000000-0x000000040000 : "boot"
[    2.606848] 0x000000040000-0x000000ff0000 : "firmware"
[    2.612569] 0x00000004001c-0x000000184c00 : "linux"
[    2.617429] mtd: partition "linux" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    2.630415] 0x000000184c00-0x000000ff0000 : "rootfs"
[    2.635364] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    2.648435] mtd: device 4 (rootfs) set to be root filesystem
[    2.654360] 1 squashfs-split partitions found on MTD device rootfs
[    2.660542] 0x000000450000-0x000000ff0000 : "rootfs_data"
[    2.666561] 0x000000ff0000-0x000001000000 : "nvram"
[    2.672108] bcma: bus0: Found sprom from device tree provider
[    2.678032] bgmac bcma0:3: Invalid MAC addr: 00:00:00:00:00:00
[    2.683900] bgmac bcma0:3: Using random MAC: a2:68:1a:ca:99:26
[    2.689770] bgmac bcma0:3: Found PHY addr: 0
[    2.698590] libphy: bgmac mii bus: probed
[    2.781466] b53_common: found switch: BCM53011, rev 3
[    2.787094] netif_napi_add() called with weight 128 on device eth0
[    2.793422] bgmac bcma0:4: Invalid MAC addr: 00:00:00:00:00:00
[    2.799255] bgmac bcma0:4: Using random MAC: 6a:b7:e9:ad:58:4c
[    2.805138] bgmac bcma0:4: Found PHY addr: 0
[    2.812607] libphy: bgmac mii bus: probed
[    2.890939] bgmac: Unsupported core_unit 2
[    2.895033] bgmac: probe of bcma0:5 failed with error -524
[    2.900619] bgmac: Unsupported core_unit 3
[    2.904704] bgmac: probe of bcma0:6 failed with error -524
[    2.910271] pcie2_bcma bcma0:7: scanning bus
[    3.164199] pcie2_bcma bcma0:7: switching to GEN2
[    3.418495] pcie2_bcma bcma0:7: PCI host bridge to bus 0000:00
[    3.424332] pci_bus 0000:00: root bus resource [mem 0x08000000-0x0fffffff]
[    3.431189] pci_bus 0000:00: root bus resource [io  0x8000000-0xfffffff]
[    3.437859] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    3.445774] pci 0000:00:00.0: [14e4:8011] type 01 class 0x060400
[    3.445842] pci 0000:00:00.0: PME# supported from D0 D3hot D3cold
[    3.446051] PCI: bus0: Fast back to back transfers disabled
[    3.451757] pci 0000:01:00.0: [14e4:43bc] type 00 class 0x028000
[    3.451792] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00007fff 64bit]
[    3.451815] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x003fffff 64bit]
[    3.451908] pci 0000:01:00.0: supports D1 D2
[    3.451920] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    3.452102] PCI: bus1: Fast back to back transfers disabled
[    3.457657] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    3.457675] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    3.457724] pci 0000:00:00.0: BAR 8: assigned [mem 0x08000000-0x085fffff]
[    3.464514] pci 0000:01:00.0: BAR 2: assigned [mem 0x08000000-0x083fffff 64bit]
[    3.471808] pci 0000:01:00.0: BAR 0: assigned [mem 0x08400000-0x08407fff 64bit]
[    3.479098] pci 0000:00:00.0: PCI bridge to [bus 01]
[    3.484050] pci 0000:00:00.0:   bridge window [mem 0x08000000-0x085fffff]
[    3.490879] pci 0000:01:00.0: Max Payload Size 128, but upstream 0000:00:00.0 set to 512; if necessary, use "pci=pcie_bus_safe" and report a bug
[    3.503894] pcie2_bcma bcma0:8: scanning bus
[    3.757879] pcie2_bcma bcma0:9: scanning bus
[    4.012438] bcma: bus0: Bus registered
[    4.016517] TCP: cubic registered
[    4.019832] NET: Registered protocol family 17
[    4.024381] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    4.036954] 8021q: 802.1Q VLAN Support v1.8
[    4.041208] Registering SWP/SWPB emulation handler
[    4.064654] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[   926] Freeing unused kernel memory: 164K (c0361000 - c038a000)
[    6.136424] gpio-keys gpio-keys: failed to request irq:-6 for gpio:11
[    6.142919] gpio-keys gpio-keys: failed to request irq:-6 for gpio:12
[    6.149333] gpio-keys gpio-keys: failed to request irq:-6 for gpio:13
[    6.155756] gpio-keys gpio-keys: failed to request irq:-6 for gpio:14
[    6.162180] gpio-keys gpio-keys: failed to request irq:-6 for gpio:15
[    6.234566] random: mktemp urandom read with 41 bits of entropy available
[    9.650068] jffs2: notice: (288) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    9.666442] overlayfs: missing upperdir or lowerdir or workdir
[   14.159733] Loading modules backported from Linux version master-2014-10-08-0-g0275925
[   14.167681] Backport generated by backports.git backports-20140905-1-gde42785
[   14.180633] cfg80211: Calling CRDA to update world regulatory domain
[   14.192280] cfg80211: World regulatory domain updated:
[   14.197413] cfg80211:  DFS Master region: unset
[   14.201802] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   14.211517] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   14.219481] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   14.227454] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[   14.235427] cfg80211:   (5170000 KHz - 5250000 KHz @ 160000 KHz), (N/A, 2000 mBm), (N/A)
[   14.243489] cfg80211:   (5250000 KHz - 5330000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   14.251551] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   14.259604] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   14.267577] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[   14.289862] usbcore: registered new interface driver brcmfmac
[   14.295733] brcmfmac 0000:01:00.0: enabling device (0140 -> 0142)
[   15.325236] brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac43602-pcie.txt failed with error -2
[   16.124847] brcmfmac: brcmf_pcie_alloc_dma_and_ring: RING 0: virtual address: c8ccf000, physical address:   (null):06c06000
[   16.136056] brcmfmac: brcmf_pcie_alloc_dma_and_ring: RING 1: virtual address: c8cd1000, physical address:   (null):06c12000
[   16.147179] brcmfmac: brcmf_pcie_alloc_dma_and_ring: RING 2: virtual address: c8cd4000, physical address:   (null):06c07000
[   16.158377] brcmfmac: brcmf_pcie_alloc_dma_and_ring: RING 3: virtual address: c8cd6000, physical address:   (null):073bc000
[   16.169526] brcmfmac: brcmf_pcie_alloc_dma_and_ring: RING 4: virtual address: c8cdb000, physical address:   (null):06c14000
[   16.301412] brcmfmac: brcmf_msgbuf_rxbuf_data_post: Failed to reserve space in commonring
[   16.321273] brcmfmac: localseq_vprintf: ---[ Modules ]---
[   16.326768] brcmfmac: localseq_vprintf: 0xbf000000-0xbf002000           8K     RW x  SHD MEM/CACHED/WBWA
[   16.336242] brcmfmac: localseq_vprintf: 0xbf005000-0xbf007000           8K     RW x  SHD MEM/CACHED/WBWA
[   16.345696] brcmfmac: localseq_vprintf: 0xbf00a000-0xbf00b000           4K     RW x  SHD MEM/CACHED/WBWA
[   16.355147] brcmfmac: localseq_vprintf: 0xbf00e000-0xbf03d000         188K     RW x  SHD MEM/CACHED/WBWA
[   16.364599] brcmfmac: localseq_vprintf: 0xbf046000-0xbf06f000         164K     RW x  SHD MEM/CACHED/WBWA
[   16.374064] brcmfmac: localseq_vprintf: ---[ Kernel Mapping ]---
[   16.380045] brcmfmac: localseq_vprintf: 0xc0000000-0xc0400000           4M     RW x  SHD
[   16.388113] brcmfmac: localseq_vprintf: 0xc0400000-0xc8000000         124M     RW NX SHD
[   16.396168] brcmfmac: localseq_vprintf: ---[ vmalloc() Area ]---
[   16.402163] brcmfmac: localseq_vprintf: 0xc8800000-0xc8801000           4K     RW NX SHD DEV/SHARED
[   16.411173] brcmfmac: localseq_vprintf: 0xc8802000-0xc8803000           4K     RW NX SHD DEV/SHARED
[   16.420184] brcmfmac: localseq_vprintf: 0xc8804000-0xc8805000           4K     RW NX SHD DEV/SHARED
[   16.429188] brcmfmac: localseq_vprintf: 0xc8806000-0xc8807000           4K     RW NX SHD DEV/SHARED
[   16.438200] brcmfmac: localseq_vprintf: 0xc8808000-0xc8809000           4K     RW NX SHD DEV/SHARED
[   16.447215] brcmfmac: localseq_vprintf: 0xc880e000-0xc884e000         256K     RW NX SHD MEM/BUFFERABLE/WC
[   16.456840] brcmfmac: localseq_vprintf: 0xc884f000-0xc8895000         280K     RW NX SHD MEM/CACHED/WBWA
[   16.466287] brcmfmac: localseq_vprintf: 0xc8896000-0xc8897000           4K     RW NX SHD DEV/SHARED
[   16.475299] brcmfmac: localseq_vprintf: 0xc8898000-0xc8899000           4K     RW NX SHD DEV/SHARED
[   16.484310] brcmfmac: localseq_vprintf: 0xc889a000-0xc889b000           4K     RW NX SHD DEV/SHARED
[   16.493322] brcmfmac: localseq_vprintf: 0xc889e000-0xc889f000           4K     RW NX SHD DEV/SHARED
[   16.502335] brcmfmac: localseq_vprintf: 0xc88a0000-0xc88a1000           4K     RW NX SHD DEV/SHARED
[   16.511345] brcmfmac: localseq_vprintf: 0xc88a2000-0xc88a3000           4K     RW NX SHD DEV/SHARED
[   16.520357] brcmfmac: localseq_vprintf: 0xc88a4000-0xc88a5000           4K     RW NX SHD DEV/SHARED
[   16.529361] brcmfmac: localseq_vprintf: 0xc88a6000-0xc88a7000           4K     RW NX SHD DEV/SHARED
[   16.538372] brcmfmac: localseq_vprintf: 0xc88a8000-0xc88a9000           4K     RW NX SHD DEV/SHARED
[   16.547382] brcmfmac: localseq_vprintf: 0xc88aa000-0xc88ab000           4K     RW NX SHD DEV/SHARED
[   16.556394] brcmfmac: localseq_vprintf: 0xc88ac000-0xc88ad000           4K     RW NX SHD DEV/SHARED
[   16.565404] brcmfmac: localseq_vprintf: 0xc88ae000-0xc88af000           4K     RW NX SHD DEV/SHARED
[   16.574417] brcmfmac: localseq_vprintf: 0xc88b0000-0xc88b1000           4K     RW NX SHD DEV/SHARED
[   16.583428] brcmfmac: localseq_vprintf: 0xc88b2000-0xc88b3000           4K     RW NX SHD DEV/SHARED
[   16.592441] brcmfmac: localseq_vprintf: 0xc88b4000-0xc88b5000           4K     RW NX SHD DEV/SHARED
[   16.601451] brcmfmac: localseq_vprintf: 0xc88b6000-0xc88b7000           4K     RW NX SHD DEV/SHARED
[   16.610464] brcmfmac: localseq_vprintf: 0xc88b8000-0xc88b9000           4K     RW NX SHD DEV/SHARED
[   16.619467] brcmfmac: localseq_vprintf: 0xc88ba000-0xc88bb000           4K     RW NX SHD DEV/SHARED
[   16.628478] brcmfmac: localseq_vprintf: 0xc88bc000-0xc88bd000           4K     RW NX SHD DEV/SHARED
[   16.637490] brcmfmac: localseq_vprintf: 0xc88be000-0xc88bf000           4K     RW NX SHD DEV/SHARED
[   16.646503] brcmfmac: localseq_vprintf: 0xc88c0000-0xc88c1000           4K     RW NX SHD DEV/SHARED
[   16.655512] brcmfmac: localseq_vprintf: 0xc88c2000-0xc88c3000           4K     RW NX SHD DEV/SHARED
[   16.664524] brcmfmac: localseq_vprintf: 0xc88c4000-0xc88c5000           4K     RW NX SHD DEV/SHARED
[   16.673535] brcmfmac: localseq_vprintf: 0xc88c6000-0xc88c7000           4K     RW NX SHD DEV/SHARED
[   16.682547] brcmfmac: localseq_vprintf: 0xc88c8000-0xc88c9000           4K     RW NX SHD DEV/SHARED
[   16.691558] brcmfmac: localseq_vprintf: 0xc88ca000-0xc88cb000           4K     RW NX SHD DEV/SHARED
[   16.700569] brcmfmac: localseq_vprintf: 0xc88cc000-0xc88cd000           4K     RW NX SHD DEV/SHARED
[   16.709573] brcmfmac: localseq_vprintf: 0xc88ce000-0xc88cf000           4K     RW NX SHD DEV/SHARED
[   16.718585] brcmfmac: localseq_vprintf: 0xc88d0000-0xc88d1000           4K     RW NX SHD DEV/SHARED
[   16.727596] brcmfmac: localseq_vprintf: 0xc88d2000-0xc88d3000           4K     RW NX SHD DEV/SHARED
[   16.736608] brcmfmac: localseq_vprintf: 0xc88d4000-0xc88d5000           4K     RW NX SHD DEV/SHARED
[   16.745618] brcmfmac: localseq_vprintf: 0xc88d6000-0xc88d7000           4K     RW NX SHD DEV/SHARED
[   16.754631] brcmfmac: localseq_vprintf: 0xc88d8000-0xc88d9000           4K     RW NX SHD DEV/SHARED
[   16.763642] brcmfmac: localseq_vprintf: 0xc88da000-0xc88db000           4K     RW NX SHD DEV/SHARED
[   16.772654] brcmfmac: localseq_vprintf: 0xc88dc000-0xc88dd000           4K     RW NX SHD DEV/SHARED
[   16.781665] brcmfmac: localseq_vprintf: 0xc88de000-0xc88df000           4K     RW NX SHD DEV/SHARED
[   16.790677] brcmfmac: localseq_vprintf: 0xc88e0000-0xc88e1000           4K     RW NX SHD DEV/SHARED
[   16.799680] brcmfmac: localseq_vprintf: 0xc88e2000-0xc88e3000           4K     RW NX SHD DEV/SHARED
[   16.808691] brcmfmac: localseq_vprintf: 0xc88e4000-0xc88e5000           4K     RW NX SHD DEV/SHARED
[   16.817703] brcmfmac: localseq_vprintf: 0xc88e6000-0xc88e7000           4K     RW NX SHD DEV/SHARED
[   16.826714] brcmfmac: localseq_vprintf: 0xc88e8000-0xc88e9000           4K     RW NX SHD DEV/SHARED
[   16.835725] brcmfmac: localseq_vprintf: 0xc88ea000-0xc88ec000           8K     RW NX SHD MEM/BUFFERABLE/WC
[   16.845343] brcmfmac: localseq_vprintf: 0xc88ed000-0xc88ef000           8K     RW NX SHD MEM/BUFFERABLE/WC
[   16.854959] brcmfmac: localseq_vprintf: 0xc88f0000-0xc88f2000           8K     RW NX SHD MEM/BUFFERABLE/WC
[   16.864575] brcmfmac: localseq_vprintf: 0xc88f3000-0xc88f5000           8K     RW NX SHD MEM/BUFFERABLE/WC
[   16.874191] brcmfmac: localseq_vprintf: 0xc88f6000-0xc88f8000           8K     RW NX SHD MEM/BUFFERABLE/WC
[   16.883807] brcmfmac: localseq_vprintf: 0xc88fa000-0xc88fb000           4K     RW NX SHD DEV/SHARED
[   16.892819] brcmfmac: localseq_vprintf: 0xc88fc000-0xc88fe000           8K     RW NX SHD MEM/BUFFERABLE/WC
[   16.902435] brcmfmac: localseq_vprintf: 0xc88ff000-0xc8901000           8K     RW NX SHD MEM/BUFFERABLE/WC
[   16.912051] brcmfmac: localseq_vprintf: 0xc8902000-0xc8904000           8K     RW NX SHD MEM/BUFFERABLE/WC
[   16.921667] brcmfmac: localseq_vprintf: 0xc8905000-0xc8907000           8K     RW NX SHD MEM/BUFFERABLE/WC
[   16.931285] brcmfmac: localseq_vprintf: 0xc8908000-0xc890a000           8K     RW NX SHD MEM/BUFFERABLE/WC
[   16.940901] brcmfmac: localseq_vprintf: 0xc890b000-0xc890e000          12K     RW NX SHD MEM/CACHED/WBWA
[   16.950347] brcmfmac: localseq_vprintf: 0xc890f000-0xc894f000         256K     RW NX SHD MEM/CACHED/WBWA
[   16.959792] brcmfmac: localseq_vprintf: 0xc8950000-0xc8990000         256K     RW NX SHD MEM/CACHED/WBWA
[   16.969256] brcmfmac: localseq_vprintf: 0xc8aa0000-0xc8aa8000          32K     RW NX SHD DEV/SHARED
[   16.978298] brcmfmac: localseq_vprintf: 0xc8ccf000-0xc8cd0000           4K     RW NX SHD MEM/BUFFERABLE/WC
[   16.987920] brcmfmac: localseq_vprintf: 0xc8cd1000-0xc8cd3000           8K     RW NX SHD MEM/BUFFERABLE/WC
[   16.997536] brcmfmac: localseq_vprintf: 0xc8cd4000-0xc8cd5000           4K     RW NX SHD MEM/BUFFERABLE/WC
[   17.007152] brcmfmac: localseq_vprintf: 0xc8cd6000-0xc8cda000          16K     RW NX SHD MEM/BUFFERABLE/WC
[   17.016778] brcmfmac: localseq_vprintf: 0xc8cdb000-0xc8cdd000           8K     RW NX SHD MEM/BUFFERABLE/WC
[   17.026394] brcmfmac: localseq_vprintf: 0xc8cde000-0xc8cdf000           4K     RW NX SHD MEM/BUFFERABLE/WC
[   17.036009] brcmfmac: localseq_vprintf: 0xc8ce0000-0xc8ce1000           4K     RW NX SHD MFERABLE/WC
[   17.045626] brcmfmac: localseq_vprintf: 0xc8ce5000-0xc8ce6000           4K     RW NX SHD MEM/BUFFERABLE/WC
[   17.055524] brcmfmac: localseq_vprintf: 0xca800000-0xcac00000           4M     RW NX SHD DEV/SHARED
[   17.064597] brcmfmac: localseq_vprintf: 0xfedee000-0xfedf1000          12K     RW NX SHD MEM/CACHED/WBWA
[   17.074046] brcmfmac: localseq_vprintf: 0xfedf7000-0xfedfa000          12K     RW NX SHD MEM/CACHED/WBWA
[   17.083499] brcmfmac: localseq_vprintf: ---[ vmalloc() End ]---
[   17.089392] brcmfmac: localseq_vprintf: ---[ Fixmap Area ]---
[   17.095145] brcmfmac: localseq_vprintf: ---[ Vectors ]---
[   17.100534] brcmfmac: localseq_vprintf: 0xffff0000-0xffff1000           4K USR ro x  SHD MEM/CACHED/WBWA
[   17.109969] brcmfmac: localseq_vprintf: 0xffff1000-0xffff2000           4K     ro x  SHD MEM/CACHED/WBWA
[   17.119406] brcmfmac: localseq_vprintf: ---[ Vectors End ]---
[   20.683755] device eth0.1 entered promiscuous mode
[   20.688542] device eth0 entered promiscuous mode
[   20.714866] br-lan: port 1(eth0.1) entered forwarding state
[   20.720475] br-lan: port 1(eth0.1) entered forwarding state
[   22.720161] br-lan: port 1(eth0.1) entered forwarding state
[   22.829502] brcmfmac: brcmf_add_if: ERROR: netdev:wlan0 already exists
[   22.836043] brcmfmac: brcmf_add_if: ignore IF event
[   22.851645] device wlan0 entered promiscuous mode
[   22.856391] br-lan: port 2(wlan0) entered forwarding state
[   22.861913] br-lan: port 2(wlan0) entered forwarding state
[   23.060471] brcmfmac: brcmf_add_if: ERROR: netdev:wlan0 already exists
[   23.066977] brcmfmac: brcmf_add_if: ignore IF event
[   24.870181] br-lan: port 2(wlan0) entered forwarding state
[   35.830824] brcmfmac: brcmf_cfg80211_change_station: Change station, MAC 00:90:4c:0c:c1:54
[   35.839157] brcmfmac: brcmf_cfg80211_change_station: Change station, mask 0x001c set 0x0000
[   48.582775] random: nonblocking pool is initialized
[ 1780.130752] brcmfmac: brcmf_sync_seqnum: Sequence number failure (expected 52, read 40)
[ 1780.138733] brcmfmac: brcmf_sync_seqnum: Sequence number pointer c8cd600c, as part of struct at address c8cd6000
[ 1780.148891] brcmfmac: brcmf_sync_seqnum: Struct size 16
[ 1780.154102] brcmfmac: brcmf_sync_seqnum: dma_handle of ring:   (null):073bc000, dma_to_pfn(dma_handle): 0x000073bc
[ 1780.164321] brcmfmac: brcmf_sync_seqnum: PHYS_PFN_OFFSET: 0x00000000
[ 1780.171601] brcmfmac: brcmf_sync_seqnum: ========= walk_pgd(): ==========
[ 1780.178361] brcmfmac: localseq_vprintf: ---[ Modules ]---
[ 1780.183851] brcmfmac: localseq_vprintf: 0xbf000000-0xbf002000           8K     RW x  SHD MEM/CACHED/WBWA
[ 1780.193308] brcmfmac: localseq_vprintf: 0xbf005000-0xbf007000           8K     RW x  SHD MEM/CACHED/WBWA
[ 1780.202756] brcmfmac: localseq_vprintf: 0xbf00a000-0xbf00b000           4K     RW x  SHD MEM/CACHED/WBWA
[ 1780.212210] brcmfmac: localseq_vprintf: 0xbf00e000-0xbf03d000         188K     RW x  SHD MEM/CACHED/WBWA
[ 1780.221663] brcmfmac: localseq_vprintf: 0xbf046000-0xbf06f000         164K     RW x  SHD MEM/CACHED/WBWA
[ 1780.231128] brcmfmac: localseq_vprintf: ---[ Kernel Mapping ]---
[ 1780.237109] brcmfmac: localseq_vprintf: 0xc0000000-0xc0400000           4M     RW x  SHD
[ 1780.245176] brcmfmac: localseq_vprintf: 0xc0400000-0xc8000000         124M     RW NX SHD
[ 1780.253234] brcmfmac: localseq_vprintf: ---[ vmalloc() Area ]---
[ 1780.259217] brcmfmac: localseq_vprintf: 0xc8800000-0xc8801000           4K     RW NX SHD DEV/SHARED
[ 1780.268228] brcmfmac: localseq_vprintf: 0xc8802000-0xc8803000           4K     RW NX SHD DEV/SHARED
[ 1780.277240] brcmfmac: localseq_vprintf: 0xc8804000-0xc8805000           4K     RW NX SHD DEV/SHARED
[ 1780.286250] brcmfmac: localseq_vprintf: 0xc8806000-0xc8807000           4K     RW NX SHD DEV/SHARED
[ 1780.295263] brcmfmac: localseq_vprintf: 0xc8808000-0xc8809000           4K     RW NX SHD DEV/SHARED
[ 1780.304278] brcmfmac: localseq_vprintf: 0xc880e000-0xc884e000         256K     RW NX SHD MEM/BUFFERABLE/WC
[ 1780.313903] brcmfmac: localseq_vprintf: 0xc884f000-0xc8895000         280K     RW NX SHD MEM/CACHED/WBWA
[ 1780.323351] brcmfmac: localseq_vprintf: 0xc8896000-0xc8897000           4K     RW NX SHD DEV/SHARED
[ 1780.332362] brcmfmac: localseq_vprintf: 0xc8898000-0xc8899000           4K     RW NX SHD DEV/SHARED
[ 1780.341375] brcmfmac: localseq_vprintf: 0xc889a000-0xc889b000           4K     RW NX SHD DEV/SHARED
[ 1780.350378] brcmfmac: localseq_vprintf: 0xc889e000-0xc889f000           4K     RW NX SHD DEV/SHARED
[ 1780.359389] brcmfmac: localseq_vprintf: 0xc88a0000-0xc88a1000           4K     RW NX SHD DEV/SHARED
[ 1780.368400] brcmfmac: localseq_vprintf: 0xc88a2000-0xc88a3000           4K     RW NX SHD DEV/SHARED
[ 1780.377411] brcmfmac: localseq_vprintf: 0xc88a4000-0xc88a5000           4K     RW NX SHD DEV/SHARED
[ 1780.386423] brcmfmac: localseq_vprintf: 0xc88a6000-0xc88a7000           4K     RW NX SHD DEV/SHARED
[ 1780.395434] brcmfmac: localseq_vprintf: 0xc88a8000-0xc88a9000           4K     RW NX SHD DEV/SHARED
[ 1780.404459] brcmfmac: localseq_vprintf: 0xc88aa000-0xc88ab000           4K     RW NX SHD DEV/SHARED
[ 1780.413477] brcmfmac: localseq_vprintf: 0xc88ac000-0xc88ad000           4K     RW NX SHD DEV/SHARED
[ 1780.422495] brcmfmac: localseq_vprintf: 0xc88ae000-0xc88af000           4K     RW NX SHD DEV/SHARED
[ 1780.431507] brcmfmac: localseq_vprintf: 0xc88b0000-0xc88b1000           4K     RW NX SHD DEV/SHARED
[ 1780.440510] brcmfmac: localseq_vprintf: 0xc88b2000-0xc88b3000           4K     RW NX SHD DEV/SHARED
[ 1780.449522] brcmfmac: localseq_vprintf: 0xc88b4000-0xc88b5000           4K     RW NX SHD DEV/SHARED
[ 1780.458533] brcmfmac: localseq_vprintf: 0xc88b6000-0xc88b7000           4K     RW NX SHD DEV/SHARED
[ 1780.467544] brcmfmac: localseq_vprintf: 0xc88b8000-0xc88b9000           4K     RW NX SHD DEV/SHARED
[ 1780.476556] brcmfmac: localseq_vprintf: 0xc88ba000-0xc88bb000           4K     RW NX SHD DEV/SHARED
[ 1780.485566] brcmfmac: localseq_vprintf: 0xc88bc000-0xc88bd000           4K     RW NX SHD DEV/SHARED
[ 1780.494579] brcmfmac: localseq_vprintf: 0xc88be000-0xc88bf000           4K     RW NX SHD DEV/SHARED
[ 1780.503590] brcmfmac: localseq_vprintf: 0xc88c0000-0xc88c1000           4K     RW NX SHD DEV/SHARED
[ 1780.512601] brcmfmac: localseq_vprintf: 0xc88c2000-0xc88c3000           4K     RW NX SHD DEV/SHARED
[ 1780.521613] brcmfmac: localseq_vprintf: 0xc88c4000-0xc88c5000           4K     RW NX SHD DEV/SHARED
[ 1780.530624] brcmfmac: localseq_vprintf: 0xc88c6000-0xc88c7000           4K     RW NX SHD DEV/SHARED
[ 1780.539629] brcmfmac: localseq_vprintf: 0xc88c8000-0xc88c9000           4K     RW NX SHD DEV/SHARED
[ 1780.548639] brcmfmac: localseq_vprintf: 0xc88ca000-0xc88cb000           4K     RW NX SHD DEV/SHARED
[ 1780.557651] brcmfmac: localseq_vprintf: 0xc88cc000-0xc88cd000           4K     RW NX SHD DEV/SHARED
[ 1780.566662] brcmfmac: localseq_vprintf: 0xc88ce000-0xc88cf000           4K     RW NX SHD DEV/SHARED
[ 1780.575673] brcmfmac: localseq_vprintf: 0xc88d0000-0xc88d1000           4K     RW NX SHD DEV/SHARED
[ 1780.584686] brcmfmac: localseq_vprintf: 0xc88d2000-0xc88d3000           4K     RW NX SHD DEV/SHARED
[ 1780.593697] brcmfmac: localseq_vprintf: 0xc88d4000-0xc88d5000           4K     RW NX SHD DEV/SHARED
[ 1780.602708] brcmfmac: localseq_vprintf: 0xc88d6000-0xc88d7000           4K     RW NX SHD DEV/SHARED
[ 1780.611720] brcmfmac: localseq_vprintf: 0xc88d8000-0xc88d9000           4K     RW NX SHD DEV/SHARED
[ 1780.620731] brcmfmac: localseq_vprintf: 0xc88da000-0xc88db000           4K     RW NX SHD DEV/SHARED
[ 1780.629734] brcmfmac: localseq_vprintf: 0xc88dc000-0xc88dd000           4K     RW NX SHD DEV/SHARED
[ 1780.638746] brcmfmac: localseq_vprintf: 0xc88de000-0xc88df000           4K     RW NX SHD DEV/SHARED
[ 1780.647759] brcmfmac: localseq_vprintf: 0xc88e0000-0xc88e1000           4K     RW NX SHD DEV/SHARED
[ 1780.656768] brcmfmac: localseq_vprintf: 0xc88e2000-0xc88e3000           4K     RW NX SHD DEV/SHARED
[ 1780.665779] brcmfmac: localseq_vprintf: 0xc88e4000-0xc88e5000           4K     RW NX SHD DEV/SHARED
[ 1780.674792] brcmfmac: localseq_vprintf: 0xc88e6000-0xc88e7000           4K     RW NX SHD DEV/SHARED
[ 1780.683805] brcmfmac: localseq_vprintf: 0xc88e8000-0xc88e9000           4K     RW NX SHD DEV/SHARED
[ 1780.692815] brcmfmac: localseq_vprintf: 0xc88ea000-0xc88ec000           8K     RW NX SHD MEM/BUFFERABLE/WC
[ 1780.702432] brcmfmac: localseq_vprintf: 0xc88ed000-0xc88ef000           8K     RW NX SHD MEM/BUFFERABLE/WC
[ 1780.712048] brcmfmac: localseq_vprintf: 0xc88f0000-0xc88f2000           8K     RW NX SHD MEM/BUFFERABLE/WC
[ 1780.721664] brcmfmac: localseq_vprintf: 0xc88f3000-0xc88f5000           8K     RW NX SHD MEM/BUFFERABLE/WC
[ 1780.731281] brcmfmac: localseq_vprintf: 0xc88f6000-0xc88f8000           8K     RW NX SHD MEM/BUFFERABLE/WC
[ 1780.740896] brcmfmac: localseq_vprintf: 0xc88fa000-0xc88fb000           4K     RW NX SHD DEV/SHARED
[ 1780.749901] brcmfmac: localseq_vprintf: 0xc88fc000-0xc88fe000           8K     RW NX SHD MEM/BUFFERABLE/WC
[ 1780.759516] brcmfmac: localseq_vprintf: 0xc88ff000-0xc8901000           8K     RW NX SHD MEM/BUFFERABLE/WC
[ 1780.769132] brcmfmac: localseq_vprintf: 0xc8902000-0xc8904000           8K     RW NX SHD MEM/BUFFERABLE/WC
[ 1780.778748] brcmfmac: localseq_vprintf: 0xc8905000-0xc8907000           8K     RW NX SHD MEM/BUFFERABLE/WC
[ 1780.788365] brcmfmac: localseq_vprintf: 0xc8908000-0xc890a000           8K     RW NX SHD MEM/BUFFERABLE/WC
[ 1780.797rcmfmac: localseq_vprintf: 0xc890b000-0xc890e000          12K     RW NX SHD MEM/CACHED/WBWA
[ 1780.807428] brcmfmac: localseq_vprintf: 0xc890f000-0xc894f000         256K     RW NX SHD MEM/CACHED/WBWA
[ 1780.816894] brcmfmac: localseq_vprintf: 0xc8950000-0xc8990000         256K     RW NX SHD MEM/CACHED/WBWA
[ 1780.826354] brcmfmac: localseq_vprintf: 0xc8aa0000-0xc8aa8000          32K     RW NX SHD DEV/SHARED
[ 1780.835398] brcmfmac: localseq_vprintf: 0xc8ccf000-0xc8cd0000           4K     RW NX SHD MEM/BUFFERABLE/WC
[ 1780.845019] brcmfmac: localseq_vprintf: 0xc8cd1000-0xc8cd3000           8K     RW NX SHD MEM/BUFFERABLE/WC
[ 1780.854633] brcmfmac: localseq_vprintf: 0xc8cd4000-0xc8cd5000           4K     RW NX SHD MEM/BUFFERABLE/WC
[ 1780.864251] brcmfmac: localseq_vprintf: 0xc8cd6000-0xc8cda000          16K     RW NX SHD MEM/BUFFERABLE/WC
[ 1780.873866] brcmfmac: localseq_vprintf: 0xc8cdb000-0xc8cdd000           8K     RW NX SHD MEM/BUFFERABLE/WC
[ 1780.883483] brcmfmac: localseq_vprintf: 0xc8cde000-0xc8cdf000           4K     RW NX SHD MEM/BUFFERABLE/WC
[ 1780.893098] brcmfmac: localseq_vprintf: 0xc8ce0000-0xc8ce1000           4K     RW NX SHD MEM/BUFFERABLE/WC
[ 1780.902715] brcmfmac: localseq_vprintf: 0xc8ce5000-0xc8ce6000           4K     RW NX SHD MEM/BUFFERABLE/WC
[ 1780.912334] brcmfmac: localseq_vprintf: 0xc8d05000-0xc8d06000           4K     RW NX SHD MEM/CACHED/WBWA
[ 1780.921785] brcmfmac: localseq_vprintf: 0xc8d09000-0xc8d0f000          24K     RW NX SHD MEM/BUFFERABLE/WC
[ 1780.931401] brcmfmac: localseq_vprintf: 0xc8d10000-0xc8d16000          24K     RW NX SHD MEM/BUFFERABLE/WC
[ 1780.941300] brcmfmac: localseq_vprintf: 0xca800000-0xcac00000           4M     RW NX SHD DEV/SHARED
[ 1780.950358] brcmfmac: localseq_vprintf: 0xfedee000-0xfedf1000          12K     RW NX SHD MEM/CACHED/WBWA
[ 1780.959817] brcmfmac: localseq_vprintf: 0xfedf7000-0xfedfa000          12K     RW NX SHD MEM/CACHED/WBWA
[ 1780.969257] brcmfmac: localseq_vprintf: ---[ vmalloc() End ]---
[ 1780.975156] brcmfmac: localseq_vprintf: ---[ Fixmap Area ]---
[ 1780.980909] brcmfmac: localseq_vprintf: ---[ Vectors ]---
[ 1780.986291] brcmfmac: localseq_vprintf: 0xffff0000-0xffff1000           4K USR ro x  SHD MEM/CACHED/WBWA
[ 1780.995737] sched: RT throttling activated
[ 1780.999822] brcmfmac: localseq_vprintf: 0xffff1000-0xffff2000           4K     ro x  SHD MEM/CACHED/WBWA
[ 1781.009262] brcmfmac: localseq_vprintf: ---[ Vectors End ]---
[ 1781.014991] brcmfmac: brcmf_sync_seqnum: Loopcnt 1 (expected 52, read 52)
root@OpenWrt:/#


WARNING: multiple messages have this Message-ID (diff)
From: meuleman@broadcom.com (Hante Meuleman)
To: linux-arm-kernel@lists.infradead.org
Subject: using DMA-API on ARM
Date: Mon, 8 Dec 2014 13:47:38 +0000	[thread overview]
Message-ID: <F51492713EF10846800D8C0ED37A7DCE01902076@SJEXCHMB15.corp.ad.broadcom.com> (raw)
In-Reply-To: <F51492713EF10846800D8C0ED37A7DCE01901765@SJEXCHMB15.corp.ad.broadcom.com>

Still using outlook, but will limit the line length, I hope that works for the
moment. Attached is a log with the requested information, it is a little
bit non-standard though. The dump code from the mm was copied in
the driver and called from there, mapping the prints back to our local
printf, but it should produce the same. I did this because I didn't realize
the table is static.

Some background on the test setup: I'm using a Broadcom reference 
design AP platform with an BRCM 4708 host SOC. For the AP router 
platform the opensource packet OpenWRT was used. Some small
modifications were made to get it to work on our HW. Only one core
is enabled for the moment (no time to figure out how to enable the
other one). Openwrt was configured to use kernel 3.18-rc2 and 
the brcmfmac of the compat-wireless code was updated with our 
latest code (minor patches, which have been submitted already). 
The device used is 43602 pcie device. Some modifications to the build
system were made to enable PCIE. The test is to connect with a 
client to the AP and run iperf (TCP). The test can run for many hours
without a problem, but sometimes fails very quickly.

The log: first the ring allocation info is printed. Starting at
16.124847, ring 2, 3 and 4 are rings used for device to host. In this
log the failure is on a read of ring 3. Ring 3 is 1024 entries of each
16 bytes. The next thing printed is the kernel page tables. Then some 
OpenWRT info and the logging of part of the connection setup. Then at 
1780.130752 the logging of the failure starts. The sequence number is 
modulo 253 with ring size of 1024 matches an "old" entry (read 40, 
expected 52). Then the different pointers are printed followed by 
the kernel page table. The code does then a cache invalidate on the 
dma_handle and the next read the sequence number is correct.

Regards,
Hante



Please wrap your message - replying to a message which looks like this in
my editor is far from easy, and gives me much more work to /manually/
reformat it before I can reply to it:

On Fri, Dec 05, 2014 at 12:56:45PM +0000, Hante Meuleman wrote:
> The problem is with data coming from device, so DMA from device to host. The $
>
> However: this indicates that dma_alloc_coherent on an ARM target may result i$
>
> Regards,
> Hante

Thanks.

On Fri, Dec 05, 2014 at 12:56:45PM +0000, Hante Meuleman wrote:
> However: this indicates that dma_alloc_coherent on an ARM target may
> result in a memory buffer which can be cached which conflicts with
> the API of this function.

If the memory has an alias which is cacheable, it is possible for cache
lines to get allocated via that alias, even if the alias has no explicit
accesses to it.

This is something which I've been going on for quite literally /years/ -
mismatched cache attributes can cause unpredictable behaviour.  I've had
a lot of push back from people who are of the opinion that "if it works
for me, then there isn't a problem" and I eventually gave up fighting
the battle, especially as the ARM architecture people weakened my
reasoning behind it by publishing a relaxation of the "no differing
attributes" issue.  This was particularly true of those who wanted to
use ioremap() on system memory - and cases such as
dma_init_coherent_memory().

So, I never fixed this problem in the original DMA allocator code; I
basically gave up with it.  It's a latent bug which did need to be fixed,
and is still present today in the non-CMA case.

The symptoms which you are reporting sound very much like this kind of
problem - the virtual address for the memory returned by
dma_alloc_coherent() will not be cacheable memory - it will have been
remapped using map_vm_area().  However, there could very well be a fully
cacheable lowmem mapping of that memory, which if a read (speculative or
otherwise) will bring a cache line in, and because the caches are VIPT
or PIPT, that cache line can be hit via the non-cacheable mapping too.

What I /really/ need is more evidence of this to tell those disbelievers
where to stick their flawed arguments. :)

-- 
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cache_fail_dmesg.txt
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141208/b16580d5/attachment-0001.txt>

  parent reply	other threads:[~2014-12-08 13:47 UTC|newest]

Thread overview: 115+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-05  9:22 using DMA-API on ARM Arend van Spriel
2014-12-05  9:22 ` Arend van Spriel
2014-12-05  9:22 ` Arend van Spriel
2014-12-05  9:45 ` Russell King - ARM Linux
2014-12-05  9:45   ` Russell King - ARM Linux
2014-12-05  9:45   ` Russell King - ARM Linux
2014-12-05 12:24   ` Will Deacon
2014-12-05 12:24     ` Will Deacon
2014-12-05 12:24     ` Will Deacon
2014-12-05 12:56     ` Hante Meuleman
2014-12-05 12:56       ` Hante Meuleman
2014-12-05 12:56       ` Hante Meuleman
2014-12-05 13:23       ` Russell King - ARM Linux
2014-12-05 13:23         ` Russell King - ARM Linux
2014-12-05 13:23         ` Russell King - ARM Linux
2014-12-05 14:20         ` Hante Meuleman
2014-12-05 14:20           ` Hante Meuleman
2014-12-05 14:20           ` Hante Meuleman
2014-12-05 14:47           ` Arend van Spriel
2014-12-05 14:47             ` Arend van Spriel
2014-12-05 14:47             ` Arend van Spriel
2014-12-08 13:47           ` Hante Meuleman [this message]
2014-12-08 13:47             ` Hante Meuleman
2014-12-08 13:47             ` Hante Meuleman
2014-12-08 15:01             ` Arnd Bergmann
2014-12-08 15:01               ` Arnd Bergmann
2014-12-08 15:17               ` Russell King - ARM Linux
2014-12-08 15:17                 ` Russell King - ARM Linux
2014-12-08 15:22                 ` Arnd Bergmann
2014-12-08 15:22                   ` Arnd Bergmann
2014-12-08 16:03               ` Catalin Marinas
2014-12-08 16:03                 ` Catalin Marinas
2014-12-08 16:03                 ` Catalin Marinas
2014-12-08 17:01                 ` Arend van Spriel
2014-12-08 17:01                   ` Arend van Spriel
2014-12-08 17:01                   ` Arend van Spriel
2014-12-09 10:19                   ` Arend van Spriel
2014-12-09 10:19                     ` Arend van Spriel
2014-12-09 10:19                     ` Arend van Spriel
2014-12-09 10:29                     ` Russell King - ARM Linux
2014-12-09 10:29                       ` Russell King - ARM Linux
2014-12-09 10:29                       ` Russell King - ARM Linux
2014-12-09 11:07                       ` Arend van Spriel
2014-12-09 11:07                         ` Arend van Spriel
2014-12-09 11:07                         ` Arend van Spriel
2014-12-09 11:54                       ` Catalin Marinas
2014-12-09 11:54                         ` Catalin Marinas
2014-12-09 11:54                         ` Catalin Marinas
2015-01-20 15:22                       ` Fabio Estevam
2015-01-20 15:22                         ` Fabio Estevam
2015-01-20 15:22                         ` Fabio Estevam
2014-12-08 16:22               ` Arend van Spriel
2014-12-08 16:22                 ` Arend van Spriel
2014-12-08 16:38                 ` Arnd Bergmann
2014-12-08 16:38                   ` Arnd Bergmann
2014-12-08 16:47                   ` Russell King - ARM Linux
2014-12-08 16:47                     ` Russell King - ARM Linux
2014-12-08 16:50                   ` Catalin Marinas
2014-12-08 16:50                     ` Catalin Marinas
2014-12-08 16:50                     ` Catalin Marinas
2014-12-08 16:54                     ` Russell King - ARM Linux
2014-12-08 16:54                       ` Russell King - ARM Linux
2014-12-08 16:54                       ` Russell King - ARM Linux
2014-12-05 15:06         ` Russell King - ARM Linux
2014-12-05 15:06           ` Russell King - ARM Linux
2014-12-05 15:06           ` Russell King - ARM Linux
2014-12-05 18:28           ` Catalin Marinas
2014-12-05 18:28             ` Catalin Marinas
2014-12-05 18:28             ` Catalin Marinas
2014-12-05 19:22             ` Arend van Spriel
2014-12-05 19:22               ` Arend van Spriel
2014-12-05 19:22               ` Arend van Spriel
2014-12-05 19:25               ` Russell King - ARM Linux
2014-12-05 19:25                 ` Russell King - ARM Linux
2014-12-05 19:25                 ` Russell King - ARM Linux
2014-12-05 12:43   ` Arend van Spriel
2014-12-05 12:43     ` Arend van Spriel
2014-12-05 12:43     ` Arend van Spriel
2014-12-05 12:59     ` Russell King - ARM Linux
2014-12-05 12:59       ` Russell King - ARM Linux
2014-12-05 12:59       ` Russell King - ARM Linux
2014-12-05  9:52 ` Arnd Bergmann
2014-12-05  9:52   ` Arnd Bergmann
2014-12-05 11:11   ` Russell King - ARM Linux
2014-12-05 11:11     ` Russell King - ARM Linux
2014-12-05 11:49     ` Hante Meuleman
2014-12-05 11:49       ` Hante Meuleman
2014-12-05 11:49       ` Hante Meuleman
2014-12-05 17:38     ` Catalin Marinas
2014-12-05 17:38       ` Catalin Marinas
2014-12-05 17:38       ` Catalin Marinas
2014-12-05 18:24       ` Russell King - ARM Linux
2014-12-05 18:24         ` Russell King - ARM Linux
2014-12-05 18:24         ` Russell King - ARM Linux
2014-12-05 18:31         ` Catalin Marinas
2014-12-05 18:31           ` Catalin Marinas
2014-12-05 18:31           ` Catalin Marinas
2014-12-05 18:39 ` Catalin Marinas
2014-12-05 18:39   ` Catalin Marinas
2014-12-05 18:39   ` Catalin Marinas
2014-12-05 18:53   ` Catalin Marinas
2014-12-05 18:53     ` Catalin Marinas
2014-12-05 18:53     ` Catalin Marinas
2014-12-05 19:50     ` Arend van Spriel
2014-12-05 19:50       ` Arend van Spriel
2014-12-05 19:50       ` Arend van Spriel
2014-12-08 12:55     ` Johannes Stezenbach
2014-12-08 12:55       ` Johannes Stezenbach
2014-12-08 12:55       ` Johannes Stezenbach
2014-12-08 15:55       ` Catalin Marinas
2014-12-08 15:55         ` Catalin Marinas
2014-12-08 15:55         ` Catalin Marinas
2014-12-08 16:50         ` Johannes Stezenbach
2014-12-08 16:50           ` Johannes Stezenbach
2014-12-08 16:50           ` Johannes Stezenbach

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=F51492713EF10846800D8C0ED37A7DCE01902076@SJEXCHMB15.corp.ad.broadcom.com \
    --to=meuleman@broadcom.com \
    --cc=arend@broadcom.com \
    --cc=brcm80211-dev-list@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=m.szyprowski@samsung.com \
    --cc=will.deacon@arm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.