[intel-tdx:tdx/guest-rebased 38/133] arch/x86/boot/compressed/misc.c:454:17: warning: cast from pointer to integer of different size
by kernel test robot
tree: https://github.com/intel/tdx.git tdx/guest-rebased
head: e3995864d37c56f431c93fc3dc454d9c65f5e9ea
commit: 38bb454722407639d0570dd216f8cf65e7f93b84 [38/133] x86/boot/compressed: Handle unaccepted memory
config: i386-randconfig-a001 (https://download.01.org/0day-ci/archive/20220114/202201140813.Ymp2JKvR-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/intel/tdx/commit/38bb454722407639d0570dd216f8cf65e7f93b84
git remote add intel-tdx https://github.com/intel/tdx.git
git fetch --no-tags intel-tdx tdx/guest-rebased
git checkout 38bb454722407639d0570dd216f8cf65e7f93b84
# 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 warnings (new ones prefixed by >>):
arch/x86/boot/compressed/misc.c: In function 'extract_kernel':
>> arch/x86/boot/compressed/misc.c:454:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
454 | accept_memory((phys_addr_t)output,
| ^
arch/x86/boot/compressed/misc.c:455:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
455 | (phys_addr_t)output + needed_size);
| ^
vim +454 arch/x86/boot/compressed/misc.c
448
449 debug_putstr("\nDecompressing Linux... ");
450
451 if (IS_ENABLED(CONFIG_UNACCEPTED_MEMORY) &&
452 boot_params->unaccepted_memory) {
453 debug_putstr("Accepting memory... ");
> 454 accept_memory((phys_addr_t)output,
455 (phys_addr_t)output + needed_size);
456 }
457
458 __decompress(input_data, input_len, NULL, NULL, output, output_len,
459 NULL, error);
460 parse_elf(output);
461 handle_relocations(output, output_len, virt_addr);
462 debug_putstr("done.\nBooting the kernel.\n");
463
464 /* Disable exception handling before booting the kernel */
465 cleanup_exception_handling();
466
467 return output;
468 }
469
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
[hch-block:bio_alloc-cleanup 28/28] fs/btrfs/extent_io.c:3176:15: warning: 'bio' is used uninitialized
by kernel test robot
tree: git://git.infradead.org/users/hch/block.git bio_alloc-cleanup
head: 6e74740a44aecf40f23fc9baa4fe7844e0543046
commit: 6e74740a44aecf40f23fc9baa4fe7844e0543046 [28/28] block: pass a block_device to bio_clone_fast
config: arm64-randconfig-r015-20220113 (https://download.01.org/0day-ci/archive/20220114/202201140821.C6r5Z4QY-lk...)
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
git remote add hch-block git://git.infradead.org/users/hch/block.git
git fetch --no-tags hch-block bio_alloc-cleanup
git checkout 6e74740a44aecf40f23fc9baa4fe7844e0543046
# 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=arm64 SHELL=/bin/bash fs/btrfs/
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 >>):
fs/btrfs/extent_io.c: In function 'btrfs_bio_clone_partial':
>> fs/btrfs/extent_io.c:3176:15: warning: 'bio' is used uninitialized [-Wuninitialized]
3176 | bio = bio_alloc_clone(bio->bi_bdev, orig, GFP_NOFS, &btrfs_bioset);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/bio +3176 fs/btrfs/extent_io.c
3167
3168 struct bio *btrfs_bio_clone_partial(struct bio *orig, u64 offset, u64 size)
3169 {
3170 struct bio *bio;
3171 struct btrfs_bio *bbio;
3172
3173 ASSERT(offset <= UINT_MAX && size <= UINT_MAX);
3174
3175 /* this will never fail when it's backed by a bioset */
> 3176 bio = bio_alloc_clone(bio->bi_bdev, orig, GFP_NOFS, &btrfs_bioset);
3177 ASSERT(bio);
3178
3179 bbio = btrfs_bio(bio);
3180 btrfs_bio_init(bbio);
3181
3182 bio_trim(bio, offset >> 9, size >> 9);
3183 bbio->iter = bio->bi_iter;
3184 return bio;
3185 }
3186
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
[intel-tdx:guest-upstream 25/33] arch/x86/mm/pat/set_memory.c:2012:6: warning: variable 'ret' set but not used
by kernel test robot
tree: https://github.com/intel/tdx.git guest-upstream
head: 33b1329c49e6d5f961b29c5cafd6571a5de523f0
commit: 5364ea9ede9af9f08041cacf140f8feef077d375 [25/33] x86/mm/cpa: Add support for TDX shared memory
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220114/202201140659.QkMQQEy9-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/intel/tdx/commit/5364ea9ede9af9f08041cacf140f8feef077d375
git remote add intel-tdx https://github.com/intel/tdx.git
git fetch --no-tags intel-tdx guest-upstream
git checkout 5364ea9ede9af9f08041cacf140f8feef077d375
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/mm/pat/
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/mm/pat/set_memory.c: In function '__set_memory_enc_pgtable':
>> arch/x86/mm/pat/set_memory.c:2012:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
2012 | int ret;
| ^~~
vim +/ret +2012 arch/x86/mm/pat/set_memory.c
5364ea9ede9af9f arch/x86/mm/pat/set_memory.c Kirill A. Shutemov 2020-03-30 2004
810a521265023a1 arch/x86/mm/pat/set_memory.c Tianyu Lan 2021-10-25 2005 /*
810a521265023a1 arch/x86/mm/pat/set_memory.c Tianyu Lan 2021-10-25 2006 * __set_memory_enc_pgtable() is used for the hypervisors that get
810a521265023a1 arch/x86/mm/pat/set_memory.c Tianyu Lan 2021-10-25 2007 * informed about "encryption" status via page tables.
810a521265023a1 arch/x86/mm/pat/set_memory.c Tianyu Lan 2021-10-25 2008 */
810a521265023a1 arch/x86/mm/pat/set_memory.c Tianyu Lan 2021-10-25 2009 static int __set_memory_enc_pgtable(unsigned long addr, int numpages, bool enc)
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2010 {
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2011 struct cpa_data cpa;
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 @2012 int ret;
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2013
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2014 /* Should not be working on unaligned addresses */
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2015 if (WARN_ONCE(addr & ~PAGE_MASK, "misaligned address: %#lx\n", addr))
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2016 addr &= PAGE_MASK;
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2017
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2018 memset(&cpa, 0, sizeof(cpa));
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2019 cpa.vaddr = &addr;
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2020 cpa.numpages = numpages;
5364ea9ede9af9f arch/x86/mm/pat/set_memory.c Kirill A. Shutemov 2020-03-30 2021
5364ea9ede9af9f arch/x86/mm/pat/set_memory.c Kirill A. Shutemov 2020-03-30 2022 cpa.mask_set = pgprot_cc_mask(enc);
5364ea9ede9af9f arch/x86/mm/pat/set_memory.c Kirill A. Shutemov 2020-03-30 2023 cpa.mask_clr = pgprot_cc_mask(!enc);
5364ea9ede9af9f arch/x86/mm/pat/set_memory.c Kirill A. Shutemov 2020-03-30 2024
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2025 cpa.pgd = init_mm.pgd;
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2026
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2027 /* Must avoid aliasing mappings in the highmem code */
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2028 kmap_flush_unused();
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2029 vm_unmap_aliases();
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2030
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2031 /*
5364ea9ede9af9f arch/x86/mm/pat/set_memory.c Kirill A. Shutemov 2020-03-30 2032 * Before changing the encryption attribute, flush caches.
5364ea9ede9af9f arch/x86/mm/pat/set_memory.c Kirill A. Shutemov 2020-03-30 2033 *
5364ea9ede9af9f arch/x86/mm/pat/set_memory.c Kirill A. Shutemov 2020-03-30 2034 * For TDX, guest is responsible for flushing caches on private->shared
5364ea9ede9af9f arch/x86/mm/pat/set_memory.c Kirill A. Shutemov 2020-03-30 2035 * transition. VMM is responsible for flushing on shared->private.
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2036 */
5364ea9ede9af9f arch/x86/mm/pat/set_memory.c Kirill A. Shutemov 2020-03-30 2037 if (cc_platform_has(CC_ATTR_GUEST_TDX)) {
5364ea9ede9af9f arch/x86/mm/pat/set_memory.c Kirill A. Shutemov 2020-03-30 2038 if (!enc)
5364ea9ede9af9f arch/x86/mm/pat/set_memory.c Kirill A. Shutemov 2020-03-30 2039 cpa_flush(&cpa, 1);
5364ea9ede9af9f arch/x86/mm/pat/set_memory.c Kirill A. Shutemov 2020-03-30 2040 } else {
75d1cc0e05af579 arch/x86/mm/pat/set_memory.c Krish Sadhukhan 2020-09-17 2041 cpa_flush(&cpa, !this_cpu_has(X86_FEATURE_SME_COHERENT));
5364ea9ede9af9f arch/x86/mm/pat/set_memory.c Kirill A. Shutemov 2020-03-30 2042 }
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2043
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2044 ret = __change_page_attr_set_clr(&cpa, 1);
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2045
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2046 /*
fe0937b24ff5d7b arch/x86/mm/pageattr.c Peter Zijlstra 2018-12-03 2047 * After changing the encryption attribute, we need to flush TLBs again
fe0937b24ff5d7b arch/x86/mm/pageattr.c Peter Zijlstra 2018-12-03 2048 * in case any speculative TLB caching occurred (but no need to flush
fe0937b24ff5d7b arch/x86/mm/pageattr.c Peter Zijlstra 2018-12-03 2049 * caches again). We could just use cpa_flush_all(), but in case TLB
fe0937b24ff5d7b arch/x86/mm/pageattr.c Peter Zijlstra 2018-12-03 2050 * flushing gets optimized in the cpa_flush() path use the same logic
fe0937b24ff5d7b arch/x86/mm/pageattr.c Peter Zijlstra 2018-12-03 2051 * as above.
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2052 */
fe0937b24ff5d7b arch/x86/mm/pageattr.c Peter Zijlstra 2018-12-03 2053 cpa_flush(&cpa, 0);
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2054
064ce6c550a0630 arch/x86/mm/pat/set_memory.c Brijesh Singh 2021-08-24 2055 /*
064ce6c550a0630 arch/x86/mm/pat/set_memory.c Brijesh Singh 2021-08-24 2056 * Notify hypervisor that a given memory range is mapped encrypted
064ce6c550a0630 arch/x86/mm/pat/set_memory.c Brijesh Singh 2021-08-24 2057 * or decrypted.
064ce6c550a0630 arch/x86/mm/pat/set_memory.c Brijesh Singh 2021-08-24 2058 */
5364ea9ede9af9f arch/x86/mm/pat/set_memory.c Kirill A. Shutemov 2020-03-30 2059 return notify_range_enc_status_changed(addr, numpages, enc);
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2060 }
77bd2342d4304bd arch/x86/mm/pageattr.c Tom Lendacky 2017-07-17 2061
:::::: The code at line 2012 was first introduced by commit
:::::: 77bd2342d4304bda7896c953d424d15deb314ca3 x86/mm: Add support for changing the memory encryption attribute
:::::: TO: Tom Lendacky <thomas.lendacky(a)amd.com>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
[intel-tdx:tdx/guest-rebased 118/133] arch/x86/kernel/acpi/boot.c:1160: undefined reference to `swiotlb_hint_cpus'
by kernel test robot
tree: https://github.com/intel/tdx.git tdx/guest-rebased
head: e3995864d37c56f431c93fc3dc454d9c65f5e9ea
commit: 8c696e48187c5ffa881e639e1108622debbe6741 [118/133] swiotlb: Split up single swiotlb lock
config: i386-randconfig-a003 (https://download.01.org/0day-ci/archive/20220114/202201140642.CNEqitYj-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/intel/tdx/commit/8c696e48187c5ffa881e639e1108622debbe6741
git remote add intel-tdx https://github.com/intel/tdx.git
git fetch --no-tags intel-tdx tdx/guest-rebased
git checkout 8c696e48187c5ffa881e639e1108622debbe6741
# 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: arch/x86/kernel/acpi/boot.o: in function `acpi_parse_madt_lapic_entries':
>> arch/x86/kernel/acpi/boot.c:1160: undefined reference to `swiotlb_hint_cpus'
vim +1160 arch/x86/kernel/acpi/boot.c
1118
1119 static int __init acpi_parse_madt_lapic_entries(void)
1120 {
1121 int count;
1122 int x2count = 0;
1123 int ret;
1124 struct acpi_subtable_proc madt_proc[2];
1125
1126 if (!boot_cpu_has(X86_FEATURE_APIC))
1127 return -ENODEV;
1128
1129 count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_SAPIC,
1130 acpi_parse_sapic, MAX_LOCAL_APIC);
1131
1132 if (!count) {
1133 memset(madt_proc, 0, sizeof(madt_proc));
1134 madt_proc[0].id = ACPI_MADT_TYPE_LOCAL_APIC;
1135 madt_proc[0].handler = acpi_parse_lapic;
1136 madt_proc[1].id = ACPI_MADT_TYPE_LOCAL_X2APIC;
1137 madt_proc[1].handler = acpi_parse_x2apic;
1138 ret = acpi_table_parse_entries_array(ACPI_SIG_MADT,
1139 sizeof(struct acpi_table_madt),
1140 madt_proc, ARRAY_SIZE(madt_proc), MAX_LOCAL_APIC);
1141 if (ret < 0) {
1142 pr_err("Error parsing LAPIC/X2APIC entries\n");
1143 return ret;
1144 }
1145
1146 count = madt_proc[0].count;
1147 x2count = madt_proc[1].count;
1148 }
1149 if (!count && !x2count) {
1150 pr_err("No LAPIC entries present\n");
1151 /* TBD: Cleanup to allow fallback to MPS */
1152 return -ENODEV;
1153 } else if (count < 0 || x2count < 0) {
1154 pr_err("Error parsing LAPIC entry\n");
1155 /* TBD: Cleanup to allow fallback to MPS */
1156 return count;
1157 }
1158
1159 /* This does not take overrides into consideration */
> 1160 swiotlb_hint_cpus(max(count, x2count));
1161
1162 x2count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_X2APIC_NMI,
1163 acpi_parse_x2apic_nmi, 0);
1164 count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_NMI,
1165 acpi_parse_lapic_nmi, 0);
1166 if (count < 0 || x2count < 0) {
1167 pr_err("Error parsing LAPIC NMI entry\n");
1168 /* TBD: Cleanup to allow fallback to MPS */
1169 return count;
1170 }
1171 return 0;
1172 }
1173
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
[mingo-tip:master 583/2382] kernel/kallsyms.c:905:85: error: subscript of pointer to incomplete type 'struct kallsyms_entry'
by kernel test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git master
head: 1a880941a087613ed42f77001229edfcf75ea8a5
commit: 4357bf918816f743b593665e792f78913f0da47b [583/2382] kallsyms/objtool: Process entries
config: x86_64-randconfig-a015-20220109 (https://download.01.org/0day-ci/archive/20220114/202201140617.BMMz1dhu-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d1021978b8e7e35dcc30201ca1731d64b5a602a8)
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/mingo/tip.git/commit/?id=...
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip master
git checkout 4357bf918816f743b593665e792f78913f0da47b
# 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
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the mingo-tip/master HEAD 1a880941a087613ed42f77001229edfcf75ea8a5 builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
kernel/kallsyms.c:586:12: warning: no previous prototype for function 'arch_get_kallsym' [-Wmissing-prototypes]
int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value,
^
kernel/kallsyms.c:586:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value,
^
static
kernel/kallsyms.c:895:81: error: invalid application of 'sizeof' to an incomplete type 'struct kallsyms_entry'
nr_entries = ((long)&__kallsyms_offsets_end - (long)&__kallsyms_offsets_begin)/sizeof(struct kallsyms_entry);
^ ~~~~~~~~~~~~~~~~~~~~~~~
kernel/kallsyms.c:889:9: note: forward declaration of 'struct kallsyms_entry'
struct kallsyms_entry *entries;
^
>> kernel/kallsyms.c:905:85: error: subscript of pointer to incomplete type 'struct kallsyms_entry'
printk("# kallsyms entry %6ld/%6ld: [%016Lx]: {%s}\n", i, nr_entries, (u64)entries[i].offset, str);
~~~~~~~^
include/linux/printk.h:450:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/printk.h:422:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
^~~~~~~~~~~
kernel/kallsyms.c:889:9: note: forward declaration of 'struct kallsyms_entry'
struct kallsyms_entry *entries;
^
1 warning and 2 errors generated.
vim +905 kernel/kallsyms.c
886
887 static void __init kallsyms_objtool_init(void)
888 {
889 struct kallsyms_entry *entries;
890 long nr_entries, i;
891 char *str;
892
893 printk("# kallsyms_objtool_init()\n");
894
895 nr_entries = ((long)&__kallsyms_offsets_end - (long)&__kallsyms_offsets_begin)/sizeof(struct kallsyms_entry);
896
897 printk("# kallsyms: %ld entries.\n", nr_entries);
898
899 BUG_ON(nr_entries <= 0);
900
901 str = &__kallsyms_strs_begin;
902 entries = (void *) &__kallsyms_offsets_begin;
903
904 for (i = 0; i < nr_entries; i++) {
> 905 printk("# kallsyms entry %6ld/%6ld: [%016Lx]: {%s}\n", i, nr_entries, (u64)entries[i].offset, str);
906
907 str += strlen(str) + 1;
908
909 }
910 printk("# kallsyms, last str: %p\n", str);
911 printk("# kallsyms, &__kallsyms_strs_end: %p\n", &__kallsyms_strs_end);
912
913 BUG_ON(str != &__kallsyms_strs_end);
914 }
915
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
[mark:treewide/gnu99 2/2] arch/sh/include/asm/pgtable.h:39:31: error: left shift of negative value
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git treewide/gnu99
head: 4c56f3c557cbc276326c329e05f64a53398affec
commit: 4c56f3c557cbc276326c329e05f64a53398affec [2/2] treewide: use -std=gnu99
config: sh-randconfig-r026-20220113 (https://download.01.org/0day-ci/archive/20220114/202201140534.ii9mlcnU-lk...)
compiler: sh4-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/mark/linux.git/commit/?id...
git remote add mark https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git
git fetch --no-tags mark treewide/gnu99
git checkout 4c56f3c557cbc276326c329e05f64a53398affec
# 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=sh 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 >>):
cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
In file included from include/linux/pgtable.h:6,
from arch/sh/include/asm/io.h:21,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:17,
from arch/sh/include/asm/hardirq.h:9,
from include/linux/hardirq.h:11,
from include/linux/interrupt.h:11,
from arch/sh/cchips/hd6446x/hd64461.c:11:
arch/sh/include/asm/pgtable.h: In function 'neff_sign_extend':
>> arch/sh/include/asm/pgtable.h:39:31: error: left shift of negative value [-Werror=shift-negative-value]
39 | #define NEFF_MASK (-1LL << NEFF)
| ^~
arch/sh/include/asm/pgtable.h:44:53: note: in expansion of macro 'NEFF_MASK'
44 | return (extended & NEFF_SIGN) ? (extended | NEFF_MASK) : extended;
| ^~~~~~~~~
arch/sh/cchips/hd6446x/hd64461.c: At top level:
arch/sh/cchips/hd6446x/hd64461.c:75:12: error: no previous prototype for 'setup_hd64461' [-Werror=missing-prototypes]
75 | int __init setup_hd64461(void)
| ^~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +39 arch/sh/include/asm/pgtable.h
^1da177e4c3f41 include/asm-sh/pgtable.h Linus Torvalds 2005-04-16 32
36bcd39dbca824 include/asm-sh/pgtable.h Paul Mundt 2007-11-10 33 /*
36bcd39dbca824 include/asm-sh/pgtable.h Paul Mundt 2007-11-10 34 * Effective and physical address definitions, to aid with sign
36bcd39dbca824 include/asm-sh/pgtable.h Paul Mundt 2007-11-10 35 * extension.
36bcd39dbca824 include/asm-sh/pgtable.h Paul Mundt 2007-11-10 36 */
36bcd39dbca824 include/asm-sh/pgtable.h Paul Mundt 2007-11-10 37 #define NEFF 32
36bcd39dbca824 include/asm-sh/pgtable.h Paul Mundt 2007-11-10 38 #define NEFF_SIGN (1LL << (NEFF - 1))
36bcd39dbca824 include/asm-sh/pgtable.h Paul Mundt 2007-11-10 @39 #define NEFF_MASK (-1LL << NEFF)
36bcd39dbca824 include/asm-sh/pgtable.h Paul Mundt 2007-11-10 40
:::::: The code at line 39 was first introduced by commit
:::::: 36bcd39dbca824daffe16d607ae574b6edc7d31a sh: Split out 29-bit and 32-bit physical mode definitions.
:::::: TO: Paul Mundt <lethal(a)linux-sh.org>
:::::: CC: Paul Mundt <lethal(a)linux-sh.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week