linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] um: Use asm-generic/irqflags.h
@ 2016-06-12 20:04 Richard Weinberger
  2016-06-12 20:04 ` [PATCH 2/2] um: Enable TRACE_IRQFLAGS_SUPPORT Richard Weinberger
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Weinberger @ 2016-06-12 20:04 UTC (permalink / raw)
  To: user-mode-linux-devel; +Cc: linux-kernel, daniel.wagner, Richard Weinberger

From: Daniel Wagner <daniel.wagner@bmw-carit.de>

Instead proving its own arch_local_irq_save() and arch_irqs_disabled()
version use the generic version from asm-generic/irqflags.h.

A nice side effect is that um gets a few additional arch_ functions
as well.

One problem though is the include for the signals. I could figured out
which header file to pick without trigger a bunch of header include
clashes. Leaving it away works though it is surely not the best
practice.

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
---
 arch/um/include/asm/irqflags.h | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/arch/um/include/asm/irqflags.h b/arch/um/include/asm/irqflags.h
index c780d8a..71c2d64 100644
--- a/arch/um/include/asm/irqflags.h
+++ b/arch/um/include/asm/irqflags.h
@@ -6,37 +6,35 @@ extern int set_signals(int enable);
 extern void block_signals(void);
 extern void unblock_signals(void);
 
+#define arch_local_save_flags arch_local_save_flags
 static inline unsigned long arch_local_save_flags(void)
 {
 	return get_signals();
 }
 
+#define arch_local_irq_restore arch_local_irq_restore
 static inline void arch_local_irq_restore(unsigned long flags)
 {
 	set_signals(flags);
 }
 
+#define arch_local_irq_enable arch_local_irq_enable
 static inline void arch_local_irq_enable(void)
 {
 	unblock_signals();
 }
 
+#define arch_local_irq_disable arch_local_irq_disable
 static inline void arch_local_irq_disable(void)
 {
 	block_signals();
 }
 
-static inline unsigned long arch_local_irq_save(void)
-{
-	unsigned long flags;
-	flags = arch_local_save_flags();
-	arch_local_irq_disable();
-	return flags;
-}
+/* #include <uapi/asm/signal.h> */
 
-static inline bool arch_irqs_disabled(void)
-{
-	return arch_local_save_flags() == 0;
-}
+#define ARCH_IRQ_DISABLED	0
+#define ARCh_IRQ_ENABLED	(SIGIO|SIGVTALRM)
+
+#include <asm-generic/irqflags.h>
 
 #endif
-- 
2.7.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] um: Enable TRACE_IRQFLAGS_SUPPORT
  2016-06-12 20:04 [PATCH 1/2] um: Use asm-generic/irqflags.h Richard Weinberger
@ 2016-06-12 20:04 ` Richard Weinberger
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Weinberger @ 2016-06-12 20:04 UTC (permalink / raw)
  To: user-mode-linux-devel; +Cc: linux-kernel, daniel.wagner, Richard Weinberger

Now we have everything we need, so enable
TRACE_IRQFLAGS_SUPPORT.

Signed-off-by: Richard Weinberger <richard@nod.at>
---
 arch/um/Kconfig.common | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common
index cc00134..85f14a8 100644
--- a/arch/um/Kconfig.common
+++ b/arch/um/Kconfig.common
@@ -30,10 +30,9 @@ config PCI
 config PCMCIA
 	bool
 
-# Yet to do!
 config TRACE_IRQFLAGS_SUPPORT
 	bool
-	default n
+	default y
 
 config LOCKDEP_SUPPORT
 	bool
-- 
2.7.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-12 20:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-12 20:04 [PATCH 1/2] um: Use asm-generic/irqflags.h Richard Weinberger
2016-06-12 20:04 ` [PATCH 2/2] um: Enable TRACE_IRQFLAGS_SUPPORT Richard Weinberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).