]> git.karo-electronics.de Git - karo-tx-linux.git/commit
lglock: map to spinlock when !CONFIG_SMP
authorJosh Triplett <josh@joshtriplett.org>
Tue, 5 Nov 2013 05:56:10 +0000 (16:56 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 5 Nov 2013 05:56:10 +0000 (16:56 +1100)
commitf6b1e5d740acef8d9355eb25fb1f2b0dcd0a4a7b
tree89cb6313ce4f2d44f631a82baa643466648f8aa8
parent31dda73b002e77342a1bc0b0121b90b6468e0f69
lglock: map to spinlock when !CONFIG_SMP

When the system has only one CPU, lglock is effectively a spinlock; map it
directly to spinlock to eliminate the indirection and duplicate code.

In addition to removing overhead, this drops 1.6k of code with a defconfig
modified to have !CONFIG_SMP, and 1.1k with a minimal config.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: David Howells <dhowells@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Nick Piggin <npiggin@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/lglock.h
kernel/Makefile