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] [day] [month] [year] [list]
Date:	Thu, 10 Dec 2009 10:31:57 +0000
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	Amit Kucheria <amit.kucheria@...onical.com>
Cc:	List Linux Kernel <linux-kernel@...r.kernel.org>,
	Dinh.Nguyen@...escale.com, s.hauer@...gutronix.de,
	grant.likely@...retlab.ca, r.herring@...escale.com,
	linux-arm-kernel@...ts.infradead.org, daniel@...aq.de,
	valentin.longchamp@...l.ch
Subject: Re: [RFC][PATCH 05/10] mxc: Add board support for the i.MX51
	babbage board

On Fri, Dec 04, 2009 at 04:47:05AM +0200, Amit Kucheria wrote:
> +#include <linux/init.h>
> +#include <linux/platform_device.h>
> +#include <mach/common.h>
> +#include <mach/hardware.h>
> +#include <asm/irq.h>
> +#include <asm/setup.h>
> +#include <asm/mach-types.h>
> +#include <asm/mach/arch.h>
> +#include <asm/mach/time.h>
> +#include <mach/memory.h>

No one should be including mach/memory.h.  Please remove it and find a
better include to use.  (mach/memory.h exists to provide asm/memory.h
with the platform specific bits it needs, so maybe asm/memory.h is
what you want here).

> +#define SPIN_DELAY	1000000 /* in nanoseconds */

That's 1ms.

> +	/* Wait for lock */
> +	getnstimeofday(&nstimeofday);
> +	while (!(__raw_readl(pllbase + MXC_PLL_DP_CTL) & MXC_PLL_DP_CTL_LRF)) {
> +		getnstimeofday(&curtime);

I doubt getnstimeofday is particularly light-weight, so I'm not sure
what you're gaining over a loop based around udelay() and counting the
iterations.

> +		if (curtime.tv_nsec - nstimeofday.tv_nsec > SPIN_DELAY)
> +			panic("pll relock failed\n");

Is a panic really justified?

> diff --git a/arch/arm/mach-mx5/mm.c b/arch/arm/mach-mx5/mm.c
> new file mode 100644
> index 0000000..b258917
> --- /dev/null
> +++ b/arch/arm/mach-mx5/mm.c
> @@ -0,0 +1,86 @@
> +/*
> + * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved.
> + *
> + * The code contained herein is licensed under the GNU General Public
> + * License.  You may obtain a copy of the GNU General Public License
> + * Version 2 or later at the following locations:
> + *
> + * http://www.opensource.org/licenses/gpl-license.html
> + * http://www.gnu.org/copyleft/gpl.html
> + *
> + * Create static mapping between physical to virtual memory.
> + */
> +
> +#include <linux/mm.h>
> +#include <linux/init.h>
> +#include <mach/hardware.h>
> +#include <asm/pgtable.h>

I don't see anything needing asm/pgtable.h in here.
--
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