Files
linux-nvgpu/drivers/gpu/nvgpu/os/linux/os_ops.c
Jon Hunter 261d4bed13 gpu: nvgpu: Enable -Wmissing-prototypes
The compiler option -Wmissing-prototypes is being enabled globally in
the upstream Linux kernel and this causes build failures for nvgpu. The
build failures occur because either the driver is missing an include
file which has the prototype or because the function is not declared
statically when it should be (ie. there are no external users).

Fix the various build failures and enable -Wmissing-prototypes to
prevent any new instances from occurring.

Bug 4404965

Change-Id: I551922836e37b0c94c158232d6277f4053e9d2d3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3027483
(cherry picked from commit e8cbf90db2d0db7277db9e3eec9fb88d69c7fcc7)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3035518
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-15 14:09:44 -08:00

43 lines
887 B
C

// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2018-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include "os_linux.h"
#include "os_ops.h"
#include "os_ops_gm20b.h"
#include "os_ops_gp10b.h"
#include "os_ops_gv11b.h"
#include "os_ops_gv100.h"
#include "os_ops_tu104.h"
int nvgpu_init_os_linux_ops(struct nvgpu_os_linux *l)
{
struct gk20a *g = &l->g;
u32 ver = g->params.gpu_arch + g->params.gpu_impl;
switch (ver) {
case GK20A_GPUID_GM20B:
case GK20A_GPUID_GM20B_B:
nvgpu_gm20b_init_os_ops(l);
break;
case NVGPU_GPUID_GP10B:
nvgpu_gp10b_init_os_ops(l);
break;
case NVGPU_GPUID_GV11B:
nvgpu_gv11b_init_os_ops(l);
break;
#ifdef CONFIG_NVGPU_DGPU
case NVGPU_GPUID_GV100:
nvgpu_gv100_init_os_ops(l);
break;
case NVGPU_GPUID_TU104:
nvgpu_tu104_init_os_ops(l);
break;
#endif
default:
break;
}
return 0;
}