From patchwork Sun Apr 23 17:08:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9694913 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 8E66060245 for ; Sun, 23 Apr 2017 17:10:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 759F626530 for ; Sun, 23 Apr 2017 17:10:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A6AA265B9; Sun, 23 Apr 2017 17:10:12 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E10F826530 for ; Sun, 23 Apr 2017 17:10:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162648AbdDWRKJ (ORCPT ); Sun, 23 Apr 2017 13:10:09 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:35040 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162381AbdDWRJp (ORCPT ); Sun, 23 Apr 2017 13:09:45 -0400 Received: by mail-wm0-f50.google.com with SMTP id w64so46372536wma.0 for ; Sun, 23 Apr 2017 10:09:44 -0700 (PDT) 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=K/yrLyddTrHVYfHJ1s13TPHZ1XuXINsPoQyc93UDkgI=; b=C59caWLzHoUhkOxWJYJ8rX+tzW1+kv2bqmTyZyyhaZM8smr7syKyUlNZNm2UAOWnPe XUWxsQERh1UFxnu35GAru31Hbb6uhtl3p1slLl029vyCCbHmPc1v9EENL6gY9pmZRHHw 5VaUzzjrThwiUj7j5jQNoF8RL5ADuYuPSiUwY= 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=K/yrLyddTrHVYfHJ1s13TPHZ1XuXINsPoQyc93UDkgI=; b=GrsUniTBCTm9IX+GKKftXbmpAE/JHN/iAi2KWJxKOyCOQ2Z1QGtVpU6XmwyudZjkQ4 irojvsP04UvIoE60yyZBsK9075Rp3DLFlOUFQGu8UVrBpRxiChbR28P0SpQhIXuVU7Hm iI4BMEo9gkzDqXwS2qs0kgeWhtNKUEV0of3LSgDR9WGdWEWtBhFroN4JV5syBUlLSBdB Bm0G/r3+wLtNapPvjx3qvBNL8aYku+qJGuoUqbVJfGJE6A+4TIyaYcaRTYkCTtRnjbsp YCNeyeiKOUL6/6UL2JONe37i2c0iZSIoRwbwJjPZSHR5Burm+WGQBKS4rh3p1pNCRr+Z k38g== X-Gm-Message-State: AN3rC/4nEconxwW3Kg3ZWkFuc3y5Kcu1e+kTG0LHJbj90EuZ0Qd4DMLp XibK83toJ306tW+Gs5sKqQ== X-Received: by 10.80.152.69 with SMTP id h5mr121252edb.66.1492967383590; Sun, 23 Apr 2017 10:09:43 -0700 (PDT) Received: from localhost.localdomain (xd93ddc2d.cust.hiper.dk. [217.61.220.45]) by smtp.gmail.com with ESMTPSA id 58sm2803521edz.2.2017.04.23.10.09.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 23 Apr 2017 10:09:43 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Cc: Marc Zyngier , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mark Rutland Subject: [PULL 12/79] KVM: arm64: Use common physical timer sysreg definitions Date: Sun, 23 Apr 2017 19:08:22 +0200 Message-Id: <20170423170929.27334-13-cdall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170423170929.27334-1-cdall@linaro.org> References: <20170423170929.27334-1-cdall@linaro.org> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Mark Rutland Now that we have common definitions for the physical timer control registers, make the KVM code use these, simplifying the sys_reg_descs table. Signed-off-by: Mark Rutland Acked-by: Christoffer Dall Cc: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu --- arch/arm64/kvm/sys_regs.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c index 1f3062b..860707f 100644 --- a/arch/arm64/kvm/sys_regs.c +++ b/arch/arm64/kvm/sys_regs.c @@ -1016,15 +1016,9 @@ static const struct sys_reg_desc sys_reg_descs[] = { { Op0(0b11), Op1(0b011), CRn(0b1101), CRm(0b0000), Op2(0b011), NULL, reset_unknown, TPIDRRO_EL0 }, - /* CNTP_TVAL_EL0 */ - { Op0(0b11), Op1(0b011), CRn(0b1110), CRm(0b0010), Op2(0b000), - access_cntp_tval }, - /* CNTP_CTL_EL0 */ - { Op0(0b11), Op1(0b011), CRn(0b1110), CRm(0b0010), Op2(0b001), - access_cntp_ctl }, - /* CNTP_CVAL_EL0 */ - { Op0(0b11), Op1(0b011), CRn(0b1110), CRm(0b0010), Op2(0b010), - access_cntp_cval }, + { SYS_DESC(SYS_CNTP_TVAL_EL0), access_cntp_tval }, + { SYS_DESC(SYS_CNTP_CTL_EL0), access_cntp_ctl }, + { SYS_DESC(SYS_CNTP_CVAL_EL0), access_cntp_cval }, /* PMEVCNTRn_EL0 */ PMU_PMEVCNTR_EL0(0),