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 55383C3DA64 for ; Wed, 31 Jul 2024 09:34:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C0EB76B0085; Wed, 31 Jul 2024 05:34:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BBED86B0088; Wed, 31 Jul 2024 05:34:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A861F6B0089; Wed, 31 Jul 2024 05:34:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 857F06B0085 for ; Wed, 31 Jul 2024 05:34:37 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 016C7A3EA4 for ; Wed, 31 Jul 2024 09:34:36 +0000 (UTC) X-FDA: 82399537794.06.6042A15 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by imf30.hostedemail.com (Postfix) with ESMTP id 8564980005 for ; Wed, 31 Jul 2024 09:34:33 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=UCAMedHT; spf=pass (imf30.hostedemail.com: domain of lkp@intel.com designates 192.198.163.16 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=1722418401; 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=G9fCjthYAFIVMbKv+JtmJ1D9KoJkVAUIY0tLYKr/4js=; b=pit0b53Ba1/LCdRFmHo8fp6VToz4y8yNuwu4HkSHnH3bfCtR/3sLaG4t+j1G/vUnR2iydb M6Z4NcovznzBE6hPrOAaoMwd8KlpPs5t+wWWa5Z/q4tMd4uS/r+9CdhwTCNNpnoaqRbs4F 6vAuyO5hU0rNxc7wyf1Knw7UK1+NFRA= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=UCAMedHT; spf=pass (imf30.hostedemail.com: domain of lkp@intel.com designates 192.198.163.16 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=1722418401; a=rsa-sha256; cv=none; b=nKZzgw09uzLhR0daCIFJQH4lXu3hV52yEM7Qp84YWwtkMBdX23JP2P2LAXKnrQi+0L+d07 EwnMijW3jMxx1nO/a67mOApWqq+Rzr4oC4ce7v8nlRV9DlVaWZL/jgxk/jP88r6oAHkPdK vwR40h56JnMN8DfikI1DXz9ZONdP3UI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1722418473; x=1753954473; h=date:from:to:cc:subject:message-id:mime-version; bh=KlpK0SwHaMTAMXHQEF4K/rCB8PE/T83ED3Fv9638Uko=; b=UCAMedHTcrdrRtbexRjJzVndwlI+Oh8zcUulDH2V758EMqUJWiZHnqSb g22adTtRKjPey+zJNqzZnpYwbLlhTopxB6e4CkCPkqBz6K0fJHL2wjaN2 3vmuX6d1XOpwEEph8BhVkO4PcI4Ovx3YhslIfpXVu4Bv3Lk1rSU2XKvOV 1NhIZOpvxO0rjVXWfnlh8dd9NzGzElzeSY5+lYQIhSEYNsp/UyGv5VyDA jqhOrEb6OJuSZNpVkO9gClZRdplRJCVHMx4DWH3AlKQMk82Lq8iJ+APmB RdacGJO98599hUEtNQqUv4BXkZizhmTM9tKYrY97KS5N/pj0AbzqZXhkO g==; X-CSE-ConnectionGUID: EO9udWGETr+tGQBF+wGgEQ== X-CSE-MsgGUID: 893uod8FSB+ohTkHV94jRg== X-IronPort-AV: E=McAfee;i="6700,10204,11149"; a="12803295" X-IronPort-AV: E=Sophos;i="6.09,251,1716274800"; d="scan'208";a="12803295" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jul 2024 02:34:32 -0700 X-CSE-ConnectionGUID: u0bNwAomTTGlKsqUPXlhzQ== X-CSE-MsgGUID: R6HRhkQ3Sv+oWjLBOZnPug== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,251,1716274800"; d="scan'208";a="54871123" Received: from lkp-server01.sh.intel.com (HELO 68891e0c336b) ([10.239.97.150]) by orviesa006.jf.intel.com with ESMTP; 31 Jul 2024 02:34:30 -0700 Received: from kbuild by 68891e0c336b with local (Exim 4.96) (envelope-from ) id 1sZ5j1-000u5s-11; Wed, 31 Jul 2024 09:34:27 +0000 Date: Wed, 31 Jul 2024 17:34:21 +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 837/1677] drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:107:10: warning: assignment makes pointer from integer without a cast Message-ID: <202407311751.DspbODml-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 8564980005 X-Stat-Signature: ek4rz1sjd43xqx6qoqmqzakqh691w6zf X-Rspam-User: X-HE-Tag: 1722418473-8279 X-HE-Meta: U2FsdGVkX1+iY8QcB7XcOyip3ypZipddWR5muFA7UhVY/B+rjzPHFLgCCIJUD1VpRn177b93XoA7Ir77IfkBbGdKoMpK/Q9J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S6vSsE/nPhffKIEA56cn1pHOQoB2a9nk7w0O1yUTTS1pwsBuDNHPkBvdBwwplgGER9uNfkMjtraFHGujVFdKDiYpzidJibG/8hGUv+F8WELeJWmFmVyGxiHOCk7UjSoKT10eP5hjyi/lhI57yrQx+of0Gmv2LDgXAC0DNBcJx6FK/2YSLdCMls2JO9bhyurABENLVu8Ug1nTRp4YLmnU4p6tyo 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: cd19ac2f903276b820f5d0d89de0c896c27036ed commit: b049504e211e8f4dbcd40434f2dcab2215ea1039 [837/1677] drm/amdkfd: Validate user queue svm memory residency config: x86_64-randconfig-013-20240731 (https://download.01.org/0day-ci/archive/20240731/202407311751.DspbODml-lkp@intel.com/config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240731/202407311751.DspbODml-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/202407311751.DspbODml-lkp@intel.com/ All warnings (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:12: error: implicit declaration of function 'svm_range_from_addr'; did you mean 'svm_range_get_info'? [-Werror=implicit-function-declaration] prange = svm_range_from_addr(&p->svms, addr, NULL); ^~~~~~~~~~~~~~~~~~~ svm_range_get_info >> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:107:10: warning: assignment makes pointer from integer without a cast [-Wint-conversion] prange = svm_range_from_addr(&p->svms, addr, NULL); ^ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:111:14: error: dereferencing pointer to incomplete type 'struct svm_range' if (!prange->mapped_to_gpu) ^~ In file included from include/linux/bits.h:22:0, from include/linux/gfp_types.h:5, from include/linux/gfp.h:5, from include/linux/slab.h:16, from drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:25: include/linux/compiler_types.h:451:27: error: expression in static assertion is not an integer #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) ^ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) ^~~~ include/linux/container_of.h:20:2: note: in expansion of macro 'static_assert' static_assert(__same_type(*(ptr), ((type *)0)->member) || \ ^~~~~~~~~~~~~ include/linux/container_of.h:20:16: note: in expansion of macro '__same_type' static_assert(__same_type(*(ptr), ((type *)0)->member) || \ ^~~~~~~~~~~ include/linux/list.h:601:2: note: in expansion of macro 'container_of' container_of(ptr, type, member) ^~~~~~~~~~~~ include/linux/list.h:612:2: note: in expansion of macro 'list_entry' list_entry((ptr)->next, type, member) ^~~~~~~~~~ include/linux/list.h:778:13: note: in expansion of macro 'list_first_entry' for (pos = list_first_entry(head, typeof(*pos), member); \ ^~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:139:2: note: in expansion of macro 'list_for_each_entry' list_for_each_entry(prange, &update_list, update_list) ^~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:451:27: error: expression in static assertion is not an integer #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) ^ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) ^~~~ include/linux/container_of.h:20:2: note: in expansion of macro 'static_assert' static_assert(__same_type(*(ptr), ((type *)0)->member) || \ ^~~~~~~~~~~~~ include/linux/container_of.h:20:16: note: in expansion of macro '__same_type' static_assert(__same_type(*(ptr), ((type *)0)->member) || \ ^~~~~~~~~~~ include/linux/list.h:601:2: note: in expansion of macro 'container_of' container_of(ptr, type, member) ^~~~~~~~~~~~ include/linux/list.h:645:2: note: in expansion of macro 'list_entry' list_entry((pos)->member.next, typeof(*(pos)), member) ^~~~~~~~~~ include/linux/list.h:780:13: note: in expansion of macro 'list_next_entry' pos = list_next_entry(pos, member)) ^~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:139:2: note: in expansion of macro 'list_for_each_entry' list_for_each_entry(prange, &update_list, update_list) ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c: In function 'kfd_queue_buffer_svm_put': include/linux/container_of.h:20:47: error: dereferencing pointer to incomplete type 'struct svm_range' static_assert(__same_type(*(ptr), ((type *)0)->member) || \ ^ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) ^~~~ include/linux/container_of.h:20:2: note: in expansion of macro 'static_assert' static_assert(__same_type(*(ptr), ((type *)0)->member) || \ ^~~~~~~~~~~~~ include/linux/container_of.h:20:16: note: in expansion of macro '__same_type' static_assert(__same_type(*(ptr), ((type *)0)->member) || \ ^~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:165:12: note: in expansion of macro 'container_of' prange = container_of(node, struct svm_range, it_node); ^~~~~~~~~~~~ include/linux/compiler_types.h:451:27: error: expression in static assertion is not an integer #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) ^ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) ^~~~ include/linux/container_of.h:20:2: note: in expansion of macro 'static_assert' static_assert(__same_type(*(ptr), ((type *)0)->member) || \ ^~~~~~~~~~~~~ include/linux/container_of.h:20:16: note: in expansion of macro '__same_type' static_assert(__same_type(*(ptr), ((type *)0)->member) || \ ^~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:165:12: note: in expansion of macro 'container_of' prange = container_of(node, struct svm_range, it_node); ^~~~~~~~~~~~ In file included from include/uapi/linux/posix_types.h:5:0, from include/uapi/linux/types.h:14, from include/linux/types.h:6, from include/uapi/linux/sysinfo.h:5, from include/uapi/linux/kernel.h:5, from include/linux/cache.h:5, from include/linux/slab.h:15, from drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_queue.c:25: include/linux/stddef.h:16:32: error: invalid use of undefined type 'struct svm_range' #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER) ^ 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