lh | 758261d | 2023-07-13 05:52:04 -0700 | [diff] [blame] | 1 | /* |
| 2 | * linux/ipc/shm_ctrl.h |
| 3 | * Copyright (C) 2023 Sanechips Technology Co., Ltd. |
| 4 | */ |
| 5 | #ifndef _SHM_CTRL_H |
| 6 | #define _SHM_CTRL_H |
| 7 | |
| 8 | #ifdef CONFIG_SYSVIPC_CROSS_SHM |
| 9 | /** |
| 10 | * ºê¶¨Òå |
| 11 | */ |
| 12 | #include <linux/slab.h> |
| 13 | #include <linux/mm.h> |
| 14 | #include <linux/shm.h> |
| 15 | #include <linux/io.h> |
| 16 | #include <linux/init.h> |
| 17 | #include <linux/file.h> |
| 18 | #include <linux/list.h> |
| 19 | #include <linux/mman.h> |
| 20 | #include <linux/shmem_fs.h> |
| 21 | #include <linux/audit.h> |
| 22 | #include <linux/capability.h> |
| 23 | #include <linux/ptrace.h> |
| 24 | #include <linux/rwsem.h> |
| 25 | #include <linux/nsproxy.h> |
| 26 | #include <linux/ipc_namespace.h> |
| 27 | #include <linux/module.h> |
| 28 | #include <linux/dma-mapping.h> |
| 29 | #include <mach/spinlock.h> |
| 30 | |
| 31 | /** |
| 32 | * Êý¾ÝÀàÐͶ¨Òå |
| 33 | */ |
| 34 | #define TRUE 1 |
| 35 | #define FALSE 0 |
| 36 | #define SHM_REMOTE_ATTR_YES (0x594553) /*YES ASCIIÂë*/ |
| 37 | #define SHM_REMOTE_ATTR_MASK (0xFFFFF000) |
| 38 | #define SHM_CTRL_OK (0) |
| 39 | #define SHM_CTRL_ERROR (-1) |
| 40 | #define SHM_CTRL_VMA_LINK_NUM (2) |
| 41 | #define SHM_CTRL_MEMSYNC_CHANNEL (15) |
| 42 | #define SHM_CTRL_CHANNEL_SIZE (0x40) |
| 43 | #define SHM_CTRL_LONG_32BIT (32) |
| 44 | |
| 45 | struct shm_pool_msg |
| 46 | { |
| 47 | unsigned int shm_len; |
| 48 | unsigned int key_manage_len; |
| 49 | phys_addr_t shm_memory_phy; |
| 50 | phys_addr_t key_manage_phy; |
| 51 | }; |
| 52 | |
| 53 | |
| 54 | #endif |
| 55 | #endif // _SHM_CTRL_H |
| 56 | |