[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] x86/oprofile: fix oprofile for clang build


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Fri, 23 Apr 2021 11:43:42 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PRE8OuYK7Uh2ACUdejo4vbT6G8Eip5cPiUQoM26NonA=; b=ZFoT/Os76Fhk2kvb9f50tmlGUBSbOusgDKOx20W3sWk23mfm41eD7TY1HYr5o3bWuLYdAHbB4SHp7QRn3VtPm4OpGdJEuh1ZP03966E1eLOhaWaTvzoNs7QWJ9K/ywZh973HKPe/6ShnxZOpZbONWagUUdDI7Sc4rdXAh42h7cHZMM0If2GGfePvx/KbXJlrjvEMYaL9PX2Rmfrr4wYvN3RWB3bFPDHBAT2pGaVVg42biVmEZb8SUSPoSiG2vrzNDNKeMog5K/S4B84vZyYZhnOhNEQey/gn7BJMU5Uc/jonYuiO2hyhwTgADbHc3XaeXXOCRkjKPOFoNuxtjD+P9w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IfhHdFTe/Vlsx6/5DlRnAHm/NiyuatQY4jepKVeGyB2L97bacT+NrG8u3StjKMl6/tqC9h/GdTB+8DcjnebJqP51oCpv1ZkAdAnThBKmh6wl2TogCpnREB7Zb+EuAbpihRkEylV4LxivTbWkzhg+8hZUQl945DziwMVf1LhJ7Ai6wdMjCIcNPpvH2u061f2ChEZfDqWeC6s261SZiUXNBwTL+wampF5bpscddcfdqgLxjO/rKjFAbd2pLZX5OFMDq3aRjGr4aRO+1lhQMl4TI50Yss4x9JSx9FPQKbTbcIaORJqhCFE74j5O0sIs9pyqiw11WeoZCJD/hWagmaICZg==
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Fri, 23 Apr 2021 09:44:16 +0000
  • Ironport-hdrordr: A9a23:GYMTTqqWqq/s657go10yM34aV5uuKtV00zAX/kB9WHVpW+SivY SHgOkb2RjoiDwYRXEnnpS6NLOdRG7HnKQb3aA4Bp3neAX9omOnIMVZ7YXkyyD9ACGWzIJg/I 9aWexFBNX0ZGIWse/T/BS4H9E8wNOO7aCvgqPkw21wSBxxApsA0y5SIG+gYylLbSNBAoc0E4 fZ29FOoCCudW9SQsOwAHQEWOarnay2qLvNZxkaCxk7rDSflD/A0s+GLzG0/Dc7FwlOz7Ar7H Tfn2XCiJmLnvmnxnbnpgnuxrtMnt+J8KogOOWtjYwvJizomkKUYu1aKsa/lRQUhM3q11owit nLpH4bTrROwlfcZHu8rxeo+ySI6kdW11bYxVWVgWTurKXCLVpQYaox5vMqTjLj50Utp9162q 5QtljpzaZ/Nh/cgD/7o+HBShACrDvEnVMZjeURg3ZDOLFuD4N5kIp3xjIxLL4wWAj+6IwhDd B0CtDd6Pt8YTqhHg7kl1gq79q2UnspGBCaBmAEp8yOyjBT2Et01k0C2aUk7zs93aN4b6MBy/ XPM6xumr0LZsgKbZhlDONEZcesEGTCTT/FLWr6GyWpKIg3f1b277Ln6rQ84++nPLYSyoEppZ jHWFRE8UYvZkPHE6S1rd122yGIZF/4cSXmy8lY6ZQ8kKb7XqDXPSqKT01ru9e8os8YHtbQV5 +ISdNrKs6mCVGrNZdC3gX4VZUXA2IZStcpttEyXE/LjdnMLqHsq+zHYNfeLLfgCl8fKyHCK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Uuz//ZJoH 6iUiRLJfObrO9zJ3SRkJpZvesNh/U/bgDPw5FDCJB+RTZAo1kmsW6VfM+cswOtgDqkN3iGZDr7 7ISkwi3Aexh6wR9C2bW/m1n0G//mgiYHqct6pyzoSiYTWoovTzDw/B5VovAwEcxLO/nmwpG6CE hTI=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Clang complains with:

backtrace.c:46:19: error: unused function 'is_32bit_vcpu' 
[-Werror,-Wunused-function]
static inline int is_32bit_vcpu(struct vcpu *vcpu)
                  ^

Fix this by guarding the function with CONFIG_COMPAT, as it's only
caller is also doing so.

Fixes: d23d792478d ('x86: avoid building COMPAT code when !HVM && !PV32')
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
 xen/arch/x86/oprofile/backtrace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/x86/oprofile/backtrace.c 
b/xen/arch/x86/oprofile/backtrace.c
index 929bf51a408..bd5d1b0f6ce 100644
--- a/xen/arch/x86/oprofile/backtrace.c
+++ b/xen/arch/x86/oprofile/backtrace.c
@@ -43,6 +43,7 @@ dump_hypervisor_backtrace(struct vcpu *vcpu, const struct 
frame_head *head,
     return head->ebp;
 }
 
+#ifdef CONFIG_COMPAT
 static inline int is_32bit_vcpu(struct vcpu *vcpu)
 {
     if (is_hvm_vcpu(vcpu))
@@ -50,6 +51,7 @@ static inline int is_32bit_vcpu(struct vcpu *vcpu)
     else
         return is_pv_32bit_vcpu(vcpu);
 }
+#endif
 
 static struct frame_head *
 dump_guest_backtrace(struct vcpu *vcpu, const struct frame_head *head,
-- 
2.30.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.