From nobody Fri Dec 19 19:06:34 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FBA1196C7C for ; Thu, 4 Dec 2025 09:47:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764841630; cv=none; b=Tr15cAsqPInHLvqpY+kCWLkkaBhqB5hgMdgITN2qmsVAJwEanhVF2xd53qq4pKZ9shGNmhL/G525GcYeU0jBRysvZQ7kxJxllOOkSLu8aHoOhkbWwq0F8ru1hv9XzR0dYuoFs7SjcT/hW5bULwY3N55T7ENgJkPXscPL2Z1QF5s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764841630; c=relaxed/simple; bh=f4aSFtHUYaHe9XbQ12I0YpwS+y20rWzJFAGew9i9F6s=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=B23BNtLRo3/lgAMXUjoRiuwobY5db11m08auTv7luM6c23AqChT9czdxgyFVlwo6EVMsKRg/Am9VP75RDnFvNlBhfD4W5AieTTYGZmrZkAhFegP9rCoXwRypknpUUAbBCU7xM+jO/jwH+24tAuQ360IYCJGiipDKszJieYWk7lg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oYO50jUP; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oYO50jUP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49998C4CEFB; Thu, 4 Dec 2025 09:47:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764841630; bh=f4aSFtHUYaHe9XbQ12I0YpwS+y20rWzJFAGew9i9F6s=; h=From:To:Cc:Subject:Date:From; b=oYO50jUPJsZIvsDpQygHaYbvJp/0NxdSmn3teLWpcApBo8ldCE3dGMDuau3crgaRl i8UkhAiCte+PzRPp32kwPMqxZN7exxfcqmu/Msr8aBiDDBv7rEzFY+DWHVE8KzsYHX +Q/WZKBQ2oTDYQ4Q9nmmkEJg3jl7rdURVp9FUTtQZczJru/5Dl0cWKxFY5p8XVkdnc BIfS3DVpZNI8qL6ZX4Gk2PTIqcQgX/o6QhAoB9VgQCazLr50CII6UqR08JzaRSANq3 duETpUXmjCpuzjFMAoI74FRxrmsnICiTqWtD5mgENzWD3Ysn+62B+Nj9q15Cxg531h DfAPWvXtFcc4g== From: Arnd Bergmann To: =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= , Rodrigo Vivi , David Airlie , Simona Vetter , Matthew Auld , Matthew Brost , Maarten Lankhorst , Lucas De Marchi Cc: Arnd Bergmann , Himal Prasad Ghimiray , Francois Dugast , intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] xe: fix drm_gpusvm_init() arguments Date: Thu, 4 Dec 2025 10:46:58 +0100 Message-Id: <20251204094704.1030933-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann The Xe driver fails to build when CONFIG_DRM_XE_GPUSVM is disabled but CONFIG_DRM_GPUSVM is turned on, jdue to the clash of two commits: In file included from drivers/gpu/drm/xe/xe_vm_madvise.c:8: drivers/gpu/drm/xe/xe_svm.h: In function 'xe_svm_init': include/linux/stddef.h:8:14: error: passing argument 5 of 'drm_gpusvm_init'= makes integer from pointer without a cast [-Wint-conversion] drivers/gpu/drm/xe/xe_svm.h:217:38: note: in expansion of macro 'NULL' 217 | NULL, NULL, 0, 0, 0, NULL, NULL, 0); | ^~~~ In file included from drivers/gpu/drm/xe/xe_bo_types.h:11, from drivers/gpu/drm/xe/xe_bo.h:11, from drivers/gpu/drm/xe/xe_vm_madvise.c:11: include/drm/drm_gpusvm.h:254:35: note: expected 'long unsigned int' but arg= ument is of type 'void *' 254 | unsigned long mm_start, unsigned long mm_range, | ~~~~~~~~~~~~~~^~~~~~~~ In file included from drivers/gpu/drm/xe/xe_vm_madvise.c:14: drivers/gpu/drm/xe/xe_svm.h:216:16: error: too many arguments to function '= drm_gpusvm_init'; expected 10, have 11 216 | return drm_gpusvm_init(&vm->svm.gpusvm, "Xe SVM (simple)", = &vm->xe->drm, | ^~~~~~~~~~~~~~~ 217 | NULL, NULL, 0, 0, 0, NULL, NULL, 0); | ~ include/drm/drm_gpusvm.h:251:5: note: declared here Adapt the caller to the new argument list by removing the extraneous NULL argument. Fixes: 9e9787414882 ("drm/xe/userptr: replace xe_hmm with gpusvm") Fixes: 10aa5c806030 ("drm/gpusvm, drm/xe: Fix userptr to not allow device p= rivate pages") Signed-off-by: Arnd Bergmann Reviewed-by: Thomas Hellstr=C3=B6m --- drivers/gpu/drm/xe/xe_svm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/xe_svm.h b/drivers/gpu/drm/xe/xe_svm.h index 0955d2ac8d74..fa757dd07954 100644 --- a/drivers/gpu/drm/xe/xe_svm.h +++ b/drivers/gpu/drm/xe/xe_svm.h @@ -214,7 +214,7 @@ int xe_svm_init(struct xe_vm *vm) { #if IS_ENABLED(CONFIG_DRM_GPUSVM) return drm_gpusvm_init(&vm->svm.gpusvm, "Xe SVM (simple)", &vm->xe->drm, - NULL, NULL, 0, 0, 0, NULL, NULL, 0); + NULL, 0, 0, 0, NULL, NULL, 0); #else return 0; #endif --=20 2.39.5