From: Jon Medhurst Date: Wed, 17 Jul 2013 11:02:02 +0000 (+0100) Subject: Merge branch 'tracking-armlt-psci' into lsk-3.10-vexpress X-Git-Tag: firefly_0821_release~3680^2~236^2^2~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=20b22bdf99d678c928dc67fc9b24181e44975329;p=firefly-linux-kernel-4.4.55.git Merge branch 'tracking-armlt-psci' into lsk-3.10-vexpress Conflicts: arch/arm/kernel/psci.c --- 20b22bdf99d678c928dc67fc9b24181e44975329 diff --cc arch/arm/include/asm/psci.h index c4ae171850f8,a079cbee4275..f0a8627c9f1c --- a/arch/arm/include/asm/psci.h +++ b/arch/arm/include/asm/psci.h @@@ -32,14 -36,13 +36,22 @@@ struct psci_operations }; extern struct psci_operations psci_ops; +extern struct smp_operations psci_smp_ops; + +#ifdef CONFIG_ARM_PSCI +void psci_init(void); +bool psci_smp_available(void); +#else +static inline void psci_init(void) { } +static inline bool psci_smp_available(void) { return false; } +#endif + #ifdef CONFIG_ARM_PSCI + extern int __init psci_probe(void); + #else + static inline int psci_probe(void) + { + return -ENODEV; + } + #endif #endif /* __ASM_ARM_PSCI_H */ diff --cc arch/arm/kernel/psci.c index 46931880093d,1180801468d8..0daf4f252284 --- a/arch/arm/kernel/psci.c +++ b/arch/arm/kernel/psci.c @@@ -164,9 -173,12 +173,12 @@@ void __init psci_init(void const char *method; u32 id; + if (psci == PSCI_SUP_DISABLED) - return 0; ++ return; + np = of_find_matching_node(NULL, psci_of_match); if (!np) - return 0; + return; pr_info("probing function IDs from device-tree\n"); @@@ -206,5 -218,36 +218,35 @@@ out_put_node: of_node_put(np); - return 0; + return; } -early_initcall(psci_init); + + int __init psci_probe(void) + { + struct device_node *np; + int ret = -ENODEV; + + if (psci == PSCI_SUP_ENABLED) { + np = of_find_matching_node(NULL, psci_of_match); + if (np) + ret = 0; + } + + of_node_put(np); + return ret; + } + + static int __init early_psci(char *val) + { + int ret = 0; + + if (strcmp(val, "enable") == 0) + psci = PSCI_SUP_ENABLED; + else if (strcmp(val, "disable") == 0) + psci = PSCI_SUP_DISABLED; + else + ret = -EINVAL; + + return ret; + } + early_param("psci", early_psci);