mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-31 16:38:12 +00:00
GIC fixes for 4.5-rc5:
- EOI handling for LPIs when GICv3 is in EOImode==1 - Another fallout from changing page size while allocating ITS tables - Missing memory barrier in the 32bit GICv3 code -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJWxwu+AAoJECPQ0LrRPXpDZlYQAIWjYooeJmzcABPf0E41Zfte iHqakdLBpAnStLmvr4Fy566fgqfduiDM+NnJCd+kROEhGjr3I3GYHmhzc/ZIBSG4 JBG/wv2aAlCqRndlScA3QFN8yaGGO9E4oECV5s67rMjAPeLCVz2Hy0BXFecgR4Ql mIf/cTkorb+aCKidEt7WunVEvTI7L5OrtGuMGlHFSJZ10+lh0ZDFnJwzjr+Eo8fD DdURQc/AEE5OS1WtMj5M8tZZw2l3+GuFOyfXFawr8Vbk0lD6m0KqnSTWdoICulAf CCxjW4/DMbmmcHRxzXTVW7Ah0svJrdvZlc1zqUu3k/5ckR3E1uZK5zdGruuVXE8W o1tr7x2gZplRZW4Gph2/8pJz8Y6l6mYcKYXuD+QVMrPONdUo/tGmd00Nd8JCB4E1 Uvb1bX9DJZ853/GvJ2CrnlB8rXZvoHwTEsxTawiCnhi1DF1qasFHCIoucSvKKoUf xzxLeTeEaxTZUjYlHdDHp1Ku2hHBw2B1zyp4OWF1exeKQ1ZJ7kvja6s5t/el8e6e e/zeMHKQeECppRim+CnUgOXxfamg7+UxspPBqz8WGkqEFNVaNi6k4VXGhiqaCJKH 3hC6wXiWsFRCSxfAmwJIHr6XwrH57IJY7FT8oMXDgIGbHo4TVtaPJjB87ivwZK57 UZXTxeXfgn45NKzQ1dbW =ZtCQ -----END PGP SIGNATURE----- Merge tag 'gic-fixes-4.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull GIC fixes for 4.5-rc5 from Marc Zyngier: - EOI handling for LPIs when GICv3 is in EOImode==1 - Another fallout from changing page size while allocating ITS tables - Missing memory barrier in the 32bit GICv3 code
This commit is contained in:
commit
253baffdce
2 changed files with 8 additions and 11 deletions
|
@ -117,6 +117,7 @@ static inline u32 gic_read_iar(void)
|
||||||
u32 irqstat;
|
u32 irqstat;
|
||||||
|
|
||||||
asm volatile("mrc " __stringify(ICC_IAR1) : "=r" (irqstat));
|
asm volatile("mrc " __stringify(ICC_IAR1) : "=r" (irqstat));
|
||||||
|
dsb(sy);
|
||||||
return irqstat;
|
return irqstat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,9 @@ struct its_node {
|
||||||
|
|
||||||
#define ITS_ITT_ALIGN SZ_256
|
#define ITS_ITT_ALIGN SZ_256
|
||||||
|
|
||||||
|
/* Convert page order to size in bytes */
|
||||||
|
#define PAGE_ORDER_TO_SIZE(o) (PAGE_SIZE << (o))
|
||||||
|
|
||||||
struct event_lpi_map {
|
struct event_lpi_map {
|
||||||
unsigned long *lpi_map;
|
unsigned long *lpi_map;
|
||||||
u16 *col_map;
|
u16 *col_map;
|
||||||
|
@ -600,11 +603,6 @@ static void its_unmask_irq(struct irq_data *d)
|
||||||
lpi_set_config(d, true);
|
lpi_set_config(d, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void its_eoi_irq(struct irq_data *d)
|
|
||||||
{
|
|
||||||
gic_write_eoir(d->hwirq);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int its_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
|
static int its_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
|
||||||
bool force)
|
bool force)
|
||||||
{
|
{
|
||||||
|
@ -641,7 +639,7 @@ static struct irq_chip its_irq_chip = {
|
||||||
.name = "ITS",
|
.name = "ITS",
|
||||||
.irq_mask = its_mask_irq,
|
.irq_mask = its_mask_irq,
|
||||||
.irq_unmask = its_unmask_irq,
|
.irq_unmask = its_unmask_irq,
|
||||||
.irq_eoi = its_eoi_irq,
|
.irq_eoi = irq_chip_eoi_parent,
|
||||||
.irq_set_affinity = its_set_affinity,
|
.irq_set_affinity = its_set_affinity,
|
||||||
.irq_compose_msi_msg = its_irq_compose_msi_msg,
|
.irq_compose_msi_msg = its_irq_compose_msi_msg,
|
||||||
};
|
};
|
||||||
|
@ -846,7 +844,6 @@ static int its_alloc_tables(const char *node_name, struct its_node *its)
|
||||||
u64 type = GITS_BASER_TYPE(val);
|
u64 type = GITS_BASER_TYPE(val);
|
||||||
u64 entry_size = GITS_BASER_ENTRY_SIZE(val);
|
u64 entry_size = GITS_BASER_ENTRY_SIZE(val);
|
||||||
int order = get_order(psz);
|
int order = get_order(psz);
|
||||||
int alloc_size;
|
|
||||||
int alloc_pages;
|
int alloc_pages;
|
||||||
u64 tmp;
|
u64 tmp;
|
||||||
void *base;
|
void *base;
|
||||||
|
@ -878,9 +875,8 @@ static int its_alloc_tables(const char *node_name, struct its_node *its)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
alloc_size = (1 << order) * PAGE_SIZE;
|
|
||||||
retry_alloc_baser:
|
retry_alloc_baser:
|
||||||
alloc_pages = (alloc_size / psz);
|
alloc_pages = (PAGE_ORDER_TO_SIZE(order) / psz);
|
||||||
if (alloc_pages > GITS_BASER_PAGES_MAX) {
|
if (alloc_pages > GITS_BASER_PAGES_MAX) {
|
||||||
alloc_pages = GITS_BASER_PAGES_MAX;
|
alloc_pages = GITS_BASER_PAGES_MAX;
|
||||||
order = get_order(GITS_BASER_PAGES_MAX * psz);
|
order = get_order(GITS_BASER_PAGES_MAX * psz);
|
||||||
|
@ -933,7 +929,7 @@ static int its_alloc_tables(const char *node_name, struct its_node *its)
|
||||||
shr = tmp & GITS_BASER_SHAREABILITY_MASK;
|
shr = tmp & GITS_BASER_SHAREABILITY_MASK;
|
||||||
if (!shr) {
|
if (!shr) {
|
||||||
cache = GITS_BASER_nC;
|
cache = GITS_BASER_nC;
|
||||||
__flush_dcache_area(base, alloc_size);
|
__flush_dcache_area(base, PAGE_ORDER_TO_SIZE(order));
|
||||||
}
|
}
|
||||||
goto retry_baser;
|
goto retry_baser;
|
||||||
}
|
}
|
||||||
|
@ -966,7 +962,7 @@ static int its_alloc_tables(const char *node_name, struct its_node *its)
|
||||||
}
|
}
|
||||||
|
|
||||||
pr_info("ITS: allocated %d %s @%lx (psz %dK, shr %d)\n",
|
pr_info("ITS: allocated %d %s @%lx (psz %dK, shr %d)\n",
|
||||||
(int)(alloc_size / entry_size),
|
(int)(PAGE_ORDER_TO_SIZE(order) / entry_size),
|
||||||
its_base_type_string[type],
|
its_base_type_string[type],
|
||||||
(unsigned long)virt_to_phys(base),
|
(unsigned long)virt_to_phys(base),
|
||||||
psz / SZ_1K, (int)shr >> GITS_BASER_SHAREABILITY_SHIFT);
|
psz / SZ_1K, (int)shr >> GITS_BASER_SHAREABILITY_SHIFT);
|
||||||
|
|
Loading…
Reference in a new issue