RISC-V: Assign hwcap as per comman capabilities.
authorAtish Patra <atish.patra@wdc.com>
Fri, 22 Feb 2019 19:41:40 +0000 (11:41 -0800)
committerPalmer Dabbelt <palmer@sifive.com>
Mon, 4 Mar 2019 18:40:39 +0000 (10:40 -0800)
commitfbdc6193dc706c863b70accf2006fa00331a7c3f
tree78ab70504bf3c09fd306bbf819010faf086e9efa
parent291debb38dbbce9d5e7c342c5d6dc616f1d9777e
RISC-V: Assign hwcap as per comman capabilities.

Currently, we set hwcap based on first valid hart from DT. This may not
be correct always as that hart might not be current booting cpu or may
have a different capability.

Set hwcap as the capabilities supported by all possible harts with "okay"
status.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
arch/riscv/kernel/cpufeature.c