riscv: clear all pending interrupts when booting

Just in case an old interrupt is pending make sure we clear everything
asserted before this kernel started.  Based on similar M-mode code in
opensbi.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Nick Kossifidis <mick@ics.forth.gr>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
This commit is contained in:
Christoph Hellwig 2019-04-15 11:14:36 +02:00 • committed by Palmer Dabbelt
commit df16c40cbf
No known key found for this signature in database
GPG key ID: EF4CA1502CCBAB41