mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
gpu: nvgpu: Move pd_cache declarations to new header
The pd_cache header declarations were oriignally part of the gmmu.h header. This is not good from a unit isolation perspective so this patch moves all the pd_cache specifics over to a new header file: <nvgpu/pd_cache.h>. Also a couple of static inlines that were possible when the code was part of gmmu.h were turned into real, first class functions. This allowed the pd_cache.h header to not include the gmmu.h header file. Also fix an issue in the nvgpu_pd_write() function where the data was being passed as a size_t for some reason. This has now been changed to a u32. JIRA NVGPU-1444 Change-Id: Ib9e9e5a54544de403bfcd8e11c30de05721ddbcc Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1966352 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
5bdffee1a8
commit
ba85fc999b
@@ -26,6 +26,7 @@
|
||||
|
||||
#include <nvgpu/gk20a.h>
|
||||
#include <nvgpu/gmmu.h>
|
||||
#include <nvgpu/pd_cache.h>
|
||||
#include <nvgpu/enabled.h>
|
||||
|
||||
#include <nvgpu/posix/kmem.h>
|
||||
@@ -598,7 +599,7 @@ static int test_pd_cache_valid_alloc(struct unit_module *m,
|
||||
* the nvgpu_mem. Using the zeroth word makes it easy to read
|
||||
* back.
|
||||
*/
|
||||
pd_write(g, &pd, 0, 0x12345678);
|
||||
nvgpu_pd_write(g, &pd, 0, 0x12345678);
|
||||
|
||||
if (0x12345678 !=
|
||||
nvgpu_mem_rd32(g, pd.mem, pd.mem_offs / sizeof(u32))) {
|
||||
|
||||
Reference in New Issue
Block a user