pmem: ensure SMI correctness
Due to hardware constraints, the SMI should not be mapped in the kernel space when not in use. Unmap the SMI from the kernel address space when the last allocation is freed. Vote for bus bandwidth as well while the SMI is allocated. CRs-Fixed: 281723 Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
This commit is contained in:
committed by
Bryan Huntsman
parent
f453bb396a
commit
1e36a02967
@@ -153,6 +153,24 @@ struct android_pmem_platform_data
|
||||
unsigned buffered;
|
||||
/* which memory type (i.e. SMI, EBI1) this PMEM device is backed by */
|
||||
unsigned memory_type;
|
||||
/*
|
||||
* function to be called when the number of allocations goes from
|
||||
* 0 -> 1
|
||||
*/
|
||||
void (*request_region)(void *);
|
||||
/*
|
||||
* function to be called when the number of allocations goes from
|
||||
* 1 -> 0
|
||||
*/
|
||||
void (*release_region)(void *);
|
||||
/*
|
||||
* function to be called upon pmem registration
|
||||
*/
|
||||
void *(*setup_region)(void);
|
||||
/*
|
||||
* indicates that this region should be mapped/unmaped as needed
|
||||
*/
|
||||
int map_on_demand;
|
||||
};
|
||||
|
||||
int pmem_setup(struct android_pmem_platform_data *pdata,
|
||||
|
||||
Reference in New Issue
Block a user