mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Heyi Guo <guoheyi@huawei.com>, Heyi Guo <heyi.guo@linaro.org>,
	Lubomir Rintel <lkundrak@v3.sk>, Pavel Machek <pavel@ucw.cz>,
	Zenghui Yu <yuzenghui@huawei.com>,
	Zheng Xiang <zhengxiang9@huawei.com>,
	Jason Cooper <jason@lakedaemon.net>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 5/5] irqchip/gic-v3-its: Fix ITT_entry_size accessor
Date: Wed,  6 Feb 2019 10:48:48 +0000	[thread overview]
Message-ID: <20190206104848.12580-6-marc.zyngier@arm.com> (raw)
In-Reply-To: <20190206104848.12580-1-marc.zyngier@arm.com>

From: Zenghui Yu <yuzenghui@huawei.com>

According to ARM IHI 0069C (ID070116), we should use GITS_TYPER's
bits [7:4] as ITT_entry_size instead of [8:4]. Although this is
pretty annoying, it only results in a potential over-allocation
of memory, and nothing bad happens.

Fixes: 3dfa576bfb45 ("irqchip/gic-v3-its: Add probing for VLPI properties")
Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
[maz: massaged subject and commit message]
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
 include/linux/irqchip/arm-gic-v3.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h
index 071b4cbdf010..c848a7cc502e 100644
--- a/include/linux/irqchip/arm-gic-v3.h
+++ b/include/linux/irqchip/arm-gic-v3.h
@@ -319,7 +319,7 @@
 #define GITS_TYPER_PLPIS		(1UL << 0)
 #define GITS_TYPER_VLPIS		(1UL << 1)
 #define GITS_TYPER_ITT_ENTRY_SIZE_SHIFT	4
-#define GITS_TYPER_ITT_ENTRY_SIZE(r)	((((r) >> GITS_TYPER_ITT_ENTRY_SIZE_SHIFT) & 0x1f) + 1)
+#define GITS_TYPER_ITT_ENTRY_SIZE(r)	((((r) >> GITS_TYPER_ITT_ENTRY_SIZE_SHIFT) & 0xf) + 1)
 #define GITS_TYPER_IDBITS_SHIFT		8
 #define GITS_TYPER_DEVBITS_SHIFT	13
 #define GITS_TYPER_DEVBITS(r)		((((r) >> GITS_TYPER_DEVBITS_SHIFT) & 0x1f) + 1)
-- 
2.20.1


  parent reply	other threads:[~2019-02-06 10:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-06 10:48 [PATCH 0/5] irqchip updates for 5.0-rc6 Marc Zyngier
2019-02-06 10:48 ` [PATCH 1/5] irqchip/gic-v4: Fix occasional VLPI drop Marc Zyngier
2019-02-06 10:48 ` [PATCH 2/5] irqchip/gic-v3-its: Plug allocation race for devices sharing a DevID Marc Zyngier
2019-02-06 10:48 ` [PATCH 3/5] irqchip/gic-v3-its: Gracefully fail on LPI exhaustion Marc Zyngier
2019-02-06 10:48 ` [PATCH 4/5] irqchip/mmp: Only touch the PJ4 IRQ & FIQ bits on enable/disable Marc Zyngier
2019-02-06 10:48 ` Marc Zyngier [this message]
2019-02-06 10:57 ` [PATCH 0/5] irqchip updates for 5.0-rc6 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=20190206104848.12580-6-marc.zyngier@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=guoheyi@huawei.com \
    --cc=heyi.guo@linaro.org \
    --cc=jason@lakedaemon.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkundrak@v3.sk \
    --cc=pavel@ucw.cz \
    --cc=tglx@linutronix.de \
    --cc=yuzenghui@huawei.com \
    --cc=zhengxiang9@huawei.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

all inboxes | Powered by JetHome®