fix a function which frees SMPT full/empty bitmap, aal_mc_free_micpa
This commit is contained in:
parent
8dc38e13ef
commit
11599d4ce4
@@ -246,7 +246,7 @@ int aal_mc_free_micpa(unsigned long mic_pa) {
|
|||||||
int smpt_ndx = ((mic_pa - MIC_SYSTEM_BASE) >> MIC_SYSTEM_PAGE_SHIFT);
|
int smpt_ndx = ((mic_pa - MIC_SYSTEM_BASE) >> MIC_SYSTEM_PAGE_SHIFT);
|
||||||
if(smpt_ndx >= NUM_SMPT_ENTRIES_IN_USE ||
|
if(smpt_ndx >= NUM_SMPT_ENTRIES_IN_USE ||
|
||||||
smpt_ndx < NUM_SMPT_ENTRIES_IN_USE - NUM_SMPT_ENTRIES_MICPA) {
|
smpt_ndx < NUM_SMPT_ENTRIES_IN_USE - NUM_SMPT_ENTRIES_MICPA) {
|
||||||
dkprintf("aal_mc_free_micpa,mic_pa=%llx,out of range\n", host_pa);
|
dkprintf("aal_mc_free_micpa,mic_pa=%llx,out of range\n", mic_pa);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
free_bitmap_micpa |= (1ULL << smpt_ndx);
|
free_bitmap_micpa |= (1ULL << smpt_ndx);
|
||||||
|
|||||||
Reference in New Issue
Block a user