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 EB6CACA0EC0 for ; Thu, 29 Aug 2024 20:58:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 007CE6B0083; Thu, 29 Aug 2024 16:58:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EF9096B0085; Thu, 29 Aug 2024 16:58:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D733B6B0089; Thu, 29 Aug 2024 16:58:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id A26ED6B0083 for ; Thu, 29 Aug 2024 16:58:46 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 49EF0160496 for ; Thu, 29 Aug 2024 20:58:46 +0000 (UTC) X-FDA: 82506497052.08.0E37880 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by imf04.hostedemail.com (Postfix) with ESMTP id CDFA140008 for ; Thu, 29 Aug 2024 20:58:42 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=jF5OWwcf; spf=pass (imf04.hostedemail.com: domain of lkp@intel.com designates 198.175.65.10 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=1724965036; 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=kxGsKgV9t6oupN6634XfuZewARsvbegdiscsSN/1BAo=; b=N7ZLzb2EsY6+jXyI6FRPEwQT6cl5Ip9rBqAzoprO68iT0aJVane3fZ3tR14hMIZp1S/ymN lXi5qNl3DndBcyewl+xN7zb4YHRmmeTCrwmECKLd0uHL4pkukQ6mI9/J0fny6DvuVUPHyi c5eInLp/S3IyGTKkOL35nX3tyn+ob6c= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1724965036; a=rsa-sha256; cv=none; b=zXKvKlFfylC6ugipxhlMaaQARcsxqiMyURbi9GIMhMyosJKHIj1A4KaZ4mQlhn6yViqzS2 4kyE1dDV9d70CXpOay2wrY6LJsMPTyCE4p+lI+S0duQV/kDICNCYEoboexos5/Yu5oNo8Y bk56UkxuqfY8cQooOLf2A8BgCNqImio= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=jF5OWwcf; spf=pass (imf04.hostedemail.com: domain of lkp@intel.com designates 198.175.65.10 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724965123; x=1756501123; h=date:from:to:cc:subject:message-id:mime-version; bh=b+4qD1cIb/TJ53fWFfgtWVJxxOmpdanE0Kan2qefjh8=; b=jF5OWwcfXCERHSFZlo0McxHPbDVATDnVeWbAENx19zTD+b2/E+o0QB3p TR5Got09SGAg0/oKT1tJ5LjvjE6I1QAmIyEcvQCl6mwMis6kQ8U12E1Ol X4Ont+cbnhPcWAjKBZ/DUZSWWmCuXfPiYM9G4szbetLv3Nk1JNDGqq+5V fwVObvPYENDTwdL/6FHuha3bT6DW4nwdo1k5pKLDrPainro8aJycghT8w mjNBV5pOLPkN4eunDC6g3OzjbmLRx8Ed92ZY5VqstwTJJGaSMtaL+OggG +weufPicidZdl1JN/I5DhkNi6hl5O4RfH0iNN53DOWRzoJSG6mxx/3rGc Q==; X-CSE-ConnectionGUID: /oXAwB/1T+ygQpKr14TGCA== X-CSE-MsgGUID: 9ZDt8xTORRm5US85RGR/tw== X-IronPort-AV: E=McAfee;i="6700,10204,11179"; a="41064778" X-IronPort-AV: E=Sophos;i="6.10,186,1719903600"; d="scan'208";a="41064778" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2024 13:58:41 -0700 X-CSE-ConnectionGUID: 8eIImSyeRiufhFz/ovBwIg== X-CSE-MsgGUID: 9MaRyyLdRfC5TeSuYN2rVg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,186,1719903600"; d="scan'208";a="64198595" Received: from lkp-server01.sh.intel.com (HELO 9c6b1c7d3b50) ([10.239.97.150]) by orviesa007.jf.intel.com with ESMTP; 29 Aug 2024 13:58:39 -0700 Received: from kbuild by 9c6b1c7d3b50 with local (Exim 4.96) (envelope-from ) id 1sjmE0-0000jE-1X; Thu, 29 Aug 2024 20:58:36 +0000 Date: Fri, 30 Aug 2024 04:57:57 +0800 From: kernel test robot To: Akshata Jahagirdar Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Matt Roper , Matthew Brost Subject: [linux-next:master 375/7693] drivers/gpu/drm/xe/xe_migrate.c:304:52: warning: result of comparison of constant 274877906944 with expression of type 'resource_size_t' (aka 'unsigned int') is always true Message-ID: <202408300455.vSOPslVt-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: CDFA140008 X-Stat-Signature: fze8xfrddmmsecoqjy616jg9agjo7rd1 X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1724965122-715534 X-HE-Meta: U2FsdGVkX18HGakqzgUgzhYbOyQrIXkKv2uiwbUplt874qJqWGLpiw1kfdJKvxXDAJKMHKmGZg92NAexsaZtDXOOxJubMSb2NmjREj36KKteQl84w7KIvZDhLsVDs+o85T22reJUsXkDvd86fftKltE+/oxHMNbeVrhOAf8RCZp7oAo+JKu+4ikdphlKp7j0Kqw2ztjCnI0bokqCxl+8r23hIg37Ax+HKeWFg/584scaH7T7go3r7lTU5W6VxwF2JZxM4fMezNbHtlhjMbAgGFX1ofK+HsIbOQlAFg0/4BHX5xYOgnZRViwRX41WtxC3Vfgd3GgZQmYiuzjD6vOmiYbQdyXPclsItM6E/iM4ceKySW2QcXJZ0aA5fYQ2wexfSXU6HpANbzkahYCsGdwWfCXupfojcIEx77Lf7Mp7OCc3ylKySyMPl0ByoQPnVRsGvpyQwfboj3S1R18nYiJsNQAeIEoCmyuf9IvLMQPageCBmywnDXWS/zK3QiRTOL6Yfs6l41V0tG4EYJ8eHgZLXLmMniw8VWMAc0SuNL6HuYbw3yMgFIGnVlZdgH8dYexc0yE4DWq5ltwKr6/D6dchwFYsPS8CLAPA9/Vn/cUKG4CM+f001Zj57gFz2anKsUylsJILaGeW2UfG3MWM16SfJBzp95jb/vNbJx5STdlroHw3qkHMyguNawVHkyVAUCSkCQsQ8JGwXnRkuJf0+/CoPfrk+B1F6h8aJiXZNejrw8tZTddowN2KmqNxfgJY4WPwI3HusuqCaCUs50Lx9e+JqFAOsaIWC3fM8m85ivtbKvNFhg8+Z4N5kxcKwNvSEn5vBG+xlDj83duuMVrGKvkhozZNkW7qrcKzCUq15/nUlBShG/Yx9DhKeSGmUk3cb+FEtUNIocaWuLrc1jnjSNUqpplblRnCKdh8en9sEmW/7PMgGyi13YIP+OyJXKqE5cFYIFFhX8haW+y8J+IQKtP q2GrnXjn 5aCqgGCqIXgA+b+2FWDdPIcCeiAVuv6cbm4qfhpAqEDrA3I2XF8T9DDYMfC6qRVar9DuT+VoZy4sLwQhSMGQ240AoNlOwI5cB8pJaw9CgMMJylOt01DUO9iQ89I01IiDpoxTTiwVIzdfro3bYu2qEDwHGEWDSziPwmV8wJUIyup00MX1CyKCcwkfpEMkgNF91qOd3g5tg/Mt6j8UPb5wsjBbNcO2vU7muoNmwR/TncQ45y4us6AzbHfMDSF4X/onToiK/495OFUfliBvE/Yx8MC8L3vtlDGf5L/OYPDo+p8cnWu6PAwd0IfMarvUjKFM/rSQhgfirjvDIeMycHcfq9IUF7OH6C/VmcCOqwYqHb7HM0YJDSsN3kn9ZO2gqGCjiSmUHmUYmHtvw9HCnJZIg+WPQlA== 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: b18bbfc14a38b5234e09c2adcf713e38063a7e6e commit: 8d79acd567db183e675cccc6cc737d2959e2a2d9 [375/7693] drm/xe/migrate: Add helper function to program identity map config: i386-randconfig-001-20240830 (https://download.01.org/0day-ci/archive/20240830/202408300455.vSOPslVt-lkp@intel.com/config) compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240830/202408300455.vSOPslVt-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/202408300455.vSOPslVt-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/gpu/drm/xe/xe_migrate.c:304:52: warning: result of comparison of constant 274877906944 with expression of type 'resource_size_t' (aka 'unsigned int') is always true [-Wtautological-constant-out-of-range-compare] 304 | xe_assert(xe, (xe->mem.vram.actual_physical_size <= SZ_256G)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ drivers/gpu/drm/xe/xe_assert.h:108:54: note: expanded from macro 'xe_assert' 108 | #define xe_assert(xe, condition) xe_assert_msg((xe), condition, "") | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ drivers/gpu/drm/xe/xe_assert.h:111:24: note: expanded from macro 'xe_assert_msg' 111 | __xe_assert_msg(__xe, condition, \ | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 112 | "platform: %s subplatform: %d\n" \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 113 | "graphics: %s %u.%02u step %s\n" \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 114 | "media: %s %u.%02u step %s\n" \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 115 | msg, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | __xe->info.platform_name, __xe->info.subplatform, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 117 | __xe->info.graphics_name, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 118 | __xe->info.graphics_verx100 / 100, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 119 | __xe->info.graphics_verx100 % 100, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 120 | xe_step_name(__xe->info.step.graphics), \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 121 | __xe->info.media_name, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 122 | __xe->info.media_verx100 / 100, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 123 | __xe->info.media_verx100 % 100, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 124 | xe_step_name(__xe->info.step.media), \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 125 | ## arg); \ | ~~~~~~~ drivers/gpu/drm/xe/xe_assert.h:84:31: note: expanded from macro '__xe_assert_msg' 84 | (void)drm_WARN(&(xe)->drm, !(condition), "[" DRM_NAME "] Assertion `%s` failed!\n" msg, \ | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 85 | __stringify(condition), ## arg); \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/drm/drm_print.h:635:7: note: expanded from macro 'drm_WARN' 635 | WARN(condition, "%s %s: [drm] " format, \ | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 636 | dev_driver_string((drm)->dev), \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 637 | dev_name((drm)->dev), ## arg) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/bug.h:132:25: note: expanded from macro 'WARN' 132 | int __ret_warn_on = !!(condition); \ | ^~~~~~~~~ 1 warning generated. Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for FB_IOMEM_HELPERS Depends on [n]: HAS_IOMEM [=y] && FB_CORE [=n] Selected by [m]: - DRM_XE_DISPLAY [=y] && HAS_IOMEM [=y] && DRM [=y] && DRM_XE [=m] && DRM_XE [=m]=m [=m] vim +304 drivers/gpu/drm/xe/xe_migrate.c 177 178 static int xe_migrate_prepare_vm(struct xe_tile *tile, struct xe_migrate *m, 179 struct xe_vm *vm) 180 { 181 struct xe_device *xe = tile_to_xe(tile); 182 u16 pat_index = xe->pat.idx[XE_CACHE_WB]; 183 u8 id = tile->id; 184 u32 num_entries = NUM_PT_SLOTS, num_level = vm->pt_root[id]->level, 185 num_setup = num_level + 1; 186 u32 map_ofs, level, i; 187 struct xe_bo *bo, *batch = tile->mem.kernel_bb_pool->bo; 188 u64 entry, pt30_ofs; 189 190 /* Can't bump NUM_PT_SLOTS too high */ 191 BUILD_BUG_ON(NUM_PT_SLOTS > SZ_2M/XE_PAGE_SIZE); 192 /* Must be a multiple of 64K to support all platforms */ 193 BUILD_BUG_ON(NUM_PT_SLOTS * XE_PAGE_SIZE % SZ_64K); 194 /* And one slot reserved for the 4KiB page table updates */ 195 BUILD_BUG_ON(!(NUM_KERNEL_PDE & 1)); 196 197 /* Need to be sure everything fits in the first PT, or create more */ 198 xe_tile_assert(tile, m->batch_base_ofs + batch->size < SZ_2M); 199 200 bo = xe_bo_create_pin_map(vm->xe, tile, vm, 201 num_entries * XE_PAGE_SIZE, 202 ttm_bo_type_kernel, 203 XE_BO_FLAG_VRAM_IF_DGFX(tile) | 204 XE_BO_FLAG_PINNED); 205 if (IS_ERR(bo)) 206 return PTR_ERR(bo); 207 208 /* PT31 reserved for 2M identity map */ 209 pt30_ofs = bo->size - 2 * XE_PAGE_SIZE; 210 entry = vm->pt_ops->pde_encode_bo(bo, pt30_ofs, pat_index); 211 xe_pt_write(xe, &vm->pt_root[id]->bo->vmap, 0, entry); 212 213 map_ofs = (num_entries - num_setup) * XE_PAGE_SIZE; 214 215 /* Map the entire BO in our level 0 pt */ 216 for (i = 0, level = 0; i < num_entries; level++) { 217 entry = vm->pt_ops->pte_encode_bo(bo, i * XE_PAGE_SIZE, 218 pat_index, 0); 219 220 xe_map_wr(xe, &bo->vmap, map_ofs + level * 8, u64, entry); 221 222 if (vm->flags & XE_VM_FLAG_64K) 223 i += 16; 224 else 225 i += 1; 226 } 227 228 if (!IS_DGFX(xe)) { 229 /* Write out batch too */ 230 m->batch_base_ofs = NUM_PT_SLOTS * XE_PAGE_SIZE; 231 for (i = 0; i < batch->size; 232 i += vm->flags & XE_VM_FLAG_64K ? XE_64K_PAGE_SIZE : 233 XE_PAGE_SIZE) { 234 entry = vm->pt_ops->pte_encode_bo(batch, i, 235 pat_index, 0); 236 237 xe_map_wr(xe, &bo->vmap, map_ofs + level * 8, u64, 238 entry); 239 level++; 240 } 241 if (xe->info.has_usm) { 242 xe_tile_assert(tile, batch->size == SZ_1M); 243 244 batch = tile->primary_gt->usm.bb_pool->bo; 245 m->usm_batch_base_ofs = m->batch_base_ofs + SZ_1M; 246 xe_tile_assert(tile, batch->size == SZ_512K); 247 248 for (i = 0; i < batch->size; 249 i += vm->flags & XE_VM_FLAG_64K ? XE_64K_PAGE_SIZE : 250 XE_PAGE_SIZE) { 251 entry = vm->pt_ops->pte_encode_bo(batch, i, 252 pat_index, 0); 253 254 xe_map_wr(xe, &bo->vmap, map_ofs + level * 8, u64, 255 entry); 256 level++; 257 } 258 } 259 } else { 260 u64 batch_addr = xe_bo_addr(batch, 0, XE_PAGE_SIZE); 261 262 m->batch_base_ofs = xe_migrate_vram_ofs(xe, batch_addr); 263 264 if (xe->info.has_usm) { 265 batch = tile->primary_gt->usm.bb_pool->bo; 266 batch_addr = xe_bo_addr(batch, 0, XE_PAGE_SIZE); 267 m->usm_batch_base_ofs = xe_migrate_vram_ofs(xe, batch_addr); 268 } 269 } 270 271 for (level = 1; level < num_level; level++) { 272 u32 flags = 0; 273 274 if (vm->flags & XE_VM_FLAG_64K && level == 1) 275 flags = XE_PDE_64K; 276 277 entry = vm->pt_ops->pde_encode_bo(bo, map_ofs + (u64)(level - 1) * 278 XE_PAGE_SIZE, pat_index); 279 xe_map_wr(xe, &bo->vmap, map_ofs + XE_PAGE_SIZE * level, u64, 280 entry | flags); 281 } 282 283 /* Write PDE's that point to our BO. */ 284 for (i = 0; i < map_ofs / PAGE_SIZE; i++) { 285 entry = vm->pt_ops->pde_encode_bo(bo, (u64)i * XE_PAGE_SIZE, 286 pat_index); 287 288 xe_map_wr(xe, &bo->vmap, map_ofs + XE_PAGE_SIZE + 289 (i + 1) * 8, u64, entry); 290 } 291 292 /* Set up a 1GiB NULL mapping at 255GiB offset. */ 293 level = 2; 294 xe_map_wr(xe, &bo->vmap, map_ofs + XE_PAGE_SIZE * level + 255 * 8, u64, 295 vm->pt_ops->pte_encode_addr(xe, 0, pat_index, level, IS_DGFX(xe), 0) 296 | XE_PTE_NULL); 297 m->cleared_mem_ofs = (255ULL << xe_pt_shift(level)); 298 299 /* Identity map the entire vram at 256GiB offset */ 300 if (IS_DGFX(xe)) { 301 u64 pt31_ofs = bo->size - XE_PAGE_SIZE; 302 303 xe_migrate_program_identity(xe, vm, bo, map_ofs, 256, pat_index, pt31_ofs); > 304 xe_assert(xe, (xe->mem.vram.actual_physical_size <= SZ_256G)); 305 } 306 307 /* 308 * Example layout created above, with root level = 3: 309 * [PT0...PT7]: kernel PT's for copy/clear; 64 or 4KiB PTE's 310 * [PT8]: Kernel PT for VM_BIND, 4 KiB PTE's 311 * [PT9...PT27]: Userspace PT's for VM_BIND, 4 KiB PTE's 312 * [PT28 = PDE 0] [PT29 = PDE 1] [PT30 = PDE 2] [PT31 = 2M vram identity map] 313 * 314 * This makes the lowest part of the VM point to the pagetables. 315 * Hence the lowest 2M in the vm should point to itself, with a few writes 316 * and flushes, other parts of the VM can be used either for copying and 317 * clearing. 318 * 319 * For performance, the kernel reserves PDE's, so about 20 are left 320 * for async VM updates. 321 * 322 * To make it easier to work, each scratch PT is put in slot (1 + PT #) 323 * everywhere, this allows lockless updates to scratch pages by using 324 * the different addresses in VM. 325 */ 326 #define NUM_VMUSA_UNIT_PER_PAGE 32 327 #define VM_SA_UPDATE_UNIT_SIZE (XE_PAGE_SIZE / NUM_VMUSA_UNIT_PER_PAGE) 328 #define NUM_VMUSA_WRITES_PER_UNIT (VM_SA_UPDATE_UNIT_SIZE / sizeof(u64)) 329 drm_suballoc_manager_init(&m->vm_update_sa, 330 (size_t)(map_ofs / XE_PAGE_SIZE - NUM_KERNEL_PDE) * 331 NUM_VMUSA_UNIT_PER_PAGE, 0); 332 333 m->pt_bo = bo; 334 return 0; 335 } 336 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki