# This patch makes the 2.6.8.1 UML build and run. Index: um/arch/um/Makefile =================================================================== --- um.orig/arch/um/Makefile 2004-08-19 17:08:47.000000000 -0400 +++ um/arch/um/Makefile 2004-08-19 17:09:01.000000000 -0400 @@ -48,7 +48,7 @@ include $(ARCH_DIR)/Makefile-$(SUBARCH) include $(ARCH_DIR)/Makefile-os-$(OS) -EXTRAVERSION := $(EXTRAVERSION)-2um +EXTRAVERSION := $(EXTRAVERSION)-1um ARCH_INCLUDE = -I$(ARCH_DIR)/include Index: um/arch/um/drivers/stdio_console.c =================================================================== --- um.orig/arch/um/drivers/stdio_console.c 2004-08-17 15:57:36.000000000 -0400 +++ um/arch/um/drivers/stdio_console.c 2004-08-19 17:16:10.000000000 -0400 @@ -191,8 +191,8 @@ late_initcall(stdio_init); -static void console_write(struct console *console, const char *string, - unsigned len) +static void uml_console_write(struct console *console, const char *string, + unsigned len) { struct line *line = &vts[console->index]; @@ -203,22 +203,22 @@ up(&line->sem); } -static struct tty_driver *console_device(struct console *c, int *index) +static struct tty_driver *uml_console_device(struct console *c, int *index) { *index = c->index; return console_driver; } -static int console_setup(struct console *co, char *options) +static int uml_console_setup(struct console *co, char *options) { return(0); } static struct console stdiocons = { name: "tty", - write: console_write, - device: console_device, - setup: console_setup, + write: uml_console_write, + device: uml_console_device, + setup: uml_console_setup, flags: CON_PRINTBUFFER, index: -1, }; Index: um/arch/um/include/sysdep-i386/checksum.h =================================================================== --- um.orig/arch/um/include/sysdep-i386/checksum.h 2004-06-16 01:18:59.000000000 -0400 +++ um/arch/um/include/sysdep-i386/checksum.h 2004-08-19 17:09:18.000000000 -0400 @@ -5,6 +5,7 @@ #ifndef __UM_SYSDEP_CHECKSUM_H #define __UM_SYSDEP_CHECKSUM_H +#include "linux/in6.h" #include "linux/string.h" /* Index: um/arch/um/kernel/init_task.c =================================================================== --- um.orig/arch/um/kernel/init_task.c 2004-08-19 17:08:47.000000000 -0400 +++ um/arch/um/kernel/init_task.c 2004-08-19 17:09:01.000000000 -0400 @@ -8,7 +8,6 @@ #include "linux/module.h" #include "linux/sched.h" #include "linux/init_task.h" -#include "linux/version.h" #include "linux/mqueue.h" #include "asm/uaccess.h" #include "asm/pgtable.h" @@ -19,7 +18,7 @@ struct mm_struct init_mm = INIT_MM(init_mm); static struct files_struct init_files = INIT_FILES; static struct signal_struct init_signals = INIT_SIGNALS(init_signals); - +static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); EXPORT_SYMBOL(init_mm); /* @@ -44,26 +43,12 @@ __attribute__((__section__(".data.init_task"))) = { INIT_THREAD_INFO(init_task) }; -struct task_struct *alloc_task_struct(void) -{ - return((struct task_struct *) - __get_free_pages(GFP_KERNEL, CONFIG_KERNEL_STACK_ORDER)); -} - void unprotect_stack(unsigned long stack) { protect_memory(stack, (1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE, 1, 1, 0, 1); } -void free_task_struct(struct task_struct *task) -{ - /* free_pages decrements the page counter and only actually frees - * the pages if they are now not accessed by anything. - */ - free_pages((unsigned long) task, CONFIG_KERNEL_STACK_ORDER); -} - /* * Overrides for Emacs so that we follow Linus's tabbing style. * Emacs will notice this stuff at the end of the file and automatically Index: um/arch/um/sys-i386/Makefile =================================================================== --- um.orig/arch/um/sys-i386/Makefile 2004-08-19 17:19:58.000000000 -0400 +++ um/arch/um/sys-i386/Makefile 2004-08-19 17:20:30.000000000 -0400 @@ -1,5 +1,5 @@ -obj-y = bugs.o checksum.o fault.o ksyms.o ldt.o ptrace.o ptrace_user.o \ - semaphore.o sigcontext.o syscalls.o sysrq.o +obj-y = bitops.o bugs.o checksum.o fault.o ksyms.o ldt.o ptrace.o \ + ptrace_user.o semaphore.o sigcontext.o syscalls.o sysrq.o obj-$(CONFIG_HIGHMEM) += highmem.o obj-$(CONFIG_MODULES) += module.o @@ -7,11 +7,12 @@ USER_OBJS := bugs.o ptrace_user.o sigcontext.o fault.o USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) -SYMLINKS = semaphore.c highmem.c module.c +SYMLINKS = bitops.c semaphore.c highmem.c module.c SYMLINKS := $(foreach f,$(SYMLINKS),$(src)/$f) clean-files := $(SYMLINKS) +bitops.c-dir = lib semaphore.c-dir = kernel highmem.c-dir = mm module.c-dir = kernel Index: um/include/asm-um/mmu_context.h =================================================================== --- um.orig/include/asm-um/mmu_context.h 2004-06-16 01:19:26.000000000 -0400 +++ um/include/asm-um/mmu_context.h 2004-08-19 17:10:07.000000000 -0400 @@ -26,8 +26,8 @@ unsigned cpu = smp_processor_id(); if(prev != next){ - clear_bit(cpu, &prev->cpu_vm_mask); - set_bit(cpu, &next->cpu_vm_mask); + cpu_clear(cpu, prev->cpu_vm_mask); + cpu_set(cpu, next->cpu_vm_mask); if(next != &init_mm) CHOOSE_MODE((void) 0, switch_mm_skas(next->context.skas.mm_fd));