From patchwork Fri Mar 9 09:07:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Shi X-Patchwork-Id: 10270161 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 06146602BD for ; Fri, 9 Mar 2018 09:18:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 047CD29D9B for ; Fri, 9 Mar 2018 09:18:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ECFDF29DA0; Fri, 9 Mar 2018 09:18:49 +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=ham 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 E2A9329D9B for ; Fri, 9 Mar 2018 09:18:48 +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=5LzeH1ol3XR5dGDn28xzaPmap4+zJ3Kb5wJb1RE6DM8=; b=Tw4KycpggqvAppPtfLC36ZTKZm AVK1s5ElF/nX8jCdQw+n0R1z9Z9pgI2wsitjlTQ770Tu6KjHurP5TS7rfajaTzQJlRhJUxAh+zbB0 VfmyjT4pVP/V+d9pSaPyowZQJKApNopFzL6ieiNkXrFVMyproIajvKvAQ0tZPrUik45Xr1/LA1QZZ 5bisstKDu7WlO9gV9BmArllStY9ZigZBf8H9oYgmBTFUiVIWG3rlOGw3ANQKBd98gO2K4bCspaDmp XBkN1zbmj8ms/wIEwxoYf/XdQd4ozkg+OP7DgEZ7jZWNGdIxVL+dzM3I+LMTsx5vV00ENV8Iwc+WM 73A6rS4A==; 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 1euEAf-0003Lj-VB; Fri, 09 Mar 2018 09:18:37 +0000 Received: from mail-pl0-x241.google.com ([2607:f8b0:400e:c01::241]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1euE3A-0005lv-JW for linux-arm-kernel@lists.infradead.org; Fri, 09 Mar 2018 09:12:31 +0000 Received: by mail-pl0-x241.google.com with SMTP id v9-v6so4918384plp.12 for ; Fri, 09 Mar 2018 01:10:42 -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=lqp7rxE8ShbtWZ8U504RxqO5iNNGV9YKzgiiV+dAR7A=; b=XzYShfQ6ALXFf4KSWEuMSLsd7qGZZ4on2SJ4Efp6/yFA28rbP9AUJEtqtkQBi35GL9 YG557wPBW4orI2DERgzbI9FkbFBBpHvO24hh1MzFlpqhb29uFF8XnV14wm6oogRYB2Ug nnJryZA4hXbH3cD5LB1Zb4q5RYXhNo9qJVtns= 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=lqp7rxE8ShbtWZ8U504RxqO5iNNGV9YKzgiiV+dAR7A=; b=J5CLOHk6t7gHPSZcddTLezlfH1zEn9V7IZPcKh+LAXUJPCSyWeRi2eqz84eztW3HuJ +sFFrUTYZJW2j4jYJW01F9V1vmBmCnzTzniLj1awKsJo/FqKbFiBggaxWXU4+ISEY65h TmwXzzrjk/lFtCiTzOahINZwTTw9nIzgMFz0P5redM+3YsHy8sPFeswIXGlRAZkJFglM TDK2rMyeZWP9YFGQ5re2e6pgQfQ0dfJsrH06dbDZEXn8ViVmQAn8cAbSoSLOAHd5YRr8 4cFVt1hbyUb6Klz5nVEjEdBvy1fN0dQxYqGld2PppCFHsCvjuMRZsJ4x9/pMOcWqQEN1 dXig== X-Gm-Message-State: AElRT7EUnin3wzmnoWtCIGL3uavbzMihLiHcXiOFNpFI5zwpjwaEJJ1F xslvtwM8G0E55+NmsF2rPzNlh7ZDvWE= X-Google-Smtp-Source: AG47ELvlt7B2i/R5uKeYm9N8tKQp3NdPdmL2UDIBpotDNBuaWubj/f5gzrouIjEnMxYvDPsWmGuXqw== X-Received: by 2002:a17:902:7f0c:: with SMTP id d12-v6mr19541922plm.350.1520586641800; Fri, 09 Mar 2018 01:10:41 -0800 (PST) Received: from localhost.localdomain (176.122.172.82.16clouds.com. [176.122.172.82]) by smtp.gmail.com with ESMTPSA id c7sm1961752pfg.36.2018.03.09.01.10.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Mar 2018 01:10:40 -0800 (PST) From: Alex Shi To: Marc Zyngier , Will Deacon , Ard Biesheuvel , Catalin Marinas , broonie@linaro.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 23/39] arm/arm64: KVM: Consolidate the PSCI include files Date: Fri, 9 Mar 2018 17:07:06 +0800 Message-Id: <20180309090722.26279-24-alex.shi@linaro.org> X-Mailer: git-send-email 2.16.2.440.gc6284da In-Reply-To: <20180309090722.26279-1-alex.shi@linaro.org> References: <20180309090722.26279-1-alex.shi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180309_011053_550533_5AEF02FD X-CRM114-Status: GOOD ( 15.68 ) 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 | 3 ++- arch/arm/kvm/handle_exit.c | 2 +- arch/arm/kvm/psci.c | 2 +- arch/arm64/kvm/handle_exit.c | 3 ++- .../asm/kvm_psci.h => include/kvm/arm_psci.h | 6 ++--- 6 files changed, 9 insertions(+), 34 deletions(-) delete mode 100644 arch/arm/include/asm/kvm_psci.h rename arch/arm64/include/asm/kvm_psci.h => include/kvm/arm_psci.h (89%) diff --git a/arch/arm/include/asm/kvm_psci.h b/arch/arm/include/asm/kvm_psci.h deleted file mode 100644 index 6bda945d31fa..000000000000 --- 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 dc8b5943985c..d77d29a5d220 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -43,7 +43,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 f36b5b1acd1f..fc911e349a18 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 443db0c43d7c..237ff1e392f8 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/kvm/handle_exit.c b/arch/arm64/kvm/handle_exit.c index c43e0e100c11..f1b00be0b829 100644 --- a/arch/arm64/kvm/handle_exit.c +++ b/arch/arm64/kvm/handle_exit.c @@ -22,11 +22,12 @@ #include #include +#include + #include #include #include #include -#include #define CREATE_TRACE_POINTS #include "trace.h" diff --git a/arch/arm64/include/asm/kvm_psci.h b/include/kvm/arm_psci.h similarity index 89% rename from arch/arm64/include/asm/kvm_psci.h rename to include/kvm/arm_psci.h index bc39e557c56c..2042bb909474 100644 --- a/arch/arm64/include/asm/kvm_psci.h +++ b/include/kvm/arm_psci.h @@ -15,8 +15,8 @@ * along with this program. If not, see . */ -#ifndef __ARM64_KVM_PSCI_H__ -#define __ARM64_KVM_PSCI_H__ +#ifndef __KVM_ARM_PSCI_H__ +#define __KVM_ARM_PSCI_H__ #define KVM_ARM_PSCI_0_1 1 #define KVM_ARM_PSCI_0_2 2 @@ -24,4 +24,4 @@ int kvm_psci_version(struct kvm_vcpu *vcpu); int kvm_psci_call(struct kvm_vcpu *vcpu); -#endif /* __ARM64_KVM_PSCI_H__ */ +#endif /* __KVM_ARM_PSCI_H__ */