summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-10-27 14:54:44 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2014-11-03 12:07:18 +0100
commitd09155d2f39ebf2cce29c49f085fe43b1d66fbef (patch)
treebb4a1e314c3e3da91db80831e7a85d93f58c840b /arch
parent123b2dd10b4659911ef38458573a57f94cbf5448 (diff)
downloadlinux-d09155d2f39ebf2cce29c49f085fe43b1d66fbef.tar.gz
linux-d09155d2f39ebf2cce29c49f085fe43b1d66fbef.tar.bz2
linux-d09155d2f39ebf2cce29c49f085fe43b1d66fbef.zip
KVM: emulator: always inline __linearize
The two callers have a lot of constant arguments that can be optimized out. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/emulate.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 5edf088ca51e..07e9913d6bbb 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -641,11 +641,11 @@ static bool insn_aligned(struct x86_emulate_ctxt *ctxt, unsigned size)
return true;
}
-static int __linearize(struct x86_emulate_ctxt *ctxt,
- struct segmented_address addr,
- unsigned *max_size, unsigned size,
- bool write, bool fetch,
- ulong *linear)
+static __always_inline int __linearize(struct x86_emulate_ctxt *ctxt,
+ struct segmented_address addr,
+ unsigned *max_size, unsigned size,
+ bool write, bool fetch,
+ ulong *linear)
{
struct desc_struct desc;
bool usable;