Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752303AbdDMVfa (ORCPT ); Thu, 13 Apr 2017 17:35:30 -0400 Received: from mail-io0-f179.google.com ([209.85.223.179]:36195 "EHLO mail-io0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751276AbdDMVf1 (ORCPT ); Thu, 13 Apr 2017 17:35:27 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170413133242.5068-1-andrew.smirnov@gmail.com> <20170413133242.5068-5-andrew.smirnov@gmail.com> From: Tyler Baker Date: Thu, 13 Apr 2017 14:35:25 -0700 Message-ID: Subject: Re: [PATCH 4/8] ARM: dts: imx7s: Add node for GPC To: Fabio Estevam Cc: Andrey Smirnov , Mark Rutland , "devicetree@vger.kernel.org" , Russell King , "linux-kernel@vger.kernel.org" , Rob Herring , Sascha Hauer , Fabio Estevam , Shawn Guo , linux-arm-kernel , yurovsky@gmail.com Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2250 Lines: 73 On 13 April 2017 at 13:49, Fabio Estevam wrote: > On Thu, Apr 13, 2017 at 5:13 PM, Tyler Baker wrote: > >> I've rebased this series on the next-20170413 for sanity sake, and >> realized there doesn't appear to be a way to select CONFIG_IMX_GPCV2. >> I forced it using 'default y' and configured with imx_v6_v7_defconfig. >> Now my board is booting. Before this series is applied, it may be good >> to have CONFIG_IMX_GPCV2 selected specifically for iMX7 platform, >> otherwise there will be boot regressions. > > Something like this? > > diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig > index f03ef43..fe99a48 100644 > --- a/drivers/irqchip/Kconfig > +++ b/drivers/irqchip/Kconfig > @@ -253,6 +253,7 @@ config RENESAS_H8S_INTC > > config IMX_GPCV2 > bool > + def_bool y if SOC_IMX7D > select IRQ_DOMAIN > help > Enables the wakeup IRQs for IMX platforms with GPCv2 block Exactly. LGTM. >> I'd encounter a backtrace with next-20170413 + imx_v6_v7_defconfig + >> CONFIG_IMX_GPCV2=y >> >> Backtrace: >> [] (dump_backtrace) from [] (show_stack+0x18/0x1c) > > but prior to fixing the Kconfig we need to fix this backtrace you reported. I dug into this a bit, and lockdep is unhappy about spin locks not being initialized before use. The following patch fixes the backtrace on my board. I'll submit this patch in a moment. From: Tyler Baker Date: Thu, 13 Apr 2017 14:29:49 -0700 Subject: [PATCH] irqchip/irq-imx-gpcv2: fix spinlock initialization Call raw_spin_lock_init() before the spinlocks are used to prevent a lockdep splat. Signed-off-by: Tyler Baker --- drivers/irqchip/irq-imx-gpcv2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/irqchip/irq-imx-gpcv2.c b/drivers/irqchip/irq-imx-gpcv2.c index e13236f..9463f35 100644 --- a/drivers/irqchip/irq-imx-gpcv2.c +++ b/drivers/irqchip/irq-imx-gpcv2.c @@ -230,6 +230,8 @@ static int __init imx_gpcv2_irqchip_init(struct device_node *node, return -ENOMEM; } + raw_spin_lock_init(&cd->rlock); + cd->gpc_base = of_iomap(node, 0); if (!cd->gpc_base) { pr_err("fsl-gpcv2: unable to map gpc registers\n"); -- 2.9.3 Cheers, Tyler