lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 17 Aug 2011 15:19:14 +0300
From:	Mika Westerberg <mika.westerberg@...ux.intel.com>
To:	Linus Walleij <linus.walleij@...aro.org>
Cc:	linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
	cjb@...top.org
Subject: Re: [PATCH 1/2] mmc: add functions to enable/disable aggressive
 clock gating

On Wed, Aug 17, 2011 at 09:51:31AM +0200, Linus Walleij wrote:
> 
> I would suggest that in all patches using these functions, try
> to replace:
> 
> mmc_host_clk_disable() -> mmc_host_clk_ungate()
> mmc_host_clk_enable() -> mmc_host_clk_gate()
> 

Wow, that is indeed *much* cleaner way of doing this!

One thing is that if I call these from those ios functions,
mmc_host_clk_ungate() will always try to restore the clock
even if there is really no need. Do you see this as a problem?

> Please tell us if this works!

Certainly. I'll try this overnight and see whether it works.

> I understand that the names can be a bit confusing by but
> I think you can convince yourself that what this will do is
> simply increase the refcount host->clk_requests so the
> clock is not gated across these sections.
> 
> If you think the names of the functions are confusing then
> you may rename them, say like this:
> 
> mmc_host_clk_ungate() -> mmc_host_clk_hold()
> mmc_host_clk_gate() -> mmc_host_clk_release()
> 
> Which would make the usecases more clear, I'd be happy
> to ACK a patch for this.

I agree, I'll cook a patch for that also.

Thanks for the comments.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ