Skip to contentSkip to conversation

drivers/firmware/efi/earlycon.c:59:34: error: implicit declaration of function 'pgprot_writecombine'

PATCH Ard Biesheuvel 1 participant 1 message Apr 27, 2020 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 15 lines · Atish Patra
Quoted 13 lines · Ard Biesheuvel
Quoted 5 lines · kbuild test robot
tree:   https://github.com/atishp04/linux uefi_riscv_pr
head:   47dfd752cad3470e10c3e93893439c7a69106f6b
commit: 47dfd752cad3470e10c3e93893439c7a69106f6b [4/4] RISC-V: Add

EFI stub support.
config: riscv-nommu_virt_defconfig (attached as .config)

I guess EFI needs to depend on MMU on RISC-V

Please mention this to Palmer, and send him a fix to go on top of the PR

Quoted 8 lines
Quoted 4 lines

I'm not quite sure why CONFIG_EFI was enabled in this build btw, since
it doesn't get enabled by default, right?

It is enabled by default in Kconfig. We can make it depends on MMU in Kconfig or just enable it in defconfig only ?

It should depend on MMU in any case. This will break randconfig builds, regardless of whether you enable it in your defconfig or not.

Quoted 63 lines
Quoted 53 lines
Quoted 53 lines

compiler: riscv64-linux-gcc (GCC) 9.3.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 47dfd752cad3470e10c3e93893439c7a69106f6b # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0
make.cross ARCH=riscv

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

drivers/firmware/efi/earlycon.c: In function 'efi_earlycon_map':

Quoted 3 lines
Quoted 3 lines

drivers/firmware/efi/earlycon.c:59:34: error: implicit declaration of function 'pgprot_writecombine' [- Werror=implicit-function-declaration]

59 | fb_prot = fb_wb ? PAGE_KERNEL :

pgprot_writecombine(PAGE_KERNEL);
         |                                  ^~~~~~~~~~~~~~~~~~~

drivers/firmware/efi/earlycon.c:59:32: error: type mismatch in
conditional expression
59 | fb_prot = fb_wb ? PAGE_KERNEL :
pgprot_writecombine(PAGE_KERNEL);
| ^
cc1: some warnings being treated as errors

vim +/pgprot_writecombine +59 drivers/firmware/efi/earlycon.c

69c1f396f25b80 Ard Biesheuvel  2019-02-02  51
69c1f396f25b80 Ard Biesheuvel  2019-02-02  52  static __ref void
*efi_earlycon_map(unsigned long start, unsigned long len)
69c1f396f25b80 Ard Biesheuvel  2019-02-02  53  {
d92b54570d24d0 Arvind Sankar   2019-12-24  54   pgprot_t fb_prot;
d92b54570d24d0 Arvind Sankar   2019-12-24  55
b418d660bb9798 Andy Shevchenko 2019-12-06  56   if (efi_fb)
b418d660bb9798 Andy Shevchenko 2019-12-06  57           return

efi_fb + start;
b418d660bb9798 Andy Shevchenko 2019-12-06 58
d92b54570d24d0 Arvind Sankar 2019-12-24 @59 fb_prot = fb_wb ?
PAGE_KERNEL : pgprot_writecombine(PAGE_KERNEL);
69c1f396f25b80 Ard Biesheuvel 2019-02-02 60 return
early_memremap_prot(fb_base + start, len, pgprot_val(fb_prot));

69c1f396f25b80 Ard Biesheuvel  2019-02-02  61  }
69c1f396f25b80 Ard Biesheuvel  2019-02-02  62

:::::: The code at line 59 was first introduced by commit :::::: d92b54570d24d017d2630e314b525ed792f5aa6c efi/earlycon: Fix write-combine mapping on x86

Quoted 6 lines
Quoted 6 lines

:::::: TO: Arvind Sankar <[email protected]>
:::::: CC: Ingo Molnar <[email protected]>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

--
Regards,
Atish