From 7d3f574690ff81b257e31f935970d913b9955396 Mon Sep 17 00:00:00 2001 From: Puneet Saxena Date: Fri, 14 Jul 2017 17:57:04 +0530 Subject: t194: cache: l3 cache It adds ioctl to get gpu_cpu_ways, gpu_only_ways. It sets gpu_l3_ways(max) and gpu_l3_only_ways(min) to program l3 cache. It exposes debugfs nodes to set/get - - gpu_cpu_ways - gpu_only_ways It also exposes debugfs node to get - - total_ways - L3 cache size Bug 200324092 Change-Id: Ibef7484be30041825ff2324791c9455e4e70bd4d Signed-off-by: Puneet Saxena Reviewed-on: https://git-master.nvidia.com/r/1520534 Reviewed-by: Sachin Nikam --- include/uapi/linux/t19x_cache.h | 45 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 include/uapi/linux/t19x_cache.h (limited to 'include/uapi/linux') diff --git a/include/uapi/linux/t19x_cache.h b/include/uapi/linux/t19x_cache.h new file mode 100644 index 000000000..98dfd12fa --- /dev/null +++ b/include/uapi/linux/t19x_cache.h @@ -0,0 +1,45 @@ +/* + * t19x_cache.h + * + * declarations for t19x cache + * + * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ + +#ifndef __T19x_CACHE_H +#define __T19x_CACHE_H + +#include +#include + +#define TEGRA_L3_CACHE_IOC_MAGIC 'C' + +#if !defined(__KERNEL__) +#define __user +#endif + +struct tegra_l3_ioctl_data { + __u32 igpu_cpu_ways; /* integrated gpu */ + __u32 igpu_only_ways; + __u32 total_ways; + __u32 reserved; + __u64 size; +}; + +#define TEGRA_L3_CACHE_GET_IOCTL_DATA \ + _IOWR(TEGRA_L3_CACHE_IOC_MAGIC, 1, struct tegra_l3_ioctl_data) + +#define TEGRA_L3_CACHE_IOCTL_IOC_MAXNR _IOC_NR(TEGRA_L3_CACHE_GET_IOCTL_DATA) +#define TEGRA_L3_CACHE_IOCTL_MAX_ARG_SIZE \ + sizeof(struct tegra_l3_ioctl_data) + +#endif /* __T19x_CACHE_H */ -- cgit v1.2.2