Files
threeeye bc1d038eac REVVL 6 Pro kernel bring-up: full working tree snapshot (2026-09-12)
Squashed backup commit (no shallow-clone history issues) of
xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream
commit 9eece662e) plus all fixes applied to get everpal_defconfig building
clean against a modern (GCC 15.2.0) toolchain -- see the previous commit
message on the lineage-23.2 branch (also in this repo history is not
available here since this is a squashed snapshot; full incremental history
lives in the local DL380 checkout and the upstream GitHub remote).

Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
2026-09-12 13:36:46 +00:00

87 lines
2.2 KiB
C

/*
* Copyright (C) 2016 MediaTek Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See http://www.gnu.org/licenses/gpl-2.0.html for more details.
*/
#ifndef _SLBC_H_
#define _SLBC_H_
#include "slbc_ops.h"
#define SLBC_DEBUG
#ifndef PROC_FOPS_RW
#define PROC_FOPS_RW(name) \
static int name ## _proc_open(struct inode *inode, \
struct file *file) \
{ \
return single_open(file, name ## _proc_show, \
PDE_DATA(inode)); \
} \
static const struct file_operations name ## _proc_fops = { \
.owner = THIS_MODULE, \
.open = name ## _proc_open, \
.read = seq_read, \
.llseek = seq_lseek, \
.release = single_release, \
.write = name ## _proc_write, \
}
#endif /* PROC_FOPS_RW */
#ifndef PROC_FOPS_RO
#define PROC_FOPS_RO(name) \
static int name ## _proc_open(struct inode *inode, \
struct file *file) \
{ \
return single_open(file, name ## _proc_show, \
PDE_DATA(inode)); \
} \
static const struct file_operations name ## _proc_fops = { \
.owner = THIS_MODULE, \
.open = name ## _proc_open, \
.read = seq_read, \
.llseek = seq_lseek, \
.release = single_release, \
}
#endif /* PROC_FOPS_RO */
#ifndef PROC_ENTRY
#define PROC_ENTRY(name) {__stringify(name), &name ## _proc_fops}
#endif /* PROC_ENTRY */
struct slbc_config {
unsigned int uid;
unsigned int slot_id;
unsigned int max_size;
unsigned int fix_size;
unsigned int priority;
unsigned int extra_slot;
unsigned int res_slot;
unsigned int cache_mode;
};
#define SLBC_ENTRY(id, sid, max, fix, p, extra, res, cache) \
{ \
.uid = id, \
.slot_id = sid, \
.max_size = max, \
.fix_size = fix, \
.priority = p, \
.extra_slot = extra, \
.res_slot = res, \
.cache_mode = cache, \
}
extern int slbc_activate(struct slbc_data *data);
extern int slbc_deactivate(struct slbc_data *data);
#endif /* _SLBC_H_ */