Commit 7121bf30 authored by David S. Miller's avatar David S. Miller

Merge bk://bk.phunnypharm.org/sparc-2.6

into nuts.davemloft.net:/disk1/BK/sparc-2.6
parents b090abd1 b3a7ef38
......@@ -633,6 +633,15 @@ config DEBUG_KERNEL
Say Y here if you are developing drivers or trying to debug and
identify kernel problems.
config DEBUG_STACK_USAGE
bool "Enable stack utilization instrumentation"
depends on DEBUG_KERNEL
help
Enables the display of the minimum amount of free stack which each
task has ever had available in the sysrq-T and sysrq-P debug output.
This option will slow down process creation somewhat.
config DEBUG_SLAB
bool "Debug memory allocations"
depends on DEBUG_KERNEL
......
......@@ -905,7 +905,6 @@ CONFIG_IRDA_FAST_RR=y
#
# Old SIR device drivers
#
# CONFIG_IRPORT_SIR is not set
#
# Old Serial dongle support
......@@ -1657,6 +1656,7 @@ CONFIG_OPROFILE=m
# Kernel hacking
#
CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_DEBUG_SLAB is not set
CONFIG_MAGIC_SYSRQ=y
# CONFIG_DEBUG_SPINLOCK is not set
......
......@@ -142,13 +142,30 @@ register struct thread_info *current_thread_info_reg asm("g6");
/* thread information allocation */
#if PAGE_SHIFT == 13
#define alloc_thread_info(tsk)((struct thread_info *)__get_free_pages(GFP_KERNEL, 1))
#define free_thread_info(ti) free_pages((unsigned long)(ti),1)
#define __THREAD_INFO_ORDER 1
#else /* PAGE_SHIFT == 13 */
#define alloc_thread_info(tsk)((struct thread_info *)__get_free_pages(GFP_KERNEL, 0))
#define free_thread_info(ti) free_pages((unsigned long)(ti),0)
#define __THREAD_INFO_ORDER 0
#endif /* PAGE_SHIFT == 13 */
#ifdef CONFIG_DEBUG_STACK_USAGE
#define alloc_thread_info(tsk) \
({ \
struct thread_info *ret; \
\
ret = (struct thread_info *) \
__get_free_pages(GFP_KERNEL, __THREAD_INFO_ORDER); \
if (ret) \
memset(ret, 0, PAGE_SIZE<<__THREAD_INFO_ORDER); \
ret; \
})
#else
#define alloc_thread_info(tsk) \
((struct thread_info *)__get_free_pages(GFP_KERNEL, __THREAD_INFO_ORDER))
#endif
#define free_thread_info(ti) \
free_pages((unsigned long)(ti),__THREAD_INFO_ORDER)
#define __thread_flag_byte_ptr(ti) \
((unsigned char *)(&((ti)->flags)))
#define __cur_thread_flag_byte_ptr __thread_flag_byte_ptr(current_thread_info())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment