--- zzzz-none-000/linux-4.19.183/include/linux/mm.h 2021-03-24 10:07:39.000000000 +0000 +++ bcm63-7530ax-756/linux-4.19.183/include/linux/mm.h 2023-06-28 08:54:20.000000000 +0000 @@ -37,6 +37,11 @@ void init_mm_internals(void); +#if defined(CONFIG_AVM_PAGE_TRACE) +unsigned long avm_get_page_current_pc(struct page *page); +void avm_set_page_current_pc(struct page *page, unsigned long pc); +#endif/*--- #if defined(CONFIG_AVM_PAGE_TRACE) ---*/ + #ifndef CONFIG_NEED_MULTIPLE_NODES /* Don't use mapnrs, do it properly */ extern unsigned long max_mapnr; @@ -671,7 +676,11 @@ void put_pages_list(struct list_head *pages); -void split_page(struct page *page, unsigned int order); +void split_page(struct page *page, unsigned int order +#if defined(CONFIG_AVM_PAGE_TRACE) + , unsigned long pc +#endif + ); /* * Compound pages have a destructor function. Provide a @@ -2394,7 +2403,11 @@ void task_dirty_inc(struct task_struct *tsk); /* readahead.c */ +#if defined(CONFIG_AVM_KERNEL) +#define VM_MAX_READAHEAD 1024 /* kbytes */ +#else #define VM_MAX_READAHEAD 128 /* kbytes */ +#endif #define VM_MIN_READAHEAD 16 /* kbytes (includes current page) */ int force_page_cache_readahead(struct address_space *mapping, struct file *filp, @@ -2833,5 +2846,11 @@ static inline void setup_nr_node_ids(void) {} #endif +#ifdef CONFIG_MTD_AVM_MTDRAM +int __init avm_mtdram_mem_reserve(void); +#else +static inline int avm_mtdram_mem_reserve(void) { return 0; } +#endif + #endif /* __KERNEL__ */ #endif /* _LINUX_MM_H */