Message ID | 20220122035421.4086618-2-f.fainelli@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Broadcom STB PM PSCI extensions | expand |
Hi Florian, I love your patch! Yet something to improve: [auto build test ERROR on arm/for-next] [also build test ERROR on soc/for-next arm64/for-next/core clk/clk-next linus/master v5.16 next-20220121] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Florian-Fainelli/Broadcom-STB-PM-PSCI-extensions/20220122-115551 base: git://git.armlinux.org.uk/~rmk/linux-arm.git for-next config: arm64-randconfig-r011-20220120 (https://download.01.org/0day-ci/archive/20220122/202201221911.EEIlXDWO-lkp@intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 7b3d30728816403d1fd73cc5082e9fb761262bce) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-linux-gnu # https://github.com/0day-ci/linux/commit/488fbdb7de4d39409045b679db3e370600a774d4 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Florian-Fainelli/Broadcom-STB-PM-PSCI-extensions/20220122-115551 git checkout 488fbdb7de4d39409045b679db3e370600a774d4 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): >> ld.lld: error: undefined symbol: cpu_suspend >>> referenced by psci.c >>> firmware/psci/psci.o:(psci_system_suspend_enter) in archive drivers/built-in.a -- >> ld.lld: error: undefined symbol: cpu_resume >>> referenced by psci.c >>> firmware/psci/psci.o:(psci_system_suspend) in archive drivers/built-in.a >>> referenced by psci.c >>> firmware/psci/psci.o:(psci_system_suspend) in archive drivers/built-in.a --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c index cfb448eabdaa..9a60e340c248 100644 --- a/drivers/firmware/psci/psci.c +++ b/drivers/firmware/psci/psci.c @@ -355,7 +355,13 @@ int psci_cpu_suspend_enter(u32 state) return ret; } +#else +int psci_cpu_suspend_enter(u32 state) +{ + return -EOPNOTSUPP; +} #endif +EXPORT_SYMBOL_GPL(psci_cpu_suspend_enter); static int psci_system_suspend(unsigned long unused) { @@ -365,10 +371,11 @@ static int psci_system_suspend(unsigned long unused) pa_cpu_resume, 0, 0); } -static int psci_system_suspend_enter(suspend_state_t state) +int psci_system_suspend_enter(suspend_state_t state) { return cpu_suspend(0, psci_system_suspend); } +EXPORT_SYMBOL_GPL(psci_system_suspend_enter); static const struct platform_suspend_ops psci_suspend_ops = { .valid = suspend_valid_only_mem, diff --git a/include/linux/psci.h b/include/linux/psci.h index 4ca0060a3fc4..ffeba6b08e10 100644 --- a/include/linux/psci.h +++ b/include/linux/psci.h @@ -9,6 +9,7 @@ #include <linux/arm-smccc.h> #include <linux/init.h> +#include <linux/suspend.h> #include <linux/types.h> #define PSCI_POWER_STATE_TYPE_STANDBY 0 @@ -17,6 +18,7 @@ bool psci_tos_resident_on(int cpu); int psci_cpu_suspend_enter(u32 state); +int psci_system_suspend_enter(suspend_state_t state); bool psci_power_state_is_valid(u32 state); int psci_set_osi_mode(bool enable); bool psci_has_osi_support(void);
Export psci_system_suspend_enter() and psci_cpu_suspend_enter() for the Broadcom STB PSCI extension to be usable and built as a loadable module. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> --- drivers/firmware/psci/psci.c | 9 ++++++++- include/linux/psci.h | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-)