Lines Matching refs:hart
24 #define PENDING_REG(base, hart) ((ulong)(base) + 0x1000 + ((hart) / 4) * 4) argument
26 #define ENABLE_REG(base, hart) ((ulong)(base) + 0x2000 + (hart) * 0x80) argument
28 #define CLAIM_REG(base, hart) ((ulong)(base) + 0x200004 + (hart) * 0x1000) argument
31 #define SEND_IPI_TO_HART(hart) (0x80 >> (hart)) argument
35 static int enable_ipi(int hart) in enable_ipi() argument
39 en = ENABLE_HART_IPI >> hart; in enable_ipi()
40 writel(en, (void __iomem *)ENABLE_REG(gd->arch.plic, hart)); in enable_ipi()
86 int riscv_send_ipi(int hart) in riscv_send_ipi() argument
88 unsigned int ipi = (SEND_IPI_TO_HART(hart) << (8 * gd->arch.boot_hart)); in riscv_send_ipi()
96 int riscv_clear_ipi(int hart) in riscv_clear_ipi() argument
100 source_id = readl((void __iomem *)CLAIM_REG(gd->arch.plic, hart)); in riscv_clear_ipi()
101 writel(source_id, (void __iomem *)CLAIM_REG(gd->arch.plic, hart)); in riscv_clear_ipi()
106 int riscv_get_ipi(int hart, int *pending) in riscv_get_ipi() argument
110 *pending = !!(*pending & SEND_IPI_TO_HART(hart)); in riscv_get_ipi()