[radeon-alex:amd-20.45 1016/2427] drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:854:6: warning: no previous prototype for 'kgd_gfx_v9_set_address_watch'

kernel test robot lkp at intel.com
Tue Dec 15 03:25:08 UTC 2020


tree:   git://people.freedesktop.org/~agd5f/linux.git amd-20.45
head:   a3950d94b046fb206e58fd3ec717f071c0203ba3
commit: 0c6b8c594dad29321b0a233ac5b81a6eb1fbf4cf [1016/2427] drm/amdkfd: Initial gfx9 debug address watch
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.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
        git remote add radeon-alex git://people.freedesktop.org/~agd5f/linux.git
        git fetch --no-tags radeon-alex amd-20.45
        git checkout 0c6b8c594dad29321b0a233ac5b81a6eb1fbf4cf
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:108:6: warning: no previous prototype for 'kgd_gfx_v9_program_sh_mem_settings' [-Wmissing-prototypes]
     108 | void kgd_gfx_v9_program_sh_mem_settings(struct kgd_dev *kgd, uint32_t vmid,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:125:5: warning: no previous prototype for 'kgd_gfx_v9_set_pasid_vmid_mapping' [-Wmissing-prototypes]
     125 | int kgd_gfx_v9_set_pasid_vmid_mapping(struct kgd_dev *kgd, unsigned int pasid,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:186:5: warning: no previous prototype for 'kgd_gfx_v9_init_interrupts' [-Wmissing-prototypes]
     186 | int kgd_gfx_v9_init_interrupts(struct kgd_dev *kgd, uint32_t pipe_id)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:245:5: warning: no previous prototype for 'kgd_gfx_v9_hqd_load' [-Wmissing-prototypes]
     245 | int kgd_gfx_v9_hqd_load(struct kgd_dev *kgd, void *mqd, uint32_t pipe_id,
         |     ^~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:325:5: warning: no previous prototype for 'kgd_gfx_v9_hiq_mqd_load' [-Wmissing-prototypes]
     325 | int kgd_gfx_v9_hiq_mqd_load(struct kgd_dev *kgd, void *mqd,
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:378:5: warning: no previous prototype for 'kgd_gfx_v9_hqd_dump' [-Wmissing-prototypes]
     378 | int kgd_gfx_v9_hqd_dump(struct kgd_dev *kgd,
         |     ^~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:512:6: warning: no previous prototype for 'kgd_gfx_v9_hqd_is_occupied' [-Wmissing-prototypes]
     512 | bool kgd_gfx_v9_hqd_is_occupied(struct kgd_dev *kgd, uint64_t queue_address,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:553:5: warning: no previous prototype for 'kgd_gfx_v9_hqd_destroy' [-Wmissing-prototypes]
     553 | int kgd_gfx_v9_hqd_destroy(struct kgd_dev *kgd, void *mqd,
         |     ^~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:643:6: warning: no previous prototype for 'kgd_gfx_v9_get_atc_vmid_pasid_mapping_info' [-Wmissing-prototypes]
     643 | bool kgd_gfx_v9_get_atc_vmid_pasid_mapping_info(struct kgd_dev *kgd,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:656:5: warning: no previous prototype for 'kgd_gfx_v9_address_watch_disable' [-Wmissing-prototypes]
     656 | int kgd_gfx_v9_address_watch_disable(struct kgd_dev *kgd)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:680:5: warning: no previous prototype for 'kgd_gfx_v9_address_watch_execute' [-Wmissing-prototypes]
     680 | int kgd_gfx_v9_address_watch_execute(struct kgd_dev *kgd,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:715:5: warning: no previous prototype for 'kgd_gfx_v9_wave_control_execute' [-Wmissing-prototypes]
     715 | int kgd_gfx_v9_wave_control_execute(struct kgd_dev *kgd,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:740:10: warning: no previous prototype for 'kgd_gfx_v9_address_watch_get_offset' [-Wmissing-prototypes]
     740 | uint32_t kgd_gfx_v9_address_watch_get_offset(struct kgd_dev *kgd,
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:748:10: warning: no previous prototype for 'kgd_gfx_v9_enable_debug_trap' [-Wmissing-prototypes]
     748 | uint32_t kgd_gfx_v9_enable_debug_trap(struct kgd_dev *kgd,
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:779:10: warning: no previous prototype for 'kgd_gfx_v9_disable_debug_trap' [-Wmissing-prototypes]
     779 | uint32_t kgd_gfx_v9_disable_debug_trap(struct kgd_dev *kgd)
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:792:10: warning: no previous prototype for 'kgd_gfx_v9_set_wave_launch_trap_override' [-Wmissing-prototypes]
     792 | uint32_t kgd_gfx_v9_set_wave_launch_trap_override(struct kgd_dev *kgd,
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:821:10: warning: no previous prototype for 'kgd_gfx_v9_set_wave_launch_mode' [-Wmissing-prototypes]
     821 | uint32_t kgd_gfx_v9_set_wave_launch_mode(struct kgd_dev *kgd,
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:854:6: warning: no previous prototype for 'kgd_gfx_v9_set_address_watch' [-Wmissing-prototypes]
     854 | void kgd_gfx_v9_set_address_watch(struct kgd_dev *kgd,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:914:6: warning: no previous prototype for 'kgd_gfx_v9_clear_address_watch' [-Wmissing-prototypes]
     914 | void kgd_gfx_v9_clear_address_watch(struct kgd_dev *kgd,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:940:6: warning: no previous prototype for 'kgd_gfx_v9_get_iq_wait_times' [-Wmissing-prototypes]
     940 | void kgd_gfx_v9_get_iq_wait_times(struct kgd_dev *kgd,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c:965:6: warning: no previous prototype for 'kgd_gfx_v9_build_grace_period_packet_info' [-Wmissing-prototypes]
     965 | void kgd_gfx_v9_build_grace_period_packet_info(struct kgd_dev *kgd,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/amd/display/dc/dc_types.h:33,
                    from drivers/gpu/drm/amd/display/dc/dm_services_types.h:30,
                    from drivers/gpu/drm/amd/include/dm_pp_interface.h:26,
                    from drivers/gpu/drm/amd/amdgpu/amdgpu.h:64,
                    from drivers/gpu/drm/amd/backport/include/kcl/kcl_amdgpu.h:5,
                    from drivers/gpu/drm/amd/backport/backport.h:17,
                    from <command-line>:
   drivers/gpu/drm/amd/display/include/fixed31_32.h:76:32: warning: 'dc_fixpt_ln2_div_2' defined but not used [-Wunused-const-variable=]
      76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
         |                                ^~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/display/include/fixed31_32.h:75:32: warning: 'dc_fixpt_ln2' defined but not used [-Wunused-const-variable=]
      75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
         |                                ^~~~~~~~~~~~
   drivers/gpu/drm/amd/display/include/fixed31_32.h:74:32: warning: 'dc_fixpt_e' defined but not used [-Wunused-const-variable=]
      74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
         |                                ^~~~~~~~~~
   drivers/gpu/drm/amd/display/include/fixed31_32.h:73:32: warning: 'dc_fixpt_two_pi' defined but not used [-Wunused-const-variable=]
      73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
         |                                ^~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/display/include/fixed31_32.h:72:32: warning: 'dc_fixpt_pi' defined but not used [-Wunused-const-variable=]
      72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
         |                                ^~~~~~~~~~~
   drivers/gpu/drm/amd/display/include/fixed31_32.h:67:32: warning: 'dc_fixpt_zero' defined but not used [-Wunused-const-variable=]
      67 | static const struct fixed31_32 dc_fixpt_zero = { 0 };
         |                                ^~~~~~~~~~~~~

vim +/kgd_gfx_v9_set_address_watch +854 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c

   778	
 > 779	uint32_t kgd_gfx_v9_disable_debug_trap(struct kgd_dev *kgd)
   780	{
   781		struct amdgpu_device *adev = get_amdgpu_device(kgd);
   782	
   783		mutex_lock(&adev->grbm_idx_mutex);
   784	
   785		WREG32(SOC15_REG_OFFSET(GC, 0, mmSPI_GDBG_TRAP_MASK), 0);
   786	
   787		mutex_unlock(&adev->grbm_idx_mutex);
   788	
   789		return 0;
   790	}
   791	
 > 792	uint32_t kgd_gfx_v9_set_wave_launch_trap_override(struct kgd_dev *kgd,
   793							uint32_t trap_override,
   794							uint32_t trap_mask)
   795	{
   796		struct amdgpu_device *adev = get_amdgpu_device(kgd);
   797		uint32_t data = 0;
   798	
   799		mutex_lock(&adev->grbm_idx_mutex);
   800	
   801		data = RREG32(SOC15_REG_OFFSET(GC, 0, mmSPI_GDBG_WAVE_CNTL));
   802		data = REG_SET_FIELD(data, SPI_GDBG_WAVE_CNTL, STALL_RA, 1);
   803		WREG32(SOC15_REG_OFFSET(GC, 0, mmSPI_GDBG_WAVE_CNTL), data);
   804	
   805		data = 0;
   806		data = REG_SET_FIELD(data, SPI_GDBG_TRAP_MASK,
   807			EXCP_EN, trap_mask);
   808		data = REG_SET_FIELD(data, SPI_GDBG_TRAP_MASK,
   809			REPLACE, trap_override);
   810		WREG32(SOC15_REG_OFFSET(GC, 0, mmSPI_GDBG_TRAP_MASK), data);
   811	
   812		data = RREG32(SOC15_REG_OFFSET(GC, 0, mmSPI_GDBG_WAVE_CNTL));
   813		data = REG_SET_FIELD(data, SPI_GDBG_WAVE_CNTL, STALL_RA, 0);
   814		WREG32(SOC15_REG_OFFSET(GC, 0, mmSPI_GDBG_WAVE_CNTL), data);
   815	
   816		mutex_unlock(&adev->grbm_idx_mutex);
   817	
   818		return 0;
   819	}
   820	
   821	uint32_t kgd_gfx_v9_set_wave_launch_mode(struct kgd_dev *kgd,
   822						uint8_t wave_launch_mode,
   823						uint32_t vmid)
   824	{
   825		struct amdgpu_device *adev = get_amdgpu_device(kgd);
   826		uint32_t data = 0;
   827		bool is_stall_mode;
   828		bool is_mode_set;
   829	
   830	
   831		is_stall_mode = (wave_launch_mode == 4);
   832		is_mode_set = (wave_launch_mode != 0 && wave_launch_mode != 4);
   833	
   834		mutex_lock(&adev->grbm_idx_mutex);
   835	
   836		data = REG_SET_FIELD(data, SPI_GDBG_WAVE_CNTL2,
   837			VMID_MASK, is_mode_set ? 1 << vmid : 0);
   838		data = REG_SET_FIELD(data, SPI_GDBG_WAVE_CNTL2,
   839			MODE, is_mode_set ? wave_launch_mode : 0);
   840		WREG32(SOC15_REG_OFFSET(GC, 0, mmSPI_GDBG_WAVE_CNTL2), data);
   841	
   842		data = RREG32(SOC15_REG_OFFSET(GC, 0, mmSPI_GDBG_WAVE_CNTL));
   843		data = REG_SET_FIELD(data, SPI_GDBG_WAVE_CNTL,
   844			STALL_VMID, is_stall_mode ? 1 << vmid : 0);
   845		data = REG_SET_FIELD(data, SPI_GDBG_WAVE_CNTL,
   846			STALL_RA, is_stall_mode ? 1 : 0);
   847		WREG32(SOC15_REG_OFFSET(GC, 0, mmSPI_GDBG_WAVE_CNTL), data);
   848	
   849		mutex_unlock(&adev->grbm_idx_mutex);
   850	
   851		return 0;
   852	}
   853	
 > 854	void kgd_gfx_v9_set_address_watch(struct kgd_dev *kgd,
   855						uint64_t watch_address,
   856						uint32_t watch_address_mask,
   857						uint32_t watch_id,
   858						uint32_t watch_mode,
   859						uint32_t debug_vmid)
   860	{
   861		struct amdgpu_device *adev = get_amdgpu_device(kgd);
   862		uint32_t watch_address_high;
   863		uint32_t watch_address_low;
   864		uint32_t watch_address_cntl;
   865	
   866		watch_address_cntl = 0;
   867	
   868		watch_address_low = lower_32_bits(watch_address);
   869		watch_address_high = upper_32_bits(watch_address) & 0xffff;
   870	
   871		watch_address_cntl = REG_SET_FIELD(watch_address_cntl,
   872				TCP_WATCH0_CNTL,
   873				VMID,
   874				debug_vmid);
   875		watch_address_cntl = REG_SET_FIELD(watch_address_cntl,
   876				TCP_WATCH0_CNTL,
   877				MODE,
   878				watch_mode);
   879		watch_address_cntl = REG_SET_FIELD(watch_address_cntl,
   880				TCP_WATCH0_CNTL,
   881				MASK,
   882				watch_address_mask >> 6);
   883	
   884		/* Turning off this watch point until we set all the registers */
   885		watch_address_cntl = REG_SET_FIELD(watch_address_cntl,
   886				TCP_WATCH0_CNTL,
   887				VALID,
   888				0);
   889	
   890		WREG32_RLC((SOC15_REG_OFFSET(GC, 0, mmTCP_WATCH0_CNTL) +
   891				(watch_id * TCP_WATCH_STRIDE)),
   892				watch_address_cntl);
   893	
   894		WREG32_RLC((SOC15_REG_OFFSET(GC, 0, mmTCP_WATCH0_ADDR_H) +
   895				(watch_id * TCP_WATCH_STRIDE)),
   896				watch_address_high);
   897	
   898		WREG32_RLC((SOC15_REG_OFFSET(GC, 0, mmTCP_WATCH0_ADDR_L) +
   899				(watch_id * TCP_WATCH_STRIDE)),
   900				watch_address_low);
   901	
   902		/* Enable the watch point */
   903		watch_address_cntl = REG_SET_FIELD(watch_address_cntl,
   904				TCP_WATCH0_CNTL,
   905				VALID,
   906				1);
   907	
   908		WREG32_RLC((SOC15_REG_OFFSET(GC, 0, mmTCP_WATCH0_CNTL) +
   909				(watch_id * TCP_WATCH_STRIDE)),
   910				watch_address_cntl);
   911	
   912	}
   913	
 > 914	void kgd_gfx_v9_clear_address_watch(struct kgd_dev *kgd,
   915						uint32_t watch_id)
   916	{
   917		struct amdgpu_device *adev = get_amdgpu_device(kgd);
   918	
   919		uint32_t watch_address_cntl;
   920	
   921		watch_address_cntl = 0;
   922	
   923		WREG32_RLC((SOC15_REG_OFFSET(GC, 0, mmTCP_WATCH0_CNTL) +
   924				(watch_id * TCP_WATCH_STRIDE)),
   925				watch_address_cntl);
   926	}
   927	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 65816 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20201215/d5423ce7/attachment-0001.gz>


More information about the dri-devel mailing list