aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorXiang W <wxjstz@126.com>2023-04-14 09:32:47 +0800
committerAnup Patel <anup@brainfault.org>2023-04-14 13:45:30 +0530
commitbf40e07f6f24a9c3ed08cfeb730d4e62ba3e215b (patch)
tree285c00a20564493ffd411589cd28c774cbcf09e3 /include
parent80078ab088c34aafce52f0c0d4d1e367da146b9c (diff)
downloadopensbi-bf40e07f6f24a9c3ed08cfeb730d4e62ba3e215b.zip
opensbi-bf40e07f6f24a9c3ed08cfeb730d4e62ba3e215b.tar.gz
opensbi-bf40e07f6f24a9c3ed08cfeb730d4e62ba3e215b.tar.bz2
lib: sbi: Optimize sbi_tlb queue waiting
When tlb_fifo is full, it will wait and affect the ipi update to other harts. This patch is optimized. Signed-off-by: Xiang W <wxjstz@126.com> Reviewed-by: Anup Patel <anup@brainfault.org> Tested-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'include')
-rw-r--r--include/sbi/sbi_ipi.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/sbi/sbi_ipi.h b/include/sbi/sbi_ipi.h
index f384e74..c64f422 100644
--- a/include/sbi/sbi_ipi.h
+++ b/include/sbi/sbi_ipi.h
@@ -30,6 +30,12 @@ struct sbi_ipi_device {
void (*ipi_clear)(u32 target_hart);
};
+enum sbi_ipi_update_type {
+ SBI_IPI_UPDATE_SUCCESS,
+ SBI_IPI_UPDATE_BREAK,
+ SBI_IPI_UPDATE_RETRY,
+};
+
struct sbi_scratch;
/** IPI event operations or callbacks */
@@ -41,6 +47,10 @@ struct sbi_ipi_event_ops {
* Update callback to save/enqueue data for remote HART
* Note: This is an optional callback and it is called just before
* triggering IPI to remote HART.
+ * @return < 0, error or failure
+ * @return SBI_IPI_UPDATE_SUCCESS, success
+ * @return SBI_IPI_UPDATE_BREAK, break IPI, done on local hart
+ * @return SBI_IPI_UPDATE_RETRY, need retry
*/
int (* update)(struct sbi_scratch *scratch,
struct sbi_scratch *remote_scratch,