Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1195738
| From | Chunyan Zhang <zhang.lyra@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 01/11] stm class: Introduce an abstraction for System Trace Module devices |
| Date | 2015-07-30 09:00 +0200 |
| Message-ID | <pRPYS-7zo-9@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <pJbFh-6Su-37@gated-at.bofh.it> <pRra9-5K8-9@gated-at.bofh.it> <pRzAK-Um-19@gated-at.bofh.it> <pRMHE-2UQ-7@gated-at.bofh.it> <pRPFw-78o-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Jul 30, 2015 at 2:37 PM, Alexander Shishkin <alexander.shishkin@linux.intel.com> wrote: > 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. The code has already been submitted like I said in the earlier emails, you may refer [1]. Thanks, Chunyan [1] https://lkml.org/lkml/2015/2/4/729 > > Regards, > -- > Alex > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v3 01/11] stm class: Introduce an abstraction for System Trace Module devices Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-07-29 15:30 +0200
Re: [PATCH v3 01/11] stm class: Introduce an abstraction for System Trace Module devices Mark Brown <broonie@kernel.org> - 2015-07-29 15:40 +0200
Re: [PATCH v3 01/11] stm class: Introduce an abstraction for System Trace Module devices Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-07-29 15:50 +0200
Re: [PATCH v3 01/11] stm class: Introduce an abstraction for System Trace Module devices Chunyan Zhang <zhang.lyra@gmail.com> - 2015-07-30 05:40 +0200
Re: [PATCH v3 01/11] stm class: Introduce an abstraction for System Trace Module devices Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-07-30 07:50 +0200
Re: [PATCH v3 01/11] stm class: Introduce an abstraction for System Trace Module devices Chunyan Zhang <zhang.lyra@gmail.com> - 2015-07-30 08:20 +0200
Re: [PATCH v3 01/11] stm class: Introduce an abstraction for System Trace Module devices Chunyan Zhang <zhang.lyra@gmail.com> - 2015-07-30 05:30 +0200
Re: [PATCH v3 01/11] stm class: Introduce an abstraction for System Trace Module devices Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-07-30 08:40 +0200
Re: [PATCH v3 01/11] stm class: Introduce an abstraction for System Trace Module devices Chunyan Zhang <zhang.lyra@gmail.com> - 2015-07-30 09:00 +0200
Re: [PATCH v3 01/11] stm class: Introduce an abstraction for System Trace Module devices Chunyan Zhang <zhang.lyra@gmail.com> - 2015-07-30 09:20 +0200
Re: [PATCH v3 01/11] stm class: Introduce an abstraction for System Trace Module devices Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-07-30 09:20 +0200
csiph-web