* Re: [PATCH next v2] OF: convert devtree lock from rw_lock to raw spinlock [not found] ` <511585A9.9090008-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2013-02-11 19:29 ` Stephen Warren 2013-02-11 19:54 ` Rob Herring 0 siblings, 1 reply; 5+ messages in thread From: Stephen Warren @ 2013-02-11 19:29 UTC (permalink / raw) To: Rob Herring, Thomas Gleixner Cc: linux-rt-users-u79uwXL29TY76Z2rM5mHXA, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Paul Gortmaker, linux-next-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, sparclinux-u79uwXL29TY76Z2rM5mHXA, Sam Ravnborg On 02/08/2013 04:09 PM, Rob Herring wrote: > On 02/06/2013 02:30 PM, Paul Gortmaker wrote: >> From: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org> >> >> With the locking cleanup in place (from "OF: Fixup resursive >> locking code paths"), we can now do the conversion from the >> rw_lock to a raw spinlock as required for preempt-rt. >> >> The previous cleanup and this conversion were originally >> separate since they predated when mainline got raw spinlock (in >> commit c2f21ce2e31286a "locking: Implement new raw_spinlock"). >> >> So, at that point in time, the cleanup was considered plausible >> for mainline, but not this conversion. In any case, we've kept >> them separate as it makes for easier review and better bisection. >> >> Signed-off-by: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org> >> [PG: taken from preempt-rt, update subject & add a commit log] >> Signed-off-by: Paul Gortmaker <paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org> >> --- >> >> [v2: recent commit e81b329 ("powerpc+of: Add /proc device tree >> updating to of node add/remove") added two more instances of >> write_unlock that also needed converting to raw_spin_unlock. >> Retested (boot) on sbc8548, defconfig builds on arm/sparc; no >> new warnings observed.] >> >> arch/sparc/kernel/prom_common.c | 4 +- >> drivers/of/base.c | 100 ++++++++++++++++++++++------------------ >> include/linux/of.h | 2 +- >> 3 files changed, 59 insertions(+), 47 deletions(-) > > Applied. This commit is present in next-20130211, and causes a boot failure (hang) early while booting on Tegra. Reverting just this one commit solves the issue. I'll see if I can track down where the issue is. Given the commit description, I assume there's some new recursive lock issue that snuck in between the previous fix for them and this commit? Any hints welcome. One thing I wonder looking at the patch: Most paths use raw_spin_lock_irqsave() but a few use just raw_spin_lock(). I wonder how that decision was made? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH next v2] OF: convert devtree lock from rw_lock to raw spinlock 2013-02-11 19:29 ` [PATCH next v2] OF: convert devtree lock from rw_lock to raw spinlock Stephen Warren @ 2013-02-11 19:54 ` Rob Herring 2013-02-11 22:18 ` Grant Likely 0 siblings, 1 reply; 5+ messages in thread From: Rob Herring @ 2013-02-11 19:54 UTC (permalink / raw) To: Stephen Warren, Paul Gortmaker Cc: Thomas Gleixner, linux-rt-users, devicetree-discuss, linux-kernel, sparclinux, Sam Ravnborg, linux-next@vger.kernel.org On 02/11/2013 01:29 PM, Stephen Warren wrote: > On 02/08/2013 04:09 PM, Rob Herring wrote: >> On 02/06/2013 02:30 PM, Paul Gortmaker wrote: >>> From: Thomas Gleixner <tglx@linutronix.de> >>> >>> With the locking cleanup in place (from "OF: Fixup resursive >>> locking code paths"), we can now do the conversion from the >>> rw_lock to a raw spinlock as required for preempt-rt. >>> >>> The previous cleanup and this conversion were originally >>> separate since they predated when mainline got raw spinlock (in >>> commit c2f21ce2e31286a "locking: Implement new raw_spinlock"). >>> >>> So, at that point in time, the cleanup was considered plausible >>> for mainline, but not this conversion. In any case, we've kept >>> them separate as it makes for easier review and better bisection. >>> >>> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> >>> [PG: taken from preempt-rt, update subject & add a commit log] >>> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> >>> --- >>> >>> [v2: recent commit e81b329 ("powerpc+of: Add /proc device tree >>> updating to of node add/remove") added two more instances of >>> write_unlock that also needed converting to raw_spin_unlock. >>> Retested (boot) on sbc8548, defconfig builds on arm/sparc; no >>> new warnings observed.] >>> >>> arch/sparc/kernel/prom_common.c | 4 +- >>> drivers/of/base.c | 100 ++++++++++++++++++++++------------------ >>> include/linux/of.h | 2 +- >>> 3 files changed, 59 insertions(+), 47 deletions(-) >> >> Applied. > > This commit is present in next-20130211, and causes a boot failure > (hang) early while booting on Tegra. Reverting just this one commit > solves the issue. > > I'll see if I can track down where the issue is. Given the commit > description, I assume there's some new recursive lock issue that snuck > in between the previous fix for them and this commit? Any hints welcome. > > One thing I wonder looking at the patch: Most paths use > raw_spin_lock_irqsave() but a few use just raw_spin_lock(). I wonder how > that decision was made? I found the problem. of_get_next_available_child -> of_device_is_available -> of_get_property -> of_get_property. An unlocked version of of_device_is_available is needed here. Rob ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH next v2] OF: convert devtree lock from rw_lock to raw spinlock 2013-02-11 19:54 ` Rob Herring @ 2013-02-11 22:18 ` Grant Likely 2013-02-11 22:21 ` Rob Herring 0 siblings, 1 reply; 5+ messages in thread From: Grant Likely @ 2013-02-11 22:18 UTC (permalink / raw) To: Rob Herring Cc: Stephen Warren, Paul Gortmaker, Thomas Gleixner, rt-users, devicetree-discuss, Linux Kernel Mailing List, sparclinux, Sam Ravnborg, linux-next@vger.kernel.org On Mon, Feb 11, 2013 at 7:54 PM, Rob Herring <robherring2@gmail.com> wrote: > On 02/11/2013 01:29 PM, Stephen Warren wrote: >> On 02/08/2013 04:09 PM, Rob Herring wrote: >>> On 02/06/2013 02:30 PM, Paul Gortmaker wrote: >>>> From: Thomas Gleixner <tglx@linutronix.de> >>>> >>>> With the locking cleanup in place (from "OF: Fixup resursive >>>> locking code paths"), we can now do the conversion from the >>>> rw_lock to a raw spinlock as required for preempt-rt. >>>> >>>> The previous cleanup and this conversion were originally >>>> separate since they predated when mainline got raw spinlock (in >>>> commit c2f21ce2e31286a "locking: Implement new raw_spinlock"). >>>> >>>> So, at that point in time, the cleanup was considered plausible >>>> for mainline, but not this conversion. In any case, we've kept >>>> them separate as it makes for easier review and better bisection. >>>> >>>> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> >>>> [PG: taken from preempt-rt, update subject & add a commit log] >>>> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> >>>> --- >>>> >>>> [v2: recent commit e81b329 ("powerpc+of: Add /proc device tree >>>> updating to of node add/remove") added two more instances of >>>> write_unlock that also needed converting to raw_spin_unlock. >>>> Retested (boot) on sbc8548, defconfig builds on arm/sparc; no >>>> new warnings observed.] >>>> >>>> arch/sparc/kernel/prom_common.c | 4 +- >>>> drivers/of/base.c | 100 ++++++++++++++++++++++------------------ >>>> include/linux/of.h | 2 +- >>>> 3 files changed, 59 insertions(+), 47 deletions(-) >>> >>> Applied. >> >> This commit is present in next-20130211, and causes a boot failure >> (hang) early while booting on Tegra. Reverting just this one commit >> solves the issue. >> >> I'll see if I can track down where the issue is. Given the commit >> description, I assume there's some new recursive lock issue that snuck >> in between the previous fix for them and this commit? Any hints welcome. >> >> One thing I wonder looking at the patch: Most paths use >> raw_spin_lock_irqsave() but a few use just raw_spin_lock(). I wonder how >> that decision was made? > > I found the problem. of_get_next_available_child -> > of_device_is_available -> of_get_property -> of_get_property. An > unlocked version of of_device_is_available is needed here. Oops, I had testbooted on a single core machine which would mask the issue. I've crafted a fix and am posting it for review before I apply it. g. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH next v2] OF: convert devtree lock from rw_lock to raw spinlock 2013-02-11 22:18 ` Grant Likely @ 2013-02-11 22:21 ` Rob Herring 2013-02-11 22:29 ` Grant Likely 0 siblings, 1 reply; 5+ messages in thread From: Rob Herring @ 2013-02-11 22:21 UTC (permalink / raw) To: Grant Likely Cc: Stephen Warren, Paul Gortmaker, Thomas Gleixner, rt-users, devicetree-discuss, Linux Kernel Mailing List, sparclinux, Sam Ravnborg, linux-next@vger.kernel.org On 02/11/2013 04:18 PM, Grant Likely wrote: > On Mon, Feb 11, 2013 at 7:54 PM, Rob Herring <robherring2@gmail.com> wrote: >> On 02/11/2013 01:29 PM, Stephen Warren wrote: >>> On 02/08/2013 04:09 PM, Rob Herring wrote: >>>> On 02/06/2013 02:30 PM, Paul Gortmaker wrote: >>>>> From: Thomas Gleixner <tglx@linutronix.de> >>>>> >>>>> With the locking cleanup in place (from "OF: Fixup resursive >>>>> locking code paths"), we can now do the conversion from the >>>>> rw_lock to a raw spinlock as required for preempt-rt. >>>>> >>>>> The previous cleanup and this conversion were originally >>>>> separate since they predated when mainline got raw spinlock (in >>>>> commit c2f21ce2e31286a "locking: Implement new raw_spinlock"). >>>>> >>>>> So, at that point in time, the cleanup was considered plausible >>>>> for mainline, but not this conversion. In any case, we've kept >>>>> them separate as it makes for easier review and better bisection. >>>>> >>>>> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> >>>>> [PG: taken from preempt-rt, update subject & add a commit log] >>>>> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> >>>>> --- >>>>> >>>>> [v2: recent commit e81b329 ("powerpc+of: Add /proc device tree >>>>> updating to of node add/remove") added two more instances of >>>>> write_unlock that also needed converting to raw_spin_unlock. >>>>> Retested (boot) on sbc8548, defconfig builds on arm/sparc; no >>>>> new warnings observed.] >>>>> >>>>> arch/sparc/kernel/prom_common.c | 4 +- >>>>> drivers/of/base.c | 100 ++++++++++++++++++++++------------------ >>>>> include/linux/of.h | 2 +- >>>>> 3 files changed, 59 insertions(+), 47 deletions(-) >>>> >>>> Applied. >>> >>> This commit is present in next-20130211, and causes a boot failure >>> (hang) early while booting on Tegra. Reverting just this one commit >>> solves the issue. >>> >>> I'll see if I can track down where the issue is. Given the commit >>> description, I assume there's some new recursive lock issue that snuck >>> in between the previous fix for them and this commit? Any hints welcome. >>> >>> One thing I wonder looking at the patch: Most paths use >>> raw_spin_lock_irqsave() but a few use just raw_spin_lock(). I wonder how >>> that decision was made? >> >> I found the problem. of_get_next_available_child -> >> of_device_is_available -> of_get_property -> of_get_property. An >> unlocked version of of_device_is_available is needed here. > > Oops, I had testbooted on a single core machine which would mask the > issue. I've crafted a fix and am posting it for review before I apply > it. > I'm in the process of applying Stephen's fix. Rob ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH next v2] OF: convert devtree lock from rw_lock to raw spinlock 2013-02-11 22:21 ` Rob Herring @ 2013-02-11 22:29 ` Grant Likely 0 siblings, 0 replies; 5+ messages in thread From: Grant Likely @ 2013-02-11 22:29 UTC (permalink / raw) To: Rob Herring Cc: Stephen Warren, Paul Gortmaker, Thomas Gleixner, rt-users, devicetree-discuss, Linux Kernel Mailing List, sparclinux, Sam Ravnborg, linux-next@vger.kernel.org On Mon, Feb 11, 2013 at 10:21 PM, Rob Herring <robherring2@gmail.com> wrote: > On 02/11/2013 04:18 PM, Grant Likely wrote: >> On Mon, Feb 11, 2013 at 7:54 PM, Rob Herring <robherring2@gmail.com> wrote: >>> I found the problem. of_get_next_available_child -> >>> of_device_is_available -> of_get_property -> of_get_property. An >>> unlocked version of of_device_is_available is needed here. >> >> Oops, I had testbooted on a single core machine which would mask the >> issue. I've crafted a fix and am posting it for review before I apply >> it. >> > > I'm in the process of applying Stephen's fix. I didn't actually see Stephen's fix until just now, after I had already written, posted and pushed out basically the same thing. :-) g. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-02-11 22:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1359993921-18145-1-git-send-email-paul.gortmaker@windriver.com>
[not found] ` <1360182656-15898-1-git-send-email-paul.gortmaker@windriver.com>
[not found] ` <511585A9.9090008@gmail.com>
[not found] ` <511585A9.9090008-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-02-11 19:29 ` [PATCH next v2] OF: convert devtree lock from rw_lock to raw spinlock Stephen Warren
2013-02-11 19:54 ` Rob Herring
2013-02-11 22:18 ` Grant Likely
2013-02-11 22:21 ` Rob Herring
2013-02-11 22:29 ` Grant Likely
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox