aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2017-04-05 17:39:58 -0700
committerAndrew Waterman <andrew@sifive.com>2017-04-05 17:47:19 -0700
commitdce2b7dd8ede804f54f54fafabd82b24c1a0be62 (patch)
tree5a93701358ab2c5b900855f543179ee1330332cd
parent31eab7e4dd7856d48ee352fc941490257840a87c (diff)
downloadriscv-pk-dce2b7dd8ede804f54f54fafabd82b24c1a0be62.zip
riscv-pk-dce2b7dd8ede804f54f54fafabd82b24c1a0be62.tar.gz
riscv-pk-dce2b7dd8ede804f54f54fafabd82b24c1a0be62.tar.bz2
Rename HART_MASK to DISABLED_HART_MASK to clarify polarity
-rw-r--r--bbl/bbl.c2
-rw-r--r--machine/mentry.S4
-rw-r--r--machine/minit.c2
-rw-r--r--machine/mtrap.c2
-rw-r--r--machine/mtrap.h2
5 files changed, 6 insertions, 6 deletions
diff --git a/bbl/bbl.c b/bbl/bbl.c
index f64b2e7..5ee95ad 100644
--- a/bbl/bbl.c
+++ b/bbl/bbl.c
@@ -23,7 +23,7 @@ static void filter_dtb(uintptr_t source)
memcpy((void*)dest, (void*)source, size);
// Remove information from the chained FDT
- filter_harts(dest, HART_MASK);
+ filter_harts(dest, DISABLED_HART_MASK);
filter_plic(dest);
filter_compat(dest, "riscv,clint0");
filter_compat(dest, "riscv,debug-013");
diff --git a/machine/mentry.S b/machine/mentry.S
index 62a850d..64fb507 100644
--- a/machine/mentry.S
+++ b/machine/mentry.S
@@ -258,7 +258,7 @@ do_reset:
add sp, sp, a2
# Boot on the first unmasked hart
- li a4, (~HART_MASK & (HART_MASK+1))
+ li a4, (~DISABLED_HART_MASK & (DISABLED_HART_MASK+1))
srl a4, a4, a3
andi a4, a4, 1
bnez a4, init_first_hart
@@ -273,7 +273,7 @@ do_reset:
wfi
# masked harts never start
- li a4, HART_MASK
+ li a4, DISABLED_HART_MASK
srl a4, a4, a3
andi a4, a4, 1
bnez a4, .LmultiHart
diff --git a/machine/minit.c b/machine/minit.c
index 94a1491..0052eb7 100644
--- a/machine/minit.c
+++ b/machine/minit.c
@@ -124,7 +124,7 @@ static void hart_plic_init()
static void wake_harts()
{
for (int hart = 0; hart < MAX_HARTS; ++hart)
- if ((((~HART_MASK & hart_mask) >> hart) & 1))
+ if ((((~DISABLED_HART_MASK & hart_mask) >> hart) & 1))
*OTHER_HLS(hart)->ipi = 1; // wakeup the hart
}
diff --git a/machine/mtrap.c b/machine/mtrap.c
index be264f3..49d652f 100644
--- a/machine/mtrap.c
+++ b/machine/mtrap.c
@@ -50,7 +50,7 @@ void printm(const char* s, ...)
static void send_ipi(uintptr_t recipient, int event)
{
- if (((HART_MASK >> recipient) & 1)) return;
+ if (((DISABLED_HART_MASK >> recipient) & 1)) return;
atomic_or(&OTHER_HLS(recipient)->mipi_pending, event);
mb();
*OTHER_HLS(recipient)->ipi = 1;
diff --git a/machine/mtrap.h b/machine/mtrap.h
index 1437b11..ead7150 100644
--- a/machine/mtrap.h
+++ b/machine/mtrap.h
@@ -10,7 +10,7 @@
#endif
// These harts will be prevented from booting beyond bbl
-#define HART_MASK 0x0UL
+#define DISABLED_HART_MASK 0x0UL
#ifndef __ASSEMBLER__