mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
Kernel: Use Processor::wait_check in loops waiting for HW to respond
This gives the processor the hint that it is in a hot loop and allows us to do other work in between
This commit is contained in:
committed by
Andrew Kaster
parent
cbaa3465a8
commit
a2810d3cf8
@@ -294,11 +294,11 @@ UNMAP_AFTER_INIT u32 E1000NetworkAdapter::read_eeprom(u8 address)
|
||||
if (m_has_eeprom) {
|
||||
out32(REG_EEPROM, ((u32)address << 8) | 1);
|
||||
while (!((tmp = in32(REG_EEPROM)) & (1 << 4)))
|
||||
;
|
||||
Processor::wait_check();
|
||||
} else {
|
||||
out32(REG_EEPROM, ((u32)address << 2) | 1);
|
||||
while (!((tmp = in32(REG_EEPROM)) & (1 << 1)))
|
||||
;
|
||||
Processor::wait_check();
|
||||
}
|
||||
data = (tmp >> 16) & 0xffff;
|
||||
return data;
|
||||
|
||||
Reference in New Issue
Block a user