#include <linux/slab.h>
#include <linux/types.h>
#include "adf_mstate_mgr.h"
#define ADF_MSTATE_MAGIC …
#define ADF_MSTATE_VERSION …
struct adf_mstate_sect_h { … };
u32 adf_mstate_state_size(struct adf_mstate_mgr *mgr)
{ … }
static inline u32 adf_mstate_avail_room(struct adf_mstate_mgr *mgr)
{ … }
void adf_mstate_mgr_init(struct adf_mstate_mgr *mgr, u8 *buf, u32 size)
{
mgr->buf = buf;
mgr->state = buf;
mgr->size = size;
mgr->n_sects = 0;
};
struct adf_mstate_mgr *adf_mstate_mgr_new(u8 *buf, u32 size)
{ … }
void adf_mstate_mgr_destroy(struct adf_mstate_mgr *mgr)
{ … }
void adf_mstate_mgr_init_from_parent(struct adf_mstate_mgr *mgr,
struct adf_mstate_mgr *p_mgr)
{ … }
void adf_mstate_mgr_init_from_psect(struct adf_mstate_mgr *mgr,
struct adf_mstate_sect_h *p_sect)
{ … }
static void adf_mstate_preamble_init(struct adf_mstate_preh *preamble)
{ … }
static int adf_mstate_preamble_def_checker(struct adf_mstate_preh *preamble,
void *opaque)
{ … }
struct adf_mstate_preh *adf_mstate_preamble_add(struct adf_mstate_mgr *mgr)
{ … }
int adf_mstate_preamble_update(struct adf_mstate_mgr *mgr)
{ … }
static void adf_mstate_dump_sect(struct adf_mstate_sect_h *sect,
const char *prefix)
{ … }
static inline void __adf_mstate_sect_update(struct adf_mstate_mgr *mgr,
struct adf_mstate_sect_h *sect,
u32 size,
u32 n_subsects)
{ … }
void adf_mstate_sect_update(struct adf_mstate_mgr *p_mgr,
struct adf_mstate_mgr *curr_mgr,
struct adf_mstate_sect_h *sect)
{ … }
static struct adf_mstate_sect_h *adf_mstate_sect_add_header(struct adf_mstate_mgr *mgr,
const char *id)
{ … }
struct adf_mstate_sect_h *adf_mstate_sect_add_vreg(struct adf_mstate_mgr *mgr,
const char *id,
struct adf_mstate_vreginfo *info)
{ … }
struct adf_mstate_sect_h *adf_mstate_sect_add(struct adf_mstate_mgr *mgr,
const char *id,
adf_mstate_populate populate,
void *opaque)
{ … }
static int adf_mstate_sect_validate(struct adf_mstate_mgr *mgr)
{ … }
u32 adf_mstate_state_size_from_remote(struct adf_mstate_mgr *mgr)
{ … }
int adf_mstate_mgr_init_from_remote(struct adf_mstate_mgr *mgr, u8 *buf, u32 size,
adf_mstate_preamble_checker pre_checker,
void *opaque)
{ … }
struct adf_mstate_sect_h *adf_mstate_sect_lookup(struct adf_mstate_mgr *mgr,
const char *id,
adf_mstate_action action,
void *opaque)
{ … }