Hi Sean,
I love your patch! Yet something to improve:
[auto build test ERROR on next-20191126]
[cannot apply to tip/x86/core tip/auto-latest efi/next v5.4 v5.4-rc8 v5.4-rc7 v5.4]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see
https://stackoverflow.com/a/37406982]
url:
https://github.com/0day-ci/linux/commits/Sean-Christopherson/treewide-bre...
base: 131b7b67e6c2926531dd92915647335bec2e64fb
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/x86/platform/intel-quark/imr_selftest.c: In function 'imr_self_test':
> arch/x86/platform/intel-quark/imr_selftest.c:59:22: error:
implicit declaration of function 'virt_to_phys'; did you mean
'virt_to_page'? [-Werror=implicit-function-declaration]
phys_addr_t
base = virt_to_phys(&_text);
^~~~~~~~~~~~
virt_to_page
cc1: some warnings being treated as errors
vim +59 arch/x86/platform/intel-quark/imr_selftest.c
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 49
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 50 /**
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 51 * imr_self_test
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 52 *
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 53 * Verify IMR self_test with some
simple tests to verify overlap,
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 54 * zero sized allocations and 1 KiB
sized areas.
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 55 *
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 56 */
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 57 static void __init
imr_self_test(void)
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 58 {
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 @59 phys_addr_t base =
virt_to_phys(&_text);
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 60 size_t size =
virt_to_phys(&__end_rodata) - base;
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 61 const char *fmt_over =
"overlapped IMR @ (0x%08lx - 0x%08lx)\n";
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 62 int ret;
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 63
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 64 /* Test zero zero. */
c637fa5294cefe Bryan O'Donoghue 2016-02-23 65 ret = imr_add_range(0, 0, 0, 0);
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 66 imr_self_test_result(ret < 0,
"zero sized IMR\n");
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 67
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 68 /* Test exact overlap. */
c637fa5294cefe Bryan O'Donoghue 2016-02-23 69 ret = imr_add_range(base, size,
IMR_CPU, IMR_CPU);
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 70 imr_self_test_result(ret < 0,
fmt_over, __va(base), __va(base + size));
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 71
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 72 /* Test overlap with base inside of
existing. */
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 73 base += size - IMR_ALIGN;
c637fa5294cefe Bryan O'Donoghue 2016-02-23 74 ret = imr_add_range(base, size,
IMR_CPU, IMR_CPU);
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 75 imr_self_test_result(ret < 0,
fmt_over, __va(base), __va(base + size));
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 76
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 77 /* Test overlap with end inside of
existing. */
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 78 base -= size + IMR_ALIGN * 2;
c637fa5294cefe Bryan O'Donoghue 2016-02-23 79 ret = imr_add_range(base, size,
IMR_CPU, IMR_CPU);
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 80 imr_self_test_result(ret < 0,
fmt_over, __va(base), __va(base + size));
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 81
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 82 /* Test that a 1 KiB IMR @ zero with
read/write all will bomb out. */
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 83 ret = imr_add_range(0, IMR_ALIGN,
IMR_READ_ACCESS_ALL,
c637fa5294cefe Bryan O'Donoghue 2016-02-23 84 IMR_WRITE_ACCESS_ALL);
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 85 imr_self_test_result(ret < 0,
"1KiB IMR @ 0x00000000 - access-all\n");
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 86
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 87 /* Test that a 1 KiB IMR @ zero with
CPU only will work. */
c637fa5294cefe Bryan O'Donoghue 2016-02-23 88 ret = imr_add_range(0, IMR_ALIGN,
IMR_CPU, IMR_CPU);
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 89 imr_self_test_result(ret >= 0,
"1KiB IMR @ 0x00000000 - cpu-access\n");
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 90 if (ret >= 0) {
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 91 ret = imr_remove_range(0,
IMR_ALIGN);
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 92 imr_self_test_result(ret == 0,
"teardown - cpu-access\n");
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 93 }
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 94
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 95 /* Test 2 KiB works. */
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 96 size = IMR_ALIGN * 2;
c637fa5294cefe Bryan O'Donoghue 2016-02-23 97 ret = imr_add_range(0, size,
IMR_READ_ACCESS_ALL, IMR_WRITE_ACCESS_ALL);
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 98 imr_self_test_result(ret >= 0,
"2KiB IMR @ 0x00000000\n");
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 99 if (ret >= 0) {
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 100 ret = imr_remove_range(0, size);
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 101 imr_self_test_result(ret == 0,
"teardown 2KiB\n");
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 102 }
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 103 }
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 104
:::::: The code at line 59 was first introduced by commit
:::::: 28a375df16c2b6d01227541f3956568995aa5fda x86/intel/quark: Add Isolated Memory
Regions for Quark X1000
:::::: TO: Bryan O'Donoghue <pure.logic(a)nexus-software.ie>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation