aboutsummaryrefslogtreecommitdiff
path: root/lib/sbi/sbi_hart.c
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2020-03-02 16:33:07 +0530
committerAnup Patel <anup@brainfault.org>2020-03-11 15:30:30 +0530
commiteede1aa7c7f134192ca734e5a2e76ff1588c97d5 (patch)
tree3b89591ae20eaf0e1ec035db8ecdba4c47a9fad7 /lib/sbi/sbi_hart.c
parent9aad831e87dae70bf78357d49529c7ee56bd7175 (diff)
lib: sbi_hart: Remove HART available mask and related APIs
The HART available mask and related APIs are now totally redundant because of more extensive HART state machine implemented by sbi_hsm. Due to above, we remove HART available mask and related APIs. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'lib/sbi/sbi_hart.c')
-rw-r--r--lib/sbi/sbi_hart.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c
index 9017db1..732ff5f 100644
--- a/lib/sbi/sbi_hart.c
+++ b/lib/sbi/sbi_hart.c
@@ -11,7 +11,6 @@
#include <sbi/riscv_barrier.h>
#include <sbi/riscv_encoding.h>
#include <sbi/riscv_fp.h>
-#include <sbi/riscv_locks.h>
#include <sbi/sbi_bitops.h>
#include <sbi/sbi_console.h>
#include <sbi/sbi_error.h>
@@ -342,34 +341,6 @@ sbi_hart_switch_mode(unsigned long arg0, unsigned long arg1,
__builtin_unreachable();
}
-static spinlock_t avail_hart_mask_lock = SPIN_LOCK_INITIALIZER;
-static volatile unsigned long avail_hart_mask = 0;
-
-void sbi_hart_mark_available(u32 hartid)
-{
- spin_lock(&avail_hart_mask_lock);
- avail_hart_mask |= (1UL << hartid);
- spin_unlock(&avail_hart_mask_lock);
-}
-
-void sbi_hart_unmark_available(u32 hartid)
-{
- spin_lock(&avail_hart_mask_lock);
- avail_hart_mask &= ~(1UL << hartid);
- spin_unlock(&avail_hart_mask_lock);
-}
-
-ulong sbi_hart_available_mask(void)
-{
- ulong ret;
-
- spin_lock(&avail_hart_mask_lock);
- ret = avail_hart_mask;
- spin_unlock(&avail_hart_mask_lock);
-
- return ret;
-}
-
typedef struct sbi_scratch *(*h2s)(ulong hartid);
struct sbi_scratch *sbi_hart_id_to_scratch(struct sbi_scratch *scratch,