From patchwork Mon Feb 26 08:20:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Shi X-Patchwork-Id: 129584 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3357856lja; Mon, 26 Feb 2018 00:25:05 -0800 (PST) X-Google-Smtp-Source: AH8x224aZ11a2j4jp7/v58VbyE+HS5VdPh724O90FfTAXQ3uAoHLJwPXkJrSnUuCw2DkTZ7tfs4R X-Received: by 2002:a17:902:6b48:: with SMTP id g8-v6mr9872101plt.151.1519633504951; Mon, 26 Feb 2018 00:25:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519633504; cv=none; d=google.com; s=arc-20160816; b=XGZTghTZzgV9gAsULhkKJWoZo2b5mcjz3derObL6ofGjIs5Oket6G7o6Qj7a9vsSfH WgZAwuPDXk42eTP4JheFvj1bRysT3rFc9bTxJHPYzOFuAMrz9aL7wQ8zOvVcuU5Q6cGj BIppZCSYZNwNmdx48qA5Uqn27racINXjmTYxg7g2rkpvX/S7XN+qFFU889K6Spk++Xiv f0i4/bi5L5pDAmHohnpmwn/qsSbwNHKPVKAXEZ+Sy5KjI9bdNaZ9BGnpg4eBPgWsyNW6 QDRFciIPLVGV9W39rSIb3fh1uV2PI1e0TrEtYNWIkNv12jzeuJHI3zhnCWV5S9JcGREV o+WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:arc-authentication-results; bh=KviX1yLvB2tH9OuAASVpED/B9xVdJyxLoOBcpgguMMM=; b=Rx+2c7ksDDCyvuJroHfQG51iwmJpiRhJN0fE4uBys+gJMwPQqQSTj3nHGHd831WkH+ Nn3UdK0UAY8wOVljXbYwGjWhuT4kd+oru+e2W6xvIzcaJMN3lDwoMAhcbvNGlfS2c/7F GfWkbYzi1djQqQwIYlpMFOfpTGoWogPx6qW7yoI5L3qOjXKcatRP9cMJKKQZh6LXqSf+ VoTPHqQ5uonNx41ipB0vUZHJa2fWDQh2blvhTV3Cx5dRx1EIIGbb8FqhHKXRM4s26WdH E0+lRtBzAGapx94KzuE2D1N7WQOsGNEljDXB/sSCOGLlaLiTKmJXE27DJC/MjEl4ss9S 1Hfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cT9Fkj5j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u13-v6si6387903plq.823.2018.02.26.00.25.04; Mon, 26 Feb 2018 00:25:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cT9Fkj5j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752643AbeBZIY7 (ORCPT + 28 others); Mon, 26 Feb 2018 03:24:59 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:45820 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752024AbeBZIYx (ORCPT ); Mon, 26 Feb 2018 03:24:53 -0500 Received: by mail-pl0-f66.google.com with SMTP id v9-v6so6860116plp.12 for ; Mon, 26 Feb 2018 00:24:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=KviX1yLvB2tH9OuAASVpED/B9xVdJyxLoOBcpgguMMM=; b=cT9Fkj5joEx8GLBL7LoxHOkPuImYad4F2XrfIV64DFL2nls82W1QOzWvDJiwRwGzm9 QoFuxrNRHQcuSeDLiq3z1HIv9KnTNYoeYIhVAdyiCqF7vD6VChIHTCJ8i81/HPfpI109 BVHmLuYfy6jYtKb5MERvW6a2O1/rSoWWzHEV0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=KviX1yLvB2tH9OuAASVpED/B9xVdJyxLoOBcpgguMMM=; b=kDDBbwD9soi2nAI9rG8B31lNIgarArKAU2ETh3bRON2Q+8lOvvDEusJ6+mgCEKFiTp zne6WQCuOS/H6QR3okXHT0v+ifUs8OdPapT4R41NjJTMxGju756K6ozYWt+sDbkQa26G f0eq1PvGv6OdS7nAQeZEBCmSVtOEq15yJ6ODf81uYB20EKX03zSpA0CoH4tNcVB8pmji J+/oLMG9MNjyXpzl3D8ttRn56+uQm6lAlnrEoLYrO7YbJCE5Xz6OTUAsjYmrE+S/XDVj JGXnX8+xiZt9VjPcyQjexeMzk96VstjF4eiEQFt4j+lOfTKHyEAXXf3weqp0ODzO+uzA sWgQ== X-Gm-Message-State: APf1xPDzvZgT4kE/K/7FAfD8tTZ84nxdfMpp7uXuIDClViB/dwz6Pass mNuC4Djf6DvgQdc51Dm/1tAtQw== X-Received: by 2002:a17:902:bf0a:: with SMTP id bi10-v6mr9884384plb.181.1519633492694; Mon, 26 Feb 2018 00:24:52 -0800 (PST) Received: from localhost.localdomain (176.122.172.82.16clouds.com. [176.122.172.82]) by smtp.gmail.com with ESMTPSA id o86sm1422706pfi.87.2018.02.26.00.24.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 26 Feb 2018 00:24:52 -0800 (PST) From: Alex Shi To: Marc Zyngier , Will Deacon , Ard Biesheuvel , Catalin Marinas , stable@vger.kernel.org, Christoffer Dall , Paolo Bonzini , =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= , Russell King , linux-arm-kernel@lists.infradead.org (moderated list:KERNEL VIRTUAL MACHINE (KVM) FOR ARM), kvmarm@lists.cs.columbia.edu (open list:KERNEL VIRTUAL MACHINE (KVM) FOR ARM), kvm@vger.kernel.org (open list:KERNEL VIRTUAL MACHINE (KVM)), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 31/52] arm/arm64: KVM: Consolidate the PSCI include files Date: Mon, 26 Feb 2018 16:20:05 +0800 Message-Id: <1519633227-29832-32-git-send-email-alex.shi@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519633227-29832-1-git-send-email-alex.shi@linaro.org> References: <1519633227-29832-1-git-send-email-alex.shi@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marc Zyngier commit 1a2fb94e6a77 upstream. As we're about to update the PSCI support, and because I'm lazy, let's move the PSCI include file to include/kvm so that both ARM architectures can find it. Acked-by: Christoffer Dall Tested-by: Ard Biesheuvel Signed-off-by: Marc Zyngier Signed-off-by: Catalin Marinas Signed-off-by: Will Deacon Signed-off-by: Alex Shi Conflicts: need kvm/arm_psci.h in files: arch/arm64/kvm/handle_exit.c arch/arm/kvm/psci.c and arch/arm/kvm/arm.c no virt/kvm/arm/arm.c and virt/kvm/arm/psci.c --- arch/arm/include/asm/kvm_psci.h | 27 --------------------------- arch/arm/kvm/arm.c | 2 +- arch/arm/kvm/handle_exit.c | 2 +- arch/arm/kvm/psci.c | 2 +- arch/arm64/include/asm/kvm_psci.h | 27 --------------------------- arch/arm64/kvm/handle_exit.c | 3 ++- include/kvm/arm_psci.h | 27 +++++++++++++++++++++++++++ 7 files changed, 32 insertions(+), 58 deletions(-) delete mode 100644 arch/arm/include/asm/kvm_psci.h delete mode 100644 arch/arm64/include/asm/kvm_psci.h create mode 100644 include/kvm/arm_psci.h -- 2.7.4 diff --git a/arch/arm/include/asm/kvm_psci.h b/arch/arm/include/asm/kvm_psci.h deleted file mode 100644 index 6bda945..0000000 --- a/arch/arm/include/asm/kvm_psci.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2012 - ARM Ltd - * Author: Marc Zyngier - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef __ARM_KVM_PSCI_H__ -#define __ARM_KVM_PSCI_H__ - -#define KVM_ARM_PSCI_0_1 1 -#define KVM_ARM_PSCI_0_2 2 - -int kvm_psci_version(struct kvm_vcpu *vcpu); -int kvm_psci_call(struct kvm_vcpu *vcpu); - -#endif /* __ARM_KVM_PSCI_H__ */ diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index 4e4ae07..8588e67 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -44,8 +44,8 @@ #include #include #include -#include #include +#include #ifdef REQUIRES_VIRT __asm__(".arch_extension virt"); diff --git a/arch/arm/kvm/handle_exit.c b/arch/arm/kvm/handle_exit.c index 4e57ebc..0a2b758 100644 --- a/arch/arm/kvm/handle_exit.c +++ b/arch/arm/kvm/handle_exit.c @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include "trace.h" diff --git a/arch/arm/kvm/psci.c b/arch/arm/kvm/psci.c index a08d7a9..18f9e9d 100644 --- a/arch/arm/kvm/psci.c +++ b/arch/arm/kvm/psci.c @@ -21,8 +21,8 @@ #include #include -#include #include +#include #include diff --git a/arch/arm64/include/asm/kvm_psci.h b/arch/arm64/include/asm/kvm_psci.h deleted file mode 100644 index bc39e55..0000000 --- a/arch/arm64/include/asm/kvm_psci.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2012,2013 - ARM Ltd - * Author: Marc Zyngier - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef __ARM64_KVM_PSCI_H__ -#define __ARM64_KVM_PSCI_H__ - -#define KVM_ARM_PSCI_0_1 1 -#define KVM_ARM_PSCI_0_2 2 - -int kvm_psci_version(struct kvm_vcpu *vcpu); -int kvm_psci_call(struct kvm_vcpu *vcpu); - -#endif /* __ARM64_KVM_PSCI_H__ */ diff --git a/arch/arm64/kvm/handle_exit.c b/arch/arm64/kvm/handle_exit.c index 5b56b09..0231ebc 100644 --- a/arch/arm64/kvm/handle_exit.c +++ b/arch/arm64/kvm/handle_exit.c @@ -22,12 +22,13 @@ #include #include +#include + #include #include #include #include #include -#include #define CREATE_TRACE_POINTS #include "trace.h" diff --git a/include/kvm/arm_psci.h b/include/kvm/arm_psci.h new file mode 100644 index 0000000..2042bb9 --- /dev/null +++ b/include/kvm/arm_psci.h @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2012,2013 - ARM Ltd + * Author: Marc Zyngier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef __KVM_ARM_PSCI_H__ +#define __KVM_ARM_PSCI_H__ + +#define KVM_ARM_PSCI_0_1 1 +#define KVM_ARM_PSCI_0_2 2 + +int kvm_psci_version(struct kvm_vcpu *vcpu); +int kvm_psci_call(struct kvm_vcpu *vcpu); + +#endif /* __KVM_ARM_PSCI_H__ */