⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rthal5g-2.4.19.patch

📁 rtai-3.1-test3的源代码(Real-Time Application Interface )
💻 PATCH
📖 第 1 页 / 共 2 页
字号:
diff -uNrp linux-2.4.19-cris/Documentation/Configure.help linux-2.4.19-cris-rthal/Documentation/Configure.help--- linux-2.4.19-cris/Documentation/Configure.help	2004-01-02 15:40:15.000000000 +0100+++ linux-2.4.19-cris-rthal/Documentation/Configure.help	2004-01-02 12:36:12.000000000 +0100@@ -253,6 +253,23 @@ CONFIG_X86_UP_IOAPIC   If you have a system with several CPUs, you do not need to say Y   here: the IO-APIC will be used automatically. +Real-Time Harware Abstraction+CONFIG_RTHAL+  The Real-Time Hardware Abstraction Layer (RTHAL) is used by+  the Real-Time Application Interface (RTAI) to provide a+  hard real-time environment as part of Linux.  This feature+  cannot be turned off if you want to use RTAI, so say Y.+  Note: When you intend to use RTAI it is recommended that the+  watchdog is disabled (CONFIG_WATCHDOG).++Using the timers in cascade-mode under RTAI+CONFIG_ETRAX_DISABLE_CASCADED_TIMERS_IN_RTAI+  When RTAI is loaded it uses both available timers in hardware+  set to cascade-mode. This gives a significant performance+  increase for the accuracy of the real-time scheduler. Set this+  option to Y if you want to disable this feature. Then RTAI+  only uses timer0, which is possible but not recommended.+ Local APIC Support on Uniprocessors CONFIG_X86_UP_APIC   A local APIC (Advanced Programmable Interrupt Controller) is andiff -uNrp linux-2.4.19-cris/Makefile linux-2.4.19-cris-rthal/Makefile--- linux-2.4.19-cris/Makefile	2004-01-02 15:40:15.000000000 +0100+++ linux-2.4.19-cris-rthal/Makefile	2004-01-02 12:36:12.000000000 +0100@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 4 SUBLEVEL = 19-EXTRAVERSION =+EXTRAVERSION = rthal  KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) @@ -124,7 +124,11 @@ export SVGA_MODE = -DSVGA_MODE=NORMAL_VG  #export RAMDISK = -DRAMDISK=512 +ifdef CONFIG_RTHAL+CORE_FILES      =kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o rtai/rtai.o+else CORE_FILES	=kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o+endif NETWORKS	=net/network.o  LIBS		=$(TOPDIR)/lib/lib.adiff -uNrp linux-2.4.19-cris/arch/cris/Makefile linux-2.4.19-cris-rthal/arch/cris/Makefile--- linux-2.4.19-cris/arch/cris/Makefile	2002-08-03 02:39:42.000000000 +0200+++ linux-2.4.19-cris-rthal/arch/cris/Makefile	2004-01-02 14:26:12.000000000 +0100@@ -39,7 +39,7 @@ OBJCOPY := $(CROSS_COMPILE)objcopy -O bi  # -mlinux enables -march=v10, -fno-underscores, -D__linux__ among others -CFLAGS := $(CFLAGS) -mlinux -pipe+CFLAGS := $(CFLAGS) -mlinux -pipe -Wa,--underscore  ifdef CONFIG_ETRAX_KGDB CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -gdiff -uNrp linux-2.4.19-cris/arch/cris/config.in linux-2.4.19-cris-rthal/arch/cris/config.in--- linux-2.4.19-cris/arch/cris/config.in	2004-01-02 15:40:15.000000000 +0100+++ linux-2.4.19-cris-rthal/arch/cris/config.in	2004-01-02 12:36:12.000000000 +0100@@ -41,6 +41,12 @@ fi  bool 'Enable ETRAX fast timer API' CONFIG_ETRAX_FAST_TIMER +comment 'CONFIG_RTHAL must be yes to use RTAI'+bool 'Real-Time Hardware Abstraction Layer' CONFIG_RTHAL+if [ "$CONFIG_RTHAL" = "y" ]; then+	bool '  Disable cascaded-mode timers in RTAI' CONFIG_ETRAX_DISABLE_CASCADED_TIMERS_IN_RTAI+fi+ endmenu  mainmenu_option next_commentdiff -uNrp linux-2.4.19-cris/arch/cris/defconfig linux-2.4.19-cris-rthal/arch/cris/defconfig--- linux-2.4.19-cris/arch/cris/defconfig	2002-08-03 02:39:42.000000000 +0200+++ linux-2.4.19-cris-rthal/arch/cris/defconfig	2004-01-02 12:36:12.000000000 +0100@@ -11,6 +11,12 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_EXPERIMENTAL=y  #+# RTHAL+#+CONFIG_RTHAL=y+# CONFIG_ETRAX_DISABLE_CASCADED_TIMERS_IN_RTAI is not set++# # General setup # CONFIG_NET=ydiff -uNrp linux-2.4.19-cris/arch/cris/kernel/entry.S linux-2.4.19-cris-rthal/arch/cris/kernel/entry.S--- linux-2.4.19-cris/arch/cris/kernel/entry.S	2002-08-03 02:39:42.000000000 +0200+++ linux-2.4.19-cris-rthal/arch/cris/kernel/entry.S	2004-01-02 12:36:12.000000000 +0100@@ -240,6 +240,10 @@ ret_from_intr: 	btstq	8, $r0		; U-flag 	bpl	_Rexit		; go back directly 	nop+#ifdef CONFIG_RTHAL+	move.d  rthal, $r0+	jsr	[$r0+32]     ; Long path in usermode, ei to reduce latency +#endif 	ba	_ret_with_reschedule  ; go back but check schedule and signals first  	nop diff -uNrp linux-2.4.19-cris/arch/cris/kernel/irq.c linux-2.4.19-cris-rthal/arch/cris/kernel/irq.c--- linux-2.4.19-cris/arch/cris/kernel/irq.c	2002-02-25 20:37:52.000000000 +0100+++ linux-2.4.19-cris-rthal/arch/cris/kernel/irq.c	2004-01-02 12:36:12.000000000 +0100@@ -55,6 +55,62 @@ unmask_irq(unsigned int irq_nr) 	*R_VECT_MASK_SET = 1 << irq_nr; } +#ifdef CONFIG_RTHAL++/*+  RTAI+  This is the most appropriate place to setup rthal.+*/++static void linux_cli(void)+{+	hard_cli();+}++static void linux_sti(void)+{+	hard_sti();+}++static unsigned long linux_save_flags(void)+{+	unsigned long flags;+	hard_save_flags(flags);+	return flags;+}++static unsigned long linux_save_flags_and_cli(void)+{+	unsigned long flags;+	hard_save_flags_cli(flags);+	return flags;+}++static void linux_restore_flags(unsigned long flags)+{+	hard_restore_flags(flags);+}++asmlinkage void do_IRQ(int, struct pt_regs*);++static void do_nothing_void(void) { }+static long long do_nothing(int what, unsigned long ever) { }++struct rt_hal rthal = {+	do_IRQ,                   /* rthal.do_IRQ (irq-dispatcher) */+	do_IRQ,                   /* rthal.do_timer_IRQ (irq-dispatcher for timer) */+	do_nothing,               /* rthal.do_SRQ (srq-dispatcher if rtai is mounted) */+	linux_cli,                /* rthal.disint */+	linux_sti,                /* rthal.enint */+	linux_save_flags,         /* rthal.getflags */ +	linux_restore_flags,      /* rthal.setflags */+	linux_save_flags_and_cli, /* rthal.getflags_and_cli */+	do_nothing_void,          /* rthal.ei_if_rtai */+	unmask_irq                /* rthal.unmask_if_not_rtai */+};++#endif  /* CONFIG_RTHAL */+ void disable_irq(unsigned int irq_nr) {@@ -211,7 +267,32 @@ static void (*bad_interrupt[NR_IRQS])(vo /*  * Initial irq handlers.  */+#ifdef CONFIG_RTHAL+struct irqaction *irq_action[NR_IRQS] = {+	NULL, NULL, NULL, NULL,+	NULL, NULL, NULL, NULL,+	NULL, NULL, NULL, NULL,+	NULL, NULL, NULL, NULL,+	NULL, NULL, NULL, NULL,+	NULL, NULL, NULL, NULL,+	NULL, NULL, NULL, NULL,+	NULL, NULL, NULL, NULL+};++void startup_irq(int irq)+{+	irq_shortcuts[irq] = sinterrupt[irq];++	etrax_irv->v[irq + 0x20] = (irqvectptr)interrupt[irq];+}++void shutdown_irq(int irq)+{+	irq_shortcuts[irq] = 0; +	etrax_irv->v[irq + 0x20] = (irqvectptr)bad_interrupt[irq];+}+#else static struct irqaction *irq_action[NR_IRQS] = { 	NULL, NULL, NULL, NULL, 	NULL, NULL, NULL, NULL,@@ -222,6 +303,7 @@ static struct irqaction *irq_action[NR_I 	NULL, NULL, NULL, NULL, 	NULL, NULL, NULL, NULL };+#endif  int get_irq_list(char *buf) {diff -uNrp linux-2.4.19-cris/arch/cris/kernel/ksyms.c linux-2.4.19-cris-rthal/arch/cris/kernel/ksyms.c--- linux-2.4.19-cris/arch/cris/kernel/ksyms.c	2004-01-02 15:40:15.000000000 +0100+++ linux-2.4.19-cris-rthal/arch/cris/kernel/ksyms.c	2004-01-02 12:36:12.000000000 +0100@@ -28,6 +28,25 @@ extern void __Umod(void); extern void __ashrdi3(void); extern void iounmap(void *addr); +#ifdef CONFIG_RTHAL+/* Added for RTHAL */+EXPORT_SYMBOL(rthal);+EXPORT_SYMBOL(startup_irq);+EXPORT_SYMBOL(shutdown_irq);+EXPORT_SYMBOL(irq_action);+EXPORT_SYMBOL(r_timer_ctrl_shadow);+extern void reset_watchdog(void);+EXPORT_SYMBOL(reset_watchdog);+extern void soft_timer_interrupt(int, void*, struct pt_regs*);+EXPORT_SYMBOL(soft_timer_interrupt);+extern void __udivdi3(void);+EXPORT_SYMBOL_NOVERS(__udivdi3);+extern void __negdi2(void);+EXPORT_SYMBOL_NOVERS(__negdi2);+extern void __Div(void);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -