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

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

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(-)

Patch
diff mbox series

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