From patchwork Wed Aug 27 17:36:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 36135 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f70.google.com (mail-qa0-f70.google.com [209.85.216.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A9296203C5 for ; Wed, 27 Aug 2014 17:52:18 +0000 (UTC) Received: by mail-qa0-f70.google.com with SMTP id j7sf1378139qaq.1 for ; Wed, 27 Aug 2014 10:52:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=N2ZAjO3zZtVSR0J1ukKYOrhkbfoN/M7dM8m4EP5IiEU=; b=YAXG749ZPF5srPvT6cfCiLAS3hHDQSY/hA1C7wKe5zlSBTThe5byZ0iDRbCRnCRAC8 t/WtGpomnEh3z1bCZM5sksxK5qztUcNSaYjr1gtTRVzsjsC1O9nHlL3oF88E/eWHza+z km/JzdVnlN6zPTrfZKLVTFqBtrTeimmzVHQhT43BonFzLpfjZb5P9mVHbuWBqJYDmaTw 0QjOxUpFlhJZUdefyyRKSIgrsMhBNuO4TsSrLM3Xi4f5fqR+Fx4fHg5dQDNK/GpPs2AA 05ISoHNShS7Dt5wAUo3uVMoDi8LazGOxj4mkwsMqxWq12D/GgOKaRRI+A7LKlHkldzCr xOaQ== X-Gm-Message-State: ALoCoQmsUE4HK2ZntrupqZYsiCcInhDB2XclB7OUMzOO9PAsFi4vAJc7DjWKsfrq66CRKtZuUPPe X-Received: by 10.236.61.36 with SMTP id v24mr23033413yhc.24.1409161937126; Wed, 27 Aug 2014 10:52:17 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.103.177 with SMTP id y46ls219626qge.79.gmail; Wed, 27 Aug 2014 10:52:17 -0700 (PDT) X-Received: by 10.236.30.197 with SMTP id k45mr3298776yha.157.1409161936981; Wed, 27 Aug 2014 10:52:16 -0700 (PDT) Received: from mail-yh0-f48.google.com (mail-yh0-f48.google.com [209.85.213.48]) by mx.google.com with ESMTPS id f6si1264480yho.56.2014.08.27.10.52.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 27 Aug 2014 10:52:16 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.213.48 as permitted sender) client-ip=209.85.213.48; Received: by mail-yh0-f48.google.com with SMTP id i57so610881yha.35 for ; Wed, 27 Aug 2014 10:52:16 -0700 (PDT) X-Received: by 10.52.3.40 with SMTP id 8mr25928977vdz.24.1409161936887; Wed, 27 Aug 2014 10:52:16 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp118029vcb; Wed, 27 Aug 2014 10:52:16 -0700 (PDT) X-Received: by 10.140.106.5 with SMTP id d5mr22565172qgf.23.1409161936350; Wed, 27 Aug 2014 10:52:16 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id d30si1442097qga.89.2014.08.27.10.52.16 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 27 Aug 2014 10:52:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:60927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMhOK-0002Cl-1Z for patch@linaro.org; Wed, 27 Aug 2014 13:52:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32911) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMhAf-0004oA-3Y for qemu-devel@nongnu.org; Wed, 27 Aug 2014 13:38:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMhAY-0003Qo-0y for qemu-devel@nongnu.org; Wed, 27 Aug 2014 13:38:08 -0400 Received: from e39.co.us.ibm.com ([32.97.110.160]:46284) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMhAX-0003Qf-Rj for qemu-devel@nongnu.org; Wed, 27 Aug 2014 13:38:01 -0400 Received: from /spool/local by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 27 Aug 2014 11:38:01 -0600 Received: from d01dlp01.pok.ibm.com (9.56.250.166) by e39.co.us.ibm.com (192.168.1.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 27 Aug 2014 11:37:58 -0600 Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id C092438C8039; Wed, 27 Aug 2014 13:37:57 -0400 (EDT) Received: from d01av05.pok.ibm.com (d01av05.pok.ibm.com [9.56.224.195]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s7RHbneC9634102; Wed, 27 Aug 2014 17:37:57 GMT Received: from d01av05.pok.ibm.com (localhost [127.0.0.1]) by d01av05.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s7RHbPCE016731; Wed, 27 Aug 2014 13:37:25 -0400 Received: from localhost ([9.80.81.153]) by d01av05.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s7RHbOtM016142; Wed, 27 Aug 2014 13:37:24 -0400 From: Michael Roth To: qemu-devel@nongnu.org Date: Wed, 27 Aug 2014 12:36:11 -0500 Message-Id: <1409160982-16389-15-git-send-email-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1409160982-16389-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1409160982-16389-1-git-send-email-mdroth@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14082717-9332-0000-0000-000001D387BB X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 32.97.110.160 Cc: qemu-stable@nongnu.org Subject: [Qemu-devel] [PATCH 14/25] target-arm: Rename QEMU PSCI v0.1 definitions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mdroth@linux.vnet.ibm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.213.48 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Christoffer Dall The function IDs for PSCI v0.1 are exported by KVM and defined as KVM_PSCI_FN_. To build using these defines in non-KVM code, QEMU defines these IDs locally and check their correctness against the KVM headers when those are available. However, the naming scheme used for QEMU (almost) clashes with the PSCI v0.2 definitions from Linux so to avoid unfortunate naming when we introduce local PSCI v0.2 defines, rename the current local defines with QEMU_ prependend and clearly identify the PSCI version as v0.1 in the defines. Cc: qemu-stable@nongnu.org Signed-off-by: Christoffer Dall Signed-off-by: Peter Maydell (cherry picked from commit a65c9c17cef16bcb98ec6cf4feb8676c1a2d1168) Signed-off-by: Michael Roth --- hw/arm/virt.c | 8 ++++---- target-arm/kvm-consts.h | 22 +++++++++++----------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 89532bd..a6fd5e6 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -204,10 +204,10 @@ static void fdt_add_psci_node(const VirtBoardInfo *vbi) qemu_fdt_setprop_string(fdt, "/psci", "method", "hvc"); qemu_fdt_setprop_cell(fdt, "/psci", "cpu_suspend", - PSCI_FN_CPU_SUSPEND); - qemu_fdt_setprop_cell(fdt, "/psci", "cpu_off", PSCI_FN_CPU_OFF); - qemu_fdt_setprop_cell(fdt, "/psci", "cpu_on", PSCI_FN_CPU_ON); - qemu_fdt_setprop_cell(fdt, "/psci", "migrate", PSCI_FN_MIGRATE); + QEMU_PSCI_0_1_FN_CPU_SUSPEND); + qemu_fdt_setprop_cell(fdt, "/psci", "cpu_off", QEMU_PSCI_0_1_FN_CPU_OFF); + qemu_fdt_setprop_cell(fdt, "/psci", "cpu_on", QEMU_PSCI_0_1_FN_CPU_ON); + qemu_fdt_setprop_cell(fdt, "/psci", "migrate", QEMU_PSCI_0_1_FN_MIGRATE); } } diff --git a/target-arm/kvm-consts.h b/target-arm/kvm-consts.h index 6009a33..bcad7ba 100644 --- a/target-arm/kvm-consts.h +++ b/target-arm/kvm-consts.h @@ -38,17 +38,17 @@ MISMATCH_CHECK(CP_REG_SIZE_U64, KVM_REG_SIZE_U64) MISMATCH_CHECK(CP_REG_ARM, KVM_REG_ARM) MISMATCH_CHECK(CP_REG_ARCH_MASK, KVM_REG_ARCH_MASK) -#define PSCI_FN_BASE 0x95c1ba5e -#define PSCI_FN(n) (PSCI_FN_BASE + (n)) -#define PSCI_FN_CPU_SUSPEND PSCI_FN(0) -#define PSCI_FN_CPU_OFF PSCI_FN(1) -#define PSCI_FN_CPU_ON PSCI_FN(2) -#define PSCI_FN_MIGRATE PSCI_FN(3) - -MISMATCH_CHECK(PSCI_FN_CPU_SUSPEND, KVM_PSCI_FN_CPU_SUSPEND) -MISMATCH_CHECK(PSCI_FN_CPU_OFF, KVM_PSCI_FN_CPU_OFF) -MISMATCH_CHECK(PSCI_FN_CPU_ON, KVM_PSCI_FN_CPU_ON) -MISMATCH_CHECK(PSCI_FN_MIGRATE, KVM_PSCI_FN_MIGRATE) +#define QEMU_PSCI_0_1_FN_BASE 0x95c1ba5e +#define QEMU_PSCI_0_1_FN(n) (QEMU_PSCI_0_1_FN_BASE + (n)) +#define QEMU_PSCI_0_1_FN_CPU_SUSPEND QEMU_PSCI_0_1_FN(0) +#define QEMU_PSCI_0_1_FN_CPU_OFF QEMU_PSCI_0_1_FN(1) +#define QEMU_PSCI_0_1_FN_CPU_ON QEMU_PSCI_0_1_FN(2) +#define QEMU_PSCI_0_1_FN_MIGRATE QEMU_PSCI_0_1_FN(3) + +MISMATCH_CHECK(QEMU_PSCI_0_1_FN_CPU_SUSPEND, KVM_PSCI_FN_CPU_SUSPEND) +MISMATCH_CHECK(QEMU_PSCI_0_1_FN_CPU_OFF, KVM_PSCI_FN_CPU_OFF) +MISMATCH_CHECK(QEMU_PSCI_0_1_FN_CPU_ON, KVM_PSCI_FN_CPU_ON) +MISMATCH_CHECK(QEMU_PSCI_0_1_FN_MIGRATE, KVM_PSCI_FN_MIGRATE) /* Note that KVM uses overlapping values for AArch32 and AArch64 * target CPU numbers. AArch32 targets: