Introduce ipipe_base.h (i386/x86_64)
PATCH 5/7 Introduce ipipe_base.h (i386/x86_64)
These patches introduce minimalistic ipipe_base.h to be included by every header out there in the kernel without any dependencies. That is exploited here to move all *stall_root() related prototypes out off irqflags.h, to following patches need ipipe_base.h as well.
BTW, I started removing fastcalls with __ipipe_restore_root - as far as I understood it's pointless now with CONFIG_REGPARM being always on.
Jan
--- include/linux/ipipe.h | 15 +-------------- include/linux/ipipe_base.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ kernel/ipipe/core.c | 2 +- 3 files changed, 47 insertions(+), 15 deletions(-)
include/linux/ipipe.h +1 -14
@@ -27,6 +27,7 @@#include <linux/percpu.h> #include <linux/mutex.h> #include <linux/linkage.h> +#include <linux/ipipe_base.h> #include <asm/ipipe.h> #ifdef CONFIG_IPIPE
@@ -276,10 +277,6 @@ do { \ DECLARE_PER_CPU(struct ipipe_domain *, ipipe_percpu_domain); -extern struct ipipe_domain ipipe_root; - -#define ipipe_root_domain (&ipipe_root) -extern unsigned __ipipe_printk_virq;extern unsigned long __ipipe_virtual_irq_map;
@@ -315,18 +312,8 @@ void __ipipe_remove_domain_proc(struct ivoid __ipipe_flush_printk (unsigned irq,void *cookie); -void __ipipe_stall_root (void ); - -void __ipipe_unstall_root (void ); - -unsigned long __ipipe_test_root (void ); - -unsigned long __ipipe_test_and_stall_root (void ); - void fastcall __ipipe_walk_pipeline(struct list_head *pos, int cpuid); -void fastcall __ipipe_restore_root(unsigned long x); - int fastcall __ipipe_schedule_irq(unsigned irq, struct list_head *head); int fastcall __ipipe_dispatch_event(unsigned event, void *data);
include/linux/ipipe_base.h new file +45 -0
45 lines not on this page · raw message
kernel/ipipe/core.c +1 -1
@@ -198,7 +198,7 @@ unsigned long __ipipe_test_and_stall_rooreturn x; } -void fastcall __ipipe_restore_root(unsigned long x) +void __ipipe_restore_root (unsigned long x) {if (x)__ipipe_stall_root ();
--- include/asm-i386/irqflags.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)
include/asm-i386/irqflags.h +1 -10
@@ -15,18 +15,9 @@ #else #ifndef __ASSEMBLY__ +#include <linux/ipipe_base.h> #include <linux/ipipe_trace.h> -void __ipipe_stall_root(void); - -void __ipipe_unstall_root(void); - -unsigned long __ipipe_test_root(void); - -unsigned long __ipipe_test_and_stall_root(void); - -void fastcall __ipipe_restore_root(unsigned long flags); - static inline unsigned long __raw_local_save_flags(void) { unsigned long flags;
--- include/asm-x86_64/irqflags.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)
include/asm-x86_64/irqflags.h +1 -10
@@ -15,18 +15,9 @@* Interrupt control: */ +#include <linux/ipipe_base.h> #include <linux/ipipe_trace.h> -void __ipipe_stall_root (void ); - -void __ipipe_unstall_root (void ); - -unsigned long __ipipe_test_root (void ); - -unsigned long __ipipe_test_and_stall_root (void ); - -void fastcall __ipipe_restore_root(unsigned long flags); -static inline unsigned long __raw_local_save_flags (void ) {unsigned long flags;
Quoted 4 lines · Jan Kiszka
These patches introduce minimalistic
ipipe_base.hto be included by every header out there in the kernel without any dependencies. That is exploited here to move all*stall_root()related prototypes out offirqflags.h, to following patches needipipe_base.has well.
So this file is supposed to extend with another generic stuff, isn't it? At the moment it's completely about the root domain, so one would think of ipipe_root.h as a more appropriate name.
And this "minimalistic" and "without any dependencies" is due to the heaviness of linux/pipe.h?
Signature · 2 lines
Best regards, Dmitry Adamushko
Quoted 9 lines · Dmitry Adamushko
Quoted 4 lines · Jan Kiszka
These patches introduce minimalistic
ipipe_base.hto be included by every header out there in the kernel without any dependencies. That is exploited here to move all*stall_root()related prototypes out offirqflags.h, to following patches needipipe_base.has well.So this file is supposed to extend with another generic stuff, isn't it? At the moment it's completely about the root domain, so one would think of
ipipe_root.has a more appropriate name.
Yes, when just looking at this particular patch. But then patch #7 extends the scope.
Quoted 3 lines
And this "minimalistic" and "without any dependencies" is due to the heaviness of
linux/pipe.h?
Yep. Originally, I tried hard to drag central parts of struct ipipe_domain into it. The goal was to work on a known root domain structure instead of poking half-blind into it for the domain state. But I already failed due to struct list_entry and IPIPE_NR_IRQS (would have required something like asm/ipipe_base.h :-/). Not to speak of struct mutex.
Jan
Quoted 10 lines · Dmitry Adamushko
Quoted 4 lines · Jan Kiszka
These patches introduce minimalistic
ipipe_base.hto be included by every header out there in the kernel without any dependencies. That is exploited here to move all*stall_root()related prototypes out offirqflags.h, to following patches needipipe_base.has well.So this file is supposed to extend with another generic stuff, isn't it? At the moment it's completely about the root domain, so one would think of
ipipe_root.has a more appropriate name.
Please ignore this. I should have looked at the whole patch-set before writting it.
Signature · 2 lines
Best regards, Dmitry Adamushko