From patchwork Thu Mar 1 12:54:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Shi X-Patchwork-Id: 10251433 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0FB3860211 for ; Thu, 1 Mar 2018 13:37:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1988201B1 for ; Thu, 1 Mar 2018 13:37:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E65ED201F5; Thu, 1 Mar 2018 13:37:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 52717201B1 for ; Thu, 1 Mar 2018 13:37:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Yph+sjtO4jdkzdg6u4kYOJzRFeI4RvhVYDwSFdv00s0=; b=EYNP/XA58MATruAZZ3vPcC5WOJ FqbOSj2n0NbGQ9L7+4OAylUyw8TSEaTL+dOTtYRxvcW+ltkjqx4i7RVMJoAjW9iieAS2kA1rAaZVD 7xfanL8Myp4ZOzjkAFnT3tHf1//WBDfJ3Qf5Eo3pxaxooOGp/ZOENe4k0sFiN9IKc3zf3j8XVcNdr e6KsF+qqBVRG0m6ii6c/+zzqcEOLjqA/UKuU1yYI0WxNGeCCh9dXSL51pgGkzwl8itwbtdSVyXPy3 j6roWSunqGIiljXMylqtUNJedw+VYDIWvt847OXC0E82Mglgomnn5OvXyDhjaAyjsygBB+WJKHw0q FcG8cM4g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1erOOW-0000QB-CV; Thu, 01 Mar 2018 13:37:12 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1erOHJ-0001sV-37 for linux-arm-kernel@bombadil.infradead.org; Thu, 01 Mar 2018 13:29:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=iXQ1ea6Hf/00SPSEn2cgvnnJnEbrG1bOJUxh9KRtS1o=; b=ViQ6CyK25q8nmMssa6KFbiM8e MW3dGFAceVyQDQ607R7i9BbigN+VCwV/opGnj2y/EEwP/1dU9MY95WgDnjwsS75WIJSVQzJbX+6cg GCgsitQlAmF7IxG0jyU4IqMMt50as6MOtS5QHP2T7WgQNE/xVJREso9ZVPLCNCeQaWAZVzpK+AUgE nYE3IfjLAGMpP8l+Q4+Q98f+yz4t96fHiDo7Dij2Wc/U6vqLD7mfedKiPRvUJAyujx9UXZ68wUB4K ohbwLqsPa4KaCQwS5fWKC7mITp3Sg7j++fP8j0tlF148qAZpCWOE+3ulYTxu2zYhfQA7qrhY8fwFu 27T80rFGQ==; Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]) by merlin.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1erNoJ-0002KZ-W7 for linux-arm-kernel@lists.infradead.org; Thu, 01 Mar 2018 12:59:48 +0000 Received: by mail-pg0-x242.google.com with SMTP id e9so2266325pgs.10 for ; Thu, 01 Mar 2018 04:59:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iXQ1ea6Hf/00SPSEn2cgvnnJnEbrG1bOJUxh9KRtS1o=; b=HPw8khHDIOr90kZmiRgPeRdSq2EXPf7Ue7ekWyGqkLS/x99eLh5AmuNzHEnVuc0Jy2 a6fKIW1LGIzjUe3uGhM7sSfPxEBaexkI3xr/2oR6rK2fSAx7FYAPDc7MVRMRZ+Jm5A9D qbGKofIEnTruBfA+aVHV+uie7D1YQ4gQEx5yw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iXQ1ea6Hf/00SPSEn2cgvnnJnEbrG1bOJUxh9KRtS1o=; b=I1TBlQ9alyqOCZCc7eKzeZOgXDYh4PvDJHZD3HP2pfMS+kWSJp3v15VbWtX1xPKnDS PXQC3licxbLNTxdJPnITSEXOTb4g+jf9k5DjQ6J45SJyHKjWIlPyLkrrZF09FtDHsukX yDiNDpAxN5kwRgAfajGZJUQl+gOH1uAg8+bIMimpAHoNtdTJ0JNr5hZnZRzoTY0nz6Wr NJ45JBFfxHyvnZCZ0G4UO5dS/LyFma2HMdar+EDufdKKPq1BSXleKLx49VIzqxVK87mb 1qL6s+Su7Vny2Og142eTe2euR/oHm3QiLSCi6NPMYS+zWk7V+g0KiqJi1zHqZz1msTiB 1DbQ== X-Gm-Message-State: APf1xPA0LSxiXVi2hGPb4FfCtEQvj2/4Vun/EVmUKEv7jH2ky/8BZdrJ clKaYrZbi/6Ld+WJKXebUoGg3g== X-Google-Smtp-Source: AG47ELuaIS0jmjIJ964QvMLYBcaW4Yqs4FXIAO3qBMWT2ePiR12CuhHRUkMNgkMcy0Kmj8LRBMpJWA== X-Received: by 10.98.86.15 with SMTP id k15mr1877067pfb.187.1519909175506; Thu, 01 Mar 2018 04:59:35 -0800 (PST) Received: from localhost.localdomain (176.122.172.82.16clouds.com. [176.122.172.82]) by smtp.gmail.com with ESMTPSA id x4sm2289655pfb.46.2018.03.01.04.59.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Mar 2018 04:59:34 -0800 (PST) From: Alex Shi To: Marc Zyngier , Will Deacon , Ard Biesheuvel , Catalin Marinas , stable@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 31/45] arm/arm64: KVM: Consolidate the PSCI include files Date: Thu, 1 Mar 2018 20:54:08 +0800 Message-Id: <1519908862-11425-32-git-send-email-alex.shi@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519908862-11425-1-git-send-email-alex.shi@linaro.org> References: <1519908862-11425-1-git-send-email-alex.shi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180301_075948_122622_2A0FC777 X-CRM114-Status: GOOD ( 22.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alex Shi MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 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__ */