We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8958389 commit 357a9c4Copy full SHA for 357a9c4
drivers/irqchip/irq-mips-gic.c
@@ -9,6 +9,7 @@
9
10
#define pr_fmt(fmt) "irq-mips-gic: " fmt
11
12
+#include <linux/bitfield.h>
13
#include <linux/bitmap.h>
14
#include <linux/clocksource.h>
15
#include <linux/cpuhotplug.h>
@@ -735,8 +736,7 @@ static int __init gic_of_init(struct device_node *node,
735
736
mips_gic_base = ioremap(gic_base, gic_len);
737
738
gicconfig = read_gic_config();
- gic_shared_intrs = gicconfig & GIC_CONFIG_NUMINTERRUPTS;
739
- gic_shared_intrs >>= __ffs(GIC_CONFIG_NUMINTERRUPTS);
+ gic_shared_intrs = FIELD_GET(GIC_CONFIG_NUMINTERRUPTS, gicconfig);
740
gic_shared_intrs = (gic_shared_intrs + 1) * 8;
741
742
if (cpu_has_veic) {
0 commit comments