kernel: fix remaining _cpu() races

This commit is contained in:
Matheus
2024-09-15 18:39:59 -03:00
parent 32392573cc
commit 56d665d5a0
9 changed files with 26 additions and 18 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ static void mcfg_write32(int bus, int device, int function, uint32_t offset, uin
static uint64_t msiformatmessage(uint32_t *data, int vector, int edgetrigger, int deassert) {
*data = (edgetrigger ? 0 : (1 << 15)) | (deassert ? 0 : (1 << 14)) | vector;
return 0xfee00000 | (_cpu()->id << 12);
return 0xfee00000 | (current_cpu_id() << 12);
}
// in PCIe, every function has 4096 bytes of config space for it.