From patchwork Thu Jun 8 13:34:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9775469 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 9824860350 for ; Thu, 8 Jun 2017 14:06:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8972528543 for ; Thu, 8 Jun 2017 14:06:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7E5232855A; Thu, 8 Jun 2017 14:06:37 +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 0200B28543 for ; Thu, 8 Jun 2017 14:06:37 +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=A+/Bco7ba+9UxzjFVP9VMzjhMrralWlokPrbfkzD9nc=; b=OpwMJDhTrOREGH2kQQWtDDtg4w rMexrzMDdnz0KmVsfjHgkeMxKqu+DB62O0CutiFX7m6ZKQdKAjmYlj67I5sDEBMAFyNG7j7edG3bo 1PYQOwg28ziEakt4eSDxCEaSF5epannOTUe/I7LvgF0SpooAPzuha5HaLaCemtwB1WGQq1qklsXKA 7PxgB9DFlHUhc44UX1pfCKvjgwQjXdyFoCvVrxQuK0wS37XADcIivesoa6kR9tfLFR3q8B2nwvl0F OzqfD87dnImxM7LrjpItQpetDgJwGG4q2DkXi7fyTcvWlrHwJh+yTXg9FRVb9gg0erLLvKJbIt+DN cIMCAO7A==; 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 1dIy55-0007F5-BO; Thu, 08 Jun 2017 14:06:35 +0000 Received: from merlin.infradead.org ([205.233.59.134]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dIy4B-0005xk-Bw for linux-arm-kernel@bombadil.infradead.org; Thu, 08 Jun 2017 14:05:39 +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=dmm/0o5cFFrogw2qI8jGx3iTtlieUPr1pBBepmnJ7CA=; b=wnK7LpU6rtGfGlv3w/KPdQeVK t2/Sd+ohb9jrxe1FLBFjWK3YfA+qYNn0T9gOGBu2RX2jC80FKdsxZu2ZKARZZ0m7gW/kMjeWAkoiH b6sbf19mpkwQZ0o2KgfiIkDPDkVENvqdr74K5elj0dOd5D76+qJKelU+XAtYEravNF8SlmXCiMX+H m4Pgs4SlyBNJWyyO6P8MRCsKc45v1LzTEnu+SW4Pyy7dvyyq+zXMlpdq91fV3BKxiU1smlM0ik1LL KnFfWgDRzQT1RHiq0P8I2l58sc825r8LRVoX9m0xwBN7KZTlE/XtDzZSVIs80Jq/X9r+xO6rNB/h7 FNJQwrYHg==; Received: from mail-wm0-f54.google.com ([74.125.82.54]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dIxbi-0006nz-4R for linux-arm-kernel@lists.infradead.org; Thu, 08 Jun 2017 13:36:14 +0000 Received: by mail-wm0-f54.google.com with SMTP id x70so77670072wme.0 for ; Thu, 08 Jun 2017 06:35:53 -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=dmm/0o5cFFrogw2qI8jGx3iTtlieUPr1pBBepmnJ7CA=; b=ZPqMSixF9Y9yUklExOuOAnpE/WPRD3VVQOl1CX0kw1IwmuBMksjpwJcyAtssd7+ply E6zxZ9k0H2Vzut4n3Ree8yPPlBI0Lp6H5e1wcXjr/R/Rcr1tCxAMB6XDhsicQeYcZ+go 2bouRhjyQpdyFNs2mGIGFjJs/sCbqcWYwh55A= 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=dmm/0o5cFFrogw2qI8jGx3iTtlieUPr1pBBepmnJ7CA=; b=g8Hy641oMRhA0nAhW92+o+mgviWHu8M3aerVNMsCsVnfEcPipWiy78viazt7FYHwT3 PCX1AnpPeVchtlOMmG558EXl1xB6a1NqV4xR9bB2MWl15MJfPg2UMhFHYZsAT3B6fmFD 63xBnjuOAYUh1WCYjUI5wXehYkfCCH8MuEuijF8rEpAbHmKF6No2qTmJhAZLlUoWWuLQ SO2rekK5J+SMEKyheyqR64VTjWiLzIn/EAw7QmXAljnrqQPCwcJJ/ZQTNKW1/yDH34X6 QDidq4p0tQzCHdbtb2OWZU5AQcWUdfGOHOK64RXYyUGXte38CWR1uQHYOCx0ShviQZkL e5TA== X-Gm-Message-State: AODbwcDgA/GpC+9UlnHwvPIcrLjkPYl5skFBMGnphkRYHWR0hrom1LbT 42X85So0zi1HbX9c X-Received: by 10.80.148.49 with SMTP id p46mr22035540eda.2.1496928892203; Thu, 08 Jun 2017 06:34:52 -0700 (PDT) Received: from localhost.localdomain (xd93ddc2d.cust.hiper.dk. [217.61.220.45]) by smtp.gmail.com with ESMTPSA id i38sm3981285eda.18.2017.06.08.06.34.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Jun 2017 06:34:51 -0700 (PDT) From: Christoffer Dall To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 3/9] KVM: arm/arm64: Move irq_is_ppi() to header file Date: Thu, 8 Jun 2017 15:34:40 +0200 Message-Id: <20170608133446.3875-4-cdall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170608133446.3875-1-cdall@linaro.org> References: <20170608133446.3875-1-cdall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170608_093614_347082_4ADA5C12 X-CRM114-Status: GOOD ( 12.83 ) 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 , 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 97b8d37..dde59fb 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 96a9cab..574feff 100644 --- a/virt/kvm/arm/pmu.c +++ b/virt/kvm/arm/pmu.c @@ -496,8 +496,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,