Yes. I just repeated the process with fresh sources to be sure. I'm
attaching all the relevant files, including a log of
scripts/prepare_kernel.sh. This time I used linux-2.6.24.4 (from kernel.org)
and xenomai 2.4.2.

--VL

On Thu, Apr 3, 2008 at 12:35 PM, Gilles Chanteperdrix <
[EMAIL PROTECTED]> wrote:

> On Thu, Apr 3, 2008 at 6:31 PM, Vincent Levesque <[EMAIL PROTECTED]>
> wrote:
> > I'm attaching the files. -- VL
>
> The patch applies to a kernel patched with the I-pipe patch. Are the
> kernel sources you are trying to patch, already patched with the
> I-pipe patch ?
>
> --
>  Gilles
>
[EMAIL PROTECTED]:/usr/src/xenomai-2.4.2# scripts/prepare-kernel.sh 
Linux tree [default /lib/modules/2.6.22-14-generic/source]: /usr/src/linux-2.6.24.4-xn242
Target architecture [default i686]: 
Adeos patch [default /usr/src/xenomai-2.4.2/ksrc/arch/x86/patches/adeos-ipipe-2.6.24-x86-2.0-03.patch]: 
patching file Makefile
patching file arch/x86/Kconfig
patching file arch/x86/Makefile_32
patching file arch/x86/boot/Makefile
patching file arch/x86/boot/compressed/Makefile_32
patching file arch/x86/kernel/Makefile_32
Hunk #1 succeeded at 35 (offset 1 line).
patching file arch/x86/kernel/Makefile_64
patching file arch/x86/kernel/apic_32.c
patching file arch/x86/kernel/apic_64.c
patching file arch/x86/kernel/cpu/mtrr/cyrix.c
patching file arch/x86/kernel/cpu/mtrr/generic.c
patching file arch/x86/kernel/entry_32.S
patching file arch/x86/kernel/entry_64.S
patching file arch/x86/kernel/genapic_flat_64.c
patching file arch/x86/kernel/head64.c
patching file arch/x86/kernel/i8253.c
patching file arch/x86/kernel/i8259_32.c
patching file arch/x86/kernel/i8259_64.c
patching file arch/x86/kernel/io_apic_32.c
patching file arch/x86/kernel/io_apic_64.c
patching file arch/x86/kernel/ipipe.c
patching file arch/x86/kernel/mcount_32.S
patching file arch/x86/kernel/mcount_64.S
patching file arch/x86/kernel/nmi_32.c
patching file arch/x86/kernel/nmi_64.c
patching file arch/x86/kernel/process_32.c
patching file arch/x86/kernel/process_64.c
Hunk #3 succeeded at 234 (offset -1 lines).
Hunk #4 succeeded at 286 (offset -1 lines).
Hunk #5 succeeded at 507 (offset -1 lines).
Hunk #6 succeeded at 605 (offset -1 lines).
patching file arch/x86/kernel/setup64.c
patching file arch/x86/kernel/smp_32.c
patching file arch/x86/kernel/smp_64.c
patching file arch/x86/kernel/smpboot_32.c
patching file arch/x86/kernel/smpboot_64.c
patching file arch/x86/kernel/time_32.c
patching file arch/x86/kernel/traps_32.c
patching file arch/x86/kernel/traps_64.c
patching file arch/x86/kernel/vm86_32.c
patching file arch/x86/kernel/vsyscall_64.c
patching file arch/x86/lib/mmx_32.c
patching file arch/x86/lib/thunk_64.S
patching file arch/x86/mach-visws/visws_apic.c
patching file arch/x86/mm/fault_32.c
patching file arch/x86/mm/fault_64.c
patching file drivers/pci/htirq.c
patching file drivers/serial/8250.c
patching file include/asm-x86/apic_32.h
patching file include/asm-x86/apic_64.h
patching file include/asm-x86/hw_irq_32.h
patching file include/asm-x86/hw_irq_64.h
patching file include/asm-x86/i8259.h
patching file include/asm-x86/io_apic_64.h
Hunk #1 succeeded at 131 with fuzz 2.
patching file include/asm-x86/ipi.h
patching file include/asm-x86/ipipe.h
patching file include/asm-x86/ipipe_32.h
patching file include/asm-x86/ipipe_64.h
patching file include/asm-x86/ipipe_base.h
patching file include/asm-x86/ipipe_base_32.h
patching file include/asm-x86/ipipe_base_64.h
patching file include/asm-x86/irqflags_32.h
patching file include/asm-x86/irqflags_64.h
patching file include/asm-x86/mmu_context_32.h
patching file include/asm-x86/mmu_context_64.h
patching file include/asm-x86/nmi_32.h
patching file include/asm-x86/nmi_64.h
patching file include/asm-x86/processor_64.h
patching file include/asm-x86/spinlock_32.h
patching file include/asm-x86/system_64.h
patching file include/asm-x86/unistd_64.h
patching file include/asm-x86/vsyscall.h
patching file include/linux/hardirq.h
patching file include/linux/ipipe.h
patching file include/linux/ipipe_base.h
patching file include/linux/ipipe_compat.h
patching file include/linux/ipipe_percpu.h
patching file include/linux/ipipe_tickdev.h
patching file include/linux/ipipe_trace.h
patching file include/linux/irq.h
Hunk #2 succeeded at 378 with fuzz 2 (offset 3 lines).
patching file include/linux/kernel.h
patching file include/linux/linkage.h
patching file include/linux/mm.h
patching file include/linux/preempt.h
patching file include/linux/sched.h
patching file include/linux/spinlock.h
patching file include/linux/spinlock_types.h
patching file init/Kconfig
patching file init/main.c
patching file kernel/Makefile
patching file kernel/exit.c
patching file kernel/fork.c
patching file kernel/ipipe/Kconfig
patching file kernel/ipipe/Kconfig.debug
patching file kernel/ipipe/Makefile
patching file kernel/ipipe/core.c
patching file kernel/ipipe/tracer.c
patching file kernel/irq/chip.c
Hunk #1 succeeded at 353 (offset 18 lines).
Hunk #2 succeeded at 432 (offset 18 lines).
Hunk #3 succeeded at 482 (offset 18 lines).
Hunk #4 succeeded at 525 (offset 18 lines).
Hunk #5 succeeded at 653 (offset 18 lines).
Hunk #6 succeeded at 683 (offset 18 lines).
Hunk #7 succeeded at 722 (offset 18 lines).
Hunk #8 succeeded at 742 (offset 18 lines).
patching file kernel/power/disk.c
patching file kernel/power/swsusp.c
patching file kernel/printk.c
patching file kernel/sched.c
Hunk #9 succeeded at 4361 with fuzz 2 (offset -2 lines).
Hunk #10 succeeded at 7415 (offset -4 lines).
patching file kernel/signal.c
patching file kernel/spinlock.c
patching file kernel/time/tick-common.c
patching file lib/Kconfig.debug
patching file lib/bust_spinlocks.c
patching file lib/ioremap.c
patching file lib/smp_processor_id.c
patching file lib/spinlock_debug.c
patching file mm/memory.c
Hunk #7 succeeded at 1569 (offset 2 lines).
Hunk #8 succeeded at 2801 (offset 2 lines).
patching file mm/mlock.c
patching file mm/vmalloc.c

diff --git a/include/linux/mm.h b/include/linux/mm.h
index 7f27db6..a0c80c7 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -104,10 +104,11 @@ extern unsigned int kobjsize(const void *objp);
 #define VM_MAPPED_COPY 0x01000000      /* T if mapped copy of data (nommu mmap) */
 #define VM_INSERTPAGE  0x02000000      /* The vma has had "vm_insert_page()" done on it */
 #define VM_ALWAYSDUMP  0x04000000      /* Always include in core dumps */
-#define VM_PINNED      0x08000000      /* Disable faults for the vma */
 
 #define VM_CAN_NONLINEAR 0x08000000    /* Has ->fault & does nonlinear pages */
 
+#define VM_PINNED      0x10000000      /* Disable faults for the vma */
+
 #ifndef VM_STACK_DEFAULT_FLAGS         /* arch can override this */
 #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
 #endif
diff --git a/mm/memory.c b/mm/memory.c
index e0e7a3d..32d6cb6 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -584,8 +584,14 @@ again:
                        if (is_cow_mapping(vma->vm_flags)) {
                                if (((vma->vm_flags|src_mm->def_flags) & (VM_LOCKED|VM_PINNED))
                                    == (VM_LOCKED|VM_PINNED)) {
+                                       arch_leave_lazy_mmu_mode();
+                                       spin_unlock(src_ptl);
+                                       pte_unmap_nested(src_pte);
+                                       add_mm_rss(dst_mm, rss[0], rss[1]);
+                                       pte_unmap_unlock(dst_pte, dst_ptl);
+                                       cond_resched();
                                        do_cow_break = 1;
-                                       break;
+                                       goto again;
                                }
                        }
                }

Attachment: memory.c.rej
Description: application/reject

Attachment: mm.h.rej
Description: application/reject

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to