From 5186322bc7c89596a437a11d8e57ac647f55b271 Mon Sep 17 00:00:00 2001 From: Marc Zyngier Date: Tue, 26 Jun 2018 11:21:11 +0100 Subject: [PATCH] irqchip/gic-v3-its: Use pre-programmed redistributor tables with kdump kernels mainline inclusion from 4.20-rc1 commit: c6e2ccb66d0c3b4fffc59932585e9f709ad59003 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 -------------------------------------- If using a kdump kernel, and that we cannot disable LPIs to install our own tables, let's switch to using the already allocated tables. This means that we'll change some of the initial kernel's memory, but at least we'll be able to have LPIs in this secondary kernel. Tested-by: Jeremy Linton Tested-by: Bhupesh Sharma Tested-by: Lei Zhang Signed-off-by: Marc Zyngier Signed-off-by: Yang Yingliang Reviewed-by: Hanjun Guo --- drivers/irqchip/irq-gic-v3-its.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 6a9066411cbc..83d5573f56e9 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -1963,8 +1964,15 @@ static void its_free_pending_table(struct page *pt) free_pages((unsigned long)page_address(pt), get_order(LPI_PENDBASE_SZ)); } +/* + * Booting with kdump and LPIs enabled is generally fine. + */ static bool enabled_lpis_allowed(void) { + /* Allow a kdump kernel */ + if (is_kdump_kernel()) + return true; + return false; } -- GitLab