mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sebastian Ene <sebastianene@google.com>
To: catalin.marinas@arm.com, joey.gouly@arm.com, maz@kernel.org,
	 oliver.upton@linux.dev, sebastianene@google.com,
	snehalreddy@google.com,  sudeep.holla@arm.com,
	suzuki.poulose@arm.com, vdonnefort@google.com,  will@kernel.org,
	yuzenghui@huawei.com
Cc: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	 linux-kernel@vger.kernel.org, kernel-team@android.com
Subject: [PATCH v2 1/4] KVM: arm64: Use the static initializer for the vesion lock
Date: Thu, 27 Feb 2025 18:17:46 +0000	[thread overview]
Message-ID: <20250227181750.3606372-2-sebastianene@google.com> (raw)
In-Reply-To: <20250227181750.3606372-1-sebastianene@google.com>

Replace the definition of the hypervisor version lock
with a static initializer.

Signed-off-by: Sebastian Ene <sebastianene@google.com>
---
 arch/arm64/kvm/hyp/nvhe/ffa.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm64/kvm/hyp/nvhe/ffa.c b/arch/arm64/kvm/hyp/nvhe/ffa.c
index e433dfab882a..6df6131f1107 100644
--- a/arch/arm64/kvm/hyp/nvhe/ffa.c
+++ b/arch/arm64/kvm/hyp/nvhe/ffa.c
@@ -69,7 +69,7 @@ static struct kvm_ffa_buffers hyp_buffers;
 static struct kvm_ffa_buffers host_buffers;
 static u32 hyp_ffa_version;
 static bool has_version_negotiated;
-static hyp_spinlock_t version_lock;
+static DEFINE_HYP_SPINLOCK(version_lock);
 
 static void ffa_to_smccc_error(struct arm_smccc_res *res, u64 ffa_errno)
 {
@@ -911,6 +911,5 @@ int hyp_ffa_init(void *pages)
 		.lock	= __HYP_SPIN_LOCK_UNLOCKED,
 	};
 
-	version_lock = __HYP_SPIN_LOCK_UNLOCKED;
 	return 0;
 }
-- 
2.48.1.711.g2feabab25a-goog


  reply	other threads:[~2025-02-27 18:17 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-27 18:17 [PATCH v2 0/4] KVM: arm64: Separate the hyp FF-A buffers init from the host Sebastian Ene
2025-02-27 18:17 ` Sebastian Ene [this message]
2025-03-05  0:39   ` [PATCH v2 1/4] KVM: arm64: Use the static initializer for the vesion lock Will Deacon
2025-02-27 18:17 ` [PATCH v2 2/4] KVM: arm64: Move the ffa_to_linux definition to the ffa header Sebastian Ene
2025-02-27 20:25   ` Sudeep Holla
2025-02-27 23:12     ` Sebastian Ene
2025-02-28 10:09       ` Marc Zyngier
2025-03-03 23:44         ` Will Deacon
2025-03-04  0:38           ` Sebastian Ene
2025-03-04  9:54           ` Sudeep Holla
2025-03-04  9:57   ` Sudeep Holla
2025-02-27 18:17 ` [PATCH v2 3/4] KVM: arm64: Map the hypervisor FF-A buffers on ffa init Sebastian Ene
2025-03-03 23:43   ` Will Deacon
2025-03-04  0:53     ` Sebastian Ene
2025-03-04  1:56       ` Will Deacon
2025-03-04 17:38         ` Sebastian Ene
2025-03-05  0:38           ` Will Deacon
2025-03-05 18:36             ` Sebastian Ene
2025-03-13 12:04               ` Will Deacon
2025-02-27 18:17 ` [PATCH v2 4/4] KVM: arm64: Release the ownership of the hyp rx buffer to Trustzone Sebastian Ene
2025-03-05  0:45   ` Will Deacon
2025-03-05  9:41     ` Sudeep Holla
2025-03-05 19:34       ` Will Deacon
2025-03-06  9:40         ` Sudeep Holla
2025-03-13 12:15           ` Will Deacon
2025-03-13 14:00             ` Sudeep Holla

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=20250227181750.3606372-2-sebastianene@google.com \
    --to=sebastianene@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=joey.gouly@arm.com \
    --cc=kernel-team@android.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=snehalreddy@google.com \
    --cc=sudeep.holla@arm.com \
    --cc=suzuki.poulose@arm.com \
    --cc=vdonnefort@google.com \
    --cc=will@kernel.org \
    --cc=yuzenghui@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®