From patchwork Wed May 3 18:32:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9710265 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 833C56021C for ; Wed, 3 May 2017 18:33:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 78E6028627 for ; Wed, 3 May 2017 18:33:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D49C28685; Wed, 3 May 2017 18:33:33 +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 [65.50.211.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 E980628627 for ; Wed, 3 May 2017 18:33:32 +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=nd1UToOJ2U8dsP8EMRhYICMPFd25qxSyoioCSXOi6zQ=; b=lFShIJ755qImX6zXqMBclTbkoa kdWGPE44skWvv/FZqVgjSHJG3ulq8Wk7qogDE+rFAG6fr1nY6n+8ZQuFD5NQY0rfxwDGQyYFc20Ap 6pLjqsRgl/Ir6j+6Eeas+JRIOCnlbP8IS/b/EgZ0dTUF0v8shxbUbn/fpChRgEpVehnillsl2nXx9 l/Vfb/k9mM2192GIQaR73dkFOZ2KcfFfBklclvWvZ4BAhvChepIn6OTKOLpMPSEOd5l/+VyuS1gRk 5xqZQYJt8swgmkhtb+t6gIdxeFLss1wzc9myg8Sz9cN7/PzzoA2EkyexuYQ2iAvPfddBcmCXqTcDu 7YyMoGZA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d5z5c-0003zG-1f; Wed, 03 May 2017 18:33:28 +0000 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d5z5Y-0003w3-6z for linux-arm-kernel@lists.infradead.org; Wed, 03 May 2017 18:33:26 +0000 Received: by mail-wm0-x22b.google.com with SMTP id m123so67787103wma.0 for ; Wed, 03 May 2017 11:33:07 -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=aS2HAEzMp+OI3RI64xsoohCtfuHl6cA9AwfR1mXx3/o=; b=hr+OMRad3qEkFCnK6tSY6GVdyJDWhNfjvD9kJG09is+EXlMMBtuU9XY5HH8zgvq/CQ 2X8VmTNMzm89qlr3+jnxAfLRgp4U7AkR46//ZdGGoSobiYPYw4Ek11ENRFFIHeJ2WAAC gZjFxmwxWJBl/A+ch0GTUD7+40wFkw8uYEAzk= 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=aS2HAEzMp+OI3RI64xsoohCtfuHl6cA9AwfR1mXx3/o=; b=I15as4IQPLEwBtCtvddIJf51BHZM2yAwUOAMRmz9KRI3t+xgD49jK+fBrQtjpmcTnI alQoDx2RZcQMnDVRJccXmO77N6cAXKHDu9herm2h/+djrhAx6I9DrgRiZWIWDLS6QJUd /bGmudMAYLs4Q7Kkh8RqGwhwWLb9NS+an6DcHnRsvvaPXtFx2J9Aj7l7KrekQu0akC8G drrYrwSsXSRYnOmdIHwzy4jxTkon+KEbm1hgeBAS7FY9LKCap5cEgW+e6t7dMOQssY13 97Tsd2QxEG3WJUxN2IRkBuGtc/1IS+sZDGJWiSH8u40dk6Ajouoj8w3IZYnCa4t39s0J a/EQ== X-Gm-Message-State: AN3rC/7c2+Ap4/cCE5rHEEYszEHv9fHpf2retLUegtibm9Brw2JqlNEO KA3EDzkuvbx6bSYR X-Received: by 10.80.146.109 with SMTP id j42mr27043218eda.17.1493836384896; Wed, 03 May 2017 11:33:04 -0700 (PDT) Received: from localhost.localdomain (xd93ddc2d.cust.hiper.dk. [217.61.220.45]) by smtp.gmail.com with ESMTPSA id x2sm10666038edb.49.2017.05.03.11.33.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 May 2017 11:33:04 -0700 (PDT) From: Christoffer Dall To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/5] KVM: arm/arm64: Move irq_is_ppi() to header file Date: Wed, 3 May 2017 20:32:58 +0200 Message-Id: <20170503183300.4618-4-cdall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170503183300.4618-1-cdall@linaro.org> References: <20170503183300.4618-1-cdall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170503_113324_408585_E0C3C7FA X-CRM114-Status: GOOD ( 13.18 ) 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: Marc Zyngier , Peter Maydell , Alexander Graf , kvm@vger.kernel.org, Christoffer Dall 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 We are about to need this define in the arch timer code as well so move it to a common location. Signed-off-by: Christoffer Dall Acked-by: Marc Zyngier --- include/kvm/arm_vgic.h | 2 ++ virt/kvm/arm/pmu.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h index 26ed4fb..1541f5d 100644 --- a/include/kvm/arm_vgic.h +++ b/include/kvm/arm_vgic.h @@ -38,6 +38,8 @@ #define VGIC_MIN_LPI 8192 #define KVM_IRQCHIP_NUM_PINS (1020 - 32) +#define irq_is_ppi(irq) ((irq) >= VGIC_NR_SGIS && (irq) < VGIC_NR_PRIVATE_IRQS) + enum vgic_type { VGIC_V2, /* Good ol' GICv2 */ VGIC_V3, /* New fancy GICv3 */ diff --git a/virt/kvm/arm/pmu.c b/virt/kvm/arm/pmu.c index f046b08..9b3e3ea 100644 --- a/virt/kvm/arm/pmu.c +++ b/virt/kvm/arm/pmu.c @@ -481,8 +481,6 @@ static int kvm_arm_pmu_v3_init(struct kvm_vcpu *vcpu) return 0; } -#define irq_is_ppi(irq) ((irq) >= VGIC_NR_SGIS && (irq) < VGIC_NR_PRIVATE_IRQS) - /* * For one VM the interrupt type must be same for each vcpu. * As a PPI, the interrupt number is the same for all vcpus,