tree:   git://people.freedesktop.org/~agd5f/linux.git amd-20.45
head:   1807abbb3a7f17fc931a15d7fd4365ea148c6bb1
commit: abdc393ab8265df9db5d9d64eb33ed1c33e9d95c [1587/2417] drm/amdkfd: Add 
gfx10 address watch support
config: x86_64-randconfig-a011-20201120 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 
3ded927cf80ac519f9f9c4664fef08787f7c537d)
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 remote add radeon-alex git://people.freedesktop.org/~agd5f/linux.git
        git fetch --no-tags radeon-alex amd-20.45
        git checkout abdc393ab8265df9db5d9d64eb33ed1c33e9d95c
        # 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 <l...@intel.com>

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:763:6: warning: no 
previous prototype for function 'kgd_gfx_v10_enable_debug_trap' 
[-Wmissing-prototypes]
   void kgd_gfx_v10_enable_debug_trap(struct kgd_dev *kgd,
        ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:763:1: note: declare 
'static' if the function is not intended to be used outside of this translation 
unit
   void kgd_gfx_v10_enable_debug_trap(struct kgd_dev *kgd,
   ^
   static 
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:792:6: warning: no 
previous prototype for function 'kgd_gfx_v10_disable_debug_trap' 
[-Wmissing-prototypes]
   void kgd_gfx_v10_disable_debug_trap(struct kgd_dev *kgd)
        ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:792:1: note: declare 
'static' if the function is not intended to be used outside of this translation 
unit
   void kgd_gfx_v10_disable_debug_trap(struct kgd_dev *kgd)
   ^
   static 
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:803:5: warning: no 
previous prototype for function 'kgd_gfx_v10_set_wave_launch_trap_override' 
[-Wmissing-prototypes]
   int kgd_gfx_v10_set_wave_launch_trap_override(struct kgd_dev *kgd,
       ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:803:1: note: declare 
'static' if the function is not intended to be used outside of this translation 
unit
   int kgd_gfx_v10_set_wave_launch_trap_override(struct kgd_dev *kgd,
   ^
   static 
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:852:6: warning: no 
previous prototype for function 'kgd_gfx_v10_set_wave_launch_mode' 
[-Wmissing-prototypes]
   void kgd_gfx_v10_set_wave_launch_mode(struct kgd_dev *kgd,
        ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:852:1: note: declare 
'static' if the function is not intended to be used outside of this translation 
unit
   void kgd_gfx_v10_set_wave_launch_mode(struct kgd_dev *kgd,
   ^
   static 
>> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:882:6: warning: no 
>> previous prototype for function 'kgd_gfx_v10_set_address_watch' 
>> [-Wmissing-prototypes]
   void kgd_gfx_v10_set_address_watch(struct kgd_dev *kgd,
        ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:882:1: note: declare 
'static' if the function is not intended to be used outside of this translation 
unit
   void kgd_gfx_v10_set_address_watch(struct kgd_dev *kgd,
   ^
   static 
>> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:942:6: warning: no 
>> previous prototype for function 'kgd_gfx_v10_clear_address_watch' 
>> [-Wmissing-prototypes]
   void kgd_gfx_v10_clear_address_watch(struct kgd_dev *kgd,
        ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:942:1: note: declare 
'static' if the function is not intended to be used outside of this translation 
unit
   void kgd_gfx_v10_clear_address_watch(struct kgd_dev *kgd,
   ^
   static 
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:967:6: warning: no 
previous prototype for function 'kgd_gfx_v10_get_iq_wait_times' 
[-Wmissing-prototypes]
   void kgd_gfx_v10_get_iq_wait_times(struct kgd_dev *kgd,
        ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:967:1: note: declare 
'static' if the function is not intended to be used outside of this translation 
unit
   void kgd_gfx_v10_get_iq_wait_times(struct kgd_dev *kgd,
   ^
   static 
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:976:6: warning: no 
previous prototype for function 'kgd_gfx_v10_build_grace_period_packet_info' 
[-Wmissing-prototypes]
   void kgd_gfx_v10_build_grace_period_packet_info(struct kgd_dev *kgd,
        ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:976:1: note: declare 
'static' if the function is not intended to be used outside of this translation 
unit
   void kgd_gfx_v10_build_grace_period_packet_info(struct kgd_dev *kgd,
   ^
   static 
   8 warnings generated.

vim +/kgd_gfx_v10_set_address_watch +882 
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c

   851  
 > 852  void kgd_gfx_v10_set_wave_launch_mode(struct kgd_dev *kgd,
   853                                          uint8_t wave_launch_mode,
   854                                          uint32_t vmid)
   855  {
   856          struct amdgpu_device *adev = get_amdgpu_device(kgd);
   857          uint32_t data = 0;
   858          bool is_stall_mode;
   859          bool is_mode_set;
   860  
   861          is_stall_mode = (wave_launch_mode == 4);
   862          is_mode_set = (wave_launch_mode != 0 && wave_launch_mode != 4);
   863  
   864          mutex_lock(&adev->grbm_idx_mutex);
   865  
   866          data = REG_SET_FIELD(data, SPI_GDBG_WAVE_CNTL2,
   867                          VMID_MASK, is_mode_set ? 1 << vmid : 0);
   868          data = REG_SET_FIELD(data, SPI_GDBG_WAVE_CNTL2,
   869                          MODE, is_mode_set ? wave_launch_mode : 0);
   870          WREG32(SOC15_REG_OFFSET(GC, 0, mmSPI_GDBG_WAVE_CNTL2), data);
   871  
   872          data = RREG32(SOC15_REG_OFFSET(GC, 0, mmSPI_GDBG_WAVE_CNTL));
   873          data = REG_SET_FIELD(data, SPI_GDBG_WAVE_CNTL,
   874                          STALL_VMID, is_stall_mode ? 1 << vmid : 0);
   875          data = REG_SET_FIELD(data, SPI_GDBG_WAVE_CNTL,
   876                          STALL_RA, is_stall_mode ? 1 : 0);
   877          WREG32(SOC15_REG_OFFSET(GC, 0, mmSPI_GDBG_WAVE_CNTL), data);
   878  
   879          mutex_unlock(&adev->grbm_idx_mutex);
   880  }
   881  
 > 882  void kgd_gfx_v10_set_address_watch(struct kgd_dev *kgd,
   883                                          uint64_t watch_address,
   884                                          uint32_t watch_address_mask,
   885                                          uint32_t watch_id,
   886                                          uint32_t watch_mode,
   887                                          uint32_t debug_vmid)
   888  {
   889          struct amdgpu_device *adev = get_amdgpu_device(kgd);
   890          uint32_t watch_address_high;
   891          uint32_t watch_address_low;
   892          uint32_t watch_address_cntl;
   893  
   894          watch_address_cntl = 0;
   895  
   896          watch_address_low = lower_32_bits(watch_address);
   897          watch_address_high = upper_32_bits(watch_address) & 0xffff;
   898  
   899          watch_address_cntl = REG_SET_FIELD(watch_address_cntl,
   900                          TCP_WATCH0_CNTL,
   901                          VMID,
   902                          debug_vmid);
   903          watch_address_cntl = REG_SET_FIELD(watch_address_cntl,
   904                          TCP_WATCH0_CNTL,
   905                          MODE,
   906                          watch_mode);
   907          watch_address_cntl = REG_SET_FIELD(watch_address_cntl,
   908                          TCP_WATCH0_CNTL,
   909                          MASK,
   910                          watch_address_mask >> 6);
   911  
   912          /* Turning off this watch point until we set all the registers 
*/
   913          watch_address_cntl = REG_SET_FIELD(watch_address_cntl,
   914                          TCP_WATCH0_CNTL,
   915                          VALID,
   916                          0);
   917  
   918          WREG32((SOC15_REG_OFFSET(GC, 0, mmTCP_WATCH0_CNTL) +
   919                          (watch_id * TCP_WATCH_STRIDE)),
   920                          watch_address_cntl);
   921  
   922          WREG32((SOC15_REG_OFFSET(GC, 0, mmTCP_WATCH0_ADDR_H) +
   923                          (watch_id * TCP_WATCH_STRIDE)),
   924                          watch_address_high);
   925  
   926          WREG32((SOC15_REG_OFFSET(GC, 0, mmTCP_WATCH0_ADDR_L) +
   927                          (watch_id * TCP_WATCH_STRIDE)),
   928                          watch_address_low);
   929  
   930          /* Enable the watch point */
   931          watch_address_cntl = REG_SET_FIELD(watch_address_cntl,
   932                          TCP_WATCH0_CNTL,
   933                          VALID,
   934                          1);
   935  
   936          WREG32((SOC15_REG_OFFSET(GC, 0, mmTCP_WATCH0_CNTL) +
   937                          (watch_id * TCP_WATCH_STRIDE)),
   938                          watch_address_cntl);
   939  
   940  }
   941  
 > 942  void kgd_gfx_v10_clear_address_watch(struct kgd_dev *kgd,
   943                                          uint32_t watch_id)
   944  {
   945          struct amdgpu_device *adev = get_amdgpu_device(kgd);
   946  
   947          uint32_t watch_address_cntl;
   948  
   949          watch_address_cntl = 0;
   950  
   951          WREG32((SOC15_REG_OFFSET(GC, 0, mmTCP_WATCH0_CNTL) +
   952                          (watch_id * TCP_WATCH_STRIDE)),
   953                          watch_address_cntl);
   954  }
   955  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org

Attachment: .config.gz
Description: application/gzip

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to