Commit 8c362e7d authored by Samuel Holland's avatar Samuel Holland Committed by Anup Patel
Browse files

lib: irqchip/plic: Factor out a context init function



This simplifies both the callers and the callees by removing duplicated
code and consolidating the error handling. It also fixes two bugs in the
process:
  1) ie_words was one too large when plic->num_src was a multiple of 32.
  2) plic_set_ie takes a 32-bit mask, not a Boolean value, so the FPGA
     platforms previously only enabled one out of every 32 interrupts.

Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
parent 2ea7799d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment