xref: /openbmc/linux/drivers/s390/char/hmcdrv_cache.h (revision d9fd5a71)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  *    SE/HMC Drive (Read) Cache Functions
4  *
5  *    Copyright IBM Corp. 2013
6  *    Author(s): Ralf Hoppe (rhoppe@de.ibm.com)
7  */
8 
9 #ifndef __HMCDRV_CACHE_H__
10 #define __HMCDRV_CACHE_H__
11 
12 #include <linux/mmzone.h>
13 #include "hmcdrv_ftp.h"
14 
15 #define HMCDRV_CACHE_SIZE_DFLT	(MAX_ORDER_NR_PAGES * PAGE_SIZE / 2UL)
16 
17 typedef ssize_t (*hmcdrv_cache_ftpfunc)(const struct hmcdrv_ftp_cmdspec *ftp,
18 					size_t *fsize);
19 
20 ssize_t hmcdrv_cache_cmd(const struct hmcdrv_ftp_cmdspec *ftp,
21 			 hmcdrv_cache_ftpfunc func);
22 int hmcdrv_cache_startup(size_t cachesize);
23 void hmcdrv_cache_shutdown(void);
24 
25 #endif	 /* __HMCDRV_CACHE_H__ */
26