All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Philippe De Muyter <phdm-vQo90/bmh3WzQB+pC5nmwQ@public.gmane.org>
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Huang Shijie <b32955-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
	Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH v2] spi: spi-imx: spi_imx_remove: do not disable disabled clocks
Date: Fri, 28 Feb 2014 12:46:20 +0900	[thread overview]
Message-ID: <20140228034620.GH9383@sirena.org.uk> (raw)
In-Reply-To: <1393492575-32495-1-git-send-email-phdm-vQo90/bmh3WzQB+pC5nmwQ@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1359 bytes --]

On Thu, Feb 27, 2014 at 10:16:15AM +0100, Philippe De Muyter wrote:

> ------------[ cut here ]------------
> WARNING: at drivers/clk/clk.c:780 clk_disable+0x18/0x24()
> Modules linked in: spi_imx(-) [last unloaded: ev76c560]
> CPU: 1 PID: 16337 Comm: rmmod Tainted: G        W    3.10.17-80548-g90191eb-dirty #33
> [<80013b4c>] (unwind_backtrace+0x0/0xf8) from [<800115dc>] (show_stack+0x10/0x14)

Don't paste entire backtraces into commit logs unless they're adding
something, it makes the mail harder to read.  Especially don't do this
before the text explanation of the commit.

> Since commit 9e556dcc55774c9a1032f32baa0e5cfafede8b70, "spi: spi-imx: only
> enable the clocks when we start to transfer a message", clocks are always
> disabled except when transmitting messages.  There is thus no need to
> disable them at module removal.

>  	writel(0, spi_imx->base + MXC_CSPICTRL);
> -	clk_disable_unprepare(spi_imx->clk_ipg);
> -	clk_disable_unprepare(spi_imx->clk_per);
> +	clk_unprepare(spi_imx->clk_ipg);
> +	clk_unprepare(spi_imx->clk_per);
>  	spi_master_put(master);

Why is the fix for this not to convert the enable/disable done when
tranferring to be preparing as well?  The message transfer doesn't
get started in atomic context so I can't see any advantage to leaving
the clock prepared all the time but it's possible I'm missing something.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2014-02-28  3:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-27  8:51 [PATCH] spi: spi-imx: spi_imx_remove: do not disable disabled clocks Philippe De Muyter
     [not found] ` <1393491060-28074-1-git-send-email-phdm-vQo90/bmh3WzQB+pC5nmwQ@public.gmane.org>
2014-02-27  8:59   ` Huang Shijie
     [not found]     ` <530EFE8E.5050303-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-02-27  9:16       ` [PATCH v2] " Philippe De Muyter
     [not found]         ` <1393492575-32495-1-git-send-email-phdm-vQo90/bmh3WzQB+pC5nmwQ@public.gmane.org>
2014-02-27  9:23           ` Huang Shijie
2014-02-28  3:46           ` Mark Brown [this message]
     [not found]             ` <20140228034620.GH9383-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-02-28  4:26               ` Huang Shijie
     [not found]                 ` <53100FEF.7060600-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-02-28  6:13                   ` Mark Brown
     [not found]                     ` <20140228061344.GD29849-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-02-28  6:28                       ` Huang Shijie
     [not found]                         ` <53102C74.2070609-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-03-01  4:09                           ` Mark Brown
2014-02-28  6:15           ` Mark Brown

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=20140228034620.GH9383@sirena.org.uk \
    --to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=b32955-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=phdm-vQo90/bmh3WzQB+pC5nmwQ@public.gmane.org \
    --cc=shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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.