Re: [PATCH v1 1/1] fpga: dfl: pci: Use pci_find_vsec_capability() when looking for DFL
by kernel test robot
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.15 next-20211112]
[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/Andy-Shevchenko/fpga-dfl-pci-Use...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git d2f38a3c6507b2520101f9a3807ed98f1bdc545a
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/dfc10076ac7a63331954a33cabf94a1af...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/fpga-dfl-pci-Use-pci_find_vsec_capability-when-looking-for-DFL/20211109-234228
git checkout dfc10076ac7a63331954a33cabf94a1af3632210
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/fpga/dfl-pci.c: In function 'find_dfls_by_vsec':
>> drivers/fpga/dfl-pci.c:146:34: error: 'dev' undeclared (first use in this function); did you mean 'cdev'?
146 | voff = pci_find_vsec_capability(dev, PCI_VENDOR_ID_INTEL, PCI_VSEC_ID_INTEL_DFLS);
| ^~~
| cdev
drivers/fpga/dfl-pci.c:146:34: note: each undeclared identifier is reported only once for each function it appears in
vim +146 drivers/fpga/dfl-pci.c
138
139 static int find_dfls_by_vsec(struct pci_dev *pcidev, struct dfl_fpga_enum_info *info)
140 {
141 u32 bir, offset, dfl_cnt, dfl_res;
142 resource_size_t start, len;
143 int dfl_res_off, i, bars;
144 u16 voff;
145
> 146 voff = pci_find_vsec_capability(dev, PCI_VENDOR_ID_INTEL, PCI_VSEC_ID_INTEL_DFLS);
147 if (!voff) {
148 dev_dbg(&pcidev->dev, "%s no DFL VSEC found\n", __func__);
149 return -ENODEV;
150 }
151
152 dfl_cnt = 0;
153 pci_read_config_dword(pcidev, voff + PCI_VNDR_DFLS_CNT, &dfl_cnt);
154 if (dfl_cnt > PCI_STD_NUM_BARS) {
155 dev_err(&pcidev->dev, "%s too many DFLs %d > %d\n",
156 __func__, dfl_cnt, PCI_STD_NUM_BARS);
157 return -EINVAL;
158 }
159
160 dfl_res_off = voff + PCI_VNDR_DFLS_RES;
161 if (dfl_res_off + (dfl_cnt * sizeof(u32)) > PCI_CFG_SPACE_EXP_SIZE) {
162 dev_err(&pcidev->dev, "%s DFL VSEC too big for PCIe config space\n",
163 __func__);
164 return -EINVAL;
165 }
166
167 for (i = 0, bars = 0; i < dfl_cnt; i++, dfl_res_off += sizeof(u32)) {
168 dfl_res = GENMASK(31, 0);
169 pci_read_config_dword(pcidev, dfl_res_off, &dfl_res);
170
171 bir = dfl_res & PCI_VNDR_DFLS_RES_BAR_MASK;
172 if (bir >= PCI_STD_NUM_BARS) {
173 dev_err(&pcidev->dev, "%s bad bir number %d\n",
174 __func__, bir);
175 return -EINVAL;
176 }
177
178 if (bars & BIT(bir)) {
179 dev_err(&pcidev->dev, "%s DFL for BAR %d already specified\n",
180 __func__, bir);
181 return -EINVAL;
182 }
183
184 bars |= BIT(bir);
185
186 len = pci_resource_len(pcidev, bir);
187 offset = dfl_res & PCI_VNDR_DFLS_RES_OFF_MASK;
188 if (offset >= len) {
189 dev_err(&pcidev->dev, "%s bad offset %u >= %pa\n",
190 __func__, offset, &len);
191 return -EINVAL;
192 }
193
194 dev_dbg(&pcidev->dev, "%s BAR %d offset 0x%x\n", __func__, bir, offset);
195
196 len -= offset;
197
198 start = pci_resource_start(pcidev, bir) + offset;
199
200 dfl_fpga_enum_info_add_dfl(info, start, len);
201 }
202
203 return 0;
204 }
205
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Re: [PATCH] ath11k: fix target assert during channel switch
by kernel test robot
Hi Venkateswara,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on kvalo-ath/ath-next]
[also build test ERROR on v5.15 next-20211112]
[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/Venkateswara-Naralasetty/ath11k-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: nios2-allyesconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 11.2.0
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
# https://github.com/0day-ci/linux/commit/455bd954ca608d86a679d82b2de7927eb...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Venkateswara-Naralasetty/ath11k-fix-target-assert-during-channel-switch/20211111-232038
git checkout 455bd954ca608d86a679d82b2de7927ebca05888
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nios2 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_sta_rc_update_wk':
>> drivers/net/wireless/ath/ath11k/mac.c:3920:25: error: 'struct peer_assoc_params' has no member named 'is_assoc'
3920 | peer_arg.is_assoc = false;
| ^
vim +3920 drivers/net/wireless/ath/ath11k/mac.c
3865
3866 static void ath11k_sta_rc_update_wk(struct work_struct *wk)
3867 {
3868 struct ath11k *ar;
3869 struct ath11k_vif *arvif;
3870 struct ath11k_sta *arsta;
3871 struct ieee80211_sta *sta;
3872 struct cfg80211_chan_def def;
3873 enum nl80211_band band;
3874 const u8 *ht_mcs_mask;
3875 const u16 *vht_mcs_mask;
3876 const u16 *he_mcs_mask;
3877 u32 changed, bw, nss, smps;
3878 int err, num_vht_rates, num_he_rates;
3879 const struct cfg80211_bitrate_mask *mask;
3880 struct peer_assoc_params peer_arg;
3881
3882 arsta = container_of(wk, struct ath11k_sta, update_wk);
3883 sta = container_of((void *)arsta, struct ieee80211_sta, drv_priv);
3884 arvif = arsta->arvif;
3885 ar = arvif->ar;
3886
3887 if (WARN_ON(ath11k_mac_vif_chan(arvif->vif, &def)))
3888 return;
3889
3890 band = def.chan->band;
3891 ht_mcs_mask = arvif->bitrate_mask.control[band].ht_mcs;
3892 vht_mcs_mask = arvif->bitrate_mask.control[band].vht_mcs;
3893 he_mcs_mask = arvif->bitrate_mask.control[band].he_mcs;
3894
3895 spin_lock_bh(&ar->data_lock);
3896
3897 changed = arsta->changed;
3898 arsta->changed = 0;
3899
3900 bw = arsta->bw;
3901 nss = arsta->nss;
3902 smps = arsta->smps;
3903
3904 spin_unlock_bh(&ar->data_lock);
3905
3906 mutex_lock(&ar->conf_mutex);
3907
3908 nss = max_t(u32, 1, nss);
3909 nss = min(nss, max(max(ath11k_mac_max_ht_nss(ht_mcs_mask),
3910 ath11k_mac_max_vht_nss(vht_mcs_mask)),
3911 ath11k_mac_max_he_nss(he_mcs_mask)));
3912
3913 if (changed & IEEE80211_RC_BW_CHANGED) {
3914 /* Send peer assoc command before set peer bandwidth param to
3915 * avoid the mismatch between the peer phymode and the peer
3916 * bandwidth.
3917 */
3918 ath11k_peer_assoc_prepare(ar, arvif->vif, sta, &peer_arg, true);
3919
> 3920 peer_arg.is_assoc = false;
3921 err = ath11k_wmi_send_peer_assoc_cmd(ar, &peer_arg);
3922 if (err) {
3923 ath11k_warn(ar->ab, "failed to send peer assoc for STA %pM vdev %i: %d\n",
3924 sta->addr, arvif->vdev_id, err);
3925 } else if (wait_for_completion_timeout(&ar->peer_assoc_done, 1 * HZ)) {
3926 err = ath11k_wmi_set_peer_param(ar, sta->addr, arvif->vdev_id,
3927 WMI_PEER_CHWIDTH, bw);
3928 if (err)
3929 ath11k_warn(ar->ab, "failed to update STA %pM peer bw %d: %d\n",
3930 sta->addr, bw, err);
3931 } else {
3932 ath11k_warn(ar->ab, "failed to get peer assoc conf event for %pM vdev %i\n",
3933 sta->addr, arvif->vdev_id);
3934 }
3935 }
3936
3937 if (changed & IEEE80211_RC_NSS_CHANGED) {
3938 ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac update sta %pM nss %d\n",
3939 sta->addr, nss);
3940
3941 err = ath11k_wmi_set_peer_param(ar, sta->addr, arvif->vdev_id,
3942 WMI_PEER_NSS, nss);
3943 if (err)
3944 ath11k_warn(ar->ab, "failed to update STA %pM nss %d: %d\n",
3945 sta->addr, nss, err);
3946 }
3947
3948 if (changed & IEEE80211_RC_SMPS_CHANGED) {
3949 ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac update sta %pM smps %d\n",
3950 sta->addr, smps);
3951
3952 err = ath11k_wmi_set_peer_param(ar, sta->addr, arvif->vdev_id,
3953 WMI_PEER_MIMO_PS_STATE, smps);
3954 if (err)
3955 ath11k_warn(ar->ab, "failed to update STA %pM smps %d: %d\n",
3956 sta->addr, smps, err);
3957 }
3958
3959 if (changed & IEEE80211_RC_SUPP_RATES_CHANGED) {
3960 mask = &arvif->bitrate_mask;
3961 num_vht_rates = ath11k_mac_bitrate_mask_num_vht_rates(ar, band,
3962 mask);
3963 num_he_rates = ath11k_mac_bitrate_mask_num_he_rates(ar, band,
3964 mask);
3965
3966 /* Peer_assoc_prepare will reject vht rates in
3967 * bitrate_mask if its not available in range format and
3968 * sets vht tx_rateset as unsupported. So multiple VHT MCS
3969 * setting(eg. MCS 4,5,6) per peer is not supported here.
3970 * But, Single rate in VHT mask can be set as per-peer
3971 * fixed rate. But even if any HT rates are configured in
3972 * the bitrate mask, device will not switch to those rates
3973 * when per-peer Fixed rate is set.
3974 * TODO: Check RATEMASK_CMDID to support auto rates selection
3975 * across HT/VHT and for multiple VHT MCS support.
3976 */
3977 if (sta->vht_cap.vht_supported && num_vht_rates == 1) {
3978 ath11k_mac_set_peer_vht_fixed_rate(arvif, sta, mask,
3979 band);
3980 } else if (sta->he_cap.has_he && num_he_rates == 1) {
3981 ath11k_mac_set_peer_he_fixed_rate(arvif, sta, mask,
3982 band);
3983 } else {
3984 /* If the peer is non-VHT/HE or no fixed VHT/HE rate
3985 * is provided in the new bitrate mask we set the
3986 * other rates using peer_assoc command. Also clear
3987 * the peer fixed rate settings as it has higher proprity
3988 * than peer assoc
3989 */
3990 err = ath11k_wmi_set_peer_param(ar, sta->addr,
3991 arvif->vdev_id,
3992 WMI_PEER_PARAM_FIXED_RATE,
3993 WMI_FIXED_RATE_NONE);
3994 if (err)
3995 ath11k_warn(ar->ab,
3996 "failed to disable peer fixed rate for sta %pM: %d\n",
3997 sta->addr, err);
3998
3999 ath11k_peer_assoc_prepare(ar, arvif->vif, sta,
4000 &peer_arg, true);
4001
4002 err = ath11k_wmi_send_peer_assoc_cmd(ar, &peer_arg);
4003 if (err)
4004 ath11k_warn(ar->ab, "failed to run peer assoc for STA %pM vdev %i: %d\n",
4005 sta->addr, arvif->vdev_id, err);
4006
4007 if (!wait_for_completion_timeout(&ar->peer_assoc_done, 1 * HZ))
4008 ath11k_warn(ar->ab, "failed to get peer assoc conf event for %pM vdev %i\n",
4009 sta->addr, arvif->vdev_id);
4010 }
4011 }
4012
4013 mutex_unlock(&ar->conf_mutex);
4014 }
4015
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/crypto/hisilicon/qm.c:4135:8: warning: %x in format string (no. 2) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int]
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 66f4beaa6c1d28161f534471484b2daa2de1dce0
commit: 3bbf0783636be8fd672907df25904288f14566f2 crypto: hisilicon/qm - supports to inquiry each function's QoS
date: 5 months ago
compiler: ia64-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck warnings: (new ones prefixed by >>)
drivers/crypto/hisilicon/qm.c:4077:8: warning: %ld in format string (no. 1) requires 'long *' but the argument type is 'unsigned long *'. [invalidScanfArgType_int]
ret = sscanf(buf, "%ld", val);
^
>> drivers/crypto/hisilicon/qm.c:4135:8: warning: %x in format string (no. 2) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int]
ret = sscanf(tbuf_bdf, "%d:%x:%d.%d", &tmp1, &bus, &device, &function);
^
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
drivers/crypto/hisilicon/qm.c:4077:8: warning: %ld in format string (no. 1) requires 'long *' but the argument type is 'unsigned long *'. [invalidScanfArgType_int]
ret = sscanf(buf, "%ld", val);
^
>> drivers/crypto/hisilicon/qm.c:4135:8: warning: %x in format string (no. 2) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int]
ret = sscanf(tbuf_bdf, "%d:%x:%d.%d", &tmp1, &bus, &device, &function);
^
>> drivers/crypto/hisilicon/qm.c:4122:8: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf]
ret = sscanf(tbuf, "%s %s", tbuf_bdf, val_buf);
^
>> drivers/crypto/hisilicon/qm.c:4031:9: warning: Uninitialized variable: ret [uninitvar]
return ret;
^
vim +4135 drivers/crypto/hisilicon/qm.c
3bbf0783636be8 Kai Ye 2021-06-11 4002
3bbf0783636be8 Kai Ye 2021-06-11 4003 static int qm_vf_read_qos(struct hisi_qm *qm)
3bbf0783636be8 Kai Ye 2021-06-11 4004 {
3bbf0783636be8 Kai Ye 2021-06-11 4005 int cnt = 0;
3bbf0783636be8 Kai Ye 2021-06-11 4006 int ret;
3bbf0783636be8 Kai Ye 2021-06-11 4007
3bbf0783636be8 Kai Ye 2021-06-11 4008 /* reset mailbox qos val */
3bbf0783636be8 Kai Ye 2021-06-11 4009 qm->mb_qos = 0;
3bbf0783636be8 Kai Ye 2021-06-11 4010
3bbf0783636be8 Kai Ye 2021-06-11 4011 /* vf ping pf to get function qos */
3bbf0783636be8 Kai Ye 2021-06-11 4012 if (qm->ops->ping_pf) {
3bbf0783636be8 Kai Ye 2021-06-11 4013 ret = qm->ops->ping_pf(qm, QM_VF_GET_QOS);
3bbf0783636be8 Kai Ye 2021-06-11 4014 if (ret) {
3bbf0783636be8 Kai Ye 2021-06-11 4015 pci_err(qm->pdev, "failed to send cmd to PF to get qos!\n");
3bbf0783636be8 Kai Ye 2021-06-11 4016 return ret;
3bbf0783636be8 Kai Ye 2021-06-11 4017 }
3bbf0783636be8 Kai Ye 2021-06-11 4018 }
3bbf0783636be8 Kai Ye 2021-06-11 4019
3bbf0783636be8 Kai Ye 2021-06-11 4020 while (true) {
3bbf0783636be8 Kai Ye 2021-06-11 4021 msleep(QM_WAIT_DST_ACK);
3bbf0783636be8 Kai Ye 2021-06-11 4022 if (qm->mb_qos)
3bbf0783636be8 Kai Ye 2021-06-11 4023 break;
3bbf0783636be8 Kai Ye 2021-06-11 4024
3bbf0783636be8 Kai Ye 2021-06-11 4025 if (++cnt > QM_MAX_VF_WAIT_COUNT) {
3bbf0783636be8 Kai Ye 2021-06-11 4026 pci_err(qm->pdev, "PF ping VF timeout!\n");
3bbf0783636be8 Kai Ye 2021-06-11 4027 return -ETIMEDOUT;
3bbf0783636be8 Kai Ye 2021-06-11 4028 }
3bbf0783636be8 Kai Ye 2021-06-11 4029 }
3bbf0783636be8 Kai Ye 2021-06-11 4030
3bbf0783636be8 Kai Ye 2021-06-11 @4031 return ret;
3bbf0783636be8 Kai Ye 2021-06-11 4032 }
3bbf0783636be8 Kai Ye 2021-06-11 4033
3bbf0783636be8 Kai Ye 2021-06-11 4034 static ssize_t qm_algqos_read(struct file *filp, char __user *buf,
3bbf0783636be8 Kai Ye 2021-06-11 4035 size_t count, loff_t *pos)
3bbf0783636be8 Kai Ye 2021-06-11 4036 {
3bbf0783636be8 Kai Ye 2021-06-11 4037 struct hisi_qm *qm = filp->private_data;
3bbf0783636be8 Kai Ye 2021-06-11 4038 char tbuf[QM_DBG_READ_LEN];
3bbf0783636be8 Kai Ye 2021-06-11 4039 u32 qos_val, ir;
3bbf0783636be8 Kai Ye 2021-06-11 4040 int ret;
3bbf0783636be8 Kai Ye 2021-06-11 4041
3bbf0783636be8 Kai Ye 2021-06-11 4042 /* Mailbox and reset cannot be operated at the same time */
3bbf0783636be8 Kai Ye 2021-06-11 4043 if (test_and_set_bit(QM_RESETTING, &qm->misc_ctl)) {
3bbf0783636be8 Kai Ye 2021-06-11 4044 pci_err(qm->pdev, "dev resetting, read alg qos failed!\n");
3bbf0783636be8 Kai Ye 2021-06-11 4045 return -EAGAIN;
3bbf0783636be8 Kai Ye 2021-06-11 4046 }
3bbf0783636be8 Kai Ye 2021-06-11 4047
3bbf0783636be8 Kai Ye 2021-06-11 4048 if (qm->fun_type == QM_HW_PF) {
3bbf0783636be8 Kai Ye 2021-06-11 4049 ir = qm_get_shaper_vft_qos(qm, 0);
3bbf0783636be8 Kai Ye 2021-06-11 4050 } else {
3bbf0783636be8 Kai Ye 2021-06-11 4051 ret = qm_vf_read_qos(qm);
3bbf0783636be8 Kai Ye 2021-06-11 4052 if (ret)
3bbf0783636be8 Kai Ye 2021-06-11 4053 goto err_get_status;
3bbf0783636be8 Kai Ye 2021-06-11 4054 ir = qm->mb_qos;
3bbf0783636be8 Kai Ye 2021-06-11 4055 }
3bbf0783636be8 Kai Ye 2021-06-11 4056
3bbf0783636be8 Kai Ye 2021-06-11 4057 qos_val = ir / QM_QOS_RATE;
3bbf0783636be8 Kai Ye 2021-06-11 4058 ret = scnprintf(tbuf, QM_DBG_READ_LEN, "%u\n", qos_val);
3bbf0783636be8 Kai Ye 2021-06-11 4059
3bbf0783636be8 Kai Ye 2021-06-11 4060 ret = simple_read_from_buffer(buf, count, pos, tbuf, ret);
3bbf0783636be8 Kai Ye 2021-06-11 4061
3bbf0783636be8 Kai Ye 2021-06-11 4062 err_get_status:
3bbf0783636be8 Kai Ye 2021-06-11 4063 clear_bit(QM_RESETTING, &qm->misc_ctl);
3bbf0783636be8 Kai Ye 2021-06-11 4064 return ret;
3bbf0783636be8 Kai Ye 2021-06-11 4065 }
3bbf0783636be8 Kai Ye 2021-06-11 4066
72b010dc33b959 Kai Ye 2021-06-11 4067 static ssize_t qm_qos_value_init(const char *buf, unsigned long *val)
72b010dc33b959 Kai Ye 2021-06-11 4068 {
72b010dc33b959 Kai Ye 2021-06-11 4069 int buflen = strlen(buf);
72b010dc33b959 Kai Ye 2021-06-11 4070 int ret, i;
72b010dc33b959 Kai Ye 2021-06-11 4071
72b010dc33b959 Kai Ye 2021-06-11 4072 for (i = 0; i < buflen; i++) {
72b010dc33b959 Kai Ye 2021-06-11 4073 if (!isdigit(buf[i]))
72b010dc33b959 Kai Ye 2021-06-11 4074 return -EINVAL;
72b010dc33b959 Kai Ye 2021-06-11 4075 }
72b010dc33b959 Kai Ye 2021-06-11 4076
72b010dc33b959 Kai Ye 2021-06-11 4077 ret = sscanf(buf, "%ld", val);
72b010dc33b959 Kai Ye 2021-06-11 4078 if (ret != QM_QOS_VAL_NUM)
72b010dc33b959 Kai Ye 2021-06-11 4079 return -EINVAL;
72b010dc33b959 Kai Ye 2021-06-11 4080
72b010dc33b959 Kai Ye 2021-06-11 4081 return 0;
72b010dc33b959 Kai Ye 2021-06-11 4082 }
72b010dc33b959 Kai Ye 2021-06-11 4083
72b010dc33b959 Kai Ye 2021-06-11 4084 static ssize_t qm_algqos_write(struct file *filp, const char __user *buf,
72b010dc33b959 Kai Ye 2021-06-11 4085 size_t count, loff_t *pos)
72b010dc33b959 Kai Ye 2021-06-11 4086 {
72b010dc33b959 Kai Ye 2021-06-11 4087 struct hisi_qm *qm = filp->private_data;
72b010dc33b959 Kai Ye 2021-06-11 4088 char tbuf[QM_DBG_READ_LEN];
72b010dc33b959 Kai Ye 2021-06-11 4089 int tmp1, bus, device, function;
72b010dc33b959 Kai Ye 2021-06-11 4090 char tbuf_bdf[QM_DBG_READ_LEN] = {0};
72b010dc33b959 Kai Ye 2021-06-11 4091 char val_buf[QM_QOS_VAL_MAX_LEN] = {0};
72b010dc33b959 Kai Ye 2021-06-11 4092 unsigned int fun_index;
72b010dc33b959 Kai Ye 2021-06-11 4093 unsigned long val = 0;
72b010dc33b959 Kai Ye 2021-06-11 4094 int len, ret;
72b010dc33b959 Kai Ye 2021-06-11 4095
72b010dc33b959 Kai Ye 2021-06-11 4096 if (qm->fun_type == QM_HW_VF)
72b010dc33b959 Kai Ye 2021-06-11 4097 return -EINVAL;
72b010dc33b959 Kai Ye 2021-06-11 4098
72b010dc33b959 Kai Ye 2021-06-11 4099 /* Mailbox and reset cannot be operated at the same time */
72b010dc33b959 Kai Ye 2021-06-11 4100 if (test_and_set_bit(QM_RESETTING, &qm->misc_ctl)) {
72b010dc33b959 Kai Ye 2021-06-11 4101 pci_err(qm->pdev, "dev resetting, write alg qos failed!\n");
72b010dc33b959 Kai Ye 2021-06-11 4102 return -EAGAIN;
72b010dc33b959 Kai Ye 2021-06-11 4103 }
72b010dc33b959 Kai Ye 2021-06-11 4104
72b010dc33b959 Kai Ye 2021-06-11 4105 if (*pos != 0) {
72b010dc33b959 Kai Ye 2021-06-11 4106 ret = 0;
72b010dc33b959 Kai Ye 2021-06-11 4107 goto err_get_status;
72b010dc33b959 Kai Ye 2021-06-11 4108 }
72b010dc33b959 Kai Ye 2021-06-11 4109
72b010dc33b959 Kai Ye 2021-06-11 4110 if (count >= QM_DBG_READ_LEN) {
72b010dc33b959 Kai Ye 2021-06-11 4111 ret = -ENOSPC;
72b010dc33b959 Kai Ye 2021-06-11 4112 goto err_get_status;
72b010dc33b959 Kai Ye 2021-06-11 4113 }
72b010dc33b959 Kai Ye 2021-06-11 4114
72b010dc33b959 Kai Ye 2021-06-11 4115 len = simple_write_to_buffer(tbuf, QM_DBG_READ_LEN - 1, pos, buf, count);
72b010dc33b959 Kai Ye 2021-06-11 4116 if (len < 0) {
72b010dc33b959 Kai Ye 2021-06-11 4117 ret = len;
72b010dc33b959 Kai Ye 2021-06-11 4118 goto err_get_status;
72b010dc33b959 Kai Ye 2021-06-11 4119 }
72b010dc33b959 Kai Ye 2021-06-11 4120
72b010dc33b959 Kai Ye 2021-06-11 4121 tbuf[len] = '\0';
72b010dc33b959 Kai Ye 2021-06-11 @4122 ret = sscanf(tbuf, "%s %s", tbuf_bdf, val_buf);
72b010dc33b959 Kai Ye 2021-06-11 4123 if (ret != QM_QOS_PARAM_NUM) {
72b010dc33b959 Kai Ye 2021-06-11 4124 ret = -EINVAL;
72b010dc33b959 Kai Ye 2021-06-11 4125 goto err_get_status;
72b010dc33b959 Kai Ye 2021-06-11 4126 }
72b010dc33b959 Kai Ye 2021-06-11 4127
72b010dc33b959 Kai Ye 2021-06-11 4128 ret = qm_qos_value_init(val_buf, &val);
72b010dc33b959 Kai Ye 2021-06-11 4129 if (val == 0 || val > QM_QOS_MAX_VAL || ret) {
72b010dc33b959 Kai Ye 2021-06-11 4130 pci_err(qm->pdev, "input qos value is error, please set 1~1000!\n");
72b010dc33b959 Kai Ye 2021-06-11 4131 ret = -EINVAL;
72b010dc33b959 Kai Ye 2021-06-11 4132 goto err_get_status;
72b010dc33b959 Kai Ye 2021-06-11 4133 }
72b010dc33b959 Kai Ye 2021-06-11 4134
72b010dc33b959 Kai Ye 2021-06-11 @4135 ret = sscanf(tbuf_bdf, "%d:%x:%d.%d", &tmp1, &bus, &device, &function);
72b010dc33b959 Kai Ye 2021-06-11 4136 if (ret != QM_QOS_BDF_PARAM_NUM) {
72b010dc33b959 Kai Ye 2021-06-11 4137 pci_err(qm->pdev, "input pci bdf value is error!\n");
72b010dc33b959 Kai Ye 2021-06-11 4138 ret = -EINVAL;
72b010dc33b959 Kai Ye 2021-06-11 4139 goto err_get_status;
72b010dc33b959 Kai Ye 2021-06-11 4140 }
72b010dc33b959 Kai Ye 2021-06-11 4141
72b010dc33b959 Kai Ye 2021-06-11 4142 fun_index = device * 8 + function;
72b010dc33b959 Kai Ye 2021-06-11 4143
72b010dc33b959 Kai Ye 2021-06-11 4144 ret = qm_func_shaper_enable(qm, fun_index, val);
72b010dc33b959 Kai Ye 2021-06-11 4145 if (ret) {
72b010dc33b959 Kai Ye 2021-06-11 4146 pci_err(qm->pdev, "failed to enable function shaper!\n");
72b010dc33b959 Kai Ye 2021-06-11 4147 ret = -EINVAL;
72b010dc33b959 Kai Ye 2021-06-11 4148 goto err_get_status;
72b010dc33b959 Kai Ye 2021-06-11 4149 }
72b010dc33b959 Kai Ye 2021-06-11 4150
72b010dc33b959 Kai Ye 2021-06-11 4151 ret = count;
72b010dc33b959 Kai Ye 2021-06-11 4152
72b010dc33b959 Kai Ye 2021-06-11 4153 err_get_status:
72b010dc33b959 Kai Ye 2021-06-11 4154 clear_bit(QM_RESETTING, &qm->misc_ctl);
72b010dc33b959 Kai Ye 2021-06-11 4155 return ret;
72b010dc33b959 Kai Ye 2021-06-11 4156 }
72b010dc33b959 Kai Ye 2021-06-11 4157
:::::: The code at line 4135 was first introduced by commit
:::::: 72b010dc33b9598883bc84d40b0a9d07c16f5e39 crypto: hisilicon/qm - supports writing QoS int the host
:::::: TO: Kai Ye <yekai13(a)huawei.com>
:::::: CC: Herbert Xu <herbert(a)gondor.apana.org.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[intel-lts:4.19/android_q 19663/22905] sound/soc/intel/skylake/skl-messages.c:2474:21: warning: variable 'module' set but not used
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 4.19/android_q
head: ee112de3f23d279394b5b043f3ee07b4987cc50b
commit: c097da3ba72ef8284568d3909582d38755dbcada [19663/22905] ASoC: Intel: Skylake: remove fmt_idx and res_idx from mconfig
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/intel/linux-intel-lts/commit/c097da3ba72ef8284568d3909...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 4.19/android_q
git checkout c097da3ba72ef8284568d3909582d38755dbcada
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
sound/soc/intel/skylake/skl-messages.c: In function 'skl_bind_modules':
>> sound/soc/intel/skylake/skl-messages.c:2474:21: warning: variable 'module' set but not used [-Wunused-but-set-variable]
2474 | struct skl_module *module;
| ^~~~~~
vim +/module +2474 sound/soc/intel/skylake/skl-messages.c
7d3a0a74b16aeed Praveen Diwakar 2017-03-08 2455
beb73b266a75602 Jeeja KP 2015-08-01 2456 /*
beb73b266a75602 Jeeja KP 2015-08-01 2457 * Once a module is instantiated it need to be 'bind' with other modules in
beb73b266a75602 Jeeja KP 2015-08-01 2458 * the pipeline. For binding we need to find the module pins which are bind
beb73b266a75602 Jeeja KP 2015-08-01 2459 * together
beb73b266a75602 Jeeja KP 2015-08-01 2460 * This function finds the pins and then sends bund_unbind IPC message to
beb73b266a75602 Jeeja KP 2015-08-01 2461 * DSP using IPC helper
beb73b266a75602 Jeeja KP 2015-08-01 2462 */
beb73b266a75602 Jeeja KP 2015-08-01 2463 int skl_bind_modules(struct skl_sst *ctx,
beb73b266a75602 Jeeja KP 2015-08-01 2464 struct skl_module_cfg *src_mcfg,
beb73b266a75602 Jeeja KP 2015-08-01 2465 struct skl_module_cfg *dst_mcfg)
beb73b266a75602 Jeeja KP 2015-08-01 2466 {
38a770859e10f56 Pradeep Tewani 2017-09-01 2467 int ret = 0;
beb73b266a75602 Jeeja KP 2015-08-01 2468 struct skl_ipc_bind_unbind_msg msg;
f6fa56e22559ade Ramesh Babu 2017-08-23 2469 int in_max = dst_mcfg->module->max_input_pins;
f6fa56e22559ade Ramesh Babu 2017-08-23 2470 int out_max = src_mcfg->module->max_output_pins;
beb73b266a75602 Jeeja KP 2015-08-01 2471 int src_index, dst_index;
38a770859e10f56 Pradeep Tewani 2017-09-01 2472 struct skl_module_fmt *format;
38a770859e10f56 Pradeep Tewani 2017-09-01 2473 struct skl_cpr_pin_fmt pin_fmt;
38a770859e10f56 Pradeep Tewani 2017-09-01 @2474 struct skl_module *module;
38a770859e10f56 Pradeep Tewani 2017-09-01 2475 struct skl_module_iface *fmt;
beb73b266a75602 Jeeja KP 2015-08-01 2476
beb73b266a75602 Jeeja KP 2015-08-01 2477 skl_dump_bind_info(ctx, src_mcfg, dst_mcfg);
beb73b266a75602 Jeeja KP 2015-08-01 2478
0c684c48257bc60 Jeeja KP 2016-02-03 2479 if (src_mcfg->m_state < SKL_MODULE_INIT_DONE ||
beb73b266a75602 Jeeja KP 2015-08-01 2480 dst_mcfg->m_state < SKL_MODULE_INIT_DONE)
beb73b266a75602 Jeeja KP 2015-08-01 2481 return 0;
beb73b266a75602 Jeeja KP 2015-08-01 2482
4f7457089df2984 Jeeja KP 2015-10-27 2483 src_index = skl_alloc_queue(src_mcfg->m_out_pin, dst_mcfg, out_max);
beb73b266a75602 Jeeja KP 2015-08-01 2484 if (src_index < 0)
beb73b266a75602 Jeeja KP 2015-08-01 2485 return -EINVAL;
beb73b266a75602 Jeeja KP 2015-08-01 2486
4f7457089df2984 Jeeja KP 2015-10-27 2487 msg.src_queue = src_index;
4f7457089df2984 Jeeja KP 2015-10-27 2488 dst_index = skl_alloc_queue(dst_mcfg->m_in_pin, src_mcfg, in_max);
beb73b266a75602 Jeeja KP 2015-08-01 2489 if (dst_index < 0) {
beb73b266a75602 Jeeja KP 2015-08-01 2490 skl_free_queue(src_mcfg->m_out_pin, src_index);
beb73b266a75602 Jeeja KP 2015-08-01 2491 return -EINVAL;
beb73b266a75602 Jeeja KP 2015-08-01 2492 }
beb73b266a75602 Jeeja KP 2015-08-01 2493
38a770859e10f56 Pradeep Tewani 2017-09-01 2494 /*
38a770859e10f56 Pradeep Tewani 2017-09-01 2495 * Copier module requires the separate large_config_set_ipc to
38a770859e10f56 Pradeep Tewani 2017-09-01 2496 * configure the pins other than 0
38a770859e10f56 Pradeep Tewani 2017-09-01 2497 */
38a770859e10f56 Pradeep Tewani 2017-09-01 2498 if (src_mcfg->m_type == SKL_MODULE_TYPE_COPIER && src_index > 0) {
38a770859e10f56 Pradeep Tewani 2017-09-01 2499 pin_fmt.sink_id = src_index;
38a770859e10f56 Pradeep Tewani 2017-09-01 2500 module = src_mcfg->module;
c097da3ba72ef82 Gustaw Lewandowski 2020-01-06 2501 fmt = skl_get_module_iface(src_mcfg);
38a770859e10f56 Pradeep Tewani 2017-09-01 2502
38a770859e10f56 Pradeep Tewani 2017-09-01 2503 /* Input fmt is same as that of src module input cfg */
38a770859e10f56 Pradeep Tewani 2017-09-01 2504 format = &fmt->inputs[0].fmt;
38a770859e10f56 Pradeep Tewani 2017-09-01 2505 fill_pin_params(&(pin_fmt.src_fmt), format);
38a770859e10f56 Pradeep Tewani 2017-09-01 2506
38a770859e10f56 Pradeep Tewani 2017-09-01 2507 format = &fmt->outputs[src_index].fmt;
38a770859e10f56 Pradeep Tewani 2017-09-01 2508 fill_pin_params(&(pin_fmt.dst_fmt), format);
38a770859e10f56 Pradeep Tewani 2017-09-01 2509 ret = skl_set_module_params(ctx, (void *)&pin_fmt,
38a770859e10f56 Pradeep Tewani 2017-09-01 2510 sizeof(struct skl_cpr_pin_fmt),
38a770859e10f56 Pradeep Tewani 2017-09-01 2511 CPR_SINK_FMT_PARAM_ID, src_mcfg);
38a770859e10f56 Pradeep Tewani 2017-09-01 2512
38a770859e10f56 Pradeep Tewani 2017-09-01 2513 if (ret < 0)
38a770859e10f56 Pradeep Tewani 2017-09-01 2514 goto out;
38a770859e10f56 Pradeep Tewani 2017-09-01 2515 }
38a770859e10f56 Pradeep Tewani 2017-09-01 2516
4f7457089df2984 Jeeja KP 2015-10-27 2517 msg.dst_queue = dst_index;
beb73b266a75602 Jeeja KP 2015-08-01 2518
beb73b266a75602 Jeeja KP 2015-08-01 2519 dev_dbg(ctx->dev, "src queue = %d dst queue =%d\n",
beb73b266a75602 Jeeja KP 2015-08-01 2520 msg.src_queue, msg.dst_queue);
beb73b266a75602 Jeeja KP 2015-08-01 2521
7d3a0a74b16aeed Praveen Diwakar 2017-03-08 2522 skl_module_format_mismatch_detection(ctx, src_mcfg, dst_mcfg,
7d3a0a74b16aeed Praveen Diwakar 2017-03-08 2523 src_index, dst_index);
7d3a0a74b16aeed Praveen Diwakar 2017-03-08 2524
beb73b266a75602 Jeeja KP 2015-08-01 2525 msg.module_id = src_mcfg->id.module_id;
ef2a352cfb2a536 Dharageswari R 2016-09-22 2526 msg.instance_id = src_mcfg->id.pvt_id;
beb73b266a75602 Jeeja KP 2015-08-01 2527 msg.dst_module_id = dst_mcfg->id.module_id;
ef2a352cfb2a536 Dharageswari R 2016-09-22 2528 msg.dst_instance_id = dst_mcfg->id.pvt_id;
beb73b266a75602 Jeeja KP 2015-08-01 2529 msg.bind = true;
beb73b266a75602 Jeeja KP 2015-08-01 2530
beb73b266a75602 Jeeja KP 2015-08-01 2531 ret = skl_ipc_bind_unbind(&ctx->ipc, &msg);
beb73b266a75602 Jeeja KP 2015-08-01 2532
beb73b266a75602 Jeeja KP 2015-08-01 2533 if (!ret) {
beb73b266a75602 Jeeja KP 2015-08-01 2534 src_mcfg->m_state = SKL_MODULE_BIND_DONE;
4f7457089df2984 Jeeja KP 2015-10-27 2535 src_mcfg->m_out_pin[src_index].pin_state = SKL_PIN_BIND_DONE;
4f7457089df2984 Jeeja KP 2015-10-27 2536 dst_mcfg->m_in_pin[dst_index].pin_state = SKL_PIN_BIND_DONE;
38a770859e10f56 Pradeep Tewani 2017-09-01 2537 return ret;
38a770859e10f56 Pradeep Tewani 2017-09-01 2538 }
38a770859e10f56 Pradeep Tewani 2017-09-01 2539 out:
beb73b266a75602 Jeeja KP 2015-08-01 2540 /* error case , if IPC fails, clear the queue index */
beb73b266a75602 Jeeja KP 2015-08-01 2541 skl_free_queue(src_mcfg->m_out_pin, src_index);
beb73b266a75602 Jeeja KP 2015-08-01 2542 skl_free_queue(dst_mcfg->m_in_pin, dst_index);
beb73b266a75602 Jeeja KP 2015-08-01 2543
beb73b266a75602 Jeeja KP 2015-08-01 2544 return ret;
beb73b266a75602 Jeeja KP 2015-08-01 2545 }
c9b1e834bc8deca Jeeja KP 2015-08-01 2546
:::::: The code at line 2474 was first introduced by commit
:::::: 38a770859e10f566c434ae0d3f380954280f262b ASoC: Intel: Skylake: Add IPC to configure the copier secondary pins
:::::: TO: Pradeep Tewani <pradeep.d.tewani(a)intel.com>
:::::: CC: Mark Brown <broonie(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[robh:arm64-user-perf-event-v11 4/5] arch/arm64/kernel/perf_event.c:1191:5: warning: no previous prototype for 'armv8pmu_proc_user_access_handler'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git arm64-user-perf-event-v11
head: a5385068d760ce1abfab2609fdb662164f12c494
commit: e4f5fa6593ffb8f5e5c167566839f7ecf97628e2 [4/5] arm64: perf: Enable PMU counter userspace access for perf event
config: arm64-randconfig-p001-20211019 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 11.2.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/commit/?id...
git remote add robh https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git
git fetch --no-tags robh arm64-user-perf-event-v11
git checkout e4f5fa6593ffb8f5e5c167566839f7ecf97628e2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
| ^~~~
arch/arm64/kernel/perf_event.c:143:51: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_RD'
143 | [C(L1D)][C(OP_READ)][C(RESULT_MISS)] = ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_RD,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:111:65: warning: initialized field overwritten [-Woverride-init]
111 | #define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_WR 0x41
| ^~~~
arch/arm64/kernel/perf_event.c:144:51: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_CACHE_WR'
144 | [C(L1D)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_L1D_CACHE_WR,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:111:65: note: (near initialization for 'armv8_vulcan_perf_cache_map[0][1][0]')
111 | #define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_WR 0x41
| ^~~~
arch/arm64/kernel/perf_event.c:144:51: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_CACHE_WR'
144 | [C(L1D)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_L1D_CACHE_WR,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:113:65: warning: initialized field overwritten [-Woverride-init]
113 | #define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_WR 0x43
| ^~~~
arch/arm64/kernel/perf_event.c:145:51: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_WR'
145 | [C(L1D)][C(OP_WRITE)][C(RESULT_MISS)] = ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_WR,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:113:65: note: (near initialization for 'armv8_vulcan_perf_cache_map[0][1][1]')
113 | #define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_WR 0x43
| ^~~~
arch/arm64/kernel/perf_event.c:145:51: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_WR'
145 | [C(L1D)][C(OP_WRITE)][C(RESULT_MISS)] = ARMV8_IMPDEF_PERFCTR_L1D_CACHE_REFILL_WR,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:122:65: warning: initialized field overwritten [-Woverride-init]
122 | #define ARMV8_IMPDEF_PERFCTR_L1D_TLB_RD 0x4E
| ^~~~
arch/arm64/kernel/perf_event.c:147:51: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_TLB_RD'
147 | [C(DTLB)][C(OP_READ)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_L1D_TLB_RD,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:122:65: note: (near initialization for 'armv8_vulcan_perf_cache_map[3][0][0]')
122 | #define ARMV8_IMPDEF_PERFCTR_L1D_TLB_RD 0x4E
| ^~~~
arch/arm64/kernel/perf_event.c:147:51: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_TLB_RD'
147 | [C(DTLB)][C(OP_READ)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_L1D_TLB_RD,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:123:65: warning: initialized field overwritten [-Woverride-init]
123 | #define ARMV8_IMPDEF_PERFCTR_L1D_TLB_WR 0x4F
| ^~~~
arch/arm64/kernel/perf_event.c:148:52: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_TLB_WR'
148 | [C(DTLB)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_L1D_TLB_WR,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:123:65: note: (near initialization for 'armv8_vulcan_perf_cache_map[3][1][0]')
123 | #define ARMV8_IMPDEF_PERFCTR_L1D_TLB_WR 0x4F
| ^~~~
arch/arm64/kernel/perf_event.c:148:52: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_TLB_WR'
148 | [C(DTLB)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_L1D_TLB_WR,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:120:65: warning: initialized field overwritten [-Woverride-init]
120 | #define ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_RD 0x4C
| ^~~~
arch/arm64/kernel/perf_event.c:149:51: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_RD'
149 | [C(DTLB)][C(OP_READ)][C(RESULT_MISS)] = ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_RD,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:120:65: note: (near initialization for 'armv8_vulcan_perf_cache_map[3][0][1]')
120 | #define ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_RD 0x4C
| ^~~~
arch/arm64/kernel/perf_event.c:149:51: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_RD'
149 | [C(DTLB)][C(OP_READ)][C(RESULT_MISS)] = ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_RD,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:121:65: warning: initialized field overwritten [-Woverride-init]
121 | #define ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_WR 0x4D
| ^~~~
arch/arm64/kernel/perf_event.c:150:51: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_WR'
150 | [C(DTLB)][C(OP_WRITE)][C(RESULT_MISS)] = ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_WR,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:121:65: note: (near initialization for 'armv8_vulcan_perf_cache_map[3][1][1]')
121 | #define ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_WR 0x4D
| ^~~~
arch/arm64/kernel/perf_event.c:150:51: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_WR'
150 | [C(DTLB)][C(OP_WRITE)][C(RESULT_MISS)] = ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_WR,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:137:65: warning: initialized field overwritten [-Woverride-init]
137 | #define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_RD 0x60
| ^~~~
arch/arm64/kernel/perf_event.c:152:51: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_RD'
152 | [C(NODE)][C(OP_READ)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_RD,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:137:65: note: (near initialization for 'armv8_vulcan_perf_cache_map[6][0][0]')
137 | #define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_RD 0x60
| ^~~~
arch/arm64/kernel/perf_event.c:152:51: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_RD'
152 | [C(NODE)][C(OP_READ)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_RD,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:138:65: warning: initialized field overwritten [-Woverride-init]
138 | #define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_WR 0x61
| ^~~~
arch/arm64/kernel/perf_event.c:153:52: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_WR'
153 | [C(NODE)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_WR,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/perf_event.h:138:65: note: (near initialization for 'armv8_vulcan_perf_cache_map[6][1][0]')
138 | #define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_WR 0x61
| ^~~~
arch/arm64/kernel/perf_event.c:153:52: note: in expansion of macro 'ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_WR'
153 | [C(NODE)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_WR,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/arm64/kernel/perf_event.c:1191:5: warning: no previous prototype for 'armv8pmu_proc_user_access_handler' [-Wmissing-prototypes]
1191 | int armv8pmu_proc_user_access_handler(struct ctl_table *table, int write,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> arch/arm64/kernel/perf_event.c:299:2: warning: Non-boolean value returned from function returning bool [returnNonBoolInBooleanFunction]
return event->attr.config1 & 0x2;
^
vim +/armv8pmu_proc_user_access_handler +1191 arch/arm64/kernel/perf_event.c
1190
> 1191 int armv8pmu_proc_user_access_handler(struct ctl_table *table, int write,
1192 void *buffer, size_t *lenp, loff_t *ppos)
1193 {
1194 int ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
1195 if (ret || !write || sysctl_perf_user_access)
1196 return ret;
1197
1198 on_each_cpu(armv8pmu_disable_user_access_ipi, NULL, 1);
1199 return 0;
1200 }
1201
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
vmlinux.o: warning: objtool: enter_from_user_mode()+0x3d: call to ftrace_likely_update() leaves .noinstr.text section
by kernel test robot
Hi Sven,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 66f4beaa6c1d28161f534471484b2daa2de1dce0
commit: 96e2fbccd0fc806364a964fdf072bfc858a66109 entry_Add_enter_from_user_mode_wrapper
date: 12 months ago
config: x86_64-buildonly-randconfig-r002-20211009 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 96e2fbccd0fc806364a964fdf072bfc858a66109
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
vmlinux.o: warning: objtool: __do_fast_syscall_32()+0x3c: call to syscall_enter_from_user_mode_work() leaves .noinstr.text section
vmlinux.o: warning: objtool: do_int80_syscall_32()+0x3a: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: __wrgsbase_inactive()+0x38: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: __rdgsbase_inactive()+0x35: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: fixup_bad_iret()+0x7a: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: noist_exc_debug()+0x3a: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: exc_nmi()+0xbf: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: poke_int3_handler()+0x45: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: mce_check_crashing_cpu()+0x19: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: do_machine_check()+0xae3: call to mce_panic.isra.0() leaves .noinstr.text section
vmlinux.o: warning: objtool: exc_machine_check()+0x68: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: irqentry_nmi_enter()+0x4c: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: irqentry_nmi_exit()+0x38: call to ftrace_likely_update() leaves .noinstr.text section
>> vmlinux.o: warning: objtool: enter_from_user_mode()+0x3d: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: syscall_enter_from_user_mode()+0x46: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: syscall_enter_from_user_mode_prepare()+0x3d: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: syscall_exit_to_user_mode()+0x15e: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: irqentry_enter_from_user_mode()+0x3d: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: irqentry_exit_to_user_mode()+0x7a: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: irqentry_exit()+0x2d: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: context_tracking_recursion_enter()+0x40: call to ftrace_likely_update() leaves .noinstr.text section
vmlinux.o: warning: objtool: __context_tracking_enter()+0x2f: call to ftrace_likely_update() leaves .noinstr.text section
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
arch/arm/mach-s3c/irq-s3c24xx.c:360:39: warning: no previous prototype for 's3c24xx_handle_irq'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 66f4beaa6c1d28161f534471484b2daa2de1dce0
commit: 71b9114d2c13a648fbe6523dd859e611c316ad90 ARM: s3c: move into a common directory
date: 1 year, 3 months ago
config: arm-randconfig-r012-20211104 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 71b9114d2c13a648fbe6523dd859e611c316ad90
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> arch/arm/mach-s3c/irq-s3c24xx.c:360:39: warning: no previous prototype for 's3c24xx_handle_irq' [-Wmissing-prototypes]
360 | asmlinkage void __exception_irq_entry s3c24xx_handle_irq(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~
>> arch/arm/mach-s3c/irq-s3c24xx.c:783:13: warning: no previous prototype for 's3c2412_init_irq' [-Wmissing-prototypes]
783 | void __init s3c2412_init_irq(void)
| ^~~~~~~~~~~~~~~~
>> arch/arm/mach-s3c/irq-s3c24xx.c:1034:13: warning: no previous prototype for 's3c2442_init_irq' [-Wmissing-prototypes]
1034 | void __init s3c2442_init_irq(void)
| ^~~~~~~~~~~~~~~~
>> arch/arm/mach-s3c/irq-s3c24xx.c:1124:13: warning: no previous prototype for 's3c2443_init_irq' [-Wmissing-prototypes]
1124 | void __init s3c2443_init_irq(void)
| ^~~~~~~~~~~~~~~~
>> arch/arm/mach-s3c/irq-s3c24xx.c:1308:12: warning: no previous prototype for 's3c2410_init_intc_of' [-Wmissing-prototypes]
1308 | int __init s3c2410_init_intc_of(struct device_node *np,
| ^~~~~~~~~~~~~~~~~~~~
>> arch/arm/mach-s3c/irq-s3c24xx.c:1330:12: warning: no previous prototype for 's3c2416_init_intc_of' [-Wmissing-prototypes]
1330 | int __init s3c2416_init_intc_of(struct device_node *np,
| ^~~~~~~~~~~~~~~~~~~~
--
>> arch/arm/mach-s3c/gpio-samsung.c:1309:14: warning: no previous prototype for 's3c2410_modify_misccr' [-Wmissing-prototypes]
1309 | unsigned int s3c2410_modify_misccr(unsigned int clear, unsigned int change)
| ^~~~~~~~~~~~~~~~~~~~~
vim +/s3c24xx_handle_irq +360 arch/arm/mach-s3c/irq-s3c24xx.c
17453dd2e7df206 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 359
17453dd2e7df206 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 @360 asmlinkage void __exception_irq_entry s3c24xx_handle_irq(struct pt_regs *regs)
17453dd2e7df206 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 361 {
17453dd2e7df206 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 362 do {
658dc8fb9cbc771 drivers/irqchip/irq-s3c24xx.c Heiko Stuebner 2013-04-04 363 if (likely(s3c_intc[0]))
f0774d41da0e607 drivers/irqchip/irq-s3c24xx.c Heiko Stuebner 2013-04-04 364 if (s3c24xx_handle_intc(s3c_intc[0], regs, 0))
17453dd2e7df206 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 365 continue;
17453dd2e7df206 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 366
658dc8fb9cbc771 drivers/irqchip/irq-s3c24xx.c Heiko Stuebner 2013-04-04 367 if (s3c_intc[2])
f0774d41da0e607 drivers/irqchip/irq-s3c24xx.c Heiko Stuebner 2013-04-04 368 if (s3c24xx_handle_intc(s3c_intc[2], regs, 64))
17453dd2e7df206 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 369 continue;
17453dd2e7df206 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 370
17453dd2e7df206 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 371 break;
17453dd2e7df206 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 372 } while (1);
17453dd2e7df206 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 373 }
17453dd2e7df206 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 374
:::::: The code at line 360 was first introduced by commit
:::::: 17453dd2e7df20612770ebbf1ab5d506a432210c ARM: S3C24XX: add handle_irq function
:::::: TO: Heiko Stuebner <heiko(a)sntech.de>
:::::: CC: Kukjin Kim <kgene.kim(a)samsung.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week