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:	Fri, 11 Nov 2011 13:54:37 -0800
From:	Stephen Warren <swarren@...dia.com>
To:	Jamie Iles <jamie@...ieiles.com>,
	Peter De Schrijver <pdeschrijver@...dia.com>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
	Colin Cross <ccross@...roid.com>,
	Olof Johansson <olof@...om.net>,
	Russell King <linux@....linux.org.uk>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: RE: [PATCH v4 04/10] arm/tegra: prepare early init for multiple
 tegra variants

Jamie Iles wrote at Friday, November 11, 2011 4:45 AM:
> On Fri, Nov 11, 2011 at 01:22:10PM +0200, Peter De Schrijver wrote:
> > This patch splits the early init code in a common and a tegra20 specific part.
> > L2 cache initialization is generalized and discovers the cache associativity
> > at runtime. Also use arm_pm_restart instead of arm_arch_reset and reset the
> > the system using the PMC reset feature rather then the CAR system reset.
...
> > diff --git a/arch/arm/mach-tegra/board-dt.c b/arch/arm/mach-tegra/board-dt.c
...
> > +static struct {
> > +	const char *machine;
> > +	void (*init)(void);
> > +} early_init[] __initdata = {
> > +#ifdef CONFIG_ARCH_TEGRA_2x_SOC
> > +	{ "nvidia,tegra20", tegra20_init_early },
> > +#endif
> > +};
> > +
> > +static void __init tegra_init_early(void)
> > +{
> > +
> > +	int i;
> > +
> > +	for (i = 0; i < ARRAY_SIZE(early_init); i++)
> > +		if (of_machine_is_compatible(early_init[i].machine))
> > +			return early_init[i].init();
> > +
> > +	pr_warn("Unknown platform detected\n");
> > +}
> 
> Wouldn't it be better just to have separate machine descs for tegra20
> and tegra30 and have a different .init_early for each?  I'm not sure
> that this extra indirection buys us much, especially if we had to repeat
> it for any of the other entries.

Jamie, thanks for pointing that. I think that does sound a lot simpler.

-- 
nvpublic

--
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