From 19e9a791955811416729ae3a94439c09000b3952 Mon Sep 17 00:00:00 2001 From: Nitin Kumbhar Date: Thu, 31 May 2018 16:38:20 +0530 Subject: gpu: nvgpu: move ecc sysfs funcs to a common file To make ecc sysfs related code reusable, move it to a seprate file. This allows possible optimizations with localized changes. There is no change in the code. Bug 1987855 Change-Id: I69aefb649df628d0c8dad529de6dde07ab4e6009 Signed-off-by: Nitin Kumbhar Reviewed-on: https://git-master.nvidia.com/r/1735988 Reviewed-by: mobile promotions Tested-by: mobile promotions --- .../gpu/nvgpu/common/linux/platform_ecc_sysfs.h | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 drivers/gpu/nvgpu/common/linux/platform_ecc_sysfs.h (limited to 'drivers/gpu/nvgpu/common/linux/platform_ecc_sysfs.h') diff --git a/drivers/gpu/nvgpu/common/linux/platform_ecc_sysfs.h b/drivers/gpu/nvgpu/common/linux/platform_ecc_sysfs.h new file mode 100644 index 00000000..d5622757 --- /dev/null +++ b/drivers/gpu/nvgpu/common/linux/platform_ecc_sysfs.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2018, 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef _NVGPU_PLATFORM_SYSFS_H_ +#define _NVGPU_PLATFORM_SYSFS_H_ + +#include "gp10b/gr_gp10b.h" + +int gr_gp10b_ecc_stat_create(struct device *dev, + int is_l2, + char *ecc_stat_name, + struct gk20a_ecc_stat *ecc_stat, + struct device_attribute **dev_attr_array); +int gp10b_ecc_stat_create(struct device *dev, + int num_hw_units, + int num_subunits, + char *ecc_unit_name, + char *ecc_subunit_name, + char *ecc_stat_name, + struct gk20a_ecc_stat *ecc_stat, + struct device_attribute **__dev_attr_array); + +void gr_gp10b_ecc_stat_remove(struct device *dev, + int is_l2, + struct gk20a_ecc_stat *ecc_stat, + struct device_attribute *dev_attr_array); + +void gp10b_ecc_stat_remove(struct device *dev, + int hw_units, + struct gk20a_ecc_stat *ecc_stat, + struct device_attribute *dev_attr_array); +#endif -- cgit v1.2.2