1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 28f933b10SRalf Hoppe /* 38f933b10SRalf Hoppe * SE/HMC Drive (Read) Cache Functions 48f933b10SRalf Hoppe * 58f933b10SRalf Hoppe * Copyright IBM Corp. 2013 68f933b10SRalf Hoppe * Author(s): Ralf Hoppe (rhoppe@de.ibm.com) 78f933b10SRalf Hoppe */ 88f933b10SRalf Hoppe 98f933b10SRalf Hoppe #ifndef __HMCDRV_CACHE_H__ 108f933b10SRalf Hoppe #define __HMCDRV_CACHE_H__ 118f933b10SRalf Hoppe 128f933b10SRalf Hoppe #include <linux/mmzone.h> 138f933b10SRalf Hoppe #include "hmcdrv_ftp.h" 148f933b10SRalf Hoppe 158f933b10SRalf Hoppe #define HMCDRV_CACHE_SIZE_DFLT (MAX_ORDER_NR_PAGES * PAGE_SIZE / 2UL) 168f933b10SRalf Hoppe 178f933b10SRalf Hoppe typedef ssize_t (*hmcdrv_cache_ftpfunc)(const struct hmcdrv_ftp_cmdspec *ftp, 188f933b10SRalf Hoppe size_t *fsize); 198f933b10SRalf Hoppe 208f933b10SRalf Hoppe ssize_t hmcdrv_cache_cmd(const struct hmcdrv_ftp_cmdspec *ftp, 218f933b10SRalf Hoppe hmcdrv_cache_ftpfunc func); 228f933b10SRalf Hoppe int hmcdrv_cache_startup(size_t cachesize); 238f933b10SRalf Hoppe void hmcdrv_cache_shutdown(void); 248f933b10SRalf Hoppe 258f933b10SRalf Hoppe #endif /* __HMCDRV_CACHE_H__ */ 26