All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v2 1/3] bus: mhi: host: keep bhi buffer through suspend cycle
@ 2025-07-21  8:27 kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2025-07-21  8:27 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20250715132509.2643305-2-usama.anjum@collabora.com>
References: <20250715132509.2643305-2-usama.anjum@collabora.com>
TO: Muhammad Usama Anjum <usama.anjum@collabora.com>
TO: Manivannan Sadhasivam <mani@kernel.org>
TO: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
TO: Muhammad Usama Anjum <usama.anjum@collabora.com>
TO: Youssef Samir <quic_yabdulra@quicinc.com>
TO: Matthew Leung <quic_mattleun@quicinc.com>
TO: Alexander Wilhelm <alexander.wilhelm@westermo.com>
TO: Kunwu Chan <chentao@kylinos.cn>
TO: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
TO: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
TO: Yan Zhen <yanzhen@vivo.com>
TO: Sujeev Dias <sdias@codeaurora.org>
TO: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
TO: Siddartha Mohanadoss <smohanad@codeaurora.org>
TO: mhi@lists.linux.dev
TO: linux-arm-msm@vger.kernel.org
TO: linux-kernel@vger.kernel.org
CC: kernel@collabora.com
CC: stable@vger.kernel.org

Hi Muhammad,

kernel test robot noticed the following build warnings:

[auto build test WARNING on mani-mhi/mhi-next]
[also build test WARNING on next-20250718]
[cannot apply to linus/master v6.16-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Muhammad-Usama-Anjum/bus-mhi-host-keep-bhi-buffer-through-suspend-cycle/20250715-213507
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi.git mhi-next
patch link:    https://lore.kernel.org/r/20250715132509.2643305-2-usama.anjum%40collabora.com
patch subject: [PATCH v2 1/3] bus: mhi: host: keep bhi buffer through suspend cycle
:::::: branch date: 6 days ago
:::::: commit date: 6 days ago
config: microblaze-randconfig-r073-20250720 (https://download.01.org/0day-ci/archive/20250721/202507211419.AfVl4nWk-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 8.5.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202507211419.AfVl4nWk-lkp@intel.com/

New smatch warnings:
drivers/bus/mhi/host/boot.c:467 mhi_load_image_bhi() error: we previously assumed '*image' could be null (see line 461)

Old smatch warnings:
drivers/bus/mhi/host/boot.c:606 mhi_fw_load_handler() error: we previously assumed 'mhi_cntrl->fbc_image' could be null (see line 596)

vim +467 drivers/bus/mhi/host/boot.c

f88f1d0998ea2e Matthew Leung        2025-01-17  455  
f88f1d0998ea2e Matthew Leung        2025-01-17  456  static int mhi_load_image_bhi(struct mhi_controller *mhi_cntrl, const u8 *fw_data, size_t size)
f88f1d0998ea2e Matthew Leung        2025-01-17  457  {
777cd2954046a1 Muhammad Usama Anjum 2025-07-15  458  	struct image_info **image = &mhi_cntrl->bhi_image;
f88f1d0998ea2e Matthew Leung        2025-01-17  459  	int ret;
f88f1d0998ea2e Matthew Leung        2025-01-17  460  
777cd2954046a1 Muhammad Usama Anjum 2025-07-15 @461  	if (!(*image)) {
777cd2954046a1 Muhammad Usama Anjum 2025-07-15  462  		ret = mhi_alloc_bhi_buffer(mhi_cntrl, image, size);
f88f1d0998ea2e Matthew Leung        2025-01-17  463  		if (ret)
f88f1d0998ea2e Matthew Leung        2025-01-17  464  			return ret;
f88f1d0998ea2e Matthew Leung        2025-01-17  465  
f88f1d0998ea2e Matthew Leung        2025-01-17  466  		/* Load the firmware into BHI vec table */
777cd2954046a1 Muhammad Usama Anjum 2025-07-15 @467  		memcpy((*image)->mhi_buf->buf, fw_data, size);
777cd2954046a1 Muhammad Usama Anjum 2025-07-15  468  	}
f88f1d0998ea2e Matthew Leung        2025-01-17  469  
777cd2954046a1 Muhammad Usama Anjum 2025-07-15  470  	ret = mhi_fw_load_bhi(mhi_cntrl, &(*image)->mhi_buf[(*image)->entries - 1]);
777cd2954046a1 Muhammad Usama Anjum 2025-07-15  471  	if (ret) {
777cd2954046a1 Muhammad Usama Anjum 2025-07-15  472  		mhi_free_bhi_buffer(mhi_cntrl, *image);
777cd2954046a1 Muhammad Usama Anjum 2025-07-15  473  		*image = NULL;
777cd2954046a1 Muhammad Usama Anjum 2025-07-15  474  	}
f88f1d0998ea2e Matthew Leung        2025-01-17  475  
f88f1d0998ea2e Matthew Leung        2025-01-17  476  	return ret;
f88f1d0998ea2e Matthew Leung        2025-01-17  477  }
f88f1d0998ea2e Matthew Leung        2025-01-17  478  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH v2 0/3] bus: mhi: keep dma buffers through suspend/hibernation cycles
@ 2025-07-15 13:25 Muhammad Usama Anjum
  2025-07-15 13:25 ` [PATCH v2 1/3] bus: mhi: host: keep bhi buffer through suspend cycle Muhammad Usama Anjum
  0 siblings, 1 reply; 6+ messages in thread
From: Muhammad Usama Anjum @ 2025-07-15 13:25 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Jeff Hugo, Muhammad Usama Anjum,
	Youssef Samir, Matthew Leung, Alexander Wilhelm, Kunwu Chan,
	Krishna Chaitanya Chundru, Jacek Lawrynowicz, Yan Zhen,
	Sujeev Dias, Greg Kroah-Hartman, Siddartha Mohanadoss, mhi,
	linux-arm-msm, linux-kernel
  Cc: kernel

When there is memory pressure during resume and no DMA memory is
available, the ath11k driver fails to resume. The driver currently
frees its DMA memory during suspend or hibernate, and attempts to
re-allocate it during resume. However, if the DMA memory has been
consumed by other software in the meantime, these allocations can
fail, leading to critical failures in the WiFi driver. It has been
reported [1].

Although I have recently fixed several instances [2] [3] to ensure
DMA memory is not freed once allocated, we continue to receive
reports of new failures.

In this series, 3 more such cases are being fixed. There are still
some cases which I'm trying to fix. They can be discussed separately.

[1] https://lore.kernel.org/all/ead32f5b-730a-4b81-b38f-93d822f990c6@collabora.com
[2] https://lore.kernel.org/all/20250428080242.466901-1-usama.anjum@collabora.com
[3] https://lore.kernel.org/all/20250516184952.878726-1-usama.anjum@collabora.com

Muhammad Usama Anjum (3):
  bus: mhi: host: keep bhi buffer through suspend cycle
  bus: mhi: host: keep bhie buffer through suspend cycle
  bus: mhi: keep device context through suspend cycles

 drivers/bus/mhi/host/boot.c     | 44 ++++++++++++++++++++-------------
 drivers/bus/mhi/host/init.c     | 41 ++++++++++++++++++++++++++----
 drivers/bus/mhi/host/internal.h |  2 ++
 include/linux/mhi.h             |  2 ++
 4 files changed, 67 insertions(+), 22 deletions(-)

-- 
2.39.5


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-07-21  8:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-21  8:27 [PATCH v2 1/3] bus: mhi: host: keep bhi buffer through suspend cycle kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2025-07-15 13:25 [PATCH v2 0/3] bus: mhi: keep dma buffers through suspend/hibernation cycles Muhammad Usama Anjum
2025-07-15 13:25 ` [PATCH v2 1/3] bus: mhi: host: keep bhi buffer through suspend cycle Muhammad Usama Anjum
2025-07-16  3:41   ` Baochen Qiang
2025-07-16  9:34   ` Greg Kroah-Hartman
2025-07-17 10:00     ` Muhammad Usama Anjum
2025-07-17 11:50       ` Greg Kroah-Hartman

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.