Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1201285 > unrolled thread

Re: [PATCH v3 3/5] ARM: mediatek: add smp bringup code

Started byRussell King - ARM Linux <linux@arm.linux.org.uk>
First post2015-08-06 00:30 +0200
Last post2015-08-06 00:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v3 3/5] ARM: mediatek: add smp bringup code Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-08-06 00:30 +0200

#1201285 — Re: [PATCH v3 3/5] ARM: mediatek: add smp bringup code

FromRussell King - ARM Linux <linux@arm.linux.org.uk>
Date2015-08-06 00:30 +0200
SubjectRe: [PATCH v3 3/5] ARM: mediatek: add smp bringup code
Message-ID<pUfma-6lp-3@gated-at.bofh.it>
On Tue, Jul 14, 2015 at 01:18:29PM +0800, Yingjoe Chen wrote:
> +static void __init __mtk_smp_prepare_cpus(unsigned int max_cpus, int trustzone)
> +{
> +	int i, num;
> +	const struct of_device_id *infos;
> +
> +	if (trustzone) {
> +		num = ARRAY_SIZE(mtk_tz_smp_boot_infos);
> +		infos = mtk_tz_smp_boot_infos;
> +	} else {
> +		num = ARRAY_SIZE(mtk_smp_boot_infos);
> +		infos = mtk_smp_boot_infos;
> +	}
> +
> +	/* Find smp boot info for this SoC */
> +	for (i = 0; i < num; i++) {
> +		if (of_machine_is_compatible(infos[i].compatible)) {
> +			mtk_smp_info = infos[i].data;
> +			break;
> +		}
> +	}
> +
> +	if (!mtk_smp_info) {
> +		pr_err("%s: Device is not supported\n", __func__);
> +		return;
> +	}
> +
> +	if (trustzone) {
> +		if (memblock_reserve(mtk_smp_info->smp_base, MTK_SMP_REG_SIZE)) {

Strong NAK.

This is _FAR_ too late to be calling memblock_reserve().  You won't be
reserving memory as you think you are (it's already handed over to the
kernel's allocators by this stage.)

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web