#include <xen/vmap.h>
#include <asm/io.h>
#include <asm/psci.h>
+#include <asm/acpi.h>
struct smp_enable_ops {
int (*prepare_cpu)(int);
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)
#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
int ret;
const struct dt_device_node *psci;
+ if ( !acpi_disabled )
+ {
+ printk("PSCI 0.1 is not supported when using ACPI\n");
+ return -EINVAL;
+ }
+
psci = dt_find_compatible_node(NULL, NULL, "arm,psci");
if ( !psci )
return -EOPNOTSUPP;
{ /* 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() ) {
+ printk("PSCI conduit must be SMC, but is HVC\n");
+ return -EINVAL;
+ }
+ }
psci_ver = call_smc(PSCI_0_2_FN_PSCI_VERSION, 0, 0, 0);
{
int ret;
+ if ( !acpi_disabled && !acpi_psci_present() )
+ return -EOPNOTSUPP;
+
ret = psci_init_0_2();
if ( ret )
ret = psci_init_0_1();