From patchwork Fri Aug 3 13:57:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jia He X-Patchwork-Id: 10555121 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 180A614E2 for ; Fri, 3 Aug 2018 13:57:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 053302BCB6 for ; Fri, 3 Aug 2018 13:57:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA4A82BBCF; Fri, 3 Aug 2018 13:57:48 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI 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 4633429C45 for ; Fri, 3 Aug 2018 13:57: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: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:In-Reply-To: References:List-Owner; bh=9t+X149UA7lcdzGRQd2lUloKzEtxeEGE7ARd5AnMrFg=; b=F8F RgvYFaiaVqBclnZvihN2TzK3+Apqdo+r3bOsyAHupbQ3h6Hb8Th7JWGCXYxY9gTprWy2KFTdUrxJY tY+j9nop5WVSxyq2MrAPhYSlRFC/erI8pa0Bt37IjFjUZxlMsvyC6fbFO1lQhSe/N0N2fsvGP3xt2 0363xPHM2CGs/5uYZSkFR8T/23rsJg7pd/xuHzIf8rlUSUyIy7eCPxBOXvrGQXhRT3kPD/1lT24nZ t4oNthKO6McN385DN72+9bVoYv8y7MkSd8toNCq+WaR3xkRCYRC8TuEK+HIg9Nm4iL3yTS9qJg9W3 EqPKZgMyyDVMeYxIh3nSduevSji7aRg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1flaaF-0002gV-Lu; Fri, 03 Aug 2018 13:57:35 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1flaa9-0002eH-5x for linux-arm-kernel@lists.infradead.org; Fri, 03 Aug 2018 13:57:34 +0000 Received: by mail-pf1-x441.google.com with SMTP id b11-v6so3297652pfo.3 for ; Fri, 03 Aug 2018 06:57:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=PHQ7yNxJ6lPuxXq+MoW2dOPy5UfXv/j+KgXZyeUmOmw=; b=Lw7Ht7woMOzFlk9UmvcPOelSfsT0i/sCey5NmHUUS6LdfxgMyu96WlfqbEFL5EimlS 0T6KckVbnKo1jbK0lFrhP0vVKwTBXcH+vBptoWQkzpI+DQ4VBDM13DR7yULgmw9uMGp2 zQtRVwydGWpxmFKvp/ehquOcbFEEwI52MsXmKtGvaIOn1w9WDGEgsVJpA6jmTH9rXLQh iCIijOQIIepHTzaQ15QHs4JhIrFMdhjqSXc+Lz7G3jlCcAY4+NMlRayxEYfknr/OSm1z PJ8rtX8+yHZdqzFXVWl+KrD8IuVPbXobwkLy6DF2AL99ZdhVlekbTJSA6mYOdnwLEwXT qAdw== 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; bh=PHQ7yNxJ6lPuxXq+MoW2dOPy5UfXv/j+KgXZyeUmOmw=; b=Iljbmy2gEb/wjgIKatgdh+WwTVQ5cjTDpl+aVE2eVKEv+g+/IA03IexA03/sMewzoa 26KpILbgzkSBUD9GD4Zrmzr1SITaabX/lGgzv1R4LsmtMKlMNE5xpvXI0txQG4SXisJB bscVtN2fSfThnXbCzyY+8ZNnJSpbZSXQNMjalTMjEcvDrSU262KimXv5koy+Yt4kq0MT nRcfbCypbPm00IS14uNn76RahjAyIr0cHCGYsdEIRgRSipMJAaPhzFOiI87RK+FSFm/R SY7twZgKlEwZvZIZ24K2dNndXfCMIu2qEeabp8PdpTtZCCv3W8OHrDIMuB1ijGtEOQHF PlOQ== X-Gm-Message-State: AOUpUlHWRTbbLyobXtQS9RTKKf1kDKCAKKUsKdWRlowsPfom8EcIgaFR puY3a98kvSllk7efuL2S58U= X-Google-Smtp-Source: AAOMgpdeZDJHu4jeJyjXtqS1nyARExkvhRant+yCzXmzL0jt5lZPZG28HYvAyjL4VFwseqWUXczwdA== X-Received: by 2002:a63:5c52:: with SMTP id n18-v6mr3902511pgm.360.1533304638128; Fri, 03 Aug 2018 06:57:18 -0700 (PDT) Received: from ct7host.localdomain ([38.106.11.25]) by smtp.gmail.com with ESMTPSA id p5-v6sm6755173pfn.57.2018.08.03.06.57.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Aug 2018 06:57:17 -0700 (PDT) From: Jia He X-Google-Original-From: Jia He To: Christoffer Dall , Marc Zyngier , Catalin Marinas , Eric Auger , Ard Biesheuvel Subject: [PATCH 1/2] KVM: arm/arm64: vgic: move DEBUG_SPINLOCK_BUG_ON to vgic.h Date: Fri, 3 Aug 2018 21:57:03 +0800 Message-Id: <1533304624-43250-1-git-send-email-jia.he@hxt-semitech.com> X-Mailer: git-send-email 1.8.3.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180803_065729_225722_09DF4BA8 X-CRM114-Status: GOOD ( 10.02 ) 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: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Jia He , Andre Przywara , Jia He , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org 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 This is to let DEBUG_SPINLOCK_BUG_ON be commonly used in vgic-v2 and vgic-v3. Signed-off-by: Jia He --- virt/kvm/arm/vgic/vgic.c | 6 ------ virt/kvm/arm/vgic/vgic.h | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/virt/kvm/arm/vgic/vgic.c b/virt/kvm/arm/vgic/vgic.c index 33c8325..c22cea6 100644 --- a/virt/kvm/arm/vgic/vgic.c +++ b/virt/kvm/arm/vgic/vgic.c @@ -28,12 +28,6 @@ #define CREATE_TRACE_POINTS #include "trace.h" -#ifdef CONFIG_DEBUG_SPINLOCK -#define DEBUG_SPINLOCK_BUG_ON(p) BUG_ON(p) -#else -#define DEBUG_SPINLOCK_BUG_ON(p) -#endif - struct vgic_global kvm_vgic_global_state __ro_after_init = { .gicv3_cpuif = STATIC_KEY_FALSE_INIT, }; diff --git a/virt/kvm/arm/vgic/vgic.h b/virt/kvm/arm/vgic/vgic.h index ead00b2..ea51fcc 100644 --- a/virt/kvm/arm/vgic/vgic.h +++ b/virt/kvm/arm/vgic/vgic.h @@ -103,6 +103,12 @@ #define KVM_VGIC_V3_RDIST_COUNT_MASK GENMASK_ULL(63, 52) #define KVM_VGIC_V3_RDIST_COUNT_SHIFT 52 +#ifdef CONFIG_DEBUG_SPINLOCK +#define DEBUG_SPINLOCK_BUG_ON(p) BUG_ON(p) +#else +#define DEBUG_SPINLOCK_BUG_ON(p) +#endif + /* Requires the irq_lock to be held by the caller. */ static inline bool irq_is_pending(struct vgic_irq *irq) {