[linux-next:master 4766/5417] sound/soc/sof/core.c:135: undefined reference to `sof_client_fw_state_dispatcher'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 6d9bd4ad4ca08b1114e814c2c42383b8b13be631
commit: 3dc0d709177828a22dfc9d0072e3ac937ef90d06 [4766/5417] ASoC: SOF: Convert the generic probe support to SOF client
config: i386-randconfig-a003-20210930 (https://download.01.org/0day-ci/archive/20220213/202202130429.GEdTKNDQ-lk...)
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/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 3dc0d709177828a22dfc9d0072e3ac937ef90d06
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 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 >>):
ld: sound/soc/sof/core.o: in function `sof_set_fw_state':
>> sound/soc/sof/core.c:135: undefined reference to `sof_client_fw_state_dispatcher'
ld: sound/soc/sof/core.o: in function `sof_probe_continue':
>> sound/soc/sof/core.c:287: undefined reference to `sof_register_clients'
ld: sound/soc/sof/core.o: in function `sof_set_fw_state':
>> sound/soc/sof/core.c:135: undefined reference to `sof_client_fw_state_dispatcher'
ld: sound/soc/sof/core.o: in function `snd_sof_device_remove':
>> sound/soc/sof/core.c:427: undefined reference to `sof_unregister_clients'
ld: sound/soc/sof/core.o: in function `sof_set_fw_state':
>> sound/soc/sof/core.c:135: undefined reference to `sof_client_fw_state_dispatcher'
ld: sound/soc/sof/ipc.o: in function `snd_sof_ipc_msgs_rx':
>> sound/soc/sof/ipc.c:574: undefined reference to `sof_client_ipc_rx_dispatcher'
ld: sound/soc/sof/pm.o: in function `sof_suspend':
>> sound/soc/sof/pm.c:227: undefined reference to `sof_suspend_clients'
>> ld: sound/soc/sof/pm.c:217: undefined reference to `sof_suspend_clients'
ld: sound/soc/sof/pm.o: in function `sof_resume':
>> sound/soc/sof/pm.c:171: undefined reference to `sof_resume_clients'
vim +135 sound/soc/sof/core.c
c16211d6226dbd Liam Girdwood 2019-04-12 121
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 122 /* Helper to manage DSP state */
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 123 void sof_set_fw_state(struct snd_sof_dev *sdev, enum sof_fw_state new_state)
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 124 {
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 125 if (sdev->fw_state == new_state)
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 126 return;
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 127
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 128 dev_dbg(sdev->dev, "fw_state change: %d -> %d\n", sdev->fw_state, new_state);
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 129 sdev->fw_state = new_state;
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 130
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 131 switch (new_state) {
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 132 case SOF_FW_BOOT_NOT_STARTED:
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 133 case SOF_FW_BOOT_COMPLETE:
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 134 case SOF_FW_CRASHED:
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 @135 sof_client_fw_state_dispatcher(sdev);
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 136 fallthrough;
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 137 default:
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 138 break;
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 139 }
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 140 }
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 141 EXPORT_SYMBOL(sof_set_fw_state);
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 142
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 143 /*
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 144 * FW Boot State Transition Diagram
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 145 *
9f89a988d5c222 Peter Ujfalusi 2021-12-23 146 * +----------------------------------------------------------------------+
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 147 * | |
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 148 * ------------------ ------------------ |
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 149 * | | | | |
9f89a988d5c222 Peter Ujfalusi 2021-12-23 150 * | BOOT_FAILED |<-------| READY_FAILED | |
9f89a988d5c222 Peter Ujfalusi 2021-12-23 151 * | |<--+ | | ------------------ |
9f89a988d5c222 Peter Ujfalusi 2021-12-23 152 * ------------------ | ------------------ | | |
9f89a988d5c222 Peter Ujfalusi 2021-12-23 153 * ^ | ^ | CRASHED |---+ |
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 154 * | | | | | | |
9f89a988d5c222 Peter Ujfalusi 2021-12-23 155 * (FW Boot Timeout) | (FW_READY FAIL) ------------------ | |
9f89a988d5c222 Peter Ujfalusi 2021-12-23 156 * | | | ^ | |
9f89a988d5c222 Peter Ujfalusi 2021-12-23 157 * | | | |(DSP Panic) | |
9f89a988d5c222 Peter Ujfalusi 2021-12-23 158 * ------------------ | | ------------------ | |
9f89a988d5c222 Peter Ujfalusi 2021-12-23 159 * | | | | | | | |
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 160 * | IN_PROGRESS |---------------+------------->| COMPLETE | | |
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 161 * | | (FW Boot OK) (FW_READY OK) | | | |
9f89a988d5c222 Peter Ujfalusi 2021-12-23 162 * ------------------ | ------------------ | |
9f89a988d5c222 Peter Ujfalusi 2021-12-23 163 * ^ | | | |
9f89a988d5c222 Peter Ujfalusi 2021-12-23 164 * | | | | |
9f89a988d5c222 Peter Ujfalusi 2021-12-23 165 * (FW Loading OK) | (System Suspend/Runtime Suspend)
9f89a988d5c222 Peter Ujfalusi 2021-12-23 166 * | | | | |
9f89a988d5c222 Peter Ujfalusi 2021-12-23 167 * | (FW Loading Fail) | | |
9f89a988d5c222 Peter Ujfalusi 2021-12-23 168 * ------------------ | ------------------ | | |
9f89a988d5c222 Peter Ujfalusi 2021-12-23 169 * | | | | |<-----+ | |
9f89a988d5c222 Peter Ujfalusi 2021-12-23 170 * | PREPARE |---+ | NOT_STARTED |<---------------------+ |
9f89a988d5c222 Peter Ujfalusi 2021-12-23 171 * | | | |<--------------------------+
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 172 * ------------------ ------------------
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 173 * | ^ | ^
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 174 * | | | |
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 175 * | +-----------------------+ |
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 176 * | (DSP Probe OK) |
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 177 * | |
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 178 * | |
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 179 * +------------------------------------+
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 180 * (System Suspend/Runtime Suspend)
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 181 */
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 182
c16211d6226dbd Liam Girdwood 2019-04-12 183 static int sof_probe_continue(struct snd_sof_dev *sdev)
c16211d6226dbd Liam Girdwood 2019-04-12 184 {
c16211d6226dbd Liam Girdwood 2019-04-12 185 struct snd_sof_pdata *plat_data = sdev->pdata;
c16211d6226dbd Liam Girdwood 2019-04-12 186 int ret;
c16211d6226dbd Liam Girdwood 2019-04-12 187
c16211d6226dbd Liam Girdwood 2019-04-12 188 /* probe the DSP hardware */
c16211d6226dbd Liam Girdwood 2019-04-12 189 ret = snd_sof_probe(sdev);
c16211d6226dbd Liam Girdwood 2019-04-12 190 if (ret < 0) {
c16211d6226dbd Liam Girdwood 2019-04-12 191 dev_err(sdev->dev, "error: failed to probe DSP %d\n", ret);
c16211d6226dbd Liam Girdwood 2019-04-12 192 return ret;
c16211d6226dbd Liam Girdwood 2019-04-12 193 }
c16211d6226dbd Liam Girdwood 2019-04-12 194
58a5c9a4aa993f Peter Ujfalusi 2021-10-06 195 sof_set_fw_state(sdev, SOF_FW_BOOT_PREPARE);
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 196
c16211d6226dbd Liam Girdwood 2019-04-12 197 /* check machine info */
c16211d6226dbd Liam Girdwood 2019-04-12 198 ret = sof_machine_check(sdev);
c16211d6226dbd Liam Girdwood 2019-04-12 199 if (ret < 0) {
c16211d6226dbd Liam Girdwood 2019-04-12 200 dev_err(sdev->dev, "error: failed to get machine info %d\n",
c16211d6226dbd Liam Girdwood 2019-04-12 201 ret);
11fd6d8e097b5b Guennadi Liakhovetski 2021-03-15 202 goto dsp_err;
c16211d6226dbd Liam Girdwood 2019-04-12 203 }
c16211d6226dbd Liam Girdwood 2019-04-12 204
c16211d6226dbd Liam Girdwood 2019-04-12 205 /* set up platform component driver */
c16211d6226dbd Liam Girdwood 2019-04-12 206 snd_sof_new_platform_drv(sdev);
c16211d6226dbd Liam Girdwood 2019-04-12 207
c16211d6226dbd Liam Girdwood 2019-04-12 208 /* register any debug/trace capabilities */
c16211d6226dbd Liam Girdwood 2019-04-12 209 ret = snd_sof_dbg_init(sdev);
c16211d6226dbd Liam Girdwood 2019-04-12 210 if (ret < 0) {
c16211d6226dbd Liam Girdwood 2019-04-12 211 /*
c16211d6226dbd Liam Girdwood 2019-04-12 212 * debugfs issues are suppressed in snd_sof_dbg_init() since
c16211d6226dbd Liam Girdwood 2019-04-12 213 * we cannot rely on debugfs
c16211d6226dbd Liam Girdwood 2019-04-12 214 * here we trap errors due to memory allocation only.
c16211d6226dbd Liam Girdwood 2019-04-12 215 */
c16211d6226dbd Liam Girdwood 2019-04-12 216 dev_err(sdev->dev, "error: failed to init DSP trace/debug %d\n",
c16211d6226dbd Liam Girdwood 2019-04-12 217 ret);
c16211d6226dbd Liam Girdwood 2019-04-12 218 goto dbg_err;
c16211d6226dbd Liam Girdwood 2019-04-12 219 }
c16211d6226dbd Liam Girdwood 2019-04-12 220
c16211d6226dbd Liam Girdwood 2019-04-12 221 /* init the IPC */
c16211d6226dbd Liam Girdwood 2019-04-12 222 sdev->ipc = snd_sof_ipc_init(sdev);
c16211d6226dbd Liam Girdwood 2019-04-12 223 if (!sdev->ipc) {
7d8785bc7adbb4 Wei Yongjun 2020-05-09 224 ret = -ENOMEM;
c16211d6226dbd Liam Girdwood 2019-04-12 225 dev_err(sdev->dev, "error: failed to init DSP IPC %d\n", ret);
c16211d6226dbd Liam Girdwood 2019-04-12 226 goto ipc_err;
c16211d6226dbd Liam Girdwood 2019-04-12 227 }
c16211d6226dbd Liam Girdwood 2019-04-12 228
c16211d6226dbd Liam Girdwood 2019-04-12 229 /* load the firmware */
c16211d6226dbd Liam Girdwood 2019-04-12 230 ret = snd_sof_load_firmware(sdev);
c16211d6226dbd Liam Girdwood 2019-04-12 231 if (ret < 0) {
c16211d6226dbd Liam Girdwood 2019-04-12 232 dev_err(sdev->dev, "error: failed to load DSP firmware %d\n",
c16211d6226dbd Liam Girdwood 2019-04-12 233 ret);
e2406275be2b6b Peter Ujfalusi 2021-12-23 234 sof_set_fw_state(sdev, SOF_FW_BOOT_FAILED);
c16211d6226dbd Liam Girdwood 2019-04-12 235 goto fw_load_err;
c16211d6226dbd Liam Girdwood 2019-04-12 236 }
c16211d6226dbd Liam Girdwood 2019-04-12 237
58a5c9a4aa993f Peter Ujfalusi 2021-10-06 238 sof_set_fw_state(sdev, SOF_FW_BOOT_IN_PROGRESS);
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 239
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 240 /*
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 241 * Boot the firmware. The FW boot status will be modified
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 242 * in snd_sof_run_firmware() depending on the outcome.
6ca5cecbd1c175 Ranjani Sridharan 2019-12-17 243 */
c16211d6226dbd Liam Girdwood 2019-04-12 244 ret = snd_sof_run_firmware(sdev);
c16211d6226dbd Liam Girdwood 2019-04-12 245 if (ret < 0) {
c16211d6226dbd Liam Girdwood 2019-04-12 246 dev_err(sdev->dev, "error: failed to boot DSP firmware %d\n",
c16211d6226dbd Liam Girdwood 2019-04-12 247 ret);
e2406275be2b6b Peter Ujfalusi 2021-12-23 248 sof_set_fw_state(sdev, SOF_FW_BOOT_FAILED);
c16211d6226dbd Liam Girdwood 2019-04-12 249 goto fw_run_err;
c16211d6226dbd Liam Girdwood 2019-04-12 250 }
c16211d6226dbd Liam Girdwood 2019-04-12 251
12b401f4de7876 Peter Ujfalusi 2021-12-23 252 if (sof_debug_check_flag(SOF_DBG_ENABLE_TRACE)) {
2ab4c50f695551 Pierre-Louis Bossart 2019-09-27 253 sdev->dtrace_is_supported = true;
2ab4c50f695551 Pierre-Louis Bossart 2019-09-27 254
c16211d6226dbd Liam Girdwood 2019-04-12 255 /* init DMA trace */
c16211d6226dbd Liam Girdwood 2019-04-12 256 ret = snd_sof_init_trace(sdev);
c16211d6226dbd Liam Girdwood 2019-04-12 257 if (ret < 0) {
c16211d6226dbd Liam Girdwood 2019-04-12 258 /* non fatal */
c16211d6226dbd Liam Girdwood 2019-04-12 259 dev_warn(sdev->dev,
2ab4c50f695551 Pierre-Louis Bossart 2019-09-27 260 "warning: failed to initialize trace %d\n",
2ab4c50f695551 Pierre-Louis Bossart 2019-09-27 261 ret);
2ab4c50f695551 Pierre-Louis Bossart 2019-09-27 262 }
2ab4c50f695551 Pierre-Louis Bossart 2019-09-27 263 } else {
2ab4c50f695551 Pierre-Louis Bossart 2019-09-27 264 dev_dbg(sdev->dev, "SOF firmware trace disabled\n");
c16211d6226dbd Liam Girdwood 2019-04-12 265 }
c16211d6226dbd Liam Girdwood 2019-04-12 266
c16211d6226dbd Liam Girdwood 2019-04-12 267 /* hereafter all FW boot flows are for PM reasons */
c16211d6226dbd Liam Girdwood 2019-04-12 268 sdev->first_boot = false;
c16211d6226dbd Liam Girdwood 2019-04-12 269
c16211d6226dbd Liam Girdwood 2019-04-12 270 /* now register audio DSP platform driver and dai */
c16211d6226dbd Liam Girdwood 2019-04-12 271 ret = devm_snd_soc_register_component(sdev->dev, &sdev->plat_drv,
c16211d6226dbd Liam Girdwood 2019-04-12 272 sof_ops(sdev)->drv,
c16211d6226dbd Liam Girdwood 2019-04-12 273 sof_ops(sdev)->num_drv);
c16211d6226dbd Liam Girdwood 2019-04-12 274 if (ret < 0) {
c16211d6226dbd Liam Girdwood 2019-04-12 275 dev_err(sdev->dev,
c16211d6226dbd Liam Girdwood 2019-04-12 276 "error: failed to register DSP DAI driver %d\n", ret);
37e97e6faeabda Pierre-Louis Bossart 2020-01-24 277 goto fw_trace_err;
c16211d6226dbd Liam Girdwood 2019-04-12 278 }
c16211d6226dbd Liam Girdwood 2019-04-12 279
285880a23d105e Daniel Baluta 2019-12-04 280 ret = snd_sof_machine_register(sdev, plat_data);
3bcae98e101727 Peter Ujfalusi 2021-04-09 281 if (ret < 0) {
3bcae98e101727 Peter Ujfalusi 2021-04-09 282 dev_err(sdev->dev,
3bcae98e101727 Peter Ujfalusi 2021-04-09 283 "error: failed to register machine driver %d\n", ret);
37e97e6faeabda Pierre-Louis Bossart 2020-01-24 284 goto fw_trace_err;
3bcae98e101727 Peter Ujfalusi 2021-04-09 285 }
c16211d6226dbd Liam Girdwood 2019-04-12 286
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 @287 ret = sof_register_clients(sdev);
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 288 if (ret < 0) {
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 289 dev_err(sdev->dev, "failed to register clients %d\n", ret);
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 290 goto sof_machine_err;
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 291 }
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 292
8c583f526ee9df Ranjani Sridharan 2019-12-04 293 /*
8c583f526ee9df Ranjani Sridharan 2019-12-04 294 * Some platforms in SOF, ex: BYT, may not have their platform PM
8c583f526ee9df Ranjani Sridharan 2019-12-04 295 * callbacks set. Increment the usage count so as to
8c583f526ee9df Ranjani Sridharan 2019-12-04 296 * prevent the device from entering runtime suspend.
8c583f526ee9df Ranjani Sridharan 2019-12-04 297 */
8c583f526ee9df Ranjani Sridharan 2019-12-04 298 if (!sof_ops(sdev)->runtime_suspend || !sof_ops(sdev)->runtime_resume)
8c583f526ee9df Ranjani Sridharan 2019-12-04 299 pm_runtime_get_noresume(sdev->dev);
8c583f526ee9df Ranjani Sridharan 2019-12-04 300
c16211d6226dbd Liam Girdwood 2019-04-12 301 if (plat_data->sof_probe_complete)
c16211d6226dbd Liam Girdwood 2019-04-12 302 plat_data->sof_probe_complete(sdev->dev);
c16211d6226dbd Liam Girdwood 2019-04-12 303
271d9373db1c76 Kai Vehmanen 2021-02-10 304 sdev->probe_completed = true;
271d9373db1c76 Kai Vehmanen 2021-02-10 305
c16211d6226dbd Liam Girdwood 2019-04-12 306 return 0;
c16211d6226dbd Liam Girdwood 2019-04-12 307
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 308 sof_machine_err:
6955d9512d0ea8 Peter Ujfalusi 2022-02-10 309 snd_sof_machine_unregister(sdev, plat_data);
37e97e6faeabda Pierre-Louis Bossart 2020-01-24 310 fw_trace_err:
37e97e6faeabda Pierre-Louis Bossart 2020-01-24 311 snd_sof_free_trace(sdev);
c16211d6226dbd Liam Girdwood 2019-04-12 312 fw_run_err:
c16211d6226dbd Liam Girdwood 2019-04-12 313 snd_sof_fw_unload(sdev);
c16211d6226dbd Liam Girdwood 2019-04-12 314 fw_load_err:
c16211d6226dbd Liam Girdwood 2019-04-12 315 snd_sof_ipc_free(sdev);
c16211d6226dbd Liam Girdwood 2019-04-12 316 ipc_err:
c16211d6226dbd Liam Girdwood 2019-04-12 317 dbg_err:
11fd6d8e097b5b Guennadi Liakhovetski 2021-03-15 318 snd_sof_free_debug(sdev);
11fd6d8e097b5b Guennadi Liakhovetski 2021-03-15 319 dsp_err:
c16211d6226dbd Liam Girdwood 2019-04-12 320 snd_sof_remove(sdev);
0bce512e784d13 Pierre-Louis Bossart 2019-05-24 321
410e5e55c9c1c9 Pierre-Louis Bossart 2020-01-24 322 /* all resources freed, update state to match */
58a5c9a4aa993f Peter Ujfalusi 2021-10-06 323 sof_set_fw_state(sdev, SOF_FW_BOOT_NOT_STARTED);
410e5e55c9c1c9 Pierre-Louis Bossart 2020-01-24 324 sdev->first_boot = true;
c16211d6226dbd Liam Girdwood 2019-04-12 325
c16211d6226dbd Liam Girdwood 2019-04-12 326 return ret;
c16211d6226dbd Liam Girdwood 2019-04-12 327 }
c16211d6226dbd Liam Girdwood 2019-04-12 328
:::::: The code at line 135 was first introduced by commit
:::::: 6955d9512d0ea814f1c2761bef7ad7b3cedf4d68 ASoC: SOF: Introduce IPC SOF client support
:::::: TO: Peter Ujfalusi <peter.ujfalusi(a)linux.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
7 months, 1 week
[willy-pagecache:for-next 52/85] mm/page_vma_mapped.c:219:20: error: implicit declaration of function 'pmd_pfn'
by kernel test robot
tree: git://git.infradead.org/users/willy/pagecache for-next
head: c267b33d0001488f1d9dad12d6a87655e174d914
commit: 9733dd1f11d6b6f8a38fa82f0cc014f7840cbd67 [52/85] mm: Convert page_vma_mapped_walk to work on PFNs
config: mips-buildonly-randconfig-r003-20220213 (https://download.01.org/0day-ci/archive/20220214/202202141924.UPUvH4uw-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project ea071884b0cc7210b3cc5fe858f0e892a779a23b)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
git remote add willy-pagecache git://git.infradead.org/users/willy/pagecache
git fetch --no-tags willy-pagecache for-next
git checkout 9733dd1f11d6b6f8a38fa82f0cc014f7840cbd67
# 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=mips 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 >>):
>> mm/page_vma_mapped.c:219:20: error: implicit declaration of function 'pmd_pfn' [-Werror,-Wimplicit-function-declaration]
if (!check_pmd(pmd_pfn(pmde), pvmw))
^
mm/page_vma_mapped.c:219:20: note: did you mean 'pmd_off'?
include/linux/pgtable.h:150:22: note: 'pmd_off' declared here
static inline pmd_t *pmd_off(struct mm_struct *mm, unsigned long va)
^
1 error generated.
vim +/pmd_pfn +219 mm/page_vma_mapped.c
126
127 /**
128 * page_vma_mapped_walk - check if @pvmw->pfn is mapped in @pvmw->vma at
129 * @pvmw->address
130 * @pvmw: pointer to struct page_vma_mapped_walk. page, vma, address and flags
131 * must be set. pmd, pte and ptl must be NULL.
132 *
133 * Returns true if the page is mapped in the vma. @pvmw->pmd and @pvmw->pte point
134 * to relevant page table entries. @pvmw->ptl is locked. @pvmw->address is
135 * adjusted if needed (for PTE-mapped THPs).
136 *
137 * If @pvmw->pmd is set but @pvmw->pte is not, you have found PMD-mapped page
138 * (usually THP). For PTE-mapped THP, you should run page_vma_mapped_walk() in
139 * a loop to find all PTEs that map the THP.
140 *
141 * For HugeTLB pages, @pvmw->pte is set to the relevant page table entry
142 * regardless of which page table level the page is mapped at. @pvmw->pmd is
143 * NULL.
144 *
145 * Returns false if there are no more page table entries for the page in
146 * the vma. @pvmw->ptl is unlocked and @pvmw->pte is unmapped.
147 *
148 * If you need to stop the walk before page_vma_mapped_walk() returned false,
149 * use page_vma_mapped_walk_done(). It will do the housekeeping.
150 */
151 bool page_vma_mapped_walk(struct page_vma_mapped_walk *pvmw)
152 {
153 struct vm_area_struct *vma = pvmw->vma;
154 struct mm_struct *mm = vma->vm_mm;
155 unsigned long end;
156 pgd_t *pgd;
157 p4d_t *p4d;
158 pud_t *pud;
159 pmd_t pmde;
160
161 /* The only possible pmd mapping has been handled on last iteration */
162 if (pvmw->pmd && !pvmw->pte)
163 return not_found(pvmw);
164
165 if (unlikely(is_vm_hugetlb_page(vma))) {
166 unsigned long size = pvmw->nr_pages * PAGE_SIZE;
167 /* The only possible mapping was handled on last iteration */
168 if (pvmw->pte)
169 return not_found(pvmw);
170
171 /* when pud is not present, pte will be NULL */
172 pvmw->pte = huge_pte_offset(mm, pvmw->address, size);
173 if (!pvmw->pte)
174 return false;
175
176 pvmw->ptl = huge_pte_lockptr(size_to_hstate(size), mm,
177 pvmw->pte);
178 spin_lock(pvmw->ptl);
179 if (!check_pte(pvmw))
180 return not_found(pvmw);
181 return true;
182 }
183
184 end = vma_address_end(pvmw);
185 if (pvmw->pte)
186 goto next_pte;
187 restart:
188 do {
189 pgd = pgd_offset(mm, pvmw->address);
190 if (!pgd_present(*pgd)) {
191 step_forward(pvmw, PGDIR_SIZE);
192 continue;
193 }
194 p4d = p4d_offset(pgd, pvmw->address);
195 if (!p4d_present(*p4d)) {
196 step_forward(pvmw, P4D_SIZE);
197 continue;
198 }
199 pud = pud_offset(p4d, pvmw->address);
200 if (!pud_present(*pud)) {
201 step_forward(pvmw, PUD_SIZE);
202 continue;
203 }
204
205 pvmw->pmd = pmd_offset(pud, pvmw->address);
206 /*
207 * Make sure the pmd value isn't cached in a register by the
208 * compiler and used as a stale value after we've observed a
209 * subsequent update.
210 */
211 pmde = READ_ONCE(*pvmw->pmd);
212
213 if (pmd_trans_huge(pmde) || is_pmd_migration_entry(pmde)) {
214 pvmw->ptl = pmd_lock(mm, pvmw->pmd);
215 pmde = *pvmw->pmd;
216 if (likely(pmd_trans_huge(pmde))) {
217 if (pvmw->flags & PVMW_MIGRATION)
218 return not_found(pvmw);
> 219 if (!check_pmd(pmd_pfn(pmde), pvmw))
220 return not_found(pvmw);
221 return true;
222 }
223 if (!pmd_present(pmde)) {
224 swp_entry_t entry;
225
226 if (!thp_migration_supported() ||
227 !(pvmw->flags & PVMW_MIGRATION))
228 return not_found(pvmw);
229 entry = pmd_to_swp_entry(pmde);
230 if (!is_migration_entry(entry) ||
231 !check_pmd(swp_offset(entry), pvmw))
232 return not_found(pvmw);
233 return true;
234 }
235 /* THP pmd was split under us: handle on pte level */
236 spin_unlock(pvmw->ptl);
237 pvmw->ptl = NULL;
238 } else if (!pmd_present(pmde)) {
239 /*
240 * If PVMW_SYNC, take and drop THP pmd lock so that we
241 * cannot return prematurely, while zap_huge_pmd() has
242 * cleared *pmd but not decremented compound_mapcount().
243 */
244 if ((pvmw->flags & PVMW_SYNC) &&
245 transparent_hugepage_active(vma) &&
246 (pvmw->nr_pages >= HPAGE_PMD_NR)) {
247 spinlock_t *ptl = pmd_lock(mm, pvmw->pmd);
248
249 spin_unlock(ptl);
250 }
251 step_forward(pvmw, PMD_SIZE);
252 continue;
253 }
254 if (!map_pte(pvmw))
255 goto next_pte;
256 this_pte:
257 if (check_pte(pvmw))
258 return true;
259 next_pte:
260 do {
261 pvmw->address += PAGE_SIZE;
262 if (pvmw->address >= end)
263 return not_found(pvmw);
264 /* Did we cross page table boundary? */
265 if ((pvmw->address & (PMD_SIZE - PAGE_SIZE)) == 0) {
266 if (pvmw->ptl) {
267 spin_unlock(pvmw->ptl);
268 pvmw->ptl = NULL;
269 }
270 pte_unmap(pvmw->pte);
271 pvmw->pte = NULL;
272 goto restart;
273 }
274 pvmw->pte++;
275 if ((pvmw->flags & PVMW_SYNC) && !pvmw->ptl) {
276 pvmw->ptl = pte_lockptr(mm, pvmw->pmd);
277 spin_lock(pvmw->ptl);
278 }
279 } while (pte_none(*pvmw->pte));
280
281 if (!pvmw->ptl) {
282 pvmw->ptl = pte_lockptr(mm, pvmw->pmd);
283 spin_lock(pvmw->ptl);
284 }
285 goto this_pte;
286 } while (pvmw->address < end);
287
288 return false;
289 }
290
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
kernel/time/hrtimer.c:276:20: warning: unused function 'is_migration_base'
by kernel test robot
Hi Marcelo,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 754e0b0e35608ed5206d6a67a791563c631cec07
commit: 81d741d3460ca422843ce0ec8351083f259c6166 hrtimer: Avoid unnecessary SMP function calls in clock_was_set()
date: 6 months ago
config: mips-randconfig-r033-20220213 (https://download.01.org/0day-ci/archive/20220214/202202141804.APyBFuLN-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project ea071884b0cc7210b3cc5fe858f0e892a779a23b)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# 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 81d741d3460ca422843ce0ec8351083f259c6166
# 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=mips SHELL=/bin/bash fs/ kernel/time/
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 >>):
kernel/time/hrtimer.c:120:21: warning: initializer overrides prior initialization of this subobject
= HRTIMER_BASE_REALTIME,
^~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:118:27: note: previous initialization is here
[0 ... MAX_CLOCKS - 1] = HRTIMER_MAX_CLOCK_BASES,
^~~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:121:22: warning: initializer overrides prior initialization of this subobject
= HRTIMER_BASE_MONOTONIC,
^~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:118:27: note: previous initialization is here
[0 ... MAX_CLOCKS - 1] = HRTIMER_MAX_CLOCK_BASES,
^~~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:122:21: warning: initializer overrides prior initialization of this subobject
= HRTIMER_BASE_BOOTTIME,
^~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:118:27: note: previous initialization is here
[0 ... MAX_CLOCKS - 1] = HRTIMER_MAX_CLOCK_BASES,
^~~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:123:17: warning: initializer overrides prior initialization of this subobject
= HRTIMER_BASE_TAI,
^~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:118:27: note: previous initialization is here
[0 ... MAX_CLOCKS - 1] = HRTIMER_MAX_CLOCK_BASES,
^~~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:1591:7: warning: variable 'expires_in_hardirq' set but not used
bool expires_in_hardirq;
^
>> kernel/time/hrtimer.c:276:20: warning: unused function 'is_migration_base'
static inline bool is_migration_base(struct hrtimer_clock_base
^
>> kernel/time/hrtimer.c:1830:20: warning: unused function '__hrtimer_peek_ahead_timers'
static inline void __hrtimer_peek_ahead_timers(void) { }
^
fatal error: error in backend: Nested variants found in inline asm string: ' .set push
.set mips64r2
.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/bitops.h", .line = 105, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
1: ll $0, $1
or $0, $2
sc $0, $1
beqz $0, 1b
.set pop
'
clang-15: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 15.0.0 (git://gitmirror/llvm_project ea071884b0cc7210b3cc5fe858f0e892a779a23b)
Target: mips-unknown-linux
Thread model: posix
InstalledDir: /opt/cross/clang-ea071884b0/bin
clang-15: note: diagnostic msg:
Makefile arch block certs crypto drivers fs include init ipc kernel lib mm scripts security sound source usr virt
vim +/is_migration_base +276 kernel/time/hrtimer.c
c0a3132963db68 kernel/hrtimer.c Thomas Gleixner 2006-01-09 275
5d2295f3a93b04 kernel/time/hrtimer.c Sebastian Andrzej Siewior 2019-09-04 @276 static inline bool is_migration_base(struct hrtimer_clock_base *base)
5d2295f3a93b04 kernel/time/hrtimer.c Sebastian Andrzej Siewior 2019-09-04 277 {
5d2295f3a93b04 kernel/time/hrtimer.c Sebastian Andrzej Siewior 2019-09-04 278 return false;
5d2295f3a93b04 kernel/time/hrtimer.c Sebastian Andrzej Siewior 2019-09-04 279 }
5d2295f3a93b04 kernel/time/hrtimer.c Sebastian Andrzej Siewior 2019-09-04 280
:::::: The code at line 276 was first introduced by commit
:::::: 5d2295f3a93b04986d069ebeaf5b07725f9096c1 hrtimer: Add a missing bracket and hide `migration_base' on !SMP
:::::: TO: Sebastian Andrzej Siewior <bigeasy(a)linutronix.de>
:::::: CC: Thomas Gleixner <tglx(a)linutronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[linux-next:master 129/5679] arch/arm/mach-iop32x/cp6.c:10:6: warning: no previous prototype for function 'iop_enable_cp6'
by kernel test robot
Hi Arnd,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 259cbfc98c55ba3b6ef6e61fb7cfc3751dfded1e
commit: 6f5d248d05db9c4991366154f1a657a630faa583 [129/5679] ARM: iop32x: use GENERIC_IRQ_MULTI_HANDLER
config: arm-buildonly-randconfig-r004-20220214 (https://download.01.org/0day-ci/archive/20220214/202202141809.zCYU3Uhb-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project ea071884b0cc7210b3cc5fe858f0e892a779a23b)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 6f5d248d05db9c4991366154f1a657a630faa583
# 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=arm 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 >>):
>> arch/arm/mach-iop32x/cp6.c:10:6: warning: no previous prototype for function 'iop_enable_cp6' [-Wmissing-prototypes]
void iop_enable_cp6(void)
^
arch/arm/mach-iop32x/cp6.c:10:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void iop_enable_cp6(void)
^
static
arch/arm/mach-iop32x/cp6.c:43:13: warning: no previous prototype for function 'iop_init_cp6_handler' [-Wmissing-prototypes]
void __init iop_init_cp6_handler(void)
^
arch/arm/mach-iop32x/cp6.c:43:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init iop_init_cp6_handler(void)
^
static
2 warnings generated.
vim +/iop_enable_cp6 +10 arch/arm/mach-iop32x/cp6.c
9
> 10 void iop_enable_cp6(void)
11 {
12 u32 temp;
13
14 /* enable cp6 access */
15 asm volatile (
16 "mrc p15, 0, %0, c15, c1, 0\n\t"
17 "orr %0, %0, #(1 << 6)\n\t"
18 "mcr p15, 0, %0, c15, c1, 0\n\t"
19 "mrc p15, 0, %0, c15, c1, 0\n\t"
20 "mov %0, %0\n\t"
21 "sub pc, pc, #4 @ cp_wait\n\t"
22 : "=r"(temp));
23 }
24
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
arch/x86/entry/common.c:736:24: warning: no previous prototype for function 'xen_pv_evtchn_do_upcall'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 754e0b0e35608ed5206d6a67a791563c631cec07
commit: 2f6474e4636bcc68af6c44abb2703f12d7f083da x86/entry: Switch XEN/PV hypercall entry to IDTENTRY
date: 1 year, 8 months ago
config: x86_64-randconfig-a006-20220214 (https://download.01.org/0day-ci/archive/20220214/202202141812.bb7YTaL8-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project ea071884b0cc7210b3cc5fe858f0e892a779a23b)
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 2f6474e4636bcc68af6c44abb2703f12d7f083da
# 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=x86_64 SHELL=/bin/bash arch/x86/entry/
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/x86/entry/common.c:59:24: warning: no previous prototype for function 'enter_from_user_mode' [-Wmissing-prototypes]
__visible noinstr void enter_from_user_mode(void)
^
arch/x86/entry/common.c:59:19: note: declare 'static' if the function is not intended to be used outside of this translation unit
__visible noinstr void enter_from_user_mode(void)
^
static
arch/x86/entry/common.c:274:24: warning: no previous prototype for function 'prepare_exit_to_usermode' [-Wmissing-prototypes]
__visible noinstr void prepare_exit_to_usermode(struct pt_regs *regs)
^
arch/x86/entry/common.c:274:19: note: declare 'static' if the function is not intended to be used outside of this translation unit
__visible noinstr void prepare_exit_to_usermode(struct pt_regs *regs)
^
static
arch/x86/entry/common.c:336:24: warning: no previous prototype for function 'syscall_return_slowpath' [-Wmissing-prototypes]
__visible noinstr void syscall_return_slowpath(struct pt_regs *regs)
^
arch/x86/entry/common.c:336:19: note: declare 'static' if the function is not intended to be used outside of this translation unit
__visible noinstr void syscall_return_slowpath(struct pt_regs *regs)
^
static
>> arch/x86/entry/common.c:736:24: warning: no previous prototype for function 'xen_pv_evtchn_do_upcall' [-Wmissing-prototypes]
__visible noinstr void xen_pv_evtchn_do_upcall(struct pt_regs *regs)
^
arch/x86/entry/common.c:736:19: note: declare 'static' if the function is not intended to be used outside of this translation unit
__visible noinstr void xen_pv_evtchn_do_upcall(struct pt_regs *regs)
^
static
4 warnings generated.
vim +/xen_pv_evtchn_do_upcall +736 arch/x86/entry/common.c
735
> 736 __visible noinstr void xen_pv_evtchn_do_upcall(struct pt_regs *regs)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[willy-pagecache:for-next 52/85] mm/page_vma_mapped.c:219:48: error: implicit declaration of function 'pmd_pfn'; did you mean 'pmd_off'?
by kernel test robot
tree: git://git.infradead.org/users/willy/pagecache for-next
head: c267b33d0001488f1d9dad12d6a87655e174d914
commit: 9733dd1f11d6b6f8a38fa82f0cc014f7840cbd67 [52/85] mm: Convert page_vma_mapped_walk to work on PFNs
config: powerpc-chrp32_defconfig (https://download.01.org/0day-ci/archive/20220214/202202141815.M0g32T8H-lk...)
compiler: powerpc-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
git remote add willy-pagecache git://git.infradead.org/users/willy/pagecache
git fetch --no-tags willy-pagecache for-next
git checkout 9733dd1f11d6b6f8a38fa82f0cc014f7840cbd67
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc 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 >>):
mm/page_vma_mapped.c: In function 'page_vma_mapped_walk':
>> mm/page_vma_mapped.c:219:48: error: implicit declaration of function 'pmd_pfn'; did you mean 'pmd_off'? [-Werror=implicit-function-declaration]
219 | if (!check_pmd(pmd_pfn(pmde), pvmw))
| ^~~~~~~
| pmd_off
cc1: some warnings being treated as errors
vim +219 mm/page_vma_mapped.c
126
127 /**
128 * page_vma_mapped_walk - check if @pvmw->pfn is mapped in @pvmw->vma at
129 * @pvmw->address
130 * @pvmw: pointer to struct page_vma_mapped_walk. page, vma, address and flags
131 * must be set. pmd, pte and ptl must be NULL.
132 *
133 * Returns true if the page is mapped in the vma. @pvmw->pmd and @pvmw->pte point
134 * to relevant page table entries. @pvmw->ptl is locked. @pvmw->address is
135 * adjusted if needed (for PTE-mapped THPs).
136 *
137 * If @pvmw->pmd is set but @pvmw->pte is not, you have found PMD-mapped page
138 * (usually THP). For PTE-mapped THP, you should run page_vma_mapped_walk() in
139 * a loop to find all PTEs that map the THP.
140 *
141 * For HugeTLB pages, @pvmw->pte is set to the relevant page table entry
142 * regardless of which page table level the page is mapped at. @pvmw->pmd is
143 * NULL.
144 *
145 * Returns false if there are no more page table entries for the page in
146 * the vma. @pvmw->ptl is unlocked and @pvmw->pte is unmapped.
147 *
148 * If you need to stop the walk before page_vma_mapped_walk() returned false,
149 * use page_vma_mapped_walk_done(). It will do the housekeeping.
150 */
151 bool page_vma_mapped_walk(struct page_vma_mapped_walk *pvmw)
152 {
153 struct vm_area_struct *vma = pvmw->vma;
154 struct mm_struct *mm = vma->vm_mm;
155 unsigned long end;
156 pgd_t *pgd;
157 p4d_t *p4d;
158 pud_t *pud;
159 pmd_t pmde;
160
161 /* The only possible pmd mapping has been handled on last iteration */
162 if (pvmw->pmd && !pvmw->pte)
163 return not_found(pvmw);
164
165 if (unlikely(is_vm_hugetlb_page(vma))) {
166 unsigned long size = pvmw->nr_pages * PAGE_SIZE;
167 /* The only possible mapping was handled on last iteration */
168 if (pvmw->pte)
169 return not_found(pvmw);
170
171 /* when pud is not present, pte will be NULL */
172 pvmw->pte = huge_pte_offset(mm, pvmw->address, size);
173 if (!pvmw->pte)
174 return false;
175
176 pvmw->ptl = huge_pte_lockptr(size_to_hstate(size), mm,
177 pvmw->pte);
178 spin_lock(pvmw->ptl);
179 if (!check_pte(pvmw))
180 return not_found(pvmw);
181 return true;
182 }
183
184 end = vma_address_end(pvmw);
185 if (pvmw->pte)
186 goto next_pte;
187 restart:
188 do {
189 pgd = pgd_offset(mm, pvmw->address);
190 if (!pgd_present(*pgd)) {
191 step_forward(pvmw, PGDIR_SIZE);
192 continue;
193 }
194 p4d = p4d_offset(pgd, pvmw->address);
195 if (!p4d_present(*p4d)) {
196 step_forward(pvmw, P4D_SIZE);
197 continue;
198 }
199 pud = pud_offset(p4d, pvmw->address);
200 if (!pud_present(*pud)) {
201 step_forward(pvmw, PUD_SIZE);
202 continue;
203 }
204
205 pvmw->pmd = pmd_offset(pud, pvmw->address);
206 /*
207 * Make sure the pmd value isn't cached in a register by the
208 * compiler and used as a stale value after we've observed a
209 * subsequent update.
210 */
211 pmde = READ_ONCE(*pvmw->pmd);
212
213 if (pmd_trans_huge(pmde) || is_pmd_migration_entry(pmde)) {
214 pvmw->ptl = pmd_lock(mm, pvmw->pmd);
215 pmde = *pvmw->pmd;
216 if (likely(pmd_trans_huge(pmde))) {
217 if (pvmw->flags & PVMW_MIGRATION)
218 return not_found(pvmw);
> 219 if (!check_pmd(pmd_pfn(pmde), pvmw))
220 return not_found(pvmw);
221 return true;
222 }
223 if (!pmd_present(pmde)) {
224 swp_entry_t entry;
225
226 if (!thp_migration_supported() ||
227 !(pvmw->flags & PVMW_MIGRATION))
228 return not_found(pvmw);
229 entry = pmd_to_swp_entry(pmde);
230 if (!is_migration_entry(entry) ||
231 !check_pmd(swp_offset(entry), pvmw))
232 return not_found(pvmw);
233 return true;
234 }
235 /* THP pmd was split under us: handle on pte level */
236 spin_unlock(pvmw->ptl);
237 pvmw->ptl = NULL;
238 } else if (!pmd_present(pmde)) {
239 /*
240 * If PVMW_SYNC, take and drop THP pmd lock so that we
241 * cannot return prematurely, while zap_huge_pmd() has
242 * cleared *pmd but not decremented compound_mapcount().
243 */
244 if ((pvmw->flags & PVMW_SYNC) &&
245 transparent_hugepage_active(vma) &&
246 (pvmw->nr_pages >= HPAGE_PMD_NR)) {
247 spinlock_t *ptl = pmd_lock(mm, pvmw->pmd);
248
249 spin_unlock(ptl);
250 }
251 step_forward(pvmw, PMD_SIZE);
252 continue;
253 }
254 if (!map_pte(pvmw))
255 goto next_pte;
256 this_pte:
257 if (check_pte(pvmw))
258 return true;
259 next_pte:
260 do {
261 pvmw->address += PAGE_SIZE;
262 if (pvmw->address >= end)
263 return not_found(pvmw);
264 /* Did we cross page table boundary? */
265 if ((pvmw->address & (PMD_SIZE - PAGE_SIZE)) == 0) {
266 if (pvmw->ptl) {
267 spin_unlock(pvmw->ptl);
268 pvmw->ptl = NULL;
269 }
270 pte_unmap(pvmw->pte);
271 pvmw->pte = NULL;
272 goto restart;
273 }
274 pvmw->pte++;
275 if ((pvmw->flags & PVMW_SYNC) && !pvmw->ptl) {
276 pvmw->ptl = pte_lockptr(mm, pvmw->pmd);
277 spin_lock(pvmw->ptl);
278 }
279 } while (pte_none(*pvmw->pte));
280
281 if (!pvmw->ptl) {
282 pvmw->ptl = pte_lockptr(mm, pvmw->pmd);
283 spin_lock(pvmw->ptl);
284 }
285 goto this_pte;
286 } while (pvmw->address < end);
287
288 return false;
289 }
290
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
Re: [PATCH 23/30] um/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT
by kernel test robot
Hi Anshuman,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on hnaz-mm/master]
url: https://github.com/0day-ci/linux/commits/Anshuman-Khandual/mm-mmap-Drop-p...
base: https://github.com/hnaz/linux-mm master
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20220214/202202141426.Q2fKI6yq-lk...)
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/f96d6fa064e3f24686f111d1b4c06b865...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Anshuman-Khandual/mm-mmap-Drop-protection_map-and-platform-s-__SXXX-__PXXX-requirements/20220214-103534
git checkout f96d6fa064e3f24686f111d1b4c06b865ca103ec
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=um SUBARCH=i386 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 >>):
arch/x86/um/mem_32.c: In function 'gate_vma_init':
>> arch/x86/um/mem_32.c:20:26: error: '__P101' undeclared (first use in this function)
20 | gate_vma.vm_page_prot = __P101;
| ^~~~~~
arch/x86/um/mem_32.c:20:26: note: each undeclared identifier is reported only once for each function it appears in
vim +/__P101 +20 arch/x86/um/mem_32.c
548f0a4e02f6fa arch/um/sys-i386/mem.c Richard Weinberger 2011-07-25 10
548f0a4e02f6fa arch/um/sys-i386/mem.c Richard Weinberger 2011-07-25 11 static int __init gate_vma_init(void)
548f0a4e02f6fa arch/um/sys-i386/mem.c Richard Weinberger 2011-07-25 12 {
548f0a4e02f6fa arch/um/sys-i386/mem.c Richard Weinberger 2011-07-25 13 if (!FIXADDR_USER_START)
548f0a4e02f6fa arch/um/sys-i386/mem.c Richard Weinberger 2011-07-25 14 return 0;
548f0a4e02f6fa arch/um/sys-i386/mem.c Richard Weinberger 2011-07-25 15
2c4541e24c55e2 arch/x86/um/mem_32.c Kirill A. Shutemov 2018-07-26 16 vma_init(&gate_vma, NULL);
548f0a4e02f6fa arch/um/sys-i386/mem.c Richard Weinberger 2011-07-25 17 gate_vma.vm_start = FIXADDR_USER_START;
548f0a4e02f6fa arch/um/sys-i386/mem.c Richard Weinberger 2011-07-25 18 gate_vma.vm_end = FIXADDR_USER_END;
548f0a4e02f6fa arch/um/sys-i386/mem.c Richard Weinberger 2011-07-25 19 gate_vma.vm_flags = VM_READ | VM_MAYREAD | VM_EXEC | VM_MAYEXEC;
548f0a4e02f6fa arch/um/sys-i386/mem.c Richard Weinberger 2011-07-25 @20 gate_vma.vm_page_prot = __P101;
548f0a4e02f6fa arch/um/sys-i386/mem.c Richard Weinberger 2011-07-25 21
548f0a4e02f6fa arch/um/sys-i386/mem.c Richard Weinberger 2011-07-25 22 return 0;
548f0a4e02f6fa arch/um/sys-i386/mem.c Richard Weinberger 2011-07-25 23 }
548f0a4e02f6fa arch/um/sys-i386/mem.c Richard Weinberger 2011-07-25 24 __initcall(gate_vma_init);
548f0a4e02f6fa arch/um/sys-i386/mem.c Richard Weinberger 2011-07-25 25
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
Re: [PATCH v15 06/10] iio: test: add basic tests for the iio-rescale driver
by kernel test robot
Hi Liam,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on cd717ac6f69db4953ca701c6220c7cb58e17f35a]
url: https://github.com/0day-ci/linux/commits/Liam-Beguin/iio-afe-add-temperat...
base: cd717ac6f69db4953ca701c6220c7cb58e17f35a
config: microblaze-randconfig-r002-20220213 (https://download.01.org/0day-ci/archive/20220214/202202141701.Sk68w0Ft-lk...)
compiler: microblaze-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/757b647146492570add37dfe5839b90d8...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Liam-Beguin/iio-afe-add-temperature-rescaling-support/20220213-105952
git checkout 757b647146492570add37dfe5839b90d87c74cf4
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=microblaze 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 >>):
microblaze-linux-ld: drivers/iio/test/iio-test-rescale.o: in function `iio_rescale_test_offset':
>> (.text+0x34): undefined reference to `kunit_kmalloc_array'
>> microblaze-linux-ld: (.text+0x16c): undefined reference to `kunit_binary_assert_format'
>> microblaze-linux-ld: (.text+0x1d4): undefined reference to `kunit_do_assertion'
>> microblaze-linux-ld: (.text+0x1ec): undefined reference to `kunit_binary_str_assert_format'
microblaze-linux-ld: (.text+0x2e4): undefined reference to `kunit_do_assertion'
microblaze-linux-ld: drivers/iio/test/iio-test-rescale.o: in function `iio_rescale_test_scale':
(.text+0x478): undefined reference to `kunit_kmalloc_array'
microblaze-linux-ld: (.text+0x4b0): undefined reference to `kunit_binary_assert_format'
microblaze-linux-ld: (.text+0x608): undefined reference to `kunit_do_assertion'
microblaze-linux-ld: (.text+0x9ec): undefined reference to `kunit_do_assertion'
microblaze-linux-ld: (.text+0xaf0): undefined reference to `kunit_do_assertion'
microblaze-linux-ld: net/core/sock.o: in function `sk_destruct':
(.text+0x7810): undefined reference to `__sk_defer_free_flush'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
sound/soc/samsung/aries_wm8994.c:525:34: warning: unused variable 'samsung_wm8994_of_match'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 754e0b0e35608ed5206d6a67a791563c631cec07
commit: 7a3a7671fa6c7e90aff5f4242add2a40587b85ef ASoC: samsung: Add driver for Aries boards
date: 1 year, 8 months ago
config: hexagon-randconfig-r035-20220213 (https://download.01.org/0day-ci/archive/20220214/202202141756.kbtxAPyD-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project ea071884b0cc7210b3cc5fe858f0e892a779a23b)
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 7a3a7671fa6c7e90aff5f4242add2a40587b85ef
# 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=hexagon SHELL=/bin/bash sound/soc/samsung/
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/samsung/aries_wm8994.c:525:34: warning: unused variable 'samsung_wm8994_of_match' [-Wunused-const-variable]
static const struct of_device_id samsung_wm8994_of_match[] = {
^
1 warning generated.
vim +/samsung_wm8994_of_match +525 sound/soc/samsung/aries_wm8994.c
524
> 525 static const struct of_device_id samsung_wm8994_of_match[] = {
526 {
527 .compatible = "samsung,fascinate4g-wm8994",
528 .data = &fascinate4g_variant,
529 },
530 {
531 .compatible = "samsung,aries-wm8994",
532 .data = &aries_variant,
533 },
534 { /* sentinel */ },
535 };
536 MODULE_DEVICE_TABLE(of, samsung_wm8994_of_match);
537
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week