1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 /* 3 * 4 * (C) COPYRIGHT 2010-2015, 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 #ifndef _UAPI_BASE_MEM_PRIV_H_ 23 #define _UAPI_BASE_MEM_PRIV_H_ 24 25 #include <linux/types.h> 26 #include "mali_base_common_kernel.h" 27 28 #define BASE_SYNCSET_OP_MSYNC (1U << 0) 29 #define BASE_SYNCSET_OP_CSYNC (1U << 1) 30 31 /* 32 * This structure describe a basic memory coherency operation. 33 * It can either be: 34 * @li a sync from CPU to Memory: 35 * - type = ::BASE_SYNCSET_OP_MSYNC 36 * - mem_handle = a handle to the memory object on which the operation 37 * is taking place 38 * - user_addr = the address of the range to be synced 39 * - size = the amount of data to be synced, in bytes 40 * - offset is ignored. 41 * @li a sync from Memory to CPU: 42 * - type = ::BASE_SYNCSET_OP_CSYNC 43 * - mem_handle = a handle to the memory object on which the operation 44 * is taking place 45 * - user_addr = the address of the range to be synced 46 * - size = the amount of data to be synced, in bytes. 47 * - offset is ignored. 48 */ 49 struct basep_syncset { 50 struct base_mem_handle mem_handle; 51 __u64 user_addr; 52 __u64 size; 53 __u8 type; 54 __u8 padding[7]; 55 }; 56 57 #endif /* _UAPI_BASE_MEM_PRIV_H_ */ 58