All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: adeos-main <adeos-main@gna.org>
Cc: Philippe Gerum <rpm@xenomai.org>
Subject: [Adeos-main] [PATCH 5/7] Introduce ipipe_base.h (i386/x86_64)
Date: Thu, 26 Apr 2007 20:41:56 +0200	[thread overview]
Message-ID: <4630F274.5090605@domain.hid> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 423 bytes --]

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

[-- Attachment #1.2: split-ipipe-header.patch --]
[-- Type: text/plain, Size: 3489 bytes --]

---
 include/linux/ipipe.h      |   15 +--------------
 include/linux/ipipe_base.h |   45 +++++++++++++++++++++++++++++++++++++++++++++
 kernel/ipipe/core.c        |    2 +-
 3 files changed, 47 insertions(+), 15 deletions(-)

Index: linux-2.6.20/include/linux/ipipe.h
===================================================================
--- linux-2.6.20.orig/include/linux/ipipe.h
+++ linux-2.6.20/include/linux/ipipe.h
@@ -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 i
 
 void __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);
Index: linux-2.6.20/include/linux/ipipe_base.h
===================================================================
--- /dev/null
+++ linux-2.6.20/include/linux/ipipe_base.h
@@ -0,0 +1,45 @@
+/* -*- linux-c -*-
+ * include/linux/ipipe.h
+ *
+ * Copyright (C) 2002-2005 Philippe Gerum.
+ *               2007 Jan Kiszka.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139,
+ * USA; either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __LINUX_IPIPE_BASE_H
+#define __LINUX_IPIPE_BASE_H
+
+#ifdef CONFIG_IPIPE
+
+extern struct ipipe_domain ipipe_root;
+
+#define ipipe_root_domain (&ipipe_root)
+
+
+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 __ipipe_restore_root(unsigned long x);
+
+#endif	/* CONFIG_IPIPE */
+
+#endif	/* !__LINUX_IPIPE_BASE_H */
Index: linux-2.6.20/kernel/ipipe/core.c
===================================================================
--- linux-2.6.20.orig/kernel/ipipe/core.c
+++ linux-2.6.20/kernel/ipipe/core.c
@@ -198,7 +198,7 @@ unsigned long __ipipe_test_and_stall_roo
 	return x;
 }
 
-void fastcall __ipipe_restore_root(unsigned long x)
+void __ipipe_restore_root(unsigned long x)
 {
 	if (x)
 		__ipipe_stall_root();

[-- Attachment #1.3: split-ipipe-header-i386.patch --]
[-- Type: text/plain, Size: 764 bytes --]

---
 include/asm-i386/irqflags.h |   11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

Index: linux-2.6.20/include/asm-i386/irqflags.h
===================================================================
--- linux-2.6.20.orig/include/asm-i386/irqflags.h
+++ linux-2.6.20/include/asm-i386/irqflags.h
@@ -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;

[-- Attachment #1.4: split-ipipe-header-x86_64.patch --]
[-- Type: text/plain, Size: 783 bytes --]

---
 include/asm-x86_64/irqflags.h |   11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

Index: linux-2.6.20-x64/include/asm-x86_64/irqflags.h
===================================================================
--- linux-2.6.20-x64.orig/include/asm-x86_64/irqflags.h
+++ linux-2.6.20-x64/include/asm-x86_64/irqflags.h
@@ -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;

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

             reply	other threads:[~2007-04-26 18:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-26 18:41 Jan Kiszka [this message]
2007-04-27 11:39 ` [Adeos-main] [PATCH 5/7] Introduce ipipe_base.h (i386/x86_64) Dmitry Adamushko
2007-04-27 11:51   ` Jan Kiszka
2007-04-27 11:53   ` Dmitry Adamushko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4630F274.5090605@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=adeos-main@gna.org \
    --cc=rpm@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.