soc/intel/xeon_sp: Call common soc_get_num_cpus()

Use a common function to get the number of CPUs for each soc. This
removes a #if for different function names in the common code.

Change-Id: I3348d37fcae72247731e465ec2a65d9583a2f180
Signed-off-by: Marc Jones <marcjones@sysproconsulting.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46970
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
diff --git a/src/soc/intel/xeon_sp/nb_acpi.c b/src/soc/intel/xeon_sp/nb_acpi.c
index 1329feb..5955fa0 100644
--- a/src/soc/intel/xeon_sp/nb_acpi.c
+++ b/src/soc/intel/xeon_sp/nb_acpi.c
@@ -121,13 +121,7 @@
 
 static unsigned long acpi_fill_slit(unsigned long current)
 {
-#if (CONFIG(SOC_INTEL_COOPERLAKE_SP))
-	unsigned int nodes = xeon_sp_get_socket_count();
-#endif /* SOC_INTEL_COOPERLAKE_SP */
-
-#if (CONFIG(SOC_INTEL_SKYLAKE_SP))
-	int nodes = get_cpu_count();
-#endif /* SOC_INTEL_SKYLAKE_SP */
+	unsigned int nodes = soc_get_num_cpus();
 
 	uint8_t *p = (uint8_t *)current;
 	memset(p, 0, 8 + nodes * nodes);