mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
ee3b4290ae
This fixes a build failure with generic debug pagealloc: mm/debug-pagealloc.c: In function 'set_page_poison': mm/debug-pagealloc.c:8: error: 'struct page' has no member named 'debug_flags' mm/debug-pagealloc.c: In function 'clear_page_poison': mm/debug-pagealloc.c:13: error: 'struct page' has no member named 'debug_flags' mm/debug-pagealloc.c: In function 'page_poison': mm/debug-pagealloc.c:18: error: 'struct page' has no member named 'debug_flags' mm/debug-pagealloc.c: At top level: mm/debug-pagealloc.c:120: error: redefinition of 'kernel_map_pages' include/linux/mm.h:1278: error: previous definition of 'kernel_map_pages' was here mm/debug-pagealloc.c: In function 'kernel_map_pages': mm/debug-pagealloc.c:122: error: 'debug_pagealloc_enabled' undeclared (first use in this function) by fixing - debug_flags should be in struct page - define DEBUG_PAGEALLOC config option for all architectures Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Reported-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
27 lines
954 B
Plaintext
27 lines
954 B
Plaintext
config DEBUG_PAGEALLOC
|
|
bool "Debug page memory allocations"
|
|
depends on DEBUG_KERNEL && ARCH_SUPPORTS_DEBUG_PAGEALLOC
|
|
depends on !HIBERNATION || !PPC && !SPARC
|
|
---help---
|
|
Unmap pages from the kernel linear mapping after free_pages().
|
|
This results in a large slowdown, but helps to find certain types
|
|
of memory corruptions.
|
|
|
|
config WANT_PAGE_DEBUG_FLAGS
|
|
bool
|
|
|
|
config PAGE_POISONING
|
|
bool "Debug page memory allocations"
|
|
depends on DEBUG_KERNEL && !ARCH_SUPPORTS_DEBUG_PAGEALLOC
|
|
depends on !HIBERNATION
|
|
select DEBUG_PAGEALLOC
|
|
select WANT_PAGE_DEBUG_FLAGS
|
|
help
|
|
Fill the pages with poison patterns after free_pages() and verify
|
|
the patterns before alloc_pages(). This results in a large slowdown,
|
|
but helps to find certain types of memory corruptions.
|
|
|
|
This option cannot enalbe with hibernation. Otherwise, it will get
|
|
wrong messages for memory corruption because the free pages are not
|
|
saved to the suspend image.
|