Skip to content

Commit

Permalink
RISC-V: Rename im_okay_therefore_i_am to found_boot_cpu
Browse files Browse the repository at this point in the history
The old name was a bit odd.

Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
  • Loading branch information
palmer-dabbelt committed Oct 23, 2018
1 parent b2f8cfa commit 177fae4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions arch/riscv/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,22 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
void __init setup_smp(void)
{
struct device_node *dn = NULL;
int hart, im_okay_therefore_i_am = 0;
int hart;
bool found_boot_cpu = false;

while ((dn = of_find_node_by_type(dn, "cpu"))) {
hart = riscv_of_processor_hartid(dn);
if (hart >= 0) {
set_cpu_possible(hart, true);
set_cpu_present(hart, true);
if (hart == smp_processor_id()) {
BUG_ON(im_okay_therefore_i_am);
im_okay_therefore_i_am = 1;
BUG_ON(found_boot_cpu);
found_boot_cpu = true;
}
}
}

BUG_ON(!im_okay_therefore_i_am);
BUG_ON(!found_boot_cpu);
}

int __cpu_up(unsigned int cpu, struct task_struct *tidle)
Expand Down

0 comments on commit 177fae4

Please sign in to comment.