[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202205021930.5T9x6nUF-lkp@intel.com>
Date: Mon, 2 May 2022 19:56:37 +0800
From: kernel test robot <lkp@...el.com>
To: Dafna Hirschfeld <dhirschfeld@...ana.ai>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Oded Gabbay <ogabbay@...nel.org>
Subject: [ogabbay:habanalabs-next 44/44]
drivers/misc/habanalabs/gaudi/gaudi.c:4743:5: warning: no previous prototype
for 'gaudi_scrub_device_dram'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git habanalabs-next
head: 70f82d1e3fe1618ef992a2bb3cf4af85eaed0f5a
commit: 70f82d1e3fe1618ef992a2bb3cf4af85eaed0f5a [44/44] habanalabs: add device memory scrub ability through debugfs
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220502/202205021930.5T9x6nUF-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git/commit/?id=70f82d1e3fe1618ef992a2bb3cf4af85eaed0f5a
git remote add ogabbay https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git
git fetch --no-tags ogabbay habanalabs-next
git checkout 70f82d1e3fe1618ef992a2bb3cf4af85eaed0f5a
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash drivers/misc/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> drivers/misc/habanalabs/gaudi/gaudi.c:4743:5: warning: no previous prototype for 'gaudi_scrub_device_dram' [-Wmissing-prototypes]
4743 | int gaudi_scrub_device_dram(struct hl_device *hdev, u64 val)
| ^~~~~~~~~~~~~~~~~~~~~~~
vim +/gaudi_scrub_device_dram +4743 drivers/misc/habanalabs/gaudi/gaudi.c
4742
> 4743 int gaudi_scrub_device_dram(struct hl_device *hdev, u64 val)
4744 {
4745 struct asic_fixed_properties *prop = &hdev->asic_prop;
4746 u64 cur_addr = DRAM_BASE_ADDR_USER;
4747 u32 chunk_size, busy;
4748 int rc, dma_id;
4749
4750 while (cur_addr < prop->dram_end_address) {
4751 for (dma_id = 0 ; dma_id < DMA_NUMBER_OF_CHANNELS ; dma_id++) {
4752 u32 dma_offset = dma_id * DMA_CORE_OFFSET;
4753
4754 chunk_size =
4755 min((u64)SZ_2G, prop->dram_end_address - cur_addr);
4756
4757 dev_dbg(hdev->dev,
4758 "Doing HBM scrubbing for 0x%09llx - 0x%09llx\n",
4759 cur_addr, cur_addr + chunk_size);
4760
4761 WREG32(mmDMA0_CORE_SRC_BASE_LO + dma_offset,
4762 lower_32_bits(val));
4763 WREG32(mmDMA0_CORE_SRC_BASE_HI + dma_offset,
4764 upper_32_bits(val));
4765 WREG32(mmDMA0_CORE_DST_BASE_LO + dma_offset,
4766 lower_32_bits(cur_addr));
4767 WREG32(mmDMA0_CORE_DST_BASE_HI + dma_offset,
4768 upper_32_bits(cur_addr));
4769 WREG32(mmDMA0_CORE_DST_TSIZE_0 + dma_offset,
4770 chunk_size);
4771 WREG32(mmDMA0_CORE_COMMIT + dma_offset,
4772 ((1 << DMA0_CORE_COMMIT_LIN_SHIFT) |
4773 (1 << DMA0_CORE_COMMIT_MEM_SET_SHIFT)));
4774
4775 cur_addr += chunk_size;
4776
4777 if (cur_addr == prop->dram_end_address)
4778 break;
4779 }
4780
4781 for (dma_id = 0 ; dma_id < DMA_NUMBER_OF_CHANNELS ; dma_id++) {
4782 u32 dma_offset = dma_id * DMA_CORE_OFFSET;
4783
4784 rc = hl_poll_timeout(
4785 hdev,
4786 mmDMA0_CORE_STS0 + dma_offset,
4787 busy,
4788 ((busy & DMA0_CORE_STS0_BUSY_MASK) == 0),
4789 1000,
4790 HBM_SCRUBBING_TIMEOUT_US);
4791
4792 if (rc) {
4793 dev_err(hdev->dev,
4794 "DMA Timeout during HBM scrubbing of DMA #%d\n",
4795 dma_id);
4796 return -EIO;
4797 }
4798 }
4799 }
4800
4801 return 0;
4802 }
4803
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists