linux/fs/pstore/ram_core.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2012 Google, Inc.
 */

#define pr_fmt(fmt)

#include <linux/device.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/memblock.h>
#include <linux/rslib.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/vmalloc.h>
#include <linux/mm.h>
#include <asm/page.h>

#include "ram_internal.h"

/**
 * struct persistent_ram_buffer - persistent circular RAM buffer
 *
 * @sig: Signature to indicate header (PERSISTENT_RAM_SIG xor PRZ-type value)
 * @start: First valid byte in the buffer.
 * @size: Number of valid bytes in the buffer.
 * @data: The contents of the buffer.
 */
struct persistent_ram_buffer {};

#define PERSISTENT_RAM_SIG

static inline size_t buffer_size(struct persistent_ram_zone *prz)
{}

static inline size_t buffer_start(struct persistent_ram_zone *prz)
{}

/* increase and wrap the start pointer, returning the old value */
static size_t buffer_start_add(struct persistent_ram_zone *prz, size_t a)
{}

/* increase the size counter until it hits the max size */
static void buffer_size_add(struct persistent_ram_zone *prz, size_t a)
{}

static void notrace persistent_ram_encode_rs8(struct persistent_ram_zone *prz,
	uint8_t *data, size_t len, uint8_t *ecc)
{}

static int persistent_ram_decode_rs8(struct persistent_ram_zone *prz,
	void *data, size_t len, uint8_t *ecc)
{}

static void notrace persistent_ram_update_ecc(struct persistent_ram_zone *prz,
	unsigned int start, unsigned int count)
{}

static void persistent_ram_update_header_ecc(struct persistent_ram_zone *prz)
{}

static void persistent_ram_ecc_old(struct persistent_ram_zone *prz)
{}

static int persistent_ram_init_ecc(struct persistent_ram_zone *prz,
				   struct persistent_ram_ecc_info *ecc_info)
{}

ssize_t persistent_ram_ecc_string(struct persistent_ram_zone *prz,
	char *str, size_t len)
{}

static void notrace persistent_ram_update(struct persistent_ram_zone *prz,
	const void *s, unsigned int start, unsigned int count)
{}

static int notrace persistent_ram_update_user(struct persistent_ram_zone *prz,
	const void __user *s, unsigned int start, unsigned int count)
{}

void persistent_ram_save_old(struct persistent_ram_zone *prz)
{}

int notrace persistent_ram_write(struct persistent_ram_zone *prz,
	const void *s, unsigned int count)
{}

int notrace persistent_ram_write_user(struct persistent_ram_zone *prz,
	const void __user *s, unsigned int count)
{}

size_t persistent_ram_old_size(struct persistent_ram_zone *prz)
{}

void *persistent_ram_old(struct persistent_ram_zone *prz)
{}

void persistent_ram_free_old(struct persistent_ram_zone *prz)
{}

void persistent_ram_zap(struct persistent_ram_zone *prz)
{}

#define MEM_TYPE_WCOMBINE
#define MEM_TYPE_NONCACHED
#define MEM_TYPE_NORMAL

static void *persistent_ram_vmap(phys_addr_t start, size_t size,
		unsigned int memtype)
{}

static void *persistent_ram_iomap(phys_addr_t start, size_t size,
		unsigned int memtype, char *label)
{}

static int persistent_ram_buffer_map(phys_addr_t start, phys_addr_t size,
		struct persistent_ram_zone *prz, int memtype)
{}

static int persistent_ram_post_init(struct persistent_ram_zone *prz, u32 sig,
				    struct persistent_ram_ecc_info *ecc_info)
{}

void persistent_ram_free(struct persistent_ram_zone **_prz)
{}

struct persistent_ram_zone *persistent_ram_new(phys_addr_t start, size_t size,
			u32 sig, struct persistent_ram_ecc_info *ecc_info,
			unsigned int memtype, u32 flags, char *label)
{}