gpu: nvgpu: add @file syntax in mm header files

Add @file syntax in the following mm header files,
1) page_allocator.h
2) kmem.h
3) gmmu.h
4) pd_cache.h
5) pd_cache_priv.h

JIRA NVGPU-4105

Change-Id: Ifa8b9ef5f0d11608a5d6f165ba64566a32596972
Signed-off-by: Lakshmanan M <lm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2223012
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Lakshmanan M
2019-10-22 11:37:42 +05:30
committed by Alex Waterman
parent b2b09b1832
commit 974f72b104
5 changed files with 54 additions and 38 deletions

View File

@@ -23,18 +23,11 @@
#ifndef NVGPU_GMMU_PD_CACHE_PRIV_H
#define NVGPU_GMMU_PD_CACHE_PRIV_H
#include <nvgpu/bug.h>
#include <nvgpu/log.h>
#include <nvgpu/gmmu.h>
#include <nvgpu/nvgpu_mem.h>
#include <nvgpu/list.h>
#include <nvgpu/rbtree.h>
#include <nvgpu/lock.h>
#define pd_dbg(g, fmt, args...) nvgpu_log(g, gpu_dbg_pd_cache, fmt, ##args)
/**
* DOC: PD cache
* @file
*
* Page directory cache private interface
* --------------------------------------
*
* To save memory when using sub-page sized PD levels in Pascal and beyond a way
* of packing PD tables together is necessary. If a PD table only requires 1024
@@ -73,6 +66,16 @@
* allocated by nvgpu_pd_alloc().
*/
#include <nvgpu/bug.h>
#include <nvgpu/log.h>
#include <nvgpu/gmmu.h>
#include <nvgpu/nvgpu_mem.h>
#include <nvgpu/list.h>
#include <nvgpu/rbtree.h>
#include <nvgpu/lock.h>
#define pd_dbg(g, fmt, args...) nvgpu_log(g, gpu_dbg_pd_cache, fmt, ##args)
/**
* Minimum size of a cache. The number of different caches in the nvgpu_pd_cache
* structure is of course depending on this.

View File

@@ -23,6 +23,12 @@
#ifndef NVGPU_GMMU_H
#define NVGPU_GMMU_H
/**
* @file
*
* GMMU interface.
*/
#include <nvgpu/types.h>
#include <nvgpu/nvgpu_mem.h>
#include <nvgpu/list.h>

View File

@@ -26,7 +26,17 @@
/**
* @file
*
* Abstract interface for interacting with general Process memory.
* Kmem cache support
* ------------------
*
* In Linux there is support for the notion of a kmem_cache. It gives better
* memory usage characteristics for lots of allocations of the same size. Think
* structs that get allocated over and over. Normal kmalloc() type routines
* typically round to the next power-of-2 since that's easy.
*
* But if we know the size ahead of time the packing for the allocations can be
* much better. This is the benefit of a slab allocator. This type hides the
* underlying kmem_cache (or absense thereof).
*/
#include <nvgpu/types.h>
@@ -44,21 +54,6 @@ struct gk20a;
#include <nvgpu/posix/kmem.h>
#endif
/**
* @file
*
* Kmem cache support
* ------------------
*
* In Linux there is support for the notion of a kmem_cache. It gives better
* memory usage characteristics for lots of allocations of the same size. Think
* structs that get allocated over and over. Normal kmalloc() type routines
* typically round to the next power-of-2 since that's easy.
*
* But if we know the size ahead of time the packing for the allocations can be
* much better. This is the benefit of a slab allocator. This type hides the
* underlying kmem_cache (or absense thereof).
*/
struct nvgpu_kmem_cache;
#ifdef CONFIG_NVGPU_TRACK_MEM_USAGE

View File

@@ -23,18 +23,12 @@
#ifndef PAGE_ALLOCATOR_PRIV_H
#define PAGE_ALLOCATOR_PRIV_H
#ifdef CONFIG_NVGPU_DGPU
#include <nvgpu/allocator.h>
#include <nvgpu/nvgpu_mem.h>
#include <nvgpu/nvgpu_sgt.h>
#include <nvgpu/kmem.h>
#include <nvgpu/list.h>
#include <nvgpu/rbtree.h>
struct nvgpu_allocator;
/**
* @file
*
* Page allocator interface
* ------------------------
*
* This allocator implements the ability to do SLAB style allocation since the
* GPU has two page sizes available - 4k and 64k/128k. When the default
* granularity is the large page size (64k/128k) small allocations become very
@@ -54,6 +48,17 @@ struct nvgpu_allocator;
* assumed to be 64k) the allocation is satisfied by one of the buckets.
*/
#ifdef CONFIG_NVGPU_DGPU
#include <nvgpu/allocator.h>
#include <nvgpu/nvgpu_mem.h>
#include <nvgpu/nvgpu_sgt.h>
#include <nvgpu/kmem.h>
#include <nvgpu/list.h>
#include <nvgpu/rbtree.h>
struct nvgpu_allocator;
/**
* Structure to identify slab allocations.
*/

View File

@@ -23,6 +23,13 @@
#ifndef NVGPU_PD_CACHE_H
#define NVGPU_PD_CACHE_H
/**
* @file
*
* Page directory cache interface.
*/
#include <nvgpu/types.h>
struct gk20a;