tree: https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features head: ad64a2c4bdd14f548c2579fb2b16f6ee165300a3 commit: 2b4a587524258c315c065cd1236a9174caf17686 [15/18] s390/mm,kvm: flush gmap address space with IDTE config: s390-allmodconfig (attached as .config) compiler: s390x-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 2b4a587524258c315c065cd1236a9174caf17686 # save the attached .config to linux build tree make.cross ARCH=s390 All error/warnings (new ones prefixed by >>): arch/s390/mm/gmap.c: In function 'gmap_alloc': >> arch/s390/mm/gmap.c:38:16: warning: unused variable 'gmap_asce' [-Wunused-variable] unsigned long gmap_asce; ^ arch/s390/mm/gmap.c: In function 'gmap_create': >> arch/s390/mm/gmap.c:106:3: error: 'gmap_asce' undeclared (first use in this function) gmap_asce = gmap->asce; ^ arch/s390/mm/gmap.c:106:3: note: each undeclared identifier is reported only once for each function it appears in arch/s390/mm/gmap.c: In function 'gmap_free': arch/s390/mm/gmap.c:183:16: warning: unused variable 'gmap_asce' [-Wunused-variable] unsigned long gmap_asce; ^ arch/s390/mm/gmap.c: In function 'gmap_remove': arch/s390/mm/gmap.c:254:3: error: 'gmap_asce' undeclared (first use in this function) gmap_asce = 0; ^ vim +/gmap_asce +106 arch/s390/mm/gmap.c 32 static struct gmap *gmap_alloc(unsigned long limit) 33 { 34 struct gmap *gmap; 35 struct page *page; 36 unsigned long *table; 37 unsigned long etype, atype; > 38 unsigned long gmap_asce; 39 40 if (limit < (1UL << 31)) { 41 limit = (1UL << 31) - 1; 42 atype = _ASCE_TYPE_SEGMENT; 43 etype = _SEGMENT_ENTRY_EMPTY; 44 } else if (limit < (1UL << 42)) { 45 limit = (1UL << 42) - 1; 46 atype = _ASCE_TYPE_REGION3; 47 etype = _REGION3_ENTRY_EMPTY; 48 } else if (limit < (1UL << 53)) { 49 limit = (1UL << 53) - 1; 50 atype = _ASCE_TYPE_REGION2; 51 etype = _REGION2_ENTRY_EMPTY; 52 } else { 53 limit = -1UL; 54 atype = _ASCE_TYPE_REGION1; 55 etype = _REGION1_ENTRY_EMPTY; 56 } 57 gmap = kzalloc(sizeof(struct gmap), GFP_KERNEL); 58 if (!gmap) 59 goto out; 60 INIT_LIST_HEAD(&gmap->crst_list); 61 INIT_LIST_HEAD(&gmap->children); 62 INIT_LIST_HEAD(&gmap->pt_list); 63 INIT_RADIX_TREE(&gmap->guest_to_host, GFP_KERNEL); 64 INIT_RADIX_TREE(&gmap->host_to_guest, GFP_ATOMIC); 65 INIT_RADIX_TREE(&gmap->host_to_rmap, GFP_ATOMIC); 66 spin_lock_init(&gmap->guest_table_lock); 67 spin_lock_init(&gmap->shadow_lock); 68 atomic_set(&gmap->ref_count, 1); 69 page = alloc_pages(GFP_KERNEL, 2); 70 if (!page) 71 goto out_free; 72 page->index = 0; 73 list_add(&page->lru, &gmap->crst_list); 74 table = (unsigned long *) page_to_phys(page); 75 crst_table_init(table, etype); 76 gmap->table = table; 77 gmap->asce = atype | _ASCE_TABLE_LENGTH | 78 _ASCE_USER_BITS | __pa(table); 79 gmap->asce_end = limit; 80 return gmap; 81 82 out_free: 83 kfree(gmap); 84 out: 85 return NULL; 86 } 87 88 /** 89 * gmap_create - create a guest address space 90 * @mm: pointer to the parent mm_struct 91 * @limit: maximum size of the gmap address space 92 * 93 * Returns a guest address space structure. 94 */ 95 struct gmap *gmap_create(struct mm_struct *mm, unsigned long limit) 96 { 97 struct gmap *gmap; 98 99 gmap = gmap_alloc(limit); 100 if (!gmap) 101 return NULL; 102 gmap->mm = mm; 103 spin_lock(&mm->context.gmap_lock); 104 list_add_rcu(&gmap->list, &mm->context.gmap_list); 105 if (list_is_singular(&mm->context.gmap_list)) > 106 gmap_asce = gmap->asce; 107 else 108 gmap_asce = -1UL; 109 WRITE_ONCE(mm->context.gmap_asce, gmap_asce); --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: Binary data