From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9626C3DA49 for ; Thu, 25 Jul 2024 13:56:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5607B6B0093; Thu, 25 Jul 2024 09:56:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 50FC56B0095; Thu, 25 Jul 2024 09:56:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3D7706B0096; Thu, 25 Jul 2024 09:56:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 1F7C86B0093 for ; Thu, 25 Jul 2024 09:56:14 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 8AE2D1A10E5 for ; Thu, 25 Jul 2024 13:56:13 +0000 (UTC) X-FDA: 82378424226.05.DD7CFE7 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by imf24.hostedemail.com (Postfix) with ESMTP id 59331180034 for ; Thu, 25 Jul 2024 13:56:11 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=fGJjYSOe; spf=pass (imf24.hostedemail.com: domain of lkp@intel.com designates 198.175.65.12 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1721915733; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=QLXvaEtJ3OYBdrTUcO+lIilYDhUJsF9wx8mLJso+Dw4=; b=sKwoST3FW0y0ks1CYKqz24e3WETcM4WYw10XCucF7wuxm5sXKF0NFz7esN2EAfyQbJ/Fg1 EH5AITC+GfqIcM2UwWjv39/+vizb50U53SzjGjAakcAwkCsSt9XS9DVb2kib9Ci3NGsJMm fLRyug7o6ExvvbH0A0fUdwI1f3dwIeo= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=fGJjYSOe; spf=pass (imf24.hostedemail.com: domain of lkp@intel.com designates 198.175.65.12 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721915733; a=rsa-sha256; cv=none; b=vsIS8ChFYXcZP/ymPDKolD4b4Mf98x+oA7wVH32mDiy9muVARgLDttSQQtOqlOZiWvxVbF 10VtigZxcP8pwpIB43I7keZtge3y3oI4xpSC1x3Sf9CcnBnZWAP7LfDwzDa9YwBB030JO7 /nwuI4pgkKbc46tK1dPnpT0luObzpKc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1721915771; x=1753451771; h=date:from:to:cc:subject:message-id:mime-version; bh=NOYdpXwRPkSK0sL6t7lqh6vdEQOchDm9XRO72K10ylI=; b=fGJjYSOe1/ikGe/BV8A3OG8TVA4fNlqQR/tAUzyv6N037rgey+sRg/Vo 5Zr+Y3QshV607d4ZbLVqPMi/3X+J4GAmnN/c4jgRn+/DwAQd9id1fjqCa e9WqyX2HcNJwaxWym1cb+yNKl/wp+EuQU6O1iyh0CzmrTUo8/5xCuc1qI vTSMYQm61KFeWaIH6vDPdNE3PNAD3gFwliqMX9WBixgyz3ZhUj3CbnQLh FI7+VV88FO7FdeRxDV7odoVJJlPdUJtG5jxKZFlCO2l/RF97laAgnYmNS mGBLcEkhn3YScRqYireeo10QpaNkYk8xbpcUkmpUjYiISgZ1fa/s3z/99 Q==; X-CSE-ConnectionGUID: hI6HpITiTA2qWwozeKsePw== X-CSE-MsgGUID: qPyNZklISg6SDyghS84YUw== X-IronPort-AV: E=McAfee;i="6700,10204,11144"; a="31041471" X-IronPort-AV: E=Sophos;i="6.09,236,1716274800"; d="scan'208";a="31041471" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2024 06:56:10 -0700 X-CSE-ConnectionGUID: RghD6leiQq2zdN6qNjaCEg== X-CSE-MsgGUID: mkT62unaQ0SBds4Fbbhweg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,236,1716274800"; d="scan'208";a="57733141" Received: from lkp-server01.sh.intel.com (HELO 68891e0c336b) ([10.239.97.150]) by orviesa005.jf.intel.com with ESMTP; 25 Jul 2024 06:56:08 -0700 Received: from kbuild by 68891e0c336b with local (Exim 4.96) (envelope-from ) id 1sWyww-000o9a-0H; Thu, 25 Jul 2024 13:56:06 +0000 Date: Thu, 25 Jul 2024 21:55:07 +0800 From: kernel test robot To: Philip Yang Cc: oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Alex Deucher , Felix Kuehling Subject: [linux-next:master 13686/13827] drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:107:24: error: assignment to 'struct svm_range *' from 'int' makes pointer from integer without a cast Message-ID: <202407252127.zvnxaKRA-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Stat-Signature: edam8xj31fzfzef674ecotu9sa18ygzs X-Rspam-User: X-Rspamd-Queue-Id: 59331180034 X-Rspamd-Server: rspam02 X-HE-Tag: 1721915771-885582 X-HE-Meta: U2FsdGVkX1/YVrfeYp1WX9/4SOHaH2oY8vHC2zP9F9rclDDXWJUmk6qRkE10fjWpJg7Zq1W7s5XzbvG5Pc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ziCWxcHhYhaPtx1pouFc+CmemycYuai5htwrAXOoggGcwMCz9oidji9IasCPXgNndVIVVJxdaigC8Am6pucDPbYZKQcWlIX1viM9J5gdoum/ofu7RA1cvC0ovpIX9X3f0xqzQ5XkHVwJMcjZf53+JSo5OLjzqmUatViaLVf4r6z/p+LuYE+ILaPPNefWoY98acHuTZ3bI X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 864b1099d16fc7e332c3ad7823058c65f890486c commit: b049504e211e8f4dbcd40434f2dcab2215ea1039 [13686/13827] drm/amdkfd: Validate user queue svm memory residency config: powerpc64-randconfig-003-20240725 (https://download.01.org/0day-ci/archive/20240725/202407252127.zvnxaKRA-lkp@intel.com/config) compiler: powerpc64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240725/202407252127.zvnxaKRA-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202407252127.zvnxaKRA-lkp@intel.com/ All errors (new ones prefixed by >>): drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c: In function 'kfd_queue_buffer_svm_get': drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:107:26: error: implicit declaration of function 'svm_range_from_addr' [-Wimplicit-function-declaration] 107 | prange = svm_range_from_addr(&p->svms, addr, NULL); | ^~~~~~~~~~~~~~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:107:24: error: assignment to 'struct svm_range *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 107 | prange = svm_range_from_addr(&p->svms, addr, NULL); | ^ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:111:28: error: invalid use of undefined type 'struct svm_range' 111 | if (!prange->mapped_to_gpu) | ^~ In file included from include/linux/kernel.h:23, from arch/powerpc/include/asm/page.h:11, from arch/powerpc/include/asm/mmu.h:144, from arch/powerpc/include/asm/paca.h:18, from arch/powerpc/include/asm/current.h:13, from include/linux/thread_info.h:23, from include/asm-generic/preempt.h:5, from ./arch/powerpc/include/generated/asm/preempt.h:1, from include/linux/preempt.h:79, from include/linux/spinlock.h:56, from include/linux/mmzone.h:8, from include/linux/gfp.h:7, from include/linux/slab.h:16, from drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:25: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:117:45: error: invalid use of undefined type 'struct svm_range' 117 | if (!test_bit(gpuidx, prange->bitmap_access) && | ^~ include/linux/bitops.h:45:44: note: in definition of macro 'bitop' 45 | __builtin_constant_p((uintptr_t)(addr) != (uintptr_t)NULL) && \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:117:22: note: in expansion of macro 'test_bit' 117 | if (!test_bit(gpuidx, prange->bitmap_access) && | ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:117:45: error: invalid use of undefined type 'struct svm_range' 117 | if (!test_bit(gpuidx, prange->bitmap_access) && | ^~ include/linux/bitops.h:46:23: note: in definition of macro 'bitop' 46 | (uintptr_t)(addr) != (uintptr_t)NULL && \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:117:22: note: in expansion of macro 'test_bit' 117 | if (!test_bit(gpuidx, prange->bitmap_access) && | ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:117:45: error: invalid use of undefined type 'struct svm_range' 117 | if (!test_bit(gpuidx, prange->bitmap_access) && | ^~ include/linux/bitops.h:47:57: note: in definition of macro 'bitop' 47 | __builtin_constant_p(*(const unsigned long *)(addr))) ? \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:117:22: note: in expansion of macro 'test_bit' 117 | if (!test_bit(gpuidx, prange->bitmap_access) && | ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:117:45: error: invalid use of undefined type 'struct svm_range' 117 | if (!test_bit(gpuidx, prange->bitmap_access) && | ^~ include/linux/bitops.h:48:24: note: in definition of macro 'bitop' 48 | const##op(nr, addr) : op(nr, addr)) | ^~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:117:22: note: in expansion of macro 'test_bit' 117 | if (!test_bit(gpuidx, prange->bitmap_access) && | ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:117:45: error: invalid use of undefined type 'struct svm_range' 117 | if (!test_bit(gpuidx, prange->bitmap_access) && | ^~ include/linux/bitops.h:48:39: note: in definition of macro 'bitop' 48 | const##op(nr, addr) : op(nr, addr)) | ^~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:117:22: note: in expansion of macro 'test_bit' 117 | if (!test_bit(gpuidx, prange->bitmap_access) && | ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:118:45: error: invalid use of undefined type 'struct svm_range' 118 | !test_bit(gpuidx, prange->bitmap_aip)) | ^~ include/linux/bitops.h:45:44: note: in definition of macro 'bitop' 45 | __builtin_constant_p((uintptr_t)(addr) != (uintptr_t)NULL) && \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:118:22: note: in expansion of macro 'test_bit' 118 | !test_bit(gpuidx, prange->bitmap_aip)) | ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:118:45: error: invalid use of undefined type 'struct svm_range' 118 | !test_bit(gpuidx, prange->bitmap_aip)) | ^~ include/linux/bitops.h:46:23: note: in definition of macro 'bitop' 46 | (uintptr_t)(addr) != (uintptr_t)NULL && \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:118:22: note: in expansion of macro 'test_bit' 118 | !test_bit(gpuidx, prange->bitmap_aip)) | ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:118:45: error: invalid use of undefined type 'struct svm_range' 118 | !test_bit(gpuidx, prange->bitmap_aip)) | ^~ include/linux/bitops.h:47:57: note: in definition of macro 'bitop' 47 | __builtin_constant_p(*(const unsigned long *)(addr))) ? \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:118:22: note: in expansion of macro 'test_bit' 118 | !test_bit(gpuidx, prange->bitmap_aip)) | ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:118:45: error: invalid use of undefined type 'struct svm_range' 118 | !test_bit(gpuidx, prange->bitmap_aip)) | ^~ include/linux/bitops.h:48:24: note: in definition of macro 'bitop' 48 | const##op(nr, addr) : op(nr, addr)) | ^~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:118:22: note: in expansion of macro 'test_bit' 118 | !test_bit(gpuidx, prange->bitmap_aip)) | ^~~~~~~~ vim +107 drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c 86 87 static int kfd_queue_buffer_svm_get(struct kfd_process_device *pdd, u64 addr, u64 size) 88 { 89 struct kfd_process *p = pdd->process; 90 struct list_head update_list; 91 struct svm_range *prange; 92 int ret = -EINVAL; 93 94 INIT_LIST_HEAD(&update_list); 95 addr >>= PAGE_SHIFT; 96 size >>= PAGE_SHIFT; 97 98 mutex_lock(&p->svms.lock); 99 100 /* 101 * range may split to multiple svm pranges aligned to granularity boundaery. 102 */ 103 while (size) { 104 uint32_t gpuid, gpuidx; 105 int r; 106 > 107 prange = svm_range_from_addr(&p->svms, addr, NULL); 108 if (!prange) 109 break; 110 111 if (!prange->mapped_to_gpu) 112 break; 113 114 r = kfd_process_gpuid_from_node(p, pdd->dev, &gpuid, &gpuidx); 115 if (r < 0) 116 break; 117 if (!test_bit(gpuidx, prange->bitmap_access) && 118 !test_bit(gpuidx, prange->bitmap_aip)) 119 break; 120 121 if (!(prange->flags & KFD_IOCTL_SVM_FLAG_GPU_ALWAYS_MAPPED)) 122 break; 123 124 list_add(&prange->update_list, &update_list); 125 126 if (prange->last - prange->start + 1 >= size) { 127 size = 0; 128 break; 129 } 130 131 size -= prange->last - prange->start + 1; 132 addr += prange->last - prange->start + 1; 133 } 134 if (size) { 135 pr_debug("[0x%llx 0x%llx] not registered\n", addr, addr + size - 1); 136 goto out_unlock; 137 } 138 139 list_for_each_entry(prange, &update_list, update_list) 140 atomic_inc(&prange->queue_refcount); 141 ret = 0; 142 143 out_unlock: 144 mutex_unlock(&p->svms.lock); 145 return ret; 146 } 147 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki