[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202212240114.uheodH4X-lkp@intel.com>
Date: Sat, 24 Dec 2022 01:21:49 +0800
From: kernel test robot <lkp@...el.com>
To: Elliot Berman <quic_eberman@...cinc.com>,
Bjorn Andersson <quic_bjorande@...cinc.com>,
Andy Gross <agross@...nel.org>,
Konrad Dybcio <konrad.dybcio@...ainline.org>
Cc: oe-kbuild-all@...ts.linux.dev,
Elliot Berman <quic_eberman@...cinc.com>,
Murali Nalajala <quic_mnalajal@...cinc.com>,
Trilok Soni <quic_tsoni@...cinc.com>,
Srivatsa Vaddagiri <quic_svaddagi@...cinc.com>,
Carl van Schaik <quic_cvanscha@...cinc.com>,
Prakruthi Deepak Heragu <quic_pheragu@...cinc.com>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Jonathan Corbet <corbet@....net>,
Bagas Sanjaya <bagasdotme@...il.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Jassi Brar <jassisinghbrar@...il.com>,
Sudeep Holla <sudeep.holla@....com>,
Mark Rutland <mark.rutland@....com>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-acpi@...r.kernel.org
Subject: Re: [PATCH v8 19/28] firmware: qcom_scm: Register Gunyah platform ops
Hi Elliot,
I love your patch! Perhaps something to improve:
[auto build test WARNING on 830b3c68c1fb1e9176028d02ef86f3cf76aa2476]
url: https://github.com/intel-lab-lkp/linux/commits/Elliot-Berman/Drivers-for-gunyah-hypervisor/20221220-073053
base: 830b3c68c1fb1e9176028d02ef86f3cf76aa2476
patch link: https://lore.kernel.org/r/20221219225850.2397345-20-quic_eberman%40quicinc.com
patch subject: [PATCH v8 19/28] firmware: qcom_scm: Register Gunyah platform ops
config: sparc-randconfig-s032-20221218
compiler: sparc64-linux-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://github.com/intel-lab-lkp/linux/commit/6392217a770e8f1e373e8d365fd9dcce58d8eeb3
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Elliot-Berman/Drivers-for-gunyah-hypervisor/20221220-073053
git checkout 6392217a770e8f1e373e8d365fd9dcce58d8eeb3
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc SHELL=/bin/bash drivers/firmware/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/firmware/qcom_scm.c:1310:47: sparse: sparse: restricted __le16 degrades to integer
>> drivers/firmware/qcom_scm.c:1311:43: sparse: sparse: incorrect type in assignment (different base types) @@ expected int vmid @@ got restricted __le16 [usertype] vmid @@
drivers/firmware/qcom_scm.c:1311:43: sparse: expected int vmid
drivers/firmware/qcom_scm.c:1311:43: sparse: got restricted __le16 [usertype] vmid
>> drivers/firmware/qcom_scm.c:1326:69: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] mem_addr @@ got restricted __le64 [usertype] ipa_base @@
drivers/firmware/qcom_scm.c:1326:69: sparse: expected unsigned long long [usertype] mem_addr
drivers/firmware/qcom_scm.c:1326:69: sparse: got restricted __le64 [usertype] ipa_base
>> drivers/firmware/qcom_scm.c:1327:75: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned long [usertype] mem_sz @@ got restricted __le64 [usertype] size @@
drivers/firmware/qcom_scm.c:1327:75: sparse: expected unsigned long [usertype] mem_sz
drivers/firmware/qcom_scm.c:1327:75: sparse: got restricted __le64 [usertype] size
drivers/firmware/qcom_scm.c:1332:63: sparse: sparse: restricted __le16 degrades to integer
drivers/firmware/qcom_scm.c:1333:83: sparse: sparse: restricted __le16 degrades to integer
drivers/firmware/qcom_scm.c:1342:85: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] mem_addr @@ got restricted __le64 [usertype] ipa_base @@
drivers/firmware/qcom_scm.c:1342:85: sparse: expected unsigned long long [usertype] mem_addr
drivers/firmware/qcom_scm.c:1342:85: sparse: got restricted __le64 [usertype] ipa_base
drivers/firmware/qcom_scm.c:1343:91: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned long [usertype] mem_sz @@ got restricted __le64 [usertype] size @@
drivers/firmware/qcom_scm.c:1343:91: sparse: expected unsigned long [usertype] mem_sz
drivers/firmware/qcom_scm.c:1343:91: sparse: got restricted __le64 [usertype] size
drivers/firmware/qcom_scm.c:1366:47: sparse: sparse: restricted __le16 degrades to integer
drivers/firmware/qcom_scm.c:1367:67: sparse: sparse: restricted __le16 degrades to integer
drivers/firmware/qcom_scm.c:1373:69: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] mem_addr @@ got restricted __le64 [usertype] ipa_base @@
drivers/firmware/qcom_scm.c:1373:69: sparse: expected unsigned long long [usertype] mem_addr
drivers/firmware/qcom_scm.c:1373:69: sparse: got restricted __le64 [usertype] ipa_base
drivers/firmware/qcom_scm.c:1374:75: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned long [usertype] mem_sz @@ got restricted __le64 [usertype] size @@
drivers/firmware/qcom_scm.c:1374:75: sparse: expected unsigned long [usertype] mem_sz
drivers/firmware/qcom_scm.c:1374:75: sparse: got restricted __le64 [usertype] size
vim +1310 drivers/firmware/qcom_scm.c
1298
1299 static int qcom_scm_gh_rm_pre_mem_share(struct gh_rm_rpc *rm, struct gh_rm_mem_parcel *mem_parcel)
1300 {
1301 struct qcom_scm_vmperm *new_perms;
1302 u64 src, src_cpy;
1303 int ret = 0, i, n;
1304
1305 new_perms = kcalloc(mem_parcel->n_acl_entries, sizeof(*new_perms), GFP_KERNEL);
1306 if (!new_perms)
1307 return -ENOMEM;
1308
1309 for (n = 0; n < mem_parcel->n_acl_entries; n++) {
> 1310 if (mem_parcel->acl_entries[n].vmid <= QCOM_SCM_MAX_MANAGED_VMID)
> 1311 new_perms[n].vmid = mem_parcel->acl_entries[n].vmid;
1312 else
1313 new_perms[n].vmid = QCOM_SCM_RM_MANAGED_VMID;
1314 if (mem_parcel->acl_entries[n].perms & GH_RM_ACL_X)
1315 new_perms[n].perm |= QCOM_SCM_PERM_EXEC;
1316 if (mem_parcel->acl_entries[n].perms & GH_RM_ACL_W)
1317 new_perms[n].perm |= QCOM_SCM_PERM_WRITE;
1318 if (mem_parcel->acl_entries[n].perms & GH_RM_ACL_R)
1319 new_perms[n].perm |= QCOM_SCM_PERM_READ;
1320 }
1321
1322 src = (1ull << QCOM_SCM_VMID_HLOS);
1323
1324 for (i = 0; i < mem_parcel->n_mem_entries; i++) {
1325 src_cpy = src;
> 1326 ret = qcom_scm_assign_mem(mem_parcel->mem_entries[i].ipa_base,
> 1327 mem_parcel->mem_entries[i].size,
1328 &src_cpy, new_perms, mem_parcel->n_acl_entries);
1329 if (ret) {
1330 src = 0;
1331 for (n = 0; n < mem_parcel->n_acl_entries; n++) {
1332 if (mem_parcel->acl_entries[n].vmid <= QCOM_SCM_MAX_MANAGED_VMID)
1333 src |= (1ull << mem_parcel->acl_entries[n].vmid);
1334 else
1335 src |= (1ull << QCOM_SCM_RM_MANAGED_VMID);
1336 }
1337
1338 new_perms[0].vmid = QCOM_SCM_VMID_HLOS;
1339
1340 for (i--; i >= 0; i--) {
1341 src_cpy = src;
1342 ret = qcom_scm_assign_mem(mem_parcel->mem_entries[i].ipa_base,
1343 mem_parcel->mem_entries[i].size,
1344 &src_cpy, new_perms, 1);
1345 WARN_ON_ONCE(ret);
1346 }
1347 break;
1348 }
1349 }
1350
1351 kfree(new_perms);
1352 return ret;
1353 }
1354
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (182323 bytes)
Powered by blists - more mailing lists