Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752340AbdIMUKj (ORCPT ); Wed, 13 Sep 2017 16:10:39 -0400 Received: from smtp2.provo.novell.com ([137.65.250.81]:48772 "EHLO smtp2.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751976AbdIMUIf (ORCPT ); Wed, 13 Sep 2017 16:08:35 -0400 From: Davidlohr Bueso To: mingo@kernel.org, peterz@infradead.org, pbonzini@redhat.com Cc: npiggin@gmail.com, paulmck@linux.vnet.ibm.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, dave@stgolabs.net, Davidlohr Bueso Subject: [PATCH 3/7] kvm,lapic: Justify use of swait_activate() Date: Wed, 13 Sep 2017 13:08:20 -0700 Message-Id: <20170913200824.28067-4-dave@stgolabs.net> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170913200824.28067-1-dave@stgolabs.net> References: <20170913200824.28067-1-dave@stgolabs.net> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 609 Lines: 24 A comment might serve future readers. Signed-off-by: Davidlohr Bueso --- arch/x86/kvm/lapic.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index aaf10b6f5380..69c5612be786 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -1324,6 +1324,10 @@ static void apic_timer_expired(struct kvm_lapic *apic) atomic_inc(&apic->lapic_timer.pending); kvm_set_pending_timer(vcpu); + /* + * For x86, the atomic_inc() is serialized, thus + * using swait_active() is safe. + */ if (swait_active(q)) swake_up(q); -- 2.12.0