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

📄 adeos-ipipe-2.4.31-i386-1.1-03.patch

📁 xenomai 很好的linux实时补丁
💻 PATCH
📖 第 1 页 / 共 5 页
字号:
diff -uNrp 2.4.31/arch/i386/config.in 2.4.31-i386-ipipe/arch/i386/config.in--- 2.4.31/arch/i386/config.in	2004-11-17 12:54:21.000000000 +0100+++ 2.4.31-i386-ipipe/arch/i386/config.in	2005-11-25 15:41:33.000000000 +0100@@ -266,6 +266,12 @@ endmenu mainmenu_option next_comment comment 'General setup' +bool 'Interrupt pipeline' CONFIG_IPIPE+if [ "$CONFIG_IPIPE" = "y" ]; then+   define_bool CONFIG_IPIPE_EXTENDED y+   bool 'Collect pipeline statistics' CONFIG_IPIPE_STATS+fi+ bool 'Networking support' CONFIG_NET  # Visual Workstation support is utterly broken.diff -uNrp 2.4.31/arch/i386/kernel/Makefile 2.4.31-i386-ipipe/arch/i386/kernel/Makefile--- 2.4.31/arch/i386/kernel/Makefile	2005-04-04 03:42:19.000000000 +0200+++ 2.4.31-i386-ipipe/arch/i386/kernel/Makefile	2005-11-21 15:28:20.000000000 +0100@@ -14,7 +14,8 @@ all: kernel.o head.o init_task.o  O_TARGET := kernel.o -export-objs     := mca.o mtrr.o msr.o cpuid.o microcode.o i386_ksyms.o time.o setup.o+export-objs     := mca.o mtrr.o msr.o cpuid.o microcode.o i386_ksyms.o time.o setup.o \+		ipipe-root.o ipipe-core.o  obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \ 		ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o \@@ -39,6 +40,7 @@ obj-$(CONFIG_APM)		+= apm.o obj-$(CONFIG_ACPI_BOOT)		+= acpi.o earlyquirk.o obj-$(CONFIG_ACPI_SLEEP)	+= acpi_wakeup.o obj-$(CONFIG_SMP)		+= smp.o smpboot.o trampoline.o+obj-$(CONFIG_IPIPE)		+= ipipe-root.o ipipe-core.o obj-$(CONFIG_X86_LOCAL_APIC)	+= mpparse.o apic.o nmi.o obj-$(CONFIG_X86_IO_APIC)	+= io_apic.o  obj-$(CONFIG_X86_VISWS_APIC)	+= visws_apic.odiff -uNrp 2.4.31/arch/i386/kernel/apic.c 2.4.31-i386-ipipe/arch/i386/kernel/apic.c--- 2.4.31/arch/i386/kernel/apic.c	2004-11-17 12:54:21.000000000 +0100+++ 2.4.31-i386-ipipe/arch/i386/kernel/apic.c	2005-11-21 15:48:19.000000000 +0100@@ -1111,6 +1111,9 @@ unsigned int apic_timer_irqs [NR_CPUS]; void smp_apic_timer_interrupt(struct pt_regs * regs) { 	int cpu = smp_processor_id();+#ifdef CONFIG_IPIPE+	regs =  __ipipe_tick_regs + cpu;+#endif /* CONFIG_IPIPE */  	/* 	 * the NMI deadlock-detector uses this.@@ -1149,7 +1152,7 @@ asmlinkage void smp_spurious_interrupt(v 	 */ 	v = apic_read(APIC_ISR + ((SPURIOUS_APIC_VECTOR & ~0x1f) >> 1)); 	if (v & (1 << (SPURIOUS_APIC_VECTOR & 0x1f)))-		ack_APIC_irq();+		__ack_APIC_irq();  	/* see sw-dev-man vol 3, chapter 7.4.13.5 */ 	printk(KERN_INFO "spurious APIC interrupt on CPU#%d, should never happen.\n",diff -uNrp 2.4.31/arch/i386/kernel/entry.S 2.4.31-i386-ipipe/arch/i386/kernel/entry.S--- 2.4.31/arch/i386/kernel/entry.S	2003-06-13 16:51:29.000000000 +0200+++ 2.4.31-i386-ipipe/arch/i386/kernel/entry.S	2005-11-27 18:47:40.000000000 +0100@@ -45,7 +45,45 @@ #include <linux/linkage.h> #include <asm/segment.h> #include <asm/smp.h>+#include <asm/ipipe.h> +#ifdef CONFIG_IPIPE+#define CLI                     call SYMBOL_NAME(__ipipe_stall_root) ; sti+#define STI                     call SYMBOL_NAME(__ipipe_unstall_root)+#define STI_COND_HW             sti+#define EMULATE_ROOT_IRET(bypass) call SYMBOL_NAME(__ipipe_unstall_iret_root) ; \+				  ENTRY(bypass)+#define CATCH_ROOT_SYSCALL(bypass1,bypass2)	\+				call SYMBOL_NAME(__ipipe_syscall_root) ; \+				testl  %eax,%eax ; \+				js    bypass1 ; \+				jne   bypass2 ; \+				movl ORIG_EAX(%esp),%eax+#define PUSH_XCODE(v)		pushl $ SYMBOL_NAME( ex_/**/v )+#define HANDLE_EXCEPTION(code)	pushl %code ; /* WARNING: arg marshalling != 2.6 version */	\+				call SYMBOL_NAME(__ipipe_handle_exception) ; \+				addl $12,%esp ; \+				testl %eax,%eax	; \+				jnz restore_raw+#define DIVERT_EXCEPTION(code)	movl %esp, %eax	; \+				movl $ SYMBOL_NAME ( ex_/**/code ) ,%edx ; \+				call SYMBOL_NAME(__ipipe_divert_exception) ; \+				testl %eax,%eax	; \+				jnz restore_raw++#else  /* !CONFIG_IPIPE */+#define CLI                     cli+#define STI                     sti+#define STI_COND_HW+#define EMULATE_ROOT_IRET(bypass)+#define CATCH_ROOT_SYSCALL(bypass1,bypass2)++#define PUSH_XCODE(v)		pushl $ SYMBOL_NAME(v)+#define HANDLE_EXCEPTION(code)	call *%code ; \+				addl $8,%esp+#define DIVERT_EXCEPTION(code)+#endif /* CONFIG_IPIPE */+	 EBX		= 0x00 ECX		= 0x04 EDX		= 0x08@@ -184,6 +222,7 @@ ENTRY(lcall27)   ENTRY(ret_from_fork)+	STI_COND_HW	 	pushl %ebx 	call SYMBOL_NAME(schedule_tail) 	addl $4, %esp@@ -203,6 +242,9 @@ ENTRY(system_call) 	pushl %eax			# save orig_eax 	SAVE_ALL 	GET_CURRENT(%ebx)+	/* %ebx is caller-saved, so that's ok to go through+	   __ipipe_syscall_root() without saving it. */+	CATCH_ROOT_SYSCALL(ret_from_sys_call,restore_raw) 	testb $0x02,tsk_ptrace(%ebx)	# PT_TRACESYS 	jne tracesys 	cmpl $(NR_syscalls),%eax@@ -210,17 +252,18 @@ ENTRY(system_call) 	call *SYMBOL_NAME(sys_call_table)(,%eax,4) 	movl %eax,EAX(%esp)		# save the return value ENTRY(ret_from_sys_call)-	cli				# need_resched and signals atomic test+	CLI				# need_resched and signals atomic test 	cmpl $0,need_resched(%ebx) 	jne reschedule 	cmpl $0,sigpending(%ebx) 	jne signal_return restore_all:+	EMULATE_ROOT_IRET(restore_raw) 	RESTORE_ALL  	ALIGN signal_return:-	sti				# we can get here from an interrupt handler+	STI				# we can get here from an interrupt handler 	testl $(VM_MASK),EFLAGS(%esp) 	movl %esp,%eax 	jne v86_signal_return@@ -269,7 +312,7 @@ reschedule:  ENTRY(divide_error) 	pushl $0		# no error code-	pushl $ SYMBOL_NAME(do_divide_error)+	PUSH_XCODE(do_divide_error) 	ALIGN error_code: 	pushl %ds@@ -295,23 +338,23 @@ error_code: 	movl %edx,%ds 	movl %edx,%es 	GET_CURRENT(%ebx)-	call *%edi-	addl $8,%esp+	HANDLE_EXCEPTION(edi) 	jmp ret_from_exception  ENTRY(coprocessor_error) 	pushl $0-	pushl $ SYMBOL_NAME(do_coprocessor_error)+	PUSH_XCODE(do_coprocessor_error) 	jmp error_code  ENTRY(simd_coprocessor_error) 	pushl $0-	pushl $ SYMBOL_NAME(do_simd_coprocessor_error)+	PUSH_XCODE(do_simd_coprocessor_error) 	jmp error_code  ENTRY(device_not_available) 	pushl $-1		# mark this as an int 	SAVE_ALL+	DIVERT_EXCEPTION(device_not_available) 	GET_CURRENT(%ebx) 	movl %cr0,%eax 	testl $0x4,%eax			# EM (math emulation bit)@@ -326,7 +369,7 @@ device_not_available_emulate:  ENTRY(debug) 	pushl $0-	pushl $ SYMBOL_NAME(do_debug)+	PUSH_XCODE(do_debug) 	jmp error_code  ENTRY(nmi)@@ -341,27 +384,27 @@ ENTRY(nmi)  ENTRY(int3) 	pushl $0-	pushl $ SYMBOL_NAME(do_int3)+	PUSH_XCODE(do_int3) 	jmp error_code  ENTRY(overflow) 	pushl $0-	pushl $ SYMBOL_NAME(do_overflow)+	PUSH_XCODE(do_overflow) 	jmp error_code  ENTRY(bounds) 	pushl $0-	pushl $ SYMBOL_NAME(do_bounds)+	PUSH_XCODE(do_bounds)	 	jmp error_code  ENTRY(invalid_op) 	pushl $0-	pushl $ SYMBOL_NAME(do_invalid_op)+	PUSH_XCODE(do_invalid_op)	 	jmp error_code  ENTRY(coprocessor_segment_overrun) 	pushl $0-	pushl $ SYMBOL_NAME(do_coprocessor_segment_overrun)+	PUSH_XCODE(do_coprocessor_segment_overrun) 	jmp error_code  ENTRY(double_fault)@@ -369,37 +412,37 @@ ENTRY(double_fault) 	jmp error_code  ENTRY(invalid_TSS)-	pushl $ SYMBOL_NAME(do_invalid_TSS)+	PUSH_XCODE(do_invalid_TSS)	 	jmp error_code  ENTRY(segment_not_present)-	pushl $ SYMBOL_NAME(do_segment_not_present)+	PUSH_XCODE(do_segment_not_present) 	jmp error_code  ENTRY(stack_segment)-	pushl $ SYMBOL_NAME(do_stack_segment)+	PUSH_XCODE(do_stack_segment) 	jmp error_code  ENTRY(general_protection)-	pushl $ SYMBOL_NAME(do_general_protection)+	PUSH_XCODE(do_general_protection)	 	jmp error_code  ENTRY(alignment_check)-	pushl $ SYMBOL_NAME(do_alignment_check)+	PUSH_XCODE(do_alignment_check) 	jmp error_code  ENTRY(page_fault)-	pushl $ SYMBOL_NAME(do_page_fault)+	PUSH_XCODE(do_page_fault) 	jmp error_code  ENTRY(machine_check) 	pushl $0-	pushl $ SYMBOL_NAME(do_machine_check)+	PUSH_XCODE(do_machine_check) 	jmp error_code  ENTRY(spurious_interrupt_bug) 	pushl $0-	pushl $ SYMBOL_NAME(do_spurious_interrupt_bug)+	PUSH_XCODE(do_spurious_interrupt_bug) 	jmp error_code  .datadiff -uNrp 2.4.31/arch/i386/kernel/i8259.c 2.4.31-i386-ipipe/arch/i386/kernel/i8259.c--- 2.4.31/arch/i386/kernel/i8259.c	2004-08-08 01:26:04.000000000 +0200+++ 2.4.31-i386-ipipe/arch/i386/kernel/i8259.c	2005-11-27 19:29:58.000000000 +0100@@ -53,7 +53,7 @@ BUILD_COMMON_IRQ()  */ BUILD_16_IRQS(0x0) -#ifdef CONFIG_X86_IO_APIC+#if defined(CONFIG_X86_IO_APIC) || (defined(CONFIG_IPIPE) && defined(CONFIG_X86_LOCAL_APIC)) /*  * The IO-APIC gives us many more interrupt sources. Most of these   * are unused but an SMP system is supposed to have enough memory ...@@ -107,10 +107,10 @@ BUILD_SMP_INTERRUPT(spurious_interrupt,S 	IRQ(x,8), IRQ(x,9), IRQ(x,a), IRQ(x,b), \ 	IRQ(x,c), IRQ(x,d), IRQ(x,e), IRQ(x,f) -void (*interrupt[NR_IRQS])(void) = {+void (*interrupt[NR_XIRQS])(void) = { 	IRQLIST_16(0x0), -#ifdef CONFIG_X86_IO_APIC+#if defined(CONFIG_X86_IO_APIC) || (defined(CONFIG_IPIPE) && defined(CONFIG_X86_LOCAL_APIC)) 			 IRQLIST_16(0x1), IRQLIST_16(0x2), IRQLIST_16(0x3), 	IRQLIST_16(0x4), IRQLIST_16(0x5), IRQLIST_16(0x6), IRQLIST_16(0x7), 	IRQLIST_16(0x8), IRQLIST_16(0x9), IRQLIST_16(0xa), IRQLIST_16(0xb),@@ -188,13 +188,13 @@ void disable_8259A_irq(unsigned int irq) 	unsigned int mask = 1 << irq; 	unsigned long flags; -	spin_lock_irqsave(&i8259A_lock, flags);+	spin_lock_irqsave_hw(&i8259A_lock, flags); 	cached_irq_mask |= mask; 	if (irq & 8) 		outb(cached_A1,0xA1); 	else 		outb(cached_21,0x21);-	spin_unlock_irqrestore(&i8259A_lock, flags);+	spin_unlock_irqrestore_hw(&i8259A_lock, flags); }  void enable_8259A_irq(unsigned int irq)@@ -202,13 +202,14 @@ void enable_8259A_irq(unsigned int irq) 	unsigned int mask = ~(1 << irq); 	unsigned long flags; -	spin_lock_irqsave(&i8259A_lock, flags);+	spin_lock_irqsave_hw(&i8259A_lock, flags); 	cached_irq_mask &= mask; 	if (irq & 8) 		outb(cached_A1,0xA1); 	else 		outb(cached_21,0x21);-	spin_unlock_irqrestore(&i8259A_lock, flags);+	ipipe_irq_unlock(irq);+	spin_unlock_irqrestore_hw(&i8259A_lock, flags); }  int i8259A_irq_pending(unsigned int irq)@@ -217,12 +218,12 @@ int i8259A_irq_pending(unsigned int irq) 	unsigned long flags; 	int ret; -	spin_lock_irqsave(&i8259A_lock, flags);+	spin_lock_irqsave_hw(&i8259A_lock, flags); 	if (irq < 8) 		ret = inb(0x20) & mask; 	else 		ret = inb(0xA0) & (mask >> 8);-	spin_unlock_irqrestore(&i8259A_lock, flags);+	spin_unlock_irqrestore_hw(&i8259A_lock, flags);  	return ret; }@@ -269,7 +270,7 @@ void mask_and_ack_8259A(unsigned int irq 	unsigned int irqmask = 1 << irq; 	unsigned long flags; -	spin_lock_irqsave(&i8259A_lock, flags);+	spin_lock_irqsave_hw(&i8259A_lock, flags); 	/* 	 * Lightweight spurious IRQ detection. We do not want 	 * to overdo spurious IRQ handling - it's usually a sign@@ -287,6 +288,15 @@ void mask_and_ack_8259A(unsigned int irq 	 */ 	if (cached_irq_mask & irqmask) 		goto spurious_8259A_irq;+#ifdef CONFIG_IPIPE+	if (irq == 0) {+	    /* Fast timer ack -- don't mask (unless supposedly+	      spurious) */+	    outb(0x20,0x20);+	    spin_unlock_irqrestore_hw(&i8259A_lock, flags);+	    return;+	}+#endif /* CONFIG_IPIPE */	 	cached_irq_mask |= irqmask;  handle_real_irq:@@ -300,7 +310,7 @@ handle_real_irq: 		outb(cached_21,0x21); 		outb(0x60+irq,0x20);	/* 'Specific EOI' to master */ 	}-	spin_unlock_irqrestore(&i8259A_lock, flags);+	spin_unlock_irqrestore_hw(&i8259A_lock, flags); 	return;  spurious_8259A_irq:@@ -338,7 +348,7 @@ void __init init_8259A(int auto_eoi) { 	unsigned long flags; -	spin_lock_irqsave(&i8259A_lock, flags);+	spin_lock_irqsave_hw(&i8259A_lock, flags);  	outb(0xff, 0x21);	/* mask all of 8259A-1 */ 	outb(0xff, 0xA1);	/* mask all of 8259A-2 */@@ -374,7 +384,7 @@ void __init init_8259A(int auto_eoi) 	outb(cached_21, 0x21);	/* restore master IRQ mask */ 	outb(cached_A1, 0xA1);	/* restore slave IRQ mask */ -	spin_unlock_irqrestore(&i8259A_lock, flags);+	spin_unlock_irqrestore_hw(&i8259A_lock, flags); }  /*@@ -455,7 +465,7 @@ void __init init_IRQ(void) 	 * us. (some of these will be overridden and become 	 * 'special' SMP interrupts) 	 */-	for (i = 0; i < NR_IRQS; i++) {+	for (i = 0; i < NR_XIRQS; i++) { 		int vector = FIRST_EXTERNAL_VECTOR + i; 		if (vector != SYSCALL_VECTOR)  			set_intr_gate(vector, interrupt[i]);diff -uNrp 2.4.31/arch/i386/kernel/io_apic.c 2.4.31-i386-ipipe/arch/i386/kernel/io_apic.c--- 2.4.31/arch/i386/kernel/io_apic.c	2004-11-17 12:54:21.000000000 +0100+++ 2.4.31-i386-ipipe/arch/i386/kernel/io_apic.c	2005-11-21 16:00:46.000000000 +0100@@ -151,18 +151,20 @@ static void mask_IO_APIC_irq (unsigned i { 	unsigned long flags; -	spin_lock_irqsave(&ioapic_lock, flags);+	spin_lock_irqsave_hw(&ioapic_lock, flags);+	ipipe_irq_lock(irq); 	__mask_IO_APIC_irq(irq);-	spin_unlock_irqrestore(&ioapic_lock, flags);+	spin_unlock_irqrestore_hw(&ioapic_lock, flags); }  static void unmask_IO_APIC_irq (unsigned int irq) { 	unsigned long flags; -	spin_lock_irqsave(&ioapic_lock, flags);+	spin_lock_irqsave_hw(&ioapic_lock, flags);+	ipipe_irq_unlock(irq); 	__unmask_IO_APIC_irq(irq);

⌨️ 快捷键说明

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