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]
Message-ID: <20150604194422.GF676@codeaurora.org>
Date:	Thu, 4 Jun 2015 12:44:22 -0700
From:	Stephen Boyd <sboyd@...eaurora.org>
To:	Ezequiel Garcia <ezequiel.garcia@...tec.com>
Cc:	linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org,
	Mike Turquette <mturquette@...aro.org>,
	Andrew Bresticker <abrestic@...omium.org>,
	James Hartley <james.hartley@...tec.com>,
	James Hogan <james.hogan@...tec.com>, cernekee@...omium.org,
	Govindraj.Raja@...tec.com, Damien.Horsley@...tec.com
Subject: Re: [PATCH 1/3] clk: pistachio: Add a pll_lock() helper for clarity

On 05/26, Ezequiel Garcia wrote:
> This commit adds a pll_lock() helper making the code more readable.
> Cosmetic change only, no functionality changes.
> 
> Signed-off-by: Andrew Bresticker <abrestic@...omium.org>
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@...tec.com>
> ---

Applied to clk-next.

>  drivers/clk/pistachio/clk-pll.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/clk/pistachio/clk-pll.c b/drivers/clk/pistachio/clk-pll.c
> index de53756..9ce1be7 100644
> --- a/drivers/clk/pistachio/clk-pll.c
> +++ b/drivers/clk/pistachio/clk-pll.c
> @@ -67,6 +67,12 @@ static inline void pll_writel(struct pistachio_clk_pll *pll, u32 val, u32 reg)
>  	writel(val, pll->base + reg);
>  }
>  
> +static inline void pll_lock(struct pistachio_clk_pll *pll)
> +{
> +	while (!(pll_readl(pll, PLL_STATUS) & PLL_STATUS_LOCK))
> +		cpu_relax();

The patch is fine, but I wonder if we shouldn't have a timeout
here in case the PLL fails to lock.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
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