dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Likun Gao <Likun.Gao@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	Kevin Wang <Kevin1.Wang@amd.com>, Huang Rui <ray.huang@amd.com>,
	kbuild-all@01.org, dri-devel@lists.freedesktop.org
Subject: [radeon-alex:drm-next-5.2-wip 105/353] drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c:97:30: sparse: incorrect type in initializer (different address spaces)
Date: Thu, 14 Mar 2019 19:12:34 +0800	[thread overview]
Message-ID: <201903141930.HrPTLRMY%lkp@intel.com> (raw)

tree:   git://people.freedesktop.org/~agd5f/linux.git drm-next-5.2-wip
head:   efb39951130465f9b034827df336c421f7e8fa6d
commit: e0c27cbc634243e85b718515e95e4880d2cfaac9 [105/353] drm/amd/powerplay: update hw fini function to relase some memory
reproduce:
        # apt-get install sparse
        git checkout e0c27cbc634243e85b718515e95e4880d2cfaac9
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'


sparse warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c:97:30: sparse: incorrect type in initializer (different address spaces) @@    expected void [noderef] <asn:2>*ptr @@    got sn:2>*ptr @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c:97:30:    expected void [noderef] <asn:2>*ptr
   drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c:97:30:    got void *<noident>
   drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c:177:30: sparse: expression using sizeof(void)
   drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c:187:29: sparse: expression using sizeof(void)
   drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c:187:29: sparse: expression using sizeof(void)
   drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c:189:33: sparse: expression using sizeof(void)
   drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c:189:33: sparse: expression using sizeof(void)
--
>> drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:156:31: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:164:25: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:164:25: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:164:25: sparse: cast to restricted __le32
   include/linux/slab.h:664:13: sparse: undefined identifier '__builtin_mul_overflow'
   drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:348:5: sparse: symbol 'smu_v11_0_get_vbios_bootup_values' was not declared. Should it be static?
   drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:424:45: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:438:46: sparse: cast to restricted __le32
   include/linux/slab.h:664:13: sparse: call with no type!

vim +97 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c

961c75cf Christian König 2018-08-23   81  
961c75cf Christian König 2018-08-23   82  /**
b9d8c7f2 Yong Zhao       2019-02-25   83   * amdgpu_gmc_set_pte_pde - update the page tables using CPU
b9d8c7f2 Yong Zhao       2019-02-25   84   *
b9d8c7f2 Yong Zhao       2019-02-25   85   * @adev: amdgpu_device pointer
b9d8c7f2 Yong Zhao       2019-02-25   86   * @cpu_pt_addr: cpu address of the page table
b9d8c7f2 Yong Zhao       2019-02-25   87   * @gpu_page_idx: entry in the page table to update
b9d8c7f2 Yong Zhao       2019-02-25   88   * @addr: dst addr to write into pte/pde
b9d8c7f2 Yong Zhao       2019-02-25   89   * @flags: access flags
b9d8c7f2 Yong Zhao       2019-02-25   90   *
b9d8c7f2 Yong Zhao       2019-02-25   91   * Update the page tables using CPU.
b9d8c7f2 Yong Zhao       2019-02-25   92   */
b9d8c7f2 Yong Zhao       2019-02-25   93  int amdgpu_gmc_set_pte_pde(struct amdgpu_device *adev, void *cpu_pt_addr,
b9d8c7f2 Yong Zhao       2019-02-25   94  				uint32_t gpu_page_idx, uint64_t addr,
b9d8c7f2 Yong Zhao       2019-02-25   95  				uint64_t flags)
b9d8c7f2 Yong Zhao       2019-02-25   96  {
b9d8c7f2 Yong Zhao       2019-02-25  @97  	void __iomem *ptr = (void *)cpu_pt_addr;
b9d8c7f2 Yong Zhao       2019-02-25   98  	uint64_t value;
b9d8c7f2 Yong Zhao       2019-02-25   99  
b9d8c7f2 Yong Zhao       2019-02-25  100  	/*
b9d8c7f2 Yong Zhao       2019-02-25  101  	 * The following is for PTE only. GART does not have PDEs.
b9d8c7f2 Yong Zhao       2019-02-25  102  	*/
b9d8c7f2 Yong Zhao       2019-02-25  103  	value = addr & 0x0000FFFFFFFFF000ULL;
b9d8c7f2 Yong Zhao       2019-02-25  104  	value |= flags;
b9d8c7f2 Yong Zhao       2019-02-25  105  	writeq(value, ptr + (gpu_page_idx * 8));
b9d8c7f2 Yong Zhao       2019-02-25  106  	return 0;
b9d8c7f2 Yong Zhao       2019-02-25  107  }
b9d8c7f2 Yong Zhao       2019-02-25  108  

:::::: The code at line 97 was first introduced by commit
:::::: b9d8c7f2d8d51bd382062b30a52b0bfe1750c05e drm/amdgpu: Eliminate the set_pde_pte function pointer in amdgpu_gmc_funcs

:::::: TO: Yong Zhao <Yong.Zhao@amd.com>
:::::: CC: Alex Deucher <alexander.deucher@amd.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

                 reply	other threads:[~2019-03-14 11:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201903141930.HrPTLRMY%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Kevin1.Wang@amd.com \
    --cc=Likun.Gao@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kbuild-all@01.org \
    --cc=ray.huang@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox