From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: [PATCHv1 3/4] spinlock: shrink struct lock_debug Date: Fri, 18 Dec 2015 14:09:05 +0000 Message-ID: <1450447746-9305-4-git-send-email-david.vrabel@citrix.com> References: <1450447746-9305-1-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a9viu-0006hj-TM for xen-devel@lists.xenproject.org; Fri, 18 Dec 2015 14:09:32 +0000 In-Reply-To: <1450447746-9305-1-git-send-email-david.vrabel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Jennifer Herbert , David Vrabel , Jan Beulich , Ian Campbell List-Id: xen-devel@lists.xenproject.org From: Jennifer Herbert Reduce the size of struct lock_debug so increases in other lock structures don't increase the size of struct domain too much. Signed-off-by: Jennifer Herbert Signed-off-by: David Vrabel --- xen/common/spinlock.c | 2 +- xen/include/xen/spinlock.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/common/spinlock.c b/xen/common/spinlock.c index 7f89694..c129a88 100644 --- a/xen/common/spinlock.c +++ b/xen/common/spinlock.c @@ -16,7 +16,7 @@ static atomic_t spin_debug __read_mostly = ATOMIC_INIT(0); static void check_lock(struct lock_debug *debug) { - int irq_safe = !local_irq_is_enabled(); + s16 irq_safe = !local_irq_is_enabled(); if ( unlikely(atomic_read(&spin_debug) <= 0) ) return; diff --git a/xen/include/xen/spinlock.h b/xen/include/xen/spinlock.h index fb0438e..5e54407 100644 --- a/xen/include/xen/spinlock.h +++ b/xen/include/xen/spinlock.h @@ -6,7 +6,7 @@ #ifndef NDEBUG struct lock_debug { - int irq_safe; /* +1: IRQ-safe; 0: not IRQ-safe; -1: don't know yet */ + s16 irq_safe; /* +1: IRQ-safe; 0: not IRQ-safe; -1: don't know yet */ }; #define _LOCK_DEBUG { -1 } void spin_debug_enable(void); -- 2.1.4