* mm/huge_memory.c:221:7: error: incompatible types when assigning to type 'pmd_t' from type 'int'
[not found] <5152b651.JKLmvRYh1bEEyapp%fengguang.wu@intel.com>
@ 2013-03-27 9:26 ` Fengguang Wu
2013-03-27 14:02 ` Andrea Arcangeli
0 siblings, 1 reply; 3+ messages in thread
From: Fengguang Wu @ 2013-03-27 9:26 UTC (permalink / raw)
To: Andrea Arcangeli
Cc: Johannes Weiner, Andrew Morton, linux-mips@linux-mips.org
Hi Andrea,
FYI, kernel build failed on
tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux master
head: a12183c62717ac4579319189a00f5883a18dff08
commit: 71e3aac0724ffe8918992d76acfe3aad7d8724a5 thp: transparent hugepage core
date: 2 years, 2 months ago
config: make ARCH=mips allmodconfig
All error/warnings:
mm/huge_memory.c:19:15: error: expected identifier or '(' before numeric constant
mm/huge_memory.c: In function 'double_flag_show':
mm/huge_memory.c:28:24: error: lvalue required as unary '&' operand
mm/huge_memory.c:29:3: error: lvalue required as unary '&' operand
mm/huge_memory.c:31:32: error: lvalue required as unary '&' operand
mm/huge_memory.c: In function 'double_flag_store':
mm/huge_memory.c:44:20: error: lvalue required as unary '&' operand
mm/huge_memory.c:45:23: error: lvalue required as unary '&' operand
mm/huge_memory.c:48:22: error: lvalue required as unary '&' operand
mm/huge_memory.c:49:21: error: lvalue required as unary '&' operand
mm/huge_memory.c:52:22: error: lvalue required as unary '&' operand
mm/huge_memory.c:53:23: error: lvalue required as unary '&' operand
mm/huge_memory.c: In function 'single_flag_show':
mm/huge_memory.c:82:21: error: lvalue required as unary '&' operand
mm/huge_memory.c: In function 'single_flag_store':
mm/huge_memory.c:94:17: error: lvalue required as unary '&' operand
mm/huge_memory.c:97:19: error: lvalue required as unary '&' operand
mm/huge_memory.c: In function 'setup_transparent_hugepage':
mm/huge_memory.c:180:4: error: lvalue required as unary '&' operand
mm/huge_memory.c:182:6: error: lvalue required as unary '&' operand
mm/huge_memory.c:186:6: error: lvalue required as unary '&' operand
mm/huge_memory.c:188:4: error: lvalue required as unary '&' operand
mm/huge_memory.c:192:6: error: lvalue required as unary '&' operand
mm/huge_memory.c:194:6: error: lvalue required as unary '&' operand
mm/huge_memory.c: In function 'prepare_pmd_huge_pte':
mm/huge_memory.c:211:9: error: 'struct mm_struct' has no member named 'pmd_huge_pte'
mm/huge_memory.c:214:30: error: 'struct mm_struct' has no member named 'pmd_huge_pte'
mm/huge_memory.c:215:4: error: 'struct mm_struct' has no member named 'pmd_huge_pte'
mm/huge_memory.c: In function 'maybe_pmd_mkwrite':
mm/huge_memory.c:221:3: error: implicit declaration of function 'pmd_mkwrite' [-Werror=implicit-function-declaration]
>> mm/huge_memory.c:221:7: error: incompatible types when assigning to type 'pmd_t' from type 'int'
mm/huge_memory.c: In function '__do_huge_pmd_anonymous_page':
mm/huge_memory.c:240:2: error: implicit declaration of function 'clear_huge_page' [-Werror=implicit-function-declaration]
mm/huge_memory.c:240:31: error: 'HPAGE_PMD_NR' undeclared (first use in this function)
mm/huge_memory.c:240:31: note: each undeclared identifier is reported only once for each function it appears in
mm/huge_memory.c:250:3: error: implicit declaration of function 'mk_pmd' [-Werror=implicit-function-declaration]
>> mm/huge_memory.c:250:9: error: incompatible types when assigning to type 'pmd_t' from type 'int'
mm/huge_memory.c:251:3: error: implicit declaration of function 'pmd_mkdirty' [-Werror=implicit-function-declaration]
mm/huge_memory.c:251:3: error: incompatible type for argument 1 of 'maybe_pmd_mkwrite'
mm/huge_memory.c:218:21: note: expected 'pmd_t' but argument is of type 'int'
mm/huge_memory.c:252:3: error: implicit declaration of function 'pmd_mkhuge' [-Werror=implicit-function-declaration]
>> mm/huge_memory.c:252:9: error: incompatible types when assigning to type 'pmd_t' from type 'int'
mm/huge_memory.c:260:3: error: implicit declaration of function 'set_pmd_at' [-Werror=implicit-function-declaration]
mm/huge_memory.c: In function 'alloc_hugepage':
mm/huge_memory.c:271:9: error: 'HPAGE_PMD_ORDER' undeclared (first use in this function)
mm/huge_memory.c: In function 'do_huge_pmd_anonymous_page':
mm/huge_memory.c:286:3: error: implicit declaration of function 'transparent_hugepage_defrag' [-Werror=implicit-function-declaration]
mm/huge_memory.c:310:2: error: implicit declaration of function 'handle_pte_fault' [-Werror=implicit-function-declaration]
mm/huge_memory.c: In function 'copy_huge_pmd':
mm/huge_memory.c:349:39: error: 'HPAGE_PMD_NR' undeclared (first use in this function)
mm/huge_memory.c:352:2: error: implicit declaration of function 'pmd_mkold' [-Werror=implicit-function-declaration]
mm/huge_memory.c:352:2: error: implicit declaration of function 'pmd_wrprotect' [-Werror=implicit-function-declaration]
>> mm/huge_memory.c:352:6: error: incompatible types when assigning to type 'pmd_t' from type 'int'
mm/huge_memory.c: In function 'get_pmd_huge_pte':
mm/huge_memory.c:372:14: error: 'struct mm_struct' has no member named 'pmd_huge_pte'
mm/huge_memory.c:374:5: error: 'struct mm_struct' has no member named 'pmd_huge_pte'
mm/huge_memory.c:376:5: error: 'struct mm_struct' has no member named 'pmd_huge_pte'
mm/huge_memory.c: In function 'do_huge_pmd_wp_page_fallback':
mm/huge_memory.c:395:42: error: 'HPAGE_PMD_NR' undeclared (first use in this function)
mm/huge_memory.c: In function 'do_huge_pmd_wp_page':
mm/huge_memory.c:481:3: error: implicit declaration of function 'pmd_mkyoung' [-Werror=implicit-function-declaration]
>> mm/huge_memory.c:481:9: error: incompatible types when assigning to type 'pmd_t' from type 'int'
mm/huge_memory.c:482:3: error: incompatible type for argument 1 of 'maybe_pmd_mkwrite'
mm/huge_memory.c:218:21: note: expected 'pmd_t' but argument is of type 'int'
mm/huge_memory.c:484:4: error: incompatible type for argument 3 of 'update_mmu_cache'
In file included from include/linux/mm.h:41:0,
from mm/huge_memory.c:8:
arch/mips/include/asm/pgtable.h:370:20: note: expected 'struct pte_t *' but argument is of type 'pmd_t'
mm/huge_memory.c:492:6: error: implicit declaration of function 'transparent_hugepage_debug_cow' [-Werror=implicit-function-declaration]
mm/huge_memory.c:504:2: error: implicit declaration of function 'copy_user_huge_page' [-Werror=implicit-function-declaration]
mm/huge_memory.c:504:50: error: 'HPAGE_PMD_NR' undeclared (first use in this function)
>> mm/huge_memory.c:514:9: error: incompatible types when assigning to type 'pmd_t' from type 'int'
mm/huge_memory.c:515:3: error: incompatible type for argument 1 of 'maybe_pmd_mkwrite'
mm/huge_memory.c:218:21: note: expected 'pmd_t' but argument is of type 'int'
>> mm/huge_memory.c:516:9: error: incompatible types when assigning to type 'pmd_t' from type 'int'
mm/huge_memory.c:520:3: error: incompatible type for argument 3 of 'update_mmu_cache'
In file included from include/linux/mm.h:41:0,
from mm/huge_memory.c:8:
arch/mips/include/asm/pgtable.h:370:20: note: expected 'struct pte_t *' but argument is of type 'pmd_t'
mm/huge_memory.c: In function 'follow_trans_huge_pmd':
>> mm/huge_memory.c:555:8: error: incompatible types when assigning to type 'pmd_t' from type 'int'
mm/huge_memory.c: In function 'zap_huge_pmd':
mm/huge_memory.c:586:43: error: 'HPAGE_PMD_NR' undeclared (first use in this function)
mm/huge_memory.c: In function '__split_huge_page_splitting':
mm/huge_memory.c:654:3: error: implicit declaration of function 'pmdp_splitting_flush' [-Werror=implicit-function-declaration]
mm/huge_memory.c: In function '__split_huge_page_refcount':
mm/huge_memory.c:672:18: error: 'HPAGE_PMD_NR' undeclared (first use in this function)
mm/huge_memory.c:728:2: error: implicit declaration of function 'ClearPageCompound' [-Werror=implicit-function-declaration]
mm/huge_memory.c: In function '__split_huge_page_map':
mm/huge_memory.c:769:36: error: 'HPAGE_PMD_NR' undeclared (first use in this function)
mm/huge_memory.c:779:4: error: implicit declaration of function 'pmd_young' [-Werror=implicit-function-declaration]
mm/huge_memory.c:815:3: error: implicit declaration of function 'pmd_mknotpresent' [-Werror=implicit-function-declaration]
mm/huge_memory.c: In function '__split_huge_page':
mm/huge_memory.c:838:3: error: implicit declaration of function 'vma_address' [-Werror=implicit-function-declaration]
mm/huge_memory.c: At top level:
mm/huge_memory.c:860:5: error: redefinition of 'split_huge_page'
In file included from include/linux/mm.h:249:0,
from mm/huge_memory.c:8:
include/linux/huge_mm.h:108:19: note: previous definition of 'split_huge_page' was here
mm/huge_memory.c: In function 'single_flag_show':
mm/huge_memory.c:86:1: warning: control reaches end of non-void function [-Wreturn-type]
mm/huge_memory.c: In function 'double_flag_show':
mm/huge_memory.c:35:1: warning: control reaches end of non-void function [-Wreturn-type]
cc1: some warnings being treated as errors
vim +221 mm/huge_memory.c
71e3aac0 Andrea Arcangeli 2011-01-13 212 INIT_LIST_HEAD(&pgtable->lru);
71e3aac0 Andrea Arcangeli 2011-01-13 213 else
71e3aac0 Andrea Arcangeli 2011-01-13 214 list_add(&pgtable->lru, &mm->pmd_huge_pte->lru);
71e3aac0 Andrea Arcangeli 2011-01-13 215 mm->pmd_huge_pte = pgtable;
71e3aac0 Andrea Arcangeli 2011-01-13 216 }
71e3aac0 Andrea Arcangeli 2011-01-13 217
71e3aac0 Andrea Arcangeli 2011-01-13 @218 static inline pmd_t maybe_pmd_mkwrite(pmd_t pmd, struct vm_area_struct *vma)
71e3aac0 Andrea Arcangeli 2011-01-13 219 {
71e3aac0 Andrea Arcangeli 2011-01-13 220 if (likely(vma->vm_flags & VM_WRITE))
71e3aac0 Andrea Arcangeli 2011-01-13 @221 pmd = pmd_mkwrite(pmd);
71e3aac0 Andrea Arcangeli 2011-01-13 222 return pmd;
71e3aac0 Andrea Arcangeli 2011-01-13 223 }
71e3aac0 Andrea Arcangeli 2011-01-13 224
71e3aac0 Andrea Arcangeli 2011-01-13 225 static int __do_huge_pmd_anonymous_page(struct mm_struct *mm,
71e3aac0 Andrea Arcangeli 2011-01-13 226 struct vm_area_struct *vma,
71e3aac0 Andrea Arcangeli 2011-01-13 227 unsigned long haddr, pmd_t *pmd,
71e3aac0 Andrea Arcangeli 2011-01-13 228 struct page *page)
71e3aac0 Andrea Arcangeli 2011-01-13 229 {
71e3aac0 Andrea Arcangeli 2011-01-13 230 int ret = 0;
71e3aac0 Andrea Arcangeli 2011-01-13 231 pgtable_t pgtable;
71e3aac0 Andrea Arcangeli 2011-01-13 232
71e3aac0 Andrea Arcangeli 2011-01-13 233 VM_BUG_ON(!PageCompound(page));
71e3aac0 Andrea Arcangeli 2011-01-13 234 pgtable = pte_alloc_one(mm, haddr);
71e3aac0 Andrea Arcangeli 2011-01-13 235 if (unlikely(!pgtable)) {
71e3aac0 Andrea Arcangeli 2011-01-13 236 put_page(page);
71e3aac0 Andrea Arcangeli 2011-01-13 237 return VM_FAULT_OOM;
71e3aac0 Andrea Arcangeli 2011-01-13 238 }
71e3aac0 Andrea Arcangeli 2011-01-13 239
71e3aac0 Andrea Arcangeli 2011-01-13 240 clear_huge_page(page, haddr, HPAGE_PMD_NR);
71e3aac0 Andrea Arcangeli 2011-01-13 241 __SetPageUptodate(page);
71e3aac0 Andrea Arcangeli 2011-01-13 242
71e3aac0 Andrea Arcangeli 2011-01-13 243 spin_lock(&mm->page_table_lock);
71e3aac0 Andrea Arcangeli 2011-01-13 244 if (unlikely(!pmd_none(*pmd))) {
71e3aac0 Andrea Arcangeli 2011-01-13 245 spin_unlock(&mm->page_table_lock);
71e3aac0 Andrea Arcangeli 2011-01-13 246 put_page(page);
71e3aac0 Andrea Arcangeli 2011-01-13 247 pte_free(mm, pgtable);
71e3aac0 Andrea Arcangeli 2011-01-13 248 } else {
71e3aac0 Andrea Arcangeli 2011-01-13 249 pmd_t entry;
71e3aac0 Andrea Arcangeli 2011-01-13 @250 entry = mk_pmd(page, vma->vm_page_prot);
71e3aac0 Andrea Arcangeli 2011-01-13 251 entry = maybe_pmd_mkwrite(pmd_mkdirty(entry), vma);
71e3aac0 Andrea Arcangeli 2011-01-13 @252 entry = pmd_mkhuge(entry);
71e3aac0 Andrea Arcangeli 2011-01-13 253 /*
71e3aac0 Andrea Arcangeli 2011-01-13 254 * The spinlocking to take the lru_lock inside
71e3aac0 Andrea Arcangeli 2011-01-13 255 * page_add_new_anon_rmap() acts as a full memory
71e3aac0 Andrea Arcangeli 2011-01-13 256 * barrier to be sure clear_huge_page writes become
71e3aac0 Andrea Arcangeli 2011-01-13 257 * visible after the set_pmd_at() write.
71e3aac0 Andrea Arcangeli 2011-01-13 258 */
71e3aac0 Andrea Arcangeli 2011-01-13 259 page_add_new_anon_rmap(page, vma, haddr);
71e3aac0 Andrea Arcangeli 2011-01-13 260 set_pmd_at(mm, haddr, pmd, entry);
71e3aac0 Andrea Arcangeli 2011-01-13 261 prepare_pmd_huge_pte(pgtable, mm);
71e3aac0 Andrea Arcangeli 2011-01-13 262 add_mm_counter(mm, MM_ANONPAGES, HPAGE_PMD_NR);
71e3aac0 Andrea Arcangeli 2011-01-13 263 spin_unlock(&mm->page_table_lock);
71e3aac0 Andrea Arcangeli 2011-01-13 264 }
71e3aac0 Andrea Arcangeli 2011-01-13 265
71e3aac0 Andrea Arcangeli 2011-01-13 266 return ret;
71e3aac0 Andrea Arcangeli 2011-01-13 267 }
71e3aac0 Andrea Arcangeli 2011-01-13 268
71e3aac0 Andrea Arcangeli 2011-01-13 269 static inline struct page *alloc_hugepage(int defrag)
71e3aac0 Andrea Arcangeli 2011-01-13 270 {
71e3aac0 Andrea Arcangeli 2011-01-13 271 return alloc_pages(GFP_TRANSHUGE & ~(defrag ? 0 : __GFP_WAIT),
71e3aac0 Andrea Arcangeli 2011-01-13 272 HPAGE_PMD_ORDER);
71e3aac0 Andrea Arcangeli 2011-01-13 273 }
71e3aac0 Andrea Arcangeli 2011-01-13 274
71e3aac0 Andrea Arcangeli 2011-01-13 275 int do_huge_pmd_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
71e3aac0 Andrea Arcangeli 2011-01-13 276 unsigned long address, pmd_t *pmd,
71e3aac0 Andrea Arcangeli 2011-01-13 277 unsigned int flags)
71e3aac0 Andrea Arcangeli 2011-01-13 278 {
71e3aac0 Andrea Arcangeli 2011-01-13 279 struct page *page;
71e3aac0 Andrea Arcangeli 2011-01-13 280 unsigned long haddr = address & HPAGE_PMD_MASK;
71e3aac0 Andrea Arcangeli 2011-01-13 281 pte_t *pte;
71e3aac0 Andrea Arcangeli 2011-01-13 282
71e3aac0 Andrea Arcangeli 2011-01-13 283 if (haddr >= vma->vm_start && haddr + HPAGE_PMD_SIZE <= vma->vm_end) {
71e3aac0 Andrea Arcangeli 2011-01-13 284 if (unlikely(anon_vma_prepare(vma)))
71e3aac0 Andrea Arcangeli 2011-01-13 285 return VM_FAULT_OOM;
71e3aac0 Andrea Arcangeli 2011-01-13 286 page = alloc_hugepage(transparent_hugepage_defrag(vma));
71e3aac0 Andrea Arcangeli 2011-01-13 287 if (unlikely(!page))
71e3aac0 Andrea Arcangeli 2011-01-13 288 goto out;
71e3aac0 Andrea Arcangeli 2011-01-13 289
71e3aac0 Andrea Arcangeli 2011-01-13 290 return __do_huge_pmd_anonymous_page(mm, vma, haddr, pmd, page);
71e3aac0 Andrea Arcangeli 2011-01-13 291 }
71e3aac0 Andrea Arcangeli 2011-01-13 292 out:
71e3aac0 Andrea Arcangeli 2011-01-13 293 /*
71e3aac0 Andrea Arcangeli 2011-01-13 294 * Use __pte_alloc instead of pte_alloc_map, because we can't
71e3aac0 Andrea Arcangeli 2011-01-13 295 * run pte_offset_map on the pmd, if an huge pmd could
71e3aac0 Andrea Arcangeli 2011-01-13 296 * materialize from under us from a different thread.
71e3aac0 Andrea Arcangeli 2011-01-13 297 */
71e3aac0 Andrea Arcangeli 2011-01-13 298 if (unlikely(__pte_alloc(mm, vma, pmd, address)))
71e3aac0 Andrea Arcangeli 2011-01-13 299 return VM_FAULT_OOM;
71e3aac0 Andrea Arcangeli 2011-01-13 300 /* if an huge pmd materialized from under us just retry later */
71e3aac0 Andrea Arcangeli 2011-01-13 301 if (unlikely(pmd_trans_huge(*pmd)))
71e3aac0 Andrea Arcangeli 2011-01-13 302 return 0;
71e3aac0 Andrea Arcangeli 2011-01-13 303 /*
71e3aac0 Andrea Arcangeli 2011-01-13 304 * A regular pmd is established and it can't morph into a huge pmd
71e3aac0 Andrea Arcangeli 2011-01-13 305 * from under us anymore at this point because we hold the mmap_sem
71e3aac0 Andrea Arcangeli 2011-01-13 306 * read mode and khugepaged takes it in write mode. So now it's
71e3aac0 Andrea Arcangeli 2011-01-13 307 * safe to run pte_offset_map().
71e3aac0 Andrea Arcangeli 2011-01-13 308 */
71e3aac0 Andrea Arcangeli 2011-01-13 309 pte = pte_offset_map(pmd, address);
71e3aac0 Andrea Arcangeli 2011-01-13 310 return handle_pte_fault(mm, vma, address, pte, pmd, flags);
71e3aac0 Andrea Arcangeli 2011-01-13 311 }
71e3aac0 Andrea Arcangeli 2011-01-13 312
71e3aac0 Andrea Arcangeli 2011-01-13 313 int copy_huge_pmd(struct mm_struct *dst_mm, struct mm_struct *src_mm,
71e3aac0 Andrea Arcangeli 2011-01-13 314 pmd_t *dst_pmd, pmd_t *src_pmd, unsigned long addr,
71e3aac0 Andrea Arcangeli 2011-01-13 315 struct vm_area_struct *vma)
71e3aac0 Andrea Arcangeli 2011-01-13 316 {
71e3aac0 Andrea Arcangeli 2011-01-13 317 struct page *src_page;
71e3aac0 Andrea Arcangeli 2011-01-13 318 pmd_t pmd;
71e3aac0 Andrea Arcangeli 2011-01-13 319 pgtable_t pgtable;
71e3aac0 Andrea Arcangeli 2011-01-13 320 int ret;
71e3aac0 Andrea Arcangeli 2011-01-13 321
71e3aac0 Andrea Arcangeli 2011-01-13 322 ret = -ENOMEM;
71e3aac0 Andrea Arcangeli 2011-01-13 323 pgtable = pte_alloc_one(dst_mm, addr);
71e3aac0 Andrea Arcangeli 2011-01-13 324 if (unlikely(!pgtable))
71e3aac0 Andrea Arcangeli 2011-01-13 325 goto out;
71e3aac0 Andrea Arcangeli 2011-01-13 326
71e3aac0 Andrea Arcangeli 2011-01-13 327 spin_lock(&dst_mm->page_table_lock);
71e3aac0 Andrea Arcangeli 2011-01-13 328 spin_lock_nested(&src_mm->page_table_lock, SINGLE_DEPTH_NESTING);
71e3aac0 Andrea Arcangeli 2011-01-13 329
71e3aac0 Andrea Arcangeli 2011-01-13 330 ret = -EAGAIN;
71e3aac0 Andrea Arcangeli 2011-01-13 331 pmd = *src_pmd;
71e3aac0 Andrea Arcangeli 2011-01-13 332 if (unlikely(!pmd_trans_huge(pmd))) {
71e3aac0 Andrea Arcangeli 2011-01-13 333 pte_free(dst_mm, pgtable);
71e3aac0 Andrea Arcangeli 2011-01-13 334 goto out_unlock;
71e3aac0 Andrea Arcangeli 2011-01-13 335 }
71e3aac0 Andrea Arcangeli 2011-01-13 336 if (unlikely(pmd_trans_splitting(pmd))) {
71e3aac0 Andrea Arcangeli 2011-01-13 337 /* split huge page running from under us */
71e3aac0 Andrea Arcangeli 2011-01-13 338 spin_unlock(&src_mm->page_table_lock);
71e3aac0 Andrea Arcangeli 2011-01-13 339 spin_unlock(&dst_mm->page_table_lock);
71e3aac0 Andrea Arcangeli 2011-01-13 340 pte_free(dst_mm, pgtable);
71e3aac0 Andrea Arcangeli 2011-01-13 341
71e3aac0 Andrea Arcangeli 2011-01-13 342 wait_split_huge_page(vma->anon_vma, src_pmd); /* src_vma */
71e3aac0 Andrea Arcangeli 2011-01-13 343 goto out;
71e3aac0 Andrea Arcangeli 2011-01-13 344 }
71e3aac0 Andrea Arcangeli 2011-01-13 345 src_page = pmd_page(pmd);
71e3aac0 Andrea Arcangeli 2011-01-13 346 VM_BUG_ON(!PageHead(src_page));
71e3aac0 Andrea Arcangeli 2011-01-13 347 get_page(src_page);
71e3aac0 Andrea Arcangeli 2011-01-13 348 page_dup_rmap(src_page);
71e3aac0 Andrea Arcangeli 2011-01-13 349 add_mm_counter(dst_mm, MM_ANONPAGES, HPAGE_PMD_NR);
71e3aac0 Andrea Arcangeli 2011-01-13 350
71e3aac0 Andrea Arcangeli 2011-01-13 351 pmdp_set_wrprotect(src_mm, addr, src_pmd);
71e3aac0 Andrea Arcangeli 2011-01-13 @352 pmd = pmd_mkold(pmd_wrprotect(pmd));
71e3aac0 Andrea Arcangeli 2011-01-13 353 set_pmd_at(dst_mm, addr, dst_pmd, pmd);
71e3aac0 Andrea Arcangeli 2011-01-13 354 prepare_pmd_huge_pte(pgtable, dst_mm);
71e3aac0 Andrea Arcangeli 2011-01-13 355
---
0-DAY kernel build testing backend Open Source Technology Center
http://lists.01.org/mailman/listinfo/kbuild Intel Corporation
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mm/huge_memory.c:221:7: error: incompatible types when assigning to type 'pmd_t' from type 'int'
2013-03-27 9:26 ` mm/huge_memory.c:221:7: error: incompatible types when assigning to type 'pmd_t' from type 'int' Fengguang Wu
@ 2013-03-27 14:02 ` Andrea Arcangeli
2013-03-27 14:53 ` Fengguang Wu
0 siblings, 1 reply; 3+ messages in thread
From: Andrea Arcangeli @ 2013-03-27 14:02 UTC (permalink / raw)
To: Fengguang Wu; +Cc: Johannes Weiner, Andrew Morton, linux-mips@linux-mips.org
Hi,
On Wed, Mar 27, 2013 at 05:26:31PM +0800, Fengguang Wu wrote:
> Hi Andrea,
>
> FYI, kernel build failed on
>
> tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux master
> head: a12183c62717ac4579319189a00f5883a18dff08
> commit: 71e3aac0724ffe8918992d76acfe3aad7d8724a5 thp: transparent hugepage core
> date: 2 years, 2 months ago
> config: make ARCH=mips allmodconfig
>
> All error/warnings:
>
> mm/huge_memory.c:19:15: error: expected identifier or '(' before numeric constant
> mm/huge_memory.c: In function 'double_flag_show':
> mm/huge_memory.c:28:24: error: lvalue required as unary '&' operand
> mm/huge_memory.c:29:3: error: lvalue required as unary '&' operand
> mm/huge_memory.c:31:32: error: lvalue required as unary '&' operand
It's certainly mips specific, TRANSPARENT_HUGEPAGE gets set but
there's likely some asm header screwup, maybe hidden by
setting/unsetting some other config option. Wondering if there's any
pending push that may be fixing this already. If you need I can build
the cross compiler and solve it but it's good idea to check if there's
a pending push somewhere (or in -mm) first.
Thanks,
Andrea
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mm/huge_memory.c:221:7: error: incompatible types when assigning to type 'pmd_t' from type 'int'
2013-03-27 14:02 ` Andrea Arcangeli
@ 2013-03-27 14:53 ` Fengguang Wu
0 siblings, 0 replies; 3+ messages in thread
From: Fengguang Wu @ 2013-03-27 14:53 UTC (permalink / raw)
To: Andrea Arcangeli
Cc: Johannes Weiner, Andrew Morton, linux-mips@linux-mips.org
On Wed, Mar 27, 2013 at 03:02:07PM +0100, Andrea Arcangeli wrote:
> Hi,
>
> On Wed, Mar 27, 2013 at 05:26:31PM +0800, Fengguang Wu wrote:
> > Hi Andrea,
> >
> > FYI, kernel build failed on
> >
> > tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux master
> > head: a12183c62717ac4579319189a00f5883a18dff08
> > commit: 71e3aac0724ffe8918992d76acfe3aad7d8724a5 thp: transparent hugepage core
> > date: 2 years, 2 months ago
> > config: make ARCH=mips allmodconfig
> >
> > All error/warnings:
> >
> > mm/huge_memory.c:19:15: error: expected identifier or '(' before numeric constant
> > mm/huge_memory.c: In function 'double_flag_show':
> > mm/huge_memory.c:28:24: error: lvalue required as unary '&' operand
> > mm/huge_memory.c:29:3: error: lvalue required as unary '&' operand
> > mm/huge_memory.c:31:32: error: lvalue required as unary '&' operand
>
> It's certainly mips specific, TRANSPARENT_HUGEPAGE gets set but
> there's likely some asm header screwup, maybe hidden by
> setting/unsetting some other config option. Wondering if there's any
> pending push that may be fixing this already. If you need I can build
> the cross compiler and solve it but it's good idea to check if there's
> a pending push somewhere (or in -mm) first.
Hi Andrea! Unfortunately there are no pending fixes. My build script
will auto check linux-next if it's an upstream build error. Which can
be further verified with the below reproduce log.
Thanks,
Fengguang
---
=============== linus/master linus/master ===============
/home/wfg/linux
HEAD is now at de55eb1... Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
/home/wfg/linux/obj-compiletest
make ARCH=mips allmodconfig
make ARCH=mips mm/huge_memory.o
!!! BUILD ERROR !!!
grep -a -F mm/huge_memory.c /tmp/build-err-de55eb1d60d2ed0f1ba5e13226d91b3bfbe1c108-wfg --color
warning: (LOCKDEP && FAULT_INJECTION_STACKTRACE_FILTER && LATENCYTOP && KMEMCHECK) selects FRAME_POINTER which has unmet direct dependencies (DEBUG_KERNEL && (CRIS || M68K || FRV || UML || AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || ARCH_WANT_FRAME_POINTERS)
warning: (LOCKDEP && FAULT_INJECTION_STACKTRACE_FILTER && LATENCYTOP && KMEMCHECK) selects FRAME_POINTER which has unmet direct dependencies (DEBUG_KERNEL && (CRIS || M68K || FRV || UML || AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || ARCH_WANT_FRAME_POINTERS)
/c/wfg/linux/mm/huge_memory.c: In function 'set_huge_zero_page':
/c/wfg/linux/mm/huge_memory.c:773:2: error: implicit declaration of function 'pfn_pmd' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c:773:8: error: incompatible types when assigning to type 'pmd_t' from type 'int'
cc1: some warnings being treated as errors
make[2]: *** [mm/huge_memory.o] Error 1
=============== linux-next next/master ===============
/home/wfg/linux
Checking out files: 100% (5078/5078), done.
Previous HEAD position was de55eb1... Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
HEAD is now at b77e727... Add linux-next specific files for 20130327
/home/wfg/linux/obj-compiletest
make ARCH=mips allmodconfig
make ARCH=mips mm/huge_memory.o
!!! BUILD ERROR !!!
grep -a -F mm/huge_memory.c /tmp/build-err-b77e727878653a2e6caf89234d2488025e9ea5c3-wfg --color
warning: (LOCKDEP && FAULT_INJECTION_STACKTRACE_FILTER && LATENCYTOP && KMEMCHECK) selects FRAME_POINTER which has unmet direct dependencies (DEBUG_KERNEL && (CRIS || M68K || FRV || UML || AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || ARCH_WANT_FRAME_POINTERS)
warning: (LOCKDEP && FAULT_INJECTION_STACKTRACE_FILTER && LATENCYTOP && KMEMCHECK) selects FRAME_POINTER which has unmet direct dependencies (DEBUG_KERNEL && (CRIS || M68K || FRV || UML || AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || ARCH_WANT_FRAME_POINTERS)
/c/wfg/linux/mm/huge_memory.c:36:15: error: expected identifier or '(' before numeric constant
/c/wfg/linux/mm/huge_memory.c:48:62: error: braced-group within expression allowed only inside a function
/c/wfg/linux/mm/huge_memory.c:63:62: error: braced-group within expression allowed only inside a function
/c/wfg/linux/mm/huge_memory.c: In function 'set_recommended_min_free_kbytes':
/c/wfg/linux/mm/huge_memory.c:109:2: error: implicit declaration of function 'khugepaged_enabled' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c: In function 'is_huge_zero_pmd':
/c/wfg/linux/mm/huge_memory.c:176:2: error: implicit declaration of function 'pmd_pfn' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c: In function 'get_huge_zero_page':
/c/wfg/linux/mm/huge_memory.c:189:18: error: 'THP_ZERO_PAGE_ALLOC_FAILED' undeclared (first use in this function)
/c/wfg/linux/mm/huge_memory.c:189:18: note: each undeclared identifier is reported only once for each function it appears in
/c/wfg/linux/mm/huge_memory.c:192:17: error: 'THP_ZERO_PAGE_ALLOC' undeclared (first use in this function)
/c/wfg/linux/mm/huge_memory.c: In function 'double_flag_show':
/c/wfg/linux/mm/huge_memory.c:243:24: error: lvalue required as unary '&' operand
/c/wfg/linux/mm/huge_memory.c:244:3: error: lvalue required as unary '&' operand
/c/wfg/linux/mm/huge_memory.c:246:32: error: lvalue required as unary '&' operand
/c/wfg/linux/mm/huge_memory.c: In function 'double_flag_store':
/c/wfg/linux/mm/huge_memory.c:259:20: error: lvalue required as unary '&' operand
/c/wfg/linux/mm/huge_memory.c:260:23: error: lvalue required as unary '&' operand
/c/wfg/linux/mm/huge_memory.c:263:22: error: lvalue required as unary '&' operand
/c/wfg/linux/mm/huge_memory.c:264:21: error: lvalue required as unary '&' operand
/c/wfg/linux/mm/huge_memory.c:267:22: error: lvalue required as unary '&' operand
/c/wfg/linux/mm/huge_memory.c:268:23: error: lvalue required as unary '&' operand
/c/wfg/linux/mm/huge_memory.c: In function 'single_flag_show':
/c/wfg/linux/mm/huge_memory.c:313:27: error: lvalue required as unary '&' operand
/c/wfg/linux/mm/huge_memory.c: In function 'single_flag_store':
/c/wfg/linux/mm/huge_memory.c:331:17: error: lvalue required as unary '&' operand
/c/wfg/linux/mm/huge_memory.c:333:19: error: lvalue required as unary '&' operand
/c/wfg/linux/mm/huge_memory.c: In function 'hugepage_init':
/c/wfg/linux/mm/huge_memory.c:623:2: error: implicit declaration of function 'has_transparent_hugepage' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c:624:30: error: lvalue required as left operand of assignment
/c/wfg/linux/mm/huge_memory.c:644:30: error: lvalue required as left operand of assignment
/c/wfg/linux/mm/huge_memory.c: In function 'setup_transparent_hugepage':
/c/wfg/linux/mm/huge_memory.c:662:4: error: lvalue required as unary '&' operand
/c/wfg/linux/mm/huge_memory.c:664:6: error: lvalue required as unary '&' operand
/c/wfg/linux/mm/huge_memory.c:668:6: error: lvalue required as unary '&' operand
/c/wfg/linux/mm/huge_memory.c:670:4: error: lvalue required as unary '&' operand
/c/wfg/linux/mm/huge_memory.c:674:6: error: lvalue required as unary '&' operand
/c/wfg/linux/mm/huge_memory.c:676:6: error: lvalue required as unary '&' operand
/c/wfg/linux/mm/huge_memory.c: In function 'maybe_pmd_mkwrite':
/c/wfg/linux/mm/huge_memory.c:690:3: error: implicit declaration of function 'pmd_mkwrite' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c:690:7: error: incompatible types when assigning to type 'pmd_t' from type 'int'
/c/wfg/linux/mm/huge_memory.c: In function 'mk_huge_pmd':
/c/wfg/linux/mm/huge_memory.c:697:2: error: implicit declaration of function 'mk_pmd' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c:697:8: error: incompatible types when assigning to type 'pmd_t' from type 'int'
/c/wfg/linux/mm/huge_memory.c:698:2: error: implicit declaration of function 'pmd_mkdirty' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c:698:2: error: incompatible type for argument 1 of 'maybe_pmd_mkwrite'
/c/wfg/linux/mm/huge_memory.c:687:7: note: expected 'pmd_t' but argument is of type 'int'
/c/wfg/linux/mm/huge_memory.c:699:2: error: implicit declaration of function 'pmd_mkhuge' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c:699:8: error: incompatible types when assigning to type 'pmd_t' from type 'int'
/c/wfg/linux/mm/huge_memory.c: In function '__do_huge_pmd_anonymous_page':
/c/wfg/linux/mm/huge_memory.c:715:2: error: implicit declaration of function 'clear_huge_page' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c:734:3: error: implicit declaration of function 'set_pmd_at' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c: In function 'set_huge_zero_page':
/c/wfg/linux/mm/huge_memory.c:773:2: error: implicit declaration of function 'pfn_pmd' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c:773:8: error: incompatible types when assigning to type 'pmd_t' from type 'int'
/c/wfg/linux/mm/huge_memory.c:774:2: error: implicit declaration of function 'pmd_wrprotect' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c:774:8: error: incompatible types when assigning to type 'pmd_t' from type 'int'
/c/wfg/linux/mm/huge_memory.c:775:8: error: incompatible types when assigning to type 'pmd_t' from type 'int'
/c/wfg/linux/mm/huge_memory.c: In function 'do_huge_pmd_anonymous_page':
/c/wfg/linux/mm/huge_memory.c:796:5: error: implicit declaration of function 'transparent_hugepage_use_zero_page' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c:806:20: error: 'THP_FAULT_FALLBACK' undeclared (first use in this function)
/c/wfg/linux/mm/huge_memory.c:819:3: error: implicit declaration of function 'transparent_hugepage_defrag' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c:825:18: error: 'THP_FAULT_ALLOC' undeclared (first use in this function)
/c/wfg/linux/mm/huge_memory.c:858:2: error: implicit declaration of function 'handle_pte_fault' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c: In function 'copy_huge_pmd':
/c/wfg/linux/mm/huge_memory.c:920:2: error: implicit declaration of function 'pmd_mkold' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c:920:6: error: incompatible types when assigning to type 'pmd_t' from type 'int'
/c/wfg/linux/mm/huge_memory.c: In function 'huge_pmd_set_accessed':
/c/wfg/linux/mm/huge_memory.c:946:2: error: implicit declaration of function 'pmd_mkyoung' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c:946:8: error: incompatible types when assigning to type 'pmd_t' from type 'int'
/c/wfg/linux/mm/huge_memory.c: In function 'do_huge_pmd_wp_page':
/c/wfg/linux/mm/huge_memory.c:1152:9: error: incompatible types when assigning to type 'pmd_t' from type 'int'
/c/wfg/linux/mm/huge_memory.c:1153:3: error: incompatible type for argument 1 of 'maybe_pmd_mkwrite'
/c/wfg/linux/mm/huge_memory.c:687:7: note: expected 'pmd_t' but argument is of type 'int'
/c/wfg/linux/mm/huge_memory.c:1163:6: error: implicit declaration of function 'transparent_hugepage_debug_cow' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c:1170:18: error: 'THP_FAULT_FALLBACK' undeclared (first use in this function)
/c/wfg/linux/mm/huge_memory.c:1183:17: error: 'THP_FAULT_ALLOC' undeclared (first use in this function)
/c/wfg/linux/mm/huge_memory.c:1198:3: error: implicit declaration of function 'copy_user_huge_page' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c: In function 'follow_trans_huge_pmd':
/c/wfg/linux/mm/huge_memory.c:1269:8: error: incompatible types when assigning to type 'pmd_t' from type 'int'
/c/wfg/linux/mm/huge_memory.c: At top level:
/c/wfg/linux/mm/huge_memory.c:1290:5: error: redefinition of 'do_huge_pmd_numa_page'
/c/wfg/linux/include/linux/huge_mm.h:218:19: note: previous definition of 'do_huge_pmd_numa_page' was here
/c/wfg/linux/mm/huge_memory.c: In function 'zap_huge_pmd':
/c/wfg/linux/mm/huge_memory.c:1359:2: error: implicit declaration of function '__pmd_trans_huge_lock' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c:1364:3: error: implicit declaration of function 'pmdp_get_and_clear' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c:1364:12: error: incompatible types when assigning to type 'pmd_t' from type 'int'
/c/wfg/linux/mm/huge_memory.c: In function 'move_huge_pmd':
/c/wfg/linux/mm/huge_memory.c:1432:7: error: incompatible types when assigning to type 'pmd_t' from type 'int'
/c/wfg/linux/mm/huge_memory.c: In function 'change_huge_pmd':
/c/wfg/linux/mm/huge_memory.c:1449:9: error: incompatible types when assigning to type 'pmd_t' from type 'int'
/c/wfg/linux/mm/huge_memory.c:1451:4: error: implicit declaration of function 'pmd_modify' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c:1451:10: error: incompatible types when assigning to type 'pmd_t' from type 'int'
/c/wfg/linux/mm/huge_memory.c: In function '__split_huge_page_refcount':
/c/wfg/linux/mm/huge_memory.c:1576:2: error: implicit declaration of function 'mem_cgroup_split_huge_fixup' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c:1657:2: error: implicit declaration of function 'ClearPageCompound' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c: In function '__split_huge_page_map':
/c/wfg/linux/mm/huge_memory.c:1708:4: error: implicit declaration of function 'pmd_young' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c: In function '__split_huge_page':
/c/wfg/linux/mm/huge_memory.c:1768:3: error: implicit declaration of function 'vma_address' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c:1769:3: error: implicit declaration of function 'is_vma_temporary_stack' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c: At top level:
/c/wfg/linux/mm/huge_memory.c:1802:5: error: redefinition of 'split_huge_page'
/c/wfg/linux/include/linux/huge_mm.h:189:19: note: previous definition of 'split_huge_page' was here
/c/wfg/linux/mm/huge_memory.c: In function 'split_huge_page':
/c/wfg/linux/mm/huge_memory.c:1828:17: error: 'THP_SPLIT' undeclared (first use in this function)
/c/wfg/linux/mm/huge_memory.c: At top level:
/c/wfg/linux/mm/huge_memory.c:1840:5: error: redefinition of 'hugepage_madvise'
/c/wfg/linux/include/linux/huge_mm.h:200:19: note: previous definition of 'hugepage_madvise' was here
/c/wfg/linux/mm/huge_memory.c:1962:5: error: redefinition of 'khugepaged_enter_vma_merge'
/c/wfg/linux/include/linux/khugepaged.h:61:19: note: previous definition of 'khugepaged_enter_vma_merge' was here
/c/wfg/linux/mm/huge_memory.c: In function 'khugepaged_alloc_hugepage':
/c/wfg/linux/mm/huge_memory.c:2195:3: error: implicit declaration of function 'khugepaged_defrag' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c:2197:19: error: 'THP_COLLAPSE_ALLOC_FAILED' undeclared (first use in this function)
/c/wfg/linux/mm/huge_memory.c:2204:19: error: 'THP_COLLAPSE_ALLOC' undeclared (first use in this function)
/c/wfg/linux/mm/huge_memory.c: In function 'hugepage_vma_check':
/c/wfg/linux/mm/huge_memory.c:2234:2: error: implicit declaration of function 'khugepaged_always' [-Werror=implicit-function-declaration]
/c/wfg/linux/mm/huge_memory.c: At top level:
/c/wfg/linux/mm/huge_memory.c:2713:6: error: expected identifier or '(' before 'do'
/c/wfg/linux/mm/huge_memory.c:2713:6: error: expected identifier or '(' before 'while'
/c/wfg/linux/mm/huge_memory.c: In function 'single_flag_show':
/c/wfg/linux/mm/huge_memory.c:314:1: warning: control reaches end of non-void function [-Wreturn-type]
/c/wfg/linux/mm/huge_memory.c: In function 'double_flag_show':
/c/wfg/linux/mm/huge_memory.c:250:1: warning: control reaches end of non-void function [-Wreturn-type]
cc1: some warnings being treated as errors
make[2]: *** [mm/huge_memory.o] Error 1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-27 14:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <5152b651.JKLmvRYh1bEEyapp%fengguang.wu@intel.com>
2013-03-27 9:26 ` mm/huge_memory.c:221:7: error: incompatible types when assigning to type 'pmd_t' from type 'int' Fengguang Wu
2013-03-27 14:02 ` Andrea Arcangeli
2013-03-27 14:53 ` Fengguang Wu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.