1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 /* 3 * 4 * (C) COPYRIGHT 2018, 2020-2022 ARM Limited. All rights reserved. 5 * 6 * This program is free software and is provided to you under the terms of the 7 * GNU General Public License version 2 as published by the Free Software 8 * Foundation, and any use by you of this program is subject to the terms 9 * of such GNU license. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, you can access it online at 18 * http://www.gnu.org/licenses/gpl-2.0.html. 19 * 20 */ 21 22 /* 23 * Concrete implementation of mali_kbase_hwcnt_backend interface for JM 24 * backend. 25 */ 26 27 #ifndef _KBASE_HWCNT_BACKEND_JM_H_ 28 #define _KBASE_HWCNT_BACKEND_JM_H_ 29 30 #include "hwcnt/backend/mali_kbase_hwcnt_backend.h" 31 32 struct kbase_device; 33 34 /** 35 * kbase_hwcnt_backend_jm_create() - Create a JM hardware counter backend 36 * interface. 37 * @kbdev: Non-NULL pointer to kbase device. 38 * @iface: Non-NULL pointer to backend interface structure that is filled in 39 * on creation success. 40 * 41 * Calls to iface->dump_enable_nolock() require kbdev->hwaccess_lock held. 42 * 43 * Return: 0 on success, else error code. 44 */ 45 int kbase_hwcnt_backend_jm_create(struct kbase_device *kbdev, 46 struct kbase_hwcnt_backend_interface *iface); 47 48 /** 49 * kbase_hwcnt_backend_jm_destroy() - Destroy a JM hardware counter backend 50 * interface. 51 * @iface: Pointer to interface to destroy. 52 * 53 * Can be safely called on an all-zeroed interface, or on an already destroyed 54 * interface. 55 */ 56 void kbase_hwcnt_backend_jm_destroy(struct kbase_hwcnt_backend_interface *iface); 57 58 #endif /* _KBASE_HWCNT_BACKEND_JM_H_ */ 59