From 748e4f3d702def1a4bff191e0cf93b6a05340f01 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Fri, 10 May 2024 07:41:34 +0000
Subject: [PATCH] add gpio led uart
---
kernel/include/linux/memory_group_manager.h | 48 +++++++++++++++++++++++++++++++++++++-----------
1 files changed, 37 insertions(+), 11 deletions(-)
diff --git a/kernel/include/linux/memory_group_manager.h b/kernel/include/linux/memory_group_manager.h
index c0e808b..786e3b9 100644
--- a/kernel/include/linux/memory_group_manager.h
+++ b/kernel/include/linux/memory_group_manager.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
*
- * (C) COPYRIGHT 2019-2021 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT 2019-2022 ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -43,10 +43,12 @@
* @mgm_free_page: Callback to free physical memory in a group
* @mgm_get_import_memory_id: Callback to get the group ID for imported memory
* @mgm_update_gpu_pte: Callback to modify a GPU page table entry
+ * @mgm_pte_to_original_pte: Callback to get the original PTE entry as given
+ * to mgm_update_gpu_pte
* @mgm_vmf_insert_pfn_prot: Callback to map a physical memory page for the CPU
*/
struct memory_group_manager_ops {
- /**
+ /*
* mgm_alloc_page - Allocate a physical memory page in a group
*
* @mgm_dev: The memory group manager through which the request is
@@ -65,7 +67,7 @@
struct memory_group_manager_device *mgm_dev, int group_id,
gfp_t gfp_mask, unsigned int order);
- /**
+ /*
* mgm_free_page - Free a physical memory page in a group
*
* @mgm_dev: The memory group manager through which the request
@@ -84,7 +86,7 @@
struct memory_group_manager_device *mgm_dev, int group_id,
struct page *page, unsigned int order);
- /**
+ /*
* mgm_get_import_memory_id - Get the physical memory group ID for the
* imported memory
*
@@ -103,7 +105,7 @@
struct memory_group_manager_device *mgm_dev,
struct memory_group_manager_import_data *import_data);
- /**
+ /*
* mgm_update_gpu_pte - Modify a GPU page table entry for a memory group
*
* @mgm_dev: The memory group manager through which the request
@@ -120,14 +122,36 @@
* This function allows the memory group manager to modify a GPU page
* table entry before it is stored by the kbase module (controller
* driver). It may set certain bits in the page table entry attributes
- * or in the physical address, based on the physical memory group ID.
+ * or modify the physical address, based on the physical memory group ID
+ * and/or additional data in struct memory_group_manager_device.
*
* Return: A modified GPU page table entry to be stored in a page table.
*/
u64 (*mgm_update_gpu_pte)(struct memory_group_manager_device *mgm_dev,
int group_id, int mmu_level, u64 pte);
- /**
+ /*
+ * mgm_pte_to_original_pte - Undo any modification done during mgm_update_gpu_pte()
+ *
+ * @mgm_dev: The memory group manager through which the request
+ * is being made.
+ * @group_id: A physical memory group ID. The meaning of this is
+ * defined by the systems integrator. Its valid range is
+ * 0 .. MEMORY_GROUP_MANAGER_NR_GROUPS-1.
+ * @mmu_level: The level of the page table entry in @ate.
+ * @pte: The page table entry to restore the original representation for,
+ * in LPAE or AArch64 format (depending on the driver's configuration).
+ *
+ * Undo any modifications done during mgm_update_gpu_pte().
+ * This function allows getting back the original PTE entry as given
+ * to mgm_update_gpu_pte().
+ *
+ * Return: PTE entry as originally specified to mgm_update_gpu_pte()
+ */
+ u64 (*mgm_pte_to_original_pte)(struct memory_group_manager_device *mgm_dev, int group_id,
+ int mmu_level, u64 pte);
+
+ /*
* mgm_vmf_insert_pfn_prot - Map a physical page in a group for the CPU
*
* @mgm_dev: The memory group manager through which the request
@@ -158,8 +182,9 @@
* struct memory_group_manager_device - Device structure for a memory group
* manager
*
- * @ops - Callbacks associated with this device
- * @data - Pointer to device private data
+ * @ops: Callbacks associated with this device
+ * @data: Pointer to device private data
+ * @owner: pointer to owning module
*
* In order for a systems integrator to provide custom behaviors for memory
* operations performed by the kbase module (controller driver), they must
@@ -183,8 +208,9 @@
* struct memory_group_manager_import_data - Structure describing the imported
* memory
*
- * @type - type of imported memory
- * @u - Union describing the imported memory
+ * @type: type of imported memory
+ * @u: Union describing the imported memory
+ * @u.dma_buf: imported memory
*
*/
struct memory_group_manager_import_data {
--
Gitblit v1.6.2