OSDN Git Service

ath10k: add memory dump support for QCA6174/QCA9377
authorAlan Liu <alanliu@qca.qualcomm.com>
Fri, 22 Dec 2017 13:39:32 +0000 (15:39 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 27 Dec 2017 10:20:41 +0000 (12:20 +0200)
commit703f261dd77f3afb8058a927ca2f4651691f0495
treea9dfff4df47885fbb0a4ec423ea05a34d0b500ec
parent5c9d0a20202beb22a3583c5408157608f400c2d0
ath10k: add memory dump support for QCA6174/QCA9377

Add memory dump to the firmware crash data file which is provided to user space
via devcoredump interface. This makes it easier for firmware engineers to debug
firmware crashes.

Due to increased memory consumption the memory dump is disabled by default. To
enable it make sure that bit 3 is set in coredump_mask module parameter:

modprobe ath10k_core coredump_mask=0xffffffff

When RAMDUMP is enabled a buffer for the dump is allocated with vmalloc during
device probe. The actual memory layout is different in hardware versions and
the layouts are defined in coredump.c. The memory is split to regions and, to
get even finegrained control of what to copy, the region can split to smaller
sections as not all registers are readable (which could cause the whole system
to stall).

Signed-off-by: Alan Liu <alanliu@qca.qualcomm.com>
[kvalo@qca.qualcomm.com: refactoring and cleanup]
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/core.c
drivers/net/wireless/ath/ath10k/core.h
drivers/net/wireless/ath/ath10k/coredump.c
drivers/net/wireless/ath/ath10k/coredump.h
drivers/net/wireless/ath/ath10k/hw.h
drivers/net/wireless/ath/ath10k/pci.c