linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Tatashin <pasha.tatashin@soleen.com>
To: pasha.tatashin@soleen.com, jmorris@namei.org, sashal@kernel.org,
	kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, marc.zyngier@arm.com,
	james.morse@arm.com, vladimir.murzin@arm.com,
	mark.rutland@arm.com
Subject: [PATCH v1 3/6] rqchip/gic-v3-its: add reset pending table function
Date: Mon, 26 Aug 2019 15:00:53 -0400	[thread overview]
Message-ID: <20190826190056.27854-4-pasha.tatashin@soleen.com> (raw)
In-Reply-To: <20190826190056.27854-1-pasha.tatashin@soleen.com>

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


  parent reply	other threads:[~2019-08-26 19:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-26 19:00 [PATCH v1 0/6] Allow kexec reboot for GICv3 and device tree Pavel Tatashin
2019-08-26 19:00 ` [PATCH v1 1/6] rqchip/gic-v3-its: reset prop table outside of allocation Pavel Tatashin
2019-08-26 19:00 ` [PATCH v1 2/6] rqchip/gic-v3-its: use temporary va / pa variables Pavel Tatashin
2019-08-26 19:00 ` Pavel Tatashin [this message]
2019-08-26 19:00 ` [PATCH v1 4/6] rqchip/gic-v3-its: move reset pending table outside of allocator Pavel Tatashin
2019-08-26 19:00 ` [PATCH v1 5/6] " Pavel Tatashin
2019-08-26 21:29   ` Pavel Tatashin
2019-08-26 19:00 ` [PATCH v1 6/6] dt-bindings: interrupt-controller: add optional memory-region Pavel Tatashin
2019-08-26 19:13 ` [PATCH v1 0/6] Allow kexec reboot for GICv3 and device tree Marc Zyngier
2019-08-26 21:25   ` Pavel Tatashin
2019-08-27  8:15     ` Marc Zyngier
2019-08-27  8:53       ` Pavel Tatashin
2019-08-27  9:24         ` Marc Zyngier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190826190056.27854-4-pasha.tatashin@soleen.com \
    --to=pasha.tatashin@soleen.com \
    --cc=james.morse@arm.com \
    --cc=jmorris@namei.org \
    --cc=kexec@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=sashal@kernel.org \
    --cc=vladimir.murzin@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).