Module: xenomai-forge
Branch: master
Commit: 31912dd92b6184673b2dd25c04f384c6f1d05767
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=31912dd92b6184673b2dd25c04f384c6f1d05767

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sun Jan  1 18:48:48 2012 +0100

hal, nucleus: drop useless bits/intr.h indirection

---

 include/asm-arm/bits/Makefile.am      |    1 -
 include/asm-arm/bits/Makefile.in      |    1 -
 include/asm-arm/bits/intr.h           |   33 ---------------
 include/asm-arm/hal.h                 |    2 +
 include/asm-blackfin/bits/Makefile.am |    1 -
 include/asm-blackfin/bits/Makefile.in |    1 -
 include/asm-blackfin/bits/intr.h      |   30 -------------
 include/asm-blackfin/hal.h            |    2 +
 include/asm-generic/bits/Makefile.am  |    1 -
 include/asm-generic/bits/Makefile.in  |    1 -
 include/asm-generic/bits/intr.h       |   74 ---------------------------------
 include/asm-generic/system.h          |    7 +++
 include/asm-nios2/bits/Makefile.am    |    1 -
 include/asm-nios2/bits/Makefile.in    |    1 -
 include/asm-nios2/bits/intr.h         |   33 ---------------
 include/asm-nios2/hal.h               |    6 +++
 include/asm-powerpc/bits/Makefile.am  |    1 -
 include/asm-powerpc/bits/Makefile.in  |    1 -
 include/asm-powerpc/bits/intr.h       |   33 ---------------
 include/asm-powerpc/hal.h             |    1 +
 include/asm-sh/bits/Makefile.am       |    1 -
 include/asm-sh/bits/Makefile.in       |    1 -
 include/asm-sh/bits/intr.h            |   30 -------------
 include/asm-sh/hal.h                  |    1 +
 include/asm-x86/bits/Makefile.am      |    1 -
 include/asm-x86/bits/Makefile.in      |    1 -
 include/asm-x86/bits/intr.h           |   30 -------------
 kernel/cobalt/nucleus/intr.c          |   44 ++++++++++---------
 28 files changed, 42 insertions(+), 298 deletions(-)

diff --git a/include/asm-arm/bits/Makefile.am b/include/asm-arm/bits/Makefile.am
index 4b8d207..1024ba2 100644
--- a/include/asm-arm/bits/Makefile.am
+++ b/include/asm-arm/bits/Makefile.am
@@ -2,7 +2,6 @@ includesubdir = $(includedir)/asm-arm/bits
 
 includesub_HEADERS =   \
        bind.h          \
-       intr.h          \
        pod.h           \
        sched.h         \
        shadow.h        \
diff --git a/include/asm-arm/bits/Makefile.in b/include/asm-arm/bits/Makefile.in
index 6a54cc1..7ef87a9 100644
--- a/include/asm-arm/bits/Makefile.in
+++ b/include/asm-arm/bits/Makefile.in
@@ -243,7 +243,6 @@ top_srcdir = @top_srcdir@
 includesubdir = $(includedir)/asm-arm/bits
 includesub_HEADERS = \
        bind.h          \
-       intr.h          \
        pod.h           \
        sched.h         \
        shadow.h        \
diff --git a/include/asm-arm/bits/intr.h b/include/asm-arm/bits/intr.h
deleted file mode 100644
index 2323169..0000000
--- a/include/asm-arm/bits/intr.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2001,2002,2003,2004 Philippe Gerum <r...@xenomai.org>.
- *
- * ARM port
- *   Copyright (C) 2005 Stelian Pop
- *
- * Xenomai 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; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Xenomai 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 Xenomai; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef _XENO_ASM_ARM_BITS_INTR_H
-#define _XENO_ASM_ARM_BITS_INTR_H
-
-#include <asm-generic/xenomai/bits/intr.h>
-
-static inline void xnarch_relay_tick(void)
-{
-       ipipe_post_irq_root(RTHAL_TIMER_IRQ);
-}
-
-#endif /* !_XENO_ASM_ARM_BITS_INTR_H */
diff --git a/include/asm-arm/hal.h b/include/asm-arm/hal.h
index efeb48b..6a2184a 100644
--- a/include/asm-arm/hal.h
+++ b/include/asm-arm/hal.h
@@ -90,6 +90,8 @@
 #error "Unsupported ARM machine"
 #endif /* CONFIG_ARCH_SA1100 */
 
+#define RTHAL_HOST_TICK_IRQ RTHAL_TIMER_IRQ
+
 typedef unsigned long long rthal_time_t;
 
 #if __LINUX_ARM_ARCH__ < 5
diff --git a/include/asm-blackfin/bits/Makefile.am 
b/include/asm-blackfin/bits/Makefile.am
index d8d7037..dde007b 100644
--- a/include/asm-blackfin/bits/Makefile.am
+++ b/include/asm-blackfin/bits/Makefile.am
@@ -2,7 +2,6 @@ includesubdir = $(includedir)/asm-blackfin/bits
 
 includesub_HEADERS =   \
        bind.h          \
-       intr.h          \
        pod.h           \
        sched.h         \
        shadow.h        \
diff --git a/include/asm-blackfin/bits/Makefile.in 
b/include/asm-blackfin/bits/Makefile.in
index ba2befc..265cdae 100644
--- a/include/asm-blackfin/bits/Makefile.in
+++ b/include/asm-blackfin/bits/Makefile.in
@@ -243,7 +243,6 @@ top_srcdir = @top_srcdir@
 includesubdir = $(includedir)/asm-blackfin/bits
 includesub_HEADERS = \
        bind.h          \
-       intr.h          \
        pod.h           \
        sched.h         \
        shadow.h        \
diff --git a/include/asm-blackfin/bits/intr.h b/include/asm-blackfin/bits/intr.h
deleted file mode 100644
index d7458f4..0000000
--- a/include/asm-blackfin/bits/intr.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2005 Philippe Gerum <r...@xenomai.org>.
- *
- * Xenomai 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; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Xenomai 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 Xenomai; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef _XENO_ASM_BLACKFIN_BITS_INTR_H
-#define _XENO_ASM_BLACKFIN_BITS_INTR_H
-
-#include <asm-generic/xenomai/bits/intr.h>
-
-static inline void xnarch_relay_tick(void)
-{
-       ipipe_post_irq_root(RTHAL_TIMER_IRQ);
-}
-
-#endif /* !_XENO_ASM_BLACKFIN_BITS_INTR_H */
diff --git a/include/asm-blackfin/hal.h b/include/asm-blackfin/hal.h
index 8cc8dce..1887497 100644
--- a/include/asm-blackfin/hal.h
+++ b/include/asm-blackfin/hal.h
@@ -48,6 +48,8 @@ static inline __attribute_const__ unsigned long ffnz(unsigned 
long ul)
 #include <asm/xenomai/atomic.h>
 
 #define RTHAL_TIMER_IRQ                IRQ_CORETMR
+#define RTHAL_HOST_TICK_IRQ    RTHAL_TIMER_IRQ
+
 /* The NMI watchdog timer is clocked by the system clock. */
 #define RTHAL_NMICLK_FREQ      get_sclk()
 
diff --git a/include/asm-generic/bits/Makefile.am 
b/include/asm-generic/bits/Makefile.am
index 267c297..786b122 100644
--- a/include/asm-generic/bits/Makefile.am
+++ b/include/asm-generic/bits/Makefile.am
@@ -3,7 +3,6 @@ includesubdir = $(includedir)/asm-generic/bits
 includesub_HEADERS = \
        bind.h \
        current.h \
-       intr.h \
        pod.h \
        sigshadow.h \
        timeconv.h
diff --git a/include/asm-generic/bits/Makefile.in 
b/include/asm-generic/bits/Makefile.in
index 480c123..93cc8fb 100644
--- a/include/asm-generic/bits/Makefile.in
+++ b/include/asm-generic/bits/Makefile.in
@@ -244,7 +244,6 @@ includesubdir = $(includedir)/asm-generic/bits
 includesub_HEADERS = \
        bind.h \
        current.h \
-       intr.h \
        pod.h \
        sigshadow.h \
        timeconv.h
diff --git a/include/asm-generic/bits/intr.h b/include/asm-generic/bits/intr.h
deleted file mode 100644
index 8e9dea0..0000000
--- a/include/asm-generic/bits/intr.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright(C) 2001,2002,2003,2004,2005 Philippe Gerum <r...@xenomai.org>.
- *
- * Xenomai 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; either version 2 of the License, or
- *(at your option) any later version.
- *
- * Xenomai 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 Xenomai; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef _XENO_ASM_GENERIC_BITS_INTR_H
-#define _XENO_ASM_GENERIC_BITS_INTR_H
-
-#ifndef __KERNEL__
-#error "Pure kernel header included from user-space!"
-#endif
-
-static inline int xnarch_hook_irq(unsigned int irq,
-                                 ipipe_irq_handler_t handler,
-                                 ipipe_irq_ackfn_t ackfn,
-                                 void *cookie)
-{
-       return ipipe_request_irq(&rthal_archdata.domain,
-                                irq, handler, cookie, ackfn);
-}
-
-static inline void xnarch_release_irq(unsigned int irq)
-{
-       ipipe_free_irq(&rthal_archdata.domain, irq);
-}
-
-static inline void xnarch_enable_irq(unsigned int irq)
-{
-       ipipe_enable_irq(irq);
-}
-
-static inline void xnarch_disable_irq(unsigned int irq)
-{
-       ipipe_disable_irq(irq);
-}
-
-static inline void xnarch_end_irq(unsigned int irq)
-{
-       ipipe_end_irq(irq);
-}
-
-static inline void xnarch_chain_irq(unsigned int irq)
-{
-       ipipe_post_irq_root(irq);
-}
-
-static inline void xnarch_set_irq_affinity(unsigned int irq,
-                                          xnarch_cpumask_t affinity)
-{
-#ifdef CONFIG_SMP
-       ipipe_set_irq_affinity(irq, affinity);
-#endif
-}
-
-static inline void *xnarch_get_irq_cookie(unsigned int irq)
-{
-       return __ipipe_irq_cookie(&rthal_archdata.domain, irq);
-}
-
-#endif /* !_XENO_ASM_GENERIC_BITS_INTR_H */
diff --git a/include/asm-generic/system.h b/include/asm-generic/system.h
index 3d1c61b..4d4097a 100644
--- a/include/asm-generic/system.h
+++ b/include/asm-generic/system.h
@@ -350,6 +350,13 @@ static inline int xnarch_send_ipi (xnarch_cpumask_t 
cpumask)
 
 #endif /* !(CONFIG_SMP || XENO_DEBUG(XNLOCK)) */
 
+static inline void xnarch_relay_tick(void)
+{
+#ifdef RTHAL_HOST_TICK_IRQ
+       ipipe_post_irq_root(RTHAL_HOST_TICK_IRQ);
+#endif
+}
+
 #define xnlock_sync_irq(lock, x)                       \
        do {                                            \
                xnlock_put_irqrestore(lock, x);         \
diff --git a/include/asm-nios2/bits/Makefile.am 
b/include/asm-nios2/bits/Makefile.am
index f0b663a..776b0ce 100644
--- a/include/asm-nios2/bits/Makefile.am
+++ b/include/asm-nios2/bits/Makefile.am
@@ -2,7 +2,6 @@ includesubdir = $(includedir)/asm-nios2/bits
 
 includesub_HEADERS =   \
        bind.h          \
-       intr.h          \
        pod.h           \
        sched.h         \
        shadow.h        \
diff --git a/include/asm-nios2/bits/Makefile.in 
b/include/asm-nios2/bits/Makefile.in
index 2e25915..57592c3 100644
--- a/include/asm-nios2/bits/Makefile.in
+++ b/include/asm-nios2/bits/Makefile.in
@@ -243,7 +243,6 @@ top_srcdir = @top_srcdir@
 includesubdir = $(includedir)/asm-nios2/bits
 includesub_HEADERS = \
        bind.h          \
-       intr.h          \
        pod.h           \
        sched.h         \
        shadow.h        \
diff --git a/include/asm-nios2/bits/intr.h b/include/asm-nios2/bits/intr.h
deleted file mode 100644
index 3871815..0000000
--- a/include/asm-nios2/bits/intr.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2009 Philippe Gerum <r...@xenomai.org>.
- *
- * Xenomai 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; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Xenomai 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 Xenomai; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef _XENO_ASM_NIOS2_BITS_INTR_H
-#define _XENO_ASM_NIOS2_BITS_INTR_H
-
-#include <asm-generic/xenomai/bits/intr.h>
-
-static inline void xnarch_relay_tick(void)
-{
-       /*
-        * We have a dedicated timer on this arch, so no need for
-        * piggybacking the kernel timer.
-        */
-}
-
-#endif /* !_XENO_ASM_NIOS2_BITS_INTR_H */
diff --git a/include/asm-nios2/hal.h b/include/asm-nios2/hal.h
index 2b75fad..f4b5875 100644
--- a/include/asm-nios2/hal.h
+++ b/include/asm-nios2/hal.h
@@ -39,6 +39,12 @@
 
 #include <asm-generic/xenomai/hal.h>   /* Read the generic bits. */
 
+/*
+ * We have a dedicated timer on this arch, so no need for
+ * piggybacking the kernel timer.
+ */
+#undef RTHAL_HOST_TICK_IRQ
+
 typedef unsigned long long rthal_time_t;
 
 static inline __attribute_const__ unsigned long ffnz(unsigned long ul)
diff --git a/include/asm-powerpc/bits/Makefile.am 
b/include/asm-powerpc/bits/Makefile.am
index 2ebc3da..708d5ce 100644
--- a/include/asm-powerpc/bits/Makefile.am
+++ b/include/asm-powerpc/bits/Makefile.am
@@ -2,7 +2,6 @@ includesubdir = $(includedir)/asm-powerpc/bits
 
 includesub_HEADERS =   \
        bind.h          \
-       intr.h          \
        pod.h           \
        sched.h         \
        shadow.h        \
diff --git a/include/asm-powerpc/bits/Makefile.in 
b/include/asm-powerpc/bits/Makefile.in
index 9df428b..de4407d 100644
--- a/include/asm-powerpc/bits/Makefile.in
+++ b/include/asm-powerpc/bits/Makefile.in
@@ -243,7 +243,6 @@ top_srcdir = @top_srcdir@
 includesubdir = $(includedir)/asm-powerpc/bits
 includesub_HEADERS = \
        bind.h          \
-       intr.h          \
        pod.h           \
        sched.h         \
        shadow.h        \
diff --git a/include/asm-powerpc/bits/intr.h b/include/asm-powerpc/bits/intr.h
deleted file mode 100644
index b6f33fc..0000000
--- a/include/asm-powerpc/bits/intr.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2001,2002,2003,2004 Philippe Gerum <r...@xenomai.org>.
- *
- * 64-bit PowerPC adoption
- *   copyright (C) 2005 Taneli Vähäkangas and Heikki Lindholm
- *
- * Xenomai 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; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Xenomai 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 Xenomai; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef _XENO_ASM_POWERPC_BITS_INTR_H
-#define _XENO_ASM_POWERPC_BITS_INTR_H
-
-#include <asm-generic/xenomai/bits/intr.h>
-
-static inline void xnarch_relay_tick(void)
-{
-       ipipe_post_irq_root(RTHAL_TIMER_IRQ);
-}
-
-#endif /* !_XENO_ASM_POWERPC_BITS_INTR_H */
diff --git a/include/asm-powerpc/hal.h b/include/asm-powerpc/hal.h
index d1e90fd..f39e968 100644
--- a/include/asm-powerpc/hal.h
+++ b/include/asm-powerpc/hal.h
@@ -61,6 +61,7 @@ static inline __attribute_const__ unsigned long ffnz(unsigned 
long ul)
 #define RTHAL_TIMER_IPI                IPIPE_SERVICE_IPI3
 #define RTHAL_HOST_TIMER_IPI   IPIPE_SERVICE_IPI4
 #endif /* CONFIG_SMP */
+#define RTHAL_HOST_TICK_IRQ    RTHAL_TIMER_IRQ
 
 #define DECREMENTER_MAX                0x7fffffff
 
diff --git a/include/asm-sh/bits/Makefile.am b/include/asm-sh/bits/Makefile.am
index bcbf85d..4f3038e 100644
--- a/include/asm-sh/bits/Makefile.am
+++ b/include/asm-sh/bits/Makefile.am
@@ -2,7 +2,6 @@ includesubdir = $(includedir)/asm-sh/bits
 
 includesub_HEADERS =   \
        bind.h          \
-       intr.h          \
        pod.h           \
        sched.h         \
        shadow.h        \
diff --git a/include/asm-sh/bits/Makefile.in b/include/asm-sh/bits/Makefile.in
index f501623..ed36ec9 100644
--- a/include/asm-sh/bits/Makefile.in
+++ b/include/asm-sh/bits/Makefile.in
@@ -243,7 +243,6 @@ top_srcdir = @top_srcdir@
 includesubdir = $(includedir)/asm-sh/bits
 includesub_HEADERS = \
        bind.h          \
-       intr.h          \
        pod.h           \
        sched.h         \
        shadow.h        \
diff --git a/include/asm-sh/bits/intr.h b/include/asm-sh/bits/intr.h
deleted file mode 100644
index 4fee352..0000000
--- a/include/asm-sh/bits/intr.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2011 Philippe Gerum <r...@xenomai.org>.
- *
- * Xenomai 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; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Xenomai 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 Xenomai; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef _XENO_ASM_SH_BITS_INTR_H
-#define _XENO_ASM_SH_BITS_INTR_H
-
-#include <asm-generic/xenomai/bits/intr.h>
-
-static inline void xnarch_relay_tick(void)
-{
-       ipipe_post_irq_root(RTHAL_TIMER_IRQ);
-}
-
-#endif /* !_XENO_ASM_SH_BITS_INTR_H */
diff --git a/include/asm-sh/hal.h b/include/asm-sh/hal.h
index cb00f4e..8912111 100644
--- a/include/asm-sh/hal.h
+++ b/include/asm-sh/hal.h
@@ -33,6 +33,7 @@
 #define RTHAL_ARCH_NAME                "SuperH"
 #define RTHAL_TIMER_DEVICE     "TMU0"
 #define RTHAL_TIMER_IRQ                __ipipe_hrtimer_irq
+#define RTHAL_HOST_TICK_IRQ    RTHAL_TIMER_IRQ
 #define RTHAL_CLOCK_DEVICE     "TMU1"
 #define RTHAL_CLOCK_MEMBASE     __pa(__ipipe_tsc)
 
diff --git a/include/asm-x86/bits/Makefile.am b/include/asm-x86/bits/Makefile.am
index 1a4011c..c3eb2ba 100644
--- a/include/asm-x86/bits/Makefile.am
+++ b/include/asm-x86/bits/Makefile.am
@@ -2,7 +2,6 @@ includesubdir = $(includedir)/asm-x86/bits
 
 includesub_HEADERS =   \
        bind.h          \
-       intr.h          \
        pod_32.h        \
        pod_64.h        \
        pod.h           \
diff --git a/include/asm-x86/bits/Makefile.in b/include/asm-x86/bits/Makefile.in
index cc56e35..7b41db3 100644
--- a/include/asm-x86/bits/Makefile.in
+++ b/include/asm-x86/bits/Makefile.in
@@ -243,7 +243,6 @@ top_srcdir = @top_srcdir@
 includesubdir = $(includedir)/asm-x86/bits
 includesub_HEADERS = \
        bind.h          \
-       intr.h          \
        pod_32.h        \
        pod_64.h        \
        pod.h           \
diff --git a/include/asm-x86/bits/intr.h b/include/asm-x86/bits/intr.h
deleted file mode 100644
index 84d181c..0000000
--- a/include/asm-x86/bits/intr.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2001,2002,2003 Philippe Gerum <r...@xenomai.org>.
- *
- * Xenomai 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; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Xenomai 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 Xenomai; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef _XENO_ASM_X86_BITS_INTR_H
-#define _XENO_ASM_X86_BITS_INTR_H
-
-#include <asm-generic/xenomai/bits/intr.h>
-
-static inline void xnarch_relay_tick(void)
-{
-       ipipe_post_irq_root(RTHAL_HOST_TICK_IRQ);
-}
-
-#endif /* !_XENO_ASM_X86_BITS_INTR_H */
diff --git a/kernel/cobalt/nucleus/intr.c b/kernel/cobalt/nucleus/intr.c
index 432b44c..2ac46e7 100644
--- a/kernel/cobalt/nucleus/intr.c
+++ b/kernel/cobalt/nucleus/intr.c
@@ -35,7 +35,6 @@
 #include <nucleus/pod.h>
 #include <nucleus/intr.h>
 #include <nucleus/stat.h>
-#include <asm/xenomai/bits/intr.h>
 
 #define XNINTR_MAX_UNHANDLED   1000
 
@@ -211,9 +210,9 @@ static void xnintr_shirq_handler(unsigned irq, void *cookie)
                shirq->unhandled = 0;
 
        if (s & XN_ISR_PROPAGATE)
-               xnarch_chain_irq(irq);
+               ipipe_post_irq_root(irq);
        else if (!(s & XN_ISR_NOENABLE))
-               xnarch_end_irq(irq);
+               ipipe_end_irq(irq);
 
        xnstat_exectime_switch(sched, prev);
 
@@ -295,9 +294,9 @@ static void xnintr_edge_shirq_handler(unsigned irq, void 
*cookie)
                shirq->unhandled = 0;
 
        if (s & XN_ISR_PROPAGATE)
-               xnarch_chain_irq(irq);
+               ipipe_post_irq_root(irq);
        else if (!(s & XN_ISR_NOENABLE))
-               xnarch_end_irq(irq);
+               ipipe_end_irq(irq);
 
        xnstat_exectime_switch(sched, prev);
 
@@ -341,8 +340,8 @@ static inline int xnintr_irq_attach(xnintr_t *intr)
                }
                shirq->unhandled = 0;
 
-               err = xnarch_hook_irq(intr->irq, handler,
-                                     (ipipe_irq_ackfn_t)intr->iack, intr);
+               err = ipipe_request_irq(&rthal_archdata.domain,
+                                       intr->irq, handler, intr, 
(ipipe_irq_ackfn_t)intr->iack);
                if (err)
                        return err;
        }
@@ -372,7 +371,7 @@ static inline void xnintr_irq_detach(xnintr_t *intr)
 
                        /* Release the IRQ line if this was the last user */
                        if (shirq->handlers == NULL)
-                               xnarch_release_irq(intr->irq);
+                               ipipe_free_irq(&rthal_archdata.domain, 
intr->irq);
 
                        return;
                }
@@ -395,9 +394,9 @@ typedef struct xnintr_irq {
 static xnintr_irq_t xnirqs[XNARCH_NR_IRQS];
 #endif /* CONFIG_SMP || XENO_DEBUG(XNLOCK) */
 
-static inline xnintr_t *xnintr_shirq_first(unsigned irq)
+static inline xnintr_t *xnintr_shirq_first(unsigned int irq)
 {
-       return xnarch_get_irq_cookie(irq);
+       return __ipipe_irq_cookie(&rthal_archdata.domain, irq);
 }
 
 static inline xnintr_t *xnintr_shirq_next(xnintr_t *prev)
@@ -407,8 +406,9 @@ static inline xnintr_t *xnintr_shirq_next(xnintr_t *prev)
 
 static inline int xnintr_irq_attach(xnintr_t *intr)
 {
-       return xnarch_hook_irq(intr->irq, &xnintr_irq_handler,
-                              (ipipe_irq_ackfn_t)intr->iack, intr);
+       return ipipe_request_irq(&rthal_archdata.domain,
+                                intr->irq, xnintr_irq_handler, intr,
+                                (ipipe_irq_ackfn_t)intr->iack);
 }
 
 static inline void xnintr_irq_detach(xnintr_t *intr)
@@ -416,7 +416,7 @@ static inline void xnintr_irq_detach(xnintr_t *intr)
        int irq = intr->irq;
 
        xnlock_get(&xnirqs[irq].lock);
-       xnarch_release_irq(irq);
+       ipipe_free_irq(&rthal_archdata.domain, irq);
        xnlock_put(&xnirqs[irq].lock);
 
        xnintr_sync_stat_references(intr);
@@ -453,7 +453,7 @@ static void xnintr_irq_handler(unsigned irq, void *cookie)
         * interrupt service routine, so the scheduler pointer will
         * remain valid throughout this function.
         */
-       intr = xnarch_get_irq_cookie(irq);
+       intr = __ipipe_irq_cookie(&rthal_archdata.domain, irq);
        if (unlikely(!intr)) {
                s = 0;
                goto unlock_and_exit;
@@ -483,9 +483,9 @@ static void xnintr_irq_handler(unsigned irq, void *cookie)
        xnlock_put(&xnirqs[irq].lock);
 
        if (s & XN_ISR_PROPAGATE)
-               xnarch_chain_irq(irq);
+               ipipe_post_irq_root(irq);
        else if (!(s & XN_ISR_NOENABLE))
-               xnarch_end_irq(irq);
+               ipipe_end_irq(irq);
 
        xnstat_exectime_switch(sched, prev);
 
@@ -537,7 +537,7 @@ int __init xnintr_mount(void)
  *
  * - XN_ISR_NOENABLE causes the nucleus to ask the real-time control
  * layer _not_ to re-enable the IRQ line (read the following section).
- * xnarch_end_irq() must be called to re-enable the IRQ line later.
+ * ipipe_end_irq() must be called to re-enable the IRQ line later.
  *
  * - XN_ISR_PROPAGATE tells the nucleus to require the real-time
  * control layer to forward the IRQ. For instance, this would cause
@@ -714,7 +714,7 @@ int xnintr_attach(xnintr_t *intr, void *cookie)
        memset(&intr->stat, 0, sizeof(intr->stat));
 
 #ifdef CONFIG_SMP
-       xnarch_set_irq_affinity(intr->irq, nkaffinity);
+       ipipe_set_irq_affinity(intr->irq, nkaffinity);
 #endif /* CONFIG_SMP */
 
        xnlock_get_irqsave(&intrlock, s);
@@ -819,7 +819,7 @@ void xnintr_enable(xnintr_t *intr)
 {
        trace_mark(xn_nucleus, irq_enable, "irq %u", intr->irq);
 
-       xnarch_enable_irq(intr->irq);
+       ipipe_enable_irq(intr->irq);
 }
 EXPORT_SYMBOL_GPL(xnintr_enable);
 
@@ -848,7 +848,7 @@ void xnintr_disable(xnintr_t *intr)
 {
        trace_mark(xn_nucleus, irq_disable, "irq %u", intr->irq);
 
-       xnarch_disable_irq(intr->irq);
+       ipipe_disable_irq(intr->irq);
 }
 EXPORT_SYMBOL_GPL(xnintr_disable);
 
@@ -873,7 +873,9 @@ void xnintr_affinity(xnintr_t *intr, xnarch_cpumask_t 
cpumask)
        trace_mark(xn_nucleus, irq_affinity, "irq %u %lu",
                   intr->irq, *(unsigned long *)&cpumask);
 
-       xnarch_set_irq_affinity(intr->irq, cpumask);
+#ifdef CONFIG_SMP
+       ipipe_set_irq_affinity(intr->irq, cpumask);
+#endif
 }
 EXPORT_SYMBOL_GPL(xnintr_affinity);
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to