From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
Jeff Johnson <jjohnson@kernel.org>,
Jeff Hugo <jeff.hugo@oss.qualcomm.com>,
Youssef Samir <quic_yabdulra@quicinc.com>,
Matthew Leung <quic_mattleun@quicinc.com>,
Yan Zhen <yanzhen@vivo.com>, Alex Elder <elder@kernel.org>,
Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>,
Kunwu Chan <chentao@kylinos.cn>,
Troy Hanson <quic_thanson@quicinc.com>,
"Dr. David Alan Gilbert" <linux@treblig.org>,
kernel@collabora.com, mhi@lists.linux.dev,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-wireless@vger.kernel.org, ath11k@lists.infradead.org,
ath12k@lists.infradead.org
Subject: Re: [PATCH v3] bus: mhi: host: don't free bhie tables during suspend/hibernation
Date: Thu, 1 May 2025 18:00:27 +0200 [thread overview]
Message-ID: <2025050110-unpeeled-spur-e4af@gregkh> (raw)
In-Reply-To: <20250429122112.104472-1-usama.anjum@collabora.com>
On Tue, Apr 29, 2025 at 05:20:56PM +0500, Muhammad Usama Anjum wrote:
> Fix dma_direct_alloc() failure at resume time during bhie_table
> allocation. There is a crash report where at resume time, the memory
> from the dma doesn't get allocated and MHI fails to re-initialize.
> There is fragmentation/memory pressure.
>
> To fix it, don't free the memory at power down during suspend /
> hibernation. Instead, use the same allocated memory again after every
> resume / hibernation. This patch has been tested with resume and
> hibernation both.
>
> The rddm is of constant size for a given hardware. While the fbc_image
> size depends on the firmware. If the firmware changes, we'll free and
> allocate new memory for it.
>
> Here are the crash logs:
>
> [ 3029.338587] mhi mhi0: Requested to power ON
> [ 3029.338621] mhi mhi0: Power on setup success
> [ 3029.668654] kworker/u33:8: page allocation failure: order:7, mode:0xc04(GFP_NOIO|GFP_DMA32), nodemask=(null),cpuset=/,mems_allowed=0
> [ 3029.668682] CPU: 4 UID: 0 PID: 2744 Comm: kworker/u33:8 Not tainted 6.11.11-valve10-1-neptune-611-gb69e902b4338 #1ed779c892334112fb968aaa3facf9686b5ff0bd7
> [ 3029.668690] Hardware name: Valve Galileo/Galileo, BIOS F7G0112 08/01/2024
> [ 3029.668694] Workqueue: mhi_hiprio_wq mhi_pm_st_worker [mhi]
> [ 3029.668717] Call Trace:
> [ 3029.668722] <TASK>
> [ 3029.668728] dump_stack_lvl+0x4e/0x70
> [ 3029.668738] warn_alloc+0x164/0x190
> [ 3029.668747] ? srso_return_thunk+0x5/0x5f
> [ 3029.668754] ? __alloc_pages_direct_compact+0xaf/0x360
> [ 3029.668761] __alloc_pages_slowpath.constprop.0+0xc75/0xd70
> [ 3029.668774] __alloc_pages_noprof+0x321/0x350
> [ 3029.668782] __dma_direct_alloc_pages.isra.0+0x14a/0x290
> [ 3029.668790] dma_direct_alloc+0x70/0x270
> [ 3029.668796] mhi_alloc_bhie_table+0xe8/0x190 [mhi faa917c5aa23a5f5b12d6a2c597067e16d2fedc0]
> [ 3029.668814] mhi_fw_load_handler+0x1bc/0x310 [mhi faa917c5aa23a5f5b12d6a2c597067e16d2fedc0]
> [ 3029.668830] mhi_pm_st_worker+0x5c8/0xaa0 [mhi faa917c5aa23a5f5b12d6a2c597067e16d2fedc0]
> [ 3029.668844] ? srso_return_thunk+0x5/0x5f
> [ 3029.668853] process_one_work+0x17e/0x330
> [ 3029.668861] worker_thread+0x2ce/0x3f0
> [ 3029.668868] ? __pfx_worker_thread+0x10/0x10
> [ 3029.668873] kthread+0xd2/0x100
> [ 3029.668879] ? __pfx_kthread+0x10/0x10
> [ 3029.668885] ret_from_fork+0x34/0x50
> [ 3029.668892] ? __pfx_kthread+0x10/0x10
> [ 3029.668898] ret_from_fork_asm+0x1a/0x30
> [ 3029.668910] </TASK>
>
> Tested-on: WCN6855 WLAN.HSP.1.1-03926.13-QCAHSPSWPL_V2_SILICONZ_CE-2.52297.6
>
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
What commit id does this fix? Should it go to stable kernel(s)? If so,
how far back?
thanks,
greg k-h
next prev parent reply other threads:[~2025-05-01 16:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 12:20 [PATCH v3] bus: mhi: host: don't free bhie tables during suspend/hibernation Muhammad Usama Anjum
2025-05-01 16:00 ` Greg Kroah-Hartman [this message]
2025-05-02 4:15 ` Muhammad Usama Anjum
2025-05-02 5:06 ` Greg Kroah-Hartman
-- strict thread matches above, loose matches on Subject: below --
2025-04-29 12:23 Muhammad Usama Anjum
2025-04-29 20:55 ` Sebastian Reichel
2025-04-30 14:29 ` kernel test robot
2025-04-30 16:45 ` kernel test robot
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=2025050110-unpeeled-spur-e4af@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=ath11k@lists.infradead.org \
--cc=ath12k@lists.infradead.org \
--cc=chentao@kylinos.cn \
--cc=elder@kernel.org \
--cc=jacek.lawrynowicz@linux.intel.com \
--cc=jeff.hugo@oss.qualcomm.com \
--cc=jjohnson@kernel.org \
--cc=kernel@collabora.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linux@treblig.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=mhi@lists.linux.dev \
--cc=quic_mattleun@quicinc.com \
--cc=quic_thanson@quicinc.com \
--cc=quic_yabdulra@quicinc.com \
--cc=usama.anjum@collabora.com \
--cc=yanzhen@vivo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox