tree:
git://git.infradead.org/users/hch/misc.git hmm-headers
head: eacffa71b75f2486263f460f97583c2198f9a830
commit: eacffa71b75f2486263f460f97583c2198f9a830 [1/1] hmm: remove unneeded #includes
config: x86_64-randconfig-a014-20200916 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
9e3842d60351f986d77dfe0a94f76e4fd895f188)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout eacffa71b75f2486263f460f97583c2198f9a830
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:2305:5: warning: no previous prototype for
function 'parse_ta_bin_descriptor' [-Wmissing-prototypes]
int parse_ta_bin_descriptor(struct psp_context *psp,
^
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:2305:1: note: declare 'static' if the
function is not intended to be used outside of this translation unit
int parse_ta_bin_descriptor(struct psp_context *psp,
^
static
> drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:2483:2: error: implicit
declaration of function 'clflush_cache_range'
[-Werror,-Wimplicit-function-declaration]
clflush_cache_range(cpu_addr,
(usbc_pd_fw->size & ~(L1_CACHE_BYTES - 1)));
^
1 warning and 1 error generated.
git remote add hch-misc
git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc hmm-headers
git checkout eacffa71b75f2486263f460f97583c2198f9a830
vim +/clflush_cache_range +2483 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2443
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2444 static ssize_t
psp_usbc_pd_fw_sysfs_write(struct device *dev,
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2445 struct device_attribute
*attr,
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2446 const char *buf,
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2447 size_t count)
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2448 {
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2449 struct drm_device *ddev =
dev_get_drvdata(dev);
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2450 struct amdgpu_device *adev =
ddev->dev_private;
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2451 void *cpu_addr;
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2452 dma_addr_t dma_addr;
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2453 int ret;
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2454 char fw_name[100];
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2455 const struct firmware *usbc_pd_fw;
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2456
90f88cdd7c8d6a6 Andrey Grodzovsky 2020-03-04 2457 if
(!adev->ip_blocks[AMD_IP_BLOCK_TYPE_PSP].status.late_initialized) {
90f88cdd7c8d6a6 Andrey Grodzovsky 2020-03-04 2458 DRM_INFO("PSP block is not
ready yet.");
90f88cdd7c8d6a6 Andrey Grodzovsky 2020-03-04 2459 return -EBUSY;
90f88cdd7c8d6a6 Andrey Grodzovsky 2020-03-04 2460 }
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2461
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2462 snprintf(fw_name, sizeof(fw_name),
"amdgpu/%s", buf);
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2463 ret =
request_firmware(&usbc_pd_fw, fw_name, adev->dev);
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2464 if (ret)
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2465 goto fail;
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2466
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2467 /* We need contiguous physical mem to
place the FW for psp to access */
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2468 cpu_addr =
dma_alloc_coherent(adev->dev, usbc_pd_fw->size, &dma_addr, GFP_KERNEL);
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2469
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2470 ret = dma_mapping_error(adev->dev,
dma_addr);
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2471 if (ret)
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2472 goto rel_buf;
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2473
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2474 memcpy_toio(cpu_addr,
usbc_pd_fw->data, usbc_pd_fw->size);
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2475
6863d60732acf57 Andrey Grodzovsky 2020-03-04 2476 /*
6863d60732acf57 Andrey Grodzovsky 2020-03-04 2477 * x86 specific workaround.
6863d60732acf57 Andrey Grodzovsky 2020-03-04 2478 * Without it the buffer is invisible
in PSP.
6863d60732acf57 Andrey Grodzovsky 2020-03-04 2479 *
6863d60732acf57 Andrey Grodzovsky 2020-03-04 2480 * TODO Remove once PSP starts
snooping CPU cache
6863d60732acf57 Andrey Grodzovsky 2020-03-04 2481 */
6863d60732acf57 Andrey Grodzovsky 2020-03-04 2482 #ifdef CONFIG_X86
57430471e2fa60a Andrey Grodzovsky 2019-12-19 @2483 clflush_cache_range(cpu_addr,
(usbc_pd_fw->size & ~(L1_CACHE_BYTES - 1)));
6863d60732acf57 Andrey Grodzovsky 2020-03-04 2484 #endif
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2485
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2486 mutex_lock(&adev->psp.mutex);
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2487 ret =
psp_load_usbc_pd_fw(&adev->psp, dma_addr);
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2488
mutex_unlock(&adev->psp.mutex);
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2489
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2490 rel_buf:
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2491 dma_free_coherent(adev->dev,
usbc_pd_fw->size, cpu_addr, dma_addr);
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2492 release_firmware(usbc_pd_fw);
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2493
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2494 fail:
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2495 if (ret) {
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2496 DRM_ERROR("Failed to load USBC
PD FW, err = %d", ret);
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2497 return ret;
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2498 }
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2499
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2500 return count;
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2501 }
57430471e2fa60a Andrey Grodzovsky 2019-12-19 2502
:::::: The code at line 2483 was first introduced by commit
:::::: 57430471e2fa60a412e220fa3014567e792aaa6f drm/amdgpu: Add support for USBC PD FW
download
:::::: TO: Andrey Grodzovsky <andrey.grodzovsky(a)amd.com>
:::::: CC: Alex Deucher <alexander.deucher(a)amd.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org