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: <20140627120816.GD23978@titan.lakedaemon.net>
Date:	Fri, 27 Jun 2014 08:08:16 -0400
From:	Jason Cooper <jason@...edaemon.net>
To:	Gregory CLEMENT <gregory.clement@...e-electrons.com>
Cc:	Andrew Lunn <andrew@...n.ch>,
	Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
	Russell King <linux@....linux.org.uk>,
	Shawn Guo <shawn.guo@...escale.com>,
	Sascha Hauer <kernel@...gutronix.de>,
	Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
	Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>,
	linux-arm-kernel@...ts.infradead.org,
	Lior Amsalem <alior@...vell.com>,
	Tawfik Bayouk <tawfik@...vell.com>,
	Nadav Haklai <nadavh@...vell.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] ARM: smp_scu: Used defined value instead of
 literal constant

Gregory,

Since you'll be resending this:

On Fri, Jun 27, 2014 at 12:55:47AM +0200, Gregory CLEMENT wrote:
> On 27/06/2014 00:43, Gregory CLEMENT wrote:
> > The first bit of the SCU control register is actually the enable
> > it. So let's name it instead of using literal constant.

nit: s/^it/bit/

thx,

Jason.

> > 
> > Signed-off-by: Gregory CLEMENT <gregory.clement@...e-electrons.com>
> > ---
> >  arch/arm/kernel/smp_scu.c | 10 ++++++----
> >  1 file changed, 6 insertions(+), 4 deletions(-)
> > 
> > diff --git a/arch/arm/kernel/smp_scu.c b/arch/arm/kernel/smp_scu.c
> > index 1aafa0d785eb..cfea41b41ad0 100644
> > --- a/arch/arm/kernel/smp_scu.c
> > +++ b/arch/arm/kernel/smp_scu.c
> > @@ -17,6 +17,7 @@
> >  #include <asm/cputype.h>
> >  
> >  #define SCU_CTRL		0x00
> > +#define SCU_CTRL_ENABLE		    BIT(1)
> 
> As Ezequiel rightly pointed it to me, this line is obviously wrong!
> it should be
> +#define SCU_CTRL_ENABLE		    BIT(0)
> 
> >  #define SCU_CONFIG		0x04
> >  #define SCU_CPU_STATUS		0x08
> >  #define SCU_INVALIDATE		0x0c
> > @@ -43,17 +44,18 @@ void scu_enable(void __iomem *scu_base)
> >  	/* Cortex-A9 only */
> >  	if ((read_cpuid_id() & 0xff0ffff0) == 0x410fc090) {
> >  		scu_ctrl = readl_relaxed(scu_base + 0x30);
> > -		if (!(scu_ctrl & 1))
> > -			writel_relaxed(scu_ctrl | 0x1, scu_base + 0x30);
> > +		if (!(scu_ctrl & SCU_CTRL_ENABLE))
> > +			writel_relaxed(scu_ctrl | SCU_CTRL_ENABLE,
> > +				scu_base + 0x30);
> >  	}
> >  #endif
> >  
> >  	scu_ctrl = readl_relaxed(scu_base + SCU_CTRL);
> >  	/* already enabled? */
> > -	if (scu_ctrl & 1)
> > +	if (scu_ctrl & SCU_CTRL_ENABLE)
> >  		return;
> >  
> > -	scu_ctrl |= 1;
> > +	scu_ctrl |= SCU_CTRL_ENABLE;
> >  	writel_relaxed(scu_ctrl, scu_base + SCU_CTRL);
> >  
> >  	/*
> > 
> 
> 
> -- 
> Gregory Clement, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
--
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