@@ -7,6 +7,7 @@
#include <xen/vmap.h>
#include <asm/io.h>
#include <asm/psci.h>
+#include <asm/acpi.h>
struct smp_enable_ops {
int (*prepare_cpu)(int);
@@ -96,7 +97,11 @@ static int __init dt_arch_cpu_init(int cpu, struct dt_device_node *dn)
int __init arch_cpu_init(int cpu, struct dt_device_node *dn)
{
- return dt_arch_cpu_init(cpu, dn);
+ if( acpi_disabled )
+ return dt_arch_cpu_init(cpu, dn);
+ else
+ /* acpi only supports psci at present */
+ return smp_psci_init(cpu);
}
int __init arch_cpu_up(int cpu)
@@ -22,6 +22,7 @@
#include <xen/mm.h>
#include <xen/smp.h>
#include <asm/psci.h>
+#include <asm/acpi.h>
/*
* While a 64-bit OS can make calls with SMC32 calling conventions, for
@@ -86,6 +87,9 @@ int __init psci_init_0_1(void)
int ret;
const struct dt_device_node *psci;
+ if ( !acpi_disabled )
+ return -EINVAL;
+
psci = dt_find_compatible_node(NULL, NULL, "arm,psci");
if ( !psci )
return -EOPNOTSUPP;
@@ -116,15 +120,24 @@ int __init psci_init_0_2(void)
{ /* sentinel */ },
};
int ret;
- const struct dt_device_node *psci;
- psci = dt_find_matching_node(NULL, psci_ids);
- if ( !psci )
- return -EOPNOTSUPP;
+ if( acpi_disabled )
+ {
+ const struct dt_device_node *psci;
- ret = psci_is_smc_method(psci);
- if ( ret )
- return -EINVAL;
+ psci = dt_find_matching_node(NULL, psci_ids);
+ if ( !psci )
+ return -EOPNOTSUPP;
+
+ ret = psci_is_smc_method(psci);
+ if ( ret )
+ return -EINVAL;
+ }
+ else
+ {
+ if ( acpi_psci_hvc_present() )
+ return -EINVAL;
+ }
psci_ver = call_smc(PSCI_0_2_FN_PSCI_VERSION, 0, 0, 0);
@@ -148,6 +161,9 @@ int __init psci_init(void)
{
int ret;
+ if( !acpi_disabled && !acpi_psci_present() )
+ return -EOPNOTSUPP;
+
ret = psci_init_0_2();
if ( ret )
ret = psci_init_0_1();
@@ -31,6 +31,7 @@
#include <xen/console.h>
#include <asm/gic.h>
#include <asm/psci.h>
+#include <asm/acpi.h>
cpumask_t cpu_online_map;
cpumask_t cpu_present_map;
@@ -247,7 +248,11 @@ void __init smp_init_cpus(void)
return;
}
- dt_smp_init_cpus();
+ if ( acpi_disabled )
+ dt_smp_init_cpus();
+ else
+ acpi_smp_init_cpus();
+
}
int __init