* linux-next: 1ea0704e (ptep_modify_prot transaction abstraction) breaks no-mmu
@ 2008-07-03 13:38 Mike Frysinger
2008-07-03 15:53 ` Jeremy Fitzhardinge
0 siblings, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2008-07-03 13:38 UTC (permalink / raw)
To: Jeremy Fitzhardinge; +Cc: LKML
the functions added to asm-generic/pgtable.h are only used by
mm/mprotect.c (a MMU-only file), but they were not added inside of the
CONFIG_MMU ifdef block. since the functions rely on things inside of
CONFIG_MMU (the lines just above in pgtable.h), we get build failure
on all no-mmu setups:
CC init/main.o
In file included from include/asm/pgtable.h:94,
from include/linux/mm.h:39,
from include/asm/dma.h:39,
from include/linux/bootmem.h:8,
from init/main.c:27:
include/asm-generic/pgtable.h: In function '__ptep_modify_prot_start':
include/asm-generic/pgtable.h:210: error: implicit declaration of
function 'ptep_get_and_clear'
include/asm-generic/pgtable.h:210: error: incompatible types in return
make[1]: *** [init/main.o] Error 1
make: *** [init/main.o] Error 2
-mike
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: linux-next: 1ea0704e (ptep_modify_prot transaction abstraction) breaks no-mmu 2008-07-03 13:38 linux-next: 1ea0704e (ptep_modify_prot transaction abstraction) breaks no-mmu Mike Frysinger @ 2008-07-03 15:53 ` Jeremy Fitzhardinge 2008-07-15 14:00 ` Adrian Bunk 2008-07-15 14:24 ` Mike Frysinger 0 siblings, 2 replies; 6+ messages in thread From: Jeremy Fitzhardinge @ 2008-07-03 15:53 UTC (permalink / raw) To: Mike Frysinger; +Cc: LKML Mike Frysinger wrote: > the functions added to asm-generic/pgtable.h are only used by > mm/mprotect.c (a MMU-only file), but they were not added inside of the > CONFIG_MMU ifdef block. since the functions rely on things inside of > CONFIG_MMU (the lines just above in pgtable.h), we get build failure > on all no-mmu setups: > CC init/main.o > In file included from include/asm/pgtable.h:94, > from include/linux/mm.h:39, > from include/asm/dma.h:39, > from include/linux/bootmem.h:8, > from init/main.c:27: > include/asm-generic/pgtable.h: In function '__ptep_modify_prot_start': > include/asm-generic/pgtable.h:210: error: implicit declaration of > function 'ptep_get_and_clear' > include/asm-generic/pgtable.h:210: error: incompatible types in return > make[1]: *** [init/main.o] Error 1 > make: *** [init/main.o] Error 2 > -mike > Uh, OK. What does mprotect do on a nommu system? Would it be sufficient to move the definitions of __ptep_modify_prot_start/commit out of a CONFIG_MMU block, or provide separate no-op versions? J ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: linux-next: 1ea0704e (ptep_modify_prot transaction abstraction) breaks no-mmu 2008-07-03 15:53 ` Jeremy Fitzhardinge @ 2008-07-15 14:00 ` Adrian Bunk 2008-07-15 14:24 ` Mike Frysinger 1 sibling, 0 replies; 6+ messages in thread From: Adrian Bunk @ 2008-07-15 14:00 UTC (permalink / raw) To: Jeremy Fitzhardinge; +Cc: Mike Frysinger, LKML On Thu, Jul 03, 2008 at 08:53:52AM -0700, Jeremy Fitzhardinge wrote: > Mike Frysinger wrote: >> the functions added to asm-generic/pgtable.h are only used by >> mm/mprotect.c (a MMU-only file), but they were not added inside of the >> CONFIG_MMU ifdef block. since the functions rely on things inside of >> CONFIG_MMU (the lines just above in pgtable.h), we get build failure >> on all no-mmu setups: >> CC init/main.o >> In file included from include/asm/pgtable.h:94, >> from include/linux/mm.h:39, >> from include/asm/dma.h:39, >> from include/linux/bootmem.h:8, >> from init/main.c:27: >> include/asm-generic/pgtable.h: In function '__ptep_modify_prot_start': >> include/asm-generic/pgtable.h:210: error: implicit declaration of >> function 'ptep_get_and_clear' >> include/asm-generic/pgtable.h:210: error: incompatible types in return >> make[1]: *** [init/main.o] Error 1 >> make: *** [init/main.o] Error 2 >> -mike >> > > Uh, OK. What does mprotect do on a nommu system? Would it be > sufficient to move the definitions of __ptep_modify_prot_start/commit > out of a CONFIG_MMU block, or provide separate no-op versions? FYI: The compile error now moved into Linus' tree, and broke at least the blackfin and m68knommu ports. > J cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: linux-next: 1ea0704e (ptep_modify_prot transaction abstraction) breaks no-mmu 2008-07-03 15:53 ` Jeremy Fitzhardinge 2008-07-15 14:00 ` Adrian Bunk @ 2008-07-15 14:24 ` Mike Frysinger 2008-07-15 20:39 ` [PATCH] mm: fix ptep_modify_* for no-MMU systems Jeremy Fitzhardinge 1 sibling, 1 reply; 6+ messages in thread From: Mike Frysinger @ 2008-07-15 14:24 UTC (permalink / raw) To: Jeremy Fitzhardinge; +Cc: LKML On Thu, Jul 3, 2008 at 11:53 AM, Jeremy Fitzhardinge wrote: > Mike Frysinger wrote: >> the functions added to asm-generic/pgtable.h are only used by >> mm/mprotect.c (a MMU-only file), but they were not added inside of the >> CONFIG_MMU ifdef block. since the functions rely on things inside of >> CONFIG_MMU (the lines just above in pgtable.h), we get build failure >> on all no-mmu setups: >> CC init/main.o >> In file included from include/asm/pgtable.h:94, >> from include/linux/mm.h:39, >> from include/asm/dma.h:39, >> from include/linux/bootmem.h:8, >> from init/main.c:27: >> include/asm-generic/pgtable.h: In function '__ptep_modify_prot_start': >> include/asm-generic/pgtable.h:210: error: implicit declaration of >> function 'ptep_get_and_clear' >> include/asm-generic/pgtable.h:210: error: incompatible types in return >> make[1]: *** [init/main.o] Error 1 >> make: *** [init/main.o] Error 2 > > Uh, OK. What does mprotect do on a nommu system? it depends on the port. by default, i'm pretty sure mprotect on all nommu systems are realistically pretty much noops. the Blackfin can do real protection (CONFIG_MPU), but with significant performance degradation (since the page fault handler is not in hardware nor hardware assisted in any way). > Would it be sufficient to > move the definitions of __ptep_modify_prot_start/commit out of a CONFIG_MMU > block, or provide separate no-op versions? simply move them into CONFIG_MMU for now -mike ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] mm: fix ptep_modify_* for no-MMU systems 2008-07-15 14:24 ` Mike Frysinger @ 2008-07-15 20:39 ` Jeremy Fitzhardinge 2008-07-16 12:52 ` Adrian Bunk 0 siblings, 1 reply; 6+ messages in thread From: Jeremy Fitzhardinge @ 2008-07-15 20:39 UTC (permalink / raw) To: Mike Frysinger; +Cc: LKML, Adrian Bunk, Ingo Molnar, Andrew Morton Fixes build problem: the functions added to asm-generic/pgtable.h are only used by mm/mprotect.c (a MMU-only file), but they were not added inside of the CONFIG_MMU ifdef block. since the functions rely on things inside of CONFIG_MMU (the lines just above in pgtable.h), we get build failure on all no-mmu setups: CC init/main.o In file included from include/asm/pgtable.h:94, from include/linux/mm.h:39, from include/asm/dma.h:39, from include/linux/bootmem.h:8, from init/main.c:27: include/asm-generic/pgtable.h: In function '__ptep_modify_prot_start': include/asm-generic/pgtable.h:210: error: implicit declaration of function 'ptep_get_and_clear' include/asm-generic/pgtable.h:210: error: incompatible types in return make[1]: *** [init/main.o] Error 1 make: *** [init/main.o] Error 2 Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Adrian Bunk <bunk@kernel.org> Cc: Mike Frysinger <vapier.adi@gmail.com> --- include/asm-generic/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) =================================================================== --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h @@ -195,7 +195,6 @@ } return 0; } -#endif /* CONFIG_MMU */ static inline pte_t __ptep_modify_prot_start(struct mm_struct *mm, unsigned long addr, @@ -253,6 +252,7 @@ __ptep_modify_prot_commit(mm, addr, ptep, pte); } #endif /* __HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION */ +#endif /* CONFIG_MMU */ /* * A facility to provide lazy MMU batching. This allows PTE updates and ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mm: fix ptep_modify_* for no-MMU systems 2008-07-15 20:39 ` [PATCH] mm: fix ptep_modify_* for no-MMU systems Jeremy Fitzhardinge @ 2008-07-16 12:52 ` Adrian Bunk 0 siblings, 0 replies; 6+ messages in thread From: Adrian Bunk @ 2008-07-16 12:52 UTC (permalink / raw) To: Jeremy Fitzhardinge; +Cc: Mike Frysinger, LKML, Ingo Molnar, Andrew Morton On Tue, Jul 15, 2008 at 01:39:07PM -0700, Jeremy Fitzhardinge wrote: > Fixes build problem: the functions added to asm-generic/pgtable.h are > only used by > mm/mprotect.c (a MMU-only file), but they were not added inside of the > CONFIG_MMU ifdef block. since the functions rely on things inside of > CONFIG_MMU (the lines just above in pgtable.h), we get build failure > on all no-mmu setups: > CC init/main.o > In file included from include/asm/pgtable.h:94, > from include/linux/mm.h:39, > from include/asm/dma.h:39, > from include/linux/bootmem.h:8, > from init/main.c:27: > include/asm-generic/pgtable.h: In function '__ptep_modify_prot_start': > include/asm-generic/pgtable.h:210: error: implicit declaration of > function 'ptep_get_and_clear' > include/asm-generic/pgtable.h:210: error: incompatible types in return > make[1]: *** [init/main.o] Error 1 > make: *** [init/main.o] Error 2 >... Thanks, seems to work fine. cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-07-16 12:52 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-07-03 13:38 linux-next: 1ea0704e (ptep_modify_prot transaction abstraction) breaks no-mmu Mike Frysinger 2008-07-03 15:53 ` Jeremy Fitzhardinge 2008-07-15 14:00 ` Adrian Bunk 2008-07-15 14:24 ` Mike Frysinger 2008-07-15 20:39 ` [PATCH] mm: fix ptep_modify_* for no-MMU systems Jeremy Fitzhardinge 2008-07-16 12:52 ` Adrian Bunk
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox