x86/paging: Use CPUSet instead of cpu_mask_t
This commit is contained in:
@@ -40,8 +40,6 @@ enum {
|
||||
SMP_MSG_FLAG_FREE_ARG = 0x2,
|
||||
};
|
||||
|
||||
typedef uint32 cpu_mask_t;
|
||||
|
||||
typedef void (*smp_call_func)(addr_t data1, int32 currentCPU, addr_t data2, addr_t data3);
|
||||
|
||||
class CPUSet {
|
||||
|
||||
@@ -105,7 +105,7 @@ private:
|
||||
struct page_slot {
|
||||
PhysicalPageSlot* slot;
|
||||
phys_addr_t physicalAddress;
|
||||
cpu_mask_t valid;
|
||||
CPUSet valid;
|
||||
};
|
||||
|
||||
page_slot fSlots[SLOTS_PER_TRANSLATION_MAP];
|
||||
@@ -389,10 +389,10 @@ LargeMemoryTranslationMapPhysicalPageMapper::GetPageTableAt(
|
||||
page_slot& slot = fSlots[i];
|
||||
if (slot.physicalAddress == physicalAddress) {
|
||||
fNextSlot = (i + 1) & (fSlotCount - 1);
|
||||
if ((slot.valid & (1 << currentCPU)) == 0) {
|
||||
if (!slot.valid.GetBit(currentCPU)) {
|
||||
// not valid on this CPU -- invalidate the TLB entry
|
||||
invalidate_TLB(slot.slot->address);
|
||||
slot.valid |= 1 << currentCPU;
|
||||
slot.valid.SetBit(currentCPU);
|
||||
}
|
||||
return (void*)slot.slot->address;
|
||||
}
|
||||
@@ -404,7 +404,8 @@ LargeMemoryTranslationMapPhysicalPageMapper::GetPageTableAt(
|
||||
|
||||
slot.physicalAddress = physicalAddress;
|
||||
slot.slot->Map(physicalAddress);
|
||||
slot.valid = 1 << currentCPU;
|
||||
slot.valid.ClearAll();
|
||||
slot.valid.SetBit(currentCPU);
|
||||
|
||||
return (void*)slot.slot->address;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user