public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Figa <t.figa@samsung.com>
To: Tarek Dakhran <t.dakhran@samsung.com>, linux-kernel@vger.kernel.org
Cc: Russell King <linux@arm.linux.org.uk>,
	Kukjin Kim <kgene.kim@samsung.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Sachin Kamat <sachin.kamat@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Tarek Dakhran <t.dakhran@gmail.com>,
	Vyacheslav Tyrtov <v.tyrtov@samsung.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH v1 0/2] exynos_mct driver: fix irq allocation and cleanup
Date: Thu, 13 Feb 2014 13:36:18 +0100	[thread overview]
Message-ID: <52FCBC42.6020904@samsung.com> (raw)
In-Reply-To: <1392260923-31659-1-git-send-email-t.dakhran@samsung.com>

Hi Tarek,

On 13.02.2014 04:08, Tarek Dakhran wrote:
> exynos4_local_timer_setup called on the secondary cpu before
> irqs are enabled. request_irq can sleep, which produces next warning:
>
> on boot:
> [    0.370000] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
> [    0.370000] Setting up static identity map for 0x403b5700 - 0x403b5758
> [    0.395000] CPU1: Booted secondary processor
> [    0.395000] ------------[ cut here ]------------
> [    0.395000] WARNING: CPU: 1 PID: 0 at kernel/locking/lockdep.c:2742 lockdep_trace_alloc+0xe0/0xfc()
> [    0.395000] DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags))
> [    0.395000] Modules linked in:
> [    0.395000] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.14.0-rc2-00004-g0db95f4 #128
> [    0.395000] [<c0014308>] (unwind_backtrace) from [<c0011690>] (show_stack+0x10/0x14)
> [    0.395000] [<c0011690>] (show_stack) from [<c03ae7d0>] (dump_stack+0x6c/0xb8)
> [    0.395000] [<c03ae7d0>] (dump_stack) from [<c001d504>] (warn_slowpath_common+0x68/0x8c)
> [    0.395000] [<c001d504>] (warn_slowpath_common) from [<c001d5bc>] (warn_slowpath_fmt+0x30/0x40)
> [    0.395000] [<c001d5bc>] (warn_slowpath_fmt) from [<c0059824>] (lockdep_trace_alloc+0xe0/0xfc)
> [    0.395000] [<c0059824>] (lockdep_trace_alloc) from [<c00bee24>] (kmem_cache_alloc+0x24/0x160)
> [    0.395000] [<c00bee24>] (kmem_cache_alloc) from [<c0068174>] (request_threaded_irq+0x64/0x130)
> [    0.395000] [<c0068174>] (request_threaded_irq) from [<c02efaf8>] (exynos4_local_timer_setup+0xd0/0x124)
> [    0.395000] [<c02efaf8>] (exynos4_local_timer_setup) from [<c02efc34>] (exynos4_mct_cpu_notify+0x78/0xf0)
> [    0.395000] [<c02efc34>] (exynos4_mct_cpu_notify) from [<c003d318>] (notifier_call_chain+0x44/0x84)
> [    0.395000] [<c003d318>] (notifier_call_chain) from [<c001d61c>] (__cpu_notify+0x24/0x40)
> [    0.395000] [<c001d61c>] (__cpu_notify) from [<c0013314>] (secondary_start_kernel+0xe4/0x134)
> [    0.395000] [<c0013314>] (secondary_start_kernel) from [<40008624>] (0x40008624)
> [    0.395000] ---[ end trace 347890460e745f50 ]---
> [    0.420000] CPU1: update cpu_power 1024
> [    0.420000] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
>
> on hotplug:
> [  108.040000] CPU3: Booted secondary processor
> [  108.040000] BUG: sleeping function called from invalid context at mm/slub.c:965
> [  108.040000] in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper/3
> [  108.040000] INFO: lockdep is turned off.
> [  108.040000] irq event stamp: 0
> [  108.040000] hardirqs last  enabled at (0): [<  (null)>]   (null)
> [  108.040000] hardirqs last disabled at (0): [<c001b768>] copy_process.part.2+0x2a4/0x12f4
> [  108.040000] softirqs last  enabled at (0): [<c001b768>] copy_process.part.2+0x2a4/0x12f4
> [  108.040000] softirqs last disabled at (0): [<  (null)>]   (null)
> [  108.040000] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G        W    3.14.0-rc2-00004-g0db95f4 #128
> [  108.040000] [<c0014308>] (unwind_backtrace) from [<c0011690>] (show_stack+0x10/0x14)
> [  108.040000] [<c0011690>] (show_stack) from [<c03ae7d0>] (dump_stack+0x6c/0xb8)
> [  108.040000] [<c03ae7d0>] (dump_stack) from [<c00beed4>] (kmem_cache_alloc+0xd4/0x160)
> [  108.040000] [<c00beed4>] (kmem_cache_alloc) from [<c0068174>] (request_threaded_irq+0x64/0x130)
> [  108.040000] [<c0068174>] (request_threaded_irq) from [<c02efaf8>] (exynos4_local_timer_setup+0xd0/0x124)
> [  108.040000] [<c02efaf8>] (exynos4_local_timer_setup) from [<c02efc34>] (exynos4_mct_cpu_notify+0x78/0xf0)
> [  108.040000] [<c02efc34>] (exynos4_mct_cpu_notify) from [<c003d318>] (notifier_call_chain+0x44/0x84)
> [  108.040000] [<c003d318>] (notifier_call_chain) from [<c001d61c>] (__cpu_notify+0x24/0x40)
> [  108.040000] [<c001d61c>] (__cpu_notify) from [<c0013314>] (secondary_start_kernel+0xe4/0x134)
> [  108.040000] [<c0013314>] (secondary_start_kernel) from [<40008624>] (0x40008624)
>
> First patch fixes this problem by removing request_irq from exynos4_local_timer_setup
> Second removes non-dt stuff.
>
> Tested on linux kernel v3.14-rc2.

It would be nice to say on which boards it has been tested. Let me check 
this on our boards anyway.

Best regards,
Tomasz

  parent reply	other threads:[~2014-02-13 12:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-13  3:08 [PATCH v1 0/2] exynos_mct driver: fix irq allocation and cleanup Tarek Dakhran
2014-02-13  3:08 ` [PATCH v1 1/2] clocksource: mct: remove request_irq from exynos4_local_timer_setup Tarek Dakhran
2014-02-15 12:42   ` Thomas Gleixner
2014-02-13  3:08 ` [PATCH v1 2/2] clocksource: mct: cleanup, remove non-dt stuff from mct Tarek Dakhran
2014-02-13 12:36 ` Tomasz Figa [this message]
     [not found]   ` <CANhyOUcBrsnfSa3sCGbFqUB0g6zfG9moqbGapJGU3zbxWQVgiA@mail.gmail.com>
2014-02-15  4:12     ` [PATCH v1 0/2] exynos_mct driver: fix irq allocation and cleanup Tarek Dakhran

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=52FCBC42.6020904@samsung.com \
    --to=t.figa@samsung.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=sachin.kamat@linaro.org \
    --cc=t.dakhran@gmail.com \
    --cc=t.dakhran@samsung.com \
    --cc=tglx@linutronix.de \
    --cc=v.tyrtov@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox