From: Ricardo Koller <ricarkol@google.com>
To: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu
Cc: Paolo Bonzini <pbonzini@redhat.com>, maz@kernel.org
Subject: [kvm-unit-tests PATCH] arm64: debug: mark test_[bp, wp, ss] as noinline
Date: Mon, 10 Jan 2022 20:11:03 -0800 [thread overview]
Message-ID: <20220111041103.2199594-1-ricarkol@google.com> (raw)
Clang inlines some functions (like test_ss) which define global labels
in inline assembly (e.g., ss_start). This results in:
arm/debug.c:382:15: error: invalid symbol redefinition
asm volatile("ss_start:\n"
^
<inline asm>:1:2: note: instantiated into assembly here
ss_start:
^
1 error generated.
Fix these functions by marking them as "noinline".
Cc: Andrew Jones <drjones@redhat.com>
Signed-off-by: Ricardo Koller <ricarkol@google.com>
---
This applies on top of: "[kvm-unit-tests PATCH 0/3] arm64: debug: add migration tests for debug state"
which is in https://gitlab.com/rhdrjones/kvm-unit-tests/-/commits/arm/queue.
arm/debug.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arm/debug.c b/arm/debug.c
index 54f059d..6c5b683 100644
--- a/arm/debug.c
+++ b/arm/debug.c
@@ -264,7 +264,7 @@ static void do_migrate(void)
report_info("Migration complete");
}
-static void test_hw_bp(bool migrate)
+static __attribute__((noinline)) void test_hw_bp(bool migrate)
{
extern unsigned char hw_bp0;
uint32_t bcr;
@@ -310,7 +310,7 @@ static void test_hw_bp(bool migrate)
static volatile char write_data[16];
-static void test_wp(bool migrate)
+static __attribute__((noinline)) void test_wp(bool migrate)
{
uint32_t wcr;
uint32_t mdscr;
@@ -353,7 +353,7 @@ static void test_wp(bool migrate)
}
}
-static void test_ss(bool migrate)
+static __attribute__((noinline)) void test_ss(bool migrate)
{
extern unsigned char ss_start;
uint32_t mdscr;
--
2.34.1.575.g55b058a8bb-goog
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
WARNING: multiple messages have this Message-ID (diff)
From: Ricardo Koller <ricarkol@google.com>
To: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu
Cc: drjones@redhat.com, Paolo Bonzini <pbonzini@redhat.com>,
maz@kernel.org, oupton@google.com,
Ricardo Koller <ricarkol@google.com>
Subject: [kvm-unit-tests PATCH] arm64: debug: mark test_[bp,wp,ss] as noinline
Date: Mon, 10 Jan 2022 20:11:03 -0800 [thread overview]
Message-ID: <20220111041103.2199594-1-ricarkol@google.com> (raw)
Clang inlines some functions (like test_ss) which define global labels
in inline assembly (e.g., ss_start). This results in:
arm/debug.c:382:15: error: invalid symbol redefinition
asm volatile("ss_start:\n"
^
<inline asm>:1:2: note: instantiated into assembly here
ss_start:
^
1 error generated.
Fix these functions by marking them as "noinline".
Cc: Andrew Jones <drjones@redhat.com>
Signed-off-by: Ricardo Koller <ricarkol@google.com>
---
This applies on top of: "[kvm-unit-tests PATCH 0/3] arm64: debug: add migration tests for debug state"
which is in https://gitlab.com/rhdrjones/kvm-unit-tests/-/commits/arm/queue.
arm/debug.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arm/debug.c b/arm/debug.c
index 54f059d..6c5b683 100644
--- a/arm/debug.c
+++ b/arm/debug.c
@@ -264,7 +264,7 @@ static void do_migrate(void)
report_info("Migration complete");
}
-static void test_hw_bp(bool migrate)
+static __attribute__((noinline)) void test_hw_bp(bool migrate)
{
extern unsigned char hw_bp0;
uint32_t bcr;
@@ -310,7 +310,7 @@ static void test_hw_bp(bool migrate)
static volatile char write_data[16];
-static void test_wp(bool migrate)
+static __attribute__((noinline)) void test_wp(bool migrate)
{
uint32_t wcr;
uint32_t mdscr;
@@ -353,7 +353,7 @@ static void test_wp(bool migrate)
}
}
-static void test_ss(bool migrate)
+static __attribute__((noinline)) void test_ss(bool migrate)
{
extern unsigned char ss_start;
uint32_t mdscr;
--
2.34.1.575.g55b058a8bb-goog
next reply other threads:[~2022-01-11 4:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-11 4:11 Ricardo Koller [this message]
2022-01-11 4:11 ` [kvm-unit-tests PATCH] arm64: debug: mark test_[bp,wp,ss] as noinline Ricardo Koller
2022-01-11 19:42 ` [kvm-unit-tests PATCH] arm64: debug: mark test_[bp, wp, ss] " Sean Christopherson
2022-01-11 19:42 ` Sean Christopherson
2022-01-11 21:02 ` Ricardo Koller
2022-01-11 21:02 ` Ricardo Koller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220111041103.2199594-1-ricarkol@google.com \
--to=ricarkol@google.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=maz@kernel.org \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.