mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: Fix logging for pre-4.14 kernels
It seems that on Tegra kernels older than 4.14 the pre_err() function does not automatically add a '\n' if you don't supply it. For older kernels, with the new nvgpu_dbg_dump_impl() function, add this extra newline so that logs are not hopelessly scrambled. Change-Id: Ife8fe03ace248a1d8ece7850b609c343cc1d27ac Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2359752 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -130,5 +130,9 @@ void nvgpu_log_dbg_impl(struct gk20a *g, u64 log_mask,
|
|||||||
|
|
||||||
void nvgpu_dbg_dump_impl(struct gk20a *g, const char *str)
|
void nvgpu_dbg_dump_impl(struct gk20a *g, const char *str)
|
||||||
{
|
{
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
|
||||||
pr_err("__%s__ %s", g->name, str);
|
pr_err("__%s__ %s", g->name, str);
|
||||||
|
#else
|
||||||
|
pr_err("__%s__ %s\n", g->name, str);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user