fix(risc-v, virt64, plic): use volatile rw for claim and complete
Some checks failed
ToolsCI / Tools (push) Has been cancelled
AutoTestCI / components/cpp11 (push) Has been cancelled
AutoTestCI / kernel/atomic (push) Has been cancelled
AutoTestCI / kernel/atomic/riscv64 (push) Has been cancelled
AutoTestCI / kernel/atomic_c11 (push) Has been cancelled
AutoTestCI / kernel/atomic_c11/riscv64 (push) Has been cancelled
AutoTestCI / kernel/device (push) Has been cancelled
AutoTestCI / kernel/ipc (push) Has been cancelled
AutoTestCI / kernel/irq (push) Has been cancelled
AutoTestCI / kernel/mem (push) Has been cancelled
AutoTestCI / kernel/mem/riscv64 (push) Has been cancelled
AutoTestCI / kernel/thread (push) Has been cancelled
AutoTestCI / kernel/timer (push) Has been cancelled
AutoTestCI / rtsmart/aarch64 (push) Has been cancelled
AutoTestCI / rtsmart/arm (push) Has been cancelled
AutoTestCI / rtsmart/riscv64 (push) Has been cancelled
AutoTestCI / components/utest (push) Has been cancelled
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
doc_doxygen / doxygen_doc generate (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
doc_doxygen / deploy (push) Has been cancelled

This commit is contained in:
Haojin Tang
2025-09-02 22:04:10 +08:00
committed by R b b666
parent c0142c786e
commit 893ae7d7ba
2 changed files with 4 additions and 4 deletions

View File

@@ -93,7 +93,7 @@ void plic_set_threshold(int threshold)
int plic_claim(void)
{
int hart = __raw_hartid();
int irq = *(uint32_t *)PLIC_CLAIM(hart);
int irq = readl((uint32_t *)PLIC_CLAIM(hart));
return irq;
}
@@ -110,7 +110,7 @@ int plic_claim(void)
void plic_complete(int irq)
{
int hart = __raw_hartid();
*(uint32_t *)PLIC_COMPLETE(hart) = irq;
writel(irq, (uint32_t *)PLIC_COMPLETE(hart));
}
void plic_set_ie(rt_uint32_t word_index, rt_uint32_t val)

View File

@@ -93,7 +93,7 @@ void plic_set_threshold(int threshold)
int plic_claim(void)
{
int hart = __raw_hartid();
int irq = *(uint32_t *)PLIC_CLAIM(hart);
int irq = readl((uint32_t *)PLIC_CLAIM(hart));
return irq;
}
@@ -110,7 +110,7 @@ int plic_claim(void)
void plic_complete(int irq)
{
int hart = __raw_hartid();
*(uint32_t *)PLIC_COMPLETE(hart) = irq;
writel(irq, (uint32_t *)PLIC_COMPLETE(hart));
}
void plic_set_ie(rt_uint32_t word_index, rt_uint32_t val)