gpu: nvgpu: gp106: Reduce usage of os_linux.h

In clk_gp106 the Linux platform specific data is only referenced if
debugfs is being used. Thus only include the Linux OS stuff if debugfs
is enabled. This allows us to compile the rest of the clk code in non-
Linux kernel environments.

Also delete os_linux.h from xve_gp106.c since that header is unused
in the XVE code (and also do a minor cleanup by deleting the
pr_warn()).

JIRA NVGPU-525

Signed-off-by: Alex Waterman <alexw@nvidia.com>
Change-Id: I5a20ba3b02eb2d8741c73ef2ded9276f6aebb957
Reviewed-on: https://git-master.nvidia.com/r/1687090
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Alex Waterman
2018-03-12 14:44:00 -07:00
committed by mobile promotions
parent 43861331c5
commit ceb0ecb766
2 changed files with 3 additions and 7 deletions

View File

@@ -24,17 +24,16 @@
#ifdef CONFIG_DEBUG_FS
#include <linux/debugfs.h>
#include "common/linux/os_linux.h"
#endif
#include <nvgpu/kmem.h>
#include "gk20a/gk20a.h"
#include "common/linux/os_linux.h"
#include "gp106/mclk_gp106.h"
#include "clk_gp106.h"
#include "gp106/mclk_gp106.h"
#include <nvgpu/hw/gp106/hw_trim_gp106.h>
#define gk20a_dbg_clk(fmt, arg...) \

View File

@@ -23,7 +23,6 @@
#include "gk20a/gk20a.h"
#include "gp106/bios_gp106.h"
#include "gp106/xve_gp106.h"
#include "common/linux/os_linux.h"
#include <nvgpu/bug.h>
#include <nvgpu/xve.h>
@@ -108,10 +107,8 @@ int xve_get_speed_gp106(struct gk20a *g, u32 *xve_link_speed)
if (link_speed == xve_link_control_status_link_speed_link_speed_8p0_v())
real_link_speed = GPU_XVE_SPEED_8P0;
if (!real_link_speed) {
pr_warn("%s: Unknown PCIe bus speed!\n", __func__);
if (!real_link_speed)
return -ENODEV;
}
*xve_link_speed = real_link_speed;
return 0;