diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2005-09-25 19:46:57 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-09-25 19:46:57 -0400 |
commit | 56425306517ef28a9b480161cdb96d182172bc1d (patch) | |
tree | 204cfbef0e5d86954f87b6b40d79d57f8157e5ea /arch/sparc64/Kconfig.debug | |
parent | 52f26deb7c67d5f34910660200b925c1a2b8df8c (diff) |
[SPARC64]: Add CONFIG_DEBUG_PAGEALLOC support.
The trick is that we do the kernel linear mapping TLB miss starting
with an instruction sequence like this:
ba,pt %xcc, kvmap_load
xor %g2, %g4, %g5
succeeded by an instruction sequence which performs a full page table
walk starting at swapper_pg_dir.
We first take over the trap table from the firmware. Then, using this
constant PTE generation for the linear mapping area above, we build
the kernel page tables for the linear mapping.
After this is setup, we patch that branch above into a "nop", which
will cause TLB misses to fall through to the full page table walk.
With this, the page unmapping for CONFIG_DEBUG_PAGEALLOC is trivial.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/Kconfig.debug')
-rw-r--r-- | arch/sparc64/Kconfig.debug | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/sparc64/Kconfig.debug b/arch/sparc64/Kconfig.debug index af0e9411b83e..fa06ea04837b 100644 --- a/arch/sparc64/Kconfig.debug +++ b/arch/sparc64/Kconfig.debug | |||
@@ -33,6 +33,14 @@ config DEBUG_BOOTMEM | |||
33 | depends on DEBUG_KERNEL | 33 | depends on DEBUG_KERNEL |
34 | bool "Debug BOOTMEM initialization" | 34 | bool "Debug BOOTMEM initialization" |
35 | 35 | ||
36 | config DEBUG_PAGEALLOC | ||
37 | bool "Page alloc debugging" | ||
38 | depends on DEBUG_KERNEL && !SOFTWARE_SUSPEND | ||
39 | help | ||
40 | Unmap pages from the kernel linear mapping after free_pages(). | ||
41 | This results in a large slowdown, but helps to find certain types | ||
42 | of memory corruptions. | ||
43 | |||
36 | config MCOUNT | 44 | config MCOUNT |
37 | bool | 45 | bool |
38 | depends on STACK_DEBUG | 46 | depends on STACK_DEBUG |