diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig | 5 | ||||
-rw-r--r-- | lib/Kconfig.debug | 18 | ||||
-rw-r--r-- | lib/Makefile | 5 | ||||
-rw-r--r-- | lib/fault-inject.c | 32 | ||||
-rw-r--r-- | lib/ioremap.c | 1 | ||||
-rw-r--r-- | lib/reciprocal_div.c | 9 |
6 files changed, 18 insertions, 52 deletions
diff --git a/lib/Kconfig b/lib/Kconfig index 47b172df3e31..9b03581cdecb 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -101,4 +101,9 @@ config TEXTSEARCH_FSM config PLIST boolean +config IOMAP_COPY + boolean + depends on !UML + default y + endmenu diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 818e4589f718..5c2681875b9a 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -354,24 +354,6 @@ config FRAME_POINTER some architectures or if you use external debuggers. If you don't debug the kernel, you can say N. -config UNWIND_INFO - bool "Compile the kernel with frame unwind information" - depends on !IA64 && !PARISC && !ARM - depends on !MODULES || !(MIPS || PPC || SUPERH || V850) - help - If you say Y here the resulting kernel image will be slightly larger - but not slower, and it will give very useful debugging information. - If you don't debug the kernel, you can say N, but we may not be able - to solve problems without frame unwind information or frame pointers. - -config STACK_UNWIND - bool "Stack unwind support" - depends on UNWIND_INFO - depends on X86 - help - This enables more precise stack traces, omitting all unrelated - occurrences of pointers into kernel code from the dump. - config FORCED_INLINING bool "Force gcc to inline functions marked 'inline'" depends on DEBUG_KERNEL diff --git a/lib/Makefile b/lib/Makefile index 2d6106af53cd..77b4bad7d441 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -5,20 +5,21 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \ bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o \ idr.o div64.o int_sqrt.o bitmap.o extable.o prio_tree.o \ - sha1.o irq_regs.o + sha1.o irq_regs.o reciprocal_div.o lib-$(CONFIG_MMU) += ioremap.o lib-$(CONFIG_SMP) += cpumask.o lib-y += kobject.o kref.o kobject_uevent.o klist.o -obj-y += sort.o parser.o halfmd4.o iomap_copy.o debug_locks.o random32.o +obj-y += sort.o parser.o halfmd4.o debug_locks.o random32.o ifeq ($(CONFIG_DEBUG_KOBJECT),y) CFLAGS_kobject.o += -DDEBUG CFLAGS_kobject_uevent.o += -DDEBUG endif +obj-$(CONFIG_IOMAP_COPY) += iomap_copy.o obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o diff --git a/lib/fault-inject.c b/lib/fault-inject.c index d143c0faf248..b5a90fc056d3 100644 --- a/lib/fault-inject.c +++ b/lib/fault-inject.c @@ -55,37 +55,7 @@ static bool fail_task(struct fault_attr *attr, struct task_struct *task) #define MAX_STACK_TRACE_DEPTH 32 -#ifdef CONFIG_STACK_UNWIND - -static asmlinkage int fail_stacktrace_callback(struct unwind_frame_info *info, - void *arg) -{ - int depth; - struct fault_attr *attr = arg; - bool found = (attr->require_start == 0 && attr->require_end == ULONG_MAX); - - for (depth = 0; depth < attr->stacktrace_depth - && unwind(info) == 0 && UNW_PC(info); depth++) { - if (arch_unw_user_mode(info)) - break; - if (attr->reject_start <= UNW_PC(info) && - UNW_PC(info) < attr->reject_end) - return false; - if (attr->require_start <= UNW_PC(info) && - UNW_PC(info) < attr->require_end) - found = true; - } - return found; -} - -static bool fail_stacktrace(struct fault_attr *attr) -{ - struct unwind_frame_info info; - - return unwind_init_running(&info, fail_stacktrace_callback, attr); -} - -#elif defined(CONFIG_STACKTRACE) +#if defined(CONFIG_STACKTRACE) static bool fail_stacktrace(struct fault_attr *attr) { diff --git a/lib/ioremap.c b/lib/ioremap.c index 99fa277f9f7b..a9e4415b02dc 100644 --- a/lib/ioremap.c +++ b/lib/ioremap.c @@ -5,7 +5,6 @@ * * (C) Copyright 1995 1996 Linus Torvalds */ -#include <linux/io.h> #include <linux/vmalloc.h> #include <linux/mm.h> diff --git a/lib/reciprocal_div.c b/lib/reciprocal_div.c new file mode 100644 index 000000000000..6a3bd48fa2a0 --- /dev/null +++ b/lib/reciprocal_div.c @@ -0,0 +1,9 @@ +#include <asm/div64.h> +#include <linux/reciprocal_div.h> + +u32 reciprocal_value(u32 k) +{ + u64 val = (1LL << 32) + (k - 1); + do_div(val, k); + return (u32)val; +} |