aboutsummaryrefslogtreecommitdiff
path: root/drivers/pps
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2017-08-12 21:36:44 -0700
committerRalf Baechle <ralf@linux-mips.org>2017-09-04 13:53:15 +0200
commitb2b2e584ceabeddbc5ea1965ca6ca435726f5de0 (patch)
treeaf01dc52cc6a699ff28ac1702bf2f3210db630bd /drivers/pps
parent7778c4b27cbe0e24dc016477ec60d63b272f7ea2 (diff)
irqchip: mips-gic: Clean up mti, reserved-cpu-vectors handling
When parsing mti,reserved-cpu-vectors we generate a mask of all bits that have been declared reserved, the loop through starting from bit 2 to find one that isn't reserved (ie. is zero). This patch accomplishes the same task more simply by: - Inititialising the reserved mask to 0x3 (ie. the 2 software interrupts). This means we don't need to skip them later as the loop previously has. - Replacing the loop checking for zero bits with find_first_zero_bit, which fits our needs now that the 2 software interrupts are marked reserved. This requires that the type of reserved is changed to unsigned long so that it's suitable for use with bitmap functions. - Replacing the magic number 8 with the hamming weight of the ST0_IM field - ie. the number of bits that a MIPS CPU has for interrupt inputs. This is still a compile-time constant 8, but makes it clearer why it's 8. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17054/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'drivers/pps')
0 files changed, 0 insertions, 0 deletions