summaryrefslogtreecommitdiff
path: root/vmwgfx_msg.c
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2018-02-13 14:43:26 +0100
committerThomas Hellstrom <thellstrom@vmware.com>2018-02-13 20:08:39 +0100
commit07da885e1194dfc0b12e2326d15a77d6f18a7c48 (patch)
treea06c19dc8942bca7d3cd6746fa4e6807bd286455 /vmwgfx_msg.c
parentfe74032c70d2c1f6796e76caa3f3a985e8f59d00 (diff)
vmwgfx: Fix "duplicate frame pointer save" warning
objtool reports the following warnings: drivers/gpu/drm/vmwgfx/vmwgfx_msg.o: warning: objtool: vmw_send_msg()+0x107: duplicate frame pointer save drivers/gpu/drm/vmwgfx/vmwgfx_msg.o: warning: objtool: vmw_host_get_guestinfo()+0x252: duplicate frame pointer save To quote Linus: "The reason is that VMW_PORT_HB_OUT() uses a magic instruction sequence (a "rep outsb") to communicate with the hypervisor (it's a virtual GPU driver for vmware), and %rbp is part of the communication. So the inline asm does a save-and-restore of the frame pointer around the instruction sequence. I actually find the objtool warning to be quite reasonable, so it's not exactly a false positive, since in this case it actually does point out that the frame pointer won't be reliable over that instruction sequence. But in this particular case it just ends up being the wrong thing - the code is what it is, and %rbp just can't have the frame information due to annoying magic calling conventions." Silence the warnings by telling objtool to ignore the two functions which use the VMW_PORT_HB_{IN,OUT} macros. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Diffstat (limited to 'vmwgfx_msg.c')
-rw-r--r--vmwgfx_msg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vmwgfx_msg.c b/vmwgfx_msg.c
index cbbb883..3dd684b 100644
--- a/vmwgfx_msg.c
+++ b/vmwgfx_msg.c
@@ -28,6 +28,7 @@
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/kernel.h>
+#include <linux/frame.h>
#include <asm/hypervisor.h>
#include "drmP.h"
#include "vmwgfx_msg.h"
@@ -194,7 +195,7 @@ static int vmw_send_msg(struct rpc_channel *channel, const char *msg)
return -EINVAL;
}
-
+STACK_FRAME_NON_STANDARD(vmw_send_msg);
/**
@@ -307,6 +308,7 @@ static int vmw_recv_msg(struct rpc_channel *channel, void **msg,
return 0;
}
+STACK_FRAME_NON_STANDARD(vmw_recv_msg);
/**