Lines Matching refs:bank
21 void sys_mm_drv_bank_init(struct sys_mm_drv_bank *bank, uint32_t bank_pages) in sys_mm_drv_bank_init() argument
23 bank->unmapped_pages = 0; in sys_mm_drv_bank_init()
24 bank->mapped_pages = bank_pages; in sys_mm_drv_bank_init()
25 bank->max_mapped_pages = bank_pages; in sys_mm_drv_bank_init()
28 uint32_t sys_mm_drv_bank_page_mapped(struct sys_mm_drv_bank *bank) in sys_mm_drv_bank_page_mapped() argument
30 bank->unmapped_pages--; in sys_mm_drv_bank_page_mapped()
31 bank->mapped_pages++; in sys_mm_drv_bank_page_mapped()
32 if (bank->mapped_pages > bank->max_mapped_pages) { in sys_mm_drv_bank_page_mapped()
33 bank->max_mapped_pages = bank->mapped_pages; in sys_mm_drv_bank_page_mapped()
35 return bank->mapped_pages; in sys_mm_drv_bank_page_mapped()
38 uint32_t sys_mm_drv_bank_page_unmapped(struct sys_mm_drv_bank *bank) in sys_mm_drv_bank_page_unmapped() argument
40 bank->unmapped_pages++; in sys_mm_drv_bank_page_unmapped()
41 bank->mapped_pages--; in sys_mm_drv_bank_page_unmapped()
42 return bank->unmapped_pages; in sys_mm_drv_bank_page_unmapped()
45 void sys_mm_drv_bank_stats_get(struct sys_mm_drv_bank *bank, in sys_mm_drv_bank_stats_get() argument
48 stats->free_bytes = bank->unmapped_pages * in sys_mm_drv_bank_stats_get()
50 stats->allocated_bytes = bank->mapped_pages * in sys_mm_drv_bank_stats_get()
52 stats->max_allocated_bytes = bank->max_mapped_pages * in sys_mm_drv_bank_stats_get()
56 void sys_mm_drv_bank_stats_reset_max(struct sys_mm_drv_bank *bank) in sys_mm_drv_bank_stats_reset_max() argument
58 bank->max_mapped_pages = bank->mapped_pages; in sys_mm_drv_bank_stats_reset_max()