Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp498469imm; Fri, 3 Aug 2018 06:58:20 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeKw93TH1vwxBR8aDki0XdPyzQGG801Vt2rhYaZkyOiyM8T97/kaewarTzV+V6iYVuusIwX X-Received: by 2002:a63:2906:: with SMTP id p6-v6mr4047167pgp.204.1533304700107; Fri, 03 Aug 2018 06:58:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533304700; cv=none; d=google.com; s=arc-20160816; b=EuDp30+6yQBkTFiOu+mk9h84w2/fUxSlnIgbiR7RPQbLAC3lsTsloj5OyGpw+L3Re7 IdSj2/Nu5ZBHkDLaTe5icuPkbMMfiyzEHoR7Ii1dsD4ckEhNyB7ZB5PLTIAlne8BP4S/ PhAkzA3i1f0UHGKnwioRTKxdt65D6QCZXO9Yzubb56wTZQ+qoOXWE6kBxL0sAeYeOhVV 5YJGQVcGk+io1vluQ3VUK37rjKSZ65Ws5z6Rgf3zGk+uXJSRik7XVAaW/Em/HSi1/JZp 011tX9PMgJGxD5ztTdlVp/xLk/pun5ml4xjMkxGthviE9cc/lH6JjFV++N0Hk7wzT98X Im+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=PHQ7yNxJ6lPuxXq+MoW2dOPy5UfXv/j+KgXZyeUmOmw=; b=acDRLqP3wloz1M93V+tv7a9mJyil1A6a3eZdL0Bb3SA9LGZt62eRD74Om3B866nFNi 2xvTNmvhdqkQztpErAgweKNtja+PMoZxp872YOnwe0eU0nlSJoP8L2Gy8vpWfle1d8Ed 93JvSy0JCefEYuMlCw9lk2ELiObxaxWj/Nv2WkJPqTNEFsX+PTDk1cXKcTdT4OQPHAgP 3wjdKPUXQeVQIB20mBC9QEQ5PeiZ/TkbDLEt3F0vZNFMmXA2O6b7sPHgebHANuFndLHl 2AQ9X+UTRcevKs5rBYeC0UQS4zTkTqDAXOZbCoBhHXwMRsZxJH4gkCG3mRIA9/hwg8ax zicw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Lw7Ht7wo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i62-v6si4798563pge.93.2018.08.03.06.58.05; Fri, 03 Aug 2018 06:58:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Lw7Ht7wo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732044AbeHCPxq (ORCPT + 99 others); Fri, 3 Aug 2018 11:53:46 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:40913 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728833AbeHCPxq (ORCPT ); Fri, 3 Aug 2018 11:53:46 -0400 Received: by mail-pg1-f194.google.com with SMTP id x5-v6so2887979pgp.7 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=B8Y0REyb+RSiAZUHq5j//5Jc0CFt2/7Vn0hFVMT04wsMLhen3RSQHeBTzC0dSvhm/c nGYBve+o9Lp59dVLaA5SOGBDJ57SG/G3FIZzFd2YAnWoI5Plz38QZzuqDKyKiFmITqLG U7+0aLEYdd+vwDVPnjm23Gtq0JzzusPzpxLnzp4QXuCrgwp3KNhio5i0z7zWl8M0pOyG SMgRFZFwj96pnyd2heXVaGj1TGgNseuceXUuMGRyXIFykUDmZE1JQx5NNXKYXOhaRj2i h3QpXG1+36ycGxrvAyKI4KJdUt4QEmeFI5OUehdZOKJzEmAVsu7OKSigCilTnXx1pacF 2hPA== X-Gm-Message-State: AOUpUlG/JdGqnTn2gDsWQEZ/Hdr3vjxMTc7VY6jiGU93v3ij/oINzU9F qvYNIvP59e1hxgtHAEZFMq0= 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 Cc: Jia He , Andre Przywara , Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, Jia He 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) { -- 1.8.3.1