提交 891fbf5b 编写于 作者: M Marc Zyngier 提交者: Xie XiuQi

irqchip/gic-v3-its: Split property table clearing from allocation

mainline inclusion
from 4.20-rc1
commit: 053be4854f9bcceba99cdfa0c89acc4696852c3f
category: kdump
bugzilla: 5272
CVE: NA

This 10 patches is used for secondary kernel using LPI.

[PATCH 01/10] irqchip/gic-v3-its: Change initialization ordering for LPIs
[PATCH 02/10] irqchip/gic-v3-its: Simplify LPI_PENDBASE_SZ usage
[PATCH 03/10] irqchip/gic-v3-its: Split property table clearing from allocation
[PATCH 04/10] irqchip/gic-v3-its: Move pending table allocation to init time
[PATCH 05/10] irqchip/gic-v3-its: Keep track of property table's PA and VA
[PATCH 06/10] irqchip/gic-v3-its: Allow use of pre-programmed LPI tables
[PATCH 07/10] irqchip/gic-v3-its: Use pre-programmed redistributor tables with kdump kernels
[PATCH 08/10] irqchip/gic-v3-its: Check that all RDs have the same property table
[PATCH 09/10] irqchip/gic-v3-its: Register LPI tables with EFI config table
[PATCH 10/10] irqchip/gic-v3-its: Allow use of LPI tables in reserved memory

--------------------------------------

As we're going to reuse some pre-allocated memory for the property
table, split out the zeroing of that table into a separate function
for later use.
Tested-by: NJeremy Linton <jeremy.linton@arm.com>
Tested-by: NBhupesh Sharma <bhsharma@redhat.com>
Tested-by: NLei Zhang <zhang.lei@jp.fujitsu.com>
Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
上级 2049a770
...@@ -1597,6 +1597,15 @@ static void its_lpi_free(unsigned long *bitmap, u32 base, u32 nr_ids) ...@@ -1597,6 +1597,15 @@ static void its_lpi_free(unsigned long *bitmap, u32 base, u32 nr_ids)
kfree(bitmap); kfree(bitmap);
} }
static void gic_reset_prop_table(void *va)
{
/* Priority 0xa0, Group-1, disabled */
memset(va, LPI_PROP_DEFAULT_PRIO | LPI_PROP_GROUP1, LPI_PROPBASE_SZ);
/* Make sure the GIC will observe the written configuration */
gic_flush_dcache_to_poc(va, LPI_PROPBASE_SZ);
}
static struct page *its_allocate_prop_table(gfp_t gfp_flags) static struct page *its_allocate_prop_table(gfp_t gfp_flags)
{ {
struct page *prop_page; struct page *prop_page;
...@@ -1605,13 +1614,7 @@ static struct page *its_allocate_prop_table(gfp_t gfp_flags) ...@@ -1605,13 +1614,7 @@ static struct page *its_allocate_prop_table(gfp_t gfp_flags)
if (!prop_page) if (!prop_page)
return NULL; return NULL;
/* Priority 0xa0, Group-1, disabled */ gic_reset_prop_table(page_address(prop_page));
memset(page_address(prop_page),
LPI_PROP_DEFAULT_PRIO | LPI_PROP_GROUP1,
LPI_PROPBASE_SZ);
/* Make sure the GIC will observe the written configuration */
gic_flush_dcache_to_poc(page_address(prop_page), LPI_PROPBASE_SZ);
return prop_page; return prop_page;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册