From: Andrew Morton Date: Wed, 12 Nov 2008 21:26:57 +0000 (-0800) Subject: kernel/kprobes.c: don't pad kretprobe_table_locks[] on uniprocessor builds X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7e036d040a28bf95255d7eb9faf0ffbba3677e99;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git kernel/kprobes.c: don't pad kretprobe_table_locks[] on uniprocessor builds We only need the cacheline padding on SMP kernels. Saves 6k: text data bss dec hex filename 5713 388 8840 14941 3a5d kernel/kprobes.o 5713 388 2632 8733 221d kernel/kprobes.o Acked-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/kprobes.c b/kernel/kprobes.c index f83c5e42fb07..9f8a3f25259a 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -72,7 +72,7 @@ static bool kprobe_enabled; DEFINE_MUTEX(kprobe_mutex); /* Protects kprobe_table */ static DEFINE_PER_CPU(struct kprobe *, kprobe_instance) = NULL; static struct { - spinlock_t lock ____cacheline_aligned; + spinlock_t lock ____cacheline_aligned_in_smp; } kretprobe_table_locks[KPROBE_TABLE_SIZE]; static spinlock_t *kretprobe_table_lock_ptr(unsigned long hash)