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: <4816076.vmWnA5VvTb@diego>
Date:	Tue, 21 Apr 2015 16:56:46 +0200
From:	Heiko Stübner <heiko@...ech.de>
To:	linux-arm-kernel@...ts.infradead.org
Cc:	Masahiro Yamada <yamada.masahiro@...ionext.com>,
	Olof Johansson <olof@...om.net>, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH v4 1/4] ARM: UniPhier: add basic support for UniPhier architecture

Am Dienstag, 21. April 2015, 16:21:27 schrieb Masahiro Yamada:
> Initial commit for a new SoC family, UniPhier, developed by
> Socionext Inc. (formerly, System LSI Business Division of
> Panasonic Corporation).
> 
> This commit includes a minimal set of components for booting the
> kernel, including SMP support.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
> ---

[...]

> +static int uniphier_boot_secondary(unsigned int cpu,
> +				   struct task_struct *idle)
> +{
> +	struct regmap *sbcm_regmap;
> +	int ret;
> +
> +	sbcm_regmap = syscon_regmap_lookup_by_compatible(
> +			"socionext,uniphier-system-bus-controller-misc");
> +	if (IS_ERR(sbcm_regmap)) {
> +		pr_err("failed to regmap system-bus-controller-misc\n");
> +		return PTR_ERR(sbcm_regmap);
> +	}
> +
> +	ret = regmap_write(sbcm_regmap, 0x1208,
> +			   virt_to_phys(uniphier_secondary_startup));
> +	if (!ret)
> +		asm("sev"); /* wake up secondary CPU */
> +
> +	return ret;
> +}
> +
> +struct smp_operations uniphier_smp_ops __initdata = {
> +	.smp_prepare_cpus	= uniphier_smp_prepare_cpus,
> +	.smp_boot_secondary	= uniphier_boot_secondary,
> +};

this is more of a drive-by comment, but you're doing the syscon lookup on 
every boot of a core, which includes walking big parts of the devicetree every 
time.

Is there anything speaking against doing this once in a .smp_prepare_cpus 
callback?


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