Commit 3dece370ecc7c6152b3fdd21c6de28179f6e643d
Committed by
Linus Torvalds
1 parent
db9fd8486b
Exists in
master
and in
4 other branches
mm: System without MMU do not need pte_mkwrite
The patch "thp: export maybe_mkwrite" (commit 14fd403f2146) breaks systems without MMU. Error log: CC arch/microblaze/mm/init.o In file included from include/linux/mman.h:14, from arch/microblaze/mm/consistent.c:24: include/linux/mm.h: In function 'maybe_mkwrite': include/linux/mm.h:482: error: implicit declaration of function 'pte_mkwrite' include/linux/mm.h:482: error: incompatible types in assignment Signed-off-by: Michal Simek <monstr@monstr.eu> CC: Andrea Arcangeli <aarcange@redhat.com> Reviewed-by: Rik van Riel <riel@redhat.com> CC: Andrew Morton <akpm@linux-foundation.org> CC: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff
include/linux/mm.h
... | ... | @@ -470,6 +470,7 @@ |
470 | 470 | page[1].lru.prev = (void *)order; |
471 | 471 | } |
472 | 472 | |
473 | +#ifdef CONFIG_MMU | |
473 | 474 | /* |
474 | 475 | * Do pte_mkwrite, but only if the vma says VM_WRITE. We do this when |
475 | 476 | * servicing faults for write access. In the normal case, do always want |
... | ... | @@ -482,6 +483,7 @@ |
482 | 483 | pte = pte_mkwrite(pte); |
483 | 484 | return pte; |
484 | 485 | } |
486 | +#endif | |
485 | 487 | |
486 | 488 | /* |
487 | 489 | * Multiple processes may "see" the same page. E.g. for untouched |