mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
There was a header file circular dependency that was preventing including some files. For example, for utils.h to include safe_ops.h would include bug.h which included log.h which included bitops.h which included utils.h. To break this loop, the macro nvgpu_do_assert_print() into a function in a new file assert.c. With this change, log.h is no longer required in bug.h. This change also required adding a few includes in C files that were picking up definitions through the chain above. JIRA NVGPU-3868 Change-Id: Icf95677bb36e4aa034cba25594cf71f2d028c289 Signed-off-by: Philip Elcan <pelcan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2168528 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
38 lines
1.4 KiB
C
38 lines
1.4 KiB
C
/*
|
|
* Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved.
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
* to deal in the Software without restriction, including without limitation
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
* Software is furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
* DEALINGS IN THE SOFTWARE.
|
|
*/
|
|
|
|
#include <nvgpu/gk20a.h>
|
|
#include <nvgpu/bug.h>
|
|
#include <nvgpu/log.h>
|
|
|
|
void nvgpu_do_assert_print(struct gk20a *g, const char *fmt, ...)
|
|
{
|
|
#ifdef CONFIG_NVGPU_LOGGING
|
|
va_list args;
|
|
|
|
va_start(args, fmt);
|
|
nvgpu_err(g, fmt, args);
|
|
va_end(args);
|
|
#endif
|
|
nvgpu_do_assert();
|
|
}
|