From: Felix Kuehling <felix.kuehling@amd.com>
To: "Arnd Bergmann" <arnd@kernel.org>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Pan, Xinhui" <Xinhui.Pan@amd.com>,
"Philip Yang" <Philip.Yang@amd.com>,
"Alex Sierra" <alex.sierra@amd.com>
Cc: Arnd Bergmann <arnd@arndb.de>, David Airlie <airlied@gmail.com>,
Daniel Vetter <daniel@ffwll.ch>,
Mukul Joshi <mukul.joshi@amd.com>,
Graham Sider <Graham.Sider@amd.com>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/amdkfd: fix build failure without CONFIG_DYNAMIC_DEBUG
Date: Fri, 4 Aug 2023 12:24:12 -0400 [thread overview]
Message-ID: <c3ae568d-f941-2b66-1e36-9d67b6a231ea@amd.com> (raw)
In-Reply-To: <20230804132924.2314478-1-arnd@kernel.org>
On 2023-08-04 9:29, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> When CONFIG_DYNAMIC_DEBUG is disabled altogether, calling
> _dynamic_func_call_no_desc() does not work:
>
> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_svm.c: In function 'svm_range_set_attr':
> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_svm.c:52:9: error: implicit declaration of function '_dynamic_func_call_no_desc' [-Werror=implicit-function-declaration]
> 52 | _dynamic_func_call_no_desc("svm_range_dump", svm_range_debug_dump, svms)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_svm.c:3564:9: note: in expansion of macro 'dynamic_svm_range_dump'
> 3564 | dynamic_svm_range_dump(svms);
> | ^~~~~~~~~~~~~~~~~~~~~~
>
> Add a compile-time conditional in addition to the runtime check.
>
> Fixes: 8923137dbe4b2 ("drm/amdkfd: avoid svm dump when dynamic debug disabled")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
The patch is
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
I'm applying it to amd-staging-drm-next.
Thanks,
Felix
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
> index 308384dbc502d..44e710821b6d9 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
> @@ -23,6 +23,7 @@
>
> #include <linux/types.h>
> #include <linux/sched/task.h>
> +#include <linux/dynamic_debug.h>
> #include <drm/ttm/ttm_tt.h>
> #include <drm/drm_exec.h>
>
> @@ -48,8 +49,13 @@
> * page table is updated.
> */
> #define AMDGPU_SVM_RANGE_RETRY_FAULT_PENDING (2UL * NSEC_PER_MSEC)
> +#if IS_ENABLED(CONFIG_DYNAMIC_DEBUG)
> #define dynamic_svm_range_dump(svms) \
> _dynamic_func_call_no_desc("svm_range_dump", svm_range_debug_dump, svms)
> +#else
> +#define dynamic_svm_range_dump(svms) \
> + do { if (0) svm_range_debug_dump(svms); } while (0)
> +#endif
>
> /* Giant svm range split into smaller ranges based on this, it is decided using
> * minimum of all dGPU/APU 1/32 VRAM size, between 2MB to 1GB and alignment to
prev parent reply other threads:[~2023-08-04 16:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-04 13:29 Arnd Bergmann
2023-08-04 16:24 ` Felix Kuehling [this message]
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=c3ae568d-f941-2b66-1e36-9d67b6a231ea@amd.com \
--to=felix.kuehling@amd.com \
--cc=Graham.Sider@amd.com \
--cc=Philip.Yang@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@gmail.com \
--cc=alex.sierra@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mukul.joshi@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
all inboxes | Powered by JetHome®