mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
gpu: nvgpu: add ioctl to configure l2 max_ways_evict_last
Add ioctl support to configure and read the max number of lines/ways in a L2 cache set that can be marked as EVICT_LAST. This is accomplished through two new ltc hals: set_l2_max_ways_evict_last, get_l2_max_ways_evict_last. These hals will only be set for nvgpu-next chips. Incase of legacy chips, the IOCTLs will return error -ENOSYS. Generate following litter constants to get the number of sets in a l2 slice and the number of ways in each set: - GPU_LIT_NUM_LTC_LTS_SETS - GPU_LIT_NUM_LTC_LTS_WAYS Add gpu characteritics flag: NVGPU_L2_MAX_WAYS_EVICT_LAST_ENABLED to allow userspace driver to determine if L2_MAX_WAYS_EVICT_LAST ioctl is supported. Bug 200605474 Change-Id: Id3180f891399f5e128500f3835d762aee59953e0 Signed-off-by: Antony Clince Alex <aalex@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2445884 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
fe03443161
commit
f41e5975d8
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2017-2021, 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"),
|
||||
@@ -204,6 +204,8 @@ struct gk20a;
|
||||
DEFINE_FLAG(NVGPU_PMU_NEXT_CORE_ENABLED, "PMU NEXT CORE enabled"), \
|
||||
DEFINE_FLAG(NVGPU_ACR_NEXT_CORE_ENABLED, \
|
||||
"NEXT CORE availability for acr"), \
|
||||
DEFINE_FLAG(NVGPU_L2_MAX_WAYS_EVICT_LAST_ENABLED, \
|
||||
"Set L2 Max Ways Evict Last support"), \
|
||||
DEFINE_FLAG(NVGPU_MAX_ENABLED_BITS, "Marks max number of flags"),
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user