From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
To: Chunyan Zhang <zhang.lyra@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
peter.lachner@intel.com, norbert.schulz@intel.com,
keven.boell@intel.com, yann.fouassier@intel.com,
laurent.fert@intel.com,
"linux-api\@vger.kernel.org" <linux-api@vger.kernel.org>,
Chunyan Zhang <zhang.chunyan@linaro.org>,
Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH v3 01/11] stm class: Introduce an abstraction for System Trace Module devices
Date: Thu, 30 Jul 2015 09:37:53 +0300 [thread overview]
Message-ID: <87vbd29mm6.fsf@ashishki-desk.ger.corp.intel.com> (raw)
In-Reply-To: <CAAfSe-vgFSxA7OX7DSOB4XXdsan_3PWne0-16kSKZv_8HkHjgg@mail.gmail.com>
Chunyan Zhang <zhang.lyra@gmail.com> writes:
> Sure, I mean, the root reason of this problem is here ( i.e.
> "stm_core_up" was zero then):
> if (!stm_core_up)
> return -EPROBE_DEFER;
>
> Why it was zero?
> Because the function (i.e. stm_core_init() ) in which "stm_core_up"
> would be added one hasn't been executed at this moment. It would be
> executed on module_init stage for you this version of patch.
Again, this is the indented behavior.
> The reason of this warning is:
> After stm_probe() failed, clk_core_disable() would be called from
> amba_put_disable_pclk(), then WARN_ON() happened:
> if (WARN_ON(core->enable_count == 0))
> return;
>
> I'm guessing the reason why "core->enable_count" was 0 at this moment is:
> I don't know who created a thread to process the
> amba_pm_runtime_suspend(), in which clk_core_disable() was already
> called, "core->enable_count" was, of course, cleared to zero then.
> And this thread run before amba_put_disable_pclk(pcdev) which is just
> the one called from amba_probe() after
> "->probe"(i.e. stm_probe in this case) returning a non-zero value.
No, this is guesswork. In amba_probe(), clocks are enabled for the
drv->probe() and then disabled afterwards and that's where the refcount
ends up unbalanced, the probe is the culprit.
I can debug your driver for you but you'll at least need to put the code
up somewhere so I can see it.
Regards,
--
Alex
next prev parent reply other threads:[~2015-07-30 6:38 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-06 10:08 [PATCH v3 00/11] Introduce Intel Trace Hub support Alexander Shishkin
2015-07-06 10:08 ` [PATCH v3 01/11] stm class: Introduce an abstraction for System Trace Module devices Alexander Shishkin
2015-07-08 12:32 ` Chunyan Zhang
2015-07-08 12:49 ` Alexander Shishkin
2015-07-29 4:21 ` Chunyan Zhang
2015-07-29 13:25 ` Alexander Shishkin
2015-07-29 13:35 ` Mark Brown
2015-07-29 13:46 ` Alexander Shishkin
2015-07-30 3:38 ` Chunyan Zhang
2015-07-30 5:45 ` Alexander Shishkin
2015-07-30 6:15 ` Chunyan Zhang
2015-07-30 3:19 ` Chunyan Zhang
2015-07-30 6:37 ` Alexander Shishkin [this message]
2015-07-30 6:59 ` Chunyan Zhang
2015-07-30 7:11 ` Chunyan Zhang
2015-07-30 7:16 ` Alexander Shishkin
2015-08-05 23:01 ` Mathieu Poirier
2015-07-06 10:08 ` [PATCH v3 02/11] MAINTAINERS: add an entry for System Trace Module device class Alexander Shishkin
2015-07-06 10:08 ` [PATCH v3 03/11] stm class: dummy_stm: Add dummy driver for testing stm class Alexander Shishkin
2015-08-05 23:02 ` Mathieu Poirier
2015-07-06 10:08 ` [PATCH v3 04/11] stm class: stm_console: Add kernel-console-over-stm driver Alexander Shishkin
2015-08-05 23:03 ` Mathieu Poirier
2015-07-06 10:08 ` [PATCH v3 05/11] intel_th: Add driver infrastructure for Intel Trace Hub devices Alexander Shishkin
2015-07-06 10:08 ` [PATCH v3 06/11] intel_th: Add pci glue layer for Intel Trace Hub Alexander Shishkin
2015-07-06 10:09 ` [PATCH v3 07/11] intel_th: Add Global Trace Hub driver Alexander Shishkin
2015-07-06 10:09 ` [PATCH v3 08/11] intel_th: Add Software " Alexander Shishkin
2015-07-06 10:09 ` [PATCH v3 09/11] intel_th: Add Memory Storage Unit driver Alexander Shishkin
2015-07-06 10:09 ` [PATCH v3 10/11] intel_th: Add PTI output driver Alexander Shishkin
2015-07-06 10:09 ` [PATCH v3 11/11] MAINTAINERS: add an entry for Intel(R) Trace Hub Alexander Shishkin
2015-07-22 15:49 ` [PATCH v3 00/11] Introduce Intel Trace Hub support Alexander Shishkin
2015-07-23 15:27 ` Mathieu Poirier
2015-08-05 20:31 ` Greg Kroah-Hartman
2015-07-29 13:26 ` Alexander Shishkin
2015-07-31 5:16 ` Alexander Shishkin
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=87vbd29mm6.fsf@ashishki-desk.ger.corp.intel.com \
--to=alexander.shishkin@linux.intel.com \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=keven.boell@intel.com \
--cc=laurent.fert@intel.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=norbert.schulz@intel.com \
--cc=peter.lachner@intel.com \
--cc=yann.fouassier@intel.com \
--cc=zhang.chunyan@linaro.org \
--cc=zhang.lyra@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®