4
* Heap module manages fixed size buffers that can be used
5
* in a multiprocessor system with shared memory.
7
* Copyright (C) 2008-2009 Texas Instruments, Inc.
9
* This package is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License version 2 as
11
* published by the Free Software Foundation.
13
* THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
19
#ifndef _HEAPBUFMP_IOCTL_
20
#define _HEAPBUFMP_IOCTL_
22
#include <linux/ioctl.h>
23
#include <linux/types.h>
25
#include <ipc_ioctl.h>
26
#include <heapbufmp.h>
30
HEAPBUFMP_GETCONFIG = HEAPBUFMP_BASE_CMD,
33
HEAPBUFMP_PARAMS_INIT,
41
HEAPBUFMP_SHAREDMEMREQ,
43
HEAPBUFMP_GETEXTENDEDSTATS
47
* Command for heapbufmp_get_config
49
#define CMD_HEAPBUFMP_GETCONFIG _IOWR(IPC_IOC_MAGIC, \
50
HEAPBUFMP_GETCONFIG, \
51
struct heapbufmp_cmd_args)
54
* Command for heapbufmp_setup
56
#define CMD_HEAPBUFMP_SETUP _IOWR(IPC_IOC_MAGIC, \
58
struct heapbufmp_cmd_args)
60
* Command for heapbufmp_destroy
62
#define CMD_HEAPBUFMP_DESTROY _IOWR(IPC_IOC_MAGIC, \
64
struct heapbufmp_cmd_args)
67
* Command for heapbufmp_prams_init
69
#define CMD_HEAPBUFMP_PARAMS_INIT _IOWR(IPC_IOC_MAGIC, \
70
HEAPBUFMP_PARAMS_INIT, \
71
struct heapbufmp_cmd_args)
74
* Command for heapbufmp_create
76
#define CMD_HEAPBUFMP_CREATE _IOWR(IPC_IOC_MAGIC, \
78
struct heapbufmp_cmd_args)
81
* Command for heapbufmp_delete
83
#define CMD_HEAPBUFMP_DELETE _IOWR(IPC_IOC_MAGIC, \
85
struct heapbufmp_cmd_args)
88
* Command for heapbufmp_open
90
#define CMD_HEAPBUFMP_OPEN _IOWR(IPC_IOC_MAGIC, \
92
struct heapbufmp_cmd_args)
95
* Command for heapbufmp_open_by_addr
97
#define CMD_HEAPBUFMP_OPENBYADDR _IOWR(IPC_IOC_MAGIC, \
98
HEAPBUFMP_OPENBYADDR, \
99
struct heapbufmp_cmd_args)
102
* Command for heapbufmp_close
104
#define CMD_HEAPBUFMP_CLOSE _IOWR(IPC_IOC_MAGIC, \
106
struct heapbufmp_cmd_args)
109
* Command for heapbufmp_alloc
111
#define CMD_HEAPBUFMP_ALLOC _IOWR(IPC_IOC_MAGIC, \
113
struct heapbufmp_cmd_args)
116
* Command for heapbufmp_free
118
#define CMD_HEAPBUFMP_FREE _IOWR(IPC_IOC_MAGIC, \
120
struct heapbufmp_cmd_args)
123
* Command for heapbufmp_shared_mem_req
125
#define CMD_HEAPBUFMP_SHAREDMEMREQ _IOWR(IPC_IOC_MAGIC, \
126
HEAPBUFMP_SHAREDMEMREQ, \
127
struct heapbufmp_cmd_args)
130
* Command for heapbufmp_get_stats
132
#define CMD_HEAPBUFMP_GETSTATS _IOWR(IPC_IOC_MAGIC, \
133
HEAPBUFMP_GETSTATS, \
134
struct heapbufmp_cmd_args)
137
* Command for heapbufmp_get_extended_stats
139
#define CMD_HEAPBUFMP_GETEXTENDEDSTATS _IOWR(IPC_IOC_MAGIC, \
140
HEAPBUFMP_GETEXTENDEDSTATS, \
141
struct heapbufmp_cmd_args)
145
* Command arguments for heapbuf
147
union heapbufmp_arg {
149
struct heapbufmp_params *params;
153
struct heapbufmp_config *config;
157
struct heapbufmp_config *config;
162
struct heapbufmp_params *params;
164
u32 *shared_addr_srptr;
180
u32 *shared_addr_srptr;
202
struct memory_stats *stats;
207
struct heapbufmp_extended_stats *stats;
208
} get_extended_stats;
212
struct heapbufmp_params *params;
213
u32 *shared_addr_srptr;
219
* Command arguments for heapbuf
221
struct heapbufmp_cmd_args{
222
union heapbufmp_arg args;
227
* This ioctl interface for heapbuf module
229
int heapbufmp_ioctl(struct inode *pinode, struct file *filp,
230
unsigned int cmd, unsigned long args, bool user);
232
#endif /* _HEAPBUFMP_IOCTL_ */