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:
Alex Waterman
2020-06-11 14:49:55 -05:00
parent f807ad932c
commit d0fa6a15c1

View File

@@ -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
} }