mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-10-23 07:34:24 +02:00

For statistical support, let's add allocated and total size of GCMA areas into gcma stats. Bug: 410432482 Change-Id: Ifcae950fb96d11af560a95c85376fcf5156cd35c Signed-off-by: Sooyong Suk <s.suk@samsung.corp-partner.google.com>
39 lines
1001 B
C
39 lines
1001 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __GCMA_H__
|
|
#define __GCMA_H__
|
|
|
|
#include <linux/types.h>
|
|
|
|
#ifdef CONFIG_GCMA
|
|
enum gcma_stat_type {
|
|
ALLOCATED_PAGE,
|
|
STORED_PAGE,
|
|
LOADED_PAGE,
|
|
EVICTED_PAGE,
|
|
CACHED_PAGE,
|
|
DISCARDED_PAGE,
|
|
TOTAL_PAGE,
|
|
NUM_OF_GCMA_STAT,
|
|
};
|
|
|
|
#ifdef CONFIG_GCMA_SYSFS
|
|
u64 gcma_stat_get(enum gcma_stat_type type);
|
|
#else
|
|
static inline u64 gcma_stat_get(enum gcma_stat_type type) { return 0; }
|
|
#endif
|
|
|
|
extern void gcma_alloc_range(unsigned long start_pfn, unsigned long end_pfn);
|
|
extern void gcma_free_range(unsigned long start_pfn, unsigned long end_pfn);
|
|
extern int register_gcma_area(const char *name, phys_addr_t base,
|
|
phys_addr_t size);
|
|
#else
|
|
static inline void gcma_alloc_range(unsigned long start_pfn,
|
|
unsigned long end_pfn) {}
|
|
static inline void gcma_free_range(unsigned long start_pfn,
|
|
unsigned long end_pfn) {}
|
|
static inline int register_gcma_area(const char *name, phys_addr_t base,
|
|
phys_addr_t size) { return -EINVAL; }
|
|
#endif
|
|
|
|
#endif
|