]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
x86: Set APs' req_seq to the reg number from device tree
authorBin Meng <bmeng.cn@gmail.com>
Mon, 10 Aug 2015 06:58:39 +0000 (23:58 -0700)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 08:23:21 +0000 (10:23 +0200)
Multiple APs are brought up simultaneously and they may get the same
seq num in the uclass_resolve_seq() during device_probe(). To avoid
this, set req_seq to the reg number in the device tree in advance.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/mp_init.c

index 3294a50b760cd2ee76802733dd30a4fa1db1d58c..4334f5b3e5a89f722d384190ebe2bb4868ede5ae 100644 (file)
@@ -515,5 +515,12 @@ int mp_init(struct mp_params *p)
 
 int mp_init_cpu(struct udevice *cpu, void *unused)
 {
+       /*
+        * Multiple APs are brought up simultaneously and they may get the same
+        * seq num in the uclass_resolve_seq() during device_probe(). To avoid
+        * this, set req_seq to the reg number in the device tree in advance.
+        */
+       cpu->req_seq = fdtdec_get_int(gd->fdt_blob, cpu->of_offset, "reg", -1);
+
        return device_probe(cpu);
 }