Skip to contentSkip to conversation

um: enable trace irqflags support

PATCH Superseded Thomas Meyer 3 participants 3 messages Oct 19, 2014 – Oct 20, 2014 User-mode Linux (UML)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 3/3 um: enable trace irqflags support

Add TRACE_IRQFLAGS_SUPPORT to UML.
This enables LOCKDEP_SUPPORT and TRACING_SUPPORT.

---

arch/um/Kconfig.common +1 -2
index 87bc868..6a33c3a 100644
@@ -28,10 +28,9 @@ config PCI
 config PCMCIA
 	bool
 
-# Yet to do!
 config TRACE_IRQFLAGS_SUPPORT
 	bool
-	default n
+	default y
 
 config LOCKDEP_SUPPORT
 	bool
arch/um/include/asm/irqflags.h +2 -2
index c780d8a..c5b636e 100644
@@ -34,9 +34,9 @@ static inline unsigned long arch_local_irq_save(void)
 	return flags;
 }
 
-static inline bool arch_irqs_disabled(void)
+static inline int arch_irqs_disabled_flags(unsigned long flags)
 {
-	return arch_local_save_flags() == 0;
+	return flags == 0;
 }
 
 #endif
arch/um/kernel/um_arch.c +3 -0
index f1efeee..fc188d8 100644
@@ -251,6 +251,9 @@ static struct notifier_block panic_exit_notifier = {
 
 void uml_finishsetup(void)
 {
+#ifdef CONFIG_LOCKDEP
+	lockdep_init();
+#endif
 	atomic_notifier_chain_register(&panic_notifier_list,
 				       &panic_exit_notifier);
 

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#1 lore raw

arch/um/kernel/um_arch.c static struct notifier_block panic_exit_notifier = { · line 256

Quoted 9 lines · Thomas Meyer
arch/um/kernel/um_arch.c +3 -0
@@ -251,6 +251,9 @@ static struct notifier_block panic_exit_notifier = {
 
 void uml_finishsetup(void)
 {
+#ifdef CONFIG_LOCKDEP
+       lockdep_init();
+#endif

The #ifdef is not needed. include/linux/lockdep.h provides a dummy definition if !CONFIG_LOCKDEP.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#2 lore raw
In reply to Thomas Meyer

----- Original Message -----

Quoted 7 lines

From: "Thomas Meyer" <[email protected]>
To: "user-mode-linux-devel" <[email protected]>
Sent: Sunday, October 19, 2014 4:14:13 PM
Subject: [uml-devel] [PATCH v3 3/3] um: enable trace irqflags support

Add TRACE_IRQFLAGS_SUPPORT to UML.
This enables LOCKDEP_SUPPORT and TRACING_SUPPORT.

FYI: I'm currently working on porting ftrace() support to uml. It will take another week or two since I don't have enough time to debug, and it isn't stable yet (read as is panic()ing randomly)

Quoted 36 lines

---

arch/um/Kconfig.common +1 -2
index 87bc868..6a33c3a 100644
@@ -28,10 +28,9 @@ config PCI
 config PCMCIA
 	bool
 
-# Yet to do!
 config TRACE_IRQFLAGS_SUPPORT
 	bool
-	default n
+	default y
 
 config LOCKDEP_SUPPORT
 	bool
arch/um/include/asm/irqflags.h +2 -2
index c780d8a..c5b636e 100644
@@ -34,9 +34,9 @@ static inline unsigned long
 arch_local_irq_save(void)
 	return flags;
 }
 
-static inline bool arch_irqs_disabled(void)
+static inline int arch_irqs_disabled_flags(unsigned long flags)
 {
-	return arch_local_save_flags() == 0;
+	return flags == 0;
 }
 
Quoted 1 line

#endif

I'm not sure if this is correct. I'd rather would have another function implemented instead of removing the check for disabled irqs.

cheers,

daniel

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel