+1
arch/arm/include/asm/arch_gicv3.h
+1
arch/arm/include/asm/arch_gicv3.h
+7
-11
drivers/irqchip/irq-gic-v3-its.c
+7
-11
drivers/irqchip/irq-gic-v3-its.c
···
78
78
79
79
#define ITS_ITT_ALIGN SZ_256
80
80
81
+
/* Convert page order to size in bytes */
82
+
#define PAGE_ORDER_TO_SIZE(o) (PAGE_SIZE << (o))
83
+
81
84
struct event_lpi_map {
82
85
unsigned long *lpi_map;
83
86
u16 *col_map;
···
603
600
lpi_set_config(d, true);
604
601
}
605
602
606
-
static void its_eoi_irq(struct irq_data *d)
607
-
{
608
-
gic_write_eoir(d->hwirq);
609
-
}
610
-
611
603
static int its_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
612
604
bool force)
613
605
{
···
639
641
.name = "ITS",
640
642
.irq_mask = its_mask_irq,
641
643
.irq_unmask = its_unmask_irq,
642
-
.irq_eoi = its_eoi_irq,
644
+
.irq_eoi = irq_chip_eoi_parent,
643
645
.irq_set_affinity = its_set_affinity,
644
646
.irq_compose_msi_msg = its_irq_compose_msi_msg,
645
647
};
···
844
846
u64 type = GITS_BASER_TYPE(val);
845
847
u64 entry_size = GITS_BASER_ENTRY_SIZE(val);
846
848
int order = get_order(psz);
847
-
int alloc_size;
848
849
int alloc_pages;
849
850
u64 tmp;
850
851
void *base;
···
875
878
}
876
879
}
877
880
878
-
alloc_size = (1 << order) * PAGE_SIZE;
879
881
retry_alloc_baser:
880
-
alloc_pages = (alloc_size / psz);
882
+
alloc_pages = (PAGE_ORDER_TO_SIZE(order) / psz);
881
883
if (alloc_pages > GITS_BASER_PAGES_MAX) {
882
884
alloc_pages = GITS_BASER_PAGES_MAX;
883
885
order = get_order(GITS_BASER_PAGES_MAX * psz);
···
929
933
shr = tmp & GITS_BASER_SHAREABILITY_MASK;
930
934
if (!shr) {
931
935
cache = GITS_BASER_nC;
932
-
__flush_dcache_area(base, alloc_size);
936
+
__flush_dcache_area(base, PAGE_ORDER_TO_SIZE(order));
933
937
}
934
938
goto retry_baser;
935
939
}
···
962
966
}
963
967
964
968
pr_info("ITS: allocated %d %s @%lx (psz %dK, shr %d)\n",
965
-
(int)(alloc_size / entry_size),
969
+
(int)(PAGE_ORDER_TO_SIZE(order) / entry_size),
966
970
its_base_type_string[type],
967
971
(unsigned long)virt_to_phys(base),
968
972
psz / SZ_1K, (int)shr >> GITS_BASER_SHAREABILITY_SHIFT);