Skip to contentSkip to conversation

x86: correct bogus error indicator of cpu_add()

PATCH In review Jan Beulich 3 participants 3 messages Sep 27, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: correct bogus error indicator of cpu_add()

Commit 54ce2db8b8 ("x86/numa: adjust datatypes for node and pxm") changed this from the -1 (i.e. -EPERM, which was already bogus) that comes back from setup_node() to NUMA_NO_NODE (0xff). Use a proper error indicator instead.

xen/arch/x86/smpboot.c +1 -1
@@ -1281,7 +1281,7 @@ int cpu_add(uint32_t apic_id, uint32_t a
                     "Setup node failed for pxm %x\n", pxm);
             x86_acpiid_to_apicid[acpi_id] = BAD_APICID;
             mp_unregister_lapic(apic_id, cpu);
-            cpu = node;
+            cpu = -ENOSPC;
             goto out;
         }
         if ( apic_id < MAX_LOCAL_APIC )

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Jan Beulich

Commit 54ce2db8b8 ("x86/numa: adjust datatypes for node and pxm") changed this from the -1 (i.e. -EPERM, which was already bogus) that comes back from setup_node() to NUMA_NO_NODE (0xff). Use a proper error indicator instead.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#2 lore raw
In reply to Jan Beulich
Quoted 6 lines · Jan Beulich

Commit 54ce2db8b8 ("x86/numa: adjust datatypes for node and pxm") changed this from the -1 (i.e. -EPERM, which was already bogus) that comes back from setup_node() to NUMA_NO_NODE (0xff). Use a proper error indicator instead.

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel