All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 5/6] ath10k: add memory dump support for QCA6174/QCA9377
Date: Wed, 1 Nov 2017 10:49:46 +0000	[thread overview]
Message-ID: <87wp3axohi.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <150278542590.22482.1613614809483892010.stgit@potku.adurom.net> (Kalle Valo's message of "Tue, 15 Aug 2017 11:23:46 +0300")

Kalle Valo <kvalo@qca.qualcomm.com> writes:

> From: Alan Liu <alanliu@qca.qualcomm.com>
>
> 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 defaul=
t. To
> enable it make sure that bit 3 is set in coredump_mask module parameter:
>
> modprobe ath10k_core coredump_mask=3D0xffffffff
>
> When RAMDUMP is enabled a buffer for the dump is allocated with vmalloc d=
uring
> 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 sma=
ller
> sections as not all registers are readable (which could cause the whole s=
ystem
> 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>

[...]

> +		/* To get IRAM dump, the host driver needs to switch target
> +		 * ram config from DRAM to IRAM.
> +		 */
> +		if (current_region->type =3D=3D ATH10K_MEM_REGION_TYPE_IRAM1 ||
> +		    current_region->type =3D=3D ATH10K_MEM_REGION_TYPE_IRAM2) {
> +			shift =3D current_region->start >> 20;
> +
> +			ret =3D ath10k_pci_set_ram_config(ar, shift);
> +			if (!ret) {
> +				ath10k_warn(ar, "failed to switch ram config to IRAM for section %s:=
 %d\n",
> +					    current_region->name, ret);

A colleague noticed that there's a bug here, it should be "if (ret)".
I'll fix that in the next version.

--=20
Kalle Valo=

WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 5/6] ath10k: add memory dump support for QCA6174/QCA9377
Date: Wed, 1 Nov 2017 10:49:46 +0000	[thread overview]
Message-ID: <87wp3axohi.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <150278542590.22482.1613614809483892010.stgit@potku.adurom.net> (Kalle Valo's message of "Tue, 15 Aug 2017 11:23:46 +0300")

Kalle Valo <kvalo@qca.qualcomm.com> writes:

> From: Alan Liu <alanliu@qca.qualcomm.com>
>
> 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>

[...]

> +		/* To get IRAM dump, the host driver needs to switch target
> +		 * ram config from DRAM to IRAM.
> +		 */
> +		if (current_region->type == ATH10K_MEM_REGION_TYPE_IRAM1 ||
> +		    current_region->type == ATH10K_MEM_REGION_TYPE_IRAM2) {
> +			shift = current_region->start >> 20;
> +
> +			ret = ath10k_pci_set_ram_config(ar, shift);
> +			if (!ret) {
> +				ath10k_warn(ar, "failed to switch ram config to IRAM for section %s: %d\n",
> +					    current_region->name, ret);

A colleague noticed that there's a bug here, it should be "if (ret)".
I'll fix that in the next version.

-- 
Kalle Valo
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  parent reply	other threads:[~2017-11-01 10:49 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-15  8:22 [PATCH 0/6] ath10k: firmware ramdump support Kalle Valo
2017-08-15  8:22 ` Kalle Valo
2017-08-15  8:22 ` [PATCH 1/6] ath10k: remove deprecated fw_crash_dump debugfs file Kalle Valo
2017-08-15  8:22   ` Kalle Valo
2017-08-15  8:23 ` [PATCH 2/6] ath10k: refactor firmware crashdump code to coredump.c Kalle Valo
2017-08-15  8:23   ` Kalle Valo
2017-08-17  4:15   ` [2/6] " Kalle Valo
2017-08-17  4:20   ` Kalle Valo
2017-08-17  4:20     ` Kalle Valo
2017-08-17  6:49     ` Kalle Valo
2017-08-17  6:49       ` Kalle Valo
2017-08-15  8:23 ` [PATCH 3/6] ath10k: detach coredump.c from debug.c Kalle Valo
2017-08-15  8:23   ` Kalle Valo
2017-08-15  8:23 ` [PATCH 4/6] ath10k: add coredump_mask module parameter Kalle Valo
2017-08-15  8:23   ` Kalle Valo
2017-08-15  8:23 ` [PATCH 5/6] ath10k: add memory dump support for QCA6174/QCA9377 Kalle Valo
2017-08-15  8:23   ` Kalle Valo
2017-08-15 11:33   ` [5/6] " Kalle Valo
2017-08-15 11:33     ` Kalle Valo
2017-08-15 17:42   ` [PATCH 5/6] " Ben Greear
2017-08-15 17:42     ` Ben Greear
2017-11-01 10:49   ` Kalle Valo [this message]
2017-11-01 10:49     ` Kalle Valo
2017-08-15  8:23 ` [PATCH 6/6] ath10k: add memory dump support QCA988X Kalle Valo
2017-08-15  8:23   ` Kalle Valo

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=87wp3axohi.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath10k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    /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.