From ea896018364560224f7047417e48b61e1c2bee38 Mon Sep 17 00:00:00 2001 From: Vinod G Date: Wed, 25 Jul 2018 13:08:40 -0700 Subject: gpu: nvgpu: Rearrange some definitions from gk20a header Moved the gk20a_from_as and gk20a_from_pmu definitions from gk20a.h to as.h and pmu.h Correction for MISRA rule 21.1 error in as.h and pmu.h headers JIRA NVGPU-624 Change-Id: I57de604b47afc589a9778fe69e4856ffcabd9dfc Signed-off-by: Vinod G Reviewed-on: https://git-master.nvidia.com/r/1785951 Reviewed-by: Seshendra Gadagottu GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.h | 3 --- drivers/gpu/nvgpu/include/nvgpu/as.h | 12 ++++++++---- drivers/gpu/nvgpu/include/nvgpu/pmu.h | 7 ++++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 13c8928f..2f940553 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -1650,9 +1650,6 @@ enum gk20a_nonstall_ops { void __nvgpu_check_gpu_state(struct gk20a *g); void __gk20a_warn_on_no_regs(void); -struct gk20a *gk20a_from_as(struct gk20a_as *as); -struct gk20a *gk20a_from_pmu(struct nvgpu_pmu *pmu); - /* classes that the device supports */ /* TBD: get these from an open-sourced SDK? */ enum { diff --git a/drivers/gpu/nvgpu/include/nvgpu/as.h b/drivers/gpu/nvgpu/include/nvgpu/as.h index b16652da..f2249f9e 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/as.h +++ b/drivers/gpu/nvgpu/include/nvgpu/as.h @@ -1,7 +1,7 @@ /* * GK20A Address Spaces * - * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2011-2018, 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"), @@ -21,10 +21,13 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ -#ifndef __NVGPU_AS_H__ -#define __NVGPU_AS_H__ +#ifndef NVGPU_AS_H +#define NVGPU_AS_H + +#include struct vm_gk20a; +struct gk20a; struct gk20a_as { int last_share_id; /* dummy allocator for now */ @@ -47,4 +50,5 @@ int gk20a_as_release_share(struct gk20a_as_share *as_share); int gk20a_as_alloc_share(struct gk20a *g, u32 big_page_size, u32 flags, struct gk20a_as_share **out); -#endif +struct gk20a *gk20a_from_as(struct gk20a_as *as); +#endif /* NVGPU_AS_H */ diff --git a/drivers/gpu/nvgpu/include/nvgpu/pmu.h b/drivers/gpu/nvgpu/include/nvgpu/pmu.h index 4d1bf75a..28374b9d 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/pmu.h +++ b/drivers/gpu/nvgpu/include/nvgpu/pmu.h @@ -20,8 +20,8 @@ * DEALINGS IN THE SOFTWARE. */ -#ifndef __NVGPU_PMU_H__ -#define __NVGPU_PMU_H__ +#ifndef NVGPU_PMU_H +#define NVGPU_PMU_H #include #include @@ -512,4 +512,5 @@ int nvgpu_pmu_rpc_execute(struct nvgpu_pmu *pmu, struct nv_pmu_rpc_header *rpc, u16 size_rpc, u16 size_scratch, pmu_callback callback, void *cb_param, bool is_copy_back); -#endif /* __NVGPU_PMU_H__ */ +struct gk20a *gk20a_from_pmu(struct nvgpu_pmu *pmu); +#endif /* NVGPU_PMU_H */ -- cgit v1.2.2