From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Cooper Subject: Re: [PATCH] irqchip: gic: Fix core ID calculation when topology is read from DT Date: Fri, 18 Jul 2014 09:17:04 -0400 Message-ID: <20140718131704.GG24496@titan.lakedaemon.net> References: <1405610624-18722-1-git-send-email-t.figa@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1405610624-18722-1-git-send-email-t.figa@samsung.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Tomasz Figa Cc: Kukjin Kim , Bartlomiej Zolnierkiewicz , linux-kernel@vger.kernel.org, Tomasz Figa , linux-samsung-soc@vger.kernel.org, Lorenzo Pieralisi , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Marek Szyprowski List-Id: linux-samsung-soc@vger.kernel.org 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 > Reported-by: Bartlomiej Zolnierkiewicz > Signed-off-by: Tomasz Figa > --- > drivers/irqchip/irq-gic.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c > index ddee133..5c15a09 100644 > --- a/drivers/irqchip/irq-gic.c > +++ b/drivers/irqchip/irq-gic.c > @@ -40,6 +40,7 @@ > #include > #include Applied to irqchip/urgent and Cc'd to stable for v3.3+ thx, Jason.