Module: xenomai-3 Branch: next Commit: c58fe890afd12b9833837ac1cd1190435352d95e URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=c58fe890afd12b9833837ac1cd1190435352d95e
Author: Philippe Gerum <r...@xenomai.org> Date: Mon May 21 12:42:46 2018 +0200 blackfin: drop architecture support The blackfin architecture is not supported by the mainline kernel anymore since 4.17, and no concerned user showed up, willing to help in maintaining this Xenomai port. --- configure.ac | 8 -- doc/asciidoc/README.INSTALL.adoc | 43 -------- doc/asciidoc/TROUBLESHOOTING.COBALT.adoc | 2 +- kernel/cobalt/arch/blackfin/Kconfig | 8 -- kernel/cobalt/arch/blackfin/Makefile | 5 - kernel/cobalt/arch/blackfin/README | 3 - .../blackfin/include/asm/xenomai/calibration.h | 56 ---------- .../arch/blackfin/include/asm/xenomai/features.h | 27 ----- .../arch/blackfin/include/asm/xenomai/fptest.h | 44 -------- .../arch/blackfin/include/asm/xenomai/machine.h | 36 ------- .../arch/blackfin/include/asm/xenomai/syscall.h | 70 ------------ .../arch/blackfin/include/asm/xenomai/syscall32.h | 24 ----- .../arch/blackfin/include/asm/xenomai/thread.h | 69 ------------ .../arch/blackfin/include/asm/xenomai/uapi/arith.h | 43 -------- .../blackfin/include/asm/xenomai/uapi/features.h | 40 ------- .../blackfin/include/asm/xenomai/uapi/fptest.h | 31 ------ .../blackfin/include/asm/xenomai/uapi/syscall.h | 29 ----- .../arch/blackfin/include/asm/xenomai/wrappers.h | 27 ----- kernel/cobalt/arch/blackfin/machine.c | 90 ---------------- kernel/cobalt/arch/blackfin/mayday.c | 112 -------------------- kernel/cobalt/arch/blackfin/switch.S | 98 ----------------- kernel/cobalt/arch/blackfin/syscall.c | 41 ------- kernel/cobalt/arch/blackfin/thread.c | 106 ------------------ lib/cobalt/arch/Makefile.am | 2 +- lib/cobalt/arch/blackfin/Makefile.am | 13 --- lib/cobalt/arch/blackfin/features.c | 24 ----- lib/cobalt/arch/blackfin/include/Makefile.am | 2 - lib/cobalt/arch/blackfin/include/asm/Makefile.am | 2 - .../arch/blackfin/include/asm/xenomai/Makefile.am | 5 - .../arch/blackfin/include/asm/xenomai/features.h | 30 ------ .../arch/blackfin/include/asm/xenomai/syscall.h | 58 ---------- lib/cobalt/arch/blackfin/include/asm/xenomai/tsc.h | 44 -------- scripts/prepare-kernel.sh | 3 - 33 files changed, 2 insertions(+), 1193 deletions(-) diff --git a/configure.ac b/configure.ac index 6c94301..a6b1200 100644 --- a/configure.ac +++ b/configure.ac @@ -131,10 +131,6 @@ case "$build_for" in target_cpu_arch=powerpc CONFIG_XENO_DEFAULT_PERIOD=100000 ;; - bfin-*|bfinnommu-*|blackfin-*) - target_cpu_arch=blackfin - CONFIG_XENO_DEFAULT_PERIOD=100000 - ;; arm*-*) target_cpu_arch=arm CONFIG_XENO_DEFAULT_PERIOD=1000000 @@ -928,10 +924,6 @@ AC_CONFIG_FILES([ \ lib/cobalt/arch/powerpc/include/Makefile \ lib/cobalt/arch/powerpc/include/asm/Makefile \ lib/cobalt/arch/powerpc/include/asm/xenomai/Makefile \ - lib/cobalt/arch/blackfin/Makefile \ - lib/cobalt/arch/blackfin/include/Makefile \ - lib/cobalt/arch/blackfin/include/asm/Makefile \ - lib/cobalt/arch/blackfin/include/asm/xenomai/Makefile \ lib/cobalt/arch/x86/Makefile \ lib/cobalt/arch/x86/include/Makefile \ lib/cobalt/arch/x86/include/asm/Makefile \ diff --git a/doc/asciidoc/README.INSTALL.adoc b/doc/asciidoc/README.INSTALL.adoc index d32d710..4fe6867 100644 --- a/doc/asciidoc/README.INSTALL.adoc +++ b/doc/asciidoc/README.INSTALL.adoc @@ -119,7 +119,6 @@ In order to cross-compile the Linux kernel, pass an ARCH and CROSS_COMPILE variable on make command line. See sections <<cobalt-core-arm,"Building a _Cobalt/arm_ kernel">>, <<cobalt-core-powerpc,"Building a _Cobalt/powerpc_ kernel">>, -<<cobalt-core-blackfin,"Building a _Cobalt/blackfin_ kernel">>, <<cobalt-core-x86,"Building a _Cobalt/x86_ kernel">>, for examples. @@ -268,27 +267,6 @@ $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux- uImage modules ------------------------------------------------------------------------------ ...manually install the kernel image and modules to the proper location -[[cobalt-core-blackfin]] -Building a _Cobalt/blackfin_ kernel -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The Blackfin is a MMU-less, DSP-type architecture running uClinux. - ------------------------------------------------------------------------------- -$ cd $linux_tree -$ $xenomai_root/scripts/prepare-kernel.sh --arch=blackfin \ - --ipipe=ipipe-core-X.Y.Z-x86-NN.patch -$ make ARCH=blackfin CROSS_COMPILE=bfin-uclinux- xconfig/gconfig/menuconfig ------------------------------------------------------------------------------- -...select the kernel and Xenomai options, then compile with: ------------------------------------------------------------------------------- -$ make linux image ------------------------------------------------------------------------------- -...then install as needed ------------------------------------------------------------------------------- -$ cp images/linux /tftpboot/... ------------------------------------------------------------------------------- - [[cobalt-core-arm]] Building _Cobalt/arm_ kernel ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -794,27 +772,6 @@ $ make DESTDIR=$staging_dir install ------------------------------------------------------------------------------ -Building the Blackfin libraries -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Another cross-compilation setup, in order to build the _Cobalt_ -libraries for the Blackfin architecture. We use -http://blackfin.uclinux.org/doku.php?id=toolchain:installing[ADI's -toolchain] for this purpose: - ------------------------------------------------------------------------------- -$ mkdir $build_root && cd $build_root -$ $xenomai_root/configure --host=bfin-linux-uclibc --with-core=cobalt -$ make DESTDIR=$staging_dir install ------------------------------------------------------------------------------- - -[NOTE] -Xenomai uses the FDPIC shared library format on this architecture. In -case of problem running the testsuite, try restarting the last two -build steps, passing the `--disable-shared` option to the "configure" -script. - - Building the ARM libraries ~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/asciidoc/TROUBLESHOOTING.COBALT.adoc b/doc/asciidoc/TROUBLESHOOTING.COBALT.adoc index 117db9f..db5673a 100644 --- a/doc/asciidoc/TROUBLESHOOTING.COBALT.adoc +++ b/doc/asciidoc/TROUBLESHOOTING.COBALT.adoc @@ -45,7 +45,7 @@ pathologically high latencies. This means that the kernel crashes before the console is enabled. You should enable the +CONFIG_EARLY_PRINTK+ option. For some architectures -(blackfin, x86, arm), enabling this option also requires passing the +(x86, arm), enabling this option also requires passing the +earlyprintk+ parameter on the kernel command line. See 'Documentation/kernel-parameters.txt' for possible values. diff --git a/kernel/cobalt/arch/blackfin/Kconfig b/kernel/cobalt/arch/blackfin/Kconfig deleted file mode 100644 index 1ca0278..0000000 --- a/kernel/cobalt/arch/blackfin/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -config XENO_ARCH_FPU - def_bool n - -config XENO_ARCH_SYS3264 - def_bool n - -source "kernel/xenomai/Kconfig" -source "drivers/xenomai/Kconfig" diff --git a/kernel/cobalt/arch/blackfin/Makefile b/kernel/cobalt/arch/blackfin/Makefile deleted file mode 100644 index 8ef7e23..0000000 --- a/kernel/cobalt/arch/blackfin/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -obj-$(CONFIG_XENOMAI) += xenomai.o - -xenomai-y := machine.o mayday.o thread.o switch.o syscall.o - -ccflags-y := -Iarch/blackfin/xenomai/include -Iinclude/xenomai diff --git a/kernel/cobalt/arch/blackfin/README b/kernel/cobalt/arch/blackfin/README deleted file mode 100644 index 80f954a..0000000 --- a/kernel/cobalt/arch/blackfin/README +++ /dev/null @@ -1,3 +0,0 @@ -Get the interrupt pipeline code for the target kernel from -http://xenomai.org/downloads/ipipe/, or -git://git.xenomai.org/ipipe.git diff --git a/kernel/cobalt/arch/blackfin/include/asm/xenomai/calibration.h b/kernel/cobalt/arch/blackfin/include/asm/xenomai/calibration.h deleted file mode 100644 index 08895e8..0000000 --- a/kernel/cobalt/arch/blackfin/include/asm/xenomai/calibration.h +++ /dev/null @@ -1,56 +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 _COBALT_BLACKFIN_ASM_CALIBRATION_H -#define _COBALT_BLACKFIN_ASM_CALIBRATION_H - -static inline void xnarch_get_latencies(struct xnclock_gravity *p) -{ -#if CONFIG_XENO_OPT_TIMING_SCHEDLAT != 0 -#define __sched_latency CONFIG_XENO_OPT_TIMING_SCHEDLAT -#elif defined(CONFIG_BF533) -#define __sched_latency 5000 -#elif defined(CONFIG_BF537) -#define __sched_latency 4800 -#elif defined(CONFIG_BF53x) -#define __sched_latency 5000 -#elif defined(CONFIG_BF538) -#define __sched_latency 5000 -#elif defined(CONFIG_BF561) -#define __sched_latency 4500 -#elif defined(CONFIG_BF609) -#define __sched_latency 5500 -#elif defined(CONFIG_BF54x) -#define __sched_latency 5000 -#elif defined(CONFIG_BF52x) -#define __sched_latency 7000 -#elif defined(CONFIG_BF51x) -#define __sched_latency 6000 -#elif defined(CONFIG_BF60x) -#define __sched_latency 5500 -#else -#error "unsupported Blackfin processor" -#endif - p->user = __sched_latency; - p->kernel = CONFIG_XENO_OPT_TIMING_KSCHEDLAT; - p->irq = CONFIG_XENO_OPT_TIMING_IRQLAT; -} - -#undef __sched_latency - -#endif /* !_COBALT_BLACKFIN_ASM_CALIBRATION_H */ diff --git a/kernel/cobalt/arch/blackfin/include/asm/xenomai/features.h b/kernel/cobalt/arch/blackfin/include/asm/xenomai/features.h deleted file mode 100644 index 9f0ebea..0000000 --- a/kernel/cobalt/arch/blackfin/include/asm/xenomai/features.h +++ /dev/null @@ -1,27 +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 _COBALT_BLACKFIN_ASM_FEATURES_H -#define _COBALT_BLACKFIN_ASM_FEATURES_H - -struct cobalt_featinfo; -static inline void collect_arch_features(struct cobalt_featinfo *p) { } - -#include <asm/xenomai/uapi/features.h> - -#endif /* !_COBALT_BLACKFIN_ASM_FEATURES_H */ diff --git a/kernel/cobalt/arch/blackfin/include/asm/xenomai/fptest.h b/kernel/cobalt/arch/blackfin/include/asm/xenomai/fptest.h deleted file mode 100644 index 904ce83..0000000 --- a/kernel/cobalt/arch/blackfin/include/asm/xenomai/fptest.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2006 Gilles Chanteperdrix <gilles.chanteperd...@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 _COBALT_BLACKFIN_ASM_FPTEST_H -#define _COBALT_BLACKFIN_ASM_FPTEST_H - -#include <linux/errno.h> -#include <asm/xenomai/uapi/fptest.h> - -static inline int fp_kernel_supported(void) -{ - return 0; -} - -static inline int fp_linux_begin(void) -{ - return -ENOSYS; -} - -static inline void fp_linux_end(void) -{ -} - -static inline int fp_detect(void) -{ - return 0; -} - -#endif /* _COBALT_BLACKFIN_ASM_FPTEST_H */ diff --git a/kernel/cobalt/arch/blackfin/include/asm/xenomai/machine.h b/kernel/cobalt/arch/blackfin/include/asm/xenomai/machine.h deleted file mode 100644 index 8e3c03a..0000000 --- a/kernel/cobalt/arch/blackfin/include/asm/xenomai/machine.h +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright © 2005 Philippe Gerum. - * - * 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, Inc., 675 Mass Ave, - * Cambridge MA 02139, USA; 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 _COBALT_BLACKFIN_ASM_MACHINE_H -#define _COBALT_BLACKFIN_ASM_MACHINE_H - -#include <linux/compiler.h> -#include <linux/linkage.h> -#include <linux/bitops.h> - -#define XNARCH_HOST_TICK_IRQ __ipipe_hrtimer_irq - -static inline __attribute_const__ unsigned long ffnz(unsigned long ul) -{ - return ffs(ul) - 1; -} - -#include <asm-generic/xenomai/machine.h> - -#endif /* !_COBALT_BLACKFIN_ASM_MACHINE_H */ diff --git a/kernel/cobalt/arch/blackfin/include/asm/xenomai/syscall.h b/kernel/cobalt/arch/blackfin/include/asm/xenomai/syscall.h deleted file mode 100644 index 3e63f29..0000000 --- a/kernel/cobalt/arch/blackfin/include/asm/xenomai/syscall.h +++ /dev/null @@ -1,70 +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 _COBALT_BLACKFIN_ASM_SYSCALL_H -#define _COBALT_BLACKFIN_ASM_SYSCALL_H - -#include <linux/errno.h> -#include <asm/ptrace.h> -#include <asm-generic/xenomai/syscall.h> - -/* - * Cobalt and Linux syscall numbers can be fetched from P0, masking - * out the __COBALT_SYSCALL_BIT marker. - */ -#define __xn_reg_sys(__regs) ((__regs)->orig_p0) -#define __xn_syscall_p(__regs) (__xn_reg_sys(__regs) & __COBALT_SYSCALL_BIT) -#define __xn_syscall(__regs) (__xn_reg_sys(__regs) & ~__COBALT_SYSCALL_BIT) - -#define __xn_reg_rval(__regs) ((__regs)->r0) -#define __xn_reg_arg1(__regs) ((__regs)->r0) -#define __xn_reg_arg2(__regs) ((__regs)->r1) -#define __xn_reg_arg3(__regs) ((__regs)->r2) -#define __xn_reg_arg4(__regs) ((__regs)->r3) -#define __xn_reg_arg5(__regs) ((__regs)->r4) - -/* - * Root syscall number with predicate (valid only if - * !__xn_syscall_p(__regs)). - */ -#define __xn_rootcall_p(__regs, __code) \ - ({ \ - *(__code) = __xn_syscall(__regs); \ - *(__code) < NR_syscalls; \ - }) - -static inline void __xn_error_return(struct pt_regs *regs, int v) -{ - __xn_reg_rval(regs) = v; -} - -static inline void __xn_status_return(struct pt_regs *regs, long v) -{ - __xn_reg_rval(regs) = v; -} - -static inline int __xn_interrupted_p(struct pt_regs *regs) -{ - return __xn_reg_rval(regs) == -EINTR; -} - -int xnarch_local_syscall(unsigned long a1, unsigned long a2, - unsigned long a3, unsigned long a4, - unsigned long a5); - -#endif /* !_COBALT_BLACKFIN_ASM_SYSCALL_H */ diff --git a/kernel/cobalt/arch/blackfin/include/asm/xenomai/syscall32.h b/kernel/cobalt/arch/blackfin/include/asm/xenomai/syscall32.h deleted file mode 100644 index 651aef8..0000000 --- a/kernel/cobalt/arch/blackfin/include/asm/xenomai/syscall32.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2014 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 _COBALT_BLACKFIN_ASM_SYSCALL32_H -#define _COBALT_BLACKFIN_ASM_SYSCALL32_H - -#include <asm-generic/xenomai/syscall32.h> - -#endif /* !_COBALT_BLACKFIN_ASM_SYSCALL32_H */ diff --git a/kernel/cobalt/arch/blackfin/include/asm/xenomai/thread.h b/kernel/cobalt/arch/blackfin/include/asm/xenomai/thread.h deleted file mode 100644 index 9956ec5..0000000 --- a/kernel/cobalt/arch/blackfin/include/asm/xenomai/thread.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2005, 2012 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 _COBALT_BLACKFIN_ASM_THREAD_H -#define _COBALT_BLACKFIN_ASM_THREAD_H - -#include <asm-generic/xenomai/thread.h> - -struct xnarchtcb { - struct xntcb core; - struct { - unsigned long pc; - unsigned long p0; - unsigned long r5; - } mayday; -}; - -#define xnarch_fpu_ptr(tcb) NULL - -#define xnarch_fault_regs(d) ((d)->regs) -#define xnarch_fault_trap(d) ((d)->exception) -#define xnarch_fault_code(d) (0) /* None on this arch. */ -#define xnarch_fault_pc(d) ((d)->regs->retx) -#define xnarch_fault_fpu_p(d) (0) /* Can't be. */ - -#define xnarch_fault_pf_p(d) (0) /* No page faults. */ -#define xnarch_fault_bp_p(d) ((current->ptrace & PT_PTRACED) && \ - ((d)->exception == VEC_STEP || \ - (d)->exception == VEC_EXCPT01 || \ - (d)->exception == VEC_WATCH)) - -#define xnarch_fault_notify(d) (!xnarch_fault_bp_p(d)) - -void xnarch_switch_to(struct xnthread *out, struct xnthread *in); - -int xnarch_escalate(void); - -static inline void xnarch_init_root_tcb(struct xnthread *thread) { } -static inline void xnarch_init_shadow_tcb(struct xnthread *thread) { } -static inline void xnarch_enter_root(struct xnthread *root) { } -static inline void xnarch_leave_root(struct xnthread *root) { } -static inline void -xnarch_switch_fpu(struct xnthread *from, struct xnthread *thread) -{ -} - -static inline int -xnarch_handle_fpu_fault(struct xnthread *from, - struct xnthread *to, struct ipipe_trap_data *d) -{ - return 0; -} - -#endif /* !_COBALT_BLACKFIN_ASM_THREAD_H */ diff --git a/kernel/cobalt/arch/blackfin/include/asm/xenomai/uapi/arith.h b/kernel/cobalt/arch/blackfin/include/asm/xenomai/uapi/arith.h deleted file mode 100644 index b8d5cf6..0000000 --- a/kernel/cobalt/arch/blackfin/include/asm/xenomai/uapi/arith.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2008 Philippe Gerum <r...@xenomai.org>. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - */ -#ifndef _COBALT_BLACKFIN_ASM_UAPI_ARITH_H -#define _COBALT_BLACKFIN_ASM_UAPI_ARITH_H - -#include <asm/xenomai/uapi/features.h> - -#define xnarch_add96and64(l0, l1, l2, s0, s1) \ - do { \ - unsigned long cl, ch; \ - __asm__ ("%2 = %2 + %6\n\t" \ - "CC = AC0\n\t" \ - "%3 = CC\n\t" \ - "%1 = %1 + %5\n\t" \ - "CC = AC0\n\t" \ - "%4 = CC\n\t" \ - "%1 = %1 + %3\n\t" \ - "CC = AC0\n\t" \ - "%3 = CC\n\t" \ - "%4 = %4 + %3\n\t" \ - "%0 = %0 + %4\n\t" \ - : "+d"(l0), "+d"(l1), "+d"(l2), "=&d" (cl), "=&d" (ch) \ - : "d"(s0), "d"(s1) : "cc"); \ - } while (0) - -#include <cobalt/uapi/asm-generic/arith.h> - -#endif /* _COBALT_BLACKFIN_ASM_UAPI_ARITH_H */ diff --git a/kernel/cobalt/arch/blackfin/include/asm/xenomai/uapi/features.h b/kernel/cobalt/arch/blackfin/include/asm/xenomai/uapi/features.h deleted file mode 100644 index 31c833e..0000000 --- a/kernel/cobalt/arch/blackfin/include/asm/xenomai/uapi/features.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2005 Philippe Gerum <r...@xenomai.org>. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - */ -#ifndef _COBALT_BLACKFIN_ASM_UAPI_FEATURES_H -#define _COBALT_BLACKFIN_ASM_UAPI_FEATURES_H - -/* The ABI revision level we use on this arch. */ -#define XENOMAI_ABI_REV 16UL - -#define XENOMAI_FEAT_DEP __xn_feat_generic_mask - -#define XENOMAI_FEAT_MAN __xn_feat_generic_man_mask - -#define XNARCH_HAVE_LLMULSHFT 1 -#define XNARCH_HAVE_NODIV_LLIMD 1 - -struct cobalt_featinfo_archdep { /* no arch-specific feature */ }; - -#include <cobalt/uapi/asm-generic/features.h> - -static inline const char *get_feature_label(unsigned int feature) -{ - return get_generic_feature_label(feature); -} - -#endif /* !_COBALT_BLACKFIN_ASM_UAPI_FEATURES_H */ diff --git a/kernel/cobalt/arch/blackfin/include/asm/xenomai/uapi/fptest.h b/kernel/cobalt/arch/blackfin/include/asm/xenomai/uapi/fptest.h deleted file mode 100644 index 13e3bca..0000000 --- a/kernel/cobalt/arch/blackfin/include/asm/xenomai/uapi/fptest.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2006 Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - */ -#ifndef _COBALT_BLACKFIN_ASM_UAPI_FPTEST_H -#define _COBALT_BLACKFIN_ASM_UAPI_FPTEST_H - -static inline void fp_regs_set(int features, unsigned int val) -{ -} - -static inline unsigned int fp_regs_check(int features, unsigned int val, - int (*report)(const char *fmt, ...)) -{ - return val; -} - -#endif /* !_COBALT_BLACKFIN_ASM_UAPI_FPTEST_H */ diff --git a/kernel/cobalt/arch/blackfin/include/asm/xenomai/uapi/syscall.h b/kernel/cobalt/arch/blackfin/include/asm/xenomai/uapi/syscall.h deleted file mode 100644 index 299c59e..0000000 --- a/kernel/cobalt/arch/blackfin/include/asm/xenomai/uapi/syscall.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2005 Philippe Gerum <r...@xenomai.org>. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - */ -#ifndef _COBALT_BLACKFIN_ASM_UAPI_SYSCALL_H -#define _COBALT_BLACKFIN_ASM_UAPI_SYSCALL_H - -#define __xn_syscode(__nr) (__COBALT_SYSCALL_BIT | (__nr)) - -/* - * No atomic xchg available from user-space. We implement this as a - * syscall. - */ -#define __xn_lsys_xchg 0 - -#endif /* !_COBALT_BLACKFIN_ASM_UAPI_SYSCALL_H */ diff --git a/kernel/cobalt/arch/blackfin/include/asm/xenomai/wrappers.h b/kernel/cobalt/arch/blackfin/include/asm/xenomai/wrappers.h deleted file mode 100644 index 236a553..0000000 --- a/kernel/cobalt/arch/blackfin/include/asm/xenomai/wrappers.h +++ /dev/null @@ -1,27 +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 _COBALT_BLACKFIN_ASM_WRAPPERS_H -#define _COBALT_BLACKFIN_ASM_WRAPPERS_H - -#include <asm-generic/xenomai/wrappers.h> /* Read the generic portion. */ - -#define __put_user_inatomic __put_user -#define __get_user_inatomic __get_user - -#endif /* _COBALT_BLACKFIN_ASM_WRAPPERS_H */ diff --git a/kernel/cobalt/arch/blackfin/machine.c b/kernel/cobalt/arch/blackfin/machine.c deleted file mode 100644 index b0a70fe..0000000 --- a/kernel/cobalt/arch/blackfin/machine.c +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (C) 2005-2012 Philippe Gerum. - * - * 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, Inc., 675 Mass Ave, - * Cambridge MA 02139, USA; 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. - */ -#include <linux/stddef.h> -#include <cobalt/kernel/sched.h> -#include <asm/xenomai/machine.h> - -static unsigned long mach_blackfin_calibrate(void) -{ - return 20; /* 20 clock cycles */ -} - -static void schedule_deferred(void) -{ - xnsched_run(); -} - -static int mach_blackfin_late_init(void) -{ - /* - * We hook the rescheduling handler late in the init sequence - * to prevent the race below from happening: - * - * mach_setup() ... - * IRQ/syscall - * => irq_tail_hook - * => xnsched_run() - * ... - * xenomai_init() - * - * in which case, we would spuriously call xnsched_run() - * before the scheduler slot is initialized. - */ - __ipipe_irq_tail_hook = (unsigned long)schedule_deferred; - - return 0; -} - -static void mach_blackfin_cleanup(void) -{ - __ipipe_irq_tail_hook = 0; - smp_mb(); -} - -static const char *const fault_labels[] = { - [1] = "Single step", - [4] = "TAS", - [17] = "Performance Monitor Overflow", - [33] = "Undefined instruction", - [34] = "Illegal instruction", - [36] = "Data access misaligned", - [35] = "DCPLB fault", - [37] = "Unrecoverable event", - [38] = "DCPLB fault", - [39] = "DCPLB fault", - [40] = "Watchpoint", - [42] = "Instruction fetch misaligned", - [41] = "Undef", - [43] = "ICPLB fault", - [44] = "ICPLB fault", - [45] = "ICPLB fault", - [46] = "Illegal resource", - [47] = NULL -}; - -struct cobalt_machine cobalt_machine = { - .name = "blackfin", - .init = NULL, - .late_init = mach_blackfin_late_init, - .cleanup = mach_blackfin_cleanup, - .calibrate = mach_blackfin_calibrate, - .prefault = NULL, - .fault_labels = fault_labels, -}; diff --git a/kernel/cobalt/arch/blackfin/mayday.c b/kernel/cobalt/arch/blackfin/mayday.c deleted file mode 100644 index bd76fee..0000000 --- a/kernel/cobalt/arch/blackfin/mayday.c +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (C) 2009,2012 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. - */ -#include <linux/types.h> -#include <linux/ipipe.h> -#include <linux/vmalloc.h> -#include <cobalt/kernel/thread.h> -#include <cobalt/uapi/syscall.h> -#include <asm/cacheflush.h> -#include <asm/ptrace.h> -#include <asm/bug.h> - -static void *mayday; - -static inline void setup_mayday(void *page) -{ - /* - * We want this code to appear at the top of the MAYDAY page: - * - * 45 e1 0c 00 R5.H = 0x1000 - * 05 e1 2b 02 R5.L = 0x005e - * 05 32 P0 = R5 - * a0 00 EXCPT 0x0 - * cd ef <bug opcode> - * - * We don't mess with ASTAT here, so no need to save/restore - * it in handle/fixup code. - */ - static const struct __attribute__ ((__packed__)) { - struct __attribute__ ((__packed__)) { - u16 op; - u16 imm; - } load_r5h; - struct __attribute__ ((__packed__)) { - u16 op; - u16 imm; - } load_r5l; - u16 mov_p0; - u16 syscall; - u16 bug; - } code = { - .load_r5h = { - .op = 0xe145, - .imm = __xn_syscode(sc_cobalt_mayday) >> 16 - }, - .load_r5l = { - .op = 0xe105, - .imm = __xn_syscode(sc_cobalt_mayday) & 0xffff - }, - .mov_p0 = 0x3205, - .syscall = 0x00a0, - .bug = BFIN_BUG_OPCODE, - }; - - memcpy(page, &code, sizeof(code)); - - flush_dcache_range((unsigned long)page, - (unsigned long)page + sizeof(code)); -} - -int xnarch_init_mayday(void) -{ - mayday = vmalloc(PAGE_SIZE); - if (mayday == NULL) - return -ENOMEM; - - setup_mayday(mayday); - - return 0; -} - -void xnarch_cleanup_mayday(void) -{ - vfree(mayday); -} - -void *xnarch_get_mayday_page(void) -{ - return mayday; -} - -void xnarch_handle_mayday(struct xnarchtcb *tcb, - struct pt_regs *regs, - unsigned long tramp) -{ - tcb->mayday.pc = regs->pc; - tcb->mayday.p0 = regs->p0; - tcb->mayday.r5 = regs->r5; - regs->pc = tramp; /* i.e. RETI */ -} - -void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs) -{ - regs->pc = tcb->mayday.pc; - regs->p0 = tcb->mayday.p0; - regs->r5 = tcb->mayday.r5; -} diff --git a/kernel/cobalt/arch/blackfin/switch.S b/kernel/cobalt/arch/blackfin/switch.S deleted file mode 100644 index 8e6344e..0000000 --- a/kernel/cobalt/arch/blackfin/switch.S +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (C) 2005 Philippe Gerum. - * - * 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. - */ - -#include <linux/linkage.h> -#include <asm/blackfin.h> -#include <asm/entry.h> -#include <asm/asm-offsets.h> - -/* - * Switch context routine for Xenomai threads. - * - * void __asm_switch_context(struct thread_struct *prev, struct thread_struct *next) - */ -ENTRY(___asm_switch_context) - - [--sp] = rets; - [--sp] = fp; - [--sp] = ( R7:4, P5:3 ); - - p0 = r0; - p1 = r1; - - /* Save context. */ - p2 = usp; - [p0+THREAD_USP] = p2; - [p0+THREAD_KSP] = sp; - r1.l = switch_point; - r1.h = switch_point; - [p0+THREAD_PC] = r1; - - /* Restore context. */ - sp = [p1+THREAD_KSP]; - p0 = [p1+THREAD_USP]; - usp = p0; - p0 = [p1+THREAD_PC]; - jump (p0); - -switch_point: - - ( R7:4, P5:3 ) = [sp++]; - fp = [sp++]; - rets = [sp++]; - rts; - -/* - * Check for a reason to block context switching for Xenomai. This may - * be the case, if: - * - * - an event is pending on EVT15 (Blackfin syscalls start as - * exceptions, which are offloaded to EVT15, and we don't want to - * change the underlying task context while any syscall is in - * flight). - * - * - more than a single interrupt is pending in IPEND. In such a case, - * switching context would cause the core to branch back to kernel - * code without supervisor privileges (due to nested RTIs). - * - * int __asm_defer_switch_p(void) - */ - -ENTRY(___asm_defer_switch_p) - - p2.l = lo(ILAT); - p2.h = hi(ILAT); - r0 = [p2]; - r1 = EVT_IVG15 (z); - r0 = r0 & r1; - cc = r0 == 0; - if !cc jump 1f; - p2.l = lo(IPEND); - p2.h = hi(IPEND); - csync; - r2 = [p2]; - r1 = LO(~0x13) (Z); - r0 = r2 & r1; - cc = r0 == 0; - if cc jump 1f; - r1 = 1; - r1 = r0 - r1; - r0 = r0 & r1; -1: - rts diff --git a/kernel/cobalt/arch/blackfin/syscall.c b/kernel/cobalt/arch/blackfin/syscall.c deleted file mode 100644 index 0ff5570..0000000 --- a/kernel/cobalt/arch/blackfin/syscall.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2005, 2012 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. - */ - -#include <asm/xenomai/syscall.h> - -int xnarch_local_syscall(unsigned long a1, unsigned long a2, - unsigned long a3, unsigned long a4, - unsigned long a5) -{ - unsigned long r; - - switch (a1) { - case __xn_lsys_xchg: - - /* lsys_xchg(ptr,newval,&oldval) */ - r = xchg((unsigned long *)a2, a3); - __xn_put_user(r, (unsigned long *)a4); - break; - - default: - return -ENOSYS; - } - - return 0; -} diff --git a/kernel/cobalt/arch/blackfin/thread.c b/kernel/cobalt/arch/blackfin/thread.c deleted file mode 100644 index d4cda91..0000000 --- a/kernel/cobalt/arch/blackfin/thread.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (C) 2005, 2012 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. - */ - -#include <linux/sched.h> -#include <linux/ipipe.h> -#include <linux/mm.h> -#include <asm/mmu_context.h> -#include <cobalt/kernel/thread.h> - -asmlinkage void -__asm_switch_context(struct thread_struct *prev, - struct thread_struct *next); - -asmlinkage int __asm_defer_switch_p(void); - -#ifdef CONFIG_MPU - -static inline -void mpu_switch(struct xnarchtcb *out_tcb, struct xnarchtcb *in_tcb) -{ - struct mm_struct *prev_mm, *next_mm; - struct task_struct *next; - - next = in_tcb->core.host_task; - prev_mm = out_tcb->core.active_mm; - - next_mm = in_tcb->core.mm; - if (next_mm == NULL) - in_tcb->core.active_mm = prev_mm; - else - ipipe_switch_mm_head(prev_mm, next_mm, next); -} - -#else /* !CONFIG_MPU */ - -static inline -void mpu_switch(struct xnarchtcb *out_tcb, struct xnarchtcb *in_tcb) -{ -} - -#endif /* CONFIG_MPU */ - -void xnarch_switch_to(struct xnthread *out, struct xnthread *in) -{ - struct xnarchtcb *out_tcb = &out->tcb, *in_tcb = &in->tcb; - mpu_switch(out_tcb, in_tcb); - __asm_switch_context(out_tcb->core.tsp, in_tcb->core.tsp); -} - -int xnarch_escalate(void) -{ - /* The following Blackfin-specific check is likely the most - * braindamage stuff we need to do for this arch, i.e. deferring - * Xenomai's rescheduling procedure whenever: - - * 1. ILAT tells us that a deferred syscall (EVT15) is - * pending, so that we don't later execute this syscall over - * the wrong thread context. This could happen whenever a - * user-space task (plain or Xenomai) gets preempted by a high - * priority interrupt right after the deferred syscall event - * is raised (EVT15) but before the evt_system_call ISR could - * run. In case of deferred Xenomai rescheduling, the pending - * rescheduling opportunity will be checked at the beginning - * of Xenomai's handle_head_syscall() which intercepts any - * incoming syscall, and we know it will happen shortly after. - * - * 2. the context we will switch back to belongs to the Linux - * kernel code, so that we don't inadvertently cause the CPU - * to switch to user operating mode as a result of returning - * from an interrupt stack frame over the incoming thread - * through RTI. In the latter case, the preempted kernel code - * will be diverted shortly before resumption in order to run - * the rescheduling procedure (see __ipipe_irq_tail_hook). - */ - - if (__asm_defer_switch_p()) { - __ipipe_lock_root(); - return 1; - } - - if (ipipe_root_p) { - ipipe_raise_irq(cobalt_pipeline.escalate_virq); - __ipipe_unlock_root(); - return 1; - } - - __ipipe_unlock_root(); - - return 0; -} diff --git a/lib/cobalt/arch/Makefile.am b/lib/cobalt/arch/Makefile.am index 608cda1..e0244f9 100644 --- a/lib/cobalt/arch/Makefile.am +++ b/lib/cobalt/arch/Makefile.am @@ -1,4 +1,4 @@ SUBDIRS = @XENO_TARGET_ARCH@ -DIST_SUBDIRS = arm arm64 blackfin powerpc x86 +DIST_SUBDIRS = arm arm64 powerpc x86 diff --git a/lib/cobalt/arch/blackfin/Makefile.am b/lib/cobalt/arch/blackfin/Makefile.am deleted file mode 100644 index 0aa02d6..0000000 --- a/lib/cobalt/arch/blackfin/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -noinst_LTLIBRARIES = libarch.la - -libarch_la_LDFLAGS = @XENO_LIB_LDFLAGS@ -version-info 0:0:0 - -libarch_la_SOURCES = features.c - -libarch_la_CPPFLAGS = \ - @XENO_COBALT_CFLAGS@ \ - -I$(srcdir)/../.. \ - -I$(top_srcdir)/include/cobalt \ - -I$(top_srcdir)/include - -SUBDIRS = include diff --git a/lib/cobalt/arch/blackfin/features.c b/lib/cobalt/arch/blackfin/features.c deleted file mode 100644 index c71c08e..0000000 --- a/lib/cobalt/arch/blackfin/features.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2013 Philippe Gerum <r...@xenomai.org>. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - */ - -#include <asm/xenomai/uapi/features.h> -#include "internal.h" - -void cobalt_check_features(struct cobalt_featinfo *finfo) -{ -} diff --git a/lib/cobalt/arch/blackfin/include/Makefile.am b/lib/cobalt/arch/blackfin/include/Makefile.am deleted file mode 100644 index 5cac5d2..0000000 --- a/lib/cobalt/arch/blackfin/include/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ - -SUBDIRS = asm diff --git a/lib/cobalt/arch/blackfin/include/asm/Makefile.am b/lib/cobalt/arch/blackfin/include/asm/Makefile.am deleted file mode 100644 index 55ea661..0000000 --- a/lib/cobalt/arch/blackfin/include/asm/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ - -SUBDIRS = xenomai diff --git a/lib/cobalt/arch/blackfin/include/asm/xenomai/Makefile.am b/lib/cobalt/arch/blackfin/include/asm/xenomai/Makefile.am deleted file mode 100644 index d308b06..0000000 --- a/lib/cobalt/arch/blackfin/include/asm/xenomai/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ - -noinst_HEADERS = \ - features.h \ - syscall.h \ - tsc.h diff --git a/lib/cobalt/arch/blackfin/include/asm/xenomai/features.h b/lib/cobalt/arch/blackfin/include/asm/xenomai/features.h deleted file mode 100644 index 908e97a..0000000 --- a/lib/cobalt/arch/blackfin/include/asm/xenomai/features.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2013 Philippe Gerum <r...@xenomai.org>. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - */ -#ifndef _LIB_COBALT_BLACKFIN_FEATURES_H -#define _LIB_COBALT_BLACKFIN_FEATURES_H - -#include_next <features.h> -#include <xeno_config.h> -#include <asm/xenomai/uapi/features.h> - -static inline int cobalt_fp_detect(void) -{ - return 0; -} - -#endif /* !_LIB_COBALT_BLACKFIN_FEATURES_H */ diff --git a/lib/cobalt/arch/blackfin/include/asm/xenomai/syscall.h b/lib/cobalt/arch/blackfin/include/asm/xenomai/syscall.h deleted file mode 100644 index 7e54476..0000000 --- a/lib/cobalt/arch/blackfin/include/asm/xenomai/syscall.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2005 Philippe Gerum <r...@xenomai.org>. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - */ -#ifndef _LIB_COBALT_BLACKFIN_SYSCALL_H -#define _LIB_COBALT_BLACKFIN_SYSCALL_H - -#include <cobalt/uapi/syscall.h> -#include <fcntl.h> -#include <errno.h> - -#define __emit_syscall0(syscode, ...) \ -({ \ - long __res; \ - __asm__ __volatile__ ( \ - "excpt 0;\n\t" \ - : "=q0" (__res) \ - : "qA" (syscode), \ - ##__VA_ARGS__ \ - : "CC", "memory"); \ - __res; \ -}) -#define __emit_syscall1(syscode, a1, ...) \ - __emit_syscall0(syscode, "q0"(a1), ##__VA_ARGS__) -#define __emit_syscall2(syscode, a1, a2, ...) \ - __emit_syscall1(syscode, a1, "q1"(a2), ##__VA_ARGS__) -#define __emit_syscall3(syscode, a1, a2, a3, ...) \ - __emit_syscall2(syscode, a1, a2, "q2"(a3), ##__VA_ARGS__) -#define __emit_syscall4(syscode, a1, a2, a3, a4, ...) \ - __emit_syscall3(syscode, a1, a2, a3, "q3"(a4), ##__VA_ARGS__) -#define __emit_syscall5(syscode, a1, a2, a3, a4, a5, ...) \ - __emit_syscall4(syscode, a1, a2, a3, a4, "q4"(a5), ##__VA_ARGS__) - -#define XENOMAI_DO_SYSCALL(nr, op, args...) \ - __emit_syscall##nr(__xn_syscode(op), ##args) - -#define XENOMAI_SYSCALL0(op) XENOMAI_DO_SYSCALL(0,op) -#define XENOMAI_SYSCALL1(op,a1) XENOMAI_DO_SYSCALL(1,op,a1) -#define XENOMAI_SYSCALL2(op,a1,a2) XENOMAI_DO_SYSCALL(2,op,a1,a2) -#define XENOMAI_SYSCALL3(op,a1,a2,a3) XENOMAI_DO_SYSCALL(3,op,a1,a2,a3) -#define XENOMAI_SYSCALL4(op,a1,a2,a3,a4) XENOMAI_DO_SYSCALL(4,op,a1,a2,a3,a4) -#define XENOMAI_SYSCALL5(op,a1,a2,a3,a4,a5) XENOMAI_DO_SYSCALL(5,op,a1,a2,a3,a4,a5) -#define XENOMAI_SYSBIND(breq) XENOMAI_DO_SYSCALL(1,sc_cobalt_bind,breq) - -#endif /* !_LIB_COBALT_BLACKFIN_SYSCALL_H */ diff --git a/lib/cobalt/arch/blackfin/include/asm/xenomai/tsc.h b/lib/cobalt/arch/blackfin/include/asm/xenomai/tsc.h deleted file mode 100644 index 2fa3782..0000000 --- a/lib/cobalt/arch/blackfin/include/asm/xenomai/tsc.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2005 Philippe Gerum <r...@xenomai.org>. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - */ -#ifndef _LIB_COBALT_BLACKFIN_TSC_H -#define _LIB_COBALT_BLACKFIN_TSC_H - -static inline unsigned long long cobalt_read_tsc(void) -{ - union { - struct { - unsigned long l; - unsigned long h; - } s; - unsigned long long t; - } u; - unsigned long cy2; - - __asm__ __volatile__ ( "1: %0 = CYCLES2\n" - "%1 = CYCLES\n" - "%2 = CYCLES2\n" - "CC = %2 == %0\n" - "if !cc jump 1b\n" - :"=d" (u.s.h), - "=d" (u.s.l), - "=d" (cy2) - : /*no input*/ : "cc"); - return u.t; -} - -#endif /* !_LIB_COBALT_BLACKFIN_TSC_H */ diff --git a/scripts/prepare-kernel.sh b/scripts/prepare-kernel.sh index f0b0109..5e6e3b1 100755 --- a/scripts/prepare-kernel.sh +++ b/scripts/prepare-kernel.sh @@ -275,9 +275,6 @@ while : ; do powerpc*|ppc*) linux_arch=powerpc ;; - bfin*|blackfin) - linux_arch=blackfin - ;; nios2) linux_arch=nios2 ;; _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git