From: t.figa@samsung.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] irqchip: gic: Fix core ID calculation when topology is read from DT
Date: Thu, 17 Jul 2014 17:40:50 +0200 [thread overview]
Message-ID: <53C7EE82.6040803@samsung.com> (raw)
In-Reply-To: <20140717153236.GS13108@titan.lakedaemon.net>
Hi Jason,
On 17.07.2014 17:32, Jason Cooper wrote:
> On Thu, Jul 17, 2014 at 05:23:44PM +0200, Tomasz Figa wrote:
>> Certain GIC implementation, namely those found on earlier, single
>> cluster, Exynos SoCs, have registers mapped without per-CPU banking,
>> which means that the driver needs to use different offset for each CPU.
>>
>> Currently the driver calculates the offset by multiplying value returned
>> by cpu_logical_map() by CPU offset parsed from DT. This is correct when
>> CPU topology is not specified in DT and aforementioned function returns
>> core ID alone. However when DT contains CPU topology, the function
>> changes to return cluster ID as well, which is non-zero on mentioned
>> SoCs and so breaks the calculation in GIC driver.
>>
>> This patch fixes this by masking out cluster ID in CPU offset
>> calculation so that only core ID is considered. Multi-cluster Exynos
>> SoCs already have banked GIC implementations, so this simple fix should
>> be enough.
>>
>> Reported-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
>> Reported-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
>> Signed-off-by: Tomasz Figa <t.figa@samsung.com>
>> ---
>> drivers/irqchip/irq-gic.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> iiuc, this was introduced by:
>
> db0d4db22a78d ARM: gic: allow GIC to support non-banked setups
>
> and so should be for v3.3 and up, correct?
Could be, although there was and still is no topology data specified in
DT for affected Exynos SoCs. The need for it showed up just recently, so
I'm not sure this is a regression to fix in older kernels.
Best regards,
Tomasz
next prev parent reply other threads:[~2014-07-17 15:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-17 15:23 [PATCH] irqchip: gic: Fix core ID calculation when topology is read from DT Tomasz Figa
2014-07-17 15:32 ` Jason Cooper
2014-07-17 15:40 ` Tomasz Figa [this message]
2014-07-17 15:51 ` Jason Cooper
2014-07-17 15:58 ` Tomasz Figa
2014-07-18 13:17 ` Jason Cooper
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=53C7EE82.6040803@samsung.com \
--to=t.figa@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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