Skip to contentSkip to conversation

x86, paravirt: Remove CONFIG_PARAVIRT_DEBUG

PATCH New Andi Kleen 1 participant 1 message Mar 22, 2012

Subsystems (2)
lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

PATCH 1/1 x86, paravirt: Remove CONFIG_PARAVIRT_DEBUG

From: Andi Kleen <[email protected]>

CONFIG_PARAVIRT_DEBUG seems rather useless. It only has a single BUG_ON on a NULL pointer and that is directly in front of code that references that pointer anyways and would nicely oops if anything was wrong.

So remove that option.

---
 arch/x86/Kconfig                      |    7 -------
 arch/x86/include/asm/paravirt_types.h |    8 --------
 2 files changed, 0 insertions(+), 15 deletions(-)
arch/x86/Kconfig +0 -7
index 5bed94e..ad52be6 100644
@@ -628,13 +628,6 @@ config PARAVIRT_CLOCK
 
 endif
 
-config PARAVIRT_DEBUG
-	bool "paravirt-ops debugging"
-	depends on PARAVIRT && DEBUG_KERNEL
-	---help---
-	  Enable to debug paravirt_ops internals.  Specifically, BUG if
-	  a paravirt_op is missing when it is called.
-
 config NO_BOOTMEM
 	def_bool y
 
arch/x86/include/asm/paravirt_types.h +0 -8
index 8e8b9a4..fa317c2 100644
@@ -526,18 +526,11 @@ int paravirt_disable_iospace(void);
 #define VEXTRA_CLOBBERS	 , "rax", "r8", "r9", "r10", "r11"
 #endif	/* CONFIG_X86_32 */
 
-#ifdef CONFIG_PARAVIRT_DEBUG
-#define PVOP_TEST_NULL(op)	BUG_ON(op == NULL)
-#else
-#define PVOP_TEST_NULL(op)	((void)op)
-#endif
-
 #define ____PVOP_CALL(rettype, op, clbr, call_clbr, extra_clbr,		\
 		      pre, post, ...)					\
 	({								\
 		rettype __ret;						\
 		PVOP_CALL_ARGS;						\
-		PVOP_TEST_NULL(op);					\
 		/* This is 32-bit specific, but is okay in 64-bit */	\
 		/* since this condition will never hold */		\
 		if (sizeof(rettype) > sizeof(unsigned long)) {		\
@@ -577,7 +570,6 @@ int paravirt_disable_iospace(void);
 #define ____PVOP_VCALL(op, clbr, call_clbr, extra_clbr, pre, post, ...)	\
 	({								\
 		PVOP_VCALL_ARGS;					\
-		PVOP_TEST_NULL(op);					\
 		asm volatile(pre					\
 			     paravirt_alt(PARAVIRT_CALL)		\
 			     post					\
Signature · 1 line
1.7.7.6