lkml.org 
[lkml]   [2019]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v1 3/6] rqchip/gic-v3-its: add reset pending table function
Date
Add function that is similar to gic_reset_prop_table but for pending
table.

Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
---
drivers/irqchip/irq-gic-v3-its.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 656b6c6e1bf8..124e2cb890cd 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -1989,17 +1989,23 @@ static int its_alloc_collections(struct its_node *its)
return 0;
}

+static void gic_reset_pending_table(void *va)
+{
+ memset(va, 0, LPI_PENDBASE_SZ);
+
+ /* Make sure the GIC will observe the zero-ed page */
+ gic_flush_dcache_to_poc(va, LPI_PENDBASE_SZ);
+}
+
static struct page *its_allocate_pending_table(gfp_t gfp_flags)
{
struct page *pend_page;

- pend_page = alloc_pages(gfp_flags | __GFP_ZERO,
- get_order(LPI_PENDBASE_SZ));
+ pend_page = alloc_pages(gfp_flags, get_order(LPI_PENDBASE_SZ));
if (!pend_page)
return NULL;

- /* Make sure the GIC will observe the zero-ed page */
- gic_flush_dcache_to_poc(page_address(pend_page), LPI_PENDBASE_SZ);
+ gic_reset_pending_table(page_address(pend_page));

return pend_page;
}
--
2.23.0
\
 
 \ /
  Last update: 2019-08-26 21:02    [W:0.059 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site