From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1426099AbcFHO2X (ORCPT ); Wed, 8 Jun 2016 10:28:23 -0400 Received: from terminus.zytor.com ([198.137.202.10]:34802 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423897AbcFHO2V (ORCPT ); Wed, 8 Jun 2016 10:28:21 -0400 Date: Wed, 8 Jun 2016 07:27:39 -0700 From: tip-bot for Josh Poimboeuf Message-ID: Cc: peterz@infradead.org, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@kernel.org, dri-devel@lists.freedesktop.org, jpoimboe@redhat.com, hpa@zytor.com Reply-To: peterz@infradead.org, jpoimboe@redhat.com, hpa@zytor.com, torvalds@linux-foundation.org, mingo@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, dri-devel@lists.freedesktop.org In-Reply-To: <20160526184343.fdtjjjg67smmeekt@treble> References: <20160526184343.fdtjjjg67smmeekt@treble> To: linux-tip-commits@vger.kernel.org Subject: [tip:core/urgent] objtool, drm/vmwgfx: Fix "duplicate frame pointer save" warning Git-Commit-ID: 0b0d81e3b7334897da9b2e3ffee860c2046f7bc0 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 0b0d81e3b7334897da9b2e3ffee860c2046f7bc0 Gitweb: http://git.kernel.org/tip/0b0d81e3b7334897da9b2e3ffee860c2046f7bc0 Author: Josh Poimboeuf AuthorDate: Thu, 26 May 2016 13:43:43 -0500 Committer: Ingo Molnar CommitDate: Wed, 8 Jun 2016 15:36:18 +0200 objtool, drm/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 Signed-off-by: Josh Poimboeuf Acked-by: Linus Torvalds Cc: DRI Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160526184343.fdtjjjg67smmeekt@treble Signed-off-by: Ingo Molnar --- drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c index 6de283c..f0374f9 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #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); /** @@ -304,6 +305,7 @@ static int vmw_recv_msg(struct rpc_channel *channel, void **msg, return 0; } +STACK_FRAME_NON_STANDARD(vmw_recv_msg); /**