Skip to contentSkip to conversation

x86: Set APs' req_seq to the reg number from device tree

PATCH New Bin Meng 2 participants 3 messages Aug 10, 2015 – Aug 14, 2015 x86

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/1 x86: Set APs' req_seq to the reg number from device tree

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.

---

 arch/x86/cpu/mp_init.c | 7 +++++++
 1 file changed, 7 insertions(+)
arch/x86/cpu/mp_init.c +7 -0
index 3294a50..4334f5b 100644
@@ -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);
 }
Signature · 1 line
1.8.2.1
#1 lore raw

PATCH 1/1 x86: Set APs' req_seq to the reg number from device tree

Quoted 9 lines · Bin Meng

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.

---

 arch/x86/cpu/mp_init.c | 7 +++++++
 1 file changed, 7 insertions(+)
#2 lore raw

PATCH 1/1 x86: Set APs' req_seq to the reg number from device tree

Quoted 5 lines · Simon Glass
Quoted 4 lines · Bin Meng

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.

Quoted 7 lines
Quoted 5 lines

---

 arch/x86/cpu/mp_init.c | 7 +++++++
 1 file changed, 7 insertions(+)

Applied to u-boot-x86, thanks!