Skip to content

Commit 278bfc7

Browse files
ktrzcinxjajanusz
authored andcommitted
platform: intel: cpu: Fix slave cores objects allocation
This was missed changes after commit "fedec980: cpu: Export mask with enabled cores". Without it, edited condition is always false. Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
1 parent 97377c3 commit 278bfc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/arch/xtensa/lib/cpu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ int arch_cpu_enable_core(int id)
9292

9393
#if CONFIG_NO_SLAVE_CORE_ROM
9494
/* unpack dynamic vectors if it is the first slave core */
95-
if (active_cores_mask == 0) {
95+
if (active_cores_mask == BIT(PLATFORM_MASTER_CORE_ID)) {
9696
alloc_shared_slave_cores_objects();
9797
unpack_dynamic_vectors();
9898
}
@@ -121,7 +121,7 @@ void arch_cpu_disable_core(int id)
121121
active_cores_mask ^= (1 << id);
122122
#if CONFIG_NO_SLAVE_CORE_ROM
123123
/* free shared dynamic vectors it was the last slave core */
124-
if (active_cores_mask == 0) {
124+
if (active_cores_mask == BIT(PLATFORM_MASTER_CORE_ID)) {
125125
rfree(shared_vecbase_ptr);
126126
shared_vecbase_ptr = NULL;
127127
}

0 commit comments

Comments
 (0)