gpu: nvgpu: split semaphore.c file into multiple units

The file semaphore.c is now split into 4 units namely
semaphore, semaphore_hw, semaphore_pool and semaphore_sea.

Each of the above units now have separate compilation units under
common/semaphore/. The public APIs corresponding to each unit is
present in include/nvgpu/semaphore.h. The dependency graph of the
below units is as follows where '->' indicates left depends on right.

semaphore -> semaphore_hw -> semaphore_pool -> semaphore_sea

Some of the other major changes made in this patch are as follows
  i) Renamed some of the functions.
  ii) Some functions are changed from private to public.
  iii) Public header for semaphore contains only the declaration of the
       corresponding structs as an opaque structure.
  iv) Constructed a private header to contain internal functions common
      to all the units and struct definitions corresponding to each unit.
  v)  Added new functions to provide access to internal members of the
      units.

Jira NVGPU-2076

Change-Id: I6f111647ba9a9a9f8ef9c658f316cd5d6276c703
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2022782
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Debarshi Dutta
2019-02-15 17:25:28 +05:30
committed by mobile promotions
parent 68c13e2f04
commit 8db1955d74
16 changed files with 992 additions and 799 deletions

View File

@@ -22,10 +22,10 @@
#include <nvgpu/lock.h>
#include <nvgpu/kmem.h>
#include <nvgpu/semaphore.h>
#include <nvgpu/bug.h>
#include <nvgpu/kref.h>
#include <nvgpu/channel.h>
#include <nvgpu/semaphore.h>
#include "../linux/channel.h"
#include "../drivers/staging/android/sync.h"
@@ -285,7 +285,7 @@ static void gk20a_sync_pt_value_str_for_sema(struct gk20a_sync_pt *pt,
struct nvgpu_semaphore *s = pt->sema;
(void) snprintf(str, size, "S: pool=%llu [v=%u,r_v=%u]",
s->location.pool->page_idx,
nvgpu_semaphore_get_hw_pool_page_idx(s),
nvgpu_semaphore_get_value(s),
nvgpu_semaphore_read(s));
}