From: Minghuan Lian <Minghuan.Lian@freescale.com> To: <linux-pci@vger.kernel.org> Cc: <linux-arm-kernel@lists.infradead.org>, Zang Roy-R61911 <r61911@freescale.com>, Hu Mingkai-B21284 <B21284@freescale.com>, Scott Wood <scottwood@freescale.com>, Yoder Stuart-B08248 <stuart.yoder@freescale.com>, Arnd Bergmann <arnd@arndb.de>, Bjorn Helgaas <bhelgaas@google.com>, "Minghuan Lian" <Minghuan.Lian@freescale.com> Subject: [PATCH] irqchip/gicv3-its: Decrease page size when needed Date: Wed, 15 Apr 2015 17:49:22 +0800 [thread overview] Message-ID: <1429091364-31939-1-git-send-email-Minghuan.Lian@freescale.com> (raw) The default page size of ITS table has been changed to 64KB, but for some platforms the real size of allocate memory which calculated by DEVBITS of register GITS_TYPER may smaller than default size. In this case, psz must be decreased, otherwise, the wrong page number will cause kernel hang. Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com> --- drivers/irqchip/irq-gic-v3-its.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 596b0a9..d0374a6 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -844,6 +844,9 @@ static int its_alloc_tables(struct its_node *its) its->tables[i] = base; + while (alloc_size < psz) + psz = psz >> 1; + retry_baser: val = (virt_to_phys(base) | (type << GITS_BASER_TYPE_SHIFT) | -- 1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: Minghuan.Lian@freescale.com (Minghuan Lian) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] irqchip/gicv3-its: Decrease page size when needed Date: Wed, 15 Apr 2015 17:49:22 +0800 [thread overview] Message-ID: <1429091364-31939-1-git-send-email-Minghuan.Lian@freescale.com> (raw) The default page size of ITS table has been changed to 64KB, but for some platforms the real size of allocate memory which calculated by DEVBITS of register GITS_TYPER may smaller than default size. In this case, psz must be decreased, otherwise, the wrong page number will cause kernel hang. Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com> --- drivers/irqchip/irq-gic-v3-its.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 596b0a9..d0374a6 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -844,6 +844,9 @@ static int its_alloc_tables(struct its_node *its) its->tables[i] = base; + while (alloc_size < psz) + psz = psz >> 1; + retry_baser: val = (virt_to_phys(base) | (type << GITS_BASER_TYPE_SHIFT) | -- 1.9.1
next reply other threads:[~2015-04-15 9:47 UTC|newest] Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-04-15 9:49 Minghuan Lian [this message] 2015-04-15 9:49 ` [PATCH] irqchip/gicv3-its: Decrease page size when needed Minghuan Lian 2015-04-15 9:49 ` [PATCH 1/2] irqchip/gicv3-its: Support share device ID Minghuan Lian 2015-04-15 9:49 ` Minghuan Lian 2015-04-15 11:08 ` Varun Sethi 2015-04-15 11:08 ` Varun Sethi 2015-04-15 11:38 ` Minghuan.Lian 2015-04-15 11:38 ` Minghuan.Lian at freescale.com 2015-04-15 13:18 ` Varun Sethi 2015-04-15 13:18 ` Varun Sethi 2015-04-16 10:40 ` Will Deacon 2015-04-16 10:40 ` Will Deacon 2015-04-17 14:19 ` Stuart Yoder 2015-04-17 14:19 ` Stuart Yoder 2015-04-17 17:57 ` Varun Sethi 2015-04-17 17:57 ` Varun Sethi 2015-04-22 17:07 ` Will Deacon 2015-04-22 17:07 ` Will Deacon 2015-04-22 18:40 ` Varun Sethi 2015-04-22 18:40 ` Varun Sethi 2015-04-22 19:41 ` Stuart Yoder 2015-04-22 19:41 ` Stuart Yoder 2015-04-24 16:18 ` Will Deacon 2015-04-24 16:18 ` Will Deacon 2015-04-24 16:44 ` Marc Zyngier 2015-04-24 16:44 ` Marc Zyngier 2015-04-24 18:18 ` Stuart Yoder 2015-04-24 18:18 ` Stuart Yoder 2015-04-25 10:39 ` Marc Zyngier 2015-04-25 10:39 ` Marc Zyngier 2015-04-26 18:20 ` Varun Sethi 2015-04-26 18:20 ` Varun Sethi 2015-04-27 7:58 ` Marc Zyngier 2015-04-27 7:58 ` Marc Zyngier 2015-04-27 13:08 ` Varun Sethi 2015-04-27 13:08 ` Varun Sethi 2015-04-27 17:04 ` Will Deacon 2015-04-27 17:04 ` Will Deacon 2015-05-01 15:23 ` Stuart Yoder 2015-05-01 15:23 ` Stuart Yoder 2015-05-01 15:26 ` Will Deacon 2015-05-01 15:26 ` Will Deacon 2015-04-27 17:17 ` Marc Zyngier 2015-04-27 17:17 ` Marc Zyngier 2015-04-24 19:24 ` Stuart Yoder 2015-04-24 19:24 ` Stuart Yoder 2015-04-24 18:09 ` Stuart Yoder 2015-04-24 18:09 ` Stuart Yoder 2015-04-26 18:26 ` Varun Sethi 2015-04-26 18:26 ` Varun Sethi 2015-04-15 16:36 ` Marc Zyngier 2015-04-15 16:36 ` Marc Zyngier 2015-04-16 2:57 ` Minghuan.Lian 2015-04-16 2:57 ` Minghuan.Lian at freescale.com 2015-04-16 10:04 ` Marc Zyngier 2015-04-16 10:04 ` Marc Zyngier 2015-04-16 10:57 ` Minghuan.Lian 2015-04-16 10:57 ` Minghuan.Lian at freescale.com 2015-04-16 11:50 ` Marc Zyngier 2015-04-16 11:50 ` Marc Zyngier 2015-04-16 18:38 ` Varun Sethi 2015-04-16 18:38 ` Varun Sethi 2015-04-17 2:34 ` Minghuan.Lian 2015-04-17 2:34 ` Minghuan.Lian at freescale.com 2015-04-15 9:49 ` [PATCH 2/2] pci/layerscape: Add LS2085A MSI support Minghuan Lian 2015-04-15 9:49 ` Minghuan Lian 2015-04-15 11:51 ` [PATCH] irqchip/gicv3-its: Decrease page size when needed Jason Cooper 2015-04-15 11:51 ` Jason Cooper 2015-04-15 14:17 ` Marc Zyngier 2015-04-15 14:17 ` Marc Zyngier 2015-04-16 1:15 ` Minghuan.Lian 2015-04-16 1:15 ` Minghuan.Lian at freescale.com 2015-04-15 16:31 ` Marc Zyngier 2015-04-15 16:31 ` 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=1429091364-31939-1-git-send-email-Minghuan.Lian@freescale.com \ --to=minghuan.lian@freescale.com \ --cc=B21284@freescale.com \ --cc=arnd@arndb.de \ --cc=bhelgaas@google.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-pci@vger.kernel.org \ --cc=r61911@freescale.com \ --cc=scottwood@freescale.com \ --cc=stuart.yoder@freescale.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.