drivers/nvme: Rely on CONFIG_MMU_PAGE_SIZE for PRP
Getting rid of 4Kib page size hardcoded value on PRP handling. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
eeea64a19c
commit
0b45688335
1 changed files with 4 additions and 6 deletions
|
@ -306,16 +306,14 @@ enum nvme_feature {
|
|||
#define CACHE_LINE_SIZE CONFIG_DCACHE_LINE_SIZE
|
||||
#endif
|
||||
|
||||
/* Assuming page size it always 4Kib
|
||||
* ToDo: define it accorditng to CONFIG_MMU_PAGE_SIZE
|
||||
*/
|
||||
#define NVME_PBAO_MASK 0xFFF
|
||||
#define NVME_PBAO_MASK (CONFIG_MMU_PAGE_SIZE - 1)
|
||||
|
||||
#define NVME_PRP_NEXT_PAGE(_addr) ((_addr & (~NVME_PBAO_MASK)) + 0x1000)
|
||||
#define NVME_PRP_NEXT_PAGE(_addr) \
|
||||
((_addr & ~NVME_PBAO_MASK) + CONFIG_MMU_PAGE_SIZE)
|
||||
|
||||
struct nvme_prp_list {
|
||||
uintptr_t prp[CONFIG_MMU_PAGE_SIZE / sizeof(uintptr_t)]
|
||||
__aligned(0x1000);
|
||||
__aligned(CONFIG_MMU_PAGE_SIZE);
|
||||
sys_dnode_t node;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue