diff mbox series

[3/3] xen: build common/preempt.c only with CONFIG_DEBUG

Message ID 20190522094549.28397-4-jgross@suse.com (mailing list archive)
State New, archived
Headers show
Series tune preempt_[dis|en]able() | expand

Commit Message

Jürgen Groß May 22, 2019, 9:45 a.m. UTC
There is nothing left in common/preempt.c in non-debug builds.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 xen/common/Makefile  | 2 +-
 xen/common/preempt.c | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/xen/common/Makefile b/xen/common/Makefile
index 33d03b862f..d6576a3fc3 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -30,7 +30,7 @@  obj-y += notifier.o
 obj-y += page_alloc.o
 obj-$(CONFIG_HAS_PDX) += pdx.o
 obj-$(CONFIG_PERF_COUNTERS) += perfc.o
-obj-y += preempt.o
+obj-$(CONFIG_DEBUG) += preempt.o
 obj-y += random.o
 obj-y += rangeset.o
 obj-y += radix-tree.o
diff --git a/xen/common/preempt.c b/xen/common/preempt.c
index 3077c51d52..8bb099e8e8 100644
--- a/xen/common/preempt.c
+++ b/xen/common/preempt.c
@@ -23,7 +23,6 @@ 
 #include <xen/irq.h>
 #include <asm/system.h>
 
-#ifndef NDEBUG
 DEFINE_PER_CPU(unsigned int, __preempt_count);
 
 void ASSERT_NOT_IN_ATOMIC(void)
@@ -32,4 +31,3 @@  void ASSERT_NOT_IN_ATOMIC(void)
     ASSERT(!in_irq());
     ASSERT(local_irq_is_enabled());
 }
-#endif