From: pawel.moll@arm.com (Pawel Moll)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 01/10] of: Keep track of populated platform devices
Date: Wed, 30 Apr 2014 12:48:49 +0100 [thread overview]
Message-ID: <1398858529.24255.3.camel@hornet> (raw)
In-Reply-To: <20140429125657.65910C4089D@trevor.secretlab.ca>
On Tue, 2014-04-29 at 13:56 +0100, Grant Likely wrote:
> > > diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> > > index 404d1da..0ae757a 100644
> > > --- a/drivers/of/platform.c
> > > +++ b/drivers/of/platform.c
> > > @@ -204,7 +204,8 @@ static struct platform_device *of_platform_device_create_pdata(
> > > {
> > > struct platform_device *dev;
> > >
> > > - if (!of_device_is_available(np))
> > > + if (!of_device_is_available(np) ||
> > > + of_node_check_flag(np, OF_POPULATED))
> >
> > This and the amba case should be a test_and_set operation to avoid a
> > race condition.
>
> Yes. It is an unlikely condition at the time that Pawel is handling, but
> it should also work for later calls to of_platform_populate() which may
> happen at runtime and in parallel.
Sure thing, will fix.
Thanks!
Pawel
WARNING: multiple messages have this Message-ID (diff)
From: Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>
To: Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
<arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH 01/10] of: Keep track of populated platform devices
Date: Wed, 30 Apr 2014 12:48:49 +0100 [thread overview]
Message-ID: <1398858529.24255.3.camel@hornet> (raw)
In-Reply-To: <20140429125657.65910C4089D-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
On Tue, 2014-04-29 at 13:56 +0100, Grant Likely wrote:
> > > diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> > > index 404d1da..0ae757a 100644
> > > --- a/drivers/of/platform.c
> > > +++ b/drivers/of/platform.c
> > > @@ -204,7 +204,8 @@ static struct platform_device *of_platform_device_create_pdata(
> > > {
> > > struct platform_device *dev;
> > >
> > > - if (!of_device_is_available(np))
> > > + if (!of_device_is_available(np) ||
> > > + of_node_check_flag(np, OF_POPULATED))
> >
> > This and the amba case should be a test_and_set operation to avoid a
> > race condition.
>
> Yes. It is an unlikely condition at the time that Pawel is handling, but
> it should also work for later calls to of_platform_populate() which may
> happen at runtime and in parallel.
Sure thing, will fix.
Thanks!
Pawel
--
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: Pawel Moll <pawel.moll@arm.com>
To: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robherring2@gmail.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Russell King <linux@arm.linux.org.uk>,
Samuel Ortiz <sameo@linux.intel.com>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"arm@kernel.org" <arm@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Lee Jones <lee.jones@linaro.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 01/10] of: Keep track of populated platform devices
Date: Wed, 30 Apr 2014 12:48:49 +0100 [thread overview]
Message-ID: <1398858529.24255.3.camel@hornet> (raw)
In-Reply-To: <20140429125657.65910C4089D@trevor.secretlab.ca>
On Tue, 2014-04-29 at 13:56 +0100, Grant Likely wrote:
> > > diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> > > index 404d1da..0ae757a 100644
> > > --- a/drivers/of/platform.c
> > > +++ b/drivers/of/platform.c
> > > @@ -204,7 +204,8 @@ static struct platform_device *of_platform_device_create_pdata(
> > > {
> > > struct platform_device *dev;
> > >
> > > - if (!of_device_is_available(np))
> > > + if (!of_device_is_available(np) ||
> > > + of_node_check_flag(np, OF_POPULATED))
> >
> > This and the amba case should be a test_and_set operation to avoid a
> > race condition.
>
> Yes. It is an unlikely condition at the time that Pawel is handling, but
> it should also work for later calls to of_platform_populate() which may
> happen at runtime and in parallel.
Sure thing, will fix.
Thanks!
Pawel
next prev parent reply other threads:[~2014-04-30 11:48 UTC|newest]
Thread overview: 96+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-28 17:57 [PATCH 00/10] Versatile Express changes for 3.16 Pawel Moll
2014-04-28 17:57 ` Pawel Moll
2014-04-28 17:57 ` [PATCH 01/10] of: Keep track of populated platform devices Pawel Moll
2014-04-28 17:57 ` Pawel Moll
2014-04-28 17:57 ` Pawel Moll
2014-04-28 18:02 ` Rob Herring
2014-04-28 18:02 ` Rob Herring
2014-04-28 18:02 ` Rob Herring
2014-04-29 12:56 ` Grant Likely
2014-04-29 12:56 ` Grant Likely
2014-04-29 12:56 ` Grant Likely
2014-04-30 11:48 ` Pawel Moll [this message]
2014-04-30 11:48 ` Pawel Moll
2014-04-30 11:48 ` Pawel Moll
2014-04-30 14:05 ` [PATCH v2] " Pawel Moll
2014-04-30 14:05 ` Pawel Moll
2014-04-30 15:22 ` Rob Herring
2014-04-30 15:22 ` Rob Herring
2014-05-01 9:26 ` Grant Likely
2014-05-01 9:26 ` Grant Likely
2014-05-01 9:43 ` Grant Likely
2014-05-01 9:43 ` Grant Likely
2014-05-07 14:37 ` Pawel Moll
2014-05-07 14:37 ` Pawel Moll
2014-05-14 10:56 ` Grant Likely
2014-05-14 10:56 ` Grant Likely
2014-05-15 15:08 ` Pawel Moll
2014-05-15 15:08 ` Pawel Moll
2014-04-28 17:57 ` [lm-sensors] [PATCH 02/10] mfd: vexpress: Convert custom func API to regmap Pawel Moll
2014-04-28 17:57 ` Pawel Moll
2014-04-28 17:57 ` Pawel Moll
2014-04-29 22:21 ` [lm-sensors] " Mark Brown
2014-04-29 22:21 ` Mark Brown
2014-04-29 22:21 ` Mark Brown
2014-04-30 13:58 ` [lm-sensors] " Lee Jones
2014-04-30 13:58 ` Lee Jones
2014-04-30 13:58 ` Lee Jones
2014-04-30 14:13 ` [lm-sensors] " Pawel Moll
2014-04-30 14:13 ` Pawel Moll
2014-04-30 14:13 ` Pawel Moll
2014-04-30 14:29 ` [lm-sensors] " Lee Jones
2014-04-30 14:29 ` Lee Jones
2014-04-30 14:29 ` Lee Jones
2014-04-30 14:38 ` [lm-sensors] " Pawel Moll
2014-04-30 14:38 ` Pawel Moll
2014-04-30 14:38 ` Pawel Moll
2014-04-30 16:01 ` [lm-sensors] [PATCH v2] " Pawel Moll
2014-04-30 16:01 ` Pawel Moll
2014-04-30 16:01 ` Pawel Moll
2014-04-30 17:05 ` [lm-sensors] " Guenter Roeck
2014-04-30 17:05 ` Guenter Roeck
2014-04-30 17:05 ` Guenter Roeck
2014-05-01 18:58 ` [lm-sensors] " Mike Turquette
2014-05-01 18:58 ` Mike Turquette
2014-05-01 18:58 ` Mike Turquette
2014-04-28 17:57 ` [PATCH 03/10] mfd: syscon: Add platform data with a regmap config name Pawel Moll
2014-04-28 17:57 ` Pawel Moll
2014-04-28 17:57 ` [PATCH 04/10] mfd: vexpress: Define the device as MFD cells Pawel Moll
2014-04-28 17:57 ` Pawel Moll
2014-05-09 11:24 ` Lee Jones
2014-05-09 11:24 ` Lee Jones
2014-04-28 17:57 ` [PATCH 05/10] clk: versatile: Split config options for sp810 and vexpress_osc Pawel Moll
2014-04-28 17:57 ` Pawel Moll
2014-05-01 18:55 ` Mike Turquette
2014-05-01 18:55 ` Mike Turquette
2014-04-28 17:57 ` [PATCH 06/10] clocksource: Sched clock source for Versatile Express Pawel Moll
2014-04-28 17:57 ` Pawel Moll
2014-04-28 17:57 ` [PATCH 07/10] ARM: vexpress: remove redundant vexpress_dt_cpus_num to get cpu count Pawel Moll
2014-04-28 17:57 ` Pawel Moll
2014-04-28 17:57 ` [PATCH 08/10] ARM: vexpress: Simplify SMP operations for DT-powered system Pawel Moll
2014-04-28 17:57 ` Pawel Moll
2014-04-28 17:57 ` [PATCH 09/10] ARM: vexpress: move HBI check to sysreg driver Pawel Moll
2014-04-28 17:57 ` Pawel Moll
2014-04-30 14:02 ` Lee Jones
2014-04-30 14:02 ` Lee Jones
2014-04-28 17:57 ` [lm-sensors] [PATCH 10/10] hwmon: vexpress: Use devm helper for hwmon device registration Pawel Moll
2014-04-28 17:57 ` Pawel Moll
2014-04-28 17:57 ` Pawel Moll
2014-04-28 22:59 ` [lm-sensors] " Guenter Roeck
2014-04-28 22:59 ` Guenter Roeck
2014-04-28 22:59 ` Guenter Roeck
2014-04-30 15:16 ` [lm-sensors] " Pawel Moll
2014-04-30 15:16 ` Pawel Moll
2014-04-30 15:16 ` Pawel Moll
2014-04-30 15:27 ` [lm-sensors] " Guenter Roeck
2014-04-30 15:27 ` Guenter Roeck
2014-04-30 15:27 ` Guenter Roeck
2014-04-30 15:33 ` [lm-sensors] " Pawel Moll
2014-04-30 15:33 ` Pawel Moll
2014-04-30 15:33 ` Pawel Moll
[not found] <Message-ID: <1399473437.3706.25.camel@hornet>
2014-05-13 11:48 ` [PATCH v3] of: Keep track of populated platform devices Pawel Moll
2014-05-13 11:48 ` Pawel Moll
2014-05-13 12:24 ` Rob Herring
2014-05-13 12:24 ` Rob Herring
2014-05-14 11:05 ` Grant Likely
2014-05-14 11:05 ` Grant Likely
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=1398858529.24255.3.camel@hornet \
--to=pawel.moll@arm.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 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.