sound/core/pcm_native.c:3398:24: error: implicit declaration of function 'pgprot_writecombine'

From: kbuild test robot
Date: Tue Dec 10 2019 - 11:02:36 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6794862a16ef41f753abd75c03a152836e4c8028
commit: 212836a9929f0c91214a8a1879e6e41be0e26a6f dma-mapping: remove dma_{alloc,free,mmap}_writecombine
date: 3 months ago
config: m68k-randconfig-a001-20191209 (attached as .config)
compiler: m68k-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 212836a9929f0c91214a8a1879e6e41be0e26a6f
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=m68k

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

sound/core/pcm_native.c: In function 'snd_pcm_lib_default_mmap':
>> sound/core/pcm_native.c:3398:24: error: implicit declaration of function 'pgprot_writecombine' [-Werror=implicit-function-declaration]
area->vm_page_prot = pgprot_writecombine(area->vm_page_prot);
^~~~~~~~~~~~~~~~~~~
sound/core/pcm_native.c:3398:22: error: incompatible types when assigning to type 'pgprot_t {aka struct <anonymous>}' from type 'int'
area->vm_page_prot = pgprot_writecombine(area->vm_page_prot);
^
cc1: some warnings being treated as errors

vim +/pgprot_writecombine +3398 sound/core/pcm_native.c

^1da177e4c3f41 Linus Torvalds 2005-04-16 3379
^1da177e4c3f41 Linus Torvalds 2005-04-16 3380 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 3381 * mmap the DMA buffer on RAM
^1da177e4c3f41 Linus Torvalds 2005-04-16 3382 */
30b771cf8c3120 Takashi Iwai 2014-10-30 3383
30b771cf8c3120 Takashi Iwai 2014-10-30 3384 /**
30b771cf8c3120 Takashi Iwai 2014-10-30 3385 * snd_pcm_lib_default_mmap - Default PCM data mmap function
30b771cf8c3120 Takashi Iwai 2014-10-30 3386 * @substream: PCM substream
30b771cf8c3120 Takashi Iwai 2014-10-30 3387 * @area: VMA
30b771cf8c3120 Takashi Iwai 2014-10-30 3388 *
30b771cf8c3120 Takashi Iwai 2014-10-30 3389 * This is the default mmap handler for PCM data. When mmap pcm_ops is NULL,
30b771cf8c3120 Takashi Iwai 2014-10-30 3390 * this function is invoked implicitly.
30b771cf8c3120 Takashi Iwai 2014-10-30 3391 */
18a2b962337047 Takashi Iwai 2011-09-28 3392 int snd_pcm_lib_default_mmap(struct snd_pcm_substream *substream,
877211f5e1b119 Takashi Iwai 2005-11-17 3393 struct vm_area_struct *area)
^1da177e4c3f41 Linus Torvalds 2005-04-16 3394 {
314e51b9851b4f Konstantin Khlebnikov 2012-10-08 3395 area->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
a5606f85611267 Takashi Iwai 2013-10-24 3396 #ifdef CONFIG_GENERIC_ALLOCATOR
055032142c42d2 Nicolin Chen 2013-10-23 3397 if (substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV_IRAM) {
055032142c42d2 Nicolin Chen 2013-10-23 @3398 area->vm_page_prot = pgprot_writecombine(area->vm_page_prot);
055032142c42d2 Nicolin Chen 2013-10-23 3399 return remap_pfn_range(area, area->vm_start,
055032142c42d2 Nicolin Chen 2013-10-23 3400 substream->dma_buffer.addr >> PAGE_SHIFT,
055032142c42d2 Nicolin Chen 2013-10-23 3401 area->vm_end - area->vm_start, area->vm_page_prot);
055032142c42d2 Nicolin Chen 2013-10-23 3402 }
a5606f85611267 Takashi Iwai 2013-10-24 3403 #endif /* CONFIG_GENERIC_ALLOCATOR */
49d776ffb50f2e Takashi Iwai 2014-10-24 3404 #ifndef CONFIG_X86 /* for avoiding warnings arch/x86/mm/pat.c */
abe594c2cf55b4 Geert Uytterhoeven 2017-07-09 3405 if (IS_ENABLED(CONFIG_HAS_DMA) && !substream->ops->page &&
657b1989dacf58 Takashi Iwai 2009-11-26 3406 substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV)
657b1989dacf58 Takashi Iwai 2009-11-26 3407 return dma_mmap_coherent(substream->dma_buffer.dev.dev,
657b1989dacf58 Takashi Iwai 2009-11-26 3408 area,
657b1989dacf58 Takashi Iwai 2009-11-26 3409 substream->runtime->dma_area,
657b1989dacf58 Takashi Iwai 2009-11-26 3410 substream->runtime->dma_addr,
9066ae7ff5d89c Stefan Roese 2018-03-26 3411 substream->runtime->dma_bytes);
49d776ffb50f2e Takashi Iwai 2014-10-24 3412 #endif /* CONFIG_X86 */
657b1989dacf58 Takashi Iwai 2009-11-26 3413 /* mmap with fault handler */
657b1989dacf58 Takashi Iwai 2009-11-26 3414 area->vm_ops = &snd_pcm_vm_ops_data_fault;
^1da177e4c3f41 Linus Torvalds 2005-04-16 3415 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 3416 }
18a2b962337047 Takashi Iwai 2011-09-28 3417 EXPORT_SYMBOL_GPL(snd_pcm_lib_default_mmap);
^1da177e4c3f41 Linus Torvalds 2005-04-16 3418

:::::: The code at line 3398 was first introduced by commit
:::::: 055032142c42d2821c4aa617915292d6a08d56fc ALSA: Add SoC on-chip internal ram support for DMA buffer allocation

:::::: TO: Nicolin Chen <b42378@xxxxxxxxxxxxx>
:::::: CC: Takashi Iwai <tiwai@xxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation

Attachment: .config.gz
Description: application/gzip