{"action":"closed","issue":{"url":"https://api.github.com/repos/MiCode/Xiaomi_Kernel_OpenSource/issues/1186","repository_url":"https://api.github.com/repos/MiCode/Xiaomi_Kernel_OpenSource","labels_url":"https://api.github.com/repos/MiCode/Xiaomi_Kernel_OpenSource/issues/1186/labels{/name}","comments_url":"https://api.github.com/repos/MiCode/Xiaomi_Kernel_OpenSource/issues/1186/comments","events_url":"https://api.github.com/repos/MiCode/Xiaomi_Kernel_OpenSource/issues/1186/events","html_url":"https://github.com/MiCode/Xiaomi_Kernel_OpenSource/issues/1186","id":548399512,"node_id":"MDU6SXNzdWU1NDgzOTk1MTI=","number":1186,"title":"/drivers/soc/qcom/scm.c:199:22: error: unknown register name 'r0' in asm","user":{"login":"senlinmuvs","id":5374554,"node_id":"MDQ6VXNlcjUzNzQ1NTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/5374554?v=4","gravatar_id":"","url":"https://api.github.com/users/senlinmuvs","html_url":"https://github.com/senlinmuvs","followers_url":"https://api.github.com/users/senlinmuvs/followers","following_url":"https://api.github.com/users/senlinmuvs/following{/other_user}","gists_url":"https://api.github.com/users/senlinmuvs/gists{/gist_id}","starred_url":"https://api.github.com/users/senlinmuvs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senlinmuvs/subscriptions","organizations_url":"https://api.github.com/users/senlinmuvs/orgs","repos_url":"https://api.github.com/users/senlinmuvs/repos","events_url":"https://api.github.com/users/senlinmuvs/events{/privacy}","received_events_url":"https://api.github.com/users/senlinmuvs/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2020-01-11T08:13:57Z","updated_at":"2020-01-11T10:06:33Z","closed_at":"2020-01-11T10:06:33Z","author_association":"NONE","body":"**Host:** ubuntu 18.04\r\n**Phone:** Mi8SE - (sirius) - (SDM710)\r\n**Toolchain used:** \r\nhttps://developer.qualcomm.com/download/sdllvm/snapdragon-llvm-compiler-android-linux64-609.tar.gz\r\n**ENV:**\r\n```\r\nexport PATH=$PATH:/lineage/prebuilts/snapdragon-llvm-6.0.9-linux64/toolchains/llvm-Snapdragon_LLVM_for_Android_6.0/prebuilt/linux-x86_64/bin\r\nexport PATH=$PATH:/lineage/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin\r\nexport ARCH=arm64\r\nexport SUBARCH=arm64\r\nexport DTC_EXT=dtc\r\nexport CROSS_COMPILE=aarch64-linux-android-\r\n```\r\n\r\n**Make:**\r\n```\r\nmake O=out REAL_CC=clang CLANG_TRIPLE=aarch64-linux-gnu- sirius_user_defconfig\r\n\r\nmake -j$(nproc) O=out REAL_CC=clang CLANG_TRIPLE=aarch64-linux-gnu- 2>&1 | tee kernel.log\r\n```\r\n\r\n**ERROR:**\r\n```\r\n5277 ../drivers/soc/qcom/scm.c:199:22: error: unknown register name 'r0' in asm\r\n5278         register u32 r0 asm(\"r0\") = 1;\r\n5279                             ^\r\n5280 ../drivers/soc/qcom/scm.c:200:22: error: unknown register name 'r1' in asm\r\n5281         register u32 r1 asm(\"r1\") = (uintptr_t)&context_id;\r\n5282                             ^\r\n5283 ../drivers/soc/qcom/scm.c:201:22: error: unknown register name 'r2' in asm\r\n5284         register u32 r2 asm(\"r2\") = cmd_addr;\r\n5285                             ^`\r\n```\r\n\r\n**Related Code:**\r\n```\r\n 196 static u32 smc(u32 cmd_addr)\r\n 197 {\r\n 198     int context_id;\r\n 199     register u32 r0 asm(\"r0\") = 1;\r\n 200     register u32 r1 asm(\"r1\") = (uintptr_t)&context_id;\r\n 201     register u32 r2 asm(\"r2\") = cmd_addr;\r\n 202     do {\r\n 203         asm volatile(\r\n 204             __asmeq(\"%0\", R0_STR)\r\n 205             __asmeq(\"%1\", R0_STR)\r\n 206             __asmeq(\"%2\", R1_STR)\r\n 207             __asmeq(\"%3\", R2_STR)\r\n 208 #ifdef REQUIRES_SEC\r\n 209             \".arch_extension sec\\n\"\r\n 210 #endif\r\n 211             \"smc    #0\\n\"\r\n 212             : \"=r\" (r0)\r\n 213             : \"r\" (r0), \"r\" (r1), \"r\" (r2)\r\n 214             : \"r3\");\r\n 215     } while (r0 == SCM_INTERRUPTED);\r\n 216\r\n 217     return r0;\r\n 218 }\r\n```"}}
{"actor":{"display_login":"senlinmuvs"}}