All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tyler Baker <tyler.baker@linaro.org>
To: Fabio Estevam <festevam@gmail.com>
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>,
	Mark Rutland <mark.rutland@arm.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Sascha Hauer <kernel@pengutronix.de>,
	Fabio Estevam <fabio.estevam@nxp.com>,
	Shawn Guo <shawnguo@kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	yurovsky@gmail.com
Subject: Re: [PATCH 4/8] ARM: dts: imx7s: Add node for GPC
Date: Thu, 13 Apr 2017 14:35:25 -0700	[thread overview]
Message-ID: <CANMBJr4mci5LyuBNT50dupxSVz+t-5mhWv8a7LBvY4MgupomVQ@mail.gmail.com> (raw)
In-Reply-To: <CAOMZO5BjzSJws7zjJ5+aZkfeF+15twEu9zS3V+g6wQrtUiNyqQ@mail.gmail.com>

On 13 April 2017 at 13:49, Fabio Estevam <festevam@gmail.com> wrote:
> On Thu, Apr 13, 2017 at 5:13 PM, Tyler Baker <tyler.baker@linaro.org> 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:
>> [<c010c364>] (dump_backtrace) from [<c010c610>] (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 <tyler.baker@linaro.org>
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 <tyler.baker@linaro.org>
---
 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

WARNING: multiple messages have this Message-ID (diff)
From: Tyler Baker <tyler.baker-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Fabio Estevam <festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Andrey Smirnov
	<andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Russell King <linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Sascha Hauer <kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	Fabio Estevam <fabio.estevam-3arQi8VN3Tc@public.gmane.org>,
	Shawn Guo <shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-arm-kernel
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	yurovsky-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Subject: Re: [PATCH 4/8] ARM: dts: imx7s: Add node for GPC
Date: Thu, 13 Apr 2017 14:35:25 -0700	[thread overview]
Message-ID: <CANMBJr4mci5LyuBNT50dupxSVz+t-5mhWv8a7LBvY4MgupomVQ@mail.gmail.com> (raw)
In-Reply-To: <CAOMZO5BjzSJws7zjJ5+aZkfeF+15twEu9zS3V+g6wQrtUiNyqQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 13 April 2017 at 13:49, Fabio Estevam <festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On Thu, Apr 13, 2017 at 5:13 PM, Tyler Baker <tyler.baker-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 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:
>> [<c010c364>] (dump_backtrace) from [<c010c610>] (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 <tyler.baker-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
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 <tyler.baker-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
 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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: tyler.baker@linaro.org (Tyler Baker)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/8] ARM: dts: imx7s: Add node for GPC
Date: Thu, 13 Apr 2017 14:35:25 -0700	[thread overview]
Message-ID: <CANMBJr4mci5LyuBNT50dupxSVz+t-5mhWv8a7LBvY4MgupomVQ@mail.gmail.com> (raw)
In-Reply-To: <CAOMZO5BjzSJws7zjJ5+aZkfeF+15twEu9zS3V+g6wQrtUiNyqQ@mail.gmail.com>

On 13 April 2017 at 13:49, Fabio Estevam <festevam@gmail.com> wrote:
> On Thu, Apr 13, 2017 at 5:13 PM, Tyler Baker <tyler.baker@linaro.org> 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:
>> [<c010c364>] (dump_backtrace) from [<c010c610>] (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 <tyler.baker@linaro.org>
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 <tyler.baker@linaro.org>
---
 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

  parent reply	other threads:[~2017-04-13 21:35 UTC|newest]

Thread overview: 104+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-13 13:32 [PATCH 0/8] i.MX7 PCIe related device tree changes Andrey Smirnov
2017-04-13 13:32 ` Andrey Smirnov
2017-04-13 13:32 ` [PATCH 1/8] Revert "ARM: dts: imx: Remove unexistant property" Andrey Smirnov
2017-04-13 13:32   ` Andrey Smirnov
2017-04-13 13:32   ` Andrey Smirnov
2017-04-13 13:32 ` [PATCH 2/8] ARM: dts: imx6: Specify 'anatop-enable-bit' where appropriate Andrey Smirnov
2017-04-13 13:32   ` Andrey Smirnov
2017-04-13 13:32   ` Andrey Smirnov
2017-04-13 13:32 ` [PATCH 3/8] ARM: dts: imx7s: Adjust anatop-enable-bit for 'reg_1p0d' Andrey Smirnov
2017-04-13 13:32   ` Andrey Smirnov
2017-04-13 13:32   ` Andrey Smirnov
2017-04-14  3:28   ` Shawn Guo
2017-04-14  3:28     ` Shawn Guo
2017-04-14  3:28     ` Shawn Guo
2017-04-14 14:33     ` Andrey Smirnov
2017-04-14 14:33       ` Andrey Smirnov
2017-04-14 15:32   ` Dong Aisheng
2017-04-14 15:32     ` Dong Aisheng
2017-04-14 15:32     ` Dong Aisheng
2017-04-14 16:08     ` Andrey Smirnov
2017-04-14 16:08       ` Andrey Smirnov
2017-04-14 16:08       ` Andrey Smirnov
2017-04-13 13:32 ` [PATCH 4/8] ARM: dts: imx7s: Add node for GPC Andrey Smirnov
2017-04-13 13:32   ` Andrey Smirnov
2017-04-13 19:03   ` Tyler Baker
2017-04-13 19:03     ` Tyler Baker
2017-04-13 19:18     ` Fabio Estevam
2017-04-13 19:18       ` Fabio Estevam
2017-04-13 19:18       ` Fabio Estevam
2017-04-13 19:24       ` Tyler Baker
2017-04-13 19:24         ` Tyler Baker
2017-04-13 19:24         ` Tyler Baker
2017-04-13 19:55         ` Fabio Estevam
2017-04-13 19:55           ` Fabio Estevam
2017-04-13 19:55           ` Fabio Estevam
2017-04-13 20:13           ` Tyler Baker
2017-04-13 20:13             ` Tyler Baker
2017-04-13 20:13             ` Tyler Baker
2017-04-13 20:49             ` Fabio Estevam
2017-04-13 20:49               ` Fabio Estevam
2017-04-13 20:49               ` Fabio Estevam
2017-04-13 21:20               ` Andrey Smirnov
2017-04-13 21:20                 ` Andrey Smirnov
2017-04-13 21:20                 ` Andrey Smirnov
2017-04-13 21:35               ` Tyler Baker [this message]
2017-04-13 21:35                 ` Tyler Baker
2017-04-13 21:35                 ` Tyler Baker
2017-04-13 22:00                 ` Fabio Estevam
2017-04-13 22:00                   ` Fabio Estevam
2017-04-13 22:00                   ` Fabio Estevam
2017-04-13 21:19     ` Andrey Smirnov
2017-04-13 21:19       ` Andrey Smirnov
2017-04-13 21:19       ` Andrey Smirnov
2017-04-14  3:40   ` Shawn Guo
2017-04-14  3:40     ` Shawn Guo
2017-04-14  3:40     ` Shawn Guo
2017-04-14 15:19     ` Andrey Smirnov
2017-04-14 15:19       ` Andrey Smirnov
2017-04-14 15:49       ` Dong Aisheng
2017-04-14 15:49         ` Dong Aisheng
2017-04-14 15:49         ` Dong Aisheng
2017-04-14 15:50         ` Andrey Smirnov
2017-04-14 15:50           ` Andrey Smirnov
2017-04-14 15:50           ` Andrey Smirnov
2017-04-13 13:32 ` [PATCH 5/8] ARM: dts: imx7s: Mark 'gpr' compatible with i.MX6 variant Andrey Smirnov
2017-04-13 13:32   ` Andrey Smirnov
2017-04-13 13:32   ` Andrey Smirnov
2017-04-14 15:56   ` Dong Aisheng
2017-04-14 15:56     ` Dong Aisheng
2017-04-14 16:30     ` Andrey Smirnov
2017-04-14 16:30       ` Andrey Smirnov
2017-04-14 16:30       ` Andrey Smirnov
2017-04-13 13:32 ` [PATCH 6/8] ARM: dts: imx7d-sdb: Add GPIO expander node Andrey Smirnov
2017-04-13 13:32   ` Andrey Smirnov
2017-04-13 22:20   ` Fabio Estevam
2017-04-13 22:20     ` Fabio Estevam
2017-04-13 22:20     ` Fabio Estevam
2017-04-14 15:25     ` Andrey Smirnov
2017-04-14 15:25       ` Andrey Smirnov
2017-04-14 15:25       ` Andrey Smirnov
2017-04-14  3:47   ` Shawn Guo
2017-04-14  3:47     ` Shawn Guo
2017-04-14  3:47     ` Shawn Guo
2017-04-14 15:32     ` Andrey Smirnov
2017-04-14 15:32       ` Andrey Smirnov
2017-04-14 15:32       ` Andrey Smirnov
2017-04-14 16:00     ` Dong Aisheng
2017-04-14 16:00       ` Dong Aisheng
2017-04-13 13:32 ` [PATCH 7/8] ARM: dts: imx7d: Add node for PCIe controller Andrey Smirnov
2017-04-13 13:32   ` Andrey Smirnov
2017-04-13 13:32 ` [PATCH 8/8] ARM: dts: imx7d-sdb: Enable PCIe peripheral Andrey Smirnov
2017-04-13 13:32   ` Andrey Smirnov
2017-04-13 22:23   ` Fabio Estevam
2017-04-13 22:23     ` Fabio Estevam
2017-04-13 22:23     ` Fabio Estevam
2017-04-14  3:51   ` Shawn Guo
2017-04-14  3:51     ` Shawn Guo
2017-04-14  3:51     ` Shawn Guo
2017-04-14 15:45     ` Andrey Smirnov
2017-04-14 15:45       ` Andrey Smirnov
2017-04-14 15:45       ` Andrey Smirnov
2017-04-19 18:28 ` [PATCH 0/8] i.MX7 PCIe related device tree changes Tyler Baker
2017-04-19 18:28   ` Tyler Baker
2017-04-19 18:28   ` Tyler Baker

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=CANMBJr4mci5LyuBNT50dupxSVz+t-5mhWv8a7LBvY4MgupomVQ@mail.gmail.com \
    --to=tyler.baker@linaro.org \
    --cc=andrew.smirnov@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=fabio.estevam@nxp.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=yurovsky@gmail.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 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.