soc: qcom: QCOM_RPMH fix build with modular QCOM_RPMH
Subsystems (2)
PATCH 1/1 soc: qcom: QCOM_RPMH fix build with modular QCOM_RPMH
When building allmodconfig leading to the following link error with CONFIG_QCOM_RPMH=y and CONFIG_QCOM_COMMAND_DB=m:
aarch64-linux-gnu-ld: drivers/clk/qcom/clk-rpmh.o: in function `clk_rpmh_probe':
drivers/clk/qcom/clk-rpmh.c:474: undefined reference to cmd_db_read_addr' drivers/clk/qcom/clk-rpmh.c:474:(.text+0x254): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol cmd_db_read_addr'
Fix this by adding a Kconfig depenency and forcing QCOM_RPMH to be a module when QCOM_COMMAND_DB is a module. Also removing the dependency on 'ARCH_QCOM || COMPILE_TEST' since that is already a dependency for QCOM_COMMAND_DB.
--- drivers/soc/qcom/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/qcom/Kconfig +1 -1
@@ -109,7 +109,7 @@ config QCOM_RMTFS_MEM config QCOM_RPMH tristate "Qualcomm RPM-Hardened (RPMH) Communication" - depends on ARCH_QCOM || COMPILE_TEST + depends on QCOM_COMMAND_DB help Support for communication with the hardened-RPM blocks in Qualcomm Technologies Inc (QTI) SoCs. RPMH communication uses an
Signature · 1 line
2.28.0
Quoted 8 lines · Anders Roxell
When building allmodconfig leading to the following link error with
CONFIG_QCOM_RPMH=yandCONFIG_QCOM_COMMAND_DB=m:aarch64-linux-gnu-ld:
drivers/clk/qcom/clk-rpmh.o: in function `clk_rpmh_probe':
drivers/clk/qcom/clk-rpmh.c:474: undefined reference tocmd_db_read_addr' drivers/clk/qcom/clk-rpmh.c:474:(.text+0x254): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbolcmd_db_read_addr'
Quoted 7 lines
Fix this by adding a
Kconfigdepenency and forcingQCOM_RPMHto be a module whenQCOM_COMMAND_DBis a module. Also removing the dependency on 'ARCH_QCOM||COMPILE_TEST' since that is already a dependency forQCOM_COMMAND_DB.Fixes 778279f4f5e4 ("soc: qcom: cmd-db: allow loading as a module")Signed-off-by Anders Roxell <[email protected]>
This patch fixed the arm64 build error.
Quoted 9 lines
--- drivers/soc/qcom/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/soc/qcom/Kconfig +0
-0
drivers/soc/qcom/Kconfig config QCOM_RMTFS_MEM · line 115
Quoted 8 lines
drivers/soc/qcom/Kconfig +1
-1@@ -109,7 +109,7 @@ config QCOM_RMTFS_MEM config QCOM_RPMH tristate "Qualcomm RPM-Hardened (RPMH) Communication" - depends on ARCH_QCOM || COMPILE_TEST + depends on QCOM_COMMAND_DB help Support for communication with the hardened-RPM blocks in Qualcomm Technologies Inc (QTI) SoCs. RPMH communication uses an
Build error noticed on linux next 20201027 tag.
LD .tmp_vmlinux.kallsyms1
aarch64-linux-gnu-ld: Unexpected GOT/PLT entries detected!
aarch64-linux-gnu-ld: Unexpected run-time procedure linkages detected!
aarch64-linux-gnu-ld: drivers/clk/qcom/clk-rpmh.o: in function `clk_rpmh_probe':/home/naresh/kernel/next/linux-next/drivers/clk/qcom/clk-rpmh.c:474:
undefined reference to `cmd_db_read_addr'
aarch64-linux-gnu-ld:/home/naresh/kernel/next/linux-next/drivers/clk/qcom/clk-rpmh.c:481:
undefined reference to `cmd_db_read_aux_data'
aarch64-linux-gnu-ld: drivers/soc/qcom/rpmh-rsc.o: in function `rpmh_rsc_probe':/home/naresh/kernel/next/linux-next/drivers/soc/qcom/rpmh-rsc.c:948:
undefined reference to `cmd_db_ready'
aarch64-linux-gnu-ld: drivers/regulator/qcom-rpmh-regulator.o: in function `rpmh_regulator_init_vreg':/home/naresh/kernel/next/linux-next/drivers/regulator/qcom-rpmh-regulator.c:438:
undefined reference to `cmd_db_read_addr'
make: *** [Makefile:1164: vmlinux] Error 1
- Naresh
Hi Anders,
Quoted 26 lines · Anders Roxell
When building allmodconfig leading to the following link error with
CONFIG_QCOM_RPMH=yandCONFIG_QCOM_COMMAND_DB=m:aarch64-linux-gnu-ld:
drivers/clk/qcom/clk-rpmh.o: in function `clk_rpmh_probe':
drivers/clk/qcom/clk-rpmh.c:474: undefined reference tocmd_db_read_addr' drivers/clk/qcom/clk-rpmh.c:474:(.text+0x254): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbolcmd_db_read_addr'Fix this by adding a
Kconfigdepenency and forcingQCOM_RPMHto be a module whenQCOM_COMMAND_DBis a module. Also removing the dependency on 'ARCH_QCOM||COMPILE_TEST' since that is already a dependency forQCOM_COMMAND_DB.Fixes 778279f4f5e4 ("soc: qcom: cmd-db: allow loading as a module")Signed-off-by Anders Roxell <[email protected]>---
drivers/soc/qcom/Kconfig| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/soc/qcom/Kconfig +0
-0@@ -109,7 +109,7 @@ config QCOM_RMTFS_MEMconfig
QCOM_RPMH
tristate "Qualcomm RPM-Hardened (RPMH) Communication"
drivers/soc/qcom/Kconfig config QCOM_RMTFS_MEM · line 112
Quoted 2 lines
drivers/soc/qcom/Kconfig +1
-1- depends on ARCH_QCOM || COMPILE_TEST + depends on QCOM_COMMAND_DB
A solution was posted in the mailing list alredy -
https://lore.kernel.org/linux-arm-msm/[email protected]/
If you get a chance, please give that a shot to see if that works for you.
Thanks,
Lina
Quoted 6 lines
help
Support for communication with the hardened-RPM blocks in Qualcomm Technologies Inc (QTI) SoCs. RPMH communication uses anSignature · 1 line
2.28.0
Quoted 28 lines · Lina Iyer
Hi Anders,
Quoted 24 lines · Anders Roxell
When building allmodconfig leading to the following link error with
CONFIG_QCOM_RPMH=yandCONFIG_QCOM_COMMAND_DB=m:aarch64-linux-gnu-ld:
drivers/clk/qcom/clk-rpmh.o: in function `clk_rpmh_probe':
drivers/clk/qcom/clk-rpmh.c:474: undefined reference tocmd_db_read_addr' drivers/clk/qcom/clk-rpmh.c:474:(.text+0x254): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbolcmd_db_read_addr'Fix this by adding a
Kconfigdepenency and forcingQCOM_RPMHto be a module whenQCOM_COMMAND_DBis a module. Also removing the dependency on 'ARCH_QCOM||COMPILE_TEST' since that is already a dependency forQCOM_COMMAND_DB.Fixes 778279f4f5e4 ("soc: qcom: cmd-db: allow loading as a module")Signed-off-by Anders Roxell <[email protected]>---
drivers/soc/qcom/Kconfig| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/soc/qcom/Kconfig +0
-0@@ -109,7 +109,7 @@ config QCOM_RMTFS_MEM
Quoted 6 lines
drivers/soc/qcom/Kconfig config QCOM_RMTFS_MEM · line 112
Quoted 4 lines
config
QCOM_RPMH
tristate "Qualcomm RPM-Hardened (RPMH) Communication"drivers/soc/qcom/Kconfig +1
-1- depends on ARCH_QCOM || COMPILE_TEST + depends on QCOM_COMMAND_DBA solution was posted in the mailing list alredy -
https://lore.kernel.org/linux-arm-msm/[email protected]/
I missed that one, thanks.
Quoted 3 lines
If you get a chance, please give that a shot to see if that works for you.
That will work too, but the "depends on ARCH_QCOM || COMPILE_TEST" isn't needed since that is already the dependency for QCOM_COMMAND_DB. So that should be met here too or am I missing something?
Cheers,
Anders
Quoted 10 lines
Thanks,
LinaQuoted 6 lines
help
Support for communication with the hardened-RPM blocks in Qualcomm Technologies Inc (QTI) SoCs. RPMH communication uses an
--
2.28.0
Quoted 39 lines · Anders Roxell
Quoted 28 lines · Lina Iyer
Hi Anders,
Quoted 24 lines · Anders Roxell
When building allmodconfig leading to the following link error with
CONFIG_QCOM_RPMH=yandCONFIG_QCOM_COMMAND_DB=m:aarch64-linux-gnu-ld:
drivers/clk/qcom/clk-rpmh.o: in function `clk_rpmh_probe':
drivers/clk/qcom/clk-rpmh.c:474: undefined reference tocmd_db_read_addr' drivers/clk/qcom/clk-rpmh.c:474:(.text+0x254): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbolcmd_db_read_addr'Fix this by adding a
Kconfigdepenency and forcingQCOM_RPMHto be a module whenQCOM_COMMAND_DBis a module. Also removing the dependency on 'ARCH_QCOM||COMPILE_TEST' since that is already a dependency forQCOM_COMMAND_DB.Fixes 778279f4f5e4 ("soc: qcom: cmd-db: allow loading as a module")Signed-off-by Anders Roxell <[email protected]>---
drivers/soc/qcom/Kconfig| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/soc/qcom/Kconfig +0
-0@@ -109,7 +109,7 @@ config QCOM_RMTFS_MEMQuoted 6 lines
drivers/soc/qcom/Kconfig config QCOM_RMTFS_MEM · line 112
Quoted 4 lines
config
QCOM_RPMH
tristate "Qualcomm RPM-Hardened (RPMH) Communication"drivers/soc/qcom/Kconfig +1
-1- depends on ARCH_QCOM || COMPILE_TEST + depends on QCOM_COMMAND_DBA solution was posted in the mailing list alredy -
https://lore.kernel.org/linux-arm-msm/[email protected]/I missed that one, thanks.
Quoted 1 line
Quoted 7 lines
Quoted 2 lines
If you get a chance, please give that a shot to see if that works for you.
That will work too, but the "depends on
ARCH_QCOM||COMPILE_TEST" isn't needed since that is already the dependency forQCOM_COMMAND_DB. So that should be met here too or am I missing something?
Sure, if you want to post an update to the patch, that would be fine too.
Bjorn: Have you picked up this patch yet? If he hasn't please feel free to update the patch. Or, I can do that as well.
--Lina
Quoted 13 lines
Cheers,
AndersQuoted 10 lines
Thanks,
LinaQuoted 6 lines
help
Support for communication with the hardened-RPM blocks in Qualcomm Technologies Inc (QTI) SoCs. RPMH communication uses an
--
2.28.0