From 11297b7c6b88987e76ecf474fe7941aa2e189780 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 23 Nov 2007 15:13:09 -0500 Subject: [PATCH] Import 2.1.37pre1 --- Documentation/Changes | 14 +- Makefile | 2 +- arch/alpha/kernel/process.c | 16 + arch/alpha/kernel/ptrace.c | 15 +- arch/i386/Makefile | 2 +- arch/i386/kernel/Makefile | 2 +- arch/i386/kernel/entry.S | 57 +- arch/i386/kernel/head.S | 119 +- arch/i386/kernel/i386_ksyms.c | 6 +- arch/i386/kernel/init_task.c | 22 + arch/i386/kernel/irq.c | 83 +- arch/i386/kernel/irq.h | 76 +- arch/i386/kernel/process.c | 23 +- arch/i386/kernel/ptrace.c | 14 +- arch/i386/kernel/signal.c | 8 + arch/i386/kernel/smp.c | 753 +++++++------ arch/i386/kernel/time.c | 7 +- arch/i386/kernel/trampoline.S | 41 +- arch/i386/kernel/traps.c | 12 +- arch/i386/kernel/vm86.c | 20 +- arch/i386/mm/fault.c | 5 +- arch/i386/mm/init.c | 23 +- arch/m68k/amiga/retz3fb.c | 1752 ------------------------------ arch/m68k/amiga/retz3fb.h | 286 ----- arch/m68k/kernel/process.c | 16 + arch/m68k/kernel/ptrace.c | 14 +- arch/mips/kernel/process.c | 16 + arch/mips/kernel/ptrace.c | 14 +- arch/mips/kernel/syscalls.h | 1 + arch/mips/kernel/traps.c | 25 +- arch/ppc/kernel/misc.S | 3 +- arch/ppc/kernel/process.c | 18 + arch/ppc/kernel/ptrace.c | 14 +- arch/ppc/mm/init.c | 109 +- arch/sparc/ap1000/bnet.c | 14 +- arch/sparc/ap1000/hw.c | 29 +- arch/sparc/ap1000/mpp.c | 1 + arch/sparc/kernel/process.c | 16 + arch/sparc/kernel/ptrace.c | 14 +- arch/sparc/kernel/sys_sunos.c | 46 +- arch/sparc/kernel/systbls.S | 29 +- arch/sparc64/kernel/process.c | 16 + drivers/block/ide-disk.c | 2 +- drivers/block/ide-probe.c | 2 +- drivers/block/ide.c | 2 +- drivers/char/dsp56k.c | 575 ---------- drivers/char/random.c | 102 +- drivers/char/tty_io.c | 24 +- drivers/char/vt.c | 2 + drivers/net/ltpc.c | 2 +- drivers/sbus/char/creator.c | 49 - drivers/sbus/char/sunserial.c | 8 +- fs/binfmt_elf.c | 11 +- fs/dcache.c | 15 +- fs/dquot.c | 3 +- fs/exec.c | 9 +- fs/ext2/balloc.c | 55 +- fs/ext2/inode.c | 77 +- fs/ext2/ioctl.c | 8 + fs/ext2/namei.c | 2 +- fs/ext2/super.c | 3 + fs/fcntl.c | 6 +- fs/file_table.c | 179 ++- fs/inode.c | 10 +- fs/lockd/svcsubs.c | 8 +- fs/msdos/msdosfs_syms.c | 2 +- fs/namei.c | 22 +- fs/ncpfs/inode.c | 5 +- fs/nfsd/vfs.c | 4 + fs/open.c | 2 +- fs/pipe.c | 11 +- fs/proc/array.c | 70 +- fs/proc/base.c | 13 +- fs/proc/fd.c | 30 +- fs/proc/inode.c | 21 +- fs/proc/link.c | 9 +- fs/proc/mem.c | 14 +- fs/proc/root.c | 54 +- fs/smbfs/inode.c | 5 +- fs/umsdos/namei.c | 3 + fs/vfat/namei.c | 2 + include/asm-alpha/processor.h | 2 +- include/asm-alpha/spinlock.h | 8 +- include/asm-i386/current.h | 11 +- include/asm-i386/delay.h | 2 +- include/asm-i386/hardirq.h | 2 +- include/asm-i386/locks.h | 2 +- include/asm-i386/processor.h | 22 +- include/asm-i386/smp.h | 8 +- include/asm-i386/spinlock.h | 40 +- include/asm-m68k/dsp56k.h | 35 - include/asm-m68k/namei.h | 21 - include/asm-m68k/poll.h | 21 - include/asm-m68k/processor.h | 2 +- include/asm-m68k/smp_lock.h | 14 - include/asm-m68k/softirq.h | 56 - include/asm-m68k/spinlock.h | 23 - include/asm-mips/processor.h | 2 +- include/asm-mips/unistd.h | 2 +- include/asm-ppc/processor.h | 2 +- include/asm-sparc/asm_offsets.h | 160 +-- include/asm-sparc/linux_logo.h | 1045 ------------------ include/asm-sparc/processor.h | 4 +- include/asm-sparc/termbits.h | 8 +- include/asm-sparc64/fs_mount.h | 44 + include/asm-sparc64/linux_logo.h | 1042 ------------------ include/asm-sparc64/processor.h | 4 +- include/asm-sparc64/termbits.h | 6 + include/linux/ext2_fs.h | 23 +- include/linux/ext2_fs_sb.h | 3 + include/linux/file.h | 25 +- include/linux/fs.h | 48 +- include/linux/mm.h | 51 +- include/linux/sched.h | 136 ++- include/linux/slab.h | 1 + include/linux/zorro.h | 639 ----------- init/main.c | 56 +- ipc/shm.c | 40 +- kernel/exit.c | 160 +-- kernel/fork.c | 77 +- kernel/ksyms.c | 1 + kernel/printk.c | 2 +- kernel/sched.c | 95 +- kernel/softirq.c | 2 +- kernel/sys.c | 54 +- mm/mmap.c | 685 +++--------- mm/swapfile.c | 25 +- mm/vmscan.c | 76 +- net/socket.c | 1 - 129 files changed, 2098 insertions(+), 7864 deletions(-) create mode 100644 arch/i386/kernel/init_task.c create mode 100644 include/asm-sparc64/fs_mount.h diff --git a/Documentation/Changes b/Documentation/Changes index 3b1fed283bd0..78509d856498 100644 --- a/Documentation/Changes +++ b/Documentation/Changes @@ -29,7 +29,7 @@ English-language HTML version. Also, don't forget http://www.linuxhq.com/ for all your Linux kernel needs. -Last updated: April 17, 1997. +Last updated: April 24, 1997. Current Author: Chris Ricker (gt1355b@prism.gatech.edu). Current Minimal Requirements @@ -45,11 +45,11 @@ encountered a bug! - Dynamic Linker (ld.so) 1.8.5 - Linux C++ Library 2.7.2.1 - Procps 1.01 -- Mount 2.6e +- Mount 2.6g - Net-tools 1.32-alpha - Loadlin 1.6a - Sh-utils 1.16 -- Autofs 970409 +- Autofs 0.2.2 - NFS 0.4.21 Upgrade notes @@ -295,14 +295,14 @@ ftp://prep.ai.mit.edu/pub/gnu/sh-utils-1.16.tar.gz Mount ===== -The 2.6e release: -ftp://ftp.win.tue.nl/pub/linux/util/mount-2.6e.tar.gz +The 2.6g release: +ftp://ftp.win.tue.nl/pub/linux/util/mount-2.6g.tar.gz Autofs ====== -The 970409 release: -ftp://ftp.kernel.org/pub/linux/daemons/autofs/autofs-970409.tar.gz +The 0.2.2 release: +ftp://ftp.kernel.org/pub/linux/daemons/autofs/autofs-0.2.2.tar.gz NFS === diff --git a/Makefile b/Makefile index 73eba89ec149..84506010cfc4 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 1 -SUBLEVEL = 36 +SUBLEVEL = 37 ARCH := $(shell uname -m | sed s/i.86/i386/) diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index 2eb2d51b7477..4db00a97ea31 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c @@ -38,6 +38,22 @@ #include #include +/* + * Initial task structure. Make this a per-architecture thing, + * because different architectures tend to have different + * alignment requirements and potentially different initial + * setup. + */ +static unsigned long init_kernel_stack[1024] = { STACK_MAGIC, }; +unsigned long init_user_stack[1024] = { STACK_MAGIC, }; +static struct vm_area_struct init_mmap = INIT_MMAP; +static struct fs_struct init_fs = INIT_FS; +static struct files_struct init_files = INIT_FILES; +static struct signal_struct init_signals = INIT_SIGNALS; + +struct mm_struct init_mm = INIT_MM; +struct task_struct init_task = INIT_TASK; + /* * No need to acquire the kernel lock, we're entirely local.. */ diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c index 019fb6b952c3..b434d356d46a 100644 --- a/arch/alpha/kernel/ptrace.c +++ b/arch/alpha/kernel/ptrace.c @@ -107,19 +107,6 @@ static unsigned short regoff[] = { static long zero; - -/* change a pid into a task struct. */ -static inline struct task_struct * get_task(int pid) -{ - int i; - - for (i = 1; i < NR_TASKS; i++) { - if (task[i] != NULL && (task[i]->pid == pid)) - return task[i]; - } - return NULL; -} - /* * Get contents of register REGNO in task TASK. */ @@ -507,7 +494,7 @@ asmlinkage long sys_ptrace(long request, long pid, long addr, long data, if (pid == 1) /* you may not mess with init */ goto out; ret = -ESRCH; - if (!(child = get_task(pid))) + if (!(child = find_task_by_pid(pid))) goto out; if (request == PTRACE_ATTACH) { ret = -EPERM; diff --git a/arch/i386/Makefile b/arch/i386/Makefile index c67b8671a623..ca3b12590019 100644 --- a/arch/i386/Makefile +++ b/arch/i386/Makefile @@ -45,7 +45,7 @@ ifdef SMP CFLAGS := $(CFLAGS) -D__SMP__ endif -HEAD := arch/i386/kernel/head.o +HEAD := arch/i386/kernel/head.o arch/i386/kernel/init_task.o SUBDIRS := $(SUBDIRS) arch/i386/kernel arch/i386/mm arch/i386/lib CORE_FILES := arch/i386/kernel/kernel.o arch/i386/mm/mm.o $(CORE_FILES) diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile index e04fb5efb776..9491ef562f8c 100644 --- a/arch/i386/kernel/Makefile +++ b/arch/i386/kernel/Makefile @@ -15,7 +15,7 @@ else $(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o endif -all: kernel.o head.o +all: kernel.o head.o init_task.o O_TARGET := kernel.o O_OBJS := process.o signal.o entry.o traps.o irq.o vm86.o bios32.o \ diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S index 84fe0c7fde66..fc5d4822a67b 100644 --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S @@ -112,6 +112,7 @@ ENOSYS = 38 #ifdef __SMP__ /* Get the processor ID multiplied by 4 */ +#if 0 #define GET_PROCESSOR_OFFSET(reg) \ movl SYMBOL_NAME(apic_reg), reg; \ movl 32(reg), reg; \ @@ -121,7 +122,11 @@ ENOSYS = 38 #define GET_CURRENT(reg) \ GET_PROCESSOR_OFFSET(reg) \ movl SYMBOL_NAME(current_set)(reg),reg +#endif +#define GET_CURRENT(reg) \ + movl %esp, reg; \ + andl $-8192, reg; #else #define GET_CURRENT(reg) \ @@ -149,6 +154,7 @@ ENTRY(lcall7) popl %eax jmp ret_from_sys_call + #ifdef __SMP__ ALIGN .globl ret_from_smpfork @@ -157,15 +163,12 @@ ret_from_smpfork: jmp ret_from_sys_call #endif /* __SMP__ */ - ALIGN -handle_bottom_half: - pushl $2f - jmp SYMBOL_NAME(do_bottom_half) - - ALIGN -reschedule: - pushl $ret_from_sys_call - jmp SYMBOL_NAME(schedule) # test +/* + * Return to user mode is not as complex as all this looks, + * but we want the default path for a system call return to + * go as quickly as possible which is why some of this is + * less clear than it otherwise should be. + */ ENTRY(system_call) pushl %eax # save orig_eax @@ -180,24 +183,19 @@ ENTRY(system_call) ALIGN .globl ret_from_sys_call .globl ret_from_intr -ret_from_intr: ret_from_sys_call: - GET_CURRENT(%ebx) movl SYMBOL_NAME(bh_mask),%eax andl SYMBOL_NAME(bh_active),%eax jne handle_bottom_half -2: movl EFLAGS(%esp),%eax # mix EFLAGS and CS - movb CS(%esp),%al - testl $(VM_MASK | 3),%eax # return to VM86 mode or non-supervisor? - je 1f +ret_with_reschedule: cmpl $0,SYMBOL_NAME(need_resched) jne reschedule + GET_CURRENT(%ebx) movl blocked(%ebx),%eax movl %eax,%esi # save blocked in %esi for signal handling notl %eax andl signal(%ebx),%eax jne signal_return -1: RESTORE_ALL ALIGN signal_return: @@ -230,6 +228,29 @@ badsys: movl $-ENOSYS,EAX(%esp) jmp ret_from_sys_call + ALIGN +ret_from_exception: + movl SYMBOL_NAME(bh_mask),%eax + andl SYMBOL_NAME(bh_active),%eax + jne handle_bottom_half + ALIGN +ret_from_intr: + movl EFLAGS(%esp),%eax # mix EFLAGS and CS + movb CS(%esp),%al + testl $(VM_MASK | 3),%eax # return to VM86 mode or non-supervisor? + jne ret_with_reschedule + RESTORE_ALL + + ALIGN +handle_bottom_half: + pushl $ret_from_intr + jmp SYMBOL_NAME(do_bottom_half) + + ALIGN +reschedule: + pushl $ret_from_sys_call + jmp SYMBOL_NAME(schedule) # test + ENTRY(divide_error) pushl $0 # no error code @@ -260,7 +281,7 @@ error_code: GET_CURRENT(%ebx) call *%ecx addl $8,%esp - jmp ret_from_sys_call + jmp ret_from_exception ENTRY(coprocessor_error) pushl $0 @@ -271,7 +292,7 @@ ENTRY(device_not_available) pushl $-1 # mark this as an int SAVE_ALL GET_CURRENT(%ebx) - pushl $ret_from_sys_call + pushl $ret_from_exception movl %cr0,%eax testl $0x4,%eax # EM (math emulation bit) je SYMBOL_NAME(math_state_restore) diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S index 2bd095997eed..be0f864e03ea 100644 --- a/arch/i386/kernel/head.S +++ b/arch/i386/kernel/head.S @@ -39,15 +39,16 @@ startup_32: jz 1f /* * New page tables may be in 4Mbyte page mode and may - * be using the global pages. + * be using the global pages. */ +#define mmu_cr4_features $128+16 #ifdef GAS_KNOWS_CR4 movl %cr4,%eax # Turn on 4Mb pages - orl $16+128,%eax + orl mmu_cr4_features,%eax movl %eax,%cr4 #else .byte 0x0f,0x20,0xe0 - orl $16+128,%eax + orl mmu_cr4_features,%eax .byte 0x0f,0x22,0xe0 #endif movl %eax,%cr3 /* flush TLB as per app note */ @@ -305,15 +306,53 @@ rp_sidt: jne rp_sidt ret +stack_start: + .long SYMBOL_NAME(init_task_union)+8192 + .long KERNEL_DS + +/* This is the default interrupt "handler" :-) */ +int_msg: + .asciz "Unknown interrupt\n" + ALIGN +ignore_int: + cld + pushl %eax + pushl %ecx + pushl %edx + push %ds + movl $(KERNEL_DS),%eax + mov %ax,%ds + mov %ax,%es + mov %ax,%fs + pushl $int_msg + call SYMBOL_NAME(printk) + popl %eax + pop %ds + popl %edx + popl %ecx + popl %eax + iret + +/* + * The interrupt descriptor table has room for 256 idt's + */ + ALIGN +.word 0 +idt_descr: + .word 256*8-1 # idt contains 256 entries + .long SYMBOL_NAME(idt) + + ALIGN +.word 0 +gdt_descr: +#ifdef CONFIG_APM + .word (11+2*NR_TASKS)*8-1 +#else + .word (8+2*NR_TASKS)*8-1 +#endif + .long SYMBOL_NAME(gdt) /* - * page 0 is made non-existent, so that kernel NULL pointer references get - * caught. Thus the swapper page directory has been moved to 0x101000 - * with the introduction of the compressed boot code. Theoretically, - * the original design of overlaying the startup code with the swapper - * page directory is still possible --- it would reduce the size of the kernel - * by 2-3k. This would be a good thing to do at some point..... - * * This is initialized to create a identity-mapping at 0-4M (for bootup * purposes) and another mapping of the 0-4M area at virtual address * 0xC0000000. @@ -471,63 +510,29 @@ ENTRY(empty_bad_page_table) ENTRY(empty_zero_page) .org 0x6000 - -stack_start: - .long SYMBOL_NAME(init_user_stack)+4096 - .long KERNEL_DS - -/* This is the default interrupt "handler" :-) */ -int_msg: - .asciz "Unknown interrupt\n" - ALIGN -ignore_int: - cld - pushl %eax - pushl %ecx - pushl %edx - push %ds - push %es - push %fs - movl $(KERNEL_DS),%eax - mov %ax,%ds - mov %ax,%es - mov %ax,%fs - pushl $int_msg - call SYMBOL_NAME(printk) - popl %eax - pop %fs - pop %es - pop %ds - popl %edx - popl %ecx - popl %eax - iret +ENTRY(this_must_match_init_task) /* - * The interrupt descriptor table has room for 256 idt's + * This starts the data section. Note that the above is all + * in the text section because it has alignment requirements + * that we cannot fulfill any other way. */ - ALIGN -.word 0 -idt_descr: - .word 256*8-1 # idt contains 256 entries - .long SYMBOL_NAME(idt) +.data +ALIGN +/* 256 quadwords - 2048 bytes of idt */ ENTRY(idt) .fill 256,8,0 # idt is uninitialized - ALIGN -.word 0 -gdt_descr: -#ifdef CONFIG_APM - .word (11+2*NR_TASKS)*8-1 -#else - .word (8+2*NR_TASKS)*8-1 -#endif - .long SYMBOL_NAME(gdt) - /* * This gdt setup gives the kernel a 1GB address space at virtual * address 0xC0000000 - space enough for expansion, I hope. + * + * This contains up to 8192 quadwords depending on NR_TASKS - 64kB of + * gdt entries. Ugh. + * + * NOTE! Make sure the gdt descriptor in head.S matches this if you + * change anything. */ ENTRY(gdt) .quad 0x0000000000000000 /* NULL descriptor */ diff --git a/arch/i386/kernel/i386_ksyms.c b/arch/i386/kernel/i386_ksyms.c index 8c16f02041f2..3aec838cb931 100644 --- a/arch/i386/kernel/i386_ksyms.c +++ b/arch/i386/kernel/i386_ksyms.c @@ -36,11 +36,13 @@ EXPORT_SYMBOL(__intel_bh_counter); /* Networking helper routines. */ EXPORT_SYMBOL(csum_partial_copy); +EXPORT_SYMBOL(synchronize_irq); + #ifdef __SMP__ EXPORT_SYMBOL(apic_reg); /* Needed internally for the I386 inlines */ EXPORT_SYMBOL(cpu_data); -EXPORT_SYMBOL(kernel_flag); -EXPORT_SYMBOL(active_kernel_processor); +EXPORT_SYMBOL_NOVERS(kernel_flag); +EXPORT_SYMBOL_NOVERS(active_kernel_processor); EXPORT_SYMBOL(smp_invalidate_needed); EXPORT_SYMBOL_NOVERS(__lock_kernel); diff --git a/arch/i386/kernel/init_task.c b/arch/i386/kernel/init_task.c new file mode 100644 index 000000000000..cc0a19231f19 --- /dev/null +++ b/arch/i386/kernel/init_task.c @@ -0,0 +1,22 @@ +#include +#include + +#include + +static struct vm_area_struct init_mmap = INIT_MMAP; +static struct fs_struct init_fs = INIT_FS; +static struct files_struct init_files = INIT_FILES; +static struct signal_struct init_signals = INIT_SIGNALS; +struct mm_struct init_mm = INIT_MM; + +/* + * Initial task structure. + * + * We need to make sure that this is 8192-byte aligned due to the + * way process stacks are handled. This is done by making sure + * the linker maps this in the .text segment right after head.S, + * and making head.S ensure the proper alignment. + * + * The things we do for performance.. + */ +union task_union init_task_union __attribute__((__section__(".text"))) = { INIT_TASK }; diff --git a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c index 95a7b525fad7..6ca54c7313ec 100644 --- a/arch/i386/kernel/irq.c +++ b/arch/i386/kernel/irq.c @@ -93,6 +93,7 @@ void disable_irq(unsigned int irq_nr) save_flags(flags); cli(); mask_irq(irq_nr); + synchronize_irq(); restore_flags(flags); } @@ -168,17 +169,6 @@ static void (*interrupt[17])(void) = { IRQ12_interrupt, IRQ13_interrupt, IRQ14_interrupt, IRQ15_interrupt }; -static void (*fast_interrupt[16])(void) = { - fast_IRQ0_interrupt, fast_IRQ1_interrupt, - fast_IRQ2_interrupt, fast_IRQ3_interrupt, - fast_IRQ4_interrupt, fast_IRQ5_interrupt, - fast_IRQ6_interrupt, fast_IRQ7_interrupt, - fast_IRQ8_interrupt, fast_IRQ9_interrupt, - fast_IRQ10_interrupt, fast_IRQ11_interrupt, - fast_IRQ12_interrupt, fast_IRQ13_interrupt, - fast_IRQ14_interrupt, fast_IRQ15_interrupt -}; - static void (*bad_interrupt[16])(void) = { bad_IRQ0_interrupt, bad_IRQ1_interrupt, bad_IRQ2_interrupt, bad_IRQ3_interrupt, @@ -240,14 +230,10 @@ int get_irq_list(char *buf) action = irq_action[i]; if (!action) continue; - len += sprintf(buf+len, "%2d: %10u %c %s", - i, kstat.interrupts[i], - (action->flags & SA_INTERRUPT) ? '+' : ' ', - action->name); + len += sprintf(buf+len, "%2d: %10u %s", + i, kstat.interrupts[i], action->name); for (action=action->next; action; action = action->next) { - len += sprintf(buf+len, ",%s %s", - (action->flags & SA_INTERRUPT) ? " +" : "", - action->name); + len += sprintf(buf+len, ", %s", action->name); } len += sprintf(buf+len, "\n"); } @@ -298,13 +284,9 @@ int get_smp_prof_list(char *buf) { for (j=0;jflags & SA_INTERRUPT) ? '+' : ' ', - action->name); + len += sprintf(buf+len, " %s", action->name); for (action=action->next; action; action = action->next) { - len += sprintf(buf+len, ",%s %s", - (action->flags & SA_INTERRUPT) ? " +" : "", - action->name); + len += sprintf(buf+len, ", %s", action->name); } len += sprintf(buf+len, "\n"); } @@ -519,7 +501,8 @@ void __global_restore_flags(unsigned long flags) { switch (flags) { case 0: - __global_sti(); + release_irqlock(smp_processor_id()); + __sti(); break; case 1: __global_cli(); @@ -533,11 +516,9 @@ void __global_restore_flags(unsigned long flags) #endif /* - * do_IRQ handles IRQ's that have been installed without the - * SA_INTERRUPT flag: it uses the full signal-handling return - * and runs with other interrupts enabled. All relatively slow - * IRQ's should use this format: notably the keyboard/timer - * routines. + * do_IRQ handles all normal device IRQ's (the special + * SMP cross-CPU interrupts have their own specific + * handlers). */ asmlinkage void do_IRQ(int irq, struct pt_regs * regs) { @@ -547,8 +528,6 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs) irq_enter(cpu, irq); kstat.interrupts[irq]++; - /* slow interrupts run with interrupts enabled */ - __sti(); action = *(irq + irq_action); do_random = 0; while (action) { @@ -559,30 +538,17 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs) if (do_random & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); irq_exit(cpu, irq); -} - -/* - * do_fast_IRQ handles IRQ's that don't need the fancy interrupt return - * stuff - the handler is also running with interrupts disabled unless - * it explicitly enables them later. - */ -asmlinkage void do_fast_IRQ(int irq) -{ - struct irqaction * action; - int do_random, cpu = smp_processor_id(); - irq_enter(cpu, irq); - kstat.interrupts[irq]++; - action = *(irq + irq_action); - do_random = 0; - while (action) { - do_random |= action->flags; - action->handler(irq, action->dev_id, NULL); - action = action->next; + /* + * This should be conditional: we should really get + * a return code from the irq handler to tell us + * whether the handler wants us to do software bottom + * half handling or not.. + */ + if (1) { + if (bh_active & bh_mask) + do_bottom_half(); } - if (do_random & SA_SAMPLE_RANDOM) - add_interrupt_randomness(irq); - irq_exit(cpu, irq); } int setup_x86_irq(int irq, struct irqaction * new) @@ -597,10 +563,6 @@ int setup_x86_irq(int irq, struct irqaction * new) if (!(old->flags & new->flags & SA_SHIRQ)) return -EBUSY; - /* Can't share interrupts unless both are same type */ - if ((old->flags ^ new->flags) & SA_INTERRUPT) - return -EBUSY; - /* add new interrupt at end of irq queue */ do { p = &old->next; @@ -617,10 +579,7 @@ int setup_x86_irq(int irq, struct irqaction * new) *p = new; if (!shared) { - if (new->flags & SA_INTERRUPT) - set_intr_gate(0x20+irq,fast_interrupt[irq]); - else - set_intr_gate(0x20+irq,interrupt[irq]); + set_intr_gate(0x20+irq,interrupt[irq]); unmask_irq(irq); } restore_flags(flags); diff --git a/arch/i386/kernel/irq.h b/arch/i386/kernel/irq.h index 3a349f20a04c..26fc98911746 100644 --- a/arch/i386/kernel/irq.h +++ b/arch/i386/kernel/irq.h @@ -23,7 +23,10 @@ static inline void irq_enter(int cpu, int irq) hardirq_enter(cpu); while (test_bit(0,&global_irq_lock)) { if ((unsigned char) cpu == global_irq_holder) { - printk("BAD! Local interrupts enabled, global disabled\n"); + static int printed = 0; + if (!printed) + printk("BAD! Local interrupts enabled, global disabled\n"); + printed++; break; } STUCK; @@ -64,18 +67,8 @@ static inline void irq_exit(int cpu, int irq) "mov %dx,%es\n\t" /* - * SAVE_MOST/RESTORE_MOST is used for the faster version of IRQ handlers, - * installed by using the SA_INTERRUPT flag. These kinds of IRQ's don't - * call the routines that do signal handling etc on return, and can have - * more relaxed register-saving etc. They are also atomic, and are thus - * suited for small, fast interrupts like the serial lines or the harddisk - * drivers, which don't actually need signal handling etc. - * - * Also note that we actually save only those registers that are used in - * C subroutines (%eax, %edx and %ecx), so if you do something weird, - * you're on your own. The only segments that are saved (not counting the - * automatic stack and code segment handling) are %ds and %es, and they - * point to kernel space. No messing around with %fs here. + * These are used just for the "bad" interrupt handlers, + * which just clear the mask and return.. */ #define SAVE_MOST \ "cld\n\t" \ @@ -96,24 +89,6 @@ static inline void irq_exit(int cpu, int irq) "pop %es\n\t" \ "iret" -/* - * Some fast irq handlers might want to access saved registers (mostly - * cs or flags) - */ - -struct fast_irq_regs { - long ecx; - long edx; - long eax; - int xds; - int xes; - long eip; - int xcs; - long eflags; - long esp; - int xss; -}; - /* * The "inb" instructions are not needed, but seem to change the timings * a bit - without them it seems that the harddisk driver won't work on @@ -164,24 +139,11 @@ struct fast_irq_regs { #define IRQ_NAME2(nr) nr##_interrupt(void) #define IRQ_NAME(nr) IRQ_NAME2(IRQ##nr) -#define FAST_IRQ_NAME(nr) IRQ_NAME2(fast_IRQ##nr) #define BAD_IRQ_NAME(nr) IRQ_NAME2(bad_IRQ##nr) -#ifdef __SMP__ - #define GET_CURRENT \ - "movl "SYMBOL_NAME_STR(apic_reg)", %ebx\n\t" \ - "movl 32(%ebx), %ebx\n\t" \ - "shrl $22,%ebx\n\t" \ - "andl $0x3C,%ebx\n\t" \ - "movl " SYMBOL_NAME_STR(current_set) "(,%ebx),%ebx\n\t" - -#else - -#define GET_CURRENT \ - "movl " SYMBOL_NAME_STR(current_set) ",%ebx\n\t" - -#endif + "movl %esp, %ebx\n\t" \ + "andl $-8192, %ebx\n\t" #ifdef __SMP__ @@ -205,18 +167,17 @@ __asm__( \ "\n"__ALIGN_STR"\n" \ SYMBOL_NAME_STR(x) ":\n\t" \ "pushl $-1\n\t" \ - SAVE_ALL \ - "movl %esp,%eax\n\t" \ - "pushl %eax\n\t" \ + SAVE_ALL \ + "movl %esp,%eax\n\t" \ + "pushl %eax\n\t" \ "call "SYMBOL_NAME_STR(smp_##x)"\n\t" \ - "addl $4,%esp\n\t" \ + "addl $4,%esp\n\t" \ "jmp ret_from_intr\n"); #endif /* __SMP__ */ #define BUILD_IRQ(chip,nr,mask) \ asmlinkage void IRQ_NAME(nr); \ -asmlinkage void FAST_IRQ_NAME(nr); \ asmlinkage void BAD_IRQ_NAME(nr); \ __asm__( \ "\n"__ALIGN_STR"\n" \ @@ -232,27 +193,16 @@ SYMBOL_NAME_STR(IRQ) #nr "_interrupt:\n\t" \ UNBLK_##chip(mask) \ "jmp ret_from_intr\n" \ "\n"__ALIGN_STR"\n" \ -SYMBOL_NAME_STR(fast_IRQ) #nr "_interrupt:\n\t" \ - SAVE_MOST \ - ACK_##chip(mask,(nr&7)) \ - "pushl $" #nr "\n\t" \ - "call "SYMBOL_NAME_STR(do_fast_IRQ)"\n\t" \ - "addl $4,%esp\n\t" \ - UNBLK_##chip(mask) \ - RESTORE_MOST \ -"\n"__ALIGN_STR"\n" \ SYMBOL_NAME_STR(bad_IRQ) #nr "_interrupt:\n\t" \ SAVE_MOST \ ACK_##chip(mask,(nr&7)) \ RESTORE_MOST); - + #define BUILD_TIMER_IRQ(chip,nr,mask) \ asmlinkage void IRQ_NAME(nr); \ -asmlinkage void FAST_IRQ_NAME(nr); \ asmlinkage void BAD_IRQ_NAME(nr); \ __asm__( \ "\n"__ALIGN_STR"\n" \ -SYMBOL_NAME_STR(fast_IRQ) #nr "_interrupt:\n\t" \ SYMBOL_NAME_STR(bad_IRQ) #nr "_interrupt:\n\t" \ SYMBOL_NAME_STR(IRQ) #nr "_interrupt:\n\t" \ "pushl $-"#nr"-2\n\t" \ diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index fe4723951cd0..f738eb9a3075 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c @@ -149,7 +149,8 @@ int cpu_idle(void *unused) current->priority = -100; while(1) { - if(cpu_data[smp_processor_id()].hlt_works_ok && !hlt_counter && !need_resched) + if(cpu_data[hard_smp_processor_id()].hlt_works_ok && + !hlt_counter && !need_resched) __asm("hlt"); /* * tq_scheduler currently assumes we're running in a process @@ -324,11 +325,14 @@ void machine_restart(char * __unused) pg0 [0] = 7; - /* Use `swapper_pg_dir' as our page directory. Don't bother with - `SET_PAGE_DIR' because interrupts are disabled and we're rebooting. - This instruction flushes the TLB. */ + /* + * Use `swapper_pg_dir' as our page directory. We bother with + * `SET_PAGE_DIR' because although might be rebooting, but if we change + * the way we set root page dir in the future, then we wont break a + * seldom used feature ;) + */ - __asm__ __volatile__ ("movl %0,%%cr3" : : "a" (swapper_pg_dir) : "memory"); + SET_PAGE_DIR(current,swapper_pg_dir); /* Write 0x1234 to absolute memory location 0x472. The BIOS reads this on booting to tell it to "Bypass memory test (also warm @@ -473,6 +477,8 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp, int i; struct pt_regs * childregs; + p->tss.tr = _TSS(nr); + p->tss.ldt = _LDT(nr); p->tss.es = KERNEL_DS; p->tss.cs = KERNEL_CS; p->tss.ss = KERNEL_DS; @@ -480,9 +486,8 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp, p->tss.fs = USER_DS; p->tss.gs = USER_DS; p->tss.ss0 = KERNEL_DS; - p->tss.esp0 = p->kernel_stack_page + PAGE_SIZE; - p->tss.tr = _TSS(nr); - childregs = ((struct pt_regs *) (p->kernel_stack_page + PAGE_SIZE)) - 1; + p->tss.esp0 = 2*PAGE_SIZE + (unsigned long) p; + childregs = ((struct pt_regs *) (p->tss.esp0)) - 1; p->tss.esp = (unsigned long) childregs; #ifdef __SMP__ p->tss.eip = (unsigned long) ret_from_smpfork; @@ -496,7 +501,6 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp, childregs->eax = 0; childregs->esp = esp; p->tss.back_link = 0; - p->tss.ldt = _LDT(nr); if (p->ldt) { p->ldt = (struct desc_struct*) vmalloc(LDT_ENTRIES*LDT_ENTRY_SIZE); if (p->ldt != NULL) @@ -512,6 +516,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp, p->tss.io_bitmap[i] = ~0; if (last_task_used_math == current) __asm__("clts ; fnsave %0 ; frstor %0":"=m" (p->tss.i387)); + return 0; } diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c index 920d1bc1c400..a446304a20d5 100644 --- a/arch/i386/kernel/ptrace.c +++ b/arch/i386/kernel/ptrace.c @@ -34,18 +34,6 @@ */ #define EFL_OFFSET ((EFL-2)*4-sizeof(struct pt_regs)) -/* change a pid into a task struct. */ -static inline struct task_struct * get_task(int pid) -{ - int i; - - for (i = 1; i < NR_TASKS; i++) { - if (task[i] != NULL && (task[i]->pid == pid)) - return task[i]; - } - return NULL; -} - /* * this routine will get a word off of the processes privileged stack. * the offset is how far from the base addr as stored in the TSS. @@ -381,7 +369,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) if (pid == 1) /* you may not mess with init */ goto out; ret = -ESRCH; - if (!(child = get_task(pid))) + if (!(child = find_task_by_pid(pid))) goto out; ret = -EPERM; if (request == PTRACE_ATTACH) { diff --git a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c index 970c8c5d7e94..331b632daa58 100644 --- a/arch/i386/kernel/signal.c +++ b/arch/i386/kernel/signal.c @@ -318,6 +318,14 @@ asmlinkage int do_signal(unsigned long oldmask, struct pt_regs * regs) unsigned long signr; struct sigaction * sa; + /* + * We want the common case to go fast, which + * is why we may in certain cases get here from + * kernel mode. Just return without doing anything + * if so. + */ + if ((regs->xcs & 3) != 3) + return 1; mask = ~current->blocked; while ((signr = current->signal & mask)) { /* diff --git a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c index a1590f500c98..2b4f06905006 100644 --- a/arch/i386/kernel/smp.c +++ b/arch/i386/kernel/smp.c @@ -1,5 +1,5 @@ /* - * Intel MP v1.1/v1.4 specification support routines for multi-pentium + * Intel MP v1.1/v1.4 specification support routines for multi-pentium * hosts. * * (c) 1995 Alan Cox, CymruNET Ltd @@ -46,14 +46,15 @@ #include #include +#define __KERNEL_SYSCALLS__ +#include + #include "irq.h" extern unsigned long start_kernel, _etext; extern void update_one_process( struct task_struct *p, - unsigned long ticks, unsigned long user, - unsigned long system); -void setup_APIC_clock (void); - + unsigned long ticks, unsigned long user, + unsigned long system); /* * Some notes on processor bugs: * @@ -67,7 +68,7 @@ void setup_APIC_clock (void); * Pentium * There is a marginal case where REP MOVS on 100MHz SMP * machines with B stepping processors can fail. XXX should provide - * an L1cache=Writethrough or L1cache=off option. + * an L1cache=Writethrough or L1cache=off option. * * B stepping CPU's may hang. There are hardware work arounds * for this. We warn about it in case your board doesnt have the work @@ -91,12 +92,12 @@ void setup_APIC_clock (void); * If this sounds worrying believe me these bugs are ___RARE___ and * there's about nothing of note with C stepping upwards. */ - - + + /* * Why isn't this somewhere standard ?? */ - + extern __inline int max(int a,int b) { if(a>b) @@ -129,7 +130,6 @@ unsigned long apic_addr = 0xFEE00000; /* Address of APIC (defaults to 0xFEE000 unsigned long nlong = 0; /* dummy used for apic_reg address + 0x20 */ unsigned char *apic_reg=((unsigned char *)(&nlong))-0x20;/* Later set to the ioremap() of the APIC */ unsigned long apic_retval; /* Just debugging the assembler.. */ -unsigned char *kernel_stacks[NR_CPUS]; /* Kernel stack pointers for CPU's (debugging) */ static volatile unsigned char smp_cpu_in_msg[NR_CPUS]; /* True if this processor is sending an IPI */ @@ -195,10 +195,10 @@ static inline void ack_APIC_irq (void) apic_write(APIC_EOI, 0); } -/* +/* * Checksum an MP configuration block. */ - + static int mpf_checksum(unsigned char *mp, int len) { int sum=0; @@ -210,7 +210,7 @@ static int mpf_checksum(unsigned char *mp, int len) /* * Processor encoding in an MP configuration block */ - + static char *mpc_family(int family,int model) { static char n[32]; @@ -274,11 +274,11 @@ __initfunc(static int smp_read_mpc(struct mp_config_table *mpc)) /* set the local APIC address */ apic_addr = (unsigned long)phys_to_virt((unsigned long)mpc->mpc_lapic); - + /* * Now process the configuration blocks. */ - + while(countmpc_length) { switch(*mpt) @@ -290,13 +290,13 @@ __initfunc(static int smp_read_mpc(struct mp_config_table *mpc)) if(m->mpc_cpuflag&CPU_ENABLED) { printk("Processor #%d %s APIC version %d\n", - m->mpc_apicid, + m->mpc_apicid, mpc_family((m->mpc_cpufeature& CPU_FAMILY_MASK)>>8, (m->mpc_cpufeature& CPU_MODEL_MASK)>>4), m->mpc_apicver); -#ifdef SMP_DEBUG +#ifdef SMP_DEBUG if(m->mpc_featureflag&(1<<0)) printk(" Floating point unit present.\n"); if(m->mpc_featureflag&(1<<7)) @@ -305,7 +305,7 @@ __initfunc(static int smp_read_mpc(struct mp_config_table *mpc)) printk(" 64 bit compare & exchange supported.\n"); if(m->mpc_featureflag&(1<<9)) printk(" Internal APIC present.\n"); -#endif +#endif if(m->mpc_cpuflag&CPU_BOOTPROCESSOR) { SMP_PRINTK((" Bootup CPU\n")); @@ -313,10 +313,10 @@ __initfunc(static int smp_read_mpc(struct mp_config_table *mpc)) } else /* Boot CPU already counted */ num_processors++; - + if(m->mpc_apicid>NR_CPUS) printk("Processor #%d unused. (Max %d processors).\n",m->mpc_apicid, NR_CPUS); - else + else { cpu_present_map|=(1<mpc_apicid); apic_version[m->mpc_apicid]=m->mpc_apicver; @@ -337,7 +337,7 @@ __initfunc(static int smp_read_mpc(struct mp_config_table *mpc)) str)); mpt+=sizeof(*m); count+=sizeof(*m); - break; + break; } case MP_IOAPIC: { @@ -346,20 +346,20 @@ __initfunc(static int smp_read_mpc(struct mp_config_table *mpc)) if(m->mpc_flags&MPC_APIC_USABLE) { apics++; - printk("I/O APIC #%d Version %d at 0x%lX.\n", - m->mpc_apicid,m->mpc_apicver, - m->mpc_apicaddr); - io_apic_addr = (unsigned long)phys_to_virt(m->mpc_apicaddr); - } - mpt+=sizeof(*m); - count+=sizeof(*m); - break; + printk("I/O APIC #%d Version %d at 0x%lX.\n", + m->mpc_apicid,m->mpc_apicver, + m->mpc_apicaddr); + io_apic_addr = (unsigned long)phys_to_virt(m->mpc_apicaddr); + } + mpt+=sizeof(*m); + count+=sizeof(*m); + break; } case MP_INTSRC: { struct mpc_config_intsrc *m= (struct mpc_config_intsrc *)mpt; - + mpt+=sizeof(*m); count+=sizeof(*m); break; @@ -376,29 +376,29 @@ __initfunc(static int smp_read_mpc(struct mp_config_table *mpc)) } if(apics>1) printk("Warning: Multiple APIC's not supported.\n"); - return num_processors; + return num_processors; } /* * Scan the memory blocks for an SMP configuration block. */ - + __initfunc(int smp_scan_config(unsigned long base, unsigned long length)) { unsigned long *bp=phys_to_virt(base); struct intel_mp_floating *mpf; - + SMP_PRINTK(("Scan SMP from %p for %ld bytes.\n", bp,length)); if(sizeof(*mpf)!=16) printk("Error: MPF size\n"); - + while(length>0) { if(*bp==SMP_MAGIC_IDENT) { mpf=(struct intel_mp_floating *)bp; - if(mpf->mpf_length==1 && + if(mpf->mpf_length==1 && !mpf_checksum((unsigned char *)bp,16) && (mpf->mpf_specification == 1 || mpf->mpf_specification == 4) ) @@ -433,7 +433,7 @@ __initfunc(int smp_scan_config(unsigned long base, unsigned long length)) * We know that page 0 is not * used. Steal it for now! */ - + cfg=pg0[0]; pg0[0] = (apic_addr | 7); local_flush_tlb(); @@ -451,7 +451,7 @@ __initfunc(int smp_scan_config(unsigned long base, unsigned long length)) * * END OF HACK END OF HACK END OF HACK END OF HACK END OF HACK * - */ + */ /* * 2 CPUs, numbered 0 & 1. */ @@ -513,6 +513,7 @@ __initfunc(int smp_scan_config(unsigned long base, unsigned long length)) nlong = boot_cpu_id<<24; /* Dummy 'self' for bootup */ cpu_logical_map[0] = boot_cpu_id; global_irq_holder = boot_cpu_id; + current->processor = boot_cpu_id; printk("Processors: %d\n", num_processors); /* @@ -540,7 +541,7 @@ extern unsigned char trampoline_end []; * bootstrap into the page concerned. The caller * has made sure it's suitably aligned. */ - + __initfunc(static void install_trampoline(unsigned char *mp)) { memcpy(mp, trampoline_data, trampoline_end - trampoline_data); @@ -552,7 +553,7 @@ __initfunc(static void install_trampoline(unsigned char *mp)) * the kernel stacks at 4K, 8K, 12K... currently (0-03FF is preserved for SMM and * other things). */ - + __initfunc(unsigned long smp_alloc_memory(unsigned long mem_base)) { int size=(num_processors-1)*PAGE_SIZE; /* Number of stacks needed */ @@ -561,7 +562,7 @@ __initfunc(unsigned long smp_alloc_memory(unsigned long mem_base)) * Our stacks have to be below the 1Mb line, and mem_base on entry * is 4K aligned. */ - + if(virt_to_phys((void *)(mem_base+size))>=0x9F000) panic("smp_alloc_memory: Insufficient low memory for kernel stacks 0x%lx.\n", mem_base); kstack_base=(void *)mem_base; @@ -569,26 +570,12 @@ __initfunc(unsigned long smp_alloc_memory(unsigned long mem_base)) kstack_end=(void *)mem_base; return mem_base; } - -/* - * Hand out stacks one at a time. - */ - -__initfunc(static void *get_kernel_stack(void)) -{ - void *stack=kstack_base; - if(kstack_base>=kstack_end) - return NULL; - kstack_base+=PAGE_SIZE; - return stack; -} - /* * The bootstrap kernel entry code has set these up. Save them for * a given CPU */ - + __initfunc(void smp_store_cpu_info(int id)) { struct cpuinfo_x86 *c=&cpu_data[id]; @@ -615,7 +602,7 @@ __initfunc(void smp_store_cpu_info(int id)) * fired off. This allows the BP to have everything in order [we hope]. * At the end of this all the AP's will hit the system scheduling and off * we go. Each AP will load the system gdt's and jump through the kernel - * init into idle(). At this point the scheduler will one day take over + * init into idle(). At this point the scheduler will one day take over * and give them jobs to do. smp_callin is a standard routine * we use to track CPU's as they power up. */ @@ -634,74 +621,272 @@ __initfunc(void smp_callin(void)) extern void calibrate_delay(void); int cpuid=GET_APIC_ID(apic_read(APIC_ID)); unsigned long l; - + /* * Activate our APIC */ - - SMP_PRINTK(("CALLIN %d\n",smp_processor_id())); + + SMP_PRINTK(("CALLIN %d %d\n",hard_smp_processor_id(), smp_processor_id())); l=apic_read(APIC_SPIV); l|=(1<<8); /* Enable */ apic_write(APIC_SPIV,l); /* - * Set up our APIC timer. + * Set up our APIC timer. */ setup_APIC_clock (); sti(); /* * Get our bogomips. - */ + */ calibrate_delay(); SMP_PRINTK(("Stack at about %p\n",&cpuid)); - + /* * Save our processor parameters */ smp_store_cpu_info(cpuid); + /* * Allow the master to continue. - */ + */ set_bit(cpuid, (unsigned long *)&cpu_callin_map[0]); +} + +static int cpucount = 0; + +extern int cpu_idle(void * unused); + +/* + * Activate a secondary processor. + */ +__initfunc(int start_secondary(void *unused)) +{ + trap_init(); + init_IRQ(); + smp_callin(); + cpu_idle(NULL); +} + +/* + * Everything has been set up for the secondary + * CPU's - they just need to reload everything + * from the task structude + */ +__initfunc(void initialize_secondary(void)) +{ + struct thread_struct * p = ¤t->tss; + +printk("current = %p, real_esp = %p, real_eip = %p\n", current, p->esp, p->eip); +printk("start_secondary = %p, cpu=%d\n", start_secondary, smp_processor_id()); /* - * Until we are ready for SMP scheduling + * We don't actually need to load the full TSS, + * just the stack pointer and the eip. + */ + asm volatile("ltr %%ax": :"a" (p->tr)); + asm volatile( + "movl %0,%%esp\n\t" + "jmp *%1" + : + :"r" (p->esp),"r" (p->eip)); +} + +__initfunc(static void do_boot_cpu(int i)) +{ + unsigned long cfg; + pgd_t maincfg; + void *stack; + struct task_struct *idle; + unsigned long send_status, accept_status; + int timeout, num_starts, j; + + /* + * We need an idle process for each processor. */ - load_ldt(0); - local_flush_tlb(); - - while (cpu_number_map[cpuid] == -1) - barrier(); - while(!task[cpuid] || current_set[cpuid] != task[cpu_number_map[cpuid]]) - barrier(); + kernel_thread(start_secondary, NULL, CLONE_PID); + cpucount++; - local_flush_tlb(); - load_TR(cpu_number_map[cpuid]); + idle = task[cpucount]; + if (!idle) + panic("No idle process for CPU %d\n", i); - while(!smp_commenced) - barrier(); - + idle->processor = i; + cpu_logical_map[cpucount] = i; + cpu_number_map[i] = cpucount; + + /* This MUST be in the low 1MB range. That's ok, we're cool */ + stack = (void *) (4096+(char *)idle); + install_trampoline(stack); + + printk("Booting processor %d stack %p: ",i,stack); /* So we set what's up */ + + /* + * This grunge runs the startup process for + * the targeted processor. + */ + + SMP_PRINTK(("Setting warm reset code and vector.\n")); + + CMOS_WRITE(0xa, 0xf); local_flush_tlb(); + SMP_PRINTK(("1.\n")); + *((volatile unsigned short *) phys_to_virt(0x469)) = ((unsigned long)stack)>>4; + SMP_PRINTK(("2.\n")); + *((volatile unsigned short *) phys_to_virt(0x467)) = 0; + SMP_PRINTK(("3.\n")); + + maincfg=swapper_pg_dir[0]; + ((unsigned long *)swapper_pg_dir)[0]=0x102007; + + /* + * Be paranoid about clearing APIC errors. + */ + + if ( apic_version[i] & 0xF0 ) + { + apic_write(APIC_ESR, 0); + accept_status = (apic_read(APIC_ESR) & 0xEF); + } + + /* + * Status is now clean + */ - SMP_PRINTK(("Commenced..\n")); + send_status = 0; + accept_status = 0; + + /* + * Starting actual IPI sequence... + */ + + SMP_PRINTK(("Asserting INIT.\n")); + + /* + * Turn INIT on + */ + + cfg=apic_read(APIC_ICR2); + cfg&=0x00FFFFFF; + apic_write(APIC_ICR2, cfg|SET_APIC_DEST_FIELD(i)); /* Target chip */ + cfg=apic_read(APIC_ICR); + cfg&=~0xCDFFF; /* Clear bits */ + cfg |= (APIC_DEST_FIELD | APIC_DEST_LEVELTRIG + | APIC_DEST_ASSERT | APIC_DEST_DM_INIT); + apic_write(APIC_ICR, cfg); /* Send IPI */ + + udelay(200); + SMP_PRINTK(("Deasserting INIT.\n")); + + cfg=apic_read(APIC_ICR2); + cfg&=0x00FFFFFF; + apic_write(APIC_ICR2, cfg|SET_APIC_DEST_FIELD(i)); /* Target chip */ + cfg=apic_read(APIC_ICR); + cfg&=~0xCDFFF; /* Clear bits */ + cfg |= (APIC_DEST_FIELD | APIC_DEST_LEVELTRIG + | APIC_DEST_DM_INIT); + apic_write(APIC_ICR, cfg); /* Send IPI */ + + /* + * Should we send STARTUP IPIs ? + * + * Determine this based on the APIC version. + * If we don't have an integrated APIC, don't + * send the STARTUP IPIs. + */ + + if ( apic_version[i] & 0xF0 ) + num_starts = 2; + else + num_starts = 0; + + /* + * Run STARTUP IPI loop. + */ + + for (j = 1; !(send_status || accept_status) + && (j <= num_starts) ; j++) + { + SMP_PRINTK(("Sending STARTUP #%d.\n",j)); + apic_write(APIC_ESR, 0); + SMP_PRINTK(("After apic_write.\n")); + + /* + * STARTUP IPI + */ + + cfg=apic_read(APIC_ICR2); + cfg&=0x00FFFFFF; + apic_write(APIC_ICR2, cfg|SET_APIC_DEST_FIELD(i)); /* Target chip */ + cfg=apic_read(APIC_ICR); + cfg&=~0xCDFFF; /* Clear bits */ + cfg |= (APIC_DEST_FIELD + | APIC_DEST_DM_STARTUP + | (virt_to_phys(stack) >> 12)); /* Boot on the stack */ + SMP_PRINTK(("Before start apic_write.\n")); + apic_write(APIC_ICR, cfg); /* Kick the second */ + + SMP_PRINTK(("Startup point 1.\n")); + timeout = 0; + do { + SMP_PRINTK(("Sleeping.\n")); udelay(1000000); + udelay(10); + } while ( (send_status = (apic_read(APIC_ICR) & 0x1000)) + && (timeout++ < 1000)); + udelay(200); + accept_status = (apic_read(APIC_ESR) & 0xEF); + } + SMP_PRINTK(("After Startup.\n")); + + if (send_status) /* APIC never delivered?? */ + printk("APIC never delivered???\n"); + if (accept_status) /* Send accept error */ + printk("APIC delivery error (%lx).\n", accept_status); + + if( !(send_status || accept_status) ) + { + for(timeout=0;timeout<50000;timeout++) + { + if(cpu_callin_map[0]&(1< cpucount+1)) { - unsigned long send_status, accept_status; - int timeout, num_starts, j; - - /* - * We need a kernel stack for each processor. - */ - - stack=get_kernel_stack(); /* We allocated these earlier */ - if(stack==NULL) - panic("No memory for processor stacks.\n"); - - kernel_stacks[i]=(void *)phys_to_virt((unsigned long)stack); - install_trampoline(stack); - - printk("Booting processor %d stack %p: ",i,stack); /* So we set what's up */ - - /* - * This grunge runs the startup process for - * the targeted processor. - */ - - SMP_PRINTK(("Setting warm reset code and vector.\n")); - - /* - * Install a writable page 0 entry. - */ - - cfg=pg0[0]; - - CMOS_WRITE(0xa, 0xf); - pg0[0]=7; - local_flush_tlb(); - SMP_PRINTK(("1.\n")); - *((volatile unsigned short *) phys_to_virt(0x469)) = ((unsigned long)stack)>>4; - SMP_PRINTK(("2.\n")); - *((volatile unsigned short *) phys_to_virt(0x467)) = 0; - SMP_PRINTK(("3.\n")); - - /* - * Protect it again - */ - - pg0[0]= cfg; - local_flush_tlb(); - - /* walken modif - * enable mapping of the first 4M at virtual - * address zero - */ - - maincfg=swapper_pg_dir[0]; - ((unsigned long *)swapper_pg_dir)[0]=0x102007; - - /* no need to local_flush_tlb : - we are setting this up for the slave processor ! */ - - /* - * Be paranoid about clearing APIC errors. - */ - - if ( apic_version[i] & 0xF0 ) - { - apic_write(APIC_ESR, 0); - accept_status = (apic_read(APIC_ESR) & 0xEF); - } - - /* - * Status is now clean - */ - - send_status = 0; - accept_status = 0; - - /* - * Starting actual IPI sequence... - */ - - SMP_PRINTK(("Asserting INIT.\n")); - - /* - * Turn INIT on - */ - - cfg=apic_read(APIC_ICR2); - cfg&=0x00FFFFFF; - apic_write(APIC_ICR2, cfg|SET_APIC_DEST_FIELD(i)); /* Target chip */ - cfg=apic_read(APIC_ICR); - cfg&=~0xCDFFF; /* Clear bits */ - cfg |= (APIC_DEST_FIELD | APIC_DEST_LEVELTRIG - | APIC_DEST_ASSERT | APIC_DEST_DM_INIT); - apic_write(APIC_ICR, cfg); /* Send IPI */ - - udelay(200); - SMP_PRINTK(("Deasserting INIT.\n")); - - cfg=apic_read(APIC_ICR2); - cfg&=0x00FFFFFF; - apic_write(APIC_ICR2, cfg|SET_APIC_DEST_FIELD(i)); /* Target chip */ - cfg=apic_read(APIC_ICR); - cfg&=~0xCDFFF; /* Clear bits */ - cfg |= (APIC_DEST_FIELD | APIC_DEST_LEVELTRIG - | APIC_DEST_DM_INIT); - apic_write(APIC_ICR, cfg); /* Send IPI */ - - /* - * Should we send STARTUP IPIs ? - * - * Determine this based on the APIC version. - * If we don't have an integrated APIC, don't - * send the STARTUP IPIs. - */ - - if ( apic_version[i] & 0xF0 ) - num_starts = 2; - else - num_starts = 0; - - /* - * Run STARTUP IPI loop. - */ - - for (j = 1; !(send_status || accept_status) - && (j <= num_starts) ; j++) - { - SMP_PRINTK(("Sending STARTUP #%d.\n",j)); - - apic_write(APIC_ESR, 0); - SMP_PRINTK(("After apic_write.\n")); - - /* - * STARTUP IPI - */ - - cfg=apic_read(APIC_ICR2); - cfg&=0x00FFFFFF; - apic_write(APIC_ICR2, cfg|SET_APIC_DEST_FIELD(i)); /* Target chip */ - cfg=apic_read(APIC_ICR); - cfg&=~0xCDFFF; /* Clear bits */ - cfg |= (APIC_DEST_FIELD - | APIC_DEST_DM_STARTUP - | (((int)virt_to_phys(stack)) >> 12)); /* Boot on the stack */ - SMP_PRINTK(("Before start apic_write.\n")); - apic_write(APIC_ICR, cfg); /* Kick the second */ - - SMP_PRINTK(("Startup point 1.\n")); - timeout = 0; - do { - SMP_PRINTK(("Sleeping.\n")); udelay(1000000); - udelay(10); - } while ( (send_status = (apic_read(APIC_ICR) & 0x1000)) - && (timeout++ < 1000)); - udelay(200); - - accept_status = (apic_read(APIC_ESR) & 0xEF); - } - SMP_PRINTK(("After Startup.\n")); - - if (send_status) /* APIC never delivered?? */ - printk("APIC never delivered???\n"); - if (accept_status) /* Send accept error */ - printk("APIC delivery error (%lx).\n", accept_status); - - if( !(send_status || accept_status) ) - { - for(timeout=0;timeout<50000;timeout++) - { - if(cpu_callin_map[0]&(1< #include #include +#include #include #include @@ -379,11 +380,15 @@ static inline void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) do_timer(regs); /* * In the SMP case we use the local APIC timer interrupt to do the - * profiling. + * profiling, except when we simulate SMP mode on a uniprocessor + * system, in that case we have to call the local interrupt handler. */ #ifndef __SMP__ if (!user_mode(regs)) x86_do_profile(regs->eip); +#else + if (!smp_found_config) + smp_local_timer_interrupt(regs); #endif /* diff --git a/arch/i386/kernel/trampoline.S b/arch/i386/kernel/trampoline.S index 63bc51c5ea30..b6d7d54de15a 100644 --- a/arch/i386/kernel/trampoline.S +++ b/arch/i386/kernel/trampoline.S @@ -21,13 +21,9 @@ * and IP is zero. Thus, data addresses need to be absolute * (no relocation) and are taken with regard to r_base. * - * On the transition to protected mode, this page appears at - * address 8192, so protected mode addresses are with regard - * to p_base. - * * If you work on this file, check the object module with objdump * --full-contents --reloc to make sure there are no relocation - * entries. + * entries except for the gdt one.. */ #include @@ -39,14 +35,13 @@ ENTRY(trampoline_data) r_base = . -p_base = . - 8192 mov %cs, %ax # Code and data in the same place mov %ax, %ds mov %ax, %cx # Pass stack info to the 32bit boot shl $4, %cx # Segment -> Offset - add $4096, %cx # End of page is wanted + add $1024, %cx # Don't overwrite end of page (filled in by kernel_thread) mov $1, %bx # Flag an SMP trampoline cli # We should be safe anyway @@ -71,37 +66,7 @@ idt_48: gdt_48: .word 0x0800 # gdt limit = 2048, 256 GDT entries - .word gdt - p_base, 0x0 # gdt base = gdt (first SMP CPU) - # we load the others with first table - # saves rewriting gdt_48 for each -gdt: - .word 0, 0, 0, 0 # dummy - - .word 0, 0, 0, 0 # unused - -# walken modif - - .word 0xFFFF # 4 Gb - (0x100000*0x1000 = 4Gb) - .word 0x0000 # base address = 0 - .word 0x9A00 # code read / exec - .word 0x00CF # granularity = 4096, 386 (+5th nibble of limit) - - .word 0xFFFF # 4 Gb - (0x100000*0x1000 = 4Gb) - .word 0x0000 # base address = 0 - .word 0x9200 # data read / write - .word 0x00CF # granularity = 4096, 386 (+5th nibble of limit) - -# walken modif - -# .word 0x07FF # 8 Mb - limit = 2047 (2048 * 4096 = 8 Mb) -# .word 0x0000 # base address = 0 -# .word 0x9A00 # code read / exec -# .word 0x00C0 # granularity = 4096, 386 - -# .word 0x07FF # 8 Mb - limit = 2047 (2048 * 4096 = 8 Mb) -# .word 0x0000 # base address = 0 -# .word 0x9200 # data read / write -# .word 0x00C0 # granularity = 4096, 386 + .long gdt-0xc0000000 # gdt base = gdt (first SMP CPU) .globl SYMBOL_NAME(trampoline_end) SYMBOL_NAME_LABEL(trampoline_end) diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index 905cf5b13fda..feef85d8a3d9 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c @@ -27,6 +27,7 @@ #include #include #include +#include asmlinkage int system_call(void); asmlinkage void lcall7(void); @@ -138,10 +139,8 @@ static void show_registers(struct pt_regs *regs) printk("ds: %04x es: %04x ss: %04x\n", regs->xds & 0xffff, regs->xes & 0xffff, ss); store_TR(i); - if (STACK_MAGIC != *(unsigned long *)current->kernel_stack_page) - printk("Corrupted stack page\n"); printk("Process %s (pid: %d, process nr: %d, stackpage=%08lx)\nStack: ", - current->comm, current->pid, 0xffff & i, current->kernel_stack_page); + current->comm, current->pid, 0xffff & i, 4096+(unsigned long)current); stack = (unsigned long *) esp; for(i=0; i < kstack_depth_to_print; i++) { if (((long) stack & 4095) == 0) @@ -181,13 +180,19 @@ static void show_registers(struct pt_regs *regs) printk("\n"); } +spinlock_t die_lock; + /*static*/ void die_if_kernel(const char * str, struct pt_regs * regs, long err) { if ((regs->eflags & VM_MASK) || (3 & regs->xcs) == 3) return; console_verbose(); + spin_lock_irq(&die_lock); printk("%s: %04lx\n", str, err & 0xffff); show_registers(regs); +do { int i=2000000000; while (i) i--; } while (0); +do { int i=2000000000; while (i) i--; } while (0); + spin_unlock_irq(&die_lock); do_exit(SIGSEGV); } @@ -237,7 +242,6 @@ out: asmlinkage void do_nmi(struct pt_regs * regs, long error_code) { - printk("NMI\n"); show_registers(regs); #ifdef CONFIG_SMP_NMI_INVAL smp_flush_tlb_rcv(); #else diff --git a/arch/i386/kernel/vm86.c b/arch/i386/kernel/vm86.c index bfba24327f85..a09fa6419da4 100644 --- a/arch/i386/kernel/vm86.c +++ b/arch/i386/kernel/vm86.c @@ -81,8 +81,8 @@ asmlinkage struct pt_regs * save_v86_state(struct kernel_vm86_regs * regs) printk("vm86: could not access userspace vm86_info\n"); do_exit(SIGSEGV); } - current->tss.esp0 = current->saved_kernel_stack; - current->saved_kernel_stack = 0; + current->tss.esp0 = current->tss.saved_esp0; + current->tss.saved_esp0 = 0; ret = KVM86->regs32; unlock_kernel(); return ret; @@ -137,7 +137,7 @@ asmlinkage int sys_vm86old(struct vm86_struct * v86) lock_kernel(); tsk = current; - if (tsk->saved_kernel_stack) + if (tsk->tss.saved_esp0) goto out; tmp = copy_from_user(&info, v86, VM86_REGS_SIZE1); tmp += copy_from_user(&info.regs.VM86_REGS_PART2, &v86->regs.VM86_REGS_PART2, @@ -187,7 +187,7 @@ asmlinkage int sys_vm86(unsigned long subfunction, struct vm86plus_struct * v86) /* we come here only for functions VM86_ENTER, VM86_ENTER_NO_BYPASS */ ret = -EPERM; - if (tsk->saved_kernel_stack) + if (tsk->tss.saved_esp0) goto out; tmp = copy_from_user(&info, v86, VM86_REGS_SIZE1); tmp += copy_from_user(&info.regs.VM86_REGS_PART2, &v86->regs.VM86_REGS_PART2, @@ -247,7 +247,7 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk * Save old state, set default return value (%eax) to 0 */ info->regs32->eax = 0; - tsk->saved_kernel_stack = tsk->tss.esp0; + tsk->tss.saved_esp0 = tsk->tss.esp0; tsk->tss.esp0 = (unsigned long) &info->VM86_TSS_ESP0; tsk->tss.screen_bitmap = info->screen_bitmap; @@ -601,11 +601,17 @@ static inline void free_vm86_irq(int irqnumber) static inline int task_valid(struct task_struct *tsk) { struct task_struct *p; + int ret = 0; + read_lock(&tasklist_lock); for_each_task(p) { - if ((p == tsk) && (p->sig)) return 1; + if ((p == tsk) && (p->sig)) { + ret = 1; + break; + } } - return 0; + read_unlock(&tasklist_lock); + return ret; } static inline void handle_irq_zombies(void) diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c index 65a4a67d3443..e8c3b9f05188 100644 --- a/arch/i386/mm/fault.c +++ b/arch/i386/mm/fault.c @@ -169,7 +169,10 @@ bad_area: /* Are we prepared to handle this fault? */ if ((fixup = search_exception_table(regs->eip)) != 0) { - printk(KERN_DEBUG "Exception at [<%lx>] (%lx)\n", regs->eip, fixup); + printk(KERN_DEBUG "%s: Exception at [<%lx>] (%lx)\n", + current->comm, + regs->eip, + fixup); regs->eip = fixup; goto out; } diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index 1736493382ac..c8371aa815f8 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c @@ -139,12 +139,23 @@ extern char __init_begin, __init_end; #define write_cr4 ".byte 0x0f,0x22,0xe0" #endif -#define set_in_cr4(x) \ -__asm__(read_cr4 "\n\t" \ - "orl %0,%%eax\n\t" \ - write_cr4 \ - : : "i" (x) \ - :"ax"); +/* + * Save the cr4 feature set we're using (ie + * Pentium 4MB enable and PPro Global page + * enable), so that any CPU's that boot up + * after us can get the correct flags. + */ +unsigned long mmu_cr4_features __initdata = 0; + +static inline void set_in_cr4(unsigned long mask) +{ + mmu_cr4_features |= mask; + __asm__(read_cr4 "\n\t" + "orl %0,%%eax\n\t" + write_cr4 + : : "irg" (mask) + :"ax"); +} /* * paging_init() sets up the page tables - note that the first 4MB are diff --git a/arch/m68k/amiga/retz3fb.c b/arch/m68k/amiga/retz3fb.c index 4885e48f74a3..04157a2f6d74 100644 --- a/arch/m68k/amiga/retz3fb.c +++ b/arch/m68k/amiga/retz3fb.c @@ -1735,1758 +1735,6 @@ static int z3fb_setcmap(struct fb_cmap *cmap, int con) } -/* - * Get a Video Mode - */ - -static int get_video_mode(const char *name) -{ - int i; - - for (i = 1; i <= NUM_PREDEF_MODES; i++) - if (!strcmp(name, retz3_fb_modenames[i])){ - retz3_fb_predefined[0] = retz3_fb_predefined[i]; - return i; - } - return -1; -} -/* - * Linux/arch/m68k/amiga/retz3fb.c -- Low level implementation of the - * RetinaZ3 frame buffer device - * - * Copyright (C) 1997 Jes Sorensen - * - * This file is based on the CyberVision64 frame buffer device and - * the generic Cirrus Logic driver. - * - * cyberfb.c: Copyright (C) 1996 Martin Apel, - * Geert Uytterhoeven - * clgen.c: Copyright (C) 1996 Frank Neumann - * - * History: - * - 22 Jan 97: Initial work - * - 14 Feb 97: Screen initialization works somewhat, still only - * 8-bit packed pixel is supported. - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive - * for more details. - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "retz3fb.h" - -/* #define DEBUG if(1) */ -#define DEBUG if(0) - -/* - * Reserve space for one pattern line. - * - * For the time being we only support 4MB boards! - */ - -#define PAT_MEM_SIZE 16*3 -#define PAT_MEM_OFF (4*1024*1024 - PAT_MEM_SIZE) - -#define arraysize(x) (sizeof(x)/sizeof(*(x))) - -struct retz3_fb_par { - int xres; - int yres; - int xres_vir; - int yres_vir; - int xoffset; - int yoffset; - int bpp; - - struct fb_bitfield red; - struct fb_bitfield green; - struct fb_bitfield blue; - struct fb_bitfield transp; - - int pixclock; - int left_margin; /* time from sync to picture */ - int right_margin; /* time from picture to sync */ - int upper_margin; /* time from sync to picture */ - int lower_margin; - int hsync_len; /* length of horizontal sync */ - int vsync_len; /* length of vertical sync */ - int vmode; -}; - -struct display_data { - long h_total; /* Horizontal Total */ - long h_sstart; /* Horizontal Sync Start */ - long h_sstop; /* Horizontal Sync Stop */ - long h_bstart; /* Horizontal Blank Start */ - long h_bstop; /* Horizontal Blank Stop */ - long h_dispend; /* Horizontal Display End */ - long v_total; /* Vertical Total */ - long v_sstart; /* Vertical Sync Start */ - long v_sstop; /* Vertical Sync Stop */ - long v_bstart; /* Vertical Blank Start */ - long v_bstop; /* Vertical Blank Stop */ - long v_dispend; /* Horizontal Display End */ -}; - -static struct retz3_fb_par current_par; - -static int current_par_valid = 0; -static int currcon = 0; - -static struct display disp[MAX_NR_CONSOLES]; -static struct fb_info fb_info; - -static int node; /* node of the /dev/fb?current file */ - - -/* - * Switch for Chipset Independency - */ - -static struct fb_hwswitch { - - /* Initialisation */ - - int (*init)(void); - - /* Display Control */ - - int (*encode_fix)(struct fb_fix_screeninfo *fix, struct retz3_fb_par *par); - int (*decode_var)(struct fb_var_screeninfo *var, struct retz3_fb_par *par); - int (*encode_var)(struct fb_var_screeninfo *var, struct retz3_fb_par *par); - int (*getcolreg)(unsigned int regno, unsigned int *red, unsigned - int *green, unsigned int *blue, unsigned int *transp); - int (*setcolreg)(unsigned int regno, unsigned int red, unsigned int - green, unsigned int blue, unsigned int transp); - void (*blank)(int blank); -} *fbhw; - - -/* - * Frame Buffer Name - */ - -static char retz3_fb_name[16] = "RetinaZ3"; - - -static int z3_key = 0; -static unsigned char retz3_color_table [256][4]; -static unsigned long z3_mem; -static unsigned long z3_fbmem; -static unsigned long z3_size; -static volatile unsigned char *z3_regs; - -static long *memstart; - - -/* - * Predefined Video Mode Names - */ - -static char *retz3_fb_modenames[] = { - - /* - * Autodetect (Default) Video Mode - */ - - "default", - - /* - * Predefined Video Modes - */ - - "640x480", /* RetinaZ3 8 bpp */ - "800x600", /* RetinaZ3 8 bpp */ - "1024x768i", - "640x480-16", /* RetinaZ3 16 bpp */ - "640x480-24", /* RetinaZ3 24 bpp */ - - /* - * Dummy Video Modes - */ - - "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", - "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", - "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", - - /* - * User Defined Video Modes - * - * This doesn't work yet!! - */ - - "user0", "user1", "user2", "user3", - "user4", "user5", "user6", "user7" -}; - -/* - * A small info on how to convert XFree86 timing values into fb - * timings - by Frank Neumann: - * -An XFree86 mode line consists of the following fields: - "800x600" 50 800 856 976 1040 600 637 643 666 - < name > DCF HR SH1 SH2 HFL VR SV1 SV2 VFL - -The fields in the fb_var_screeninfo structure are: - unsigned long pixclock; * pixel clock in ps (pico seconds) * - unsigned long left_margin; * time from sync to picture * - unsigned long right_margin; * time from picture to sync * - unsigned long upper_margin; * time from sync to picture * - unsigned long lower_margin; - unsigned long hsync_len; * length of horizontal sync * - unsigned long vsync_len; * length of vertical sync * - -1) Pixelclock: - xfree: in MHz - fb: In Picoseconds (ps) - - pixclock = 1000000 / DCF - -2) horizontal timings: - left_margin = HFL - SH2 - right_margin = SH1 - HR - hsync_len = SH2 - SH1 - -3) vertical timings: - upper_margin = VFL - SV2 - lower_margin = SV1 - VR - vsync_len = SV2 - SV1 - -Good examples for VESA timings can be found in the XFree86 source tree, -under "programs/Xserver/hw/xfree86/doc/modeDB.txt". -*/ - -/* - * Predefined Video Mode Definitions - */ - -static struct fb_var_screeninfo retz3_fb_predefined[] = { - - /* - * Autodetect (Default) Video Mode - */ - - { 0, }, - - /* - * Predefined Video Modes - */ - - /* - * NB: it is very important to adjust the pixel-clock to the color-depth. - */ - - { - 640, 480, 640, 480, 0, 0, 8, 0, - {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0}, - 0, 0, -1, -1, FB_ACCEL_RETINAZ3, 38461, 28, 32, 12, 10, 96, 2, - FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED - }, - /* - ModeLine "800x600" 36 800 824 896 1024 600 601 603 625 - < name > DCF HR SH1 SH2 HFL VR SV1 SV2 VFL - */ - { - /* 800 x 600, 8 bpp */ - 800, 600, 800, 600, 0, 0, 8, 0, - {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0}, - 0, 0, -1, -1, FB_ACCEL_RETINAZ3, 27778, 64, 24, 22, 1, 120, 2, - FB_SYNC_COMP_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED - }, - /* - ModeLine "1024x768i" 45 1024 1064 1224 1264 768 777 785 817 interlace - < name > DCF HR SH1 SH2 HFL VR SV1 SV2 VFL - */ - { - /* 1024 x 768, 8 bpp, interlaced */ - 1024, 768, 1024, 768, 0, 0, 8, 0, - {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0}, - 0, 0, -1, -1, FB_ACCEL_RETINAZ3, 22222, 40, 40, 32, 9, 160, 8, - FB_SYNC_COMP_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_INTERLACED - }, - { - 640, 480, 640, 480, 0, 0, 16, 0, - {11, 5, 0}, {5, 6, 0}, {0, 5, 0}, {0, 0, 0}, - 0, 0, -1, -1, FB_ACCEL_RETINAZ3, 38461/2, 28, 32, 12, 10, 96, 2, - FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED - }, - { - 640, 480, 640, 480, 0, 0, 24, 0, - {8, 8, 8}, {8, 8, 8}, {8, 8, 8}, {0, 0, 0}, - 0, 0, -1, -1, FB_ACCEL_RETINAZ3, 38461/3, 28, 32, 12, 10, 96, 2, - FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED - }, - - /* - * Dummy Video Modes - */ - - { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, - { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, - { 0, }, { 0, }, - - /* - * User Defined Video Modes - */ - - { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, }, { 0, } -}; - - -#define NUM_TOTAL_MODES arraysize(retz3_fb_predefined) -#define NUM_PREDEF_MODES (5) - - -static int z3fb_inverse = 0; -static int z3fb_mode = 0; - - -/* - * Interface used by the world - */ - -int retz3_probe(void); -void retz3_video_setup(char *options, int *ints); - -static int retz3_fb_get_fix(struct fb_fix_screeninfo *fix, int con); -static int retz3_fb_get_var(struct fb_var_screeninfo *var, int con); -static int retz3_fb_set_var(struct fb_var_screeninfo *var, int con); -static int retz3_fb_get_cmap(struct fb_cmap *cmap, int kspc, int con); -static int retz3_fb_set_cmap(struct fb_cmap *cmap, int kspc, int con); -static int retz3_fb_pan_display(struct fb_var_screeninfo *var, int con); -static int retz3_fb_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg, int con); - - -/* - * Interface to the low level console driver - */ - -struct fb_info *retz3_fb_init(long *mem_start); /* Through amiga_fb_init() */ -static int z3fb_switch(int con); -static int z3fb_updatevar(int con); -static void z3fb_blank(int blank); -static int z3fb_setcmap(struct fb_cmap *cmap, int con); - - -/* - * Accelerated Functions used by the low level console driver - */ - -void retz3_bitblt(struct fb_var_screeninfo *scr, - unsigned short curx, unsigned short cury, unsigned - short destx, unsigned short desty, unsigned short - width, unsigned short height, unsigned short cmd, - unsigned short mask); -void retz3_fill(unsigned short x, unsigned short y, unsigned short - width, unsigned short height, unsigned short mode, - unsigned short color); - -/* - * Hardware Specific Routines - */ - -static int retz3_init(void); -static int retz3_encode_fix(struct fb_fix_screeninfo *fix, - struct retz3_fb_par *par); -static int retz3_decode_var(struct fb_var_screeninfo *var, - struct retz3_fb_par *par); -static int retz3_encode_var(struct fb_var_screeninfo *var, - struct retz3_fb_par *par); -static int retz3_getcolreg(unsigned int regno, unsigned int *red, - unsigned int *green, unsigned int *blue, - unsigned int *transp); -static int retz3_setcolreg(unsigned int regno, unsigned int red, - unsigned int green, unsigned int blue, - unsigned int transp); -static void retz3_blank(int blank); - - -/* - * Internal routines - */ - -static void retz3_fb_get_par(struct retz3_fb_par *par); -static void retz3_fb_set_par(struct retz3_fb_par *par); -static int do_fb_set_var(struct fb_var_screeninfo *var, int isactive); -static struct fb_cmap *get_default_colormap(int bpp); -static int do_fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var, - int kspc); -static int do_fb_set_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var, - int kspc); -static void do_install_cmap(int con); -static void memcpy_fs(int fsfromto, void *to, void *from, int len); -static void copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto); -static int alloc_cmap(struct fb_cmap *cmap, int len, int transp); -static void retz3_fb_set_disp(int con); -static int get_video_mode(const char *name); - - -/* -------------------- Hardware specific routines -------------------------- */ - -static unsigned short find_fq(unsigned int freq) -{ - unsigned long f; - long tmp; - long prev = 0x7fffffff; - long n2, n1 = 3; - unsigned long m; - unsigned short res = 0; - - if (freq <= 31250000) - n2 = 3; - else if (freq <= 62500000) - n2 = 2; - else if (freq <= 125000000) - n2 = 1; - else if (freq <= 250000000) - n2 = 0; - else - return(0); - - - do { - f = freq >> (10 - n2); - - m = (f * n1) / (14318180/1024); - - if (m > 129) - break; - - tmp = (((m * 14318180) >> n2) / n1) - freq; - if (tmp < 0) - tmp = -tmp; - - if (tmp < prev) { - prev = tmp; - res = (((n2 << 5) | (n1-2)) << 8) | (m-2); - } - - } while ( (++n1) <= 21); - - return res; -} - - -static int retz3_set_video(struct fb_var_screeninfo *var, - struct retz3_fb_par *par) -{ - float freq_f; - long freq; - - int xres, hfront, hsync, hback; - int yres, vfront, vsync, vback; - unsigned char tmp; - unsigned short best_freq; - struct display_data data; - - short clocksel = 0; /* Apparantly this is always zero */ - - int bpp = var->bits_per_pixel; - - /* - * XXX - */ - if (bpp == 24) - return 0; - - if ((bpp != 8) && (bpp != 16) && (bpp != 24)) - return -EFAULT; - - par->xoffset = 0; - par->yoffset = 0; - - xres = var->xres * bpp / 4; - hfront = var->right_margin * bpp / 4; - hsync = var->hsync_len * bpp / 4; - hback = var->left_margin * bpp / 4; - - if (var->vmode & FB_VMODE_DOUBLE) - { - yres = var->yres * 2; - vfront = var->lower_margin * 2; - vsync = var->vsync_len * 2; - vback = var->upper_margin * 2; - } - else if (var->vmode & FB_VMODE_INTERLACED) - { - yres = (var->yres + 1) / 2; - vfront = (var->lower_margin + 1) / 2; - vsync = (var->vsync_len + 1) / 2; - vback = (var->upper_margin + 1) / 2; - } - else - { - yres = var->yres; /* -1 ? */ - vfront = var->lower_margin; - vsync = var->vsync_len; - vback = var->upper_margin; - } - - data.h_total = (hback / 8) + (xres / 8) - + (hfront / 8) + (hsync / 8) - 1 /* + 1 */; - data.h_dispend = ((xres + bpp - 1)/ 8) - 1; - data.h_bstart = xres / 8 /* + 1 */; - - data.h_bstop = data.h_total+1 + 2 + 1; - data.h_sstart = (xres / 8) + (hfront / 8) + 1; - data.h_sstop = (xres / 8) + (hfront / 8) + (hsync / 8) + 1; - - data.v_total = yres + vfront + vsync + vback - 1; - - data.v_dispend = yres - 1; - data.v_bstart = yres; - - data.v_bstop = data.v_total; - data.v_sstart = yres + vfront - 1 - 2; - data.v_sstop = yres + vfront + vsync - 1; - -#if 0 /* testing */ - - printk("HBS: %i\n", data.h_bstart); - printk("HSS: %i\n", data.h_sstart); - printk("HSE: %i\n", data.h_sstop); - printk("HBE: %i\n", data.h_bstop); - printk("HT: %i\n", data.h_total); - - printk("hsync: %i\n", hsync); - printk("hfront: %i\n", hfront); - printk("hback: %i\n", hback); - - printk("VBS: %i\n", data.v_bstart); - printk("VSS: %i\n", data.v_sstart); - printk("VSE: %i\n", data.v_sstop); - printk("VBE: %i\n", data.v_bstop); - printk("VT: %i\n", data.v_total); - - printk("vsync: %i\n", vsync); - printk("vfront: %i\n", vfront); - printk("vback: %i\n", vback); -#endif - - if (data.v_total >= 1024) - printk("MAYDAY: v_total >= 1024; bailing out!\n"); - - reg_w(GREG_MISC_OUTPUT_W, 0xe3 | ((clocksel & 3) * 0x04)); - reg_w(GREG_FEATURE_CONTROL_W, 0x00); - - seq_w(SEQ_RESET, 0x00); - seq_w(SEQ_RESET, 0x03); /* reset sequencer logic */ - - /* - * CLOCKING_MODE bits: - * 2: This one is only set for certain text-modes, wonder if - * it may be for EGA-lines? (it was referred to as CLKDIV2) - * (The CL drivers sets it to 0x21 with the comment: - * FullBandwidth (video off) and 8/9 dot clock) - */ - seq_w(SEQ_CLOCKING_MODE, 0x01 | 0x00 /* 0x08 */); - - seq_w(SEQ_MAP_MASK, 0x0f); /* enable writing to plane 0-3 */ - seq_w(SEQ_CHAR_MAP_SELECT, 0x00); /* doesn't matter in gfx-mode */ - seq_w(SEQ_MEMORY_MODE, 0x06); /* CL driver says 0x0e for 256 col mode*/ - seq_w(SEQ_RESET, 0x01); - seq_w(SEQ_RESET, 0x03); - - seq_w(SEQ_EXTENDED_ENABLE, 0x05); - - seq_w(SEQ_CURSOR_CONTROL, 0x00); /* disable cursor */ - seq_w(SEQ_PRIM_HOST_OFF_HI, 0x00); - seq_w(SEQ_PRIM_HOST_OFF_HI, 0x00); - seq_w(SEQ_LINEAR_0, 0x4a); - seq_w(SEQ_LINEAR_1, 0x00); - - seq_w(SEQ_SEC_HOST_OFF_HI, 0x00); - seq_w(SEQ_SEC_HOST_OFF_LO, 0x00); - seq_w(SEQ_EXTENDED_MEM_ENA, 0x3 | 0x4 | 0x10 | 0x40); - - /* - * The lower 4 bits (0-3) are used to set the font-width for - * text-mode - DON'T try to set this for gfx-mode. - */ - seq_w(SEQ_EXT_CLOCK_MODE, 0x10); - seq_w(SEQ_EXT_VIDEO_ADDR, 0x03); - - /* - * Extended Pixel Control: - * bit 0: text-mode=0, gfx-mode=1 (Graphics Byte ?) - * bit 1: (Packed/Nibble Pixel Format ?) - * bit 4-5: depth, 0=1-8bpp, 1=9-16bpp, 2=17-24bpp - */ - seq_w(SEQ_EXT_PIXEL_CNTL, 0x01 | (((bpp / 8) - 1) << 4)); - - seq_w(SEQ_BUS_WIDTH_FEEDB, 0x04); - seq_w(SEQ_COLOR_EXP_WFG, 0x01); - seq_w(SEQ_COLOR_EXP_WBG, 0x00); - seq_w(SEQ_EXT_RW_CONTROL, 0x00); - seq_w(SEQ_MISC_FEATURE_SEL, (0x51 | (clocksel & 8))); - seq_w(SEQ_COLOR_KEY_CNTL, 0x40); - seq_w(SEQ_COLOR_KEY_MATCH0, 0x00); - seq_w(SEQ_COLOR_KEY_MATCH1, 0x00); - seq_w(SEQ_COLOR_KEY_MATCH2, 0x00); - seq_w(SEQ_CRC_CONTROL, 0x00); - seq_w(SEQ_PERF_SELECT, 0x10); - seq_w(SEQ_ACM_APERTURE_1, 0x00); - seq_w(SEQ_ACM_APERTURE_2, 0x30); - seq_w(SEQ_ACM_APERTURE_3, 0x00); - seq_w(SEQ_MEMORY_MAP_CNTL, 0x03); - - - /* unlock register CRT0..CRT7 */ - crt_w(CRT_END_VER_RETR, (data.v_sstop & 0x0f) | 0x20); - - /* Zuerst zu schreibende Werte nur per printk ausgeben */ - DEBUG printk("CRT_HOR_TOTAL: %ld\n", data.h_total); - crt_w(CRT_HOR_TOTAL, data.h_total & 0xff); - - DEBUG printk("CRT_HOR_DISP_ENA_END: %ld\n", data.h_dispend); - crt_w(CRT_HOR_DISP_ENA_END, (data.h_dispend) & 0xff); - - DEBUG printk("CRT_START_HOR_BLANK: %ld\n", data.h_bstart); - crt_w(CRT_START_HOR_BLANK, data.h_bstart & 0xff); - - DEBUG printk("CRT_END_HOR_BLANK: 128+%ld\n", data.h_bstop % 32); - crt_w(CRT_END_HOR_BLANK, 0x80 | (data.h_bstop & 0x1f)); - - DEBUG printk("CRT_START_HOR_RETR: %ld\n", data.h_sstart); - crt_w(CRT_START_HOR_RETR, data.h_sstart & 0xff); - - tmp = (data.h_sstop & 0x1f); - if (data.h_bstop & 0x20) - tmp |= 0x80; - DEBUG printk("CRT_END_HOR_RETR: %d\n", tmp); - crt_w(CRT_END_HOR_RETR, tmp); - - DEBUG printk("CRT_VER_TOTAL: %ld\n", data.v_total & 0xff); - crt_w(CRT_VER_TOTAL, (data.v_total & 0xff)); - - tmp = 0x10; /* LineCompare bit #9 */ - if (data.v_total & 256) - tmp |= 0x01; - if (data.v_dispend & 256) - tmp |= 0x02; - if (data.v_sstart & 256) - tmp |= 0x04; - if (data.v_bstart & 256) - tmp |= 0x08; - if (data.v_total & 512) - tmp |= 0x20; - if (data.v_dispend & 512) - tmp |= 0x40; - if (data.v_sstart & 512) - tmp |= 0x80; - DEBUG printk("CRT_OVERFLOW: %d\n", tmp); - crt_w(CRT_OVERFLOW, tmp); - - crt_w(CRT_PRESET_ROW_SCAN, 0x00); /* not CL !!! */ - - tmp = 0x40; /* LineCompare bit #8 */ - if (data.v_bstart & 512) - tmp |= 0x20; - if (var->vmode & FB_VMODE_DOUBLE) - tmp |= 0x80; - DEBUG printk("CRT_MAX_SCAN_LINE: %d\n", tmp); - crt_w(CRT_MAX_SCAN_LINE, tmp); - - crt_w(CRT_CURSOR_START, 0x00); - crt_w(CRT_CURSOR_END, 8 & 0x1f); /* font height */ - - crt_w(CRT_START_ADDR_HIGH, 0x00); - crt_w(CRT_START_ADDR_LOW, 0x00); - - crt_w(CRT_CURSOR_LOC_HIGH, 0x00); - crt_w(CRT_CURSOR_LOC_LOW, 0x00); - - DEBUG printk("CRT_START_VER_RETR: %ld\n", data.v_sstart & 0xff); - crt_w(CRT_START_VER_RETR, (data.v_sstart & 0xff)); - -#if 1 - /* 5 refresh cycles per scanline */ - DEBUG printk("CRT_END_VER_RETR: 64+32+%ld\n", data.v_sstop % 16); - crt_w(CRT_END_VER_RETR, ((data.v_sstop & 0x0f) | 0x40 | 0x20)); -#else - DEBUG printk("CRT_END_VER_RETR: 128+32+%ld\n", data.v_sstop % 16); - crt_w(CRT_END_VER_RETR, ((data.v_sstop & 0x0f) | 128 | 32)); -#endif - DEBUG printk("CRT_VER_DISP_ENA_END: %ld\n", data.v_dispend & 0xff); - crt_w(CRT_VER_DISP_ENA_END, (data.v_dispend & 0xff)); - - DEBUG printk("CRT_START_VER_BLANK: %ld\n", data.v_bstart & 0xff); - crt_w(CRT_START_VER_BLANK, (data.v_bstart & 0xff)); - - DEBUG printk("CRT_END_VER_BLANK: %ld\n", data.v_bstop & 0xff); - crt_w(CRT_END_VER_BLANK, (data.v_bstop & 0xff)); - - DEBUG printk("CRT_MODE_CONTROL: 0xe3\n"); - crt_w(CRT_MODE_CONTROL, 0xe3); - - DEBUG printk("CRT_LINE_COMPARE: 0xff\n"); - crt_w(CRT_LINE_COMPARE, 0xff); - - tmp = (var->xres_virtual / 8) * (bpp / 8); - crt_w(CRT_OFFSET, tmp); - - crt_w(CRT_UNDERLINE_LOC, 0x07); /* probably font-height - 1 */ - - tmp = 0x20; /* Enable extended end bits */ - if (data.h_total & 0x100) - tmp |= 0x01; - if ((data.h_dispend) & 0x100) - tmp |= 0x02; - if (data.h_bstart & 0x100) - tmp |= 0x04; - if (data.h_sstart & 0x100) - tmp |= 0x08; - if (var->vmode & FB_VMODE_INTERLACED) - tmp |= 0x10; - DEBUG printk("CRT_EXT_HOR_TIMING1: %d\n", tmp); - crt_w(CRT_EXT_HOR_TIMING1, tmp); - - tmp = 0x00; - if (((var->xres_virtual / 8) * (bpp / 8)) & 0x100) - tmp |= 0x10; - crt_w(CRT_EXT_START_ADDR, tmp); - - tmp = 0x00; - if (data.h_total & 0x200) - tmp |= 0x01; - if ((data.h_dispend) & 0x200) - tmp |= 0x02; - if (data.h_bstart & 0x200) - tmp |= 0x04; - if (data.h_sstart & 0x200) - tmp |= 0x08; - tmp |= ((data.h_bstop & 0xc0) >> 2); - tmp |= ((data.h_sstop & 0x60) << 1); - crt_w(CRT_EXT_HOR_TIMING2, tmp); - DEBUG printk("CRT_EXT_HOR_TIMING2: %d\n", tmp); - - tmp = 0x10; /* Line compare bit 10 */ - if (data.v_total & 0x400) - tmp |= 0x01; - if ((data.v_dispend) & 0x400) - tmp |= 0x02; - if (data.v_bstart & 0x400) - tmp |= 0x04; - if (data.v_sstart & 0x400) - tmp |= 0x08; - tmp |= ((data.v_bstop & 0x300) >> 3); - if (data.v_sstop & 0x10) - tmp |= 0x80; - crt_w(CRT_EXT_VER_TIMING, tmp); - DEBUG printk("CRT_EXT_VER_TIMING: %d\n", tmp); - - crt_w(CRT_MONITOR_POWER, 0x00); - - /* - * Convert from ps to Hz. - */ - freq_f = (1.0/(float)var->pixclock) * 1000000000; - freq = ((long)freq_f) * 1000; - - best_freq = find_fq(freq); - pll_w(0x02, best_freq); - best_freq = find_fq(61000000); - pll_w(0x0a, best_freq); - pll_w(0x0e, 0x22); - - gfx_w(GFX_SET_RESET, 0x00); - gfx_w(GFX_ENABLE_SET_RESET, 0x00); - gfx_w(GFX_COLOR_COMPARE, 0x00); - gfx_w(GFX_DATA_ROTATE, 0x00); - gfx_w(GFX_READ_MAP_SELECT, 0x00); - gfx_w(GFX_GRAPHICS_MODE, 0x00); - gfx_w(GFX_MISC, 0x05); - gfx_w(GFX_COLOR_XCARE, 0x0f); - gfx_w(GFX_BITMASK, 0xff); - - reg_r(ACT_ADDRESS_RESET); - attr_w(ACT_PALETTE0 , 0x00); - attr_w(ACT_PALETTE1 , 0x01); - attr_w(ACT_PALETTE2 , 0x02); - attr_w(ACT_PALETTE3 , 0x03); - attr_w(ACT_PALETTE4 , 0x04); - attr_w(ACT_PALETTE5 , 0x05); - attr_w(ACT_PALETTE6 , 0x06); - attr_w(ACT_PALETTE7 , 0x07); - attr_w(ACT_PALETTE8 , 0x08); - attr_w(ACT_PALETTE9 , 0x09); - attr_w(ACT_PALETTE10, 0x0a); - attr_w(ACT_PALETTE11, 0x0b); - attr_w(ACT_PALETTE12, 0x0c); - attr_w(ACT_PALETTE13, 0x0d); - attr_w(ACT_PALETTE14, 0x0e); - attr_w(ACT_PALETTE15, 0x0f); - reg_r(ACT_ADDRESS_RESET); - - attr_w(ACT_ATTR_MODE_CNTL, 0x09); /* 0x01 for CL */ - - attr_w(ACT_OVERSCAN_COLOR, 0x00); - attr_w(ACT_COLOR_PLANE_ENA, 0x0f); - attr_w(ACT_HOR_PEL_PANNING, 0x00); - attr_w(ACT_COLOR_SELECT, 0x00); - - reg_r(ACT_ADDRESS_RESET); - reg_w(ACT_DATA, 0x20); - - reg_w(VDAC_MASK, 0xff); - - /* - * Extended palette adressing ??? - */ - switch (bpp){ - case 8: - reg_w(0x83c6, 0x00); - break; - case 16: - reg_w(0x83c6, 0x60); - break; - case 24: - reg_w(0x83c6, 0xe0); - break; - default: - printk("Illegal color-depth: %i\n", bpp); - } - - reg_w(VDAC_ADDRESS, 0x00); - - seq_w(SEQ_MAP_MASK, 0x0f ); - - return 0; -} - -/* - * Initialization - * - * Set the default video mode for this chipset. If a video mode was - * specified on the command line, it will override the default mode. - */ - -static int retz3_init(void) -{ - int i; -#if 0 - volatile unsigned long *CursorBase; -#endif - unsigned long board_addr, board_size; - struct ConfigDev *cd; - - cd = zorro_get_board (z3_key); - zorro_config_board (z3_key, 0); - board_addr = (unsigned long)cd->cd_BoardAddr; - board_size = (unsigned long)cd->cd_BoardSize; - - for (i = 0; i < 256; i++){ - for (i = 0; i < 256; i++){ - retz3_color_table [i][0] = i; - retz3_color_table [i][1] = i; - retz3_color_table [i][2] = i; - retz3_color_table [i][3] = 0; - } - } - - *memstart = (*memstart + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1); - - z3_mem = kernel_map (board_addr, board_size, - KERNELMAP_NOCACHE_SER, memstart); - - z3_regs = (char*) z3_mem; - z3_fbmem = z3_mem + VIDEO_MEM_OFFSET; - - /* Get memory size - for now we asume its a 4MB board */ - - z3_size = 0x00400000; /* 4 MB */ - - memset ((char*)z3_fbmem, 0, z3_size); - - /* Disable hardware cursor */ - - seq_w(SEQ_CURSOR_Y_INDEX, 0x00); - - -#if 0 - /* Initialize hardware cursor */ - CursorBase = (unsigned long *)((char *)(z3_mem) + z3_size - 0x400); - for (i=0; i < 8; i++){ - *(CursorBase +(i*4)) = 0xffffff00; - *(CursorBase+1+(i*4)) = 0xffff0000; - *(CursorBase+2+(i*4)) = 0xffff0000; - *(CursorBase+3+(i*4)) = 0xffff0000; - } - for (i=8; i < 64; i++){ - *(CursorBase +(i*4)) = 0xffff0000; - *(CursorBase+1+(i*4)) = 0xffff0000; - *(CursorBase+2+(i*4)) = 0xffff0000; - *(CursorBase+3+(i*4)) = 0xffff0000; - } -#endif - - retz3_setcolreg (255, 56, 100, 160, 0); - retz3_setcolreg (254, 0, 0, 0, 0); - - return 0; -} - - -/* - * This function should fill in the `fix' structure based on the - * values in the `par' structure. - */ - -static int retz3_encode_fix(struct fb_fix_screeninfo *fix, - struct retz3_fb_par *par) -{ - int i; - - strcpy(fix->id, retz3_fb_name); - fix->smem_start = z3_fbmem; - fix->smem_len = z3_size; - - fix->type = FB_TYPE_PACKED_PIXELS; - fix->type_aux = 0; - if (par->bpp == 8) - fix->visual = FB_VISUAL_PSEUDOCOLOR; - else - fix->visual = FB_VISUAL_DIRECTCOLOR; - - fix->xpanstep = 0; - fix->ypanstep = 0; - fix->ywrapstep = 0; - fix->line_length = 0; - - for (i = 0; i < arraysize(fix->reserved); i++) - fix->reserved[i] = 0; - - return 0; -} - - -/* - * Get the video params out of `var'. If a value doesn't fit, round - * it up, if it's too big, return -EINVAL. - */ - -static int retz3_decode_var(struct fb_var_screeninfo *var, - struct retz3_fb_par *par) -{ - par->xres = var->xres; - par->yres = var->yres; - par->xres_vir = var->xres_virtual; - par->yres_vir = var->yres_virtual; - par->bpp = var->bits_per_pixel; - par->pixclock = var->pixclock; - par->vmode = var->vmode; - - par->red = var->red; - par->green = var->green; - par->blue = var->blue; - par->transp = var->transp; - - par->left_margin = var->left_margin; - par->right_margin = var->right_margin; - par->upper_margin = var->upper_margin; - par->lower_margin = var->lower_margin; - par->hsync_len = var->hsync_len; - par->vsync_len = var->vsync_len; - - return 0; -} - - -/* - * Fill the `var' structure based on the values in `par' and maybe - * other values read out of the hardware. - */ - -static int retz3_encode_var(struct fb_var_screeninfo *var, - struct retz3_fb_par *par) -{ - int i; - - var->xres = par->xres; - var->yres = par->yres; - var->xres_virtual = par->xres_vir; - var->yres_virtual = par->yres_vir; - var->xoffset = 0; - var->yoffset = 0; - - var->bits_per_pixel = par->bpp; - var->grayscale = 0; - - var->red = par->red; - var->green = par->green; - var->blue = par->blue; - var->transp = par->transp; - - var->nonstd = 0; - var->activate = 0; - - var->height = -1; - var->width = -1; - - var->accel = FB_ACCEL_RETINAZ3; - - var->pixclock = par->pixclock; - - var->sync = 0; /* ??? */ - var->left_margin = par->left_margin; - var->right_margin = par->right_margin; - var->upper_margin = par->upper_margin; - var->lower_margin = par->lower_margin; - var->hsync_len = par->hsync_len; - var->vsync_len = par->vsync_len; - - for (i = 0; i < arraysize(var->reserved); i++) - var->reserved[i] = 0; - - var->vmode = par->vmode; - return 0; -} - - -/* - * Set a single color register. The values supplied are already - * rounded down to the hardware's capabilities (according to the - * entries in the var structure). Return != 0 for invalid regno. - */ - -static int retz3_setcolreg(unsigned int regno, unsigned int red, - unsigned int green, unsigned int blue, - unsigned int transp) -{ - /* We'll get to this */ - - if (regno > 255) - return 1; - - retz3_color_table [regno][0] = red & 0xff; - retz3_color_table [regno][1] = green & 0xff; - retz3_color_table [regno][2] = blue & 0xff; - retz3_color_table [regno][3] = transp; - - reg_w(VDAC_ADDRESS_W, regno); - reg_w(VDAC_DATA, (red & 0xff) >> 2); - reg_w(VDAC_DATA, (green & 0xff) >> 2); - reg_w(VDAC_DATA, (blue & 0xff) >> 2); - - return 0; -} - - -/* - * Read a single color register and split it into - * colors/transparent. Return != 0 for invalid regno. - */ - -static int retz3_getcolreg(unsigned int regno, unsigned int *red, - unsigned int *green, unsigned int *blue, - unsigned int *transp) -{ - if (regno > 255) - return 1; - *red = retz3_color_table [regno][0]; - *green = retz3_color_table [regno][1]; - *blue = retz3_color_table [regno][2]; - *transp = retz3_color_table [regno][3]; - return 0; -} - - -/* - * (Un)Blank the screen - */ - -void retz3_blank(int blank) -{ - int i; - - if (blank) - for (i = 0; i < 256; i++){ - reg_w(VDAC_ADDRESS_W, i); - reg_w(VDAC_DATA, 0); - reg_w(VDAC_DATA, 0); - reg_w(VDAC_DATA, 0); - } - else - for (i = 0; i < 256; i++){ - reg_w(VDAC_ADDRESS_W, i); - reg_w(VDAC_DATA, retz3_color_table [i][0] >> 2); - reg_w(VDAC_DATA, retz3_color_table [i][1] >> 2); - reg_w(VDAC_DATA, retz3_color_table [i][2] >> 2); - } -} - - -void retz3_bitblt (struct fb_var_screeninfo *var, - unsigned short srcx, unsigned short srcy, unsigned - short destx, unsigned short desty, unsigned short - width, unsigned short height, unsigned short cmd, - unsigned short mask) -{ - - volatile unsigned long *acm = (unsigned long *) (z3_mem + ACM_OFFSET); - unsigned long *pattern = (unsigned long *)(z3_fbmem + PAT_MEM_OFF); - - unsigned short mod; - unsigned long tmp; - unsigned long pat, src, dst; - unsigned char blt_status; - - int i, xres_virtual = var->xres_virtual; - short bpp = (var->bits_per_pixel & 0xff); - - if (bpp < 8) - bpp = 8; - - tmp = mask | (mask << 16); - -#if 0 - /* - * Check for blitter finished before we start messing with the - * pattern. - */ - do{ - blt_status = *(((volatile unsigned char *)acm) + - (ACM_START_STATUS + 2)); - }while ((blt_status & 1) == 0); -#endif - - i = 0; - do{ - *pattern++ = tmp; - }while(i++ < bpp/4); - - tmp = cmd << 8; - *(acm + ACM_RASTEROP_ROTATION/4) = tmp; - - mod = 0xc0c2; - - pat = 8 * PAT_MEM_OFF; - dst = bpp * (destx + desty * xres_virtual); - - /* - * Source is not set for clear. - */ - if ((cmd != Z3BLTclear) && (cmd != Z3BLTset)) { - src = bpp * (srcx + srcy * xres_virtual); - - if (destx > srcx) { - mod &= ~0x8000; - src += bpp * (width - 1); - dst += bpp * (width - 1); - pat += bpp * 2; - } - if (desty > srcy) { - mod &= ~0x4000; - src += bpp * (height - 1) * xres_virtual; - dst += bpp * (height - 1) * xres_virtual; - pat += bpp * 4; - } - - *(acm + ACM_SOURCE/4) = cpu_to_le32(src); - } - - *(acm + ACM_PATTERN/4) = cpu_to_le32(pat); - - *(acm + ACM_DESTINATION/4) = cpu_to_le32(dst); - - tmp = mod << 16; - *(acm + ACM_CONTROL/4) = tmp; - - tmp = width | (height << 16); - - *(acm + ACM_BITMAP_DIMENSION/4) = cpu_to_le32(tmp); - - *(((volatile unsigned char *)acm) + ACM_START_STATUS) = 0x00; - *(((volatile unsigned char *)acm) + ACM_START_STATUS) = 0x01; - - /* - * No reason to wait for the blitter to finish, it is better - * just to check if it has finished before we use it again. - */ -#if 1 -#if 0 - while ((*(((volatile unsigned char *)acm) + - (ACM_START_STATUS + 2)) & 1) == 0); -#else - do{ - blt_status = *(((volatile unsigned char *)acm) + - (ACM_START_STATUS + 2)); - } - while ((blt_status & 1) == 0); -#endif -#endif -} - -#if 0 -void retz3_fill (unsigned short x, unsigned short y, unsigned - short width, unsigned short height, - unsigned short mode, unsigned short color) -{ - -} -#endif - - -/************************************************************** - * Move cursor to x, y - */ -void retz3_MoveCursor (unsigned short x, unsigned short y) -{ - /* Guess we gotta deal with the cursor at some point */ -} - - -/* -------------------- Interfaces to hardware functions -------------------- */ - - -static struct fb_hwswitch retz3_switch = { - retz3_init, retz3_encode_fix, retz3_decode_var, retz3_encode_var, - retz3_getcolreg, retz3_setcolreg, retz3_blank -}; - - -/* -------------------- Generic routines ------------------------------------ */ - - -/* - * Fill the hardware's `par' structure. - */ - -static void retz3_fb_get_par(struct retz3_fb_par *par) -{ - if (current_par_valid) - *par = current_par; - else - fbhw->decode_var(&retz3_fb_predefined[z3fb_mode], par); -} - - -static void retz3_fb_set_par(struct retz3_fb_par *par) -{ - current_par = *par; - current_par_valid = 1; -} - - -static int do_fb_set_var(struct fb_var_screeninfo *var, int isactive) -{ - int err, activate; - struct retz3_fb_par par; - - if ((err = fbhw->decode_var(var, &par))) - return err; - activate = var->activate; - if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW && isactive) - retz3_fb_set_par(&par); - fbhw->encode_var(var, &par); - var->activate = activate; - -#if 1 - retz3_set_video(var, ¤t_par); -#endif - return 0; -} - - -/* - * Default Colormaps - */ - -static unsigned short red16[] = - { 0x0000, 0x0000, 0x0000, 0x0000, 0xc000, 0xc000, 0xc000, 0xc000, - 0x8000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff }; -static unsigned short green16[] = - { 0x0000, 0x0000, 0xc000, 0xc000, 0x0000, 0x0000, 0xc000, 0xc000, - 0x8000, 0x0000, 0xffff, 0xffff, 0x0000, 0x0000, 0xffff, 0xffff }; -static unsigned short blue16[] = - { 0x0000, 0xc000, 0x0000, 0xc000, 0x0000, 0xc000, 0x0000, 0xc000, - 0x8000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff }; - - -static struct fb_cmap default_16_colors = - { 0, 16, red16, green16, blue16, NULL }; - - -static struct fb_cmap *get_default_colormap(int bpp) -{ - return &default_16_colors; -} - - -#define CNVT_TOHW(val,width) ((((val)<<(width))+0x7fff-(val))>>16) -#define CNVT_FROMHW(val,width) (((width) ? ((((val)<<16)-(val)) / \ - ((1<<(width))-1)) : 0)) - -static int do_fb_get_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var, - int kspc) -{ - int i, start; - unsigned short *red, *green, *blue, *transp; - unsigned int hred, hgreen, hblue, htransp; - - red = cmap->red; - green = cmap->green; - blue = cmap->blue; - transp = cmap->transp; - start = cmap->start; - - if (start < 0) - return -EINVAL; - for (i = 0; i < cmap->len; i++) { - if (fbhw->getcolreg(start++, &hred, &hgreen, &hblue, &htransp)) - return 0; - hred = CNVT_FROMHW(hred, var->red.length); - hgreen = CNVT_FROMHW(hgreen, var->green.length); - hblue = CNVT_FROMHW(hblue, var->blue.length); - htransp = CNVT_FROMHW(htransp, var->transp.length); - if (kspc) { - *red = hred; - *green = hgreen; - *blue = hblue; - if (transp) - *transp = htransp; - } else { - put_user(hred, red); - put_user(hgreen, green); - put_user(hblue, blue); - if (transp) - put_user(htransp, transp); - } - red++; - green++; - blue++; - if (transp) - transp++; - } - return 0; -} - - -static int do_fb_set_cmap(struct fb_cmap *cmap, struct fb_var_screeninfo *var, - int kspc) -{ - int i, start; - unsigned short *red, *green, *blue, *transp; - unsigned int hred, hgreen, hblue, htransp; - - red = cmap->red; - green = cmap->green; - blue = cmap->blue; - transp = cmap->transp; - start = cmap->start; - - if (start < 0) - return -EINVAL; - for (i = 0; i < cmap->len; i++) { - if (kspc) { - hred = *red; - hgreen = *green; - hblue = *blue; - htransp = transp ? *transp : 0; - } else { - get_user(hred, red); - get_user(hgreen, green); - get_user(hblue, blue); - if (transp) - get_user(htransp, transp); - else - htransp = 0; - } - hred = CNVT_TOHW(hred, var->red.length); - hgreen = CNVT_TOHW(hgreen, var->green.length); - hblue = CNVT_TOHW(hblue, var->blue.length); - htransp = CNVT_TOHW(htransp, var->transp.length); - red++; - green++; - blue++; - if (transp) - transp++; - if (fbhw->setcolreg(start++, hred, hgreen, hblue, htransp)) - return 0; - } - return 0; -} - - -static void do_install_cmap(int con) -{ - if (con != currcon) - return; - if (disp[con].cmap.len) - do_fb_set_cmap(&disp[con].cmap, &disp[con].var, 1); - else - do_fb_set_cmap(get_default_colormap(disp[con].var.bits_per_pixel), - &disp[con].var, 1); -} - - -static void memcpy_fs(int fsfromto, void *to, void *from, int len) -{ - switch (fsfromto) { - case 0: - memcpy(to, from, len); - return; - case 1: - copy_from_user(to, from, len); - return; - case 2: - copy_to_user(to, from, len); - return; - } -} - - -static void copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto) -{ - int size; - int tooff = 0, fromoff = 0; - - if (to->start > from->start) - fromoff = to->start-from->start; - else - tooff = from->start-to->start; - size = to->len-tooff; - if (size > from->len-fromoff) - size = from->len-fromoff; - if (size < 0) - return; - size *= sizeof(unsigned short); - memcpy_fs(fsfromto, to->red+tooff, from->red+fromoff, size); - memcpy_fs(fsfromto, to->green+tooff, from->green+fromoff, size); - memcpy_fs(fsfromto, to->blue+tooff, from->blue+fromoff, size); - if (from->transp && to->transp) - memcpy_fs(fsfromto, to->transp+tooff, - from->transp+fromoff, size); -} - - -static int alloc_cmap(struct fb_cmap *cmap, int len, int transp) -{ - int size = len*sizeof(unsigned short); - - if (cmap->len != len) { - if (cmap->red) - kfree(cmap->red); - if (cmap->green) - kfree(cmap->green); - if (cmap->blue) - kfree(cmap->blue); - if (cmap->transp) - kfree(cmap->transp); - cmap->red = cmap->green = cmap->blue = cmap->transp = NULL; - cmap->len = 0; - if (!len) - return 0; - if (!(cmap->red = kmalloc(size, GFP_ATOMIC))) - return -1; - if (!(cmap->green = kmalloc(size, GFP_ATOMIC))) - return -1; - if (!(cmap->blue = kmalloc(size, GFP_ATOMIC))) - return -1; - if (transp) { - if (!(cmap->transp = kmalloc(size, GFP_ATOMIC))) - return -1; - } else - cmap->transp = NULL; - } - cmap->start = 0; - cmap->len = len; - copy_cmap(get_default_colormap(len), cmap, 0); - return 0; -} - - -/* - * Get the Fixed Part of the Display - */ - -static int retz3_fb_get_fix(struct fb_fix_screeninfo *fix, int con) -{ - struct retz3_fb_par par; - int error = 0; - - if (con == -1) - retz3_fb_get_par(&par); - else - error = fbhw->decode_var(&disp[con].var, &par); - return(error ? error : fbhw->encode_fix(fix, &par)); -} - - -/* - * Get the User Defined Part of the Display - */ - -static int retz3_fb_get_var(struct fb_var_screeninfo *var, int con) -{ - struct retz3_fb_par par; - int error = 0; - - if (con == -1) { - retz3_fb_get_par(&par); - error = fbhw->encode_var(var, &par); - } else - *var = disp[con].var; - return error; -} - - -static void retz3_fb_set_disp(int con) -{ - struct fb_fix_screeninfo fix; - - retz3_fb_get_fix(&fix, con); - if (con == -1) - con = 0; - disp[con].screen_base = (unsigned char *)fix.smem_start; - disp[con].visual = fix.visual; - disp[con].type = fix.type; - disp[con].type_aux = fix.type_aux; - disp[con].ypanstep = fix.ypanstep; - disp[con].ywrapstep = fix.ywrapstep; - disp[con].can_soft_blank = 1; - disp[con].inverse = z3fb_inverse; -} - - -/* - * Set the User Defined Part of the Display - */ - -static int retz3_fb_set_var(struct fb_var_screeninfo *var, int con) -{ - int err, oldxres, oldyres, oldvxres, oldvyres, oldbpp; - - if ((err = do_fb_set_var(var, con == currcon))) - return err; - if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) { - oldxres = disp[con].var.xres; - oldyres = disp[con].var.yres; - oldvxres = disp[con].var.xres_virtual; - oldvyres = disp[con].var.yres_virtual; - oldbpp = disp[con].var.bits_per_pixel; - disp[con].var = *var; - if (oldxres != var->xres || oldyres != var->yres || - oldvxres != var->xres_virtual || - oldvyres != var->yres_virtual || - oldbpp != var->bits_per_pixel) { - retz3_fb_set_disp(con); - (*fb_info.changevar)(con); - alloc_cmap(&disp[con].cmap, 0, 0); - do_install_cmap(con); - } - } - var->activate = 0; - return 0; -} - - -/* - * Get the Colormap - */ - -static int retz3_fb_get_cmap(struct fb_cmap *cmap, int kspc, int con) -{ - if (con == currcon) /* current console? */ - return(do_fb_get_cmap(cmap, &disp[con].var, kspc)); - else if (disp[con].cmap.len) /* non default colormap? */ - copy_cmap(&disp[con].cmap, cmap, kspc ? 0 : 2); - else - copy_cmap(get_default_colormap(disp[con].var.bits_per_pixel), - cmap, kspc ? 0 : 2); - return 0; -} - - -/* - * Set the Colormap - */ - -static int retz3_fb_set_cmap(struct fb_cmap *cmap, int kspc, int con) -{ - int err; - - if (!disp[con].cmap.len) { /* no colormap allocated? */ - if ((err = alloc_cmap(&disp[con].cmap, - 1<init(); - - if (z3fb_mode == -1) - z3fb_mode = 1; - - fbhw->decode_var(&retz3_fb_predefined[z3fb_mode], &par); - fbhw->encode_var(&retz3_fb_predefined[0], &par); - - strcpy(fb_info.modename, retz3_fb_name); - fb_info.disp = disp; - fb_info.switch_con = &z3fb_switch; - fb_info.updatevar = &z3fb_updatevar; - fb_info.blank = &z3fb_blank; - fb_info.setcmap = &z3fb_setcmap; - - do_fb_set_var(&retz3_fb_predefined[0], 0); - retz3_fb_get_var(&disp[0].var, -1); - retz3_fb_set_disp(-1); - do_install_cmap(0); - - return &fb_info; -} - - -static int z3fb_switch(int con) -{ - /* Do we have to save the colormap? */ - if (disp[currcon].cmap.len) - do_fb_get_cmap(&disp[currcon].cmap, &disp[currcon].var, 1); - - do_fb_set_var(&disp[con].var, 1); - currcon = con; - /* Install new colormap */ - do_install_cmap(con); - return 0; -} - - -/* - * Update the `var' structure (called by fbcon.c) - * - * This call looks only at yoffset and the FB_VMODE_YWRAP flag in `var'. - * Since it's called by a kernel driver, no range checking is done. - */ - -static int z3fb_updatevar(int con) -{ - return 0; -} - - -/* - * Blank the display. - */ - -static void z3fb_blank(int blank) -{ - fbhw->blank(blank); -} - - -/* - * Set the colormap - */ - -static int z3fb_setcmap(struct fb_cmap *cmap, int con) -{ - return(retz3_fb_set_cmap(cmap, 1, con)); -} - - /* * Get a Video Mode */ diff --git a/arch/m68k/amiga/retz3fb.h b/arch/m68k/amiga/retz3fb.h index 9ff209060585..0cb03c324757 100644 --- a/arch/m68k/amiga/retz3fb.h +++ b/arch/m68k/amiga/retz3fb.h @@ -284,289 +284,3 @@ #define Z3BLTorInverted 0xb0 /* NOT src OR dst */ #define Z3BLTnand 0x70 /* NOT src OR NOT dst */ #define Z3BLTset 0xf0 /* 1 */ -/* - * Linux/arch/m68k/amiga/retz3fb.h -- Defines and macros for the - * RetinaZ3 frame buffer device - * - * Copyright (C) 1997 Jes Sorensen - * - * History: - * - 22 Jan 97: Initial work - * - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive - * for more details. - */ - -/* - * Macros to read and write to registers. - */ -#define reg_w(reg,dat) (*(z3_regs + reg) = dat) -#define reg_r(reg) (*(z3_regs + reg)) - -/* - * Macro to access the sequencer. - */ -#define seq_w(sreg,sdat) \ - do{ reg_w(SEQ_IDX, sreg); reg_w(SEQ_DATA, sdat); } while(0) - -/* - * Macro to access the CRT controller. - */ -#define crt_w(creg,cdat) \ - do{ reg_w(CRT_IDX, creg); reg_w(CRT_DATA, cdat); } while(0) - -/* - * Macro to access the graphics controller. - */ -#define gfx_w(greg,gdat) \ - do{ reg_w(GFX_IDX, greg); reg_w(GFX_DATA, gdat); } while(0) - -/* - * Macro to access the attribute controller. - */ -#define attr_w(areg,adat) \ - do{ reg_w(ACT_IDX, areg); reg_w(ACT_DATA, adat); } while(0) - -/* - * Macro to access the pll. - */ -#define pll_w(preg,pdat) \ - do{ reg_w(PLL_IDX, preg); \ - reg_w(PLL_DATA, (pdat & 0xff)); \ - reg_w(PLL_DATA, (pdat >> 8));\ - } while(0) - -/* - * Offsets - */ -#define VIDEO_MEM_OFFSET 0x00c00000 -#define ACM_OFFSET 0x00b00000 - -/* - * Accelerator Control Menu - */ -#define ACM_PRIMARY_OFFSET 0x00 -#define ACM_SECONDARY_OFFSET 0x04 -#define ACM_MODE_CONTROL 0x08 -#define ACM_CURSOR_POSITION 0x0c -#define ACM_START_STATUS 0x30 -#define ACM_CONTROL 0x34 -#define ACM_RASTEROP_ROTATION 0x38 -#define ACM_BITMAP_DIMENSION 0x3c -#define ACM_DESTINATION 0x40 -#define ACM_SOURCE 0x44 -#define ACM_PATTERN 0x48 -#define ACM_FOREGROUND 0x4c -#define ACM_BACKGROUND 0x50 - -/* - * Video DAC addresses - */ -#define VDAC_ADDRESS 0x03c8 -#define VDAC_ADDRESS_W 0x03c8 -#define VDAC_ADDRESS_R 0x03c7 -#define VDAC_STATE 0x03c7 -#define VDAC_DATA 0x03c9 -#define VDAC_MASK 0x03c6 - -/* - * Sequencer - */ -#define SEQ_IDX 0x03c4 /* Sequencer Index */ -#define SEQ_DATA 0x03c5 -#define SEQ_RESET 0x00 -#define SEQ_CLOCKING_MODE 0x01 -#define SEQ_MAP_MASK 0x02 -#define SEQ_CHAR_MAP_SELECT 0x03 -#define SEQ_MEMORY_MODE 0x04 -#define SEQ_EXTENDED_ENABLE 0x05 /* NCR extensions */ -#define SEQ_UNKNOWN1 0x06 -#define SEQ_UNKNOWN2 0x07 -#define SEQ_CHIP_ID 0x08 -#define SEQ_UNKNOWN3 0x09 -#define SEQ_CURSOR_COLOR1 0x0a -#define SEQ_CURSOR_COLOR0 0x0b -#define SEQ_CURSOR_CONTROL 0x0c -#define SEQ_CURSOR_X_LOC_HI 0x0d -#define SEQ_CURSOR_X_LOC_LO 0x0e -#define SEQ_CURSOR_Y_LOC_HI 0x0f -#define SEQ_CURSOR_Y_LOC_LO 0x10 -#define SEQ_CURSOR_X_INDEX 0x11 -#define SEQ_CURSOR_Y_INDEX 0x12 -#define SEQ_CURSOR_STORE_HI 0x13 -#define SEQ_CURSOR_STORE_LO 0x14 -#define SEQ_CURSOR_ST_OFF_HI 0x15 -#define SEQ_CURSOR_ST_OFF_LO 0x16 -#define SEQ_CURSOR_PIXELMASK 0x17 -#define SEQ_PRIM_HOST_OFF_HI 0x18 -#define SEQ_PRIM_HOST_OFF_LO 0x19 -#define SEQ_LINEAR_0 0x1a -#define SEQ_LINEAR_1 0x1b -#define SEQ_SEC_HOST_OFF_HI 0x1c -#define SEQ_SEC_HOST_OFF_LO 0x1d -#define SEQ_EXTENDED_MEM_ENA 0x1e -#define SEQ_EXT_CLOCK_MODE 0x1f -#define SEQ_EXT_VIDEO_ADDR 0x20 -#define SEQ_EXT_PIXEL_CNTL 0x21 -#define SEQ_BUS_WIDTH_FEEDB 0x22 -#define SEQ_PERF_SELECT 0x23 -#define SEQ_COLOR_EXP_WFG 0x24 -#define SEQ_COLOR_EXP_WBG 0x25 -#define SEQ_EXT_RW_CONTROL 0x26 -#define SEQ_MISC_FEATURE_SEL 0x27 -#define SEQ_COLOR_KEY_CNTL 0x28 -#define SEQ_COLOR_KEY_MATCH0 0x29 -#define SEQ_COLOR_KEY_MATCH1 0x2a -#define SEQ_COLOR_KEY_MATCH2 0x2b -#define SEQ_UNKNOWN6 0x2c -#define SEQ_CRC_CONTROL 0x2d -#define SEQ_CRC_DATA_LOW 0x2e -#define SEQ_CRC_DATA_HIGH 0x2f -#define SEQ_MEMORY_MAP_CNTL 0x30 -#define SEQ_ACM_APERTURE_1 0x31 -#define SEQ_ACM_APERTURE_2 0x32 -#define SEQ_ACM_APERTURE_3 0x33 -#define SEQ_BIOS_UTILITY_0 0x3e -#define SEQ_BIOS_UTILITY_1 0x3f - -/* - * Graphics Controller - */ -#define GFX_IDX 0x03ce -#define GFX_DATA 0x03cf -#define GFX_SET_RESET 0x00 -#define GFX_ENABLE_SET_RESET 0x01 -#define GFX_COLOR_COMPARE 0x02 -#define GFX_DATA_ROTATE 0x03 -#define GFX_READ_MAP_SELECT 0x04 -#define GFX_GRAPHICS_MODE 0x05 -#define GFX_MISC 0x06 -#define GFX_COLOR_XCARE 0x07 -#define GFX_BITMASK 0x08 - -/* - * CRT Controller - */ -#define CRT_IDX 0x03d4 -#define CRT_DATA 0x03d5 -#define CRT_HOR_TOTAL 0x00 -#define CRT_HOR_DISP_ENA_END 0x01 -#define CRT_START_HOR_BLANK 0x02 -#define CRT_END_HOR_BLANK 0x03 -#define CRT_START_HOR_RETR 0x04 -#define CRT_END_HOR_RETR 0x05 -#define CRT_VER_TOTAL 0x06 -#define CRT_OVERFLOW 0x07 -#define CRT_PRESET_ROW_SCAN 0x08 -#define CRT_MAX_SCAN_LINE 0x09 -#define CRT_CURSOR_START 0x0a -#define CRT_CURSOR_END 0x0b -#define CRT_START_ADDR_HIGH 0x0c -#define CRT_START_ADDR_LOW 0x0d -#define CRT_CURSOR_LOC_HIGH 0x0e -#define CRT_CURSOR_LOC_LOW 0x0f -#define CRT_START_VER_RETR 0x10 -#define CRT_END_VER_RETR 0x11 -#define CRT_VER_DISP_ENA_END 0x12 -#define CRT_OFFSET 0x13 -#define CRT_UNDERLINE_LOC 0x14 -#define CRT_START_VER_BLANK 0x15 -#define CRT_END_VER_BLANK 0x16 -#define CRT_MODE_CONTROL 0x17 -#define CRT_LINE_COMPARE 0x18 -#define CRT_UNKNOWN1 0x19 -#define CRT_UNKNOWN2 0x1a -#define CRT_UNKNOWN3 0x1b -#define CRT_UNKNOWN4 0x1c -#define CRT_UNKNOWN5 0x1d -#define CRT_UNKNOWN6 0x1e -#define CRT_UNKNOWN7 0x1f -#define CRT_UNKNOWN8 0x20 -#define CRT_UNKNOWN9 0x21 -#define CRT_UNKNOWN10 0x22 -#define CRT_UNKNOWN11 0x23 -#define CRT_UNKNOWN12 0x24 -#define CRT_UNKNOWN13 0x25 -#define CRT_UNKNOWN14 0x26 -#define CRT_UNKNOWN15 0x27 -#define CRT_UNKNOWN16 0x28 -#define CRT_UNKNOWN17 0x29 -#define CRT_UNKNOWN18 0x2a -#define CRT_UNKNOWN19 0x2b -#define CRT_UNKNOWN20 0x2c -#define CRT_UNKNOWN21 0x2d -#define CRT_UNKNOWN22 0x2e -#define CRT_UNKNOWN23 0x2f -#define CRT_EXT_HOR_TIMING1 0x30 /* NCR crt extensions */ -#define CRT_EXT_START_ADDR 0x31 -#define CRT_EXT_HOR_TIMING2 0x32 -#define CRT_EXT_VER_TIMING 0x33 -#define CRT_MONITOR_POWER 0x34 - -/* - * General Registers - */ -#define GREG_STATUS0_R 0x03c2 -#define GREG_STATUS1_R 0x03da -#define GREG_MISC_OUTPUT_R 0x03cc -#define GREG_MISC_OUTPUT_W 0x03c2 -#define GREG_FEATURE_CONTROL_R 0x03ca -#define GREG_FEATURE_CONTROL_W 0x03da -#define GREG_POS 0x0102 - -/* - * Attribute Controller - */ -#define ACT_IDX 0x03C0 -#define ACT_ADDRESS_R 0x03C0 -#define ACT_DATA 0x03C0 -#define ACT_ADDRESS_RESET 0x03DA -#define ACT_PALETTE0 0x00 -#define ACT_PALETTE1 0x01 -#define ACT_PALETTE2 0x02 -#define ACT_PALETTE3 0x03 -#define ACT_PALETTE4 0x04 -#define ACT_PALETTE5 0x05 -#define ACT_PALETTE6 0x06 -#define ACT_PALETTE7 0x07 -#define ACT_PALETTE8 0x08 -#define ACT_PALETTE9 0x09 -#define ACT_PALETTE10 0x0A -#define ACT_PALETTE11 0x0B -#define ACT_PALETTE12 0x0C -#define ACT_PALETTE13 0x0D -#define ACT_PALETTE14 0x0E -#define ACT_PALETTE15 0x0F -#define ACT_ATTR_MODE_CNTL 0x10 -#define ACT_OVERSCAN_COLOR 0x11 -#define ACT_COLOR_PLANE_ENA 0x12 -#define ACT_HOR_PEL_PANNING 0x13 -#define ACT_COLOR_SELECT 0x14 - -/* - * PLL - */ -#define PLL_IDX 0x83c8 -#define PLL_DATA 0x83c9 - -/* - * Blitter operations - */ -#define Z3BLTclear 0x00 /* 0 */ -#define Z3BLTand 0x80 /* src AND dst */ -#define Z3BLTandReverse 0x40 /* src AND NOT dst */ -#define Z3BLTcopy 0xc0 /* src */ -#define Z3BLTandInverted 0x20 /* NOT src AND dst */ -#define Z3BLTnoop 0xa0 /* dst */ -#define Z3BLTxor 0x60 /* src XOR dst */ -#define Z3BLTor 0xe0 /* src OR dst */ -#define Z3BLTnor 0x10 /* NOT src AND NOT dst */ -#define Z3BLTequiv 0x90 /* NOT src XOR dst */ -#define Z3BLTinvert 0x50 /* NOT dst */ -#define Z3BLTorReverse 0xd0 /* src OR NOT dst */ -#define Z3BLTcopyInverted 0x30 /* NOT src */ -#define Z3BLTorInverted 0xb0 /* NOT src OR dst */ -#define Z3BLTnand 0x70 /* NOT src OR NOT dst */ -#define Z3BLTset 0xf0 /* 1 */ diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c index 5422831a8d26..53a3e56d4525 100644 --- a/arch/m68k/kernel/process.c +++ b/arch/m68k/kernel/process.c @@ -30,6 +30,22 @@ #include #include +/* + * Initial task structure. Make this a per-architecture thing, + * because different architectures tend to have different + * alignment requirements and potentially different initial + * setup. + */ +static unsigned long init_kernel_stack[1024] = { STACK_MAGIC, }; +unsigned long init_user_stack[1024] = { STACK_MAGIC, }; +static struct vm_area_struct init_mmap = INIT_MMAP; +static struct fs_struct init_fs = INIT_FS; +static struct files_struct init_files = INIT_FILES; +static struct signal_struct init_signals = INIT_SIGNALS; + +struct mm_struct init_mm = INIT_MM; +struct task_struct init_task = INIT_TASK; + asmlinkage void ret_from_exception(void); /* diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c index 70e341b3108f..685391ca5e2e 100644 --- a/arch/m68k/kernel/ptrace.c +++ b/arch/m68k/kernel/ptrace.c @@ -52,18 +52,6 @@ static int regoff[] = { PT_REG(orig_d0), PT_REG(sr), PT_REG(pc), }; -/* change a pid into a task struct. */ -static inline struct task_struct * get_task(int pid) -{ - int i; - - for (i = 1; i < NR_TASKS; i++) { - if (task[i] != NULL && (task[i]->pid == pid)) - return task[i]; - } - return NULL; -} - /* * Get contents of register REGNO in task TASK. */ @@ -340,7 +328,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) if (pid == 1) /* you may not mess with init */ goto out; ret = -ESRCH; - if (!(child = get_task(pid))) + if (!(child = find_task_by_pid(pid))) goto out; ret = -EPERM; if (request == PTRACE_ATTACH) { diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 2d2ccb53224e..5c2511e273cd 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c @@ -29,6 +29,22 @@ #include #include +/* + * Initial task structure. Make this a per-architecture thing, + * because different architectures tend to have different + * alignment requirements and potentially different initial + * setup. + */ +static unsigned long init_kernel_stack[1024] = { STACK_MAGIC, }; +unsigned long init_user_stack[1024] = { STACK_MAGIC, }; +static struct vm_area_struct init_mmap = INIT_MMAP; +static struct fs_struct init_fs = INIT_FS; +static struct files_struct init_files = INIT_FILES; +static struct signal_struct init_signals = INIT_SIGNALS; + +struct mm_struct init_mm = INIT_MM; +struct task_struct init_task = INIT_TASK; + asmlinkage void ret_from_sys_call(void); /* diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c index 934507e0509e..b3eee95de506 100644 --- a/arch/mips/kernel/ptrace.c +++ b/arch/mips/kernel/ptrace.c @@ -33,18 +33,6 @@ */ #define MAGICNUMBER 68 -/* change a pid into a task struct. */ -static inline struct task_struct * get_task(int pid) -{ - int i; - - for (i = 1; i < NR_TASKS; i++) { - if (task[i] != NULL && (task[i]->pid == pid)) - return task[i]; - } - return NULL; -} - /* * this routine will get a word off of the processes privileged stack. * the offset is how far from the base addr as stored in the TSS. @@ -295,7 +283,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) } if (pid == 1) /* you may not mess with init */ return -EPERM; - if (!(child = get_task(pid))) + if (!(child = find_task_by_pid(pid))) return -ESRCH; if (request == PTRACE_ATTACH) { if (child == current) diff --git a/arch/mips/kernel/syscalls.h b/arch/mips/kernel/syscalls.h index 0b65c748d125..1f96105ec137 100644 --- a/arch/mips/kernel/syscalls.h +++ b/arch/mips/kernel/syscalls.h @@ -174,3 +174,4 @@ SYS(sys_mlock, 2) SYS(sys_munlock, 2) /* 4155 */ SYS(sys_mlockall, 1) SYS(sys_munlockall, 0) +SYS(sys_nfsservctl, 3) diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 46ecaa69ac55..84c9bc14673e 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -178,6 +178,7 @@ while(1); void do_ades(struct pt_regs *regs) { + struct task_struct *p; unsigned long pc = regs->cp0_epc; int i; @@ -187,12 +188,14 @@ void do_ades(struct pt_regs *regs) return; } while(1); - for(i=0; ipid >= 2) - { - printk("Process %d\n", task[i]->pid); - dump_list_process(task[i], pc); + read_lock(&tasklist_lock); + for_each_task(p) { + if(p->pid >= 2) { + printk("Process %d\n", p->pid); + dump_list_process(p, pc); } + } + read_unlock(&tasklist_lock); show_regs(regs); dump_tlb_nonwired(); send_sig(SIGSEGV, current, 1); @@ -251,14 +254,16 @@ while(1); void do_ri(struct pt_regs *regs) { + struct task_struct *p; int i; - for(i=0; ipid >= 2) - { - printk("Process %d\n", task[i]->pid); - dump_list_process(task[i], 0x7ffff000); + read_lock(&tasklist_lock); + for_each_task(p) { + if(p->pid >= 2) { + printk("Process %d\n", p->pid); + dump_list_process(p, 0x7ffff000); } + } show_regs(regs); while(1); send_sig(SIGILL, current, 1); diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S index e137e11711c2..c2a2989ec965 100644 --- a/arch/ppc/kernel/misc.S +++ b/arch/ppc/kernel/misc.S @@ -855,5 +855,6 @@ sys_call_table: .long sys_mremap .long SYMBOL_NAME(sys_setresuid) .long SYMBOL_NAME(sys_getresuid) - .space (NR_syscalls-165)*4 + .long SYMBOL_NAME(sys_nfsservctl) + .space (NR_syscalls-166)*4 diff --git a/arch/ppc/kernel/process.c b/arch/ppc/kernel/process.c index 8dc0e61ca362..ee21c5cbe990 100644 --- a/arch/ppc/kernel/process.c +++ b/arch/ppc/kernel/process.c @@ -29,6 +29,24 @@ #include #include + +/* + * Initial task structure. Make this a per-architecture thing, + * because different architectures tend to have different + * alignment requirements and potentially different initial + * setup. + */ +static unsigned long init_kernel_stack[1024] = { STACK_MAGIC, }; +unsigned long init_user_stack[1024] = { STACK_MAGIC, }; +static struct vm_area_struct init_mmap = INIT_MMAP; +static struct fs_struct init_fs = INIT_FS; +static struct files_struct init_files = INIT_FILES; +static struct signal_struct init_signals = INIT_SIGNALS; + +struct mm_struct init_mm = INIT_MM; +struct task_struct init_task = INIT_TASK; + + int dump_fpu(void); void hard_reset_now(void); void switch_to(struct task_struct *, struct task_struct *); diff --git a/arch/ppc/kernel/ptrace.c b/arch/ppc/kernel/ptrace.c index 2d960c8cd734..dc8a95302985 100644 --- a/arch/ppc/kernel/ptrace.c +++ b/arch/ppc/kernel/ptrace.c @@ -42,18 +42,6 @@ static int regoff[] = { }; -/* change a pid into a task struct. */ -static inline struct task_struct * get_task(int pid) -{ - int i; - - for (i = 1; i < NR_TASKS; i++) { - if (task[i] != NULL && (task[i]->pid == pid)) - return task[i]; - } - return NULL; -} - /* * Get contents of register REGNO in task TASK. */ @@ -394,7 +382,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) if (pid == 1) /* you may not mess with init */ goto out; ret = -ESRCH; - if (!(child = get_task(pid))) + if (!(child = find_task_by_pid(pid))) goto out; ret = -EPERM; if (request == PTRACE_ATTACH) { diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c index 6a6ffdb89c06..ee2381dbac33 100644 --- a/arch/ppc/mm/init.c +++ b/arch/ppc/mm/init.c @@ -58,69 +58,62 @@ pte_t __bad_page(void) void show_mem(void) { - unsigned long i,free = 0,total = 0,reserved = 0; - unsigned long shared = 0; - PTE *ptr; - unsigned long full = 0, overflow = 0; - unsigned int ti; - - printk("Mem-info:\n"); - show_free_areas(); - printk("Free swap: %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10)); - i = MAP_NR(high_memory); - while (i-- > 0) { - total++; - if (PageReserved(mem_map+i)) - reserved++; - else if (!atomic_read(&mem_map[i].count)) - free++; - else - shared += atomic_read(&mem_map[i].count) - 1; - } - printk("%lu pages of RAM\n",total); - printk("%lu free pages\n",free); - printk("%lu reserved pages\n",reserved); - printk("%lu pages shared\n",shared); - show_buffers(); + struct task_struct *p; + unsigned long i,free = 0,total = 0,reserved = 0; + unsigned long shared = 0; + PTE *ptr; + unsigned long full = 0, overflow = 0; + unsigned int ti; + + printk("Mem-info:\n"); + show_free_areas(); + printk("Free swap: %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10)); + i = MAP_NR(high_memory); + while (i-- > 0) { + total++; + if (PageReserved(mem_map+i)) + reserved++; + else if (!atomic_read(&mem_map[i].count)) + free++; + else + shared += atomic_read(&mem_map[i].count) - 1; + } + printk("%lu pages of RAM\n",total); + printk("%lu free pages\n",free); + printk("%lu reserved pages\n",reserved); + printk("%lu pages shared\n",shared); + show_buffers(); #ifdef CONFIG_NET - show_net_buffers(); + show_net_buffers(); #endif #ifdef HASHSTATS - printk("Hash Hits %u entries (buckets)\n",(Hash_size/sizeof(struct _PTE))/8); - for ( i = 0; i < (Hash_size/sizeof(struct _PTE))/8; i++ ) - { - if ( hashhits[i] >= 20 ) - { - printk("[%lu] \t %lu\n", i,hashhits[i]); - } - } + printk("Hash Hits %u entries (buckets)\n",(Hash_size/sizeof(struct _PTE))/8); + for ( i = 0; i < (Hash_size/sizeof(struct _PTE))/8; i++ ) { + if ( hashhits[i] >= 20 ) + printk("[%lu] \t %lu\n", i,hashhits[i]); + } #endif - for ( ptr = Hash ; ptr <= Hash+Hash_size ; ptr++) - { - if (ptr->v) - { - full++; - if (ptr->h == 1) - overflow++; - } - } - printk("Hash Table: %dkB Buckets: %dk PTEs: %d/%d (%%%d full) %d overflowed\n", - Hash_size>>10, (Hash_size/(sizeof(PTE)*8)) >> 10, - full,Hash_size/sizeof(PTE), - (full*100)/(Hash_size/sizeof(PTE)), - overflow); - printk(" Task context vsid0\n"); - for ( ti = 0; ti < NR_TASKS ; ti++ ); - { - if ( task[ti] ) - { - printk("%5d %8x %8x\n", - task[ti]->pid,task[ti]->mm->context, - ((SEGREG *)task[ti]->tss.segs)[0].vsid); - } - } - + for ( ptr = Hash ; ptr <= Hash+Hash_size ; ptr++) { + if (ptr->v) { + full++; + if (ptr->h == 1) + overflow++; + } + } + printk("Hash Table: %dkB Buckets: %dk PTEs: %d/%d (%%%d full) %d overflowed\n", + Hash_size>>10, (Hash_size/(sizeof(PTE)*8)) >> 10, + full,Hash_size/sizeof(PTE), + (full*100)/(Hash_size/sizeof(PTE)), + overflow); + printk(" Task context vsid0\n"); + read_lock(&tasklist_lock); + for_each_task(p) { + printk("%5d %8x %8x\n", + p->pid,p->mm->context, + ((SEGREG *)p->tss.segs)[0].vsid); + } + read_unlock(&tasklist_lock); } extern unsigned long free_area_init(unsigned long, unsigned long); diff --git a/arch/sparc/ap1000/bnet.c b/arch/sparc/ap1000/bnet.c index 9305b0a55fde..974501d795f4 100644 --- a/arch/sparc/ap1000/bnet.c +++ b/arch/sparc/ap1000/bnet.c @@ -872,12 +872,12 @@ static void reply_kill(struct cap_request *req) len = req->size - sizeof(*req); if (len == 0) { int pid = req->data[1]; - for_each_task(p) - if (p->pid == pid) { - send_sig(sig,p,1); - return; - } - printk("cell %d: no task with pid %d\n",mpp_cid(),pid); + p = find_task_by_pid(pid); + + if(p) + send_sig(sig, p, 1); + else + printk("cell %d: no task with pid %d\n",mpp_cid(),pid); return; } @@ -889,9 +889,11 @@ static void reply_kill(struct cap_request *req) read_bif(name,len); name[len] = 0; + read_lock(&tasklist_lock); for_each_task(p) if (strcmp(name,p->comm) == 0) send_sig(sig,p,1); + read_unlock(&tasklist_lock); } diff --git a/arch/sparc/ap1000/hw.c b/arch/sparc/ap1000/hw.c index c36150c4e960..aabe15a3b5ca 100644 --- a/arch/sparc/ap1000/hw.c +++ b/arch/sparc/ap1000/hw.c @@ -86,14 +86,21 @@ static void show_task(struct task_struct *t) static void show_ptasks(void) { extern struct task_struct *task[]; + struct task_struct *p; int i; int count=0; - for (i=MPP_TASK_BASE;itarray_ptr; + + if(tp >= &task[MPP_TASK_BASE]) { + show_task(p); count++; } + } + read_unlock(&tasklist_lock); + if (count == 0) printk("no parallel tasks on cell %d\n",mpp_cid()); } @@ -101,14 +108,18 @@ static void show_ptasks(void) static void show_utasks(void) { extern struct task_struct *task[]; + struct task_struct *p; int i; int count=0; - for (i=0;iuid > 1) { + read_lock(&tasklist_lock); + for_each_task(p) { + if(p->uid > 1) { show_task(task[i]); count++; } + } + read_unlock(&tasklist_lock); if (count == 0) printk("no user tasks on cell %d\n",mpp_cid()); @@ -118,15 +129,19 @@ static void show_utasks(void) static void show_otasks(void) { extern struct task_struct *task[]; + struct task_struct *p; int i; int count=0; extern int ap_current_uid; - for (i=0;iuid == ap_current_uid) { + read_lock(&tasklist_lock); + for_each_task(p) { + if(p->uid == ap_current_uid) { show_task(task[i]); count++; } + } + read_unlock(&tasklist_lock); if (count == 0) printk("no tasks on cell %d\n",mpp_cid()); diff --git a/arch/sparc/ap1000/mpp.c b/arch/sparc/ap1000/mpp.c index 021c1a2e5fcf..84ef7f28e288 100644 --- a/arch/sparc/ap1000/mpp.c +++ b/arch/sparc/ap1000/mpp.c @@ -66,6 +66,7 @@ int mpp_weight(struct task_struct *tsk) if (block_parallel_tasks) return -1000; + /* XXX task[] fixme */ if (last_task && last_task != tsk->taskid && task[last_task] && !msc_switch_ok()) return -1000; diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c index 96c57e9635b2..d23d6e0f1b52 100644 --- a/arch/sparc/kernel/process.c +++ b/arch/sparc/kernel/process.c @@ -39,6 +39,22 @@ #include #include +/* + * Initial task structure. Make this a per-architecture thing, + * because different architectures tend to have different + * alignment requirements and potentially different initial + * setup. + */ +static unsigned long init_kernel_stack[1024] = { STACK_MAGIC, }; +unsigned long init_user_stack[1024] = { STACK_MAGIC, }; +static struct vm_area_struct init_mmap = INIT_MMAP; +static struct fs_struct init_fs = INIT_FS; +static struct files_struct init_files = INIT_FILES; +static struct signal_struct init_signals = INIT_SIGNALS; + +struct mm_struct init_mm = INIT_MM; +struct task_struct init_task = INIT_TASK; + extern void fpsave(unsigned long *, unsigned long *, void *, unsigned long *); #ifndef __SMP__ diff --git a/arch/sparc/kernel/ptrace.c b/arch/sparc/kernel/ptrace.c index 647081edace7..c7cb8a1d020e 100644 --- a/arch/sparc/kernel/ptrace.c +++ b/arch/sparc/kernel/ptrace.c @@ -24,18 +24,6 @@ #define MAGIC_CONSTANT 0x80000000 -/* change a pid into a task struct. */ -static inline struct task_struct * get_task(int pid) -{ - int i; - - for (i = 1; i < NR_TASKS; i++) { - if (task[i] != NULL && (task[i]->pid == pid)) - return task[i]; - } - return NULL; -} - /* * This routine gets a long from any process space by following the page * tables. NOTE! You should check that the long isn't on a page boundary, @@ -533,7 +521,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs) goto out; } #endif - if(!(child = get_task(pid))) { + if(!(child = find_task_by_pid(pid))) { pt_error_return(regs, ESRCH); goto out; } diff --git a/arch/sparc/kernel/sys_sunos.c b/arch/sparc/kernel/sys_sunos.c index 5f5b195045b7..3fafe7f9c886 100644 --- a/arch/sparc/kernel/sys_sunos.c +++ b/arch/sparc/kernel/sys_sunos.c @@ -1,4 +1,4 @@ -/* $Id: sys_sunos.c,v 1.78 1997/04/16 05:56:12 davem Exp $ +/* $Id: sys_sunos.c,v 1.79 1997/04/23 23:01:15 ecd Exp $ * sys_sunos.c: SunOS specific syscall compatibility support. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -1031,7 +1032,48 @@ asmlinkage int sunos_semsys(int op, unsigned long arg1, unsigned long arg2, unlock_kernel(); return ret; } - + +extern asmlinkage int sys_msgget (key_t key, int msgflg); +extern asmlinkage int sys_msgrcv (int msqid, struct msgbuf *msgp, + size_t msgsz, long msgtyp, int msgflg); +extern asmlinkage int sys_msgsnd (int msqid, struct msgbuf *msgp, + size_t msgsz, int msgflg); +extern asmlinkage int sys_msgctl (int msqid, int cmd, struct msqid_ds *buf); + +asmlinkage int sunos_msgsys(int op, unsigned long arg1, unsigned long arg2, + unsigned long arg3, unsigned long arg4) +{ + struct sparc_stackf *sp; + unsigned long arg5; + int rval; + + lock_kernel(); + switch(op) { + case 0: + rval = sys_msgget((key_t)arg1, (int)arg2); + break; + case 1: + rval = sys_msgctl((int)arg1, (int)arg2, + (struct msqid_ds *)arg3); + break; + case 2: + sp = (struct sparc_stackf *)current->tss.kregs->u_regs[UREG_FP]; + arg5 = sp->xxargs[0]; + rval = sys_msgrcv((int)arg1, (struct msgbuf *)arg2, + (size_t)arg3, (long)arg4, (int)arg5); + break; + case 3: + rval = sys_msgsnd((int)arg1, (struct msgbuf *)arg2, + (size_t)arg3, (int)arg4); + break; + default: + rval = -EINVAL; + break; + } + unlock_kernel(); + return rval; +} + extern asmlinkage int sys_shmat (int shmid, char *shmaddr, int shmflg, ulong *raddr); extern asmlinkage int sys_shmctl (int shmid, int cmd, struct shmid_ds *buf); extern asmlinkage int sys_shmdt (char *shmaddr); diff --git a/arch/sparc/kernel/systbls.S b/arch/sparc/kernel/systbls.S index 61b41056b027..a166e3490f04 100644 --- a/arch/sparc/kernel/systbls.S +++ b/arch/sparc/kernel/systbls.S @@ -1,4 +1,4 @@ -/* $Id: systbls.S,v 1.60 1997/04/19 08:52:15 jj Exp $ +/* $Id: systbls.S,v 1.62 1997/04/23 23:01:08 ecd Exp $ * systbls.S: System call entry point tables for OS compatibility. * The native Linux system call table lives here also. * @@ -106,15 +106,26 @@ C_LABEL(sys_call_table): .long C_LABEL(sys_nis_syscall), C_LABEL(sys_stime), C_LABEL(sys_nis_syscall) .long C_LABEL(sys_nis_syscall), C_LABEL(sys_llseek) /* "We are the Knights of the Forest of Ni!!" */ - .long C_LABEL(sys_mlock), C_LABEL(sys_munlock), C_LABEL(sys_mlockall) - .long C_LABEL(sys_munlockall), C_LABEL(sys_sched_setparam) - .long C_LABEL(sys_sched_getparam), C_LABEL(sys_nis_syscall), C_LABEL(sys_nis_syscall) - .long C_LABEL(sys_nis_syscall), C_LABEL(sys_sched_get_priority_max), C_LABEL(sys_sched_get_priority_min) - .long C_LABEL(sys_sched_rr_get_interval), C_LABEL(sys_nanosleep) + .long C_LABEL(sys_mlock) + .long C_LABEL(sys_munlock) + .long C_LABEL(sys_mlockall) +/*240*/ .long C_LABEL(sys_munlockall) + .long C_LABEL(sys_sched_setparam) + .long C_LABEL(sys_sched_getparam) + .long C_LABEL(sys_sched_setscheduler) + .long C_LABEL(sys_sched_getscheduler) +/*245*/ .long C_LABEL(sys_sched_yield) + .long C_LABEL(sys_sched_get_priority_max) + .long C_LABEL(sys_sched_get_priority_min) + .long C_LABEL(sys_sched_rr_get_interval) + .long C_LABEL(sys_nanosleep) /*250*/ .long C_LABEL(sys_mremap) .long C_LABEL(sys_sysctl) - .long C_LABEL(sys_getsid), C_LABEL(sys_fdatasync), C_LABEL(sys_nfsservctl) - .long C_LABEL(sys_aplib), C_LABEL(sys_nis_syscall) + .long C_LABEL(sys_getsid) + .long C_LABEL(sys_fdatasync) + .long C_LABEL(sys_nfsservctl) +/*255*/ .long C_LABEL(sys_aplib) + .long C_LABEL(sys_nis_syscall) /* Now the SunOS syscall table. */ @@ -179,7 +190,7 @@ C_LABEL(sunos_sys_table): .long C_LABEL(sunos_getdomainname), C_LABEL(sys_setdomainname) .long C_LABEL(sunos_nosys), C_LABEL(sys_quotactl), C_LABEL(sunos_nosys) .long C_LABEL(sunos_mount), C_LABEL(sys_ustat), C_LABEL(sunos_semsys) - .long C_LABEL(sunos_nosys), C_LABEL(sunos_shmsys), C_LABEL(sunos_audit) + .long C_LABEL(sunos_msgsys), C_LABEL(sunos_shmsys), C_LABEL(sunos_audit) .long C_LABEL(sunos_nosys), C_LABEL(sunos_getdents), C_LABEL(sys_setsid) .long C_LABEL(sys_fchdir), C_LABEL(sunos_nosys), C_LABEL(sunos_nosys) .long C_LABEL(sunos_nosys), C_LABEL(sunos_nosys), C_LABEL(sunos_nosys) diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index 5ec62a6b699f..60cc2ede31e5 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c @@ -37,6 +37,22 @@ #include #include +/* + * Initial task structure. Make this a per-architecture thing, + * because different architectures tend to have different + * alignment requirements and potentially different initial + * setup. + */ +static unsigned long init_kernel_stack[1024] = { STACK_MAGIC, }; +unsigned long init_user_stack[1024] = { STACK_MAGIC, }; +static struct vm_area_struct init_mmap = INIT_MMAP; +static struct fs_struct init_fs = INIT_FS; +static struct files_struct init_files = INIT_FILES; +static struct signal_struct init_signals = INIT_SIGNALS; + +struct mm_struct init_mm = INIT_MM; +struct task_struct init_task = INIT_TASK; + #ifndef __SMP__ /* diff --git a/drivers/block/ide-disk.c b/drivers/block/ide-disk.c index 94073d468597..fbf8c3833090 100644 --- a/drivers/block/ide-disk.c +++ b/drivers/block/ide-disk.c @@ -48,7 +48,6 @@ #include #include #include -#include #include #include #include @@ -59,6 +58,7 @@ #include #include #include +#include #include #include diff --git a/drivers/block/ide-probe.c b/drivers/block/ide-probe.c index 76e10c08f8d9..25b3d54fa1a7 100644 --- a/drivers/block/ide-probe.c +++ b/drivers/block/ide-probe.c @@ -47,7 +47,6 @@ #include #include #include -#include #include #include #include @@ -58,6 +57,7 @@ #include #include #include +#include #include #include diff --git a/drivers/block/ide.c b/drivers/block/ide.c index ca9456479d17..e8228a11d5f4 100644 --- a/drivers/block/ide.c +++ b/drivers/block/ide.c @@ -294,7 +294,6 @@ #include #include #include -#include #include #include #include @@ -307,6 +306,7 @@ #include #include #include +#include #include #include diff --git a/drivers/char/dsp56k.c b/drivers/char/dsp56k.c index dd035d58c515..3d71f60ad9d4 100644 --- a/drivers/char/dsp56k.c +++ b/drivers/char/dsp56k.c @@ -525,581 +525,6 @@ static struct file_operations dsp56k_fops = { }; -/****** Init and module functions ******/ - -static int init_error = 0; - -void dsp56k_init(void) -{ - if(!ATARIHW_PRESENT(DSP56K)) { - init_error = 1; - printk("DSP56k driver: Hardware not present\n"); - return; - } - -#ifndef MODULE - if(register_chrdev(DSP56K_MAJOR, "dsp56k", &dsp56k_fops)) { - printk("DSP56k driver: Unable to register driver\n"); - return; - } -#endif /* !MODULE */ - - dsp56k.in_use = 0; - - printk("DSP56k driver installed\n"); -} - -#ifdef MODULE -int init_module(void) -{ - int r; - - init_error = 0; - dsp56k_init(); - if(init_error) - return -EPERM; - - r = register_chrdev(DSP56K_MAJOR, "dsp56k", &dsp56k_fops); - if(r) { - printk("DSP56k driver: Unable to register driver\n"); - return r; - } - - return 0; -} - -void cleanup_module(void) -{ - unregister_chrdev(DSP56K_MAJOR, "dsp56k"); -} -#endif /* MODULE */ -/* - * The DSP56001 Device Driver, saviour of the Free World(tm) - * - * Authors: Fredrik Noring - * lars brinkhoff - * Tomas Berndtsson - * - * First version May 1996 - * - * History: - * 97-01-29 Tomas Berndtsson, - * Integrated with Linux 2.1.21 kernel sources. - * 97-02-15 Tomas Berndtsson, - * Fixed for kernel 2.1.26 - * - * BUGS: - * Hmm... there must be something here :) - * - * Copyright (C) 1996,1997 Fredrik Noring, lars brinkhoff & Tomas Berndtsson - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive - * for more details. - */ - -#include -#include -#include -#include /* for kmalloc() and kfree() */ -#include /* for struct wait_queue etc */ -#include -#include -#include -#include /* guess what */ -#include -#include - -#include -#include -#include -#include /* For put_user and get_user */ - -#include - -/* minor devices */ -#define DSP56K_DEV_56001 0 /* The only device so far */ - -#define TIMEOUT 10 /* Host port timeout in number of tries */ -#define MAXIO 2048 /* Maximum number of words before sleep */ -#define DSP56K_MAX_BINARY_LENGTH (3*64*1024) - -#define DSP56K_TX_INT_ON dsp56k_host_interface.icr |= DSP56K_ICR_TREQ -#define DSP56K_RX_INT_ON dsp56k_host_interface.icr |= DSP56K_ICR_RREQ -#define DSP56K_TX_INT_OFF dsp56k_host_interface.icr &= ~DSP56K_ICR_TREQ -#define DSP56K_RX_INT_OFF dsp56k_host_interface.icr &= ~DSP56K_ICR_RREQ - -#define DSP56K_TRANSMIT (dsp56k_host_interface.isr & DSP56K_ISR_TXDE) -#define DSP56K_RECEIVE (dsp56k_host_interface.isr & DSP56K_ISR_RXDF) - -#define max(a,b) ((a) > (b) ? (a) : (b)) -#define min(a,b) ((a) < (b) ? (a) : (b)) - -#define wait_some(n) \ -{ \ - current->state = TASK_INTERRUPTIBLE; \ - current->timeout = jiffies + n; \ - schedule(); \ -} - -#define handshake(count, maxio, timeout, ENABLE, f) \ -{ \ - long i, t, m; \ - while (count > 0) { \ - m = min(count, maxio); \ - for (i = 0; i < m; i++) { \ - for (t = 0; t < timeout && !ENABLE; t++) \ - wait_some(2); \ - if(!ENABLE) \ - return -EIO; \ - f; \ - } \ - count -= m; \ - if (m == maxio) wait_some(2); \ - } \ -} - -#define tx_wait(n) \ -{ \ - int t; \ - for(t = 0; t < n && !DSP56K_TRANSMIT; t++) \ - wait_some(1); \ - if(!DSP56K_TRANSMIT) { \ - return -EIO; \ - } \ -} - -#define rx_wait(n) \ -{ \ - int t; \ - for(t = 0; t < n && !DSP56K_RECEIVE; t++) \ - wait_some(1); \ - if(!DSP56K_RECEIVE) { \ - return -EIO; \ - } \ -} - -/* DSP56001 bootstrap code */ -static char bootstrap[] = { - 0x0c, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x60, 0xf4, 0x00, 0x00, 0x00, 0x4f, 0x61, 0xf4, - 0x00, 0x00, 0x7e, 0xa9, 0x06, 0x2e, 0x80, 0x00, 0x00, 0x47, - 0x07, 0xd8, 0x84, 0x07, 0x59, 0x84, 0x08, 0xf4, 0xa8, 0x00, - 0x00, 0x04, 0x08, 0xf4, 0xbf, 0x00, 0x0c, 0x00, 0x00, 0xfe, - 0xb8, 0x0a, 0xf0, 0x80, 0x00, 0x7e, 0xa9, 0x08, 0xf4, 0xa0, - 0x00, 0x00, 0x01, 0x08, 0xf4, 0xbe, 0x00, 0x00, 0x00, 0x0a, - 0xa9, 0x80, 0x00, 0x7e, 0xad, 0x08, 0x4e, 0x2b, 0x44, 0xf4, - 0x00, 0x00, 0x00, 0x03, 0x44, 0xf4, 0x45, 0x00, 0x00, 0x01, - 0x0e, 0xa0, 0x00, 0x0a, 0xa9, 0x80, 0x00, 0x7e, 0xb5, 0x08, - 0x50, 0x2b, 0x0a, 0xa9, 0x80, 0x00, 0x7e, 0xb8, 0x08, 0x46, - 0x2b, 0x44, 0xf4, 0x45, 0x00, 0x00, 0x02, 0x0a, 0xf0, 0xaa, - 0x00, 0x7e, 0xc9, 0x20, 0x00, 0x45, 0x0a, 0xf0, 0xaa, 0x00, - 0x7e, 0xd0, 0x06, 0xc6, 0x00, 0x00, 0x7e, 0xc6, 0x0a, 0xa9, - 0x80, 0x00, 0x7e, 0xc4, 0x08, 0x58, 0x6b, 0x0a, 0xf0, 0x80, - 0x00, 0x7e, 0xad, 0x06, 0xc6, 0x00, 0x00, 0x7e, 0xcd, 0x0a, - 0xa9, 0x80, 0x00, 0x7e, 0xcb, 0x08, 0x58, 0xab, 0x0a, 0xf0, - 0x80, 0x00, 0x7e, 0xad, 0x06, 0xc6, 0x00, 0x00, 0x7e, 0xd4, - 0x0a, 0xa9, 0x80, 0x00, 0x7e, 0xd2, 0x08, 0x58, 0xeb, 0x0a, - 0xf0, 0x80, 0x00, 0x7e, 0xad}; -static int sizeof_bootstrap = 375; - - -static struct dsp56k_device { - int in_use; - long maxio, timeout; - int tx_wsize, rx_wsize; -} dsp56k; - -static int dsp56k_reset(void) -{ - u_char status; - - /* Power down the DSP */ - sound_ym.rd_data_reg_sel = 14; - status = sound_ym.rd_data_reg_sel & 0xef; - sound_ym.wd_data = status; - sound_ym.wd_data = status | 0x10; - - udelay(10); - - /* Power up the DSP */ - sound_ym.rd_data_reg_sel = 14; - sound_ym.wd_data = sound_ym.rd_data_reg_sel & 0xef; - - return 0; -} - -static int dsp56k_upload(u_char *bin, int len) -{ - int i; - u_char *p; - - dsp56k_reset(); - - p = bootstrap; - for (i = 0; i < sizeof_bootstrap/3; i++) { - /* tx_wait(10); */ - dsp56k_host_interface.data.b[1] = *p++; - dsp56k_host_interface.data.b[2] = *p++; - dsp56k_host_interface.data.b[3] = *p++; - } - for (; i < 512; i++) { - /* tx_wait(10); */ - dsp56k_host_interface.data.b[1] = 0; - dsp56k_host_interface.data.b[2] = 0; - dsp56k_host_interface.data.b[3] = 0; - } - - for (i = 0; i < len; i++) { - tx_wait(10); - get_user(dsp56k_host_interface.data.b[1], bin++); - get_user(dsp56k_host_interface.data.b[2], bin++); - get_user(dsp56k_host_interface.data.b[3], bin++); - } - - tx_wait(10); - dsp56k_host_interface.data.l = 3; /* Magic execute */ - - return 0; -} - -static long dsp56k_read(struct inode *inode, struct file *file, - char *buf, unsigned long count) -{ - int dev = MINOR(inode->i_rdev) & 0x0f; - - switch(dev) - { - case DSP56K_DEV_56001: - { - - long n; - - /* Don't do anything if nothing is to be done */ - if (!count) return 0; - - n = 0; - switch (dsp56k.rx_wsize) { - case 1: /* 8 bit */ - { - handshake(count, dsp56k.maxio, dsp56k.timeout, DSP56K_RECEIVE, - put_user(dsp56k_host_interface.data.b[3], buf+n++)); - return n; - } - case 2: /* 16 bit */ - { - short *data; - - count /= 2; - data = (short*) buf; - handshake(count, dsp56k.maxio, dsp56k.timeout, DSP56K_RECEIVE, - put_user(dsp56k_host_interface.data.w[1], data+n++)); - return 2*n; - } - case 3: /* 24 bit */ - { - count /= 3; - handshake(count, dsp56k.maxio, dsp56k.timeout, DSP56K_RECEIVE, - put_user(dsp56k_host_interface.data.b[1], buf+n++); - put_user(dsp56k_host_interface.data.b[2], buf+n++); - put_user(dsp56k_host_interface.data.b[3], buf+n++)); - return 3*n; - } - case 4: /* 32 bit */ - { - long *data; - - count /= 4; - data = (long*) buf; - handshake(count, dsp56k.maxio, dsp56k.timeout, DSP56K_RECEIVE, - put_user(dsp56k_host_interface.data.l, data+n++)); - return 4*n; - } - } - return -EFAULT; - } - - default: - printk("DSP56k driver: Unknown minor device: %d\n", dev); - return -ENXIO; - } -} - -static long dsp56k_write(struct inode *inode, struct file *file, - const char *buf, unsigned long count) -{ - int dev = MINOR(inode->i_rdev) & 0x0f; - - switch(dev) - { - case DSP56K_DEV_56001: - { - long n; - - /* Don't do anything if nothing is to be done */ - if (!count) return 0; - - n = 0; - switch (dsp56k.tx_wsize) { - case 1: /* 8 bit */ - { - handshake(count, dsp56k.maxio, dsp56k.timeout, DSP56K_TRANSMIT, - get_user(dsp56k_host_interface.data.b[3], buf+n++)); - return n; - } - case 2: /* 16 bit */ - { - short *data; - - count /= 2; - data = (short*) buf; - handshake(count, dsp56k.maxio, dsp56k.timeout, DSP56K_TRANSMIT, - get_user(dsp56k_host_interface.data.w[1], data+n++)); - return 2*n; - } - case 3: /* 24 bit */ - { - count /= 3; - handshake(count, dsp56k.maxio, dsp56k.timeout, DSP56K_TRANSMIT, - get_user(dsp56k_host_interface.data.b[1], buf+n++); - get_user(dsp56k_host_interface.data.b[2], buf+n++); - get_user(dsp56k_host_interface.data.b[3], buf+n++)); - return 3*n; - } - case 4: /* 32 bit */ - { - long *data; - - count /= 4; - data = (long*) buf; - handshake(count, dsp56k.maxio, dsp56k.timeout, DSP56K_TRANSMIT, - get_user(dsp56k_host_interface.data.l, data+n++)); - return 4*n; - } - } - - return -EFAULT; - } - default: - printk("DSP56k driver: Unknown minor device: %d\n", dev); - return -ENXIO; - } -} - -static int dsp56k_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) -{ - int dev = MINOR(inode->i_rdev) & 0x0f; - - switch(dev) - { - case DSP56K_DEV_56001: - - switch(cmd) { - case DSP56K_UPLOAD: - { - char *bin; - int r, len; - struct dsp56k_upload *binary = (struct dsp56k_upload *) arg; - - if(get_user(len, &binary->len) < 0) - return -EFAULT; - if(get_user(bin, &binary->bin) < 0) - return -EFAULT; - - if (len == 0) { - return -EINVAL; /* nothing to upload?!? */ - } - if (len > DSP56K_MAX_BINARY_LENGTH) { - return -EINVAL; - } - - r = dsp56k_upload(bin, len); - if (r < 0) { - return r; - } - - break; - } - case DSP56K_SET_TX_WSIZE: - if (arg > 4 || arg < 1) - return -EINVAL; - dsp56k.tx_wsize = (int) arg; - break; - case DSP56K_SET_RX_WSIZE: - if (arg > 4 || arg < 1) - return -EINVAL; - dsp56k.rx_wsize = (int) arg; - break; - case DSP56K_HOST_FLAGS: - { - int dir, out, status; - struct dsp56k_host_flags *hf = (struct dsp56k_host_flags*) arg; - - if(get_user(dir, &hf->dir) < 0) - return -EFAULT; - if(get_user(out, &hf->out) < 0) - return -EFAULT; - - if ((dir & 0x1) && (out & 0x1)) - dsp56k_host_interface.icr |= DSP56K_ICR_HF0; - else if (dir & 0x1) - dsp56k_host_interface.icr &= ~DSP56K_ICR_HF0; - if ((dir & 0x2) && (out & 0x2)) - dsp56k_host_interface.icr |= DSP56K_ICR_HF1; - else if (dir & 0x2) - dsp56k_host_interface.icr &= ~DSP56K_ICR_HF1; - - status = 0; - if (dsp56k_host_interface.icr & DSP56K_ICR_HF0) status |= 0x1; - if (dsp56k_host_interface.icr & DSP56K_ICR_HF1) status |= 0x2; - if (dsp56k_host_interface.isr & DSP56K_ISR_HF2) status |= 0x4; - if (dsp56k_host_interface.isr & DSP56K_ISR_HF3) status |= 0x8; - - if(put_user(status, &hf->status) < 0) - return -EFAULT; - break; - } - case DSP56K_HOST_CMD: - if (arg > 31 || arg < 0) - return -EINVAL; - dsp56k_host_interface.cvr = (u_char)((arg & DSP56K_CVR_HV_MASK) | - DSP56K_CVR_HC); - break; - default: - return -EINVAL; - } - return 0; - - default: - printk("DSP56k driver: Unknown minor device: %d\n", dev); - return -ENXIO; - } -} - -/* As of 2.1.26 this should be dsp56k_poll, - * but how do I then check device minor number? - * Do I need this function at all??? - */ -#ifdef 0 -static int dsp56k_select(struct inode *inode, struct file *file, int sel_type, - select_table *wait) -{ - int dev = MINOR(inode->i_rdev) & 0x0f; - - switch(dev) - { - case DSP56K_DEV_56001: - - switch(sel_type) { - case SEL_IN: /* read */ - return 1; - case SEL_OUT: /* write */ - return 1; - default: - return 1; - } - - default: - printk("DSP56k driver: Unknown minor device: %d\n", dev); - return -ENXIO; - } -} -#endif - -static int dsp56k_open(struct inode *inode, struct file *file) -{ - int dev = MINOR(inode->i_rdev) & 0x0f; - - switch(dev) - { - case DSP56K_DEV_56001: - - if (dsp56k.in_use) - return -EBUSY; - - dsp56k.in_use = 1; - dsp56k.timeout = TIMEOUT; - dsp56k.maxio = MAXIO; - dsp56k.rx_wsize = dsp56k.tx_wsize = 4; - - DSP56K_TX_INT_OFF; - DSP56K_RX_INT_OFF; - - /* Zero host flags */ - dsp56k_host_interface.icr &= ~DSP56K_ICR_HF0; - dsp56k_host_interface.icr &= ~DSP56K_ICR_HF1; - - break; - - default: - printk("DSP56k driver: Unknown minor device: %d\n", dev); - return -ENXIO; - } - -#ifdef MODULE - MOD_INC_USE_COUNT; -#endif /* MODULE */ - - return 0; -} - -static void dsp56k_release(struct inode *inode, struct file *file) -{ - int dev = MINOR(inode->i_rdev) & 0x0f; - - switch(dev) - { - case DSP56K_DEV_56001: - - dsp56k.in_use = 0; - - break; - default: - printk("DSP56k driver: Unknown minor device: %d\n", dev); - return; - } - -#ifdef MODULE - MOD_DEC_USE_COUNT; -#endif /* MODULE */ -} - -static struct file_operations dsp56k_fops = { - NULL, /* no special dsp56k_lseek */ - dsp56k_read, - dsp56k_write, - NULL, /* no special dsp56k_readdir */ - NULL, /* dsp56k_poll? */ - dsp56k_ioctl, - NULL, /* no special dsp56k_mmap */ - dsp56k_open, - dsp56k_release, - NULL, /* no special dsp56k_fsync */ - NULL, /* no special dsp56k_fasync */ - NULL, /* no special dsp56k_check_media_change */ - NULL /* no special dsp56k_revalidate */ -}; - - /****** Init and module functions ******/ static int init_error = 0; diff --git a/drivers/char/random.c b/drivers/char/random.c index 3fb64b28d7aa..5f76193915b6 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -1,7 +1,7 @@ /* * random.c -- A strong random number generator * - * Version 1.01, last modified 13-Feb-97 + * Version 1.02, last modified 15-Apr-97 * * Copyright Theodore Ts'o, 1994, 1995, 1996, 1997. All rights reserved. * @@ -839,6 +839,18 @@ static void SHATransform(__u32 *digest, __u32 *data) digest[ 4 ] += E; } +#undef ROTL +#undef f1 +#undef f2 +#undef f3 +#undef f4 +#undef K1 +#undef K2 +#undef K3 +#undef K4 +#undef expand +#undef subRound + #else #define HASH_BUFFER_SIZE 4 #define HASH_TRANSFORM MD5Transform @@ -1324,22 +1336,90 @@ struct file_operations urandom_fops = { * attacks which rely on guessing the initial TCP sequence number. * This algorithm was suggested by Steve Bellovin. */ + +/* F, G and H are basic MD4 functions: selection, majority, parity */ +#define F(x, y, z) (((x) & (y)) | ((~x) & (z))) +#define G(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z))) +#define H(x, y, z) ((x) ^ (y) ^ (z)) + +#define ROTL(n,X) ( ( ( X ) << n ) | ( ( X ) >> ( 32 - n ) ) ) + +/* FF, GG and HH are MD4 transformations for rounds 1, 2 and 3 */ +/* Rotation is separate from addition to prevent recomputation */ +#define FF(a, b, c, d, x, s) \ + {(a) += F ((b), (c), (d)) + (x); \ + (a) = ROTL ((s), (a));} +#define GG(a, b, c, d, x, s) \ + {(a) += G ((b), (c), (d)) + (x) + 013240474631UL; \ + (a) = ROTL ((s), (a));} +#define HH(a, b, c, d, x, s) \ + {(a) += H ((b), (c), (d)) + (x) + 015666365641UL; \ + (a) = ROTL ((s), (a));} + +/* + * Basic cut-down MD4 transform + */ +static void halfMD4Transform (__u32 buf[4], __u32 in[8]) +{ + __u32 a = buf[0], b = buf[1], c = buf[2], d = buf[3]; + + /* Round 1 */ + FF (a, b, c, d, in[ 0], 3); + FF (d, a, b, c, in[ 1], 7); + FF (c, d, a, b, in[ 2], 11); + FF (b, c, d, a, in[ 3], 19); + FF (a, b, c, d, in[ 4], 3); + FF (d, a, b, c, in[ 5], 7); + FF (c, d, a, b, in[ 6], 11); + FF (b, c, d, a, in[ 7], 19); + + /* Round 2 */ + GG (a, b, c, d, in[ 0], 3); + GG (d, a, b, c, in[ 4], 5); + GG (a, b, c, d, in[ 1], 9); + GG (d, a, b, c, in[ 5], 13); + GG (a, b, c, d, in[ 2], 3); + GG (d, a, b, c, in[ 6], 5); + GG (a, b, c, d, in[ 3], 9); + GG (d, a, b, c, in[ 7], 13); + + /* Round 3 */ + HH (a, b, c, d, in[ 0], 3); + HH (c, d, a, b, in[ 4], 9); + HH (a, b, c, d, in[ 2], 11); + HH (c, d, a, b, in[ 6], 15); + HH (a, b, c, d, in[ 1], 3); + HH (c, d, a, b, in[ 5], 9); + HH (a, b, c, d, in[ 3], 11); + HH (c, d, a, b, in[ 7], 15); + + buf[0] += a; + buf[1] += b; + buf[2] += c; + buf[3] += d; +} + +#define REKEY_INTERVAL 300 + __u32 secure_tcp_sequence_number(__u32 saddr, __u32 daddr, __u16 sport, __u16 dport) { - static int is_init = 0; - static __u32 secret[16]; + static __u32 rekey_time = 0; + static __u32 secret[12]; + static char count = 0; struct timeval tv; - __u32 tmp[16]; + __u32 tmp[12]; __u32 seq; /* - * Pick a random secret the first time we open a TCP - * connection. + * Pick a random secret every REKEY_INTERVAL seconds */ - if (is_init == 0) { + do_gettimeofday(&tv); + if (!rekey_time || + (tv.tv_sec - rekey_time) > REKEY_INTERVAL) { get_random_bytes(&secret, sizeof(secret)); - is_init = 1; + rekey_time = tv.tv_sec; + count++; } memcpy(tmp, secret, sizeof(tmp)); @@ -1350,7 +1430,7 @@ __u32 secure_tcp_sequence_number(__u32 saddr, __u32 daddr, tmp[8]=saddr; tmp[9]=daddr; tmp[10]=(sport << 16) + dport; - HASH_TRANSFORM(tmp, tmp); + halfMD4Transform(tmp, tmp+4); /* * As close as possible to RFC 793, which @@ -1359,8 +1439,8 @@ __u32 secure_tcp_sequence_number(__u32 saddr, __u32 daddr, * For 10MB/s ethernet, a 1MHz clock is appropriate. * That's funny, Linux has one built in! Use it! */ - do_gettimeofday(&tv); - seq = tmp[1] + tv.tv_usec+tv.tv_sec*1000000; + seq = (tmp[1]&0xFFFFFF) + (tv.tv_usec+tv.tv_sec*1000000) + + (count << 24); #if 0 printk("init_seq(%lx, %lx, %d, %d) = %d\n", saddr, daddr, sport, dport, seq); diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 0d0f0a4edb95..969fb552ee7d 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -166,14 +166,11 @@ static int check_tty_count(struct tty_struct *tty, const char *routine) { #ifdef CHECK_TTY_COUNT struct file *f; - int i, count = 0; + int count = 0; - for (f = first_file, i=0; if_next) { - if (!f->f_count) - continue; - if (f->private_data == tty) { + for(f = inuse_filps; f; f = f->f_next) { + if(f->private_data == tty) count++; - } } if (tty->driver.type == TTY_DRIVER_TYPE_PTY && tty->driver.subtype == PTY_TYPE_SLAVE && @@ -363,16 +360,14 @@ static struct file_operations hung_up_tty_fops = { void do_tty_hangup(struct tty_struct * tty, struct file_operations *fops) { - int i; + struct file * filp; struct task_struct *p; if (!tty) return; check_tty_count(tty, "do_tty_hangup"); - for (filp = first_file, i=0; if_next) { - if (!filp->f_count) - continue; + for (filp = inuse_filps; filp; filp = filp->f_next) { if (filp->private_data != tty) continue; if (!filp->f_inode) @@ -405,13 +400,14 @@ void do_tty_hangup(struct tty_struct * tty, struct file_operations *fops) tty->ldisc = ldiscs[N_TTY]; tty->termios->c_line = N_TTY; if (tty->ldisc.open) { - i = (tty->ldisc.open)(tty); + int i = (tty->ldisc.open)(tty); if (i < 0) printk("do_tty_hangup: N_TTY open: error %d\n", -i); } } + read_lock(&tasklist_lock); for_each_task(p) { if ((tty->session > 0) && (p->session == tty->session) && p->leader) { @@ -423,6 +419,8 @@ void do_tty_hangup(struct tty_struct * tty, struct file_operations *fops) if (p->tty == tty) p->tty = NULL; } + read_unlock(&tasklist_lock); + tty->flags = 0; tty->session = 0; tty->pgrp = -1; @@ -494,9 +492,11 @@ void disassociate_ctty(int on_exit) tty->session = 0; tty->pgrp = -1; + read_lock(&tasklist_lock); for_each_task(p) if (p->session == current->session) p->tty = NULL; + read_unlock(&tasklist_lock); } void wait_for_keypress(void) @@ -1338,9 +1338,11 @@ static int tiocsctty(struct tty_struct *tty, int arg) */ struct task_struct *p; + read_lock(&tasklist_lock); for_each_task(p) if (p->tty == tty) p->tty = NULL; + read_unlock(&tasklist_lock); } else return -EPERM; } diff --git a/drivers/char/vt.c b/drivers/char/vt.c index ab81344eb91b..4a48c6e636f4 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c @@ -123,6 +123,7 @@ kd_size_changed(int row, int col) } } + read_lock(&tasklist_lock); for_each_task(p) { if ( p->tty && MAJOR(p->tty->device) == TTY_MAJOR && @@ -131,6 +132,7 @@ kd_size_changed(int row, int col) send_sig(SIGWINCH, p, 1); } } + read_unlock(&tasklist_lock); return 0; } diff --git a/drivers/net/ltpc.c b/drivers/net/ltpc.c index 8a4fae56084b..1da2ee64f2d8 100644 --- a/drivers/net/ltpc.c +++ b/drivers/net/ltpc.c @@ -1259,7 +1259,7 @@ void cleanup_module(void) if(debug&DEBUG_VERBOSE) printk("waiting\n"); /* if it's in process, wait a bit for it to finish */ timeout = jiffies+HZ; - add_timer(<pc_timer) + add_timer(<pc_timer); while(del_timer(<pc_timer) && (timeout > jiffies)) { add_timer(<pc_timer); diff --git a/drivers/sbus/char/creator.c b/drivers/sbus/char/creator.c index 193a261903c5..9bf72a3b9bdc 100644 --- a/drivers/sbus/char/creator.c +++ b/drivers/sbus/char/creator.c @@ -47,52 +47,3 @@ __initfunc(void creator_setup (fbinfo_t *fb, int slot, int con_node, unsigned lo fb->unblank = 0; fb->type.fb_depth = 8; } -/* - * creator.c: Linux/Sun Ultra Creator console support. - * - * Copyright (C) 1997 MIguel de Icaza (miguel@nuclecu.unam.mx) - * - */ -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "../../char/vt_kern.h" -#include "../../char/selection.h" -#include "../../char/console_struct.h" -#include "fb.h" - -__initfunc(void creator_setup (fbinfo_t *fb, int slot, int con_node, unsigned long creator, int creator_io)) -{ - uint bases [2]; - unsigned long *p; - - if (!creator) { - prom_getproperty (con_node, "address", (char *) &bases[0], 4); - prom_printf ("Bases: %x %x\n", bases [0], bases [1]); - p = (unsigned long *) creator = bases[0]; - fb->base = creator; - fb->base = 0xff168000; - } - - fb->type.fb_cmsize = 256; - fb->mmap = 0; - fb->loadcmap = 0; - fb->setcursor = 0; - fb->setcursormap = 0; - fb->setcurshape = 0; - fb->ioctl = 0; - fb->switch_from_graph = 0; - fb->postsetup = sun_cg_postsetup; - fb->reset = 0; - fb->blank = 0; - fb->unblank = 0; - fb->type.fb_depth = 8; -} diff --git a/drivers/sbus/char/sunserial.c b/drivers/sbus/char/sunserial.c index cd4fe4ee3494..59b9bda8e173 100644 --- a/drivers/sbus/char/sunserial.c +++ b/drivers/sbus/char/sunserial.c @@ -1,4 +1,4 @@ -/* $Id: sunserial.c,v 1.38 1997/04/14 17:05:00 jj Exp $ +/* $Id: sunserial.c,v 1.39 1997/04/23 07:45:26 ecd Exp $ * serial.c: Serial port driver for the Sparc. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) @@ -866,10 +866,10 @@ static void change_speed(struct sun_serial *info) i = cflag & CBAUD; if (cflag & CBAUDEX) { i &= ~CBAUDEX; - if (i != 1) + if (i != 5) info->tty->termios->c_cflag &= ~CBAUDEX; else - i += 15; + i = 16; } if (i == 15) { if ((info->flags & ZILOG_SPD_MASK) == ZILOG_SPD_HI) @@ -1857,7 +1857,7 @@ int rs_open(struct tty_struct *tty, struct file * filp) static void show_serial_version(void) { - char *revision = "$Revision: 1.38 $"; + char *revision = "$Revision: 1.39 $"; char *version, *p; version = strchr(revision, ' '); diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 7e11c751066b..6b59088446bb 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -210,14 +210,16 @@ static unsigned long load_elf_interp(struct elfhdr * interp_elf_ex, /* Now read in all of the header information */ - if (sizeof(struct elf_phdr) * interp_elf_ex->e_phnum > PAGE_SIZE) + if (sizeof(struct elf_phdr) * interp_elf_ex->e_phnum > PAGE_SIZE) { return ~0UL; + } elf_phdata = (struct elf_phdr *) kmalloc(sizeof(struct elf_phdr) * interp_elf_ex->e_phnum, GFP_KERNEL); - if (!elf_phdata) + if (!elf_phdata) { return ~0UL; + } /* * If the size of this structure has changed, then punt, since @@ -278,6 +280,7 @@ static unsigned long load_elf_interp(struct elfhdr * interp_elf_ex, /* Real error */ sys_close(elf_exec_fileno); kfree(elf_phdata); +printk("%d", error); return ~0UL; } @@ -359,7 +362,9 @@ static unsigned long load_aout_interp(struct exec * interp_ex, interp_ex->a_bss, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_FIXED|MAP_PRIVATE, 0); - if (retval < 0) return ~0UL; + if (retval < 0) { + return ~0UL; + } return elf_entry; } diff --git a/fs/dcache.c b/fs/dcache.c index 2dc317aad836..f6ab0469343e 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -153,17 +153,24 @@ static inline void add_hash(struct dir_cache_entry * de, struct dir_cache_entry /* * Find a directory cache entry given all the necessary info. */ -static inline struct dir_cache_entry * find_entry(struct inode * dir, const char * name, int len, struct dir_cache_entry ** hash) +static inline struct dir_cache_entry * find_entry(struct inode * dir, const char * name, unsigned char len, struct dir_cache_entry ** hash) { struct dir_cache_entry *de; - for(de = *hash; de; de = de->next) + de = *hash; + goto inside; + for (;;) { + de = de->next; +inside: + if (!de) + break; if((de->name_len == (unsigned char) len) && (de->dc_dev == dir->i_dev) && (de->dir == dir->i_ino) && (de->version == dir->i_version) && (!memcmp(de->name, name, len))) break; + } return de; } @@ -195,7 +202,7 @@ int dcache_lookup(struct inode * dir, const char * name, int len, unsigned long struct dir_cache_entry *de; spin_lock(&dcache_lock); - de = find_entry(dir, name, len, hash); + de = find_entry(dir, name, (unsigned char) len, hash); if(de) { *ino = de->ino; move_to_level2(de, hash); @@ -213,7 +220,7 @@ void dcache_add(struct inode * dir, const char * name, int len, unsigned long in struct dir_cache_entry *de; spin_lock(&dcache_lock); - de = find_entry(dir, name, len, hash); + de = find_entry(dir, name, (unsigned char) len, hash); if (de) { de->ino = ino; update_lru(de); diff --git a/fs/dquot.c b/fs/dquot.c index 5236ed38e5f2..dda3f642ab65 100644 --- a/fs/dquot.c +++ b/fs/dquot.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -989,7 +990,7 @@ int quota_on(kdev_t dev, short type, char *path) } } else error = -EIO; - filp->f_count--; + put_filp(filp); } else error = -EMFILE; iput(inode); diff --git a/fs/exec.c b/fs/exec.c index 4af3e8a63105..a8423633b23a 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -36,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -148,7 +148,7 @@ int open_inode(struct inode * inode, int mode) if (f->f_op->open) { int error = f->f_op->open(inode,f); if (error) { - f->f_count--; + put_filp(f); put_unused_fd(fd); return error; } @@ -384,7 +384,7 @@ static void exec_mmap(void) * (the oom is wrong there, too, IMHO) */ if (current->mm->count > 1) { - struct mm_struct *mm = kmalloc(sizeof(*mm), GFP_KERNEL); + struct mm_struct *mm = kmem_cache_alloc(mm_cachep, SLAB_KERNEL); if (!mm) { /* this is wrong, I think. */ oom(current); @@ -394,8 +394,7 @@ static void exec_mmap(void) init_new_context(mm); mm->def_flags = 0; /* should future lockings be kept? */ mm->count = 1; - mm->mmap = NULL; - mm->mmap_avl = NULL; + mm->mmap = mm->mmap_cache = NULL; mm->total_vm = 0; mm->rss = 0; current->mm->count--; diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c index 61b5b1a391d0..171de1cf5533 100644 --- a/fs/ext2/balloc.c +++ b/fs/ext2/balloc.c @@ -177,6 +177,7 @@ void ext2_free_blocks (const struct inode * inode, unsigned long block, unsigned long bit; unsigned long i; int bitmap_nr; + unsigned long overflow; struct super_block * sb; struct ext2_group_desc * gdp; struct ext2_super_block * es; @@ -199,14 +200,20 @@ void ext2_free_blocks (const struct inode * inode, unsigned long block, ext2_debug ("freeing block %lu\n", block); +do_more: + overflow = 0; block_group = (block - le32_to_cpu(es->s_first_data_block)) / EXT2_BLOCKS_PER_GROUP(sb); - bit = (block - le32_to_cpu(es->s_first_data_block)) % EXT2_BLOCKS_PER_GROUP(sb); - if (bit + count > EXT2_BLOCKS_PER_GROUP(sb)) - ext2_panic (sb, "ext2_free_blocks", - "Freeing blocks across group boundary - " - "Block = %lu, count = %lu", - block, count); + bit = (block - le32_to_cpu(es->s_first_data_block)) % + EXT2_BLOCKS_PER_GROUP(sb); + /* + * Check to see if we are freeing blocks across a group + * boundary. + */ + if (bit + count > EXT2_BLOCKS_PER_GROUP(sb)) { + overflow = bit + count - EXT2_BLOCKS_PER_GROUP(sb); + count -= overflow; + } bitmap_nr = load_block_bitmap (sb, block_group); bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; gdp = get_group_desc (sb, block_group, &bh2); @@ -246,6 +253,11 @@ void ext2_free_blocks (const struct inode * inode, unsigned long block, ll_rw_block (WRITE, 1, &bh); wait_on_buffer (bh); } + if (overflow) { + block += count; + count = overflow; + goto do_more; + } sb->s_dirt = 1; unlock_super (sb); return; @@ -546,6 +558,19 @@ static inline int block_in_use (unsigned long block, EXT2_BLOCKS_PER_GROUP(sb), map); } +static int test_root(int a, int b) +{ + if (a == 0) + return 1; + while (1) { + if (a == 1) + return 1; + if (a % b) + return 0; + a = a / b; + } +} + void ext2_check_blocks_bitmap (struct super_block * sb) { struct buffer_head * bh; @@ -569,15 +594,21 @@ void ext2_check_blocks_bitmap (struct super_block * sb) bitmap_nr = load_block_bitmap (sb, i); bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; - if (!ext2_test_bit (0, bh->b_data)) - ext2_error (sb, "ext2_check_blocks_bitmap", - "Superblock in group %d is marked free", i); - - for (j = 0; j < desc_blocks; j++) - if (!ext2_test_bit (j + 1, bh->b_data)) + if (!(sb->u.ext2_sb.s_feature_ro_compat & + EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER) || + (test_root(i, 3) || test_root(i, 5) || test_root(i, 7))) { + if (!ext2_test_bit (0, bh->b_data)) ext2_error (sb, "ext2_check_blocks_bitmap", + "Superblock in group %d " + "is marked free", i); + + for (j = 0; j < desc_blocks; j++) + if (!ext2_test_bit (j + 1, bh->b_data)) + ext2_error (sb, + "ext2_check_blocks_bitmap", "Descriptor block #%d in group " "%d is marked free", j, i); + } if (!block_in_use (le32_to_cpu(gdp->bg_block_bitmap), sb, bh->b_data)) ext2_error (sb, "ext2_check_blocks_bitmap", diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index 5a876261e2e7..f2dbff2d1a55 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c @@ -503,12 +503,23 @@ void ext2_read_inode (struct inode * inode) inode->i_op = &blkdev_inode_operations; else if (S_ISFIFO(inode->i_mode)) init_fifo(inode); - if (inode->u.ext2_i.i_flags & EXT2_SYNC_FL) + inode->i_attr_flags = 0; + if (inode->u.ext2_i.i_flags & EXT2_SYNC_FL) { + inode->i_attr_flags |= ATTR_FLAG_SYNCRONOUS; inode->i_flags |= MS_SYNCHRONOUS; - if (inode->u.ext2_i.i_flags & EXT2_APPEND_FL) + } + if (inode->u.ext2_i.i_flags & EXT2_APPEND_FL) { + inode->i_attr_flags |= ATTR_FLAG_APPEND; inode->i_flags |= S_APPEND; - if (inode->u.ext2_i.i_flags & EXT2_IMMUTABLE_FL) + } + if (inode->u.ext2_i.i_flags & EXT2_IMMUTABLE_FL) { + inode->i_attr_flags |= ATTR_FLAG_IMMUTABLE; inode->i_flags |= S_IMMUTABLE; + } + if (inode->u.ext2_i.i_flags & EXT2_NOATIME_FL) { + inode->i_attr_flags |= ATTR_FLAG_NOATIME; + inode->i_flags |= MS_NOATIME; + } } static int ext2_update_inode(struct inode * inode, int do_sync) @@ -597,11 +608,71 @@ static int ext2_update_inode(struct inode * inode, int do_sync) void ext2_write_inode (struct inode * inode) { +#if 0 + printk("ext2_write(%04x:%06d)...", inode->i_dev, inode->i_ino); +#endif ext2_update_inode (inode, 0); } int ext2_sync_inode (struct inode *inode) { +#if 0 + printk("ext2_sync(%04x:%06d)...", inode->i_dev, inode->i_ino); +#endif return ext2_update_inode (inode, 1); } +int ext2_notify_change(struct inode *inode, struct iattr *iattr) +{ + int retval; + unsigned int flags; + + if ((iattr->ia_attr_flags & + (ATTR_FLAG_APPEND | ATTR_FLAG_IMMUTABLE)) ^ + (inode->u.ext2_i.i_flags & + (EXT2_APPEND_FL | EXT2_IMMUTABLE_FL))) { + if (!fsuser() || securelevel > 0) + return -EPERM; + } else + if ((current->fsuid != inode->i_uid) && !fsuser()) + return -EPERM; + + if ((retval = inode_change_ok(inode, iattr)) != 0) + return retval; + + inode_setattr(inode, iattr); + + flags = iattr->ia_attr_flags; + if (flags & ATTR_FLAG_SYNCRONOUS) { + inode->i_flags |= MS_SYNCHRONOUS; + inode->u.ext2_i.i_flags = EXT2_SYNC_FL; + } else { + inode->i_flags &= ~MS_SYNCHRONOUS; + inode->u.ext2_i.i_flags &= ~EXT2_SYNC_FL; + } + if (flags & ATTR_FLAG_NOATIME) { + inode->i_flags |= MS_NOATIME; + inode->u.ext2_i.i_flags = EXT2_NOATIME_FL; + } else { + inode->i_flags &= ~MS_NOATIME; + inode->u.ext2_i.i_flags &= ~EXT2_NOATIME_FL; + } + if (flags & ATTR_FLAG_APPEND) { + inode->i_flags |= S_APPEND; + inode->u.ext2_i.i_flags = EXT2_APPEND_FL; + } else { + inode->i_flags &= ~S_APPEND; + inode->u.ext2_i.i_flags &= ~EXT2_APPEND_FL; + } + if (flags & ATTR_FLAG_IMMUTABLE) { + inode->i_flags |= S_IMMUTABLE; + inode->u.ext2_i.i_flags = EXT2_IMMUTABLE_FL; + } else { + inode->i_flags &= ~S_IMMUTABLE; + inode->u.ext2_i.i_flags &= ~EXT2_IMMUTABLE_FL; + } + inode->i_dirt = 1; + + return 0; +} + diff --git a/fs/ext2/ioctl.c b/fs/ext2/ioctl.c index 0892ce79f076..387600bbfd47 100644 --- a/fs/ext2/ioctl.c +++ b/fs/ext2/ioctl.c @@ -45,6 +45,10 @@ int ext2_ioctl (struct inode * inode, struct file * filp, unsigned int cmd, if (IS_RDONLY(inode)) return -EROFS; inode->u.ext2_i.i_flags = flags; + if (flags & EXT2_SYNC_FL) + inode->i_flags |= MS_SYNCHRONOUS; + else + inode->i_flags &= ~MS_SYNCHRONOUS; if (flags & EXT2_APPEND_FL) inode->i_flags |= S_APPEND; else @@ -53,6 +57,10 @@ int ext2_ioctl (struct inode * inode, struct file * filp, unsigned int cmd, inode->i_flags |= S_IMMUTABLE; else inode->i_flags &= ~S_IMMUTABLE; + if (flags & EXT2_NOATIME_FL) + inode->i_flags |= MS_NOATIME; + else + inode->i_flags &= ~MS_NOATIME; inode->i_ctime = CURRENT_TIME; inode->i_dirt = 1; return 0; diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c index 632d6eee83b2..25d86b90d914 100644 --- a/fs/ext2/namei.c +++ b/fs/ext2/namei.c @@ -583,7 +583,7 @@ static int empty_dir (struct inode * inode) offset = le16_to_cpu(de->rec_len) + le16_to_cpu(de1->rec_len); de = (struct ext2_dir_entry *) ((char *) de1 + le16_to_cpu(de1->rec_len)); while (offset < inode->i_size ) { - if ((void *) de >= (void *) (bh->b_data + sb->s_blocksize)) { + if (!bh || (void *) de >= (void *) (bh->b_data + sb->s_blocksize)) { brelse (bh); bh = ext2_bread (inode, offset >> EXT2_BLOCK_SIZE_BITS(sb), 1, &err); if (!bh) { diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 26e18852edcc..5885e3067b51 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -508,6 +508,9 @@ struct super_block * ext2_read_super (struct super_block * sb, void * data, goto failed_mount; } } + sb->u.ext2_sb.s_feature_compat = es->s_feature_compat; + sb->u.ext2_sb.s_feature_incompat = es->s_feature_incompat; + sb->u.ext2_sb.s_feature_ro_compat = es->s_feature_ro_compat; sb->u.ext2_sb.s_frag_size = EXT2_MIN_FRAG_SIZE << (__s32) le32_to_cpu(es->s_log_frag_size); if (sb->u.ext2_sb.s_frag_size) diff --git a/fs/fcntl.c b/fs/fcntl.c index bedc02e89036..6418a5d83a7d 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -163,6 +163,7 @@ asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg) if (current->pgrp == -arg || current->pid == arg) goto fasync_ok; + read_lock(&tasklist_lock); for_each_task(p) { if ((p->pid == arg) || (p->pid == -arg) || (p->pgrp == -arg)) { @@ -171,11 +172,14 @@ asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg) if ((p->session != current->session) && (p->uid != current->uid) && (p->euid != current->euid) && - !suser()) + !suser()) { + read_unlock(&tasklist_lock); goto out; + } break; } } + read_unlock(&tasklist_lock); err = -EINVAL; if ((task_found == 0) && !suser()) break; diff --git a/fs/file_table.c b/fs/file_table.c index 17a670f59f3c..8a19e4b9e07e 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -2,143 +2,104 @@ * linux/fs/file_table.c * * Copyright (C) 1991, 1992 Linus Torvalds + * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) */ #include +#include +#include #include +#include #include #include +#include -/* - * first_file points to a doubly linked list of all file structures in - * the system. - * nr_files holds the length of this list. - */ -struct file * first_file = NULL; +/* SLAB cache for filp's. */ +static kmem_cache_t *filp_cache; + +/* sysctl tunables... */ int nr_files = 0; int max_files = NR_FILE; -/* - * Insert a new file structure at the head of the list of available ones. - */ -static inline void insert_file_free(struct file *file) -{ - struct file *next, *prev; - - next = first_file; - first_file = file; - file->f_count = 0; - prev = next->f_prev; - file->f_next = next; - next->f_prev = file; - file->f_prev = prev; - prev->f_next = file; -} +/* Free list management, if you are here you must have f_count == 0 */ +static struct file * free_filps = NULL; -/* - * Remove a file structure from the list of available ones. - */ -static inline void remove_file_free(struct file *file) +void insert_file_free(struct file *file) { - struct file *next, *prev; - - next = file->f_next; - prev = file->f_prev; - file->f_next = file->f_prev = NULL; - if (first_file == file) - first_file = next; - next->f_prev = prev; - prev->f_next = next; + if((file->f_next = free_filps) != NULL) + free_filps->f_pprev = &file->f_next; + free_filps = file; + file->f_pprev = &free_filps; } -/* - * Insert a file structure at the end of the list of available ones. - */ -static inline void put_last_free(struct file *file) +/* The list of in-use filp's must be exported (ugh...) */ +struct file *inuse_filps = NULL; + +static inline void put_inuse(struct file *file) { - struct file *next, *prev; - - next = first_file; - file->f_next = next; - prev = next->f_prev; - next->f_prev = file; - file->f_prev = prev; - prev->f_next = file; + if((file->f_next = inuse_filps) != NULL) + inuse_filps->f_pprev = &file->f_next; + inuse_filps = file; + file->f_pprev = &inuse_filps; } -/* - * Allocate a new memory page for file structures and - * insert the new structures into the global list. - * Returns 0, if there is no more memory, 1 otherwise. - */ +/* Get more free filp's. */ static int grow_files(void) { - struct file * file; - int i; - - /* - * We don't have to clear the page because we only look into - * f_count, f_prev and f_next and they get initialized in - * insert_file_free. The rest of the file structure is cleared - * by get_empty_filp before it is returned. - */ - file = (struct file *) __get_free_page(GFP_KERNEL); - - if (!file) - return 0; - - nr_files += i = PAGE_SIZE/sizeof(struct file); - - if (!first_file) - file->f_count = 0, - file->f_next = file->f_prev = first_file = file++, - i--; - - for (; i ; i--) - insert_file_free(file++); + int i = 16; + + while(i--) { + struct file * file = kmem_cache_alloc(filp_cache, SLAB_KERNEL); + if(!file) { + if(i == 15) + return 0; + goto got_some; + } + insert_file_free(file); + nr_files++; + } +got_some: return 1; } -unsigned long file_table_init(unsigned long start, unsigned long end) +void file_table_init(void) { - return start; + filp_cache = kmem_cache_create("filp", sizeof(struct file), + sizeof(unsigned long) * 8, + SLAB_HWCACHE_ALIGN, NULL, NULL); + if(!filp_cache) + panic("VFS: Cannot alloc filp SLAB cache."); } -/* - * Find an unused file structure and return a pointer to it. +/* Find an unused file structure and return a pointer to it. * Returns NULL, if there are no more free file structures or * we run out of memory. */ struct file * get_empty_filp(void) { - int i; - int max = max_files; struct file * f; - /* - * Reserve a few files for the super-user.. - */ - if (current->euid) - max -= 10; - - /* if the return is taken, we are in deep trouble */ - if (!first_file && !grow_files()) - return NULL; - - do { - for (f = first_file, i=0; i < nr_files; i++, f = f->f_next) - if (!f->f_count) { - remove_file_free(f); - memset(f,0,sizeof(*f)); - put_last_free(f); - f->f_count = 1; - f->f_version = ++event; - return f; - } - } while (nr_files < max && grow_files()); - - return NULL; +again: + if((f = free_filps) != NULL) { + remove_filp(f); + memset(f, 0, sizeof(*f)); + f->f_count = 1; + f->f_version = ++event; + put_inuse(f); + } else { + int max = max_files; + + /* Reserve a few files for the super-user.. */ + if (current->euid) + max -= 10; + + if (nr_files < max && grow_files()) + goto again; + + /* Big problems... */ + } + return f; } #ifdef CONFIG_QUOTA @@ -146,10 +107,9 @@ struct file * get_empty_filp(void) void add_dquot_ref(kdev_t dev, short type) { struct file *filp; - int cnt; - for (filp = first_file, cnt = 0; cnt < nr_files; cnt++, filp = filp->f_next) { - if (!filp->f_count || !filp->f_inode || filp->f_inode->i_dev != dev) + for (filp = inuse_filps; filp; filp = filp->f_next) { + if (!filp->f_inode || filp->f_inode->i_dev != dev) continue; if (filp->f_mode & FMODE_WRITE && filp->f_inode->i_sb->dq_op) { filp->f_inode->i_sb->dq_op->initialize(filp->f_inode, type); @@ -161,10 +121,9 @@ void add_dquot_ref(kdev_t dev, short type) void reset_dquot_ptrs(kdev_t dev, short type) { struct file *filp; - int cnt; - for (filp = first_file, cnt = 0; cnt < nr_files; cnt++, filp = filp->f_next) { - if (!filp->f_count || !filp->f_inode || filp->f_inode->i_dev != dev) + for (filp = inuse_filps; filp; filp = filp->f_next) { + if (!filp->f_inode || filp->f_inode->i_dev != dev) continue; if (IS_WRITABLE(filp->f_inode)) { filp->f_inode->i_dquot[type] = NODQUOT; diff --git a/fs/inode.c b/fs/inode.c index b1d9bda4e15b..d7e317c899f7 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -232,12 +232,10 @@ repeat: int fs_may_remount_ro(kdev_t dev) { struct file * file; - int i; /* Check that no files are currently opened for writing. */ - for (file = first_file, i=0; if_next) { - if (!file->f_count || !file->f_inode || - file->f_inode->i_dev != dev) + for (file = inuse_filps; file; file = file->f_next) { + if (!file->f_inode || file->f_inode->i_dev != dev) continue; if (S_ISREG(file->f_inode->i_mode) && (file->f_mode & 2)) return 0; @@ -288,7 +286,7 @@ int inode_change_ok(struct inode *inode, struct iattr *attr) ((attr->ia_valid & ATTR_GID) && (!in_group_p(attr->ia_gid) && - (attr->ia_gid != inode->i_gid))) || + (attr->ia_gid != inode->i_gid)) && not_fsuser) || ((attr->ia_valid & (ATTR_ATIME_SET | ATTR_MTIME_SET)) && (fsuid != iuid) && not_fsuser)) @@ -325,6 +323,8 @@ void inode_setattr(struct inode *inode, struct iattr *attr) if (!fsuser() && !in_group_p(inode->i_gid)) inode->i_mode &= ~S_ISGID; } + if (attr->ia_valid & ATTR_ATTR_FLAG) + inode->i_attr_flags = attr->ia_attr_flags; inode->i_dirt = 1; } diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c index 24093a6151ea..afc3fb2f06e1 100644 --- a/fs/lockd/svcsubs.c +++ b/fs/lockd/svcsubs.c @@ -228,12 +228,12 @@ nlm_release_file(struct nlm_file *file) down(&nlm_file_sema); /* If there are no more locks etc, delete the file */ - if (--(file->f_count) == 0 - && !nlm_inspect_file(NULL, file, NLM_ACT_CHECK)) - nlm_delete_file(file); + if(--file->f_count == 0) { + if(!nlm_inspect_file(NULL, file, NLM_ACT_CHECK)) + nlm_delete_file(file); + } up(&nlm_file_sema); - return; } /* diff --git a/fs/msdos/msdosfs_syms.c b/fs/msdos/msdosfs_syms.c index 914a178a9bce..9e2c26bd6d9a 100644 --- a/fs/msdos/msdosfs_syms.c +++ b/fs/msdos/msdosfs_syms.c @@ -30,7 +30,7 @@ EXPORT_SYMBOL(msdos_read_super); EXPORT_SYMBOL(msdos_put_super); -static struct file_system_type msdos_fs_type = { +struct file_system_type msdos_fs_type = { msdos_read_super, "msdos", 1, NULL }; diff --git a/fs/namei.c b/fs/namei.c index fd5304ecc1be..6bf32e0b1812 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -124,24 +124,16 @@ int permission(struct inode * inode,int mask) * put_write_access() releases this write permission. * This is used for regular files. * We cannot support write (and maybe mmap read-write shared) accesses and - * MAP_DENYWRITE mmappings simultaneously. + * MAP_DENYWRITE mmappings simultaneously. The i_writecount field of an inode + * can have the following values: + * 0: no writers, no VM_DENYWRITE mappings + * < 0: (-i_writecount) vm_area_structs with VM_DENYWRITE set exist + * > 0: (i_writecount) users are writing to the file. */ int get_write_access(struct inode * inode) { - struct task_struct * p; - - if ((inode->i_count > 1) && S_ISREG(inode->i_mode)) /* shortcut */ - for_each_task(p) { - struct vm_area_struct * mpnt; - if (!p->mm) - continue; - for(mpnt = p->mm->mmap; mpnt; mpnt = mpnt->vm_next) { - if (inode != mpnt->vm_inode) - continue; - if (mpnt->vm_flags & VM_DENYWRITE) - return -ETXTBSY; - } - } + if (inode->i_writecount < 0) + return -ETXTBSY; inode->i_writecount++; return 0; } diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c index 1db0dcc78193..4cf65f8a90c4 100644 --- a/fs/ncpfs/inode.c +++ b/fs/ncpfs/inode.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -177,7 +178,7 @@ struct super_block * printk("ncp_read_super: could not alloc ncp_server\n"); return NULL; } - ncp_filp->f_count += 1; + ncp_filp->f_count++; lock_super(sb); @@ -256,7 +257,7 @@ struct super_block * ncp_unlock_server(server); ncp_kfree_s(server->packet, server->packet_size); fail: - ncp_filp->f_count -= 1; + put_filp(ncp_filp); ncp_kfree_s(NCP_SBP(sb), sizeof(struct ncp_server)); return NULL; } diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index ecec8a22b770..6327cee4895c 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -285,6 +285,10 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, if (err) { if (wflag) put_write_access(inode); + + /* I nearly added put_filp() call here, but this filp + * is really on callers stack frame. -DaveM + */ filp->f_count--; return nfserrno(-err); } diff --git a/fs/open.c b/fs/open.c index e81c5fbf549f..a6a51799a5ed 100644 --- a/fs/open.c +++ b/fs/open.c @@ -605,7 +605,7 @@ cleanup_all: cleanup_inode: iput(inode); cleanup_file: - f->f_count--; + put_filp(f); return error; } diff --git a/fs/pipe.c b/fs/pipe.c index 9cf3c7a6de16..5fa5d6e917b1 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -74,7 +75,10 @@ static long pipe_read(struct inode * inode, struct file * filp, PIPE_LOCK(*inode)--; wake_up_interruptible(&PIPE_WAIT(*inode)); if (read) { - inode->i_atime = CURRENT_TIME; + if (DO_UPDATE_ATIME(inode)) { + inode->i_atime = CURRENT_TIME; + inode->i_dirt = 1; + } return read; } if (PIPE_WRITERS(*inode)) @@ -128,6 +132,7 @@ static long pipe_write(struct inode * inode, struct file * filp, free = 1; } inode->i_ctime = inode->i_mtime = CURRENT_TIME; + inode->i_dirt = 1; return written; } @@ -440,9 +445,9 @@ close_f12_inode: inode->i_count--; iput(inode); close_f12: - f2->f_count--; + put_filp(f2); close_f1: - f1->f_count--; + put_filp(f1); no_files: return error; } diff --git a/fs/proc/array.c b/fs/proc/array.c index 69ea6f1ee415..126ed2dfe24d 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -154,9 +154,7 @@ static long read_profile(struct inode *inode, struct file *file, return read; } -#ifdef __SMP__ -extern int setup_profiling_timer (unsigned int multiplier); /* * Writing to /proc/profile resets the counters @@ -168,6 +166,8 @@ static long write_profile(struct inode * inode, struct file * file, const char * buf, unsigned long count) { int i=prof_len; +#ifdef __SMP__ + extern int setup_profiling_timer (unsigned int multiplier); if (count==sizeof(int)) { unsigned int multiplier; @@ -178,14 +178,12 @@ static long write_profile(struct inode * inode, struct file * file, if (setup_profiling_timer(multiplier)) return -EINVAL; } +#endif while (i--) prof_buffer[i]=0UL; return count; } -#else -#define write_profile NULL -#endif static struct file_operations proc_profile_operations = { NULL, /* lseek */ @@ -344,18 +342,6 @@ static int get_cmdline(char * buffer) return sprintf(buffer, "%s\n", saved_command_line); } -static struct task_struct ** get_task(pid_t pid) -{ - struct task_struct ** p; - - p = task; - while (++p < task+NR_TASKS) { - if (*p && (*p)->pid == pid) - return p; - } - return NULL; -} - static unsigned long get_phys_addr(struct task_struct * p, unsigned long ptr) { pgd_t *page_dir; @@ -386,7 +372,7 @@ static unsigned long get_phys_addr(struct task_struct * p, unsigned long ptr) return pte_page(pte) + (ptr & ~PAGE_MASK); } -static int get_array(struct task_struct ** p, unsigned long start, unsigned long end, char * buffer) +static int get_array(struct task_struct *p, unsigned long start, unsigned long end, char * buffer) { unsigned long addr; int size = 0, result = 0; @@ -395,7 +381,7 @@ static int get_array(struct task_struct ** p, unsigned long start, unsigned long if (start >= end) return result; for (;;) { - addr = get_phys_addr(*p, start); + addr = get_phys_addr(p, start); if (!addr) return result; do { @@ -417,20 +403,20 @@ static int get_array(struct task_struct ** p, unsigned long start, unsigned long static int get_env(int pid, char * buffer) { - struct task_struct ** p = get_task(pid); + struct task_struct *p = find_task_by_pid(pid); - if (!p || !*p || !(*p)->mm) + if (!p || !p->mm) return 0; - return get_array(p, (*p)->mm->env_start, (*p)->mm->env_end, buffer); + return get_array(p, p->mm->env_start, p->mm->env_end, buffer); } static int get_arg(int pid, char * buffer) { - struct task_struct ** p = get_task(pid); + struct task_struct *p = find_task_by_pid(pid); - if (!p || !*p || !(*p)->mm) + if (!p || !p->mm) return 0; - return get_array(p, (*p)->mm->arg_start, (*p)->mm->arg_end, buffer); + return get_array(p, p->mm->arg_start, p->mm->arg_end, buffer); } static unsigned long get_wchan(struct task_struct *p) @@ -443,7 +429,7 @@ static unsigned long get_wchan(struct task_struct *p) unsigned long stack_page; int count = 0; - stack_page = p->kernel_stack_page; + stack_page = 4096 + (unsigned long)p; if (!stack_page) return 0; ebp = p->tss.ebp; @@ -507,8 +493,8 @@ static unsigned long get_wchan(struct task_struct *p) } #if defined(__i386__) -# define KSTK_EIP(tsk) (((unsigned long *)tsk->kernel_stack_page)[1019]) -# define KSTK_ESP(tsk) (((unsigned long *)tsk->kernel_stack_page)[1022]) +# define KSTK_EIP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)))[1019]) +# define KSTK_ESP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)))[1022]) #elif defined(__alpha__) /* * See arch/alpha/kernel/ptrace.c for details. @@ -681,9 +667,9 @@ static inline char * task_sig(struct task_struct *p, char *buffer) static int get_status(int pid, char * buffer) { char * orig = buffer; - struct task_struct ** p = get_task(pid), *tsk; + struct task_struct *tsk = find_task_by_pid(pid); - if (!p || (tsk = *p) == NULL) + if (!tsk) return 0; buffer = task_name(tsk, buffer); buffer = task_state(tsk, buffer); @@ -694,14 +680,14 @@ static int get_status(int pid, char * buffer) static int get_stat(int pid, char * buffer) { - struct task_struct ** p = get_task(pid), *tsk; + struct task_struct *tsk = find_task_by_pid(pid); unsigned long sigignore=0, sigcatch=0, wchan; unsigned long vsize, eip, esp; long priority, nice; int i,tty_pgrp; char state; - if (!p || (tsk = *p) == NULL) + if (!tsk) return 0; if (tsk->state < 0 || tsk->state > 5) state = '.'; @@ -714,10 +700,8 @@ static int get_stat(int pid, char * buffer) vsize += vma->vm_end - vma->vm_start; vma = vma->vm_next; } - if (tsk->kernel_stack_page) { - eip = KSTK_EIP(tsk); - esp = KSTK_ESP(tsk); - } + eip = KSTK_EIP(tsk); + esp = KSTK_ESP(tsk); } wchan = get_wchan(tsk); if (tsk->sig) { @@ -864,10 +848,10 @@ static void statm_pgd_range(pgd_t * pgd, unsigned long address, unsigned long en static int get_statm(int pid, char * buffer) { - struct task_struct ** p = get_task(pid), *tsk; + struct task_struct *tsk = find_task_by_pid(pid); int size=0, resident=0, share=0, trs=0, lrs=0, drs=0, dt=0; - if (!p || (tsk = *p) == NULL) + if (!tsk) return 0; if (tsk->mm && tsk->mm != &init_mm) { struct vm_area_struct * vma = tsk->mm->mmap; @@ -932,17 +916,17 @@ static int get_statm(int pid, char * buffer) static long read_maps (int pid, struct file * file, char * buf, unsigned long count) { - struct task_struct ** p = get_task(pid); + struct task_struct *p = find_task_by_pid(pid); char * destptr; loff_t lineno; int column; struct vm_area_struct * map; int i; - if (!p || !*p) + if (!p) return -EINVAL; - if (!(*p)->mm || (*p)->mm == &init_mm || count == 0) + if (!p->mm || p->mm == &init_mm || count == 0) return 0; /* decode f_pos */ @@ -950,7 +934,7 @@ static long read_maps (int pid, struct file * file, column = file->f_pos & (MAPS_LINE_LENGTH-1); /* quickly go to line lineno */ - for (map = (*p)->mm->mmap, i = 0; map && (i < lineno); map = map->vm_next, i++) + for (map = p->mm->mmap, i = 0; map && (i < lineno); map = map->vm_next, i++) continue; destptr = buf; @@ -1011,7 +995,7 @@ static long read_maps (int pid, struct file * file, /* By writing to user space, we might have slept. * Stop the loop, to avoid a race condition. */ - if (*p != current) + if (p != current) break; } diff --git a/fs/proc/base.c b/fs/proc/base.c index 28cd61f5f995..7e9a65e088e7 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -52,17 +52,14 @@ static struct inode_operations proc_base_inode_operations = { static void proc_pid_fill_inode(struct inode * inode) { - struct task_struct * p; + struct task_struct *p; int pid = inode->i_ino >> 16; int ino = inode->i_ino & 0xffff; - for_each_task(p) { - if (p->pid == pid) { - if (p->dumpable || ino == PROC_PID_INO) { - inode->i_uid = p->euid; - inode->i_gid = p->gid; - } - return; + if ((p = find_task_by_pid(pid)) != NULL) { + if (p->dumpable || ino == PROC_PID_INO) { + inode->i_uid = p->euid; + inode->i_gid = p->gid; } } } diff --git a/fs/proc/fd.c b/fs/proc/fd.c index e5e4fd9a8942..fd262bc9de13 100644 --- a/fs/proc/fd.c +++ b/fs/proc/fd.c @@ -58,7 +58,6 @@ static int proc_lookupfd(struct inode * dir, const char * name, int len, unsigned int ino, pid, fd, c; struct task_struct * p; struct super_block * sb; - int i; *result = NULL; ino = dir->i_ino; @@ -100,10 +99,8 @@ static int proc_lookupfd(struct inode * dir, const char * name, int len, break; } } - for (i = 0 ; i < NR_TASKS ; i++) - if ((p = task[i]) && p->pid == pid) - break; - if (!pid || i >= NR_TASKS) + p = find_task_by_pid(pid); + if (!pid || !p) return -ENOENT; /* @@ -112,8 +109,11 @@ static int proc_lookupfd(struct inode * dir, const char * name, int len, * is NULL */ - if (fd >= NR_OPEN || !p->files || !p->files->fd[fd] || !p->files->fd[fd]->f_inode) - return -ENOENT; + if (fd >= NR_OPEN || + !p->files || + !p->files->fd[fd] || + !p->files->fd[fd]->f_inode) + return -ENOENT; ino = (pid << 16) + (PROC_PID_FD_DIR << 8) + fd; @@ -128,8 +128,7 @@ static int proc_readfd(struct inode * inode, struct file * filp, void * dirent, filldir_t filldir) { char buf[NUMBUF]; - int task_nr; - struct task_struct * p; + struct task_struct * p, **tarrayp; unsigned int fd, pid, ino; unsigned long i,j; @@ -149,13 +148,10 @@ static int proc_readfd(struct inode * inode, struct file * filp, return 0; } - task_nr = 1; - for (;;) { - if ((p = task[task_nr]) && p->pid == pid) - break; - if (++task_nr >= NR_TASKS) - return 0; - } + p = find_task_by_pid(pid); + if(!p) + return 0; + tarrayp = p->tarray_ptr; for (fd -= 2 ; fd < NR_OPEN; fd++, filp->f_pos++) { if (!p->files) @@ -176,7 +172,7 @@ static int proc_readfd(struct inode * inode, struct file * filp, break; /* filldir() might have slept, so we must re-validate "p" */ - if (p != task[task_nr] || p->pid != pid) + if (p != *tarrayp || p->pid != pid) break; } return 0; diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 0ff6a4f5cb06..943137bf4d6b 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -81,7 +81,6 @@ static int parse_options(char *options,uid_t *uid,gid_t *gid) struct inode * proc_get_inode(struct super_block * s, int ino, struct proc_dir_entry * de) { struct inode * inode = iget(s, ino); - struct task_struct *p; #ifdef CONFIG_SUN_OPENPROMFS_MODULE if ((inode->i_ino >= PROC_OPENPROM_FIRST) @@ -111,9 +110,14 @@ struct inode * proc_get_inode(struct super_block * s, int ino, struct proc_dir_e * Fixup the root inode's nlink value */ if (inode->i_ino == PROC_ROOT_INO) { - for_each_task(p) - if (p && p->pid) + struct task_struct *p; + + read_lock(&tasklist_lock); + for_each_task(p) { + if (p->pid) inode->i_nlink++; + } + read_unlock(&tasklist_lock); } return inode; } @@ -155,7 +159,6 @@ void proc_read_inode(struct inode * inode) { unsigned long ino, pid; struct task_struct * p; - int i; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; inode->i_blocks = 0; @@ -170,13 +173,8 @@ void proc_read_inode(struct inode * inode) inode->i_nlink = 1; inode->i_size = 0; pid = ino >> 16; - if (!pid) - return; - p = task[0]; - for (i = 0; i < NR_TASKS ; i++) - if ((p = task[i]) && (p->pid == pid)) - break; - if (!p || i >= NR_TASKS) + + if (!pid || ((p = find_task_by_pid(pid)) == NULL)) return; ino &= 0x0000ffff; @@ -198,7 +196,6 @@ void proc_read_inode(struct inode * inode) inode->i_mode |= S_IWUSR | S_IXUSR; return; } - return; } void proc_write_inode(struct inode * inode) diff --git a/fs/proc/link.c b/fs/proc/link.c index bbaab7c41ffc..d5c08eafd6cb 100644 --- a/fs/proc/link.c +++ b/fs/proc/link.c @@ -68,7 +68,7 @@ static int proc_follow_link(struct inode * dir, struct inode * inode, unsigned int pid, ino; struct task_struct * p; struct inode * new_inode; - int i, error; + int error; *res_inode = NULL; if (dir) @@ -82,10 +82,9 @@ static int proc_follow_link(struct inode * dir, struct inode * inode, ino = inode->i_ino; pid = ino >> 16; ino &= 0x0000ffff; - for (i = 0 ; i < NR_TASKS ; i++) - if ((p = task[i]) && p->pid == pid) - break; - if (i >= NR_TASKS) { + + p = find_task_by_pid(pid); + if (!p) { iput(inode); return -ENOENT; } diff --git a/fs/proc/mem.c b/fs/proc/mem.c index ccd67566f087..55d52cad5d9d 100644 --- a/fs/proc/mem.c +++ b/fs/proc/mem.c @@ -55,16 +55,10 @@ static struct task_struct * get_task(int pid) struct task_struct * tsk = current; if (pid != tsk->pid) { - int i; - tsk = NULL; - for (i = 1 ; i < NR_TASKS ; i++) - if (task[i] && task[i]->pid == pid) { - tsk = task[i]; - break; - } - /* - * allow accesses only under the same circumstances - * that we would allow ptrace to work + tsk = find_task_by_pid(pid); + + /* Allow accesses only under the same circumstances + * that we would allow ptrace to work. */ if (tsk) { if (!(tsk->flags & PF_PTRACED) diff --git a/fs/proc/root.c b/fs/proc/root.c index e5bb9d51bad1..11c27699aced 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c @@ -683,16 +683,20 @@ static int proc_root_lookup(struct inode * dir,const char * name, int len, struct inode ** result) { unsigned int pid, c; - int i, ino, retval; + int ino, retval; struct task_struct *p; dir->i_count++; if (dir->i_ino == PROC_ROOT_INO) { /* check for safety... */ dir->i_nlink = proc_root.nlink; - for_each_task(p) - if (p && p->pid) + + read_lock(&tasklist_lock); + for_each_task(p) { + if (p->pid) dir->i_nlink++; + } + read_unlock(&tasklist_lock); } retval = proc_lookup(dir, name, len, result); @@ -716,10 +720,8 @@ static int proc_root_lookup(struct inode * dir,const char * name, int len, break; } } - for (i = 0 ; i < NR_TASKS ; i++) - if (task[i] && task[i]->pid == pid) - break; - if (!pid || i >= NR_TASKS) { + p = find_task_by_pid(pid); + if (!pid || !p) { iput(dir); return -ENOENT; } @@ -796,34 +798,40 @@ int proc_readdir(struct inode * inode, struct file * filp, static int proc_root_readdir(struct inode * inode, struct file * filp, void * dirent, filldir_t filldir) { + struct task_struct *p; char buf[NUMBUF]; - unsigned int nr,pid; - unsigned long i,j; + unsigned int nr = filp->f_pos; - nr = filp->f_pos; if (nr < FIRST_PROCESS_ENTRY) { int error = proc_readdir(inode, filp, dirent, filldir); if (error <= 0) return error; - filp->f_pos = nr = FIRST_PROCESS_ENTRY; + filp->f_pos = FIRST_PROCESS_ENTRY; } + nr = FIRST_PROCESS_ENTRY; - for (nr -= FIRST_PROCESS_ENTRY; nr < NR_TASKS; nr++, filp->f_pos++) { - struct task_struct * p = task[nr]; + read_lock(&tasklist_lock); + for_each_task(p) { + unsigned int pid; - if (!p || !(pid = p->pid)) + if(nr++ < filp->f_pos) continue; - j = NUMBUF; - i = pid; - do { - j--; - buf[j] = '0' + (i % 10); - i /= 10; - } while (i); + if((pid = p->pid) != 0) { + unsigned long j = NUMBUF, i = pid; - if (filldir(dirent, buf+j, NUMBUF-j, filp->f_pos, (pid << 16) + PROC_PID_INO) < 0) - break; + do { + j--; + buf[j] = '0' + (i % 10); + i /= 10; + } while (i); + + if (filldir(dirent, buf+j, NUMBUF-j, + filp->f_pos, (pid << 16) + PROC_PID_INO) < 0) + break; + } + filp->f_pos++; } + read_unlock(&tasklist_lock); return 0; } diff --git a/fs/smbfs/inode.c b/fs/smbfs/inode.c index 7ab7d15ff6a6..1943045bbef4 100644 --- a/fs/smbfs/inode.c +++ b/fs/smbfs/inode.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -242,7 +243,7 @@ smb_read_super(struct super_block *sb, void *raw_data, int silent) printk("smb_read_super: could not alloc smb_sb_info\n"); return NULL; } - filp->f_count += 1; + filp->f_count++; lock_super(sb); @@ -319,7 +320,7 @@ smb_read_super(struct super_block *sb, void *raw_data, int silent) smb_vfree(server->packet); server->packet = NULL; } - filp->f_count -= 1; + put_filp(filp); smb_dont_catch_keepalive(server); smb_kfree_s(SMB_SBP(sb), sizeof(struct smb_sb_info)); return NULL; diff --git a/fs/umsdos/namei.c b/fs/umsdos/namei.c index 51cfb08099a5..c4c9e73ba2ba 100644 --- a/fs/umsdos/namei.c +++ b/fs/umsdos/namei.c @@ -301,6 +301,9 @@ static void umsdos_ren_init( ,*(unsigned long *)current->kernel_stack_page \ ,__LINE__); \ } + +#undef chkstk +#define chkstk() do { } while (0) /* Rename a file (move) in the file system. diff --git a/fs/vfat/namei.c b/fs/vfat/namei.c index badb6c7e21ce..e3db004cc66e 100644 --- a/fs/vfat/namei.c +++ b/fs/vfat/namei.c @@ -174,10 +174,12 @@ check_stack(const char *fname, int lineno) printk("------- vfat kstack ok in %s line %d: SL=%d\n", fname, lineno, stack_level); #endif +#if 0 if (*(unsigned long *) current->kernel_stack_page != STACK_MAGIC) { printk("******* vfat stack corruption detected in %s at line %d\n", fname, lineno); } +#endif } static int debug = 0; diff --git a/include/asm-alpha/processor.h b/include/asm-alpha/processor.h index 90829f270eaa..d2968350f677 100644 --- a/include/asm-alpha/processor.h +++ b/include/asm-alpha/processor.h @@ -49,7 +49,7 @@ struct thread_struct { }; #define INIT_MMAP { &init_mm, 0xfffffc0000000000, 0xfffffc0010000000, \ - PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC } + PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, NULL, &init_mm.mmap } #define INIT_TSS { \ 0, 0, 0, \ diff --git a/include/asm-alpha/spinlock.h b/include/asm-alpha/spinlock.h index 9e58e0e4de28..e9119ba9f40a 100644 --- a/include/asm-alpha/spinlock.h +++ b/include/asm-alpha/spinlock.h @@ -39,10 +39,10 @@ typedef struct { } rwlock_t; #define write_lock_irq(lock) cli() #define write_unlock_irq(lock) sti() -#define read_lock_irqsave(lock, flags) save_and_cli(flags) -#define read_unlock_irqrestore(lock, flags) restore_flags(flags) -#define write_lock_irqsave(lock, flags) save_and_cli(flags) -#define write_unlock_irqrestore(lock, flags) restore_flags(flags) +#define read_lock_irqsave(lock, flags) swpipl(flags,7) +#define read_unlock_irqrestore(lock, flags) setipl(flags) +#define write_lock_irqsave(lock, flags) swpipl(flags,7) +#define write_unlock_irqrestore(lock, flags) setipl(flags) #else diff --git a/include/asm-i386/current.h b/include/asm-i386/current.h index 01ba3e9a0c41..e103b5e238b1 100644 --- a/include/asm-i386/current.h +++ b/include/asm-i386/current.h @@ -7,6 +7,15 @@ * entire register is hard locked to contain the value of current. */ extern struct task_struct *current_set[NR_CPUS]; -#define current (current_set[smp_processor_id()]) /* Current on this processor */ + +static inline unsigned long get_esp(void) +{ + unsigned long esp; + __asm__("movl %%esp,%0":"=r" (esp)); + return esp; +} + +#define current ((struct task_struct *)(get_esp() & ~8191UL)) + #endif /* !(_I386_CURRENT_H) */ diff --git a/include/asm-i386/delay.h b/include/asm-i386/delay.h index e22e8d6b20e4..be4ef5c42d11 100644 --- a/include/asm-i386/delay.h +++ b/include/asm-i386/delay.h @@ -36,7 +36,7 @@ extern __inline__ void udelay(unsigned long usecs) __asm__("mull %0" :"=d" (usecs) #ifdef __SMP__ - :"a" (usecs),"0" (cpu_data[smp_processor_id()].udelay_val) + :"a" (usecs),"0" (cpu_data[hard_smp_processor_id()].udelay_val) #else :"a" (usecs),"0" (loops_per_sec) #endif diff --git a/include/asm-i386/hardirq.h b/include/asm-i386/hardirq.h index bdaad9b35443..e9d1b9561279 100644 --- a/include/asm-i386/hardirq.h +++ b/include/asm-i386/hardirq.h @@ -4,7 +4,7 @@ #include extern unsigned int local_irq_count[NR_CPUS]; -#define in_interrupt() (local_irq_count[smp_processor_id()] != 0) +#define in_interrupt() (local_irq_count[hard_smp_processor_id()] != 0) #ifndef __SMP__ diff --git a/include/asm-i386/locks.h b/include/asm-i386/locks.h index 357d309fa23c..a506f3399494 100644 --- a/include/asm-i386/locks.h +++ b/include/asm-i386/locks.h @@ -12,7 +12,7 @@ extern __inline__ void prim_spin_lock(struct spinlock *sp) { - int processor=smp_processor_id(); + int processor=hard_smp_processor_id(); /* * Grab the lock bit diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index d95291598a28..1ff471173a08 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h @@ -119,14 +119,15 @@ struct thread_struct { /* virtual 86 mode info */ struct vm86_struct * vm86_info; unsigned long screen_bitmap; - unsigned long v86flags, v86mask, v86mode; + unsigned long v86flags, v86mask, v86mode, saved_esp0; }; -#define INIT_MMAP { &init_mm, 0xC0000000, 0xFFFFF000, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC } +#define INIT_MMAP \ +{ &init_mm, 0, 0, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, NULL, &init_mm.mmap } #define INIT_TSS { \ 0,0, \ - sizeof(init_kernel_stack) + (long) &init_kernel_stack, \ + sizeof(init_stack) + (long) &init_stack, \ KERNEL_DS, 0, \ 0,0,0,0,0,0, \ (long) &swapper_pg_dir - PAGE_OFFSET, \ @@ -137,7 +138,7 @@ struct thread_struct { {~0, }, /* ioperm */ \ _TSS(0), 0, 0, 0, KERNEL_DS, \ { { 0, }, }, /* 387 state */ \ - NULL, 0, 0, 0, 0 /* vm86_info */, \ + NULL, 0, 0, 0, 0, 0 /* vm86_info */, \ } #define start_thread(regs, new_eip, new_esp) do {\ @@ -164,9 +165,14 @@ extern inline unsigned long thread_saved_pc(struct thread_struct *t) } /* Allocation and freeing of basic task resources. */ -#define alloc_task_struct() kmalloc(sizeof(struct task_struct), GFP_KERNEL) -#define alloc_kernel_stack(p) __get_free_page(GFP_KERNEL) -#define free_task_struct(p) kfree(p) -#define free_kernel_stack(page) free_page((page)) +/* + * NOTE! The task struct and the stack go together + */ +#define alloc_task_struct() \ + ((struct task_struct *) __get_free_pages(GFP_KERNEL,1,0)) +#define free_task_struct(p) free_pages((unsigned long)(p),1) + +#define init_task (init_task_union.task) +#define init_stack (init_task_union.stack) #endif /* __ASM_I386_PROCESSOR_H */ diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h index f1d977f224a5..0f7ae1224745 100644 --- a/include/asm-i386/smp.h +++ b/include/asm-i386/smp.h @@ -178,7 +178,6 @@ extern int smp_found_config; extern int smp_scan_config(unsigned long, unsigned long); extern unsigned long smp_alloc_memory(unsigned long mem_base); extern unsigned char *apic_reg; -extern unsigned char *kernel_stacks[NR_CPUS]; extern unsigned char boot_cpu_id; extern unsigned long cpu_present_map; extern volatile int cpu_number_map[NR_CPUS]; @@ -192,6 +191,9 @@ extern void smp_message_irq(int cpl, void *dev_id, struct pt_regs *regs); extern void smp_reschedule_irq(int cpl, struct pt_regs *regs); extern unsigned long ipi_count; extern void smp_invalidate_rcv(void); /* Process an NMI */ +extern void smp_local_timer_interrupt(struct pt_regs * regs); +extern void setup_APIC_clock (void); + /* * General functions that each host system must provide. @@ -228,7 +230,9 @@ extern __inline unsigned long apic_read(unsigned long reg) * the apic we get the right answer). Hopefully other processors are more sensible 8) */ -extern __inline int smp_processor_id(void) +#define smp_processor_id() (current->processor) + +extern __inline int hard_smp_processor_id(void) { /* we don't want to mark this access volatile - bad code generation */ return GET_APIC_ID(*(unsigned long *)(apic_reg+APIC_ID)); diff --git a/include/asm-i386/spinlock.h b/include/asm-i386/spinlock.h index 27630b21d880..dce2968a9aff 100644 --- a/include/asm-i386/spinlock.h +++ b/include/asm-i386/spinlock.h @@ -77,13 +77,15 @@ typedef struct { unsigned long a[100]; } __dummy_lock_t; #define spin_lock(lock) \ __asm__ __volatile__( \ - "jmp 2f\n" \ - "1:\t" \ - "testb $1,%0\n\t" \ - "jne 1b\n" \ - "2:\t" \ + "\n1:\t" \ "lock ; btsl $0,%0\n\t" \ - "jc 1b" \ + "jc 2f\n" \ + ".text 2\n" \ + "2:\t" \ + "testb $1,%0\n\t" \ + "jne 2b\n\t" \ + "jmp 1b\n" \ + ".text" \ :"=m" (__dummy_lock(lock))) #define spin_unlock(lock) \ @@ -91,32 +93,6 @@ __asm__ __volatile__( \ "lock ; btrl $0,%0" \ :"=m" (__dummy_lock(lock))) -#undef spin_lock -static inline void spin_lock(spinlock_t * lock) -{ - __label__ l1; - int stuck = 10000000; -l1: - __asm__ __volatile__( - "jmp 2f\n" - "1:\t" - "decl %1\n\t" - "je 3f\n\t" - "testb $1,%0\n\t" - "jne 1b\n" - "2:\t" - "lock ; btsl $0,%0\n\t" - "jc 1b\n" - "3:" - :"=m" (__dummy_lock(lock)), - "=r" (stuck) - :"1" (stuck)); - if (!stuck) { - printk("spinlock stuck at %p (%lx)\n",&&l1,lock->previous); - } else - lock->previous = (unsigned long) &&l1; -} - #define spin_trylock(lock) (!set_bit(0,(lock))) #define spin_lock_irq(lock) \ diff --git a/include/asm-m68k/dsp56k.h b/include/asm-m68k/dsp56k.h index e035055bca7f..ab3dd33e23a1 100644 --- a/include/asm-m68k/dsp56k.h +++ b/include/asm-m68k/dsp56k.h @@ -10,41 +10,6 @@ */ -/* Used for uploading DSP binary code */ -struct dsp56k_upload { - int len; - char *bin; -}; - -/* For the DSP host flags */ -struct dsp56k_host_flags { - int dir; /* Bit field. 1 = write output bit, 0 = do nothing. - * 0x0000 means reading only, 0x0011 means - * writing the bits stored in `out' on HF0 and HF1. - * Note that HF2 and HF3 can only be read. - */ - int out; /* Bit field like above. */ - int status; /* Host register's current state is returned */ -}; - -/* ioctl command codes */ -#define DSP56K_UPLOAD 1 /* Upload DSP binary program */ -#define DSP56K_SET_TX_WSIZE 2 /* Host transmit word size (1-4) */ -#define DSP56K_SET_RX_WSIZE 3 /* Host receive word size (1-4) */ -#define DSP56K_HOST_FLAGS 4 /* Host flag registers */ -#define DSP56K_HOST_CMD 5 /* Trig Host Command (0-31) */ -/* - * linux/include/asm-m68k/dsp56k.h - defines and declarations for - * DSP56k device driver - * - * Copyright (C) 1996,1997 Fredrik Noring, lars brinkhoff & Tomas Berndtsson - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive - * for more details. - */ - - /* Used for uploading DSP binary code */ struct dsp56k_upload { int len; diff --git a/include/asm-m68k/namei.h b/include/asm-m68k/namei.h index 516066f1a74b..13502e13eb65 100644 --- a/include/asm-m68k/namei.h +++ b/include/asm-m68k/namei.h @@ -19,24 +19,3 @@ do { } while (0) #endif -/* - * linux/include/asm-m68k/namei.h - * - * Included from linux/fs/namei.c - */ - -#ifndef __M68K_NAMEI_H -#define __M68K_NAMEI_H - -/* These dummy routines maybe changed to something useful - * for /usr/gnemul/ emulation stuff. - * Look at asm-sparc/namei.h for details. - */ - -#define translate_namei(pathname, base, follow_links, res_inode) \ - do { } while (0) - -#define translate_open_namei(pathname, flag, mode, res_inode, base) \ - do { } while (0) - -#endif diff --git a/include/asm-m68k/poll.h b/include/asm-m68k/poll.h index 9b52915d0f7e..f66153a74a1a 100644 --- a/include/asm-m68k/poll.h +++ b/include/asm-m68k/poll.h @@ -19,24 +19,3 @@ struct pollfd { }; #endif -#ifndef __m68k_POLL_H -#define __m68k_POLL_H - -#define POLLIN 1 -#define POLLPRI 2 -#define POLLOUT 4 -#define POLLERR 8 -#define POLLHUP 16 -#define POLLNVAL 32 -#define POLLRDNORM 64 -#define POLLWRNORM POLLOUT -#define POLLRDBAND 128 -#define POLLWRBAND 256 - -struct pollfd { - int fd; - short events; - short revents; -}; - -#endif diff --git a/include/asm-m68k/processor.h b/include/asm-m68k/processor.h index 627e36501ada..ee03ffd83383 100644 --- a/include/asm-m68k/processor.h +++ b/include/asm-m68k/processor.h @@ -44,7 +44,7 @@ struct thread_struct { unsigned char fpstate[FPSTATESIZE]; /* floating point state */ }; -#define INIT_MMAP { &init_mm, 0, 0x40000000, __pgprot(_PAGE_PRESENT|_PAGE_ACCESSED), VM_READ | VM_WRITE | VM_EXEC } +#define INIT_MMAP { &init_mm, 0, 0x40000000, __pgprot(_PAGE_PRESENT|_PAGE_ACCESSED), VM_READ | VM_WRITE | VM_EXEC, NULL, &init_mm.mmap } #define INIT_TSS { \ sizeof(init_kernel_stack) + (long) init_kernel_stack, 0, \ diff --git a/include/asm-m68k/smp_lock.h b/include/asm-m68k/smp_lock.h index 158de0988a3b..6bc9a781bc3f 100644 --- a/include/asm-m68k/smp_lock.h +++ b/include/asm-m68k/smp_lock.h @@ -12,17 +12,3 @@ #define reacquire_kernel_lock(task, cpu, depth) do { } while(0) #endif -#ifndef __M68K_SMPLOCK_H -#define __M68K_SMPLOCK_H - -/* - * We don't do SMP so this is again one of these silly dummy files - * to keep the kernel source looking nice ;-(. - */ - -#define lock_kernel() do { } while(0) -#define unlock_kernel() do { } while(0) -#define release_kernel_lock(task, cpu, depth) ((depth) = 1) -#define reaquire_kernel_lock(task, cpu, depth) do { } while(0) - -#endif diff --git a/include/asm-m68k/softirq.h b/include/asm-m68k/softirq.h index 32f12c0d5ba3..115ef2f666fa 100644 --- a/include/asm-m68k/softirq.h +++ b/include/asm-m68k/softirq.h @@ -60,59 +60,3 @@ extern inline void end_bh_atomic(void) #define softirq_endlock() (__m68k_bh_counter = 0) #endif -#ifndef __M68K_SOFTIRQ_H -#define __M68K_SOFTIRQ_H - -/* - * Software interrupts.. no SMP here either. - */ -#define get_active_bhs() (bh_mask & bh_active) -#define clear_active_bhs(x) atomic_clear_mask((x),&bh_active) - -extern inline void init_bh(int nr, void (*routine)(void)) -{ - bh_base[nr] = routine; - bh_mask_count[nr] = 0; - bh_mask |= 1 << nr; -} - -extern inline void mark_bh(int nr) -{ - set_bit(nr, &bh_active); -} - -/* - * These use a mask count to correctly handle - * nested disable/enable calls - */ -extern inline void disable_bh(int nr) -{ - bh_mask &= ~(1 << nr); - bh_mask_count[nr]++; -} - -extern inline void enable_bh(int nr) -{ - if (!--bh_mask_count[nr]) - bh_mask |= 1 << nr; -} - -extern int __m68k_bh_counter; - -extern inline void start_bh_atomic(void) -{ - __m68k_bh_counter++; - barrier(); -} - -extern inline void end_bh_atomic(void) -{ - barrier(); - __m68k_bh_counter--; -} - -/* These are for the irq's testing the lock */ -#define softirq_trylock() (__m68k_bh_counter ? 0 : (__m68k_bh_counter=1)) -#define softirq_endlock() (__m68k_bh_counter = 0) - -#endif diff --git a/include/asm-m68k/spinlock.h b/include/asm-m68k/spinlock.h index cbae3d62d95c..9a8e9f2ae313 100644 --- a/include/asm-m68k/spinlock.h +++ b/include/asm-m68k/spinlock.h @@ -49,26 +49,3 @@ typedef struct { } rwlock_t; #define write_unlock_irqrestore(lock, flags) restore_flags(flags) #endif -#ifndef __M68K_SPINLOCK_H -#define __M68K_SPINLOCK_H - -/* - * We don't do SMP on the m68k .... at least not yet. - */ - -typedef struct { } spinlock_t; -#define SPIN_LOCK_UNLOCKED { } - -#define spin_lock_init(lock) do { } while(0) -#define spin_lock(lock) do { } while(0) -#define spin_trylock(lock) do { } while(0) -#define spin_unlock(lock) do { } while(0) -#define spin_lock_irq(lock) cli() -#define spin_unlock_irq(lock) sti() - -#define spin_lock_irqsave(lock, flags) \ - do { save_flags(flags); cli(); } while (0) -#define spin_unlock_irqrestore(lock, flags) \ - restore_flags(flags) - -#endif diff --git a/include/asm-mips/processor.h b/include/asm-mips/processor.h index 183237672fc8..7ac70a6a56ea 100644 --- a/include/asm-mips/processor.h +++ b/include/asm-mips/processor.h @@ -139,7 +139,7 @@ struct thread_struct { #if !defined (__LANGUAGE_ASSEMBLY__) #define INIT_MMAP { &init_mm, KSEG0, KSEG1, PAGE_SHARED, \ - VM_READ | VM_WRITE | VM_EXEC } + VM_READ | VM_WRITE | VM_EXEC, NULL, &init_mm.mmap } #define INIT_TSS { \ /* \ diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index 4f97dfeb9c74..9935016be66c 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h @@ -1149,7 +1149,7 @@ /* * Offset of the last Linux flavoured syscall */ -#define __NR_Linux_syscalls 157 +#define __NR_Linux_syscalls 158 #ifndef __LANGUAGE_ASSEMBLY__ diff --git a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h index 3632e318b1ee..aa05332d99c9 100644 --- a/include/asm-ppc/processor.h +++ b/include/asm-ppc/processor.h @@ -116,7 +116,7 @@ struct thread_struct } #define INIT_MMAP { &init_mm, 0, 0x40000000, \ - PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC } + PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, NULL, &init_mm.mmap } /* Free all resources held by a thread. */ extern void release_thread(struct task_struct *); diff --git a/include/asm-sparc/asm_offsets.h b/include/asm-sparc/asm_offsets.h index 3b0abf580ce2..141c0d7cc6f4 100644 --- a/include/asm-sparc/asm_offsets.h +++ b/include/asm-sparc/asm_offsets.h @@ -64,150 +64,158 @@ #define ASIZ_task_p_ysptr 0x00000004 #define AOFF_task_p_osptr 0x000000d4 #define ASIZ_task_p_osptr 0x00000004 -#define AOFF_task_wait_chldexit 0x000000d8 +#define AOFF_task_pidhash_next 0x000000d8 +#define ASIZ_task_pidhash_next 0x00000004 +#define AOFF_task_pidhash_pprev 0x000000dc +#define ASIZ_task_pidhash_pprev 0x00000004 +#define AOFF_task_tarray_ptr 0x000000e0 +#define ASIZ_task_tarray_ptr 0x00000004 +#define AOFF_task_wait_chldexit 0x000000e4 #define ASIZ_task_wait_chldexit 0x00000004 -#define AOFF_task_uid 0x000000dc +#define AOFF_task_uid 0x000000e8 #define ASIZ_task_uid 0x00000002 -#define AOFF_task_euid 0x000000de +#define AOFF_task_euid 0x000000ea #define ASIZ_task_euid 0x00000002 -#define AOFF_task_suid 0x000000e0 +#define AOFF_task_suid 0x000000ec #define ASIZ_task_suid 0x00000002 -#define AOFF_task_fsuid 0x000000e2 +#define AOFF_task_fsuid 0x000000ee #define ASIZ_task_fsuid 0x00000002 -#define AOFF_task_gid 0x000000e4 +#define AOFF_task_gid 0x000000f0 #define ASIZ_task_gid 0x00000002 -#define AOFF_task_egid 0x000000e6 +#define AOFF_task_egid 0x000000f2 #define ASIZ_task_egid 0x00000002 -#define AOFF_task_sgid 0x000000e8 +#define AOFF_task_sgid 0x000000f4 #define ASIZ_task_sgid 0x00000002 -#define AOFF_task_fsgid 0x000000ea +#define AOFF_task_fsgid 0x000000f6 #define ASIZ_task_fsgid 0x00000002 -#define AOFF_task_timeout 0x000000ec +#define AOFF_task_timeout 0x000000f8 #define ASIZ_task_timeout 0x00000004 -#define AOFF_task_policy 0x000000f0 +#define AOFF_task_policy 0x000000fc #define ASIZ_task_policy 0x00000004 -#define AOFF_task_rt_priority 0x000000f4 +#define AOFF_task_rt_priority 0x00000100 #define ASIZ_task_rt_priority 0x00000004 -#define AOFF_task_it_real_value 0x000000f8 +#define AOFF_task_it_real_value 0x00000104 #define ASIZ_task_it_real_value 0x00000004 -#define AOFF_task_it_prof_value 0x000000fc +#define AOFF_task_it_prof_value 0x00000108 #define ASIZ_task_it_prof_value 0x00000004 -#define AOFF_task_it_virt_value 0x00000100 +#define AOFF_task_it_virt_value 0x0000010c #define ASIZ_task_it_virt_value 0x00000004 -#define AOFF_task_it_real_incr 0x00000104 +#define AOFF_task_it_real_incr 0x00000110 #define ASIZ_task_it_real_incr 0x00000004 -#define AOFF_task_it_prof_incr 0x00000108 +#define AOFF_task_it_prof_incr 0x00000114 #define ASIZ_task_it_prof_incr 0x00000004 -#define AOFF_task_it_virt_incr 0x0000010c +#define AOFF_task_it_virt_incr 0x00000118 #define ASIZ_task_it_virt_incr 0x00000004 -#define AOFF_task_real_timer 0x00000110 +#define AOFF_task_real_timer 0x0000011c #define ASIZ_task_real_timer 0x00000014 -#define AOFF_task_utime 0x00000124 +#define AOFF_task_utime 0x00000130 #define ASIZ_task_utime 0x00000004 -#define AOFF_task_stime 0x00000128 +#define AOFF_task_stime 0x00000134 #define ASIZ_task_stime 0x00000004 -#define AOFF_task_cutime 0x0000012c +#define AOFF_task_cutime 0x00000138 #define ASIZ_task_cutime 0x00000004 -#define AOFF_task_cstime 0x00000130 +#define AOFF_task_cstime 0x0000013c #define ASIZ_task_cstime 0x00000004 -#define AOFF_task_start_time 0x00000134 +#define AOFF_task_start_time 0x00000140 #define ASIZ_task_start_time 0x00000004 -#define AOFF_task_min_flt 0x00000138 +#define AOFF_task_min_flt 0x00000144 #define ASIZ_task_min_flt 0x00000004 -#define AOFF_task_maj_flt 0x0000013c +#define AOFF_task_maj_flt 0x00000148 #define ASIZ_task_maj_flt 0x00000004 -#define AOFF_task_nswap 0x00000140 +#define AOFF_task_nswap 0x0000014c #define ASIZ_task_nswap 0x00000004 -#define AOFF_task_cmin_flt 0x00000144 +#define AOFF_task_cmin_flt 0x00000150 #define ASIZ_task_cmin_flt 0x00000004 -#define AOFF_task_cmaj_flt 0x00000148 +#define AOFF_task_cmaj_flt 0x00000154 #define ASIZ_task_cmaj_flt 0x00000004 -#define AOFF_task_cnswap 0x0000014c +#define AOFF_task_cnswap 0x00000158 #define ASIZ_task_cnswap 0x00000004 -#define AOFF_task_swap_address 0x00000154 +#define AOFF_task_swap_address 0x00000160 #define ASIZ_task_swap_address 0x00000004 -#define AOFF_task_old_maj_flt 0x00000158 +#define AOFF_task_old_maj_flt 0x00000164 #define ASIZ_task_old_maj_flt 0x00000004 -#define AOFF_task_dec_flt 0x0000015c +#define AOFF_task_dec_flt 0x00000168 #define ASIZ_task_dec_flt 0x00000004 -#define AOFF_task_swap_cnt 0x00000160 +#define AOFF_task_swap_cnt 0x0000016c #define ASIZ_task_swap_cnt 0x00000004 -#define AOFF_task_rlim 0x00000164 +#define AOFF_task_rlim 0x00000170 #define ASIZ_task_rlim 0x00000050 -#define AOFF_task_used_math 0x000001b4 +#define AOFF_task_used_math 0x000001c0 #define ASIZ_task_used_math 0x00000002 -#define AOFF_task_comm 0x000001b6 +#define AOFF_task_comm 0x000001c2 #define ASIZ_task_comm 0x00000010 -#define AOFF_task_link_count 0x000001c8 +#define AOFF_task_link_count 0x000001d4 #define ASIZ_task_link_count 0x00000004 -#define AOFF_task_tty 0x000001cc +#define AOFF_task_tty 0x000001d8 #define ASIZ_task_tty 0x00000004 -#define AOFF_task_semundo 0x000001d0 +#define AOFF_task_semundo 0x000001dc #define ASIZ_task_semundo 0x00000004 -#define AOFF_task_semsleeping 0x000001d4 +#define AOFF_task_semsleeping 0x000001e0 #define ASIZ_task_semsleeping 0x00000004 -#define AOFF_task_ldt 0x000001d8 +#define AOFF_task_ldt 0x000001e4 #define ASIZ_task_ldt 0x00000004 -#define AOFF_task_tss 0x000001e0 +#define AOFF_task_tss 0x000001e8 #define ASIZ_task_tss 0x00000390 -#define AOFF_task_fs 0x00000570 +#define AOFF_task_fs 0x00000578 #define ASIZ_task_fs 0x00000004 -#define AOFF_task_files 0x00000574 +#define AOFF_task_files 0x0000057c #define ASIZ_task_files 0x00000004 -#define AOFF_task_mm 0x00000578 +#define AOFF_task_mm 0x00000580 #define ASIZ_task_mm 0x00000004 -#define AOFF_task_sig 0x0000057c +#define AOFF_task_sig 0x00000584 #define ASIZ_task_sig 0x00000004 -#define AOFF_task_processor 0x00000580 +#define AOFF_task_processor 0x00000588 #define ASIZ_task_processor 0x00000004 -#define AOFF_task_last_processor 0x00000584 +#define AOFF_task_last_processor 0x0000058c #define ASIZ_task_last_processor 0x00000004 -#define AOFF_task_lock_depth 0x00000588 +#define AOFF_task_lock_depth 0x00000590 #define ASIZ_task_lock_depth 0x00000004 -#define AOFF_mm_count 0x00000000 -#define ASIZ_mm_count 0x00000004 -#define AOFF_mm_pgd 0x00000004 +#define AOFF_task_sigmask_lock 0x00000594 +#define ASIZ_task_sigmask_lock 0x00000001 +#define AOFF_mm_mmap 0x00000000 +#define ASIZ_mm_mmap 0x00000004 +#define AOFF_mm_mmap_cache 0x00000004 +#define ASIZ_mm_mmap_cache 0x00000004 +#define AOFF_mm_pgd 0x00000008 #define ASIZ_mm_pgd 0x00000004 -#define AOFF_mm_context 0x00000008 +#define AOFF_mm_count 0x0000000c +#define ASIZ_mm_count 0x00000004 +#define AOFF_mm_mmap_sem 0x00000010 +#define ASIZ_mm_mmap_sem 0x0000000c +#define AOFF_mm_context 0x0000001c #define ASIZ_mm_context 0x00000004 -#define AOFF_mm_start_code 0x0000000c +#define AOFF_mm_start_code 0x00000020 #define ASIZ_mm_start_code 0x00000004 -#define AOFF_mm_end_code 0x00000010 +#define AOFF_mm_end_code 0x00000024 #define ASIZ_mm_end_code 0x00000004 -#define AOFF_mm_start_data 0x00000014 +#define AOFF_mm_start_data 0x00000028 #define ASIZ_mm_start_data 0x00000004 -#define AOFF_mm_end_data 0x00000018 +#define AOFF_mm_end_data 0x0000002c #define ASIZ_mm_end_data 0x00000004 -#define AOFF_mm_start_brk 0x0000001c +#define AOFF_mm_start_brk 0x00000030 #define ASIZ_mm_start_brk 0x00000004 -#define AOFF_mm_brk 0x00000020 +#define AOFF_mm_brk 0x00000034 #define ASIZ_mm_brk 0x00000004 -#define AOFF_mm_start_stack 0x00000024 +#define AOFF_mm_start_stack 0x00000038 #define ASIZ_mm_start_stack 0x00000004 -#define AOFF_mm_start_mmap 0x00000028 +#define AOFF_mm_start_mmap 0x0000003c #define ASIZ_mm_start_mmap 0x00000004 -#define AOFF_mm_arg_start 0x0000002c +#define AOFF_mm_arg_start 0x00000040 #define ASIZ_mm_arg_start 0x00000004 -#define AOFF_mm_arg_end 0x00000030 +#define AOFF_mm_arg_end 0x00000044 #define ASIZ_mm_arg_end 0x00000004 -#define AOFF_mm_env_start 0x00000034 +#define AOFF_mm_env_start 0x00000048 #define ASIZ_mm_env_start 0x00000004 -#define AOFF_mm_env_end 0x00000038 +#define AOFF_mm_env_end 0x0000004c #define ASIZ_mm_env_end 0x00000004 -#define AOFF_mm_rss 0x0000003c +#define AOFF_mm_rss 0x00000050 #define ASIZ_mm_rss 0x00000004 -#define AOFF_mm_total_vm 0x00000040 +#define AOFF_mm_total_vm 0x00000054 #define ASIZ_mm_total_vm 0x00000004 -#define AOFF_mm_locked_vm 0x00000044 +#define AOFF_mm_locked_vm 0x00000058 #define ASIZ_mm_locked_vm 0x00000004 -#define AOFF_mm_def_flags 0x00000048 +#define AOFF_mm_def_flags 0x0000005c #define ASIZ_mm_def_flags 0x00000004 -#define AOFF_mm_mmap 0x0000004c -#define ASIZ_mm_mmap 0x00000004 -#define AOFF_mm_mmap_avl 0x00000050 -#define ASIZ_mm_mmap_avl 0x00000004 -#define AOFF_mm_mmap_sem 0x00000054 -#define ASIZ_mm_mmap_sem 0x0000000c #define AOFF_thread_uwinmask 0x00000000 #define ASIZ_thread_uwinmask 0x00000004 #define AOFF_thread_kregs 0x00000004 diff --git a/include/asm-sparc/linux_logo.h b/include/asm-sparc/linux_logo.h index 4c323b49e699..a8b8ff1b4a52 100644 --- a/include/asm-sparc/linux_logo.h +++ b/include/asm-sparc/linux_logo.h @@ -1043,1048 +1043,3 @@ unsigned char *linux_serial_image __initdata = "\n" "'!!!!!!!W..e$$!!!!!!` %s\n" " \"~^^~ ^~~^\n" "\n"; -/* $Id: linux_logo.h,v 1.1 1997/04/16 17:51:24 jj Exp $ - * include/asm-sparc/linux_logo.h: This is a linux logo - * to be displayed on boot. - * - * Copyright (C) 1996 Larry Ewing (lewing@isc.tamu.edu) - * Copyright (C) 1996 Jakub Jelinek (jj@sunsite.mff.cuni.cz) - * - * You can put anything here, but: - * LINUX_LOGO_COLORS has to be less than 224 - * image size has to be 80x80 - * values have to start from 0x20 - * (i.e. RGB(linux_logo_red[0], - * linux_logo_green[0], - * linux_logo_blue[0]) is color 0x20) - * BW image has to be 80x80 as well, with MS bit - * on the left - * Serial_console ascii image can be any size, - * but should contain %s to display the version - */ - -#include -#include - -#define linux_logo_banner "Linux/SPARC version " UTS_RELEASE - -#define LINUX_LOGO_COLORS 221 - -unsigned char linux_logo_red[] __initdata = { - 0xF3, 0xF6, 0xF8, 0xF7, 0xEF, 0xE7, 0xE5, 0xE3, - 0xCA, 0xD4, 0xDD, 0xC8, 0xC7, 0xC4, 0xC2, 0xE5, - 0xF1, 0xED, 0xEE, 0xE6, 0xC6, 0xDA, 0xDD, 0xE5, - 0xD9, 0xC6, 0xE3, 0xD0, 0xC6, 0xBA, 0xB0, 0xB6, - 0xBB, 0xBE, 0xB9, 0xB8, 0xB3, 0xB2, 0xB0, 0xAD, - 0xAC, 0xA9, 0xA8, 0xA6, 0xA4, 0xA1, 0xA0, 0x9D, - 0xA0, 0x9F, 0x9E, 0x9C, 0x9B, 0x99, 0x9A, 0x99, - 0x98, 0x95, 0x96, 0x94, 0x93, 0x92, 0x8F, 0x8D, - 0x8C, 0x8A, 0x87, 0x86, 0x83, 0x81, 0x0D, 0x03, - 0x66, 0x44, 0x24, 0x08, 0xD6, 0xE6, 0xE9, 0xE6, - 0xE7, 0xCA, 0xDC, 0xDB, 0xD5, 0xD0, 0xC9, 0xE2, - 0xD5, 0xC6, 0xC4, 0xB3, 0xB2, 0xB9, 0xA9, 0x9A, - 0xB2, 0x9D, 0xE8, 0xEC, 0xF5, 0xF5, 0xF4, 0xF4, - 0xEC, 0xEE, 0xF0, 0xF5, 0xE0, 0xD6, 0xC5, 0xC2, - 0xD9, 0xD5, 0xD8, 0xD6, 0xF6, 0xF4, 0xED, 0xEC, - 0xEB, 0xF1, 0xF6, 0xF5, 0xF5, 0xEE, 0xEF, 0xEC, - 0xE7, 0xE3, 0xE6, 0xD6, 0xDD, 0xC3, 0xD6, 0xD7, - 0xCD, 0xCA, 0xC3, 0xAC, 0x95, 0x99, 0xB7, 0xA3, - 0x8B, 0x88, 0x95, 0x8A, 0x94, 0xD2, 0xCC, 0xC4, - 0xA8, 0x8E, 0x8F, 0xAE, 0xB8, 0xAC, 0xB6, 0xB4, - 0xAD, 0xA5, 0xA0, 0x9B, 0x8B, 0xA3, 0x94, 0x87, - 0x85, 0x89, 0x53, 0x80, 0x7D, 0x7C, 0x7A, 0x78, - 0x76, 0x71, 0x73, 0x6E, 0x6B, 0x67, 0x65, 0x62, - 0x4B, 0x5B, 0x5F, 0x53, 0x56, 0x52, 0x4F, 0x46, - 0x42, 0x0F, 0x75, 0x78, 0x7D, 0x72, 0x5F, 0x6E, - 0x7A, 0x75, 0x6A, 0x58, 0x48, 0x4F, 0x00, 0x2B, - 0x37, 0x3E, 0x32, 0x33, 0x25, 0x2C, 0x3B, 0x11, - 0x1D, 0x14, 0x06, 0x02, 0x00 -}; - -unsigned char linux_logo_green[] __initdata = { - 0xF3, 0xF6, 0xF8, 0xF7, 0xEF, 0xE7, 0xE5, 0xE3, - 0xCA, 0xD4, 0xDD, 0xC8, 0xC7, 0xC4, 0xC2, 0xD3, - 0xDA, 0xD4, 0xD7, 0xCC, 0xC1, 0xCC, 0xCB, 0xC9, - 0xC5, 0xBC, 0xBC, 0xBB, 0xB7, 0xA5, 0xB0, 0xB6, - 0xBB, 0xBE, 0xB9, 0xB8, 0xB3, 0xB2, 0xAD, 0xAD, - 0xAC, 0xA9, 0xA8, 0xA6, 0xA4, 0xA1, 0xA0, 0x95, - 0xA0, 0x9F, 0x9E, 0x9C, 0x9B, 0x99, 0x9A, 0x99, - 0x98, 0x95, 0x96, 0x94, 0x93, 0x92, 0x8F, 0x8D, - 0x8C, 0x8A, 0x87, 0x86, 0x83, 0x81, 0x08, 0x02, - 0x53, 0x2E, 0x19, 0x06, 0xC6, 0xC8, 0xCF, 0xBD, - 0xB3, 0xB6, 0xB4, 0xAB, 0xA5, 0xA3, 0x9B, 0xB6, - 0xA7, 0x99, 0x92, 0xA4, 0x9E, 0x9D, 0x98, 0x8C, - 0x8A, 0x86, 0xCD, 0xCC, 0xC9, 0xD7, 0xCA, 0xC4, - 0xCA, 0xC3, 0xC7, 0xC3, 0xC8, 0xB4, 0x91, 0x8E, - 0x8A, 0x82, 0x87, 0x85, 0xBD, 0xBF, 0xB6, 0xBC, - 0xAE, 0xB7, 0xBC, 0xB8, 0xBF, 0xB6, 0xBC, 0xB5, - 0xAB, 0xA6, 0xAD, 0xB2, 0xA5, 0x87, 0x9C, 0x96, - 0x95, 0x8E, 0x87, 0x8F, 0x86, 0x86, 0x8E, 0x80, - 0x7A, 0x70, 0x7B, 0x78, 0x78, 0x7F, 0x77, 0x6F, - 0x70, 0x76, 0x59, 0x77, 0x68, 0x64, 0x7B, 0x7C, - 0x75, 0x6D, 0x77, 0x69, 0x65, 0x5F, 0x5B, 0x54, - 0x4F, 0x5B, 0x39, 0x80, 0x7D, 0x7C, 0x7A, 0x78, - 0x76, 0x71, 0x73, 0x6E, 0x6B, 0x67, 0x65, 0x62, - 0x4B, 0x5B, 0x5F, 0x53, 0x56, 0x52, 0x4F, 0x46, - 0x42, 0x0B, 0x69, 0x66, 0x64, 0x57, 0x4A, 0x4E, - 0x55, 0x4B, 0x46, 0x3B, 0x30, 0x33, 0x00, 0x2B, - 0x37, 0x3E, 0x32, 0x33, 0x25, 0x2C, 0x29, 0x0D, - 0x1D, 0x14, 0x06, 0x02, 0x00 -}; - -unsigned char linux_logo_blue[] __initdata = { - 0xF3, 0xF6, 0xF8, 0xF7, 0xEF, 0xEE, 0xE5, 0xDE, - 0xD7, 0xD3, 0xDD, 0xC8, 0xC7, 0xC4, 0xC2, 0xB5, - 0xB0, 0xA6, 0xAC, 0x9B, 0xB5, 0xB5, 0xAE, 0x84, - 0x90, 0xA9, 0x81, 0x8D, 0x96, 0x86, 0xB0, 0xB6, - 0xBB, 0xBE, 0xB9, 0xB8, 0xB3, 0xB2, 0xA7, 0xAD, - 0xAC, 0xA9, 0xA8, 0xA6, 0xA4, 0xA1, 0xA5, 0x87, - 0xA0, 0x9F, 0x9E, 0x9C, 0x9B, 0x9A, 0x9A, 0x99, - 0x98, 0x95, 0x96, 0x94, 0x93, 0x92, 0x8F, 0x8D, - 0x8C, 0x8A, 0x87, 0x86, 0x83, 0x81, 0xC8, 0xD7, - 0x9B, 0x8E, 0x8C, 0xB2, 0x77, 0x77, 0x4E, 0x77, - 0x69, 0x71, 0x78, 0x6B, 0x65, 0x66, 0x64, 0x59, - 0x5C, 0x5A, 0x48, 0x72, 0x7B, 0x6B, 0x67, 0x6E, - 0x42, 0x5B, 0x29, 0x36, 0x25, 0x10, 0x17, 0x14, - 0x19, 0x16, 0x13, 0x0E, 0x08, 0x2E, 0x2E, 0x3D, - 0x24, 0x24, 0x24, 0x24, 0x13, 0x12, 0x14, 0x14, - 0x0E, 0x08, 0x0D, 0x0F, 0x08, 0x0D, 0x0E, 0x08, - 0x08, 0x0C, 0x06, 0x06, 0x07, 0x16, 0x07, 0x0E, - 0x08, 0x0A, 0x07, 0x0D, 0x2D, 0x3E, 0x09, 0x4E, - 0x68, 0x52, 0x56, 0x58, 0x4B, 0x22, 0x20, 0x20, - 0x27, 0x39, 0x28, 0x19, 0x1E, 0x1E, 0x08, 0x06, - 0x07, 0x09, 0x08, 0x08, 0x05, 0x1D, 0x1F, 0x17, - 0x18, 0x06, 0x79, 0x80, 0x7D, 0x7C, 0x7A, 0x78, - 0x76, 0x71, 0x73, 0x6E, 0x6B, 0x68, 0x65, 0x62, - 0x4B, 0x5B, 0x5F, 0x55, 0x56, 0x52, 0x4F, 0x46, - 0x42, 0x5A, 0x14, 0x23, 0x3D, 0x2B, 0x21, 0x14, - 0x06, 0x04, 0x03, 0x07, 0x09, 0x13, 0x2A, 0x3A, - 0x37, 0x3E, 0x32, 0x33, 0x25, 0x2C, 0x07, 0x09, - 0x1D, 0x14, 0x06, 0x02, 0x00 -}; - -unsigned char linux_logo[] __initdata = { - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x58, 0x57, - 0x58, 0x58, 0x59, 0x5C, 0x5D, 0x5F, 0x60, 0x61, - 0x62, 0x61, 0x61, 0x62, 0x62, 0x62, 0x63, 0x63, - 0x61, 0x61, 0x61, 0x61, 0x61, 0x60, 0x5E, 0x5E, - 0x5E, 0x5D, 0x5D, 0x5C, 0x5D, 0x5B, 0x58, 0x58, - 0x58, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x58, - 0x57, 0x57, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x58, 0x57, - 0x54, 0x56, 0x57, 0x67, 0xFC, 0xFC, 0xFC, 0xFC, - 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x67, 0x4C, - 0x4A, 0x49, 0x4A, 0x49, 0x4A, 0x49, 0x49, 0x4A, - 0x4A, 0x4B, 0x4B, 0x4B, 0x4C, 0x50, 0x51, 0x52, - 0x54, 0x54, 0x56, 0x57, 0x57, 0x57, 0x57, 0x58, - 0x57, 0x57, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x58, 0x56, 0x56, 0x53, - 0x52, 0x53, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, - 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFB, 0xFB, 0xFB, - 0x4B, 0x4B, 0x4B, 0x4A, 0x49, 0x4A, 0x4A, 0x49, - 0x49, 0x49, 0x48, 0x49, 0x49, 0x4A, 0x4A, 0x4B, - 0x4C, 0x4D, 0x52, 0x54, 0x56, 0x55, 0x57, 0x58, - 0x57, 0x57, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x55, 0x54, 0x53, 0x52, 0x51, 0x50, - 0x50, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, - 0xFC, 0xFC, 0xFC, 0xFC, 0xF8, 0xF0, 0xF4, 0xFB, - 0xFC, 0x67, 0x53, 0x50, 0x4D, 0x4C, 0x4C, 0x4C, - 0x4B, 0x4A, 0x4A, 0x48, 0x49, 0x48, 0x48, 0x49, - 0x49, 0x49, 0x4B, 0x4C, 0x50, 0x52, 0x53, 0x56, - 0x57, 0x57, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x55, 0x54, 0x53, 0x51, 0x51, 0x50, 0x4C, 0x4D, - 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, - 0xFC, 0xFC, 0xFC, 0xFC, 0xF4, 0xD2, 0xD7, 0xF5, - 0xFC, 0xFC, 0x5D, 0x5D, 0x5C, 0x5C, 0x59, 0x58, - 0x58, 0x56, 0x52, 0x4C, 0x4B, 0x4A, 0x4A, 0x48, - 0x48, 0x48, 0x48, 0x48, 0x49, 0x4B, 0x4D, 0x51, - 0x54, 0x56, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x55, 0x54, - 0x53, 0x52, 0x51, 0x4D, 0x4D, 0x4D, 0x50, 0x50, - 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, - 0xFC, 0xFC, 0xFC, 0xFC, 0xF4, 0x64, 0xD9, 0xF5, - 0xF9, 0xFC, 0xFC, 0x64, 0x63, 0x62, 0x61, 0x61, - 0x61, 0x60, 0x5E, 0x5B, 0x5A, 0x54, 0x52, 0x4C, - 0x4B, 0x49, 0x49, 0x47, 0x47, 0x48, 0x49, 0x4B, - 0x4C, 0x51, 0x53, 0x56, 0x57, 0x58, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x58, 0x57, 0x57, 0x55, 0x53, 0x53, - 0x51, 0x50, 0x50, 0x50, 0x50, 0x50, 0x53, 0xFC, - 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, - 0xFC, 0xFC, 0xFC, 0xFC, 0xF4, 0xF5, 0xF9, 0xFC, - 0xFC, 0xFC, 0xFC, 0x64, 0x64, 0x64, 0x64, 0x64, - 0x64, 0x64, 0x64, 0x63, 0x61, 0x61, 0x5E, 0x59, - 0x55, 0x52, 0x4C, 0x4A, 0x49, 0x47, 0x48, 0x48, - 0x49, 0x4B, 0x4D, 0x51, 0x54, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x58, 0x55, 0x54, 0x54, 0x52, 0x51, - 0x51, 0x51, 0x51, 0x51, 0x53, 0x54, 0x59, 0xFC, - 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, - 0xFC, 0xFC, 0xFC, 0xFC, 0xF7, 0xFC, 0xFC, 0xFC, - 0xFC, 0xFC, 0xFC, 0xFC, 0x60, 0x60, 0x60, 0x61, - 0x62, 0x63, 0x64, 0x64, 0x65, 0x65, 0x64, 0x63, - 0x61, 0x5E, 0x59, 0x56, 0x4D, 0x4B, 0x48, 0x48, - 0x48, 0x48, 0x49, 0x4B, 0x50, 0x53, 0x56, 0x56, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x56, 0x54, 0x53, 0x52, 0x51, 0x51, - 0x51, 0x52, 0x53, 0x55, 0x59, 0x5D, 0x5E, 0xFC, - 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, - 0xFC, 0xFC, 0xFC, 0xFB, 0xFB, 0xFB, 0xFC, 0xFC, - 0xFC, 0xFC, 0xFC, 0xFC, 0x4C, 0x4E, 0x51, 0x52, - 0x57, 0x5A, 0x5E, 0x60, 0x61, 0x63, 0x65, 0xCB, - 0x64, 0x64, 0x63, 0x60, 0x5C, 0x57, 0x50, 0x4B, - 0x48, 0x47, 0x47, 0x47, 0x4A, 0x4C, 0x52, 0x53, - 0x54, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x55, 0x54, 0x53, 0x53, 0x51, 0x52, 0x52, 0x53, - 0x53, 0x57, 0x5A, 0x5D, 0x5E, 0x5E, 0x60, 0xFC, - 0xFC, 0xFC, 0xFB, 0xF9, 0xFC, 0xFC, 0xFC, 0xFC, - 0xFC, 0xFC, 0xFC, 0xFA, 0xF9, 0xF5, 0xFB, 0xFC, - 0xFC, 0xFC, 0xFC, 0xFC, 0xFB, 0x45, 0x3F, 0x3F, - 0x45, 0x48, 0x4B, 0x4D, 0x54, 0x5A, 0x5E, 0x61, - 0x63, 0xCB, 0xCB, 0x65, 0x64, 0x62, 0x5E, 0x57, - 0x50, 0x4B, 0x48, 0x47, 0x47, 0x48, 0x4B, 0x4D, - 0x51, 0x56, 0x56, 0x57, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x55, - 0x54, 0x54, 0x53, 0x53, 0x52, 0x53, 0x54, 0x57, - 0x59, 0x5C, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0xFC, - 0xFC, 0xFA, 0xFC, 0xFA, 0xE0, 0xFC, 0xFC, 0xFC, - 0xFB, 0xFB, 0xFB, 0xDF, 0xD8, 0xF9, 0xE0, 0xFC, - 0xFC, 0xFC, 0xFC, 0xFC, 0xFB, 0x4C, 0x4A, 0x48, - 0x48, 0x3E, 0x44, 0x43, 0x3F, 0x47, 0x4B, 0x52, - 0x5A, 0x5E, 0x62, 0x64, 0xCB, 0xCB, 0x64, 0x61, - 0x5E, 0x57, 0x4D, 0x49, 0x47, 0x47, 0x48, 0x4A, - 0x4C, 0x52, 0x54, 0x56, 0x57, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x55, - 0x54, 0x53, 0x53, 0x54, 0x54, 0x55, 0x58, 0x5B, - 0x5C, 0x5D, 0x5E, 0x5D, 0x5D, 0x5B, 0x58, 0xFC, - 0xFC, 0xD8, 0x4C, 0x60, 0xFC, 0xF5, 0xFC, 0xFC, - 0xFC, 0xF7, 0x5F, 0x48, 0x48, 0x2C, 0xF8, 0xF9, - 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x4B, 0x4A, 0x49, - 0x49, 0x49, 0x49, 0x47, 0x3E, 0x44, 0x42, 0x3F, - 0x3E, 0x4B, 0x54, 0x5C, 0x61, 0x64, 0xCB, 0xCB, - 0x64, 0x61, 0x5D, 0x53, 0x4B, 0x49, 0x47, 0x47, - 0x49, 0x4B, 0x50, 0x53, 0x56, 0x57, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x57, 0x55, 0x55, 0x54, - 0x53, 0x53, 0x54, 0x56, 0x58, 0x5A, 0x5B, 0x5D, - 0x5D, 0x5D, 0x5C, 0x5A, 0x54, 0x52, 0x4C, 0xFC, - 0xF7, 0x4E, 0x2D, 0x29, 0x4E, 0xFC, 0xFC, 0xFC, - 0xFB, 0x5F, 0x26, 0x24, 0x20, 0x2E, 0x65, 0xFC, - 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x45, 0x3F, 0x45, - 0x3E, 0x47, 0x47, 0x47, 0x47, 0x47, 0x3E, 0x44, - 0x43, 0x40, 0x44, 0x49, 0x51, 0x5C, 0x62, 0x64, - 0xCB, 0xCB, 0x63, 0x60, 0x58, 0x50, 0x49, 0x48, - 0x48, 0x48, 0x4A, 0x4D, 0x53, 0x54, 0x57, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x55, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x55, 0x57, 0x59, 0x5B, 0x5C, 0x5D, - 0x5C, 0x5A, 0x54, 0x51, 0x4C, 0x4C, 0x54, 0xFC, - 0xF9, 0x23, 0xDB, 0x2D, 0x23, 0xFA, 0xFB, 0xFA, - 0xF5, 0x27, 0x21, 0xD9, 0xF8, 0x20, 0x21, 0xFB, - 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x5D, 0x58, 0x55, - 0x50, 0x48, 0x45, 0x43, 0x44, 0x44, 0x45, 0x45, - 0x3E, 0x3F, 0x43, 0x41, 0x3F, 0x48, 0x52, 0x5D, - 0x63, 0x65, 0xCB, 0x65, 0x61, 0x5D, 0x52, 0x4B, - 0x48, 0x47, 0x47, 0x49, 0x4C, 0x51, 0x54, 0x57, - 0x57, 0x57, 0x57, 0x57, 0x55, 0x54, 0x54, 0x54, - 0x54, 0x58, 0x5A, 0x59, 0x5B, 0x5B, 0x5B, 0x5A, - 0x55, 0x52, 0x4D, 0x4D, 0x55, 0x5B, 0x5D, 0xFC, - 0xF1, 0xF9, 0xFC, 0xD4, 0x21, 0xCC, 0xF7, 0xF8, - 0xF2, 0x21, 0xD9, 0xFC, 0xF2, 0xFB, 0x21, 0x45, - 0xFC, 0xFC, 0xFC, 0xFC, 0xFB, 0xD1, 0xD0, 0xCD, - 0xCC, 0x63, 0x5E, 0x58, 0x50, 0x47, 0x43, 0x3F, - 0x3F, 0x3F, 0x3F, 0x3F, 0x40, 0x41, 0x3F, 0x4A, - 0x56, 0x5E, 0x64, 0xCB, 0x65, 0x63, 0x5E, 0x56, - 0x4C, 0x48, 0x47, 0x47, 0x49, 0x4C, 0x51, 0x54, - 0x58, 0x57, 0x57, 0x57, 0x57, 0x55, 0x54, 0x54, - 0x57, 0x5A, 0x5A, 0x5C, 0x5B, 0x5A, 0x58, 0x54, - 0x51, 0x4C, 0x55, 0x5D, 0x5D, 0x5B, 0x54, 0xFC, - 0xF0, 0xF9, 0xFC, 0x65, 0x45, 0xCD, 0xFB, 0xFB, - 0xF8, 0x26, 0xFB, 0xFC, 0xFC, 0xFC, 0x21, 0x27, - 0xFB, 0xFC, 0xFC, 0xFC, 0xFB, 0xD7, 0x35, 0x34, - 0x2F, 0x35, 0x36, 0x2F, 0x2F, 0x36, 0x2F, 0x2F, - 0x36, 0x36, 0x35, 0x35, 0x43, 0x42, 0x41, 0x2E, - 0x45, 0x4C, 0x5B, 0x62, 0x65, 0xCC, 0x64, 0x60, - 0x58, 0x4D, 0x49, 0x47, 0x47, 0x49, 0x4C, 0x51, - 0x58, 0x57, 0x57, 0x57, 0x57, 0x57, 0x55, 0x57, - 0x58, 0x5A, 0x5A, 0x5B, 0x5A, 0x55, 0x54, 0x51, - 0x53, 0x5C, 0x5D, 0x5D, 0x54, 0x4B, 0x4D, 0xFC, - 0xFC, 0x44, 0xFC, 0xFB, 0x7B, 0xAB, 0xA8, 0xAE, - 0xAB, 0x7F, 0xFC, 0xFC, 0xFB, 0xFB, 0x22, 0x2A, - 0xFC, 0xFC, 0xFC, 0xFC, 0x36, 0x2F, 0x30, 0x30, - 0x32, 0x30, 0x32, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x30, 0x2F, 0x2F, 0x40, 0x41, - 0x2E, 0x40, 0x48, 0x56, 0x5F, 0x64, 0xCC, 0x65, - 0x61, 0x59, 0x50, 0x49, 0x47, 0x47, 0x49, 0x4C, - 0x5A, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x58, - 0x5A, 0x5A, 0x5A, 0x58, 0x55, 0x52, 0x51, 0x5A, - 0x5D, 0x5D, 0x57, 0x4C, 0x51, 0x54, 0x5D, 0xFC, - 0xFC, 0x2A, 0xFC, 0xC9, 0xAA, 0x8B, 0x8A, 0x8C, - 0xAB, 0x8C, 0x8C, 0xFB, 0xFB, 0x23, 0x20, 0xF1, - 0xFC, 0xFC, 0xFC, 0x3B, 0x33, 0x33, 0x32, 0x32, - 0x31, 0x32, 0x30, 0x32, 0x32, 0x32, 0x32, 0x30, - 0x31, 0x31, 0x31, 0x32, 0x33, 0x33, 0x3C, 0x41, - 0x41, 0x2E, 0x2D, 0x45, 0x4D, 0x5D, 0x63, 0xCC, - 0x65, 0x62, 0x5D, 0x51, 0x49, 0x47, 0x47, 0x4A, - 0x59, 0x57, 0x57, 0x57, 0x57, 0x58, 0x58, 0x58, - 0x5A, 0x5A, 0x58, 0x55, 0x53, 0x53, 0x5C, 0x5E, - 0x59, 0x51, 0x4E, 0x54, 0x59, 0x5E, 0x62, 0xFC, - 0xFC, 0xDB, 0xAA, 0xA1, 0x95, 0x9C, 0x8C, 0x88, - 0x82, 0x83, 0x83, 0x8C, 0x88, 0xAE, 0xB9, 0xFB, - 0xFC, 0xFC, 0xFC, 0x3C, 0x3B, 0x72, 0x38, 0x33, - 0x33, 0x33, 0x31, 0x33, 0x31, 0x31, 0x31, 0x31, - 0x33, 0x33, 0x38, 0x33, 0x72, 0x3B, 0x44, 0x2E, - 0x41, 0x2E, 0x2E, 0x2D, 0x43, 0x4B, 0x5B, 0x63, - 0xCB, 0xCC, 0x63, 0x5D, 0x51, 0x49, 0x47, 0x49, - 0x5C, 0x58, 0x57, 0x57, 0x57, 0x57, 0x58, 0x58, - 0x58, 0x58, 0x57, 0x53, 0x58, 0x5D, 0x5E, 0x55, - 0x51, 0x53, 0x58, 0x5E, 0x60, 0x63, 0x64, 0xFC, - 0xFC, 0xC0, 0xA6, 0x9D, 0x8B, 0x9C, 0x8C, 0x8C, - 0x6E, 0x83, 0x88, 0x8C, 0x8C, 0x8C, 0x83, 0xE8, - 0xFB, 0xFC, 0xFC, 0xFC, 0x33, 0x70, 0x70, 0x6F, - 0x6F, 0x6F, 0x6F, 0x3A, 0x6F, 0x6D, 0x6F, 0x6F, - 0x70, 0x6F, 0x6F, 0x70, 0x6F, 0x32, 0x5A, 0x48, - 0x41, 0x2D, 0x2D, 0x2D, 0x2C, 0x41, 0x49, 0x5A, - 0x62, 0xCB, 0xCB, 0x63, 0x5D, 0x50, 0x49, 0x4A, - 0x5C, 0x58, 0x58, 0x57, 0x55, 0x57, 0x57, 0x57, - 0x57, 0x55, 0x56, 0x59, 0x5E, 0x5C, 0x52, 0x53, - 0x55, 0x5B, 0x5E, 0x61, 0x63, 0x64, 0x63, 0xFC, - 0xE8, 0xBF, 0xA4, 0x99, 0x9C, 0x8C, 0x88, 0x88, - 0x6E, 0x88, 0x8C, 0x8C, 0x8C, 0xC2, 0xA6, 0xC4, - 0xFC, 0xFC, 0xFC, 0xFC, 0x36, 0x3A, 0x6F, 0x70, - 0x70, 0x70, 0x70, 0x70, 0x70, 0x70, 0x70, 0x70, - 0x70, 0x70, 0x70, 0x70, 0x37, 0x32, 0xCD, 0x5E, - 0x4C, 0x43, 0x2C, 0x2D, 0x2D, 0x2C, 0x2E, 0x47, - 0x57, 0x61, 0x65, 0xCC, 0x63, 0x5C, 0x50, 0x4D, - 0x5C, 0x5A, 0x57, 0x55, 0x55, 0x55, 0x58, 0x58, - 0x55, 0x54, 0x5B, 0x5E, 0x5D, 0x53, 0x53, 0x55, - 0x5D, 0x5E, 0x61, 0x61, 0x61, 0x61, 0x5E, 0xFC, - 0xEA, 0xBE, 0xA4, 0x9B, 0x8B, 0x85, 0x8C, 0x6E, - 0x8C, 0x8C, 0x8C, 0xA3, 0xAA, 0xA4, 0xA4, 0xE9, - 0xFB, 0xFC, 0xFC, 0xFC, 0x36, 0x6D, 0x70, 0x73, - 0x70, 0x70, 0x70, 0x73, 0x73, 0x73, 0x73, 0x70, - 0x70, 0x70, 0x73, 0x70, 0x37, 0x38, 0xD1, 0xCF, - 0x61, 0x4D, 0x44, 0x2C, 0x2D, 0x2E, 0x2C, 0x2E, - 0x3E, 0x56, 0x61, 0xCB, 0xCC, 0x62, 0x5B, 0x57, - 0x59, 0x58, 0x55, 0x54, 0x54, 0x55, 0x58, 0x58, - 0x58, 0x5B, 0x5E, 0x5B, 0x53, 0x55, 0x55, 0x5C, - 0x5E, 0x61, 0x61, 0x60, 0x5D, 0x5A, 0x4E, 0xFC, - 0xFC, 0xEA, 0xAA, 0x9C, 0x8A, 0x85, 0x82, 0x8C, - 0x8C, 0xA8, 0xEB, 0xA8, 0xA4, 0xA4, 0xAA, 0xFC, - 0xFC, 0xFC, 0x64, 0xFB, 0x39, 0x31, 0x72, 0x78, - 0x73, 0x78, 0x73, 0x74, 0x74, 0x74, 0x74, 0x73, - 0x78, 0x70, 0x73, 0x73, 0x33, 0xCC, 0xD2, 0xD1, - 0xCE, 0x62, 0x53, 0x3F, 0x2D, 0x2D, 0x41, 0x2C, - 0x2E, 0x3E, 0x56, 0x62, 0xCB, 0xCB, 0x61, 0x5D, - 0x54, 0x54, 0x54, 0x54, 0x56, 0x58, 0x58, 0x58, - 0x5C, 0x5E, 0x5A, 0x55, 0x58, 0x58, 0x5B, 0x5E, - 0x61, 0x5E, 0x5D, 0x5A, 0x52, 0x55, 0xCD, 0xFC, - 0xFC, 0x34, 0xC9, 0xE8, 0xA8, 0xAE, 0xC2, 0xE8, - 0xC3, 0xA6, 0xA7, 0xA6, 0xAA, 0x78, 0x2E, 0x42, - 0xFC, 0xFC, 0xD2, 0x64, 0xF8, 0x31, 0x72, 0x73, - 0x73, 0x73, 0x73, 0x74, 0x75, 0x75, 0x74, 0x73, - 0x73, 0x73, 0x73, 0x72, 0x33, 0x5C, 0x64, 0xD2, - 0xD1, 0xCF, 0x63, 0x54, 0x3F, 0x2C, 0x41, 0x41, - 0x2C, 0x2E, 0x47, 0x58, 0x63, 0xCB, 0xCB, 0x62, - 0x52, 0x53, 0x53, 0x56, 0x58, 0x58, 0x5A, 0x5B, - 0x5E, 0x5A, 0x57, 0x58, 0x58, 0x58, 0x60, 0x60, - 0x5D, 0x5A, 0x55, 0x4E, 0x64, 0xD2, 0xD1, 0xFC, - 0xFC, 0x41, 0x3E, 0xC1, 0xC0, 0xA3, 0xA6, 0xA7, - 0xA7, 0xA9, 0xAA, 0xB8, 0x2E, 0x3F, 0x2C, 0x41, - 0xFC, 0xFC, 0xF7, 0xCE, 0xCD, 0x36, 0x72, 0x73, - 0x74, 0x75, 0x78, 0x75, 0x75, 0x75, 0x74, 0x74, - 0x74, 0x74, 0x78, 0x72, 0x6D, 0x49, 0x59, 0xCB, - 0xD1, 0xD1, 0xD2, 0xCB, 0x56, 0x3F, 0x2C, 0x41, - 0x40, 0x2D, 0x2E, 0x49, 0x5B, 0x64, 0xCC, 0x64, - 0x51, 0x53, 0x53, 0x55, 0x58, 0x59, 0x5B, 0x5E, - 0x59, 0x58, 0x58, 0x58, 0x55, 0x60, 0x60, 0x5C, - 0x5A, 0x53, 0x5B, 0xD0, 0xD3, 0xD3, 0xD3, 0xFB, - 0xFC, 0x40, 0x41, 0x45, 0xC4, 0xC0, 0xBE, 0xBE, - 0xC1, 0xC0, 0x3C, 0x47, 0x2E, 0x21, 0x22, 0x20, - 0x65, 0xFC, 0xFC, 0xFC, 0xFC, 0x6D, 0x72, 0x75, - 0x78, 0x76, 0x75, 0x79, 0x76, 0x76, 0x76, 0x76, - 0x75, 0x75, 0x75, 0x72, 0x6D, 0x2E, 0x48, 0x5D, - 0xCE, 0xD1, 0xD4, 0xD3, 0xCB, 0x56, 0x43, 0x2C, - 0x42, 0x43, 0x2E, 0x2E, 0x4A, 0x5D, 0x64, 0x64, - 0x50, 0x52, 0x56, 0x58, 0x5C, 0x5D, 0x5E, 0x5D, - 0x5A, 0x58, 0x58, 0x55, 0x61, 0x60, 0x58, 0x58, - 0x4E, 0x61, 0xD1, 0xD4, 0xD4, 0xD1, 0xEE, 0xFC, - 0xFC, 0x2B, 0x29, 0x2E, 0x3F, 0xB0, 0xAD, 0x81, - 0x46, 0x2D, 0x46, 0x2C, 0x24, 0x22, 0x22, 0x23, - 0x25, 0xFC, 0xFC, 0xFC, 0xFC, 0x6E, 0x73, 0x76, - 0x76, 0x79, 0x79, 0x79, 0x76, 0x76, 0x79, 0x76, - 0x79, 0x79, 0x79, 0x74, 0x3F, 0x41, 0x2C, 0x48, - 0x5F, 0xCF, 0xD5, 0xD7, 0xD6, 0xCD, 0x57, 0x40, - 0x2E, 0x3F, 0x44, 0x2E, 0x41, 0x4C, 0x60, 0x61, - 0x51, 0x53, 0x58, 0x5C, 0x5D, 0x5E, 0x5D, 0x5C, - 0x58, 0x57, 0x54, 0x5F, 0x5E, 0x55, 0x55, 0x52, - 0x64, 0xD4, 0xD5, 0xD4, 0xD1, 0x5D, 0xFA, 0xFB, - 0xF4, 0x21, 0x24, 0x41, 0x40, 0x44, 0x2E, 0x2E, - 0x42, 0x41, 0x2A, 0x24, 0x22, 0x22, 0x22, 0x22, - 0x23, 0xD9, 0xFC, 0xFC, 0xFC, 0xFC, 0xE5, 0xB8, - 0x8F, 0x8F, 0x7A, 0x8F, 0x7A, 0x8F, 0x7A, 0x8F, - 0x8F, 0x8F, 0xB8, 0xE5, 0x3F, 0x3E, 0x43, 0x2C, - 0x48, 0x61, 0xD1, 0xD7, 0xD9, 0xD7, 0xD0, 0x57, - 0x41, 0x2E, 0x3E, 0x44, 0x2D, 0x40, 0x52, 0x5D, - 0x53, 0x55, 0x59, 0x5D, 0x5E, 0x5E, 0x5D, 0x5A, - 0x57, 0x53, 0x5E, 0x5E, 0x54, 0x53, 0x54, 0x65, - 0xD5, 0xD6, 0xD4, 0xCE, 0x53, 0xFB, 0xF9, 0xFC, - 0x24, 0x22, 0x23, 0x23, 0x41, 0x42, 0x2E, 0x40, - 0x2B, 0x21, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, - 0x23, 0x23, 0xFC, 0xFC, 0xFC, 0xFC, 0xE7, 0xBD, - 0xB5, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, - 0x93, 0xB5, 0xC6, 0xEB, 0x2D, 0x47, 0x4A, 0x47, - 0x2C, 0x3E, 0x61, 0xD4, 0xDC, 0xDC, 0xDA, 0xCF, - 0x54, 0x41, 0x41, 0x3E, 0x45, 0x2C, 0x3F, 0x4A, - 0x58, 0x5A, 0x5C, 0x5F, 0x60, 0x5E, 0x5D, 0x57, - 0x51, 0x5D, 0x5D, 0x51, 0x53, 0x53, 0xCB, 0xD5, - 0xD6, 0xD5, 0x63, 0x55, 0xFC, 0xFC, 0xFC, 0x2C, - 0x23, 0x22, 0x23, 0x22, 0x20, 0x2D, 0x2C, 0x26, - 0x21, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, - 0x22, 0x21, 0xF0, 0xFC, 0xFC, 0xFC, 0xE2, 0xC6, - 0xB5, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, - 0x93, 0x93, 0xC7, 0xE3, 0x3E, 0x2E, 0x49, 0x52, - 0x4C, 0x41, 0x44, 0x62, 0xD6, 0xDE, 0xDE, 0xD9, - 0xD0, 0x51, 0x2E, 0x40, 0x47, 0x44, 0x2C, 0x42, - 0x5D, 0x5D, 0x5F, 0x60, 0x60, 0x5D, 0x57, 0x51, - 0x58, 0x5D, 0x4E, 0x52, 0x55, 0x64, 0xD5, 0xD6, - 0xD4, 0x61, 0x59, 0x6B, 0xFC, 0xFC, 0xFC, 0x21, - 0x23, 0x22, 0x23, 0x22, 0x23, 0x21, 0x23, 0x22, - 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, - 0x22, 0x21, 0x24, 0xFC, 0xFC, 0xFC, 0xE2, 0xC7, - 0xB5, 0x90, 0x93, 0x93, 0x93, 0x90, 0x93, 0x93, - 0x90, 0xB5, 0xC8, 0xE4, 0x5F, 0x45, 0x2E, 0x4D, - 0x57, 0x57, 0x44, 0x43, 0x63, 0xDA, 0xDF, 0xDF, - 0xD9, 0xCE, 0x4C, 0x2C, 0x3F, 0x3E, 0x40, 0x40, - 0x60, 0x5E, 0x61, 0x61, 0x5E, 0x5B, 0x53, 0x52, - 0x5C, 0x52, 0x52, 0x55, 0x61, 0xD4, 0xD5, 0xD1, - 0x5E, 0x5B, 0x5C, 0xFB, 0xFC, 0xFC, 0x2A, 0x21, - 0x23, 0x22, 0x23, 0x22, 0x22, 0x22, 0x23, 0x22, - 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, - 0x22, 0x22, 0x22, 0xFB, 0xFC, 0xFC, 0xB3, 0xC8, - 0xB5, 0x90, 0x92, 0xB5, 0x93, 0x93, 0xB5, 0x93, - 0x92, 0xB5, 0xC8, 0xB9, 0xD0, 0x5E, 0x44, 0x40, - 0x52, 0x58, 0x57, 0x48, 0x40, 0x63, 0xD9, 0xE0, - 0xE0, 0xD9, 0xCB, 0x49, 0x2D, 0x3F, 0x45, 0x3F, - 0x63, 0x61, 0x62, 0x60, 0x5E, 0x55, 0x4D, 0x59, - 0x53, 0x4E, 0x54, 0x5D, 0xD2, 0xD4, 0xD2, 0x5E, - 0x5C, 0x5D, 0xFC, 0xFC, 0xFC, 0xF8, 0x29, 0x23, - 0x23, 0x23, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, - 0x23, 0x22, 0x22, 0x23, 0x23, 0x23, 0x22, 0x22, - 0x22, 0x22, 0x22, 0xF0, 0xFC, 0xFC, 0xB3, 0xC7, - 0xB5, 0x93, 0xB5, 0x93, 0x93, 0x91, 0x93, 0x93, - 0x91, 0xB5, 0xC7, 0xAD, 0xD6, 0xD2, 0x5E, 0x3F, - 0x3F, 0x57, 0x57, 0x58, 0x4A, 0x41, 0x64, 0xDC, - 0xF1, 0xDF, 0xDA, 0x61, 0x45, 0x2E, 0x43, 0x47, - 0xCB, 0x63, 0x62, 0x5F, 0x58, 0x51, 0x53, 0x54, - 0x4C, 0x52, 0x5C, 0xCD, 0xD3, 0xD2, 0x60, 0x5D, - 0x5D, 0xFB, 0xFC, 0xFC, 0xFC, 0xDB, 0x49, 0x24, - 0x21, 0x23, 0x23, 0x22, 0x26, 0x26, 0x2A, 0x24, - 0x22, 0x23, 0x22, 0x21, 0x24, 0x26, 0x26, 0x2A, - 0x29, 0x2B, 0x24, 0x25, 0xFC, 0xFC, 0xB3, 0xC5, - 0x91, 0x91, 0x92, 0x91, 0x92, 0x92, 0x93, 0x93, - 0x91, 0x93, 0xC6, 0xAD, 0xDC, 0xD9, 0xD4, 0x60, - 0x43, 0x45, 0x58, 0x58, 0x57, 0x4B, 0x43, 0xCC, - 0xDD, 0xF1, 0xD8, 0xD5, 0x5D, 0x43, 0x41, 0x47, - 0xCD, 0x63, 0x62, 0x5D, 0x54, 0x4C, 0x55, 0x4B, - 0x51, 0x58, 0x62, 0xD0, 0xD0, 0x62, 0x5D, 0x5D, - 0x67, 0xFC, 0xFC, 0xFC, 0xFC, 0x58, 0x4E, 0x28, - 0x2A, 0x20, 0x23, 0x22, 0x23, 0x2A, 0x23, 0x22, - 0x22, 0x22, 0x23, 0x23, 0x25, 0x2A, 0x2E, 0x2D, - 0x2E, 0x2E, 0x2E, 0x23, 0xFA, 0xFC, 0xB2, 0xBD, - 0xB5, 0x90, 0x91, 0x93, 0x92, 0x90, 0x91, 0x93, - 0x92, 0x91, 0xBD, 0xAD, 0xDE, 0xE0, 0xD8, 0xD7, - 0x61, 0x40, 0x48, 0x58, 0x58, 0x58, 0x48, 0x44, - 0xCF, 0xDE, 0xE0, 0xDD, 0xD0, 0x52, 0x41, 0x45, - 0xCD, 0x63, 0x61, 0x58, 0x4D, 0x51, 0x4C, 0x4B, - 0x54, 0x5D, 0xCC, 0xCE, 0x63, 0x61, 0x5D, 0x5D, - 0xFB, 0xFC, 0xFC, 0xFC, 0xFC, 0x4B, 0x27, 0x21, - 0x22, 0x22, 0x23, 0x22, 0x22, 0x24, 0x23, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x20, - 0x27, 0x2B, 0x41, 0x2B, 0x23, 0xFC, 0xB2, 0xB6, - 0x93, 0x90, 0x92, 0xB5, 0x92, 0x90, 0xB5, 0x90, - 0x92, 0x93, 0xBC, 0xAD, 0xDC, 0xF1, 0xF3, 0xF0, - 0xD9, 0x61, 0x41, 0x4A, 0x58, 0x57, 0x57, 0x44, - 0x49, 0xD2, 0xDD, 0xD8, 0xDA, 0x63, 0x4A, 0x45, - 0xCC, 0x63, 0x5E, 0x52, 0x4B, 0x4C, 0x49, 0x51, - 0x5C, 0x61, 0xCD, 0x65, 0x63, 0x5E, 0x4E, 0xCF, - 0xFB, 0xFB, 0xF0, 0xFC, 0xD2, 0x2A, 0x22, 0x23, - 0x22, 0x22, 0x23, 0x22, 0x22, 0x21, 0x22, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, - 0x23, 0x22, 0x26, 0x41, 0x27, 0xF9, 0x81, 0xB7, - 0xB5, 0x91, 0x92, 0xB5, 0x91, 0xB5, 0x93, 0xB5, - 0x93, 0xB6, 0xB7, 0xB9, 0xCB, 0xD8, 0xF3, 0xF2, - 0xF2, 0xDB, 0x61, 0x2D, 0x51, 0x58, 0x57, 0x58, - 0x41, 0x51, 0xD4, 0xDB, 0xDC, 0xD1, 0x5B, 0x4C, - 0xCB, 0x62, 0x59, 0x4C, 0x4A, 0x49, 0x4B, 0x55, - 0x60, 0x64, 0xCC, 0x64, 0x5E, 0x55, 0x60, 0xE1, - 0xFB, 0xF8, 0xFC, 0xFC, 0x21, 0x22, 0x22, 0x23, - 0x22, 0x22, 0x23, 0x22, 0x22, 0x21, 0x22, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, - 0x23, 0x22, 0x21, 0x24, 0x2D, 0x21, 0xB4, 0xBB, - 0xB6, 0xB5, 0xB6, 0xB7, 0xB7, 0xB7, 0xB7, 0xB6, - 0xB6, 0xB6, 0xBB, 0xB9, 0x45, 0xCB, 0xDF, 0xF3, - 0xF3, 0xF3, 0xDB, 0x5E, 0x2C, 0x51, 0x58, 0x58, - 0x52, 0x2D, 0x5C, 0xD4, 0xD9, 0xD5, 0x63, 0x58, - 0x64, 0x60, 0x53, 0x49, 0x4A, 0x49, 0x52, 0x5C, - 0x63, 0xCD, 0xCD, 0x63, 0x5C, 0x4E, 0x65, 0xFC, - 0xFC, 0xF5, 0xFC, 0xD2, 0x23, 0x22, 0x22, 0x23, - 0x22, 0x22, 0x23, 0x22, 0x22, 0x21, 0x22, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, - 0x23, 0x22, 0x21, 0x22, 0x25, 0x29, 0xB3, 0xC7, - 0xB5, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, - 0xB6, 0xB5, 0xC7, 0xAD, 0x57, 0x3F, 0xCB, 0xF0, - 0xF3, 0xF3, 0xF2, 0xD9, 0x58, 0x41, 0x4C, 0x58, - 0x57, 0x47, 0x42, 0x62, 0xD4, 0xD4, 0xCC, 0x60, - 0x63, 0x5D, 0x50, 0x47, 0x48, 0x4B, 0x58, 0x60, - 0xCC, 0xCE, 0xCD, 0x60, 0x53, 0x5C, 0x62, 0xFB, - 0xF9, 0xFC, 0xFC, 0x21, 0x23, 0x22, 0x22, 0x23, - 0x22, 0x22, 0x23, 0x23, 0x23, 0x21, 0x22, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, - 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, 0x81, 0xC7, - 0xB7, 0xB7, 0xBC, 0xB7, 0xBC, 0xBC, 0xBC, 0xB7, - 0xB7, 0xB7, 0xC8, 0x80, 0x58, 0x57, 0x40, 0xCE, - 0xF3, 0xF2, 0xF2, 0xF0, 0xD5, 0x4C, 0x3F, 0x4B, - 0x52, 0x50, 0x2D, 0x4B, 0x64, 0xD2, 0xCC, 0x61, - 0x60, 0x58, 0x4A, 0x47, 0x47, 0x4C, 0x59, 0x64, - 0xD0, 0xD0, 0x64, 0x59, 0x49, 0x5D, 0xFB, 0xFC, - 0xD9, 0xFC, 0xD6, 0x23, 0x22, 0x22, 0x22, 0x23, - 0x22, 0x22, 0x23, 0x23, 0x21, 0x21, 0x22, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, - 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, 0xB4, 0xC8, - 0xBD, 0xB7, 0xBD, 0xBC, 0xBD, 0xC5, 0xBC, 0xC5, - 0xBC, 0xBD, 0xC7, 0xAC, 0x58, 0x57, 0x58, 0x2C, - 0xD1, 0xF0, 0xF3, 0xF3, 0xE0, 0xCD, 0x45, 0x3E, - 0x48, 0x4B, 0x3F, 0x41, 0x56, 0x64, 0x65, 0x62, - 0x5D, 0x52, 0x47, 0x48, 0x48, 0x53, 0x60, 0xCC, - 0xD2, 0xD0, 0x63, 0x52, 0x4E, 0x53, 0xFB, 0xFB, - 0xFC, 0xFC, 0x23, 0x23, 0x22, 0x23, 0x22, 0x23, - 0x22, 0x22, 0x23, 0x23, 0x20, 0x21, 0x22, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, - 0x23, 0x22, 0x23, 0x22, 0x23, 0x22, 0xB4, 0xC7, - 0xC5, 0xBC, 0xC5, 0xBD, 0xC5, 0xC5, 0xBD, 0xC5, - 0xBC, 0xC6, 0xC7, 0xB9, 0x58, 0x57, 0x58, 0x57, - 0x2D, 0xD4, 0xF1, 0xF2, 0xF0, 0xD9, 0x5D, 0x47, - 0x48, 0x3F, 0x42, 0x2C, 0x48, 0x5C, 0x5F, 0x60, - 0x58, 0x50, 0x47, 0x4A, 0x49, 0x55, 0x63, 0xD0, - 0xD2, 0xCD, 0x5D, 0x49, 0x4E, 0xE1, 0xFC, 0xF0, - 0xFC, 0xF8, 0x22, 0x22, 0x22, 0x23, 0x22, 0x23, - 0x22, 0x22, 0x23, 0x20, 0x21, 0x21, 0x22, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x23, 0x22, - 0x23, 0x22, 0x23, 0x23, 0x23, 0x22, 0xC4, 0xC8, - 0xBD, 0xBD, 0xC6, 0xBD, 0xC6, 0xC6, 0xC5, 0xC6, - 0xBD, 0xC6, 0xC7, 0xE4, 0x54, 0x57, 0x58, 0x57, - 0x57, 0x43, 0xD7, 0xE0, 0xF1, 0xD8, 0xCD, 0x4B, - 0x4A, 0x47, 0x42, 0x2C, 0x3F, 0x4D, 0x58, 0x5C, - 0x52, 0x4B, 0x48, 0x4B, 0x4A, 0x58, 0xCB, 0xD3, - 0xD2, 0xCD, 0x58, 0x47, 0x4A, 0xFC, 0xFC, 0xFB, - 0xFC, 0x2B, 0x22, 0x22, 0x22, 0x23, 0x22, 0x23, - 0x22, 0x22, 0x23, 0x26, 0x21, 0x21, 0x23, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, - 0x22, 0x23, 0x22, 0x23, 0x22, 0x23, 0xE5, 0xC8, - 0xBA, 0xC5, 0xC6, 0xC6, 0xC6, 0xC7, 0xC6, 0xC7, - 0xC5, 0xC6, 0xC8, 0xE5, 0x2E, 0x54, 0x58, 0x57, - 0x57, 0x4C, 0x4D, 0xDA, 0xD8, 0xD8, 0xD4, 0x5C, - 0x4B, 0x4B, 0x3F, 0x42, 0x44, 0x4A, 0x51, 0x58, - 0x4B, 0x48, 0x4B, 0x51, 0x4D, 0x5F, 0xD0, 0xD1, - 0xD0, 0x64, 0x51, 0x44, 0x6B, 0xFC, 0xFB, 0xFC, - 0xFC, 0x21, 0x23, 0x22, 0x22, 0x23, 0x22, 0x23, - 0x22, 0x22, 0x23, 0x26, 0x21, 0x23, 0x23, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, - 0x22, 0x23, 0x22, 0x23, 0x23, 0x23, 0xE5, 0xED, - 0xE7, 0xBA, 0xC8, 0xC6, 0xC6, 0xC6, 0xC6, 0xC7, - 0xC7, 0xE5, 0xED, 0xE6, 0x61, 0x41, 0x52, 0x58, - 0x58, 0x57, 0x45, 0x5E, 0xD7, 0xDD, 0xD5, 0x60, - 0x4B, 0x4C, 0x48, 0x4D, 0x4D, 0x50, 0x4D, 0x56, - 0x4A, 0x3E, 0x53, 0x53, 0x52, 0x63, 0xD3, 0xD0, - 0xCE, 0x60, 0x4A, 0x45, 0xFC, 0xFC, 0xF7, 0xFC, - 0xFC, 0x21, 0x23, 0x23, 0x22, 0x23, 0x22, 0x23, - 0x22, 0x23, 0x21, 0x2A, 0x20, 0x23, 0x23, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, - 0x23, 0x22, 0x23, 0x22, 0x21, 0x23, 0xEB, 0xF6, - 0xF6, 0xED, 0xED, 0xED, 0xED, 0xED, 0xED, 0xED, - 0xF6, 0xF6, 0xF6, 0xE6, 0xDB, 0x58, 0x45, 0x4B, - 0x58, 0x57, 0x4D, 0x4B, 0x64, 0xD4, 0xD0, 0x5C, - 0x48, 0x51, 0x4C, 0x5D, 0x5E, 0x5C, 0x56, 0x59, - 0x3E, 0x4A, 0x58, 0x54, 0x52, 0x65, 0xD3, 0xD0, - 0xCF, 0x5D, 0x48, 0xFC, 0xFC, 0xFC, 0xFA, 0xFC, - 0xFC, 0x21, 0x22, 0x23, 0x22, 0x23, 0x22, 0x23, - 0x22, 0x23, 0x21, 0x2A, 0x21, 0x23, 0x23, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, - 0x23, 0x22, 0x23, 0x22, 0x21, 0x4F, 0xE6, 0xC6, - 0xC6, 0xBD, 0xC6, 0xBD, 0xBD, 0xBD, 0xBD, 0xC6, - 0xC5, 0xBA, 0xC7, 0xE6, 0xF2, 0xD4, 0x49, 0x4B, - 0x3E, 0x4D, 0x52, 0x3E, 0x52, 0x63, 0x64, 0x56, - 0x48, 0x54, 0x4D, 0x61, 0xCC, 0xCC, 0x60, 0x60, - 0x47, 0x4D, 0x5C, 0x53, 0x58, 0xCF, 0xD1, 0xCF, - 0xD0, 0x59, 0x45, 0xFC, 0xFC, 0xFC, 0xEF, 0xF9, - 0xFC, 0x21, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22, - 0x23, 0x22, 0x23, 0x2A, 0x21, 0x23, 0x23, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, - 0x23, 0x22, 0x23, 0x22, 0x23, 0x4F, 0xE4, 0xB9, - 0xAF, 0x80, 0x80, 0x8E, 0x8E, 0x8E, 0x8E, 0x8F, - 0x80, 0xB4, 0xB9, 0xE4, 0x7F, 0xDE, 0x61, 0x52, - 0x54, 0x48, 0x3F, 0x43, 0x4D, 0x56, 0x59, 0x4B, - 0x3E, 0x58, 0x53, 0x61, 0xD3, 0xD4, 0xCF, 0xCD, - 0x4C, 0x58, 0x5F, 0x53, 0x5E, 0xD3, 0xD0, 0xCE, - 0xCE, 0x52, 0x3F, 0xFC, 0xFC, 0xFC, 0xF7, 0x65, - 0xFA, 0x22, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22, - 0x23, 0x22, 0x21, 0x2A, 0x23, 0x23, 0x23, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, - 0x23, 0x22, 0x23, 0x22, 0x21, 0xB1, 0xE4, 0xE6, - 0x7C, 0xB1, 0x7C, 0xB1, 0xB2, 0xB2, 0xB3, 0x3D, - 0xB3, 0x3C, 0xE5, 0xB3, 0xB0, 0xF1, 0xD0, 0x58, - 0x5D, 0x4D, 0x40, 0x41, 0x48, 0x51, 0x4C, 0x3F, - 0x3F, 0x4D, 0x5A, 0x5A, 0xD5, 0xD9, 0xD7, 0xD4, - 0x57, 0x5E, 0x61, 0x4C, 0x63, 0xD4, 0xCF, 0xCE, - 0xCB, 0x4D, 0x4A, 0xFC, 0xFC, 0xFC, 0xFC, 0xF0, - 0xFB, 0x22, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22, - 0x23, 0x22, 0x23, 0x2A, 0x21, 0x23, 0x23, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, - 0x22, 0x23, 0x22, 0x23, 0x23, 0xB1, 0x81, 0x7D, - 0x39, 0x35, 0x35, 0x36, 0x36, 0x36, 0x36, 0x36, - 0x36, 0x36, 0x7C, 0xB2, 0xB0, 0xDF, 0xD2, 0x57, - 0x60, 0x59, 0x5B, 0x59, 0x52, 0x4C, 0x4A, 0x40, - 0x42, 0x4A, 0x53, 0x4D, 0xD2, 0xDE, 0xDE, 0xD9, - 0x5E, 0x5E, 0x60, 0x4A, 0xCD, 0xD1, 0xCF, 0xCE, - 0x63, 0x49, 0x5C, 0xFB, 0xE8, 0x89, 0x9F, 0xFC, - 0xD6, 0x21, 0x21, 0x23, 0x22, 0x22, 0x23, 0x22, - 0x23, 0x22, 0x21, 0x2A, 0x22, 0x23, 0x23, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, - 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x7F, 0xB9, - 0x71, 0x6C, 0x38, 0x38, 0x33, 0x33, 0x33, 0x38, - 0x38, 0x71, 0xAD, 0xE4, 0xD3, 0xDA, 0xCC, 0x52, - 0x63, 0x60, 0xCE, 0xD4, 0xCF, 0x60, 0x4C, 0x40, - 0x3F, 0x45, 0x4B, 0x5A, 0xCB, 0xD8, 0xDE, 0xDC, - 0x5E, 0x5E, 0x5F, 0x4C, 0xD2, 0xD2, 0xCF, 0xCF, - 0x61, 0x45, 0x5E, 0xA7, 0x9D, 0x95, 0x8B, 0x99, - 0xFC, 0x41, 0x21, 0x23, 0x23, 0x22, 0x23, 0x22, - 0x23, 0x22, 0x23, 0x2A, 0x23, 0x23, 0x23, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x77, 0x77, 0xF6, - 0xFC, 0x7D, 0x7D, 0x7E, 0x7E, 0x7E, 0x7E, 0x7D, - 0x7D, 0xFC, 0x47, 0x64, 0xD0, 0xD0, 0x5D, 0x4B, - 0x62, 0xCC, 0xD1, 0xDE, 0xDE, 0xD4, 0x5E, 0x43, - 0x3F, 0x3E, 0x48, 0x53, 0x58, 0xDB, 0xD8, 0xDC, - 0x5E, 0x5E, 0x5E, 0x53, 0xD4, 0xD2, 0xD0, 0xD0, - 0x5E, 0x49, 0xA7, 0xA6, 0x89, 0x95, 0x8B, 0x9C, - 0x9C, 0xFB, 0xD4, 0x22, 0x22, 0x22, 0x22, 0x23, - 0x22, 0x23, 0x23, 0x2A, 0x22, 0x23, 0x23, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, - 0x23, 0x22, 0x23, 0x23, 0x98, 0x8C, 0x8C, 0x88, - 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xF8, - 0xE9, 0x9C, 0x48, 0x5C, 0xD0, 0xCB, 0x48, 0x49, - 0x5B, 0xCB, 0xCD, 0xE0, 0xF1, 0xDD, 0xD0, 0x4A, - 0x41, 0x47, 0x45, 0x4C, 0x48, 0xD7, 0xDE, 0xDC, - 0x5E, 0x5E, 0x5A, 0x58, 0xD1, 0xD0, 0xD0, 0xD2, - 0x5C, 0x55, 0xA7, 0xA6, 0x87, 0x86, 0x89, 0x94, - 0x9C, 0xA9, 0xFC, 0xF4, 0x22, 0x23, 0x22, 0x23, - 0x22, 0x23, 0x22, 0x2A, 0x21, 0x23, 0x23, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, - 0x22, 0x23, 0x22, 0x23, 0xA4, 0x89, 0x8C, 0xAA, - 0xFB, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xF7, - 0x85, 0x88, 0x8D, 0x59, 0x64, 0x63, 0x47, 0x3E, - 0x4C, 0x60, 0x61, 0xE0, 0xF0, 0xDF, 0xD9, 0x5D, - 0x2E, 0x3E, 0x3E, 0x47, 0x4D, 0xCD, 0xDE, 0xDC, - 0x5D, 0x5C, 0x51, 0x5D, 0xD1, 0xD2, 0xD2, 0xD4, - 0x5A, 0xBE, 0xA7, 0x98, 0x8A, 0x8A, 0xA0, 0x8B, - 0x86, 0x86, 0xF7, 0xFC, 0xF7, 0x26, 0x23, 0x23, - 0x22, 0x22, 0x22, 0x22, 0x21, 0x22, 0x23, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, - 0x22, 0x21, 0x21, 0x21, 0xA1, 0x98, 0x9F, 0xBF, - 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xA7, - 0x8C, 0x86, 0x8D, 0x59, 0x5E, 0x5D, 0x3F, 0x3E, - 0x47, 0x53, 0x63, 0xD9, 0xF0, 0xF1, 0xDE, 0xD0, - 0x43, 0x3E, 0x47, 0x45, 0x4A, 0x5B, 0xDC, 0xDA, - 0x5D, 0x59, 0x49, 0x5F, 0xD1, 0xD2, 0xD3, 0xB9, - 0xA5, 0xA7, 0x98, 0x9B, 0x96, 0x9D, 0x89, 0x89, - 0x8B, 0x9C, 0x9D, 0xFC, 0xFC, 0xFC, 0x26, 0x22, - 0x23, 0x23, 0x22, 0x22, 0x21, 0x22, 0x23, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, - 0x22, 0x22, 0x29, 0x2D, 0x99, 0x99, 0xA2, 0xAA, - 0xC4, 0xFB, 0xFC, 0xFC, 0xFC, 0xF6, 0xBF, 0xA2, - 0x9C, 0x9C, 0x8E, 0xDC, 0xCD, 0x51, 0x41, 0x3E, - 0x45, 0x49, 0x58, 0xCD, 0xE0, 0xE0, 0xD8, 0xDA, - 0x4C, 0x4A, 0x45, 0x45, 0x48, 0x47, 0xDA, 0xDA, - 0x5C, 0x58, 0x44, 0x69, 0xA9, 0x98, 0xA4, 0xA6, - 0xA1, 0xA4, 0x99, 0x9E, 0x9D, 0x8B, 0x8A, 0x97, - 0x87, 0x9A, 0x8A, 0xC2, 0xFC, 0xFC, 0xFC, 0x4D, - 0x21, 0x21, 0x23, 0x22, 0x21, 0x22, 0x23, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x23, 0x22, - 0x21, 0x22, 0x2D, 0x34, 0xA4, 0xA2, 0xA2, 0xA9, - 0xBF, 0xC0, 0xC3, 0xC1, 0xC0, 0xBE, 0xA6, 0x9D, - 0x99, 0x87, 0xA2, 0xF1, 0xDC, 0x64, 0x42, 0x45, - 0x47, 0x3E, 0x49, 0x4C, 0xDD, 0xDF, 0xD8, 0xDB, - 0x5E, 0x4C, 0x48, 0x45, 0x45, 0x41, 0xD1, 0xD6, - 0x5A, 0x55, 0x3F, 0xA7, 0xA1, 0x98, 0x9F, 0x99, - 0x9F, 0x9D, 0x9A, 0x95, 0x8B, 0x97, 0x89, 0x8A, - 0x88, 0x94, 0x9C, 0x8C, 0xFC, 0xFC, 0xFC, 0xFC, - 0xF4, 0x21, 0x23, 0x22, 0x21, 0x22, 0x23, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, - 0x23, 0x23, 0x2C, 0x2C, 0xA8, 0xA2, 0xA4, 0xA4, - 0xA9, 0xAA, 0xAA, 0xAA, 0xA9, 0xA6, 0x98, 0x9C, - 0x8B, 0x88, 0x98, 0x8D, 0xD8, 0xD6, 0x4E, 0x47, - 0x47, 0x49, 0x47, 0x3F, 0xDA, 0xDD, 0xDE, 0xDD, - 0xCC, 0x4A, 0x4B, 0x3E, 0x45, 0x43, 0x61, 0xD4, - 0x56, 0x51, 0x44, 0xA4, 0x9B, 0x8B, 0x9C, 0x9A, - 0xA0, 0xA2, 0x98, 0x98, 0x8B, 0x8B, 0x98, 0x98, - 0x84, 0x8B, 0x94, 0x8A, 0xA4, 0xFC, 0xFC, 0xFC, - 0xFC, 0xF2, 0x21, 0x22, 0x21, 0x22, 0x23, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x23, 0x23, - 0x23, 0x22, 0x2C, 0x2D, 0xC0, 0xA4, 0xA2, 0xA4, - 0xA4, 0xA6, 0xA6, 0xA6, 0xA4, 0xA2, 0x9F, 0x89, - 0x8B, 0x9C, 0x9C, 0x8B, 0x68, 0xDB, 0x5F, 0x4B, - 0x3E, 0x49, 0x4B, 0x3E, 0xCC, 0xDA, 0xDC, 0xDD, - 0xD3, 0x49, 0x52, 0x48, 0x45, 0x45, 0x53, 0xD0, - 0x51, 0x4A, 0x44, 0xA4, 0x9B, 0x8B, 0x9C, 0xA0, - 0x9B, 0x86, 0x89, 0x98, 0x89, 0x8A, 0x96, 0x8A, - 0x9C, 0x89, 0x89, 0x9C, 0x8C, 0xF6, 0xFC, 0xFC, - 0xFC, 0xFC, 0x21, 0x22, 0x21, 0x22, 0x23, 0x22, - 0x22, 0x22, 0x22, 0x23, 0x22, 0x21, 0x22, 0x23, - 0x22, 0x21, 0x2B, 0x34, 0xC0, 0xA8, 0xA4, 0xA2, - 0xA2, 0x98, 0xA1, 0xA0, 0x98, 0x9F, 0x95, 0x8A, - 0x94, 0xA1, 0x8A, 0x84, 0x9B, 0x68, 0xCC, 0x49, - 0x4A, 0x47, 0x4C, 0x4B, 0x51, 0xD3, 0xDA, 0xDC, - 0xD5, 0x56, 0x56, 0x4A, 0x3E, 0x45, 0x48, 0x63, - 0x4A, 0x47, 0x3E, 0xA7, 0x98, 0x9D, 0x9E, 0x8B, - 0x95, 0x9B, 0x89, 0x86, 0x9B, 0x8B, 0x89, 0x84, - 0x9A, 0xA1, 0x95, 0x9A, 0x8C, 0xA4, 0xFC, 0xFC, - 0xFC, 0xFA, 0x23, 0x22, 0x21, 0x22, 0x23, 0x22, - 0x22, 0x22, 0x22, 0x23, 0x22, 0x21, 0x22, 0x23, - 0x21, 0x23, 0x2C, 0xF6, 0xBF, 0xA9, 0xA2, 0x99, - 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9B, 0x87, 0x8B, - 0x9C, 0x86, 0x9C, 0x8A, 0x87, 0x87, 0x89, 0x51, - 0x54, 0x47, 0x4B, 0x50, 0x4B, 0xCF, 0xD6, 0xDC, - 0xD5, 0x60, 0x54, 0x52, 0x48, 0x45, 0x40, 0x5A, - 0x45, 0x43, 0x47, 0xA7, 0x98, 0x9B, 0x95, 0x95, - 0x9A, 0x87, 0x98, 0x98, 0x8A, 0x86, 0x87, 0x9E, - 0x9B, 0x95, 0x9D, 0x9D, 0x99, 0x85, 0xA6, 0xFA, - 0xF2, 0x21, 0x23, 0x22, 0x21, 0x22, 0x23, 0x22, - 0x22, 0x22, 0x22, 0x23, 0x22, 0x21, 0x22, 0x22, - 0x21, 0x24, 0xFB, 0xF7, 0xBF, 0xA6, 0xA2, 0x99, - 0x97, 0x89, 0x86, 0x89, 0x9C, 0x96, 0x9E, 0x94, - 0x89, 0x99, 0x98, 0x89, 0x9E, 0x9B, 0x89, 0x8B, - 0x58, 0x4B, 0x4A, 0x52, 0x48, 0xCC, 0xD3, 0xDA, - 0xD3, 0x65, 0x4C, 0x58, 0x49, 0x3E, 0x2E, 0x4D, - 0x40, 0x41, 0x45, 0xA9, 0xA1, 0x9B, 0x9E, 0x9C, - 0x95, 0x8A, 0x94, 0x89, 0x96, 0x87, 0x9C, 0x9A, - 0x84, 0x9D, 0x9C, 0x9E, 0x9A, 0x9C, 0x9D, 0xBB, - 0x23, 0x23, 0x22, 0x22, 0x21, 0x22, 0x23, 0x22, - 0x22, 0x22, 0x22, 0x23, 0x22, 0x21, 0x23, 0x23, - 0x24, 0xFC, 0xFC, 0xF6, 0xBF, 0xA6, 0x9F, 0x99, - 0x89, 0x95, 0x87, 0x94, 0x9D, 0x9E, 0x97, 0x9E, - 0x95, 0x9B, 0x89, 0x95, 0x95, 0x9B, 0x89, 0x87, - 0x5D, 0x56, 0x3E, 0x51, 0x3E, 0x60, 0xCF, 0xD3, - 0xD2, 0xCD, 0x5C, 0x49, 0x4B, 0x3E, 0x2C, 0x48, - 0x3E, 0x43, 0x3E, 0xA9, 0xA1, 0x9B, 0x97, 0x94, - 0x95, 0x9A, 0x9C, 0x87, 0x87, 0x9B, 0x9C, 0x95, - 0x9D, 0x89, 0x9A, 0x89, 0x9E, 0x9E, 0x8C, 0xA6, - 0x20, 0x23, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22, - 0x22, 0x22, 0x22, 0x22, 0x21, 0x21, 0x20, 0x40, - 0xFC, 0xFC, 0xFC, 0xEC, 0xBE, 0xA4, 0x9F, 0x99, - 0x95, 0x9F, 0xA0, 0x88, 0x9D, 0x8B, 0x97, 0x95, - 0x87, 0x95, 0x96, 0x95, 0x97, 0x94, 0x94, 0x98, - 0xD3, 0x4C, 0x47, 0x4D, 0x42, 0x4C, 0x60, 0xCC, - 0xCE, 0xD0, 0x65, 0x4B, 0x47, 0x44, 0x2B, 0x45, - 0x4B, 0x47, 0x49, 0xA7, 0xA1, 0x9A, 0x97, 0x89, - 0x95, 0x97, 0x97, 0x9E, 0x89, 0x95, 0x89, 0x9C, - 0x87, 0x95, 0x97, 0x99, 0x95, 0x99, 0x9F, 0xA4, - 0xC4, 0x21, 0x21, 0x23, 0x21, 0x23, 0x23, 0x23, - 0x23, 0x23, 0x23, 0x23, 0x21, 0x20, 0xFC, 0xFC, - 0xFC, 0xFC, 0xFC, 0xEA, 0xAA, 0xA6, 0xA2, 0x99, - 0x8B, 0x9A, 0x95, 0x9E, 0x9E, 0x9A, 0x94, 0x87, - 0x94, 0x94, 0x89, 0x94, 0x9B, 0x9B, 0xA7, 0xDC, - 0xDB, 0x65, 0x2E, 0x3E, 0x43, 0x44, 0x49, 0x58, - 0x63, 0xD3, 0xD3, 0x5E, 0x42, 0x42, 0x2D, 0x40, - 0x54, 0x4C, 0x4A, 0xA7, 0xA0, 0x99, 0x9B, 0x94, - 0xA0, 0x8A, 0x9B, 0x9D, 0x87, 0x95, 0x94, 0x8B, - 0x8A, 0x98, 0x9C, 0x8A, 0x9B, 0x99, 0xA2, 0xA6, - 0xBF, 0xEC, 0x2A, 0x20, 0x21, 0x23, 0x21, 0x20, - 0x20, 0x20, 0x20, 0x4C, 0xF9, 0xFC, 0xFC, 0xFC, - 0xFC, 0xFC, 0xFC, 0xEB, 0xAA, 0xA4, 0x9F, 0x9C, - 0x8B, 0x9B, 0x88, 0x84, 0x9E, 0x9D, 0x96, 0x94, - 0x94, 0x9A, 0x9B, 0x9B, 0xA4, 0xD5, 0xCD, 0xDE, - 0xF1, 0xDA, 0x4C, 0x2D, 0x41, 0x2B, 0x42, 0x4C, - 0x5E, 0xD4, 0xD7, 0xCD, 0x49, 0x2E, 0x2E, 0x41, - 0x5E, 0x57, 0xA7, 0xA6, 0xA7, 0xA4, 0xA2, 0x98, - 0x9D, 0x9C, 0xA1, 0x99, 0x9D, 0x88, 0x8B, 0x9C, - 0x8A, 0x9C, 0x9C, 0x94, 0x9C, 0x89, 0xA0, 0xA6, - 0xAA, 0xEB, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, - 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, - 0xFC, 0xFC, 0xFB, 0xE9, 0xAA, 0xA6, 0xA2, 0x8B, - 0x8B, 0x8A, 0x86, 0x9B, 0x9C, 0x98, 0xA0, 0x9B, - 0x9B, 0x84, 0xA7, 0xB4, 0x61, 0xD1, 0xD2, 0xE0, - 0xF1, 0xDC, 0x61, 0x2D, 0x2E, 0x3F, 0x56, 0x62, - 0x5D, 0xD4, 0xD9, 0xD3, 0x54, 0x41, 0x41, 0x44, - 0xCB, 0x60, 0x52, 0xA9, 0xA9, 0xA9, 0xA7, 0xA6, - 0xA6, 0xA4, 0xA4, 0xA2, 0xA2, 0x9D, 0x95, 0x89, - 0x9C, 0x8A, 0x9E, 0x9C, 0x8A, 0x9E, 0xA0, 0xA8, - 0xC0, 0xE9, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, - 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, - 0xFC, 0xFC, 0xFC, 0xE9, 0xAA, 0xA6, 0xA0, 0x99, - 0x9C, 0x8B, 0x9A, 0x84, 0x9B, 0x9B, 0x98, 0x98, - 0xA9, 0xB9, 0x49, 0x57, 0xCB, 0xD4, 0xD3, 0xF1, - 0xD8, 0xDA, 0xCE, 0x3F, 0x41, 0x4B, 0x5D, 0xCB, - 0x5E, 0xD6, 0xDB, 0xD6, 0x5D, 0x43, 0x3F, 0x49, - 0xD1, 0xCC, 0x4F, 0xDD, 0xC3, 0xBB, 0xBF, 0xAA, - 0xAA, 0xA9, 0xAA, 0xA8, 0xA8, 0xA6, 0xA6, 0xA2, - 0x9C, 0x9F, 0x9B, 0x9A, 0x9D, 0xA2, 0xA8, 0xAA, - 0xC1, 0xEA, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, - 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, - 0xFC, 0xFC, 0xFC, 0xEA, 0xC0, 0xAA, 0xA6, 0xA2, - 0xA2, 0x99, 0xA0, 0xA0, 0xA4, 0xA7, 0xA9, 0xC0, - 0x67, 0x49, 0x54, 0x60, 0xD0, 0xD4, 0xCC, 0xDF, - 0xD9, 0xD5, 0xD2, 0x3E, 0x47, 0x56, 0x60, 0xCD, - 0x5D, 0xD9, 0xD9, 0xD6, 0x61, 0x3F, 0x47, 0x52, - 0xD6, 0xD3, 0x62, 0x4D, 0x40, 0x4A, 0x57, 0xCA, - 0xC3, 0xC1, 0xC1, 0xC0, 0xBF, 0xBF, 0xAA, 0xAA, - 0xA6, 0xA4, 0xA4, 0xA4, 0xA6, 0xA8, 0xBE, 0xC1, - 0xC9, 0xEB, 0xFB, 0xFB, 0xFC, 0xFC, 0xFC, 0xFC, - 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, - 0xFC, 0xFC, 0xFC, 0xEB, 0xC3, 0xC0, 0xAA, 0xA8, - 0xA6, 0xA6, 0xA6, 0xA9, 0xAA, 0xC0, 0xE8, 0xD0, - 0xD2, 0x4C, 0x5E, 0x64, 0xD0, 0xD1, 0x5F, 0xD9, - 0xD5, 0xD1, 0xD0, 0x48, 0x52, 0x5C, 0x64, 0xCD, - 0x5C, 0xDC, 0xD7, 0xD5, 0x62, 0x3F, 0x4C, 0x53, - 0xDA, 0xD7, 0xCE, 0x56, 0x40, 0x4B, 0x52, 0x56, - 0xCE, 0xDF, 0x6A, 0xEB, 0xE9, 0xC9, 0xC3, 0xC0, - 0xC0, 0xBF, 0xBE, 0xAA, 0xBF, 0xC0, 0xC3, 0xC9, - 0xEA, 0xF6, 0xEE, 0x58, 0x57, 0x5E, 0xD6, 0xD0, - 0xD2, 0x61, 0xCB, 0xD6, 0xD6, 0xD4, 0xDF, 0xF3, - 0xF2, 0xDD, 0xD7, 0xEB, 0xC9, 0xC1, 0xC0, 0xBF, - 0xAA, 0xAA, 0xAA, 0xBE, 0xC3, 0xF0, 0xD2, 0xD2, - 0xD2, 0x51, 0x62, 0xCC, 0xD0, 0xCC, 0x61, 0xD3, - 0xCF, 0xCE, 0xD2, 0x48, 0x5A, 0x61, 0xCC, 0xCE, - 0x5F, 0xD9, 0xD5, 0xD1, 0x63, 0x44, 0x56, 0x56, - 0xDC, 0xD9, 0xD4, 0x5E, 0x42, 0x4A, 0x4C, 0x57, - 0x5D, 0xD8, 0xE0, 0xD8, 0xDC, 0xCB, 0x66, 0xEC, - 0xE8, 0xC3, 0xC3, 0xC3, 0xC3, 0xC9, 0xE8, 0xEA, - 0xF6, 0x50, 0x3E, 0x58, 0x57, 0x5A, 0xD6, 0xD4, - 0xCC, 0x4B, 0x53, 0x5C, 0x64, 0xD1, 0xDF, 0xF3, - 0xF1, 0xDE, 0xD9, 0xF6, 0xEB, 0xC9, 0xC1, 0xC1, - 0xC0, 0xC0, 0xC1, 0xC9, 0xF0, 0xD6, 0xCD, 0xD6, - 0xD3, 0x53, 0xCB, 0xCF, 0xCD, 0x5F, 0x5F, 0xCE, - 0xCF, 0xCD, 0xD0, 0x47, 0x5F, 0xCB, 0xCE, 0xCD, - 0x63, 0xD6, 0xD3, 0xD1, 0x63, 0x3F, 0x58, 0x58, - 0xDB, 0xDC, 0xDA, 0x65, 0x3E, 0x49, 0x49, 0x4D, - 0x49, 0xDC, 0xDF, 0xE0, 0xDE, 0xD5, 0x47, 0x47, - 0x46, 0x6B, 0xEB, 0xEA, 0xE9, 0xEA, 0xEB, 0xF6, - 0xD0, 0x57, 0x57, 0x47, 0x47, 0x5B, 0xD4, 0xD4, - 0xCD, 0x44, 0x3E, 0x4B, 0x50, 0x4B, 0x51, 0xD5, - 0xDB, 0xD8, 0xDE, 0x4B, 0xF6, 0xF6, 0xEA, 0xE9, - 0xE8, 0xEA, 0xEB, 0x67, 0x5E, 0xCC, 0xD6, 0xDC, - 0xD5, 0x58, 0xCE, 0xCE, 0x62, 0x50, 0xCC, 0xD3, - 0xD2, 0xCD, 0xCD, 0x4B, 0x64, 0xCE, 0xCE, 0x64, - 0xCC, 0xD3, 0xD2, 0xD2, 0x61, 0x47, 0x5D, 0x5C, - 0xDD, 0xDD, 0xD9, 0xD1, 0x4C, 0x47, 0x49, 0x4A, - 0x4B, 0xD1, 0xD8, 0xE0, 0xDF, 0xDD, 0x5D, 0x4A, - 0x48, 0x52, 0x51, 0x3F, 0xF6, 0xEC, 0xE0, 0xE0, - 0xD3, 0x5E, 0x5F, 0x50, 0x4B, 0x50, 0xCB, 0xCE, - 0x64, 0x45, 0x4C, 0x57, 0x57, 0x58, 0x52, 0xD6, - 0xD3, 0xDE, 0xDF, 0xD1, 0x3E, 0x4B, 0xF6, 0xF6, - 0xEC, 0x66, 0x53, 0x43, 0x56, 0xD1, 0xD9, 0xDE, - 0xD4, 0x5E, 0xCE, 0xCC, 0x5B, 0x2C, 0xD4, 0xD5, - 0xD2, 0xD0, 0x63, 0x5D, 0xCD, 0xD0, 0xCD, 0x5E, - 0xD0, 0xCF, 0xCE, 0xD2, 0x5E, 0x50, 0x60, 0x5D, - 0xDE, 0xDD, 0xDC, 0xD7, 0x5D, 0x45, 0x47, 0x3E, - 0x4B, 0x5E, 0xDE, 0xDF, 0xE0, 0xD8, 0xCF, 0x3E, - 0x45, 0x51, 0x58, 0x42, 0xCB, 0xDA, 0xDE, 0xD8, - 0xD2, 0x61, 0xCC, 0xCF, 0xD6, 0xDA, 0xDA, 0xD5, - 0xD0, 0x50, 0x44, 0x57, 0x57, 0x58, 0x45, 0xD1, - 0xD1, 0xD7, 0xDF, 0xDF, 0xD7, 0xCF, 0x64, 0x60, - 0xCE, 0xCE, 0xCE, 0x63, 0xCF, 0xDA, 0xDE, 0xD9, - 0xCF, 0x63, 0xCD, 0x63, 0x4D, 0x4B, 0xD6, 0xD5, - 0xCE, 0xD3, 0x60, 0xCB, 0xD0, 0xD0, 0x65, 0x47, - 0xD0, 0xCC, 0xCC, 0xD1, 0x59, 0x5D, 0x63, 0x5E, - 0xDD, 0xDD, 0xDE, 0xDC, 0xCB, 0x40, 0x48, 0x45, - 0x3E, 0x3E, 0xD9, 0xDF, 0xE0, 0xDF, 0xDA, 0x51, - 0x4C, 0x48, 0x56, 0x4C, 0x5B, 0xD2, 0xDA, 0xDB, - 0xCB, 0x5F, 0xD0, 0xCC, 0xDC, 0xF0, 0xF3, 0xE0, - 0xDD, 0xCC, 0x41, 0x50, 0x57, 0x57, 0x4B, 0x5D, - 0xD3, 0xD1, 0xDE, 0xDF, 0xDE, 0xD7, 0xD0, 0xD0, - 0xD5, 0xD6, 0xD6, 0xCE, 0xD7, 0xDC, 0xDA, 0xD5, - 0x60, 0x63, 0x64, 0x5E, 0x47, 0x61, 0xD5, 0xD2, - 0xCF, 0xD0, 0x59, 0xCD, 0xD1, 0xCF, 0x61, 0x4D, - 0xCC, 0xCE, 0xCD, 0xD0, 0x52, 0x61, 0x64, 0x60, - 0xDA, 0xDE, 0xDE, 0xDD, 0xD1, 0x4B, 0x4A, 0x45, - 0x3E, 0x41, 0xCD, 0xDE, 0xE0, 0xF1, 0xDE, 0x63, - 0x4A, 0x4A, 0x4A, 0x4B, 0x50, 0xCB, 0xD4, 0xD7, - 0x5E, 0x54, 0x62, 0xD3, 0xD4, 0xF0, 0xF3, 0xF3, - 0xF2, 0xDE, 0x61, 0x40, 0x49, 0x56, 0x4D, 0x3E, - 0x4B, 0xCE, 0xD9, 0xD8, 0xD9, 0xD5, 0xCF, 0xD2, - 0xD6, 0xD6, 0xD1, 0xD1, 0xD7, 0xD5, 0xCF, 0xD0, - 0x54, 0x64, 0x63, 0x56, 0x2C, 0xCB, 0xD1, 0xCC, - 0xD3, 0xCD, 0x54, 0xCF, 0xD1, 0xCE, 0x5E, 0x5C, - 0xCE, 0xCE, 0xCE, 0xCB, 0x4B, 0x63, 0xCC, 0x61, - 0xD4, 0xDC, 0xDE, 0xDE, 0xDA, 0x5D, 0x45, 0x45, - 0x48, 0x3F, 0x52, 0xD9, 0xD8, 0xDF, 0xDF, 0xD2, - 0x52, 0x4B, 0x3E, 0x2E, 0x47, 0x60, 0xCF, 0xD3, - 0x59, 0x48, 0x50, 0x5E, 0xCC, 0xDE, 0xF2, 0xF2, - 0xF3, 0xF3, 0xDD, 0x5D, 0x3E, 0x48, 0x47, 0x47, - 0x58, 0xD1, 0xDA, 0xDA, 0xD5, 0xD1, 0xCD, 0xD2, - 0xD3, 0xCF, 0xD3, 0xD1, 0xCD, 0xD3, 0xD2, 0x5E, - 0x52, 0x64, 0x60, 0x4B, 0x45, 0x61, 0xCD, 0xD3, - 0xD3, 0x64, 0x61, 0xD0, 0xD0, 0x64, 0x45, 0x63, - 0xD0, 0xCE, 0xD0, 0x60, 0x56, 0xCB, 0xCC, 0x62, - 0xCE, 0xDA, 0xDE, 0xD8, 0xDD, 0xCC, 0x45, 0x49, - 0x3E, 0x47, 0x42, 0xD1, 0xDC, 0xD8, 0xD8, 0xD3, - 0x5D, 0x4C, 0x49, 0x3F, 0x47, 0x59, 0xCD, 0xCF, - 0x59, 0x2E, 0x48, 0x47, 0x52, 0x63, 0xF0, 0xF2, - 0xF3, 0xF3, 0xF2, 0xDA, 0x52, 0x4B, 0x52, 0x58, - 0x5E, 0x63, 0xD0, 0xD0, 0xD0, 0xCF, 0xCE, 0xCE, - 0xCF, 0x65, 0x61, 0xD6, 0xD6, 0xD6, 0xCB, 0x4B, - 0x61, 0x62, 0x5D, 0x43, 0x4B, 0x61, 0xD0, 0xD4, - 0xD1, 0x61, 0xCE, 0xD2, 0xCD, 0x5E, 0x4A, 0xCE, - 0xD0, 0xCC, 0xD0, 0x59, 0x61, 0xCC, 0xCC, 0x62, - 0xD1, 0xD5, 0xDE, 0xD8, 0xDD, 0xCF, 0x4B, 0x4A, - 0x45, 0x3E, 0x2D, 0xCB, 0xDC, 0xDE, 0xD8, 0xD5, - 0x60, 0x54, 0x51, 0x4C, 0x4D, 0x5C, 0xCC, 0xCE, - 0x5A, 0x2C, 0x50, 0x53, 0x3E, 0x59, 0xD8, 0xF3, - 0xF2, 0xF3, 0xF3, 0xE0, 0x5E, 0x4A, 0x4C, 0x53, - 0x5E, 0x63, 0xCC, 0xCC, 0xCC, 0xCD, 0xCF, 0xD3, - 0x62, 0x53, 0xD6, 0xD6, 0xD6, 0xD6, 0x5B, 0x48, - 0x64, 0x63, 0x59, 0x44, 0x57, 0x63, 0xD2, 0xD3, - 0xD0, 0x5E, 0xD0, 0xD1, 0xCB, 0x58, 0x4C, 0xCF, - 0xCF, 0xCE, 0xCE, 0x57, 0x63, 0xCC, 0xCD, 0x57, -}; - -unsigned char linux_logo_bw[] __initdata = { - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x00, 0x3F, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, - 0xFE, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFE, 0x3F, 0xFF, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFE, 0x7F, 0xFF, 0xC7, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xC3, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, - 0xFB, 0xE3, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFD, 0xFF, 0xFF, 0xE1, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xF9, 0xFF, 0xFF, 0xF1, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFF, 0xFF, 0xF1, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFF, - 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xF9, 0xFF, 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xF9, 0xCF, 0xC3, 0xF8, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x87, 0x81, 0xF9, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xA7, - 0x99, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xF9, 0xF3, 0xBC, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xF9, 0xE3, 0xBC, 0xF9, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xB0, 0x3C, 0xF9, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xB0, - 0x19, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xF9, 0xC0, 0x03, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xF9, 0x80, 0x01, 0xF8, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x80, 0x01, 0xF8, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x80, - 0x01, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xF9, 0xC0, 0x21, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xF9, 0xB1, 0x80, 0xEC, 0xC0, 0x1F, - 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x90, 0x00, 0xE4, - 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8C, - 0xC0, 0x7C, 0x04, 0x81, 0xFF, 0xFF, 0xFF, 0xFF, - 0xE3, 0x80, 0x00, 0x7C, 0x40, 0x11, 0xFF, 0xFF, - 0xFF, 0xFF, 0xE3, 0x80, 0x00, 0x7F, 0xD2, 0x29, - 0xFF, 0xFF, 0xFF, 0xFF, 0x87, 0x00, 0x00, 0x3F, - 0x80, 0x19, 0xFF, 0xFF, 0xFF, 0xFF, 0x0E, 0x00, - 0x00, 0x3F, 0x80, 0x19, 0xFF, 0xFF, 0xFF, 0xFF, - 0x1E, 0x00, 0x00, 0x1F, 0x80, 0x19, 0xFF, 0xFF, - 0xFF, 0xFE, 0x1C, 0x00, 0x00, 0x1E, 0x80, 0x19, - 0xFF, 0xFF, 0xFF, 0xFE, 0x3C, 0x00, 0x00, 0x1E, - 0x80, 0x11, 0xFF, 0xFF, 0xFF, 0xFC, 0x7C, 0x00, - 0x00, 0x0F, 0x80, 0x11, 0xFF, 0xFF, 0xFF, 0xFC, - 0xF8, 0x00, 0x00, 0x0E, 0x80, 0x11, 0xFF, 0xFF, - 0xFF, 0xFC, 0xF8, 0x00, 0x00, 0x06, 0x00, 0x11, - 0xFF, 0xFF, 0xFF, 0xF8, 0xF8, 0x00, 0x00, 0x06, - 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xF9, 0xF0, 0x00, - 0x00, 0x02, 0x00, 0x09, 0xFF, 0xFF, 0xFF, 0xF1, - 0xF0, 0x00, 0x00, 0x02, 0x80, 0x10, 0xFF, 0xFF, - 0xFF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x97, 0x10, - 0xFF, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x00, 0x00, - 0xDF, 0xF0, 0xFF, 0xFF, 0xFF, 0xE3, 0xC0, 0x00, - 0x00, 0x00, 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0xC7, - 0xC0, 0x00, 0x00, 0x01, 0xFF, 0xF8, 0xFF, 0xFF, - 0xFF, 0xC7, 0x80, 0x00, 0x00, 0x01, 0xFF, 0xF8, - 0xFF, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x00, 0x01, - 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0x8F, 0x80, 0x00, - 0x00, 0x01, 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0x9F, - 0x80, 0x00, 0x00, 0x01, 0xFF, 0xF8, 0xFF, 0xFF, - 0xFF, 0x9F, 0x80, 0x00, 0x00, 0x01, 0x80, 0x18, - 0xFF, 0xFF, 0xFF, 0x9E, 0x80, 0x00, 0x00, 0x03, - 0xA8, 0x11, 0xFF, 0xFF, 0xFF, 0x9F, 0x80, 0x00, - 0x00, 0x02, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0x99, - 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xFF, 0xFF, - 0xFF, 0x00, 0x80, 0x00, 0x00, 0x01, 0xC0, 0x01, - 0xFF, 0xFF, 0xFE, 0x20, 0x60, 0x00, 0x00, 0x00, - 0xFF, 0xC3, 0xFF, 0xFF, 0xF8, 0x00, 0x30, 0x00, - 0x00, 0x00, 0xFF, 0x0F, 0xFF, 0xFF, 0xC0, 0x40, - 0x38, 0x00, 0x00, 0x00, 0xFE, 0x47, 0xFF, 0xFF, - 0x81, 0x00, 0x1C, 0x00, 0x00, 0x00, 0xFC, 0x23, - 0xFF, 0xFF, 0x90, 0x00, 0x1E, 0x00, 0x00, 0x00, - 0x78, 0x11, 0xFF, 0xFF, 0x80, 0x00, 0x0F, 0x80, - 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, - 0x07, 0xC0, 0x00, 0x00, 0x00, 0x08, 0xFF, 0xFF, - 0xC0, 0x00, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x04, - 0x7F, 0xFF, 0x80, 0x00, 0x03, 0xC0, 0x00, 0x10, - 0x00, 0x00, 0x1F, 0xFF, 0x80, 0x00, 0x01, 0x80, - 0x00, 0x30, 0x00, 0x00, 0x0F, 0xFF, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x00, 0x01, 0x4F, 0xFF, - 0x80, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, - 0x0F, 0xFF, 0xC0, 0x00, 0x00, 0x80, 0x03, 0xF0, - 0x00, 0x00, 0x8F, 0xFF, 0x80, 0x00, 0x00, 0x40, - 0x0F, 0xF0, 0x00, 0x04, 0x1F, 0xFF, 0x80, 0x00, - 0x00, 0x7F, 0xFF, 0xF0, 0x00, 0x10, 0x1F, 0xFF, - 0xC0, 0x00, 0x00, 0x7F, 0xFF, 0xF0, 0x00, 0x40, - 0xFF, 0xFF, 0x98, 0x00, 0x00, 0xFF, 0xFF, 0xF0, - 0x00, 0x83, 0xFF, 0xFF, 0x81, 0xE0, 0x01, 0xFF, - 0xFF, 0xF8, 0x02, 0x07, 0xFF, 0xFF, 0x80, 0x3F, - 0x07, 0xE0, 0x00, 0x1C, 0x0C, 0x1F, 0xFF, 0xFF, - 0xF8, 0x03, 0xFF, 0x80, 0x00, 0x1F, 0x78, 0x1F, - 0xFF, 0xFF, 0xFF, 0x80, 0x7F, 0x00, 0x07, 0x0F, - 0xF0, 0x7F, 0xFF, 0xFF, 0xFF, 0xFE, 0x0C, 0x07, - 0xFF, 0x83, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0x1F, 0xFF, 0xC0, 0x03, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x07, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -}; - -/* Painted by Johnny Stenback */ - -unsigned char *linux_serial_image __initdata = "\n" -" .u$e.\n" -" .$$$$$:S\n" -" $\"*$/\"*$$\n" -" $.`$ . ^F\n" -" 4k+#+T.$F\n" -" 4P+++\"$\"$\n" -" :R\"+ t$$B\n" -" ___# $$$\n" -" | | R$$k\n" -" dd. | Linux $!$\n" -" ddd | Sparc $9$F\n" -" '!!!!!$ !!#!`\n" -" !!!!!* .!!!!!`\n" -"'!!!!!!!W..e$$!!!!!!` %s\n" -" \"~^^~ ^~~^\n" -"\n"; diff --git a/include/asm-sparc/processor.h b/include/asm-sparc/processor.h index e06e1e03c4d7..d3ddb74e38a8 100644 --- a/include/asm-sparc/processor.h +++ b/include/asm-sparc/processor.h @@ -1,4 +1,4 @@ -/* $Id: processor.h,v 1.57 1997/03/04 16:27:22 jj Exp $ +/* $Id: processor.h,v 1.58 1997/04/25 03:13:16 davem Exp $ * include/asm-sparc/processor.h * * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu) @@ -83,7 +83,7 @@ struct thread_struct { #define SPARC_FLAG_UNALIGNED 0x2 /* is allowed to do unaligned accesses */ #define INIT_MMAP { &init_mm, (0), (0), \ - __pgprot(0x0) , VM_READ | VM_WRITE | VM_EXEC } + __pgprot(0x0) , VM_READ | VM_WRITE | VM_EXEC, NULL, &init_mm.mmap } #define INIT_TSS { \ /* uwinmask, kregs, sig_address, sig_desc, ksp, kpc, kpsr, kwim */ \ diff --git a/include/asm-sparc/termbits.h b/include/asm-sparc/termbits.h index 7a69583407ed..1e4ed5e506c0 100644 --- a/include/asm-sparc/termbits.h +++ b/include/asm-sparc/termbits.h @@ -146,7 +146,13 @@ struct termios { #define HUPCL 0x00000400 #define CLOCAL 0x00000800 #define CBAUDEX 0x00001000 -#define B76800 0x00001001 +/* We'll never see these speeds with the Zilogs, but for completeness... */ +#define B57600 0x00001001 +#define B115200 0x00001002 +#define B230400 0x00001003 +#define B460800 0x00001004 +/* This is what we can do with the Zilogs. */ +#define B76800 0x00001005 #define CIBAUD 0x100f0000 /* input baud rate (not used) */ #define CMSPAR 0x40000000 /* mark or space (stick) parity */ #define CRTSCTS 0x80000000 /* flow control */ diff --git a/include/asm-sparc64/fs_mount.h b/include/asm-sparc64/fs_mount.h new file mode 100644 index 000000000000..3ad7ad69880f --- /dev/null +++ b/include/asm-sparc64/fs_mount.h @@ -0,0 +1,44 @@ +/* $Id: fs_mount.h,v 1.2 1997/04/18 14:34:46 jj Exp $ + * fs_mount.h: Definitions for mount structure conversions. + * + * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) + */ + +#ifndef __ASM_FS_MOUNT_H +#define __ASM_FS_MOUNT_H + +#if defined(CONFIG_SPARC32_COMPAT) || defined(CONFIG_SPARC32_COMPAT_MODULE) + +#include + +/* We need this to convert 32bit mount structures to 64bit */ + +extern void *do_ncp_super_data_conv(void *raw_data); +extern void *do_smb_super_data_conv(void *raw_data); + +extern __inline__ void *ncp_super_data_conv(void *raw_data) +{ + if (current->tss.flags & SPARC_FLAG_32BIT) + return do_ncp_super_data_conv(raw_data); + else + return raw_data; +} + +extern __inline__ void *smb_super_data_conv(void *raw_data) +{ + if (current->tss.flags & SPARC_FLAG_32BIT) + return do_smb_super_data_conv(raw_data); + else + return raw_data; +} + +#else /* CONFIG_SPARC32_COMPAT* */ + +#define ncp_super_data_conv(__x) __x +#define smb_super_data_conv(__x) __x + +#endif /* CONFIG_SPARC32_COMPAT* */ + +#define nfs_super_data_conv(__x) __x + +#endif /* __ASM_FS_MOUNT_H */ diff --git a/include/asm-sparc64/linux_logo.h b/include/asm-sparc64/linux_logo.h index 7787fb059704..35254c6a3552 100644 --- a/include/asm-sparc64/linux_logo.h +++ b/include/asm-sparc64/linux_logo.h @@ -1040,1045 +1040,3 @@ unsigned char *linux_serial_image __initdata = "\n" "'!!!!!!!W..e$$!!!!!!` %s\n" " \"~^^~ ^~~^\n" "\n"; -/* $Id: linux_logo.h,v 1.1 1997/04/16 17:51:37 jj Exp $ - * include/asm-sparc64/linux_logo.h: This is a linux logo - * to be displayed on boot. - * - * Copyright (C) 1996 Larry Ewing (lewing@isc.tamu.edu) - * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) - * - * You can put anything here, but: - * LINUX_LOGO_COLORS has to be less than 224 - * image size has to be 80x80 - * values have to start from 0x20 - * (i.e. RGB(linux_logo_red[0], - * linux_logo_green[0], - * linux_logo_blue[0]) is color 0x20) - * BW image has to be 80x80 as well, with MS bit - * on the left - * Serial_console ascii image can be any size, - * but should contain %s to display the version - */ - -#include -#include - -#define linux_logo_banner "Linux/UltraSPARC version " UTS_RELEASE - -#define LINUX_LOGO_COLORS 215 - -unsigned char linux_logo_red[] __initdata = { - 0x99, 0x95, 0x92, 0x8E, 0x8A, 0x86, 0x02, 0x00, - 0xA5, 0xA9, 0xA2, 0x9E, 0xAD, 0x1B, 0x3B, 0x25, - 0x71, 0x65, 0x2C, 0x82, 0x5B, 0x33, 0x13, 0xB0, - 0x0C, 0xB1, 0xD4, 0xCE, 0x04, 0x06, 0x16, 0xB6, - 0xCD, 0xB2, 0x42, 0x46, 0x4B, 0xA8, 0xF3, 0xCA, - 0xC5, 0x1C, 0xDC, 0xA0, 0xD4, 0xE6, 0xED, 0xF3, - 0xC2, 0x8E, 0xCC, 0xA5, 0x7E, 0x52, 0xF7, 0xE3, - 0x56, 0x79, 0x68, 0x8D, 0xAF, 0xFC, 0x8E, 0x3E, - 0x6B, 0x11, 0x37, 0x79, 0x5C, 0x3C, 0x3F, 0x3C, - 0x48, 0x47, 0x3D, 0xB9, 0x62, 0xE1, 0x4D, 0x57, - 0x84, 0x78, 0xA6, 0x58, 0x99, 0xCD, 0xB7, 0xE3, - 0x6D, 0x5A, 0xAF, 0x79, 0x79, 0xF2, 0x42, 0x46, - 0xDD, 0x89, 0xC3, 0xF2, 0xF0, 0xE0, 0xD1, 0x90, - 0x76, 0x6B, 0x4A, 0xBE, 0xBD, 0xE3, 0xF6, 0xE9, - 0xEC, 0xE8, 0xEC, 0xC0, 0x66, 0x63, 0xCB, 0xAB, - 0x49, 0x5C, 0xAD, 0xD6, 0xEE, 0xF5, 0xF5, 0xE9, - 0x6E, 0x00, 0x69, 0x6A, 0xA1, 0x7A, 0xB4, 0xDE, - 0xF1, 0xF6, 0xDD, 0x00, 0x73, 0xDB, 0x4C, 0x53, - 0x6A, 0xF5, 0xF5, 0xD6, 0xC3, 0x6A, 0x4B, 0x4B, - 0x60, 0xF8, 0x9B, 0xD7, 0xD7, 0x71, 0xB3, 0xA4, - 0xCA, 0xAB, 0xB4, 0xB2, 0x76, 0xBA, 0x8B, 0xA0, - 0xA5, 0xEE, 0xE7, 0x67, 0x5F, 0x08, 0x94, 0xDB, - 0xE5, 0x4F, 0x00, 0x34, 0xEE, 0xEC, 0xE2, 0x48, - 0xF3, 0xEB, 0xF4, 0xF4, 0xEF, 0xD6, 0xB6, 0xE6, - 0xE6, 0xED, 0xE7, 0xE6, 0x3D, 0xE7, 0xCD, 0x44, - 0xEF, 0xEC, 0xF5, 0x66, 0xF3, 0xA9, 0x77, 0x58, - 0x75, 0x6C, 0x53, 0x24, 0xAC, 0x0D, 0x3C -}; - -unsigned char linux_logo_green[] __initdata = { - 0x99, 0x95, 0x92, 0x8E, 0x8A, 0x86, 0x02, 0x00, - 0xA5, 0xA9, 0xA2, 0x9E, 0xAD, 0x1B, 0x3B, 0x25, - 0x71, 0x65, 0x2C, 0x82, 0x5B, 0x33, 0x13, 0xAD, - 0x0C, 0xB1, 0x92, 0xAB, 0x03, 0x06, 0x16, 0xB6, - 0xCD, 0x88, 0x42, 0x46, 0x4B, 0x94, 0xBB, 0xCA, - 0xC5, 0x1C, 0xAB, 0xA0, 0xD4, 0xE6, 0xED, 0xF3, - 0xC2, 0x73, 0xCA, 0x91, 0x7E, 0x52, 0xF7, 0xE3, - 0x56, 0x5A, 0x49, 0x56, 0x6E, 0xFC, 0x6B, 0x3E, - 0x6B, 0x0D, 0x37, 0x79, 0x51, 0x44, 0x3F, 0x43, - 0x38, 0x3D, 0x48, 0xB9, 0x62, 0xA5, 0x47, 0x48, - 0x49, 0x4A, 0x97, 0x48, 0x81, 0x95, 0x8E, 0xE3, - 0x6D, 0x57, 0x51, 0x51, 0x47, 0xB2, 0x42, 0x46, - 0xDD, 0x5B, 0x87, 0xBE, 0xC7, 0xC8, 0x56, 0x75, - 0x5D, 0x4B, 0x4D, 0xBE, 0x85, 0xA6, 0xBC, 0xC7, - 0xCA, 0xCD, 0xCC, 0xA4, 0x53, 0x4D, 0x9F, 0x55, - 0x52, 0x5E, 0x75, 0x9C, 0xB6, 0xC3, 0xD7, 0xCC, - 0x55, 0x00, 0x6A, 0x59, 0x7D, 0x55, 0x7C, 0xA3, - 0xB7, 0xBF, 0xA5, 0x00, 0x67, 0xC6, 0x47, 0x54, - 0x46, 0xB8, 0xBE, 0xB2, 0x87, 0x52, 0x4B, 0x43, - 0x41, 0xF8, 0x69, 0x96, 0x9B, 0x66, 0xB0, 0x6C, - 0x8E, 0x81, 0xB4, 0x76, 0x76, 0xB9, 0x65, 0x77, - 0x6D, 0xED, 0xE7, 0x67, 0x5F, 0x06, 0x54, 0x6C, - 0xCB, 0x4F, 0x00, 0x2F, 0xC2, 0xB5, 0xB6, 0x30, - 0xC3, 0xAE, 0xC4, 0xCA, 0xC6, 0xB4, 0x7B, 0xAD, - 0xAD, 0xB6, 0xB6, 0xAD, 0x29, 0xAB, 0x93, 0x2E, - 0xBC, 0xBC, 0xC9, 0x53, 0xBF, 0x77, 0x54, 0x3B, - 0x4B, 0x3F, 0x39, 0x19, 0x76, 0x08, 0x2C -}; - -unsigned char linux_logo_blue[] __initdata = { - 0x99, 0x95, 0x92, 0x8E, 0x8A, 0x86, 0xD6, 0x00, - 0xA5, 0xA9, 0xA2, 0x9E, 0xAD, 0x1B, 0x39, 0x25, - 0x71, 0x65, 0x2C, 0x82, 0x5B, 0x33, 0x13, 0xA7, - 0x0C, 0xB1, 0x58, 0x8A, 0x03, 0x07, 0x16, 0xB6, - 0xCD, 0x5A, 0x42, 0x46, 0x4F, 0x6F, 0x77, 0xCA, - 0xC5, 0x1C, 0x6F, 0xA5, 0xD4, 0xE6, 0xF5, 0xF3, - 0xC2, 0x4D, 0xD1, 0x64, 0x7E, 0x52, 0xF7, 0xE3, - 0x56, 0x49, 0x3C, 0x47, 0x45, 0xFE, 0x3B, 0x41, - 0x6B, 0x09, 0x37, 0x79, 0x39, 0x39, 0x3F, 0x42, - 0x3A, 0x42, 0x5F, 0xB9, 0x62, 0x4C, 0x39, 0x44, - 0x3B, 0x3A, 0xA0, 0x3D, 0x08, 0x08, 0x09, 0xDE, - 0x6D, 0x48, 0x3B, 0x3F, 0x42, 0xF3, 0x36, 0x3C, - 0xDD, 0x06, 0x16, 0x08, 0x13, 0x0A, 0x4B, 0x71, - 0x5D, 0x44, 0x47, 0xBE, 0x08, 0x0C, 0x0D, 0x0C, - 0x19, 0x29, 0x36, 0x06, 0x43, 0x44, 0xBA, 0x45, - 0x50, 0x58, 0x07, 0x07, 0x0D, 0x0E, 0x10, 0x50, - 0x06, 0x42, 0x40, 0x44, 0x79, 0x06, 0x06, 0x0C, - 0x08, 0x08, 0x07, 0x36, 0x4C, 0xE5, 0x42, 0x55, - 0x03, 0x0F, 0x12, 0x06, 0x07, 0x3C, 0x4B, 0x3D, - 0x01, 0xF8, 0x08, 0x0E, 0x0A, 0x69, 0xAC, 0x0C, - 0x0A, 0x27, 0xBB, 0x36, 0x76, 0xC0, 0x04, 0x08, - 0x08, 0xED, 0xEE, 0x68, 0x5F, 0xB2, 0x3B, 0x52, - 0xAC, 0x4F, 0x6F, 0x2D, 0x16, 0x08, 0x59, 0x04, - 0x13, 0x0E, 0x14, 0x17, 0x16, 0x2E, 0x08, 0x0D, - 0x11, 0x14, 0x0D, 0x06, 0x04, 0x08, 0x25, 0x8E, - 0x0E, 0x14, 0x25, 0x9B, 0x1C, 0x16, 0x78, 0x06, - 0x04, 0x03, 0x79, 0x8C, 0x0B, 0xC8, 0x48 -}; - -unsigned char linux_logo[] __initdata = { - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x21, 0x21, 0x22, 0x23, 0x24, 0x24, - 0x25, 0x24, 0x24, 0x25, 0x25, 0x25, 0x25, 0x25, - 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x23, 0x23, - 0x23, 0x22, 0x22, 0x22, 0x22, 0x21, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x26, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x26, 0x28, - 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, - 0x29, 0x28, 0x28, 0x28, 0x2A, 0x2A, 0x2B, 0x2B, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x2B, 0x2B, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x28, 0x28, 0x28, 0x29, 0x29, 0x29, 0x29, 0x29, - 0x29, 0x29, 0x29, 0x2C, 0x29, 0x29, 0x29, 0x28, - 0x28, 0x2A, 0x2B, 0x2B, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x2B, 0x2B, 0x2A, 0x2A, - 0x2A, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x2D, 0x2E, 0x2F, 0x27, - 0x27, 0x26, 0x2B, 0x2A, 0x2A, 0x2A, 0x2A, 0x28, - 0x28, 0x29, 0x29, 0x29, 0x29, 0x2C, 0x2C, 0x29, - 0x29, 0x29, 0x28, 0x28, 0x2A, 0x2B, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x2B, 0x2B, 0x2B, 0x2A, 0x2A, 0x2A, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x2F, 0x30, 0x31, 0x32, - 0x27, 0x27, 0x22, 0x22, 0x22, 0x22, 0x21, 0x20, - 0x20, 0x20, 0x2B, 0x2A, 0x28, 0x29, 0x29, 0x29, - 0x2C, 0x2C, 0x2C, 0x29, 0x29, 0x28, 0x2A, 0x2B, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x2B, 0x2B, 0x2A, 0x2A, 0x2A, 0x2A, 0x2B, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x32, 0x33, 0x34, 0x35, - 0x36, 0x27, 0x27, 0x33, 0x25, 0x25, 0x24, 0x24, - 0x24, 0x24, 0x23, 0x21, 0x20, 0x20, 0x2B, 0x2A, - 0x28, 0x29, 0x29, 0x37, 0x2C, 0x2C, 0x29, 0x28, - 0x2A, 0x2B, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2B, 0x2B, - 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2A, 0x2B, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x2F, 0x32, 0x36, 0x27, - 0x27, 0x27, 0x27, 0x33, 0x33, 0x33, 0x33, 0x33, - 0x33, 0x33, 0x33, 0x25, 0x25, 0x24, 0x23, 0x21, - 0x20, 0x2B, 0x2A, 0x29, 0x29, 0x2C, 0x2C, 0x2C, - 0x29, 0x28, 0x2A, 0x2B, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2B, 0x2B, - 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x20, 0x21, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x38, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x23, 0x23, 0x24, 0x24, - 0x25, 0x25, 0x33, 0x33, 0x33, 0x33, 0x33, 0x25, - 0x24, 0x22, 0x20, 0x20, 0x2A, 0x28, 0x29, 0x2C, - 0x2C, 0x2C, 0x29, 0x28, 0x2A, 0x2B, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x2B, 0x2B, 0x2B, 0x2B, - 0x2B, 0x2B, 0x2B, 0x20, 0x21, 0x22, 0x23, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x2A, 0x2A, 0x2B, 0x2B, - 0x20, 0x21, 0x22, 0x24, 0x20, 0x39, 0x39, 0x39, - 0x39, 0x39, 0x3A, 0x3B, 0x22, 0x20, 0x2A, 0x28, - 0x29, 0x2C, 0x2C, 0x2C, 0x29, 0x28, 0x2B, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, - 0x2B, 0x20, 0x21, 0x22, 0x22, 0x23, 0x24, 0x27, - 0x27, 0x27, 0x3C, 0x36, 0x3C, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0x3D, 0x3E, 0x32, 0x27, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x3D, 0x39, 0x3F, 0x3F, - 0x39, 0x2C, 0x20, 0x20, 0x39, 0x39, 0x39, 0x39, - 0x39, 0x39, 0x39, 0x40, 0x40, 0x41, 0x22, 0x20, - 0x2A, 0x28, 0x2C, 0x2C, 0x2C, 0x29, 0x29, 0x2A, - 0x2B, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x2B, 0x2B, 0x2B, 0x2B, 0x20, 0x20, - 0x21, 0x22, 0x22, 0x22, 0x23, 0x23, 0x22, 0x27, - 0x27, 0x3C, 0x3C, 0x3D, 0x42, 0x3C, 0x27, 0x27, - 0x3C, 0x27, 0x3C, 0x43, 0x44, 0x36, 0x42, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x3D, 0x28, 0x29, 0x2C, - 0x2C, 0x45, 0x20, 0x39, 0x39, 0x39, 0x39, 0x39, - 0x39, 0x46, 0x40, 0x47, 0x40, 0x47, 0x3A, 0x40, - 0x22, 0x20, 0x2A, 0x29, 0x2C, 0x2C, 0x2C, 0x29, - 0x28, 0x2B, 0x2B, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x2B, 0x2B, 0x2B, 0x2B, 0x20, 0x20, 0x22, - 0x22, 0x22, 0x23, 0x22, 0x22, 0x21, 0x20, 0x27, - 0x27, 0x44, 0x28, 0x24, 0x27, 0x2F, 0x3C, 0x27, - 0x27, 0x38, 0x24, 0x2C, 0x2C, 0x48, 0x49, 0x36, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x28, 0x29, 0x29, - 0x4A, 0x20, 0x3A, 0x40, 0x47, 0x40, 0x47, 0x40, - 0x40, 0x47, 0x40, 0x40, 0x39, 0x39, 0x39, 0x4A, - 0x25, 0x24, 0x22, 0x2B, 0x28, 0x29, 0x2C, 0x2C, - 0x29, 0x28, 0x2A, 0x2B, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x2B, 0x2B, 0x20, 0x20, 0x20, 0x21, 0x22, 0x22, - 0x22, 0x22, 0x22, 0x21, 0x20, 0x2B, 0x2A, 0x27, - 0x3D, 0x4B, 0x48, 0x4C, 0x2B, 0x3C, 0x27, 0x3C, - 0x3C, 0x23, 0x4D, 0x4E, 0x4F, 0x50, 0x33, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x39, 0x3F, 0x39, - 0x51, 0x20, 0x39, 0x39, 0x47, 0x40, 0x4D, 0x4D, - 0x40, 0x52, 0x4D, 0x40, 0x47, 0x40, 0x39, 0x39, - 0x53, 0x54, 0x25, 0x24, 0x20, 0x2A, 0x29, 0x2C, - 0x2C, 0x2C, 0x29, 0x2A, 0x2B, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x21, 0x21, 0x22, 0x22, - 0x22, 0x21, 0x20, 0x2B, 0x28, 0x2A, 0x20, 0x27, - 0x36, 0x4F, 0x55, 0x48, 0x56, 0x3D, 0x3C, 0x3C, - 0x32, 0x57, 0x56, 0x58, 0x49, 0x56, 0x56, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x22, 0x20, 0x20, - 0x41, 0x39, 0x39, 0x3A, 0x59, 0x5A, 0x59, 0x5B, - 0x5C, 0x3A, 0x4D, 0x5D, 0x57, 0x39, 0x39, 0x4A, - 0x5E, 0x33, 0x54, 0x33, 0x24, 0x22, 0x2B, 0x28, - 0x2C, 0x2C, 0x2C, 0x29, 0x28, 0x2B, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x21, 0x21, 0x21, 0x22, 0x22, 0x21, - 0x20, 0x2B, 0x2A, 0x2A, 0x20, 0x22, 0x22, 0x27, - 0x5F, 0x2D, 0x3C, 0x60, 0x56, 0x54, 0x61, 0x49, - 0x35, 0x56, 0x34, 0x27, 0x62, 0x27, 0x56, 0x39, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x30, 0x63, 0x54, - 0x40, 0x64, 0x65, 0x66, 0x67, 0x67, 0x68, 0x5F, - 0x2E, 0x69, 0x6A, 0x67, 0x5F, 0x3A, 0x39, 0x2C, - 0x53, 0x23, 0x25, 0x54, 0x33, 0x25, 0x23, 0x20, - 0x2A, 0x29, 0x2C, 0x2C, 0x29, 0x28, 0x2B, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x21, 0x21, 0x21, 0x21, 0x21, 0x20, 0x20, - 0x2B, 0x2A, 0x20, 0x22, 0x22, 0x21, 0x2B, 0x27, - 0x62, 0x36, 0x27, 0x33, 0x6B, 0x54, 0x3D, 0x3C, - 0x49, 0x57, 0x27, 0x27, 0x27, 0x27, 0x56, 0x57, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x6C, 0x31, 0x6D, - 0x64, 0x51, 0x6E, 0x2E, 0x2E, 0x6F, 0x5A, 0x70, - 0x70, 0x71, 0x72, 0x67, 0x67, 0x69, 0x73, 0x46, - 0x4A, 0x2A, 0x21, 0x25, 0x33, 0x54, 0x33, 0x24, - 0x20, 0x2A, 0x29, 0x2C, 0x2C, 0x29, 0x28, 0x2B, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x21, 0x21, 0x21, 0x21, 0x20, 0x20, 0x2B, - 0x2B, 0x22, 0x22, 0x22, 0x2B, 0x28, 0x2A, 0x27, - 0x27, 0x39, 0x3C, 0x3D, 0x45, 0x74, 0x75, 0x76, - 0x76, 0x45, 0x27, 0x27, 0x27, 0x27, 0x56, 0x77, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x78, 0x78, 0x5E, - 0x79, 0x7A, 0x7B, 0x6E, 0x5A, 0x5A, 0x70, 0x7C, - 0x70, 0x5B, 0x7D, 0x5A, 0x66, 0x7E, 0x7F, 0x79, - 0x48, 0x6B, 0x2C, 0x20, 0x24, 0x33, 0x54, 0x33, - 0x24, 0x21, 0x2A, 0x29, 0x2C, 0x2C, 0x29, 0x28, - 0x21, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x21, 0x21, 0x21, 0x20, 0x20, 0x2B, 0x2B, 0x21, - 0x22, 0x22, 0x20, 0x28, 0x2B, 0x20, 0x22, 0x27, - 0x27, 0x80, 0x27, 0x81, 0x82, 0x83, 0x84, 0x85, - 0x74, 0x85, 0x84, 0x27, 0x3C, 0x4F, 0x4F, 0x66, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x22, 0x23, 0x5E, - 0x64, 0x86, 0x79, 0x73, 0x87, 0x88, 0x7C, 0x5A, - 0x5A, 0x71, 0x7D, 0x71, 0x89, 0x79, 0x8A, 0x8A, - 0x51, 0x8B, 0x48, 0x39, 0x2A, 0x22, 0x33, 0x54, - 0x33, 0x25, 0x22, 0x2B, 0x29, 0x2C, 0x2C, 0x29, - 0x21, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x21, 0x21, 0x20, 0x20, 0x2B, 0x2B, 0x22, 0x23, - 0x21, 0x2A, 0x2A, 0x20, 0x21, 0x23, 0x25, 0x27, - 0x27, 0x55, 0x8C, 0x8D, 0x8E, 0x83, 0x8F, 0x90, - 0x91, 0x92, 0x92, 0x85, 0x85, 0x93, 0x51, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x2A, 0x29, 0x51, - 0x79, 0x79, 0x94, 0x89, 0x89, 0x89, 0x5A, 0x95, - 0x64, 0x88, 0x96, 0x97, 0x7A, 0x73, 0x98, 0x98, - 0x99, 0x50, 0x50, 0x48, 0x6B, 0x28, 0x21, 0x25, - 0x54, 0x54, 0x25, 0x22, 0x2B, 0x29, 0x2C, 0x29, - 0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x2B, 0x20, 0x22, 0x22, 0x20, - 0x2B, 0x2B, 0x20, 0x22, 0x24, 0x25, 0x33, 0x27, - 0x27, 0x9A, 0x9B, 0x9C, 0x9D, 0x83, 0x9E, 0x85, - 0x9F, 0x92, 0x85, 0x85, 0x85, 0x85, 0x92, 0xA0, - 0x27, 0x27, 0x27, 0x27, 0x27, 0xA1, 0x47, 0xA2, - 0xA2, 0x94, 0xA3, 0x94, 0x95, 0x95, 0x73, 0x73, - 0x95, 0x87, 0xA4, 0x5B, 0x97, 0x7B, 0x88, 0x98, - 0xA2, 0x50, 0x48, 0x48, 0x48, 0x8B, 0x29, 0x20, - 0x25, 0x54, 0x54, 0x25, 0x22, 0x2B, 0x29, 0x29, - 0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x21, 0x22, 0x22, 0x2B, 0x2B, - 0x20, 0x21, 0x23, 0x24, 0x25, 0x25, 0x33, 0x27, - 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0x8F, 0x90, 0x90, - 0x9F, 0x90, 0x85, 0x90, 0x85, 0x74, 0xAA, 0x81, - 0x27, 0x27, 0x27, 0x27, 0x27, 0xAB, 0x40, 0xAC, - 0x79, 0xA3, 0x89, 0xAD, 0x95, 0x6F, 0xAE, 0xAE, - 0xAE, 0x5B, 0x59, 0x88, 0x7B, 0x89, 0x79, 0xAF, - 0xA2, 0x6B, 0x48, 0x48, 0x48, 0x48, 0x50, 0x2C, - 0x20, 0x24, 0x33, 0x54, 0x25, 0x22, 0x2A, 0x2A, - 0x21, 0x21, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x21, 0x23, 0x22, 0x2B, 0x20, 0x20, - 0x22, 0x23, 0x24, 0x25, 0x24, 0x24, 0x22, 0x27, - 0xB0, 0x8C, 0xAA, 0xB1, 0xB2, 0x84, 0x85, 0x9F, - 0x85, 0x85, 0x85, 0xB3, 0xB4, 0xAA, 0xAA, 0xA0, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x2A, 0xB5, - 0xA3, 0xA3, 0xAC, 0x5D, 0xB6, 0xAE, 0xB7, 0x69, - 0x73, 0x5B, 0x88, 0x89, 0x95, 0x73, 0x99, 0x99, - 0x59, 0x2A, 0x39, 0x48, 0x48, 0x50, 0x48, 0x50, - 0x2C, 0x20, 0x24, 0x33, 0x54, 0x25, 0x21, 0x20, - 0x21, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x21, 0x23, 0x21, 0x2B, 0x20, 0x20, 0x22, - 0x22, 0x24, 0x24, 0x23, 0x22, 0x20, 0x2A, 0x27, - 0x27, 0xB0, 0x8C, 0xA9, 0xB2, 0x9E, 0x91, 0x85, - 0x85, 0x93, 0xB8, 0x75, 0xAA, 0xA7, 0x8C, 0x27, - 0x27, 0x27, 0x33, 0x3C, 0x27, 0x27, 0x2C, 0x7B, - 0x55, 0x79, 0xA3, 0x5D, 0xB9, 0x43, 0x7F, 0x7E, - 0x5F, 0x5A, 0x5A, 0x95, 0x64, 0x73, 0x58, 0x64, - 0x5C, 0x25, 0x2B, 0x3F, 0x48, 0x48, 0x8B, 0x48, - 0x48, 0x2C, 0x20, 0x25, 0x54, 0x33, 0x24, 0x22, - 0x2B, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x21, 0x23, 0x21, 0x20, 0x20, 0x20, 0x21, 0x22, - 0x24, 0x23, 0x22, 0x21, 0x2B, 0x20, 0x54, 0x27, - 0x27, 0x8B, 0x81, 0xA5, 0x93, 0x93, 0x74, 0xA5, - 0xBA, 0x75, 0xBB, 0xBC, 0xB4, 0x6D, 0x50, 0x6B, - 0x27, 0x27, 0x30, 0x33, 0x49, 0x27, 0x27, 0x5E, - 0x6F, 0x73, 0x94, 0xBD, 0x4E, 0x5D, 0x7F, 0x7F, - 0xB7, 0x68, 0x73, 0x6E, 0xB7, 0x7F, 0x95, 0x97, - 0x47, 0x63, 0x25, 0x20, 0x3F, 0x48, 0x8B, 0x8B, - 0x48, 0x48, 0x2C, 0x20, 0x25, 0x54, 0x33, 0x25, - 0x2B, 0x2B, 0x2B, 0x20, 0x20, 0x20, 0x21, 0x21, - 0x23, 0x21, 0x20, 0x20, 0x20, 0x20, 0x24, 0x24, - 0x22, 0x21, 0x20, 0x2A, 0x33, 0x30, 0x30, 0x27, - 0x27, 0x50, 0xBE, 0xBF, 0x9A, 0xB3, 0x9B, 0xBB, - 0xBB, 0xC0, 0x8C, 0xC1, 0x8B, 0xC2, 0x47, 0x8B, - 0x27, 0x27, 0x38, 0x63, 0x63, 0x27, 0x27, 0xC3, - 0xB5, 0x95, 0x72, 0x95, 0x6F, 0x69, 0x7E, 0x66, - 0x7E, 0x7F, 0x6E, 0x7E, 0x95, 0x95, 0x73, 0x70, - 0x30, 0x30, 0x30, 0x33, 0x20, 0x3F, 0x48, 0x8B, - 0x6B, 0x48, 0x50, 0x29, 0x21, 0x33, 0x54, 0x33, - 0x2A, 0x2B, 0x2B, 0x20, 0x20, 0x21, 0x21, 0x23, - 0x21, 0x20, 0x20, 0x20, 0x20, 0x24, 0x24, 0x22, - 0x20, 0x2B, 0x21, 0xC4, 0x30, 0x60, 0x30, 0x27, - 0x27, 0xC5, 0x8B, 0x39, 0xC6, 0xC7, 0xA6, 0xA6, - 0xC8, 0x9A, 0x3B, 0x39, 0x50, 0x56, 0x56, 0x4F, - 0x33, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x48, - 0x59, 0x94, 0x73, 0xAE, 0xB7, 0xB7, 0x7E, 0x7E, - 0x7E, 0x7E, 0x7E, 0x5A, 0x70, 0x7C, 0x71, 0xC3, - 0x63, 0x30, 0x60, 0x78, 0x54, 0x20, 0x6B, 0x48, - 0x6B, 0x6B, 0x50, 0x50, 0x29, 0x22, 0x33, 0x33, - 0x2A, 0x2B, 0x20, 0x20, 0x21, 0x22, 0x22, 0x22, - 0x21, 0x20, 0x20, 0x20, 0x24, 0x24, 0x20, 0x20, - 0x2B, 0x24, 0x30, 0x60, 0x60, 0x30, 0xAB, 0x27, - 0x27, 0x40, 0x4C, 0x50, 0x39, 0x87, 0xC3, 0x53, - 0x37, 0x48, 0x37, 0x48, 0xC9, 0x56, 0xB9, 0x56, - 0xCA, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x3C, - 0x51, 0x5A, 0x6E, 0xB7, 0xB7, 0x7E, 0x7E, 0x7E, - 0x7E, 0x7E, 0x7F, 0xB7, 0x5A, 0x7C, 0x5B, 0x37, - 0x23, 0x63, 0x31, 0x6C, 0xCB, 0x63, 0x20, 0x6B, - 0x50, 0x3F, 0x39, 0x50, 0x8B, 0x28, 0x24, 0x24, - 0x2B, 0x2B, 0x20, 0x21, 0x22, 0x22, 0x22, 0x21, - 0x20, 0x20, 0x20, 0x23, 0x23, 0x20, 0x20, 0x2B, - 0x33, 0x78, 0xCB, 0x60, 0x30, 0x22, 0x3D, 0x27, - 0x2F, 0x56, 0x4E, 0x8B, 0x6B, 0x39, 0x48, 0x8B, - 0x6B, 0x8B, 0x80, 0xC9, 0xB9, 0xB9, 0x56, 0xB9, - 0x56, 0x34, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x48, 0xB5, 0xB7, 0xB7, 0x7E, 0x7E, 0x2E, 0x7E, - 0x7E, 0x7E, 0x7F, 0x7C, 0x65, 0x71, 0x3A, 0x48, - 0x2C, 0x24, 0x30, 0x6C, 0x34, 0x6C, 0xC4, 0x20, - 0x8B, 0x50, 0x39, 0x39, 0x48, 0x6B, 0x2B, 0x22, - 0x2B, 0x20, 0x21, 0x22, 0x23, 0x23, 0x22, 0x21, - 0x20, 0x2B, 0x23, 0x22, 0x20, 0x2B, 0x2B, 0x54, - 0x60, 0x31, 0xCB, 0x54, 0x20, 0x3D, 0x36, 0x27, - 0x4E, 0xB9, 0x56, 0x56, 0x8B, 0x6B, 0x50, 0x6B, - 0x40, 0x56, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, - 0x56, 0x56, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x7B, 0x6E, 0xB7, 0xB7, 0xB7, 0x7E, 0x7F, - 0xB7, 0xB7, 0x7F, 0x7E, 0x6F, 0x5B, 0x29, 0x2C, - 0x48, 0x39, 0x24, 0x60, 0x58, 0xAF, 0xCC, 0x63, - 0x20, 0x8B, 0x8B, 0x39, 0x39, 0x48, 0x3F, 0x28, - 0x20, 0x20, 0x22, 0x23, 0x23, 0x23, 0x22, 0x20, - 0x2B, 0x22, 0x22, 0x2B, 0x2B, 0x20, 0x54, 0xCB, - 0x31, 0xCB, 0x25, 0x20, 0x27, 0x27, 0x27, 0x48, - 0xB9, 0x56, 0xB9, 0x56, 0x4F, 0x48, 0x47, 0x57, - 0x56, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, - 0xB9, 0x56, 0x62, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x48, 0x6F, 0x69, 0xB7, 0xB7, 0xB7, 0x7F, - 0xB7, 0xB7, 0xB7, 0x73, 0x59, 0x50, 0x29, 0x2B, - 0x28, 0x8B, 0x39, 0x25, 0x31, 0x55, 0xB6, 0x34, - 0x63, 0x2B, 0x48, 0x6B, 0x2C, 0x39, 0x47, 0x6B, - 0x22, 0x22, 0x23, 0x24, 0x23, 0x22, 0x20, 0x2B, - 0x20, 0x22, 0x2A, 0x2B, 0x20, 0x33, 0xCB, 0x31, - 0x78, 0x24, 0x21, 0xCD, 0x27, 0x27, 0x27, 0x56, - 0x56, 0xB9, 0x56, 0xB9, 0x56, 0x56, 0x56, 0xB9, - 0x56, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, - 0xB9, 0x56, 0xC9, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x41, 0x64, 0xB7, 0xB7, 0xB7, 0x7F, - 0x68, 0xB7, 0xAE, 0xA3, 0x23, 0x39, 0x8B, 0x2A, - 0x20, 0x20, 0x39, 0x6B, 0x25, 0xCC, 0x43, 0x43, - 0x34, 0x63, 0x2A, 0x48, 0x3F, 0x39, 0x6B, 0x6B, - 0x24, 0x23, 0x24, 0x24, 0x23, 0x21, 0x2B, 0x2B, - 0x22, 0x2B, 0x2B, 0x20, 0x24, 0x78, 0x31, 0x30, - 0x23, 0x21, 0x21, 0x27, 0x27, 0x27, 0x80, 0x56, - 0x56, 0xB9, 0x56, 0xB9, 0x56, 0xB9, 0x56, 0xB9, - 0x56, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, - 0x56, 0xB9, 0x56, 0x3C, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0xCE, 0x8A, 0xAE, 0x6F, 0xB7, - 0x6F, 0x89, 0x71, 0x78, 0x63, 0x23, 0x39, 0x6B, - 0x2B, 0x20, 0x20, 0x2C, 0x6B, 0x25, 0x34, 0x42, - 0x42, 0x34, 0x54, 0x29, 0x48, 0x3F, 0x39, 0x3F, - 0x25, 0x24, 0x25, 0x24, 0x22, 0x20, 0x2A, 0x21, - 0x2B, 0x2A, 0x20, 0x22, 0x30, 0x60, 0x30, 0x22, - 0x21, 0x22, 0x27, 0x27, 0x27, 0x2D, 0x4C, 0x56, - 0x56, 0xB9, 0xB9, 0x56, 0xB9, 0xB9, 0x56, 0x56, - 0xB9, 0xB9, 0xB9, 0x56, 0x56, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0x56, 0x2E, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0x40, 0x97, 0x95, 0x5A, 0x71, - 0x7C, 0xCE, 0x40, 0x60, 0x31, 0x30, 0x23, 0x3F, - 0x3F, 0x20, 0x20, 0x20, 0x29, 0x8B, 0x33, 0x58, - 0x66, 0x43, 0xCC, 0x25, 0x39, 0x50, 0x6B, 0x2C, - 0x33, 0x25, 0x25, 0x23, 0x20, 0x2A, 0x2B, 0x20, - 0x2A, 0x2B, 0x22, 0x54, 0x30, 0x30, 0x24, 0x22, - 0x21, 0x27, 0x27, 0x27, 0x27, 0xAF, 0x29, 0x4E, - 0x4F, 0xB9, 0x56, 0xB9, 0x4D, 0x4D, 0x77, 0xC9, - 0xB9, 0xB9, 0xB9, 0x56, 0xC9, 0x4D, 0x4D, 0x80, - 0x4C, 0x40, 0xC9, 0x4D, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0x27, 0xCF, 0x97, 0x97, 0xCE, - 0x86, 0xD0, 0x54, 0x6C, 0x58, 0x34, 0x60, 0x23, - 0x6B, 0x39, 0x20, 0x20, 0x20, 0x28, 0x6B, 0x54, - 0xD1, 0x66, 0xB6, 0x60, 0x22, 0x6B, 0x8B, 0x2C, - 0x54, 0x33, 0x24, 0x22, 0x2B, 0x28, 0x20, 0x28, - 0x2B, 0x20, 0x25, 0xC4, 0x30, 0x25, 0x22, 0x21, - 0x26, 0x27, 0x27, 0x27, 0x27, 0x20, 0x4B, 0x52, - 0x80, 0x4F, 0xB9, 0x56, 0xB9, 0x80, 0x56, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0x4D, 0x80, 0x50, 0x48, - 0x50, 0x50, 0x50, 0x56, 0x3D, 0x27, 0x36, 0x27, - 0x27, 0x27, 0x27, 0x3C, 0x46, 0xC3, 0x86, 0x86, - 0xD0, 0x39, 0x24, 0x6C, 0xD1, 0x43, 0x43, 0x6C, - 0x24, 0x6B, 0x2C, 0x20, 0x20, 0x20, 0x29, 0x39, - 0x63, 0xD1, 0x42, 0x55, 0xC4, 0x2B, 0x8B, 0x39, - 0x54, 0x25, 0x24, 0x20, 0x2A, 0x2A, 0x28, 0x28, - 0x20, 0x22, 0x54, 0x63, 0x25, 0x24, 0x22, 0x22, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x28, 0x77, 0x56, - 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0xC9, 0x56, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x4F, - 0x77, 0x47, 0x8B, 0x40, 0x56, 0x27, 0x27, 0x49, - 0x2D, 0x27, 0x27, 0x27, 0x39, 0x40, 0x39, 0x39, - 0x28, 0x3F, 0x39, 0x33, 0x58, 0x66, 0x35, 0x2E, - 0x58, 0x24, 0x8B, 0x29, 0x20, 0x20, 0x20, 0x39, - 0x29, 0x30, 0x55, 0xB6, 0xCC, 0x25, 0x29, 0x39, - 0x54, 0x25, 0x22, 0x2B, 0x29, 0x2A, 0x29, 0x2B, - 0x22, 0x24, 0x54, 0x33, 0x25, 0x22, 0x2B, 0x54, - 0x27, 0x27, 0x62, 0x27, 0x30, 0x80, 0xB9, 0x56, - 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0x56, 0x4D, 0x8B, 0x77, 0x36, 0x27, 0x27, - 0x3C, 0x2F, 0x27, 0x27, 0x39, 0x39, 0x39, 0x47, - 0x20, 0x2B, 0x2C, 0x39, 0x33, 0xB6, 0x35, 0x35, - 0x35, 0xAF, 0x24, 0x48, 0x2A, 0x20, 0x20, 0x20, - 0x8B, 0x2B, 0x78, 0xAF, 0x58, 0x30, 0x21, 0x28, - 0x33, 0x25, 0x21, 0x28, 0x29, 0x29, 0x28, 0x20, - 0x24, 0x33, 0x54, 0x33, 0x23, 0x20, 0x24, 0xD2, - 0x27, 0x49, 0x27, 0x27, 0x56, 0xB9, 0xB9, 0x56, - 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0xB9, 0x56, 0xC9, 0x50, 0x56, 0x27, 0x27, - 0x3D, 0x38, 0x3D, 0x27, 0x27, 0x47, 0x39, 0x39, - 0x28, 0x20, 0x20, 0x2A, 0x39, 0x54, 0x43, 0x35, - 0x35, 0x35, 0xAF, 0x23, 0x48, 0x2B, 0x20, 0x20, - 0x2B, 0x48, 0x22, 0x60, 0x34, 0xCB, 0x25, 0x21, - 0x33, 0x24, 0x2B, 0x29, 0x29, 0x29, 0x2B, 0x22, - 0x25, 0x54, 0x54, 0x25, 0x22, 0x2B, 0x33, 0x27, - 0x27, 0x32, 0x27, 0x30, 0x56, 0xB9, 0xB9, 0x56, - 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0xB9, 0x56, 0x56, 0xC9, 0x4C, 0x36, 0x3C, - 0x62, 0x2F, 0x2E, 0x27, 0x27, 0x54, 0x47, 0x47, - 0x8B, 0x2B, 0x20, 0x20, 0x20, 0x3F, 0x54, 0x2E, - 0x35, 0x35, 0x35, 0x34, 0x21, 0x8B, 0x2A, 0x20, - 0x20, 0x2C, 0x6B, 0x25, 0x60, 0x60, 0x54, 0x23, - 0x25, 0x22, 0x2A, 0x2C, 0x29, 0x28, 0x20, 0x24, - 0x54, 0x63, 0x54, 0x24, 0x2B, 0x22, 0x24, 0x27, - 0x36, 0x27, 0x27, 0x56, 0x56, 0xB9, 0xB9, 0x56, - 0xB9, 0xB9, 0xB9, 0x56, 0x56, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, 0x4C, 0x36, - 0x66, 0xD3, 0x27, 0x2F, 0x27, 0x54, 0x54, 0x27, - 0x26, 0x6B, 0x20, 0x20, 0x20, 0x20, 0x6B, 0x63, - 0x35, 0x35, 0x35, 0x62, 0xCB, 0x2A, 0x3F, 0x28, - 0x2B, 0x2A, 0x50, 0x29, 0x33, 0x30, 0x54, 0x25, - 0x24, 0x20, 0x29, 0x2C, 0x2C, 0x2A, 0x21, 0x33, - 0xC4, 0xC4, 0x33, 0x21, 0x29, 0x22, 0x27, 0x27, - 0x99, 0x27, 0x31, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, - 0xB9, 0xB9, 0xB9, 0x56, 0x56, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, 0x56, 0x3D, - 0x3D, 0x3C, 0x3C, 0x55, 0x54, 0x54, 0x54, 0x20, - 0x27, 0x2C, 0x39, 0x20, 0x20, 0x20, 0x20, 0x48, - 0x30, 0x62, 0x35, 0x35, 0x42, 0x54, 0x39, 0x39, - 0x2C, 0x28, 0x3F, 0x8B, 0x20, 0x33, 0x54, 0x24, - 0x22, 0x2B, 0x2C, 0x2C, 0x2C, 0x2B, 0x24, 0x54, - 0x30, 0xC4, 0x25, 0x2B, 0x28, 0x2B, 0x27, 0x3D, - 0x27, 0x27, 0x56, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, - 0xB9, 0xB9, 0x56, 0x56, 0x4F, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0x56, 0x56, 0x27, - 0x20, 0x20, 0x20, 0x54, 0x54, 0x54, 0x54, 0x20, - 0x20, 0x2D, 0x2D, 0x29, 0x20, 0x20, 0x20, 0x20, - 0x48, 0x60, 0x66, 0x35, 0x62, 0x34, 0x22, 0x2C, - 0x2C, 0x3F, 0x6B, 0x48, 0x2C, 0x22, 0x23, 0x23, - 0x20, 0x2A, 0x2C, 0x29, 0x29, 0x20, 0x25, 0xC4, - 0x30, 0x54, 0x22, 0x29, 0x28, 0xD2, 0x27, 0x35, - 0x27, 0x49, 0x56, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, - 0xB9, 0xB9, 0x56, 0x4F, 0x56, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0xB9, 0xB9, 0x56, 0x56, 0x56, 0x40, 0x20, - 0x20, 0x54, 0x54, 0x54, 0x20, 0x20, 0x20, 0x20, - 0x2D, 0x2D, 0x2D, 0x49, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x6B, 0x6C, 0x42, 0x2E, 0xB6, 0x54, 0x28, - 0x29, 0x2C, 0x6B, 0x48, 0x3F, 0x2A, 0x20, 0x22, - 0x2B, 0x28, 0x2C, 0x28, 0x29, 0x20, 0x33, 0x30, - 0x30, 0x54, 0x20, 0x2C, 0x29, 0x27, 0x27, 0x3D, - 0x27, 0x40, 0x56, 0xB9, 0x56, 0x56, 0xB9, 0x56, - 0xB9, 0x56, 0x56, 0x4D, 0x56, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0xB9, 0x56, 0x56, 0x63, 0x56, 0x54, 0x54, - 0x54, 0x54, 0x20, 0xD3, 0x45, 0x51, 0x51, 0x49, - 0x7C, 0x2D, 0x2D, 0x49, 0x49, 0x20, 0x20, 0x20, - 0x20, 0x2A, 0x2A, 0xCC, 0xB6, 0x8A, 0x60, 0x22, - 0x28, 0x29, 0x3F, 0x6B, 0x39, 0x29, 0x2B, 0x20, - 0x28, 0x2C, 0x28, 0x2A, 0x2A, 0x24, 0xC4, 0x30, - 0xC4, 0x33, 0x2B, 0x39, 0xCD, 0x27, 0x3C, 0x27, - 0x27, 0x56, 0xB9, 0x56, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0x56, 0x56, 0x4D, 0x56, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0xB9, 0x56, 0x63, 0x63, 0x49, 0x2D, 0x20, - 0x20, 0x2D, 0xD3, 0x49, 0x66, 0x2D, 0x49, 0x49, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x8B, 0x2B, 0x20, - 0x20, 0x20, 0x39, 0x23, 0x6C, 0xAF, 0xCB, 0x23, - 0x28, 0x28, 0x29, 0x2A, 0x2A, 0x2A, 0x2A, 0x20, - 0x29, 0x39, 0x2B, 0x2B, 0x2B, 0x25, 0x78, 0xC4, - 0x63, 0x23, 0x29, 0x39, 0x27, 0x27, 0x3D, 0x27, - 0x27, 0x56, 0xB9, 0x56, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0x56, 0x56, 0x80, 0x4F, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0xB9, 0xB9, 0xB9, 0x2D, 0x49, 0x2D, 0x49, - 0x49, 0x2D, 0x49, 0x2D, 0x49, 0x2D, 0x2D, 0x2D, - 0x49, 0x49, 0x35, 0x49, 0x2D, 0x2D, 0x39, 0x28, - 0x20, 0x20, 0x2A, 0x28, 0x33, 0x60, 0xC4, 0x22, - 0x2C, 0x2A, 0x2A, 0x22, 0x23, 0x22, 0x20, 0x21, - 0x2C, 0x29, 0x20, 0x2B, 0x2B, 0x54, 0x30, 0xC4, - 0x63, 0x22, 0x2C, 0x27, 0x27, 0x27, 0x3D, 0x27, - 0x27, 0x56, 0x56, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0x56, 0x56, 0x80, 0x56, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0xB9, 0xB9, 0xB9, 0x2D, 0x49, 0x2D, 0x49, - 0x61, 0x49, 0x2D, 0x49, 0x49, 0x2D, 0x2D, 0x49, - 0x49, 0x49, 0x2F, 0x49, 0x2D, 0x78, 0x29, 0x28, - 0x2C, 0x2A, 0x2B, 0x39, 0x2B, 0x25, 0x33, 0x20, - 0x2C, 0x20, 0x2A, 0x24, 0x54, 0x54, 0x23, 0x23, - 0x2C, 0x2A, 0x22, 0x2B, 0x20, 0x63, 0x30, 0x63, - 0xC4, 0x21, 0x39, 0x27, 0x27, 0x27, 0x35, 0x36, - 0x27, 0x56, 0x56, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0xB9, 0x56, 0x80, 0x56, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0xB9, 0xB9, 0x56, 0x2D, 0x49, 0x49, 0x49, - 0x49, 0x27, 0x27, 0x2D, 0x38, 0x27, 0x36, 0x36, - 0x49, 0x27, 0x49, 0x2D, 0x2D, 0x44, 0x24, 0x2B, - 0x20, 0x2C, 0x3F, 0x6B, 0x2A, 0x20, 0x21, 0x28, - 0x2C, 0x20, 0x2B, 0x24, 0x30, 0xCB, 0x63, 0x54, - 0x28, 0x20, 0x24, 0x2B, 0x23, 0x78, 0xC4, 0x63, - 0x63, 0x2B, 0x3F, 0x27, 0x27, 0x27, 0x38, 0x33, - 0x3D, 0xB9, 0x56, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0xB9, 0x56, 0x80, 0x56, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0xB9, 0xB9, 0x56, 0x63, 0x49, 0x49, 0x49, - 0x49, 0x49, 0x3D, 0x3D, 0x27, 0x27, 0x27, 0x2D, - 0x49, 0x49, 0x49, 0x2D, 0x62, 0x5F, 0xC4, 0x20, - 0x22, 0x2A, 0x6B, 0x8B, 0x2C, 0x2B, 0x2A, 0x3F, - 0x3F, 0x2A, 0x21, 0x21, 0xCB, 0x58, 0x6C, 0x60, - 0x20, 0x23, 0x24, 0x2A, 0x25, 0x78, 0x63, 0x63, - 0x54, 0x2A, 0x28, 0x27, 0x27, 0x27, 0x27, 0x62, - 0x3C, 0xB9, 0x56, 0x56, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0x56, 0x56, 0x80, 0x56, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0x49, 0x2D, 0x2D, - 0x2D, 0x3D, 0x2F, 0x3C, 0x2D, 0x3C, 0x27, 0x38, - 0x2D, 0x49, 0x2D, 0x2D, 0xD1, 0x43, 0x30, 0x20, - 0x24, 0x21, 0x21, 0x21, 0x2B, 0x2A, 0x29, 0x8B, - 0x6B, 0x29, 0x2B, 0x2A, 0x30, 0x55, 0x55, 0x34, - 0x22, 0x23, 0x24, 0x29, 0x54, 0x30, 0x63, 0x63, - 0x25, 0x29, 0x22, 0x3C, 0xA5, 0xD4, 0xD5, 0x27, - 0x31, 0x56, 0x56, 0x56, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0x56, 0x56, 0x80, 0xB9, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0x56, 0x2D, 0x2E, - 0x3E, 0x27, 0x27, 0x27, 0x27, 0x27, 0x36, 0x44, - 0x3C, 0x27, 0x2D, 0xC4, 0x78, 0xCC, 0x54, 0x2B, - 0x25, 0x24, 0x63, 0x60, 0x63, 0x24, 0x2A, 0x6B, - 0x3F, 0x39, 0x28, 0x21, 0x33, 0xB6, 0x44, 0x58, - 0x22, 0x23, 0x24, 0x2A, 0x30, 0x30, 0x63, 0x63, - 0x24, 0x39, 0x22, 0xBB, 0x9C, 0xB2, 0x9D, 0xA8, - 0x27, 0x8B, 0x56, 0x56, 0xB9, 0x56, 0xB9, 0xB9, - 0x56, 0xB9, 0x56, 0x80, 0xB9, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0xB9, 0xB9, 0x56, 0x56, 0xD6, 0xD6, 0xD7, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x32, - 0x3D, 0x27, 0x39, 0x33, 0xC4, 0xC4, 0x22, 0x28, - 0x25, 0x54, 0x30, 0xD1, 0xD1, 0x60, 0x23, 0x6B, - 0x3F, 0x39, 0x2C, 0x2B, 0x20, 0x58, 0x8A, 0x58, - 0x22, 0x23, 0x23, 0x2B, 0x78, 0x30, 0xC4, 0xC4, - 0x23, 0x29, 0xBB, 0xBB, 0xD8, 0xB2, 0x9D, 0xA9, - 0xA9, 0x3C, 0x60, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, - 0x56, 0xB9, 0x56, 0x80, 0xB9, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0xB9, 0xB9, 0x56, 0xD9, 0x85, 0x85, 0x85, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x2D, - 0xA0, 0x83, 0x2C, 0x21, 0x30, 0x33, 0x29, 0x29, - 0x21, 0x33, 0x54, 0x42, 0x66, 0x55, 0xC4, 0x29, - 0x8B, 0x2C, 0x39, 0x28, 0x29, 0x31, 0x44, 0x58, - 0x23, 0x23, 0x21, 0x20, 0x30, 0xC4, 0xC4, 0x30, - 0x21, 0x20, 0xBB, 0xBC, 0xDA, 0xDB, 0xDC, 0xB2, - 0x83, 0xB4, 0x3C, 0x2F, 0xB9, 0x56, 0x56, 0xB9, - 0x56, 0xB9, 0x56, 0x80, 0x56, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0x56, 0x56, 0x56, 0xA7, 0xD4, 0x85, 0x82, - 0x3C, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x61, - 0x9E, 0x90, 0xDD, 0x21, 0x33, 0x25, 0x2C, 0x39, - 0x2A, 0x24, 0x24, 0x42, 0x62, 0x43, 0x34, 0x22, - 0x50, 0x39, 0x2C, 0x2C, 0x2A, 0x54, 0xD1, 0x58, - 0x22, 0x22, 0x2B, 0x22, 0x30, 0xC4, 0x30, 0x60, - 0x20, 0xDE, 0xBB, 0xD9, 0x84, 0x84, 0xDF, 0xA9, - 0xDB, 0xDB, 0x61, 0x27, 0x38, 0x4D, 0x56, 0x56, - 0x56, 0xB9, 0x56, 0xB9, 0x56, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0x56, 0x56, 0x56, 0x8D, 0xD9, 0xD5, 0xA6, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0xBB, - 0x85, 0xDB, 0xDD, 0x21, 0x22, 0x22, 0x3F, 0x39, - 0x2C, 0x2B, 0x25, 0x34, 0x62, 0x66, 0xD1, 0xC4, - 0x6B, 0x39, 0x2C, 0x39, 0x29, 0x21, 0x58, 0xCC, - 0x22, 0x21, 0x29, 0x23, 0x30, 0x30, 0x30, 0x5E, - 0x82, 0xBB, 0xE0, 0xB1, 0xE1, 0x9C, 0xD4, 0xDC, - 0x9D, 0xA9, 0xE2, 0x27, 0x27, 0x27, 0x4D, 0x56, - 0x56, 0xB9, 0x56, 0xB9, 0x56, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0x56, 0x4C, 0x48, 0xA8, 0xA8, 0xE3, 0x8C, - 0xC6, 0x3C, 0x27, 0x27, 0x27, 0xE4, 0xA6, 0xE5, - 0x83, 0xA9, 0xE6, 0xAF, 0x54, 0x2B, 0x8B, 0x39, - 0x39, 0x29, 0x20, 0x54, 0x42, 0x42, 0xB6, 0xCC, - 0x2A, 0x29, 0x39, 0x39, 0x2C, 0x2C, 0xCC, 0xCC, - 0x22, 0x20, 0x39, 0xE7, 0xC0, 0xD9, 0xA7, 0xBC, - 0x8D, 0xAA, 0x9C, 0xE8, 0x9C, 0x9D, 0xD4, 0xD4, - 0xD8, 0xA9, 0x84, 0xC7, 0x27, 0x27, 0x27, 0x2A, - 0x56, 0x56, 0x56, 0xB9, 0x56, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0x56, 0x56, 0x48, 0x50, 0xAA, 0xE3, 0xE3, 0xC0, - 0xA6, 0x9A, 0xBA, 0xC8, 0x9A, 0xDE, 0x9B, 0xD5, - 0xE8, 0xD8, 0xD5, 0x2E, 0x58, 0x33, 0x6B, 0x39, - 0x2C, 0x39, 0x29, 0x28, 0xD1, 0x43, 0xB6, 0xAF, - 0x23, 0x28, 0x2C, 0x39, 0x39, 0x8B, 0x30, 0x31, - 0x21, 0x20, 0x3F, 0xBB, 0xDF, 0xDF, 0xD5, 0xA8, - 0xD5, 0x9C, 0x8E, 0xB2, 0x9D, 0xE9, 0xD4, 0xD8, - 0x90, 0xB2, 0xA9, 0x8F, 0x27, 0x27, 0x27, 0x27, - 0x2F, 0x56, 0x56, 0xB9, 0x56, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0x56, 0xB9, 0x48, 0x48, 0x75, 0xE3, 0xAA, 0xAA, - 0xC0, 0xB4, 0xB4, 0xB4, 0x75, 0x9B, 0xD9, 0x83, - 0x9D, 0x90, 0xDF, 0xDD, 0x8A, 0x31, 0x4B, 0x2C, - 0x2C, 0x29, 0x2C, 0x3F, 0x6C, 0x55, 0xD1, 0x55, - 0x54, 0x29, 0x28, 0x39, 0x39, 0x6B, 0x24, 0x60, - 0x20, 0x2B, 0x3F, 0xA7, 0xB1, 0x9D, 0xA9, 0x8E, - 0xE5, 0xE5, 0xDF, 0xE0, 0xA9, 0x9D, 0xDF, 0xDF, - 0xEA, 0x9D, 0xB2, 0x84, 0xAA, 0x27, 0x27, 0x27, - 0x27, 0x35, 0x56, 0x56, 0x56, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0xB9, 0x48, 0x48, 0xA6, 0x9B, 0xE3, 0xAA, - 0xAA, 0x9B, 0x9B, 0x9B, 0xAA, 0xE3, 0xD5, 0xD4, - 0x9D, 0xA9, 0xA9, 0x9D, 0xEB, 0xAF, 0x23, 0x28, - 0x2C, 0x29, 0x28, 0x39, 0x54, 0xCC, 0xAF, 0x55, - 0x30, 0x29, 0x2B, 0x2C, 0x39, 0x39, 0x2B, 0xC4, - 0x2B, 0x29, 0x39, 0xA7, 0x8E, 0x9D, 0x83, 0xE5, - 0xB1, 0xDB, 0xDC, 0xE0, 0xDC, 0x84, 0xE9, 0x84, - 0x83, 0xD4, 0xEC, 0x83, 0x8F, 0xE4, 0x27, 0x27, - 0x27, 0x27, 0x56, 0x56, 0x56, 0x56, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0xB9, 0x56, 0x40, 0x50, 0x9A, 0x75, 0xE3, 0xE3, - 0xE3, 0xD9, 0x8D, 0xAA, 0xD9, 0xA8, 0xB2, 0xDC, - 0xB2, 0x8D, 0x84, 0xEA, 0xB1, 0xEB, 0x54, 0x29, - 0x28, 0x2C, 0x2A, 0x28, 0x2B, 0x78, 0xCC, 0x58, - 0xCB, 0x20, 0x20, 0x29, 0x39, 0x39, 0x2C, 0x25, - 0x29, 0x2C, 0x39, 0xBB, 0xD9, 0xD9, 0x9D, 0x9D, - 0xB2, 0xB1, 0xD4, 0xDB, 0xB1, 0x9D, 0xD4, 0xEA, - 0xB1, 0x8D, 0xD8, 0x8E, 0x8F, 0xAA, 0x27, 0x27, - 0x27, 0x3D, 0x56, 0xB9, 0x56, 0xB9, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0x56, - 0x56, 0x56, 0x47, 0xE4, 0xA6, 0x75, 0xAA, 0xA8, - 0x9C, 0x9C, 0xE1, 0x9C, 0x9C, 0x8E, 0xD8, 0x9D, - 0xA9, 0xDB, 0xA9, 0xDC, 0xD8, 0xDA, 0xD4, 0x2B, - 0x20, 0x2C, 0x28, 0x2A, 0x28, 0x63, 0x31, 0x58, - 0xCB, 0x24, 0x20, 0x2B, 0x2C, 0x39, 0x6B, 0x21, - 0x39, 0x6B, 0x2C, 0xC0, 0xE0, 0xB1, 0xB2, 0x9D, - 0x8E, 0xD8, 0xE0, 0xD9, 0x84, 0xDB, 0xD8, 0xB1, - 0x8E, 0xB2, 0xE2, 0x9C, 0x83, 0x9E, 0xBC, 0x3D, - 0xD3, 0x56, 0x56, 0xB9, 0x56, 0xB9, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0xB9, 0xB9, - 0x56, 0x4F, 0x27, 0x61, 0xA6, 0x9B, 0xE3, 0xA9, - 0xE9, 0xD4, 0xDA, 0xDB, 0x8E, 0xE1, 0xE9, 0x8E, - 0xD4, 0xA8, 0xE0, 0x84, 0xE8, 0xB1, 0xDC, 0x9D, - 0x20, 0x29, 0x29, 0x2B, 0x2C, 0x54, 0x78, 0xCC, - 0x78, 0x33, 0x2A, 0x20, 0x29, 0x39, 0x50, 0x2A, - 0x6B, 0x8B, 0x39, 0xC0, 0x8D, 0xB1, 0xE9, 0xA9, - 0xB2, 0xDC, 0x8E, 0xDC, 0xE1, 0xDA, 0xA9, 0x8E, - 0xEA, 0xE2, 0x83, 0xE8, 0x8E, 0x83, 0xE2, 0xED, - 0xB9, 0xB9, 0x56, 0xB9, 0x56, 0xB9, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0x56, 0x56, 0xB9, - 0xC9, 0x27, 0x27, 0xE4, 0xA6, 0x9B, 0xD5, 0xA8, - 0xD4, 0xB2, 0xD8, 0xDA, 0xD9, 0xE8, 0xE9, 0xE8, - 0xD8, 0xB1, 0xDA, 0xB2, 0xE9, 0x8E, 0xEC, 0xDA, - 0x22, 0x20, 0x39, 0x2B, 0x39, 0x24, 0xC4, 0x30, - 0x30, 0x54, 0x22, 0x29, 0x29, 0x39, 0x48, 0x2C, - 0x39, 0x6B, 0x39, 0xC0, 0x8D, 0xB1, 0xE9, 0xB2, - 0xB2, 0x8E, 0xA9, 0xD8, 0xDA, 0xB1, 0xA9, 0xDA, - 0x9C, 0xDC, 0x8E, 0xD4, 0xE8, 0xE8, 0x8F, 0x9B, - 0x4F, 0xB9, 0x56, 0xB9, 0x56, 0xB9, 0xB9, 0xB9, - 0xB9, 0xB9, 0xB9, 0xB9, 0x56, 0x56, 0x4F, 0x6B, - 0x27, 0x27, 0x27, 0xD7, 0xDE, 0xAA, 0xE3, 0xA8, - 0xB2, 0xD5, 0xE5, 0x90, 0xE2, 0xA9, 0xE9, 0xB2, - 0xDA, 0xB2, 0xE1, 0xB2, 0xE9, 0x8E, 0xDA, 0xDF, - 0x78, 0x2A, 0x2C, 0x2A, 0x6B, 0x28, 0x23, 0x54, - 0x63, 0xC4, 0x33, 0x28, 0x2C, 0x39, 0x47, 0x39, - 0x28, 0x2C, 0x29, 0xBB, 0x8D, 0x83, 0xE9, 0xD4, - 0xB2, 0xE9, 0xE9, 0xE8, 0xD4, 0xD8, 0xD4, 0xA9, - 0xDA, 0xB2, 0xE9, 0xA8, 0xB2, 0xA8, 0xD5, 0xAA, - 0xC6, 0x56, 0x56, 0x56, 0x56, 0x56, 0xB9, 0x56, - 0x56, 0x56, 0x56, 0x56, 0x56, 0xC9, 0x27, 0x27, - 0x27, 0x27, 0x27, 0xB8, 0xB4, 0x9B, 0xE3, 0x8E, - 0x9D, 0x8E, 0xB2, 0xE8, 0xE8, 0x8E, 0xB2, 0xDA, - 0xB2, 0x8E, 0xEC, 0xB2, 0x8E, 0xB2, 0xBB, 0x58, - 0xAF, 0x33, 0x50, 0x39, 0x6B, 0x39, 0x29, 0x20, - 0x33, 0x30, 0x78, 0x23, 0x6B, 0x6B, 0x48, 0x6B, - 0x2B, 0x2A, 0x29, 0xBB, 0xE5, 0x9C, 0xB1, 0xB2, - 0xE5, 0x84, 0x8E, 0x9C, 0x84, 0xB2, 0xB2, 0x9D, - 0x84, 0xDF, 0xA9, 0x84, 0x8E, 0xA8, 0xE3, 0x9B, - 0xA6, 0xD7, 0x80, 0x4F, 0x56, 0x56, 0x56, 0x4F, - 0x4F, 0x4F, 0x4F, 0x2A, 0x2D, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0xB8, 0xB4, 0xAA, 0xD5, 0xA9, - 0x9D, 0xB2, 0x90, 0xEA, 0xE9, 0xE2, 0xE1, 0x8E, - 0xB2, 0x9D, 0x8E, 0xB1, 0xA7, 0xEE, 0x63, 0xD1, - 0x2E, 0xCC, 0x28, 0x48, 0x8B, 0x47, 0x6B, 0x28, - 0x23, 0x78, 0x6C, 0x54, 0x29, 0x50, 0x50, 0x6B, - 0x23, 0x20, 0xBB, 0xBC, 0xBB, 0x8D, 0xE3, 0xDF, - 0x9C, 0xA9, 0x8D, 0xA8, 0xD9, 0x90, 0x9D, 0xA9, - 0xDC, 0xA9, 0x83, 0xB2, 0xA9, 0xD4, 0xE3, 0x9B, - 0x8C, 0xEF, 0x27, 0x27, 0x27, 0x3C, 0x27, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0xF0, 0xB4, 0x9B, 0xE3, 0x84, - 0x9D, 0x84, 0x90, 0xB1, 0xA9, 0x9C, 0xD9, 0xB1, - 0xB2, 0xEA, 0xBB, 0x51, 0x24, 0x30, 0x30, 0x42, - 0x66, 0x58, 0x24, 0x48, 0x50, 0x3F, 0x20, 0x25, - 0x22, 0x60, 0x34, 0x30, 0x20, 0x8B, 0x8B, 0x39, - 0x54, 0x24, 0x2B, 0xC0, 0xC0, 0xC0, 0xBB, 0x9B, - 0xBC, 0xAA, 0xAA, 0xE3, 0xE3, 0x9C, 0xB2, 0xD4, - 0x83, 0xD8, 0xE8, 0x83, 0x84, 0xE8, 0xE5, 0x75, - 0x9A, 0xF0, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0xF0, 0xB4, 0x9B, 0xE3, 0xA8, - 0xA9, 0xD8, 0x8E, 0xEA, 0xA8, 0x9C, 0xD9, 0xE0, - 0xC0, 0x5E, 0x2C, 0x20, 0x54, 0x60, 0x30, 0x66, - 0xB6, 0xCC, 0x63, 0x3F, 0x8B, 0x28, 0x22, 0x33, - 0x23, 0x31, 0xAF, 0x31, 0x22, 0x6B, 0x6B, 0x29, - 0x30, 0x54, 0x22, 0x89, 0xBA, 0xED, 0xA6, 0x8C, - 0xB4, 0xC0, 0xB4, 0x75, 0x75, 0x9B, 0x9B, 0xE5, - 0xA9, 0xD5, 0x8E, 0x8E, 0x9C, 0xE3, 0x75, 0x8C, - 0xC8, 0xF1, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0xF1, 0x9A, 0xB4, 0x9B, 0xE3, - 0xE3, 0xA8, 0xE3, 0xE5, 0xAA, 0xBC, 0xC0, 0x9A, - 0x26, 0x29, 0x20, 0x24, 0x63, 0x60, 0x54, 0x43, - 0x34, 0xCB, 0x30, 0x39, 0x2C, 0x20, 0x24, 0x54, - 0x22, 0x34, 0x34, 0x31, 0x24, 0x3F, 0x2C, 0x2B, - 0x31, 0x30, 0x25, 0x2A, 0x6B, 0x29, 0x20, 0xF2, - 0xBA, 0xBF, 0xC8, 0x9A, 0xA6, 0xA6, 0x8C, 0xB4, - 0x9B, 0xAA, 0xAA, 0xAA, 0x9B, 0x75, 0xDE, 0xBF, - 0x81, 0xEF, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x27, 0x27, 0x27, 0xEF, 0xBA, 0x9A, 0xB4, 0x75, - 0x9B, 0x9B, 0x9B, 0xC0, 0xB4, 0x9A, 0xA5, 0xC4, - 0x30, 0x28, 0x22, 0x33, 0x30, 0x30, 0x23, 0x34, - 0x31, 0x30, 0xC4, 0x2C, 0x2B, 0x22, 0x33, 0x63, - 0x21, 0x58, 0x6C, 0x60, 0x25, 0x39, 0x28, 0x2B, - 0xCC, 0x6C, 0x63, 0x20, 0x6B, 0x28, 0x2B, 0x20, - 0x63, 0x43, 0xF3, 0xEF, 0xF0, 0x81, 0xBA, 0xF4, - 0xF4, 0xA6, 0xDE, 0x8C, 0xA6, 0x9A, 0xBA, 0x81, - 0xB0, 0xE4, 0xA1, 0x20, 0x20, 0x23, 0x31, 0xC4, - 0x30, 0x24, 0x33, 0x31, 0x31, 0x60, 0x43, 0x35, - 0x35, 0x55, 0x6C, 0xEF, 0x81, 0xC8, 0x9A, 0xA6, - 0xB4, 0xB4, 0x8C, 0xA6, 0xBA, 0x68, 0x30, 0x30, - 0x30, 0x2B, 0x25, 0x54, 0xC4, 0x54, 0x24, 0x78, - 0x63, 0x63, 0x30, 0x29, 0x21, 0x24, 0x54, 0x63, - 0x23, 0x34, 0xCB, 0x30, 0x25, 0x39, 0x20, 0x20, - 0x58, 0x34, 0x60, 0x23, 0x6B, 0x29, 0x28, 0x20, - 0x22, 0xB6, 0x42, 0xB6, 0x58, 0x54, 0xF5, 0xD7, - 0xA5, 0xBA, 0xBA, 0xBA, 0xBA, 0x81, 0xA5, 0xF1, - 0xE4, 0x2A, 0x39, 0x20, 0x20, 0x20, 0x31, 0x60, - 0x54, 0x28, 0x2B, 0x22, 0x33, 0x30, 0x43, 0x35, - 0x66, 0xD1, 0x34, 0xE4, 0xEF, 0x81, 0xC8, 0x9A, - 0x9A, 0xC8, 0xC8, 0x81, 0xF6, 0x31, 0x63, 0x31, - 0x78, 0x2B, 0x54, 0x63, 0x54, 0x24, 0x23, 0x54, - 0x63, 0x54, 0x63, 0x2C, 0x23, 0x33, 0x63, 0x54, - 0x25, 0x31, 0x78, 0x30, 0x25, 0x3F, 0x20, 0x20, - 0xAF, 0x58, 0xCC, 0x33, 0x39, 0x29, 0x29, 0x2A, - 0x29, 0x58, 0x43, 0x42, 0xD1, 0xCB, 0x2C, 0x2C, - 0x37, 0xCD, 0xEF, 0xB0, 0xF0, 0xB0, 0xEF, 0xE4, - 0x63, 0x20, 0x20, 0x2C, 0x2C, 0x21, 0xCB, 0x78, - 0x54, 0x39, 0x39, 0x28, 0x2B, 0x28, 0x2B, 0xCB, - 0x55, 0xB6, 0xD1, 0x28, 0xE4, 0xD7, 0xB8, 0xF0, - 0xA5, 0xB0, 0xEF, 0x26, 0x23, 0x54, 0x31, 0x58, - 0xCB, 0x20, 0x63, 0x63, 0x25, 0x2B, 0x54, 0x78, - 0x30, 0x63, 0x54, 0x28, 0x33, 0x63, 0x63, 0x33, - 0x54, 0x78, 0xC4, 0x30, 0x24, 0x2C, 0x22, 0x22, - 0x55, 0x55, 0x34, 0x30, 0x28, 0x2C, 0x29, 0x29, - 0x28, 0x30, 0xB6, 0x42, 0x43, 0x55, 0x22, 0x29, - 0x2C, 0x2B, 0x2B, 0x3F, 0xE4, 0xE4, 0x43, 0x66, - 0x30, 0x23, 0x24, 0x2A, 0x28, 0x2B, 0x54, 0x63, - 0x33, 0x39, 0x28, 0x20, 0x20, 0x20, 0x2B, 0x31, - 0x30, 0xD1, 0x43, 0x30, 0x39, 0x28, 0xE4, 0xE4, - 0xD7, 0xF5, 0x2B, 0x6B, 0x20, 0x30, 0x34, 0xD1, - 0x60, 0x23, 0x63, 0x54, 0x22, 0x47, 0x60, 0xCB, - 0xC4, 0xC4, 0x25, 0x22, 0x54, 0xC4, 0x63, 0x23, - 0xC4, 0xC4, 0x63, 0xC4, 0x23, 0x2A, 0x24, 0x22, - 0x55, 0x55, 0xAF, 0x6C, 0x22, 0x39, 0x2C, 0x39, - 0x28, 0x23, 0xD1, 0x43, 0x42, 0x8A, 0x63, 0x39, - 0x39, 0x2A, 0x20, 0x6B, 0x33, 0xCC, 0xD1, 0xB6, - 0x30, 0x24, 0x54, 0x63, 0x31, 0xCC, 0xCC, 0xCB, - 0xC4, 0x2A, 0x39, 0x20, 0x20, 0x20, 0x39, 0x30, - 0x30, 0x6C, 0x43, 0x43, 0x6C, 0x63, 0x25, 0x24, - 0x63, 0x63, 0x63, 0x25, 0x63, 0xCC, 0xD1, 0x34, - 0x63, 0x25, 0x54, 0x25, 0x2A, 0x28, 0x31, 0xCB, - 0x63, 0x78, 0x24, 0x33, 0xC4, 0xC4, 0x33, 0x2C, - 0xC4, 0x54, 0x54, 0x30, 0x21, 0x22, 0x25, 0x23, - 0x55, 0x55, 0xD1, 0x58, 0x33, 0x6B, 0x2C, 0x39, - 0x39, 0x39, 0x34, 0x43, 0x42, 0x43, 0xCC, 0x2B, - 0x28, 0x29, 0x20, 0x28, 0x21, 0x30, 0xCC, 0xAF, - 0x54, 0x23, 0xC4, 0x54, 0x58, 0x2E, 0x35, 0x42, - 0x55, 0x54, 0x8B, 0x2A, 0x20, 0x20, 0x28, 0x22, - 0x78, 0x30, 0xD1, 0x43, 0x44, 0x6C, 0xC4, 0xC4, - 0x60, 0x31, 0x31, 0x63, 0x6C, 0xAF, 0xCC, 0xCB, - 0x24, 0x25, 0x33, 0x23, 0x2C, 0x24, 0x31, 0x30, - 0x63, 0xC4, 0x21, 0x54, 0x30, 0x63, 0x24, 0x2A, - 0x54, 0x63, 0x54, 0xC4, 0x2B, 0x24, 0x33, 0x24, - 0x34, 0x55, 0xD1, 0x55, 0x30, 0x28, 0x29, 0x39, - 0x39, 0x8B, 0x63, 0x55, 0x42, 0x66, 0xB6, 0x25, - 0x29, 0x29, 0x29, 0x28, 0x2A, 0x54, 0x78, 0x6C, - 0x23, 0x20, 0x25, 0x30, 0xCB, 0x62, 0x35, 0x35, - 0x35, 0x44, 0x24, 0x6B, 0x29, 0x20, 0x2A, 0x39, - 0x28, 0x63, 0x34, 0xB6, 0x34, 0xCB, 0x63, 0x30, - 0x31, 0x31, 0x30, 0x30, 0xCC, 0x60, 0x63, 0xC4, - 0x20, 0x33, 0x25, 0x20, 0x48, 0x33, 0x30, 0x54, - 0x78, 0x54, 0x2B, 0x63, 0x30, 0x63, 0x23, 0x22, - 0x63, 0x63, 0x63, 0x33, 0x28, 0x25, 0x54, 0x24, - 0x78, 0xAF, 0xD1, 0xD1, 0xCC, 0x22, 0x39, 0x39, - 0x2C, 0x3F, 0x2B, 0x34, 0xB6, 0x43, 0x43, 0xC4, - 0x2B, 0x28, 0x39, 0x50, 0x2C, 0x24, 0x63, 0x78, - 0x21, 0x2C, 0x2A, 0x23, 0x54, 0xD1, 0x35, 0x35, - 0x35, 0x35, 0x55, 0x22, 0x39, 0x2C, 0x2C, 0x2C, - 0x20, 0x30, 0xCC, 0x6C, 0xCB, 0x30, 0x54, 0x30, - 0x78, 0x63, 0x78, 0x30, 0x54, 0x78, 0x30, 0x23, - 0x2B, 0x33, 0x24, 0x28, 0x39, 0x24, 0x54, 0x30, - 0x78, 0x33, 0x25, 0xC4, 0xC4, 0x33, 0x39, 0x25, - 0xC4, 0x63, 0xC4, 0x24, 0x20, 0x54, 0x54, 0x25, - 0x63, 0xCC, 0xD1, 0xB6, 0x55, 0x54, 0x39, 0x29, - 0x39, 0x2C, 0x6B, 0x30, 0xAF, 0xB6, 0xB6, 0x60, - 0x22, 0x2A, 0x2C, 0x39, 0x2C, 0x21, 0x54, 0x63, - 0x21, 0x50, 0x2C, 0x2C, 0x2B, 0x25, 0x62, 0x35, - 0x35, 0x35, 0x35, 0xCC, 0x2B, 0x29, 0x2B, 0x20, - 0x23, 0x25, 0xC4, 0x30, 0xC4, 0x63, 0x63, 0x63, - 0x63, 0x33, 0x24, 0x31, 0x31, 0x31, 0x54, 0x28, - 0x24, 0x25, 0x22, 0x6B, 0x28, 0x24, 0xC4, 0x78, - 0x30, 0x24, 0x63, 0xC4, 0x54, 0x23, 0x29, 0x63, - 0xC4, 0x54, 0xC4, 0x21, 0x24, 0x54, 0x54, 0x25, - 0x30, 0xCB, 0xD1, 0xB6, 0x55, 0x63, 0x28, 0x29, - 0x39, 0x39, 0x48, 0x33, 0x58, 0x44, 0xB6, 0x60, - 0x24, 0x20, 0x2B, 0x28, 0x2A, 0x22, 0x54, 0x63, - 0x21, 0x48, 0x2A, 0x2B, 0x39, 0x21, 0xB6, 0x35, - 0x35, 0x35, 0x35, 0x42, 0x23, 0x29, 0x2A, 0x2B, - 0x23, 0x25, 0x54, 0x54, 0x54, 0x63, 0x63, 0x30, - 0x25, 0x2B, 0x31, 0x31, 0x31, 0x31, 0x21, 0x2C, - 0x33, 0x25, 0x21, 0x39, 0x20, 0x25, 0x30, 0x78, - 0xC4, 0x23, 0xC4, 0x30, 0x54, 0x20, 0x28, 0x63, - 0x63, 0x63, 0x63, 0x20, 0x25, 0x54, 0x54, 0x20, -}; - -unsigned char linux_logo_bw[] __initdata = { - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x00, 0x3F, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, - 0xFE, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFE, 0x3F, 0xFF, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFE, 0x7F, 0xFF, 0xC7, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xC3, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, - 0xFB, 0xE3, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFD, 0xFF, 0xFF, 0xE1, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xF9, 0xFF, 0xFF, 0xF1, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFF, 0xFF, 0xF1, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFF, - 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xF9, 0xFF, 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xF9, 0xCF, 0xC3, 0xF8, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x87, 0x81, 0xF9, - 0xF8, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xA7, - 0x99, 0xF9, 0xC2, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, - 0xF9, 0xF3, 0xBC, 0xF9, 0x90, 0x00, 0x1F, 0xFF, - 0xFF, 0xFF, 0xF9, 0xE3, 0xBC, 0xF9, 0xA0, 0x00, - 0x8F, 0xFF, 0xFF, 0xFF, 0xF9, 0xB0, 0x3C, 0xF9, - 0x83, 0xE0, 0x2F, 0xFF, 0xFF, 0xFF, 0xF9, 0xB0, - 0x19, 0xF0, 0x1F, 0xFE, 0x0F, 0xFF, 0xFF, 0xFF, - 0xF9, 0xC0, 0x03, 0xF0, 0x3F, 0xF7, 0x8F, 0xFF, - 0xFF, 0xFF, 0xF9, 0x80, 0x01, 0xF8, 0x7F, 0xF7, - 0xC7, 0xFF, 0xFF, 0xFF, 0xF9, 0x80, 0x01, 0xF8, - 0x6F, 0xF7, 0xE7, 0xFF, 0xFF, 0xFF, 0xF9, 0x80, - 0x01, 0xF8, 0x7F, 0xF7, 0xE7, 0xFF, 0xFF, 0xFF, - 0xF9, 0xC0, 0x21, 0xD8, 0x7F, 0xE7, 0xEF, 0xFF, - 0xFF, 0xFF, 0xF9, 0xB1, 0x80, 0xEC, 0x7B, 0xFF, - 0xEF, 0xFF, 0xFF, 0xFF, 0xF1, 0x90, 0x00, 0xE4, - 0x7B, 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8C, - 0xC0, 0x7C, 0x79, 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, - 0xE3, 0x80, 0x00, 0x7C, 0x7C, 0xFF, 0xCF, 0xFF, - 0xFF, 0xFF, 0xE3, 0x80, 0x00, 0x7F, 0x77, 0xFF, - 0xDF, 0xFF, 0xFF, 0xFF, 0x87, 0x00, 0x00, 0x3F, - 0x3F, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0x0E, 0x00, - 0x00, 0x3F, 0xBF, 0xFF, 0x9F, 0xFF, 0xFF, 0xFF, - 0x1E, 0x00, 0x00, 0x1F, 0x9F, 0xFF, 0x3F, 0xFF, - 0xFF, 0xFE, 0x1C, 0x00, 0x00, 0x1F, 0x9F, 0xFF, - 0x7F, 0xFF, 0xFF, 0xFE, 0x3C, 0x00, 0x00, 0x1F, - 0x8F, 0xFE, 0x7F, 0xFF, 0xFF, 0xFC, 0x7C, 0x00, - 0x00, 0x0F, 0xC7, 0xFC, 0xFF, 0xFF, 0xFF, 0xFC, - 0xF8, 0x00, 0x00, 0x0F, 0xF7, 0xF9, 0xFF, 0xFF, - 0xFF, 0xFC, 0xF8, 0x00, 0x00, 0x07, 0xFB, 0xF3, - 0xFF, 0xFF, 0xFF, 0xF8, 0xF8, 0x00, 0x00, 0x07, - 0xFD, 0xE7, 0xFF, 0xFF, 0xFF, 0xF9, 0xF0, 0x00, - 0x00, 0x03, 0xFE, 0x8F, 0xFF, 0xFF, 0xFF, 0xF1, - 0xF0, 0x00, 0x00, 0x03, 0xFE, 0x1F, 0xFF, 0xFF, - 0xFF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0xFF, 0xBF, - 0xFF, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x00, 0x00, - 0xFE, 0xBF, 0xFF, 0xFF, 0xFF, 0xE3, 0xC0, 0x00, - 0x00, 0x00, 0xFE, 0x3F, 0xFF, 0xFF, 0xFF, 0xC7, - 0xC0, 0x00, 0x00, 0x01, 0xFE, 0xBF, 0xFF, 0xFF, - 0xFF, 0xC7, 0x80, 0x00, 0x00, 0x01, 0xFE, 0x9F, - 0xFF, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x00, 0x01, - 0xFE, 0x07, 0xFF, 0xFF, 0xFF, 0x8F, 0x80, 0x00, - 0x00, 0x01, 0xFE, 0x87, 0xFF, 0xFF, 0xFF, 0x9F, - 0x80, 0x00, 0x00, 0x01, 0xFD, 0x33, 0xFF, 0xFF, - 0xFF, 0x9F, 0x80, 0x00, 0x00, 0x01, 0x80, 0xF3, - 0xFF, 0xFF, 0xFF, 0x9E, 0x80, 0x00, 0x00, 0x03, - 0x8B, 0xF9, 0xFF, 0xFF, 0xFF, 0x9F, 0x80, 0x00, - 0x00, 0x02, 0x27, 0xF8, 0xFF, 0xFF, 0xFF, 0x99, - 0x80, 0x00, 0x00, 0x00, 0x07, 0xF8, 0xFF, 0xFF, - 0xFF, 0x00, 0x80, 0x00, 0x00, 0x01, 0x8F, 0xF8, - 0xFF, 0xFF, 0xFE, 0x20, 0x60, 0x00, 0x00, 0x00, - 0xE3, 0xF8, 0xFF, 0xFF, 0xF8, 0x00, 0x30, 0x00, - 0x00, 0x00, 0xF8, 0x78, 0xFF, 0xFF, 0xC0, 0x40, - 0x38, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x7F, 0xFF, - 0x81, 0x00, 0x1C, 0x00, 0x00, 0x00, 0xFC, 0x20, - 0x7F, 0xFF, 0x90, 0x00, 0x1E, 0x00, 0x00, 0x00, - 0x78, 0x10, 0xFF, 0xFF, 0x80, 0x00, 0x0F, 0x80, - 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x80, 0x00, - 0x07, 0xC0, 0x00, 0x00, 0x00, 0x08, 0xFF, 0xFF, - 0xC0, 0x00, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x04, - 0x7F, 0xFF, 0x80, 0x00, 0x03, 0xC0, 0x00, 0x10, - 0x00, 0x00, 0x1F, 0xFF, 0x80, 0x00, 0x01, 0x80, - 0x00, 0x30, 0x00, 0x00, 0x0F, 0xFF, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x00, 0x01, 0x4F, 0xFF, - 0x80, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, - 0x0F, 0xFF, 0xC0, 0x00, 0x00, 0x80, 0x03, 0xF0, - 0x00, 0x00, 0x8F, 0xFF, 0x80, 0x00, 0x00, 0x40, - 0x0F, 0xF0, 0x00, 0x04, 0x1F, 0xFF, 0x80, 0x00, - 0x00, 0x7F, 0xFF, 0xF0, 0x00, 0x10, 0x1F, 0xFF, - 0xC0, 0x00, 0x00, 0x7F, 0xFF, 0xF0, 0x00, 0x40, - 0xFF, 0xFF, 0x98, 0x00, 0x00, 0xFF, 0xFF, 0xF0, - 0x00, 0x83, 0xFF, 0xFF, 0x81, 0xE0, 0x01, 0xFF, - 0xFF, 0xF8, 0x02, 0x07, 0xFF, 0xFF, 0x80, 0x3F, - 0x07, 0xE0, 0x00, 0x1C, 0x0C, 0x1F, 0xFF, 0xFF, - 0xF8, 0x03, 0xFF, 0x80, 0x00, 0x1F, 0x78, 0x1F, - 0xFF, 0xFF, 0xFF, 0x80, 0x7F, 0x00, 0x07, 0x0F, - 0xF0, 0x7F, 0xFF, 0xFF, 0xFF, 0xFE, 0x0C, 0x07, - 0xFF, 0x83, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0x1F, 0xFF, 0xC0, 0x03, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x07, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -}; - -/* Painted by Johnny Stenback */ - -unsigned char *linux_serial_image __initdata = "\n" -" .u$e.\n" -" .$$$$$:S\n" -" $\"*$/\"*$$\n" -" $.`$ . ^F\n" -" 4k+#+T.$F\n" -" 4P+++\"$\"$\n" -" :R\"+ t$$B\n" -" ___# $$$\n" -" | | R$$k\n" -" dd. | Linux $!$\n" -" ddd | Sparc $9$F\n" -" '!!!!!$ !!#!`\n" -" !!!!!* .!!!!!`\n" -"'!!!!!!!W..e$$!!!!!!` %s\n" -" \"~^^~ ^~~^\n" -"\n"; diff --git a/include/asm-sparc64/processor.h b/include/asm-sparc64/processor.h index 25c907ddbd0f..85eca92eabd3 100644 --- a/include/asm-sparc64/processor.h +++ b/include/asm-sparc64/processor.h @@ -1,4 +1,4 @@ -/* $Id: processor.h,v 1.21 1997/04/14 17:05:18 jj Exp $ +/* $Id: processor.h,v 1.23 1997/04/26 22:52:34 davem Exp $ * include/asm-sparc64/processor.h * * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) @@ -71,7 +71,7 @@ struct thread_struct { #define SPARC_FLAG_32BIT 0x8 /* task is older 32-bit binary */ #define INIT_MMAP { &init_mm, 0xfffff80000000000, 0xfffff80001000000, \ - PAGE_SHARED , VM_READ | VM_WRITE | VM_EXEC } + PAGE_SHARED , VM_READ | VM_WRITE | VM_EXEC, NULL, &init_mm.mmap } #define INIT_TSS { \ /* FPU regs */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ diff --git a/include/asm-sparc64/termbits.h b/include/asm-sparc64/termbits.h index fae8ac1cc6f8..01e8364c66ab 100644 --- a/include/asm-sparc64/termbits.h +++ b/include/asm-sparc64/termbits.h @@ -148,7 +148,13 @@ struct termios { #define HUPCL 0x00000400 #define CLOCAL 0x00000800 #define CBAUDEX 0x00001000 +/* We'll never see these speeds with the Zilogs, but for completeness... */ #define B57600 0x00001001 +#define B115200 0x00001002 +#define B230400 0x00001003 +#define B460800 0x00001004 +/* This is what we can do with the Zilogs. */ +#define B76800 0x00001005 #define CIBAUD 0x100f0000 /* input baud rate (not used) */ #define CMSPAR 0x40000000 /* mark or space (stick) parity */ #define CRTSCTS 0x80000000 /* flow control */ diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h index bd87ebcf563f..b5f2b5f1572f 100644 --- a/include/linux/ext2_fs.h +++ b/include/linux/ext2_fs.h @@ -189,6 +189,7 @@ struct ext2_group_desc #define EXT2_IMMUTABLE_FL 0x00000010 /* Immutable file */ #define EXT2_APPEND_FL 0x00000020 /* writes to file may only append */ #define EXT2_NODUMP_FL 0x00000040 /* do not dump file */ +#define EXT2_NOATIME_FL 0x00000080 /* do not update atime */ #define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ /* @@ -363,7 +364,10 @@ struct ext2_super_block { __u32 s_feature_compat; /* compatible feature set */ __u32 s_feature_incompat; /* incompatible feature set */ __u32 s_feature_ro_compat; /* readonly-compatible feature set */ - __u32 s_reserved[230]; /* Padding to the end of the block */ + __u8 s_uuid[16]; /* 128-bit uuid for volume */ + char s_volume_name[16]; /* volume name */ + char s_last_mounted[64]; /* directory where last mounted */ + __u32 s_reserved[206]; /* Padding to the end of the block */ }; /* @@ -386,6 +390,16 @@ struct ext2_super_block { #define EXT2_GOOD_OLD_INODE_SIZE 128 +/* + * Feature set definitions + */ + +#define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001 + +#define EXT2_FEATURE_COMPAT_SUPP 0 +#define EXT2_FEATURE_INCOMPAT_SUPP 0 +#define EXT2_FEATURE_RO_COMPAT_SUPP EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER + /* * Default values for user and/or group using reserved blocks */ @@ -414,13 +428,6 @@ struct ext2_dir_entry { #define EXT2_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT2_DIR_ROUND) & \ ~EXT2_DIR_ROUND) -/* - * Feature set definitions --- none are defined as of now - */ -#define EXT2_FEATURE_COMPAT_SUPP 0 -#define EXT2_FEATURE_INCOMPAT_SUPP 0 -#define EXT2_FEATURE_RO_COMPAT_SUPP 0 - #ifdef __KERNEL__ /* * Function prototypes diff --git a/include/linux/ext2_fs_sb.h b/include/linux/ext2_fs_sb.h index dd064b86a8aa..9ce7581169e0 100644 --- a/include/linux/ext2_fs_sb.h +++ b/include/linux/ext2_fs_sb.h @@ -60,6 +60,9 @@ struct ext2_sb_info { int s_desc_per_block_bits; int s_inode_size; int s_first_ino; + int s_feature_compat; + int s_feature_incompat; + int s_feature_ro_compat; }; #endif /* _LINUX_EXT2_FS_SB */ diff --git a/include/linux/file.h b/include/linux/file.h index 4ba5311e8f71..0cb531c0c6f1 100644 --- a/include/linux/file.h +++ b/include/linux/file.h @@ -13,16 +13,37 @@ extern inline struct file * fget(unsigned long fd) } extern int __fput(struct file *, struct inode *); +extern void insert_file_free(struct file *file); + +/* It does not matter which list it is on. */ +extern inline void remove_filp(struct file *file) +{ + if(file->f_next) + file->f_next->f_pprev = file->f_pprev; + *file->f_pprev = file->f_next; +} extern inline int fput(struct file *file, struct inode *inode) { int count = file->f_count-1; int error = 0; - if (!count) + if (!count) { error = __fput(file, inode); - file->f_count = count; + file->f_count = 0; + remove_filp(file); + insert_file_free(file); + } else + file->f_count = count; return error; } +extern inline void put_filp(struct file *file) +{ + if(--file->f_count == 0) { + remove_filp(file); + insert_file_free(file); + } +} + #endif diff --git a/include/linux/fs.h b/include/linux/fs.h index 85e04d184807..f706d392110a 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -95,7 +95,6 @@ extern int max_files, nr_files; * Exception: MS_RDONLY is always applied to the entire file system. */ #define IS_RDONLY(inode) (((inode)->i_sb) && ((inode)->i_sb->s_flags & MS_RDONLY)) -#define DO_UPDATE_ATIME(inode) (!((inode)->i_flags & MS_NOATIME) && !IS_RDONLY(inode)) #define IS_NOSUID(inode) ((inode)->i_flags & MS_NOSUID) #define IS_NODEV(inode) ((inode)->i_flags & MS_NODEV) #define IS_NOEXEC(inode) ((inode)->i_flags & MS_NOEXEC) @@ -105,6 +104,8 @@ extern int max_files, nr_files; #define IS_WRITABLE(inode) ((inode)->i_flags & S_WRITE) #define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) #define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE) +#define IS_NOATIME(inode) ((inode)->i_flags & MS_NOATIME) +#define DO_UPDATE_ATIME(inode) (!IS_NOATIME(inode) && !IS_RDONLY(inode)) /* the read-only stuff doesn't really belong here, but any other place is probably as bad and I don't want to create yet another include file. */ @@ -129,7 +130,7 @@ extern int max_files, nr_files; extern void buffer_init(void); extern void inode_init(void); -extern unsigned long file_table_init(unsigned long start, unsigned long end); +extern void file_table_init(void); extern unsigned long name_cache_init(unsigned long start, unsigned long end); typedef char buffer_block[BLOCK_SIZE]; @@ -246,6 +247,7 @@ static inline int buffer_protected(struct buffer_head * bh) #define ATTR_ATIME_SET 128 #define ATTR_MTIME_SET 256 #define ATTR_FORCE 512 /* Not a change, but a change it */ +#define ATTR_ATTR_FLAG 1024 /* * This is the Inode Attributes structure, used for notify_change(). It @@ -265,8 +267,17 @@ struct iattr { time_t ia_atime; time_t ia_mtime; time_t ia_ctime; + unsigned int ia_attr_flags; }; +/* + * This is the inode attributes flag definitions + */ +#define ATTR_FLAG_SYNCRONOUS 1 /* Syncronous write */ +#define ATTR_FLAG_NOATIME 2 /* Don't update atime */ +#define ATTR_FLAG_APPEND 4 /* Append-only file */ +#define ATTR_FLAG_IMMUTABLE 8 /* Immutable file */ + #include struct inode { @@ -305,9 +316,8 @@ struct inode { unsigned char i_dirt; unsigned char i_pipe; unsigned char i_sock; - unsigned char i_seek; - unsigned char i_update; - unsigned short i_writecount; + int i_writecount; + unsigned int i_attr_flags; union { struct pipe_inode_info pipe_i; struct minix_inode_info minix_i; @@ -327,17 +337,21 @@ struct inode { }; struct file { - mode_t f_mode; - loff_t f_pos; - unsigned short f_flags; - unsigned short f_count; - unsigned long f_reada, f_ramax, f_raend, f_ralen, f_rawin; - struct file *f_next, *f_prev; - int f_owner; /* pid or -pgrp where SIGIO should be sent */ - struct inode * f_inode; - struct file_operations * f_op; - unsigned long f_version; - void *private_data; /* needed for tty driver, and maybe others */ + struct file *f_next, **f_pprev; + struct inode *f_inode; + struct file_operations *f_op; + mode_t f_mode; + loff_t f_pos; + unsigned short f_count, f_flags; + unsigned long f_reada, f_ramax, f_raend, f_ralen, f_rawin; + + /* pid or -pgrp where SIGIO should be sent */ + int f_owner; + + unsigned long f_version; + + /* needed for tty driver, and maybe others */ + void *private_data; }; #define FL_POSIX 1 @@ -584,7 +598,7 @@ extern int fs_may_mount(kdev_t dev); extern int fs_may_umount(kdev_t dev, struct inode * mount_root); extern int fs_may_remount_ro(kdev_t dev); -extern struct file *first_file; +extern struct file *inuse_filps; extern struct super_block super_blocks[NR_SUPER]; extern void refile_buffer(struct buffer_head * buf); diff --git a/include/linux/mm.h b/include/linux/mm.h index 9572b3415de9..10bd23bfdc5d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -37,18 +37,15 @@ struct vm_area_struct { unsigned long vm_end; pgprot_t vm_page_prot; unsigned short vm_flags; -/* AVL tree of VM areas per task, sorted by address */ - short vm_avl_height; - struct vm_area_struct * vm_avl_left; - struct vm_area_struct * vm_avl_right; -/* linked list of VM areas per task, sorted by address */ - struct vm_area_struct * vm_next; -/* for areas with inode, the circular list inode->i_mmap */ -/* for shm areas, the circular list of attaches */ -/* otherwise unused */ - struct vm_area_struct * vm_next_share; - struct vm_area_struct * vm_prev_share; -/* more */ + struct vm_area_struct *vm_next; + struct vm_area_struct **vm_pprev; + + /* For areas with inode, the list inode->i_mmap, for shm areas, + * the list of attaches, otherwise unused. + */ + struct vm_area_struct *vm_next_share; + struct vm_area_struct **vm_pprev_share; + struct vm_operations_struct * vm_ops; unsigned long vm_offset; struct inode * vm_inode; @@ -279,8 +276,6 @@ extern unsigned long do_mmap(struct file * file, unsigned long addr, unsigned lo unsigned long prot, unsigned long flags, unsigned long off); extern void merge_segments(struct mm_struct *, unsigned long, unsigned long); extern void insert_vm_struct(struct mm_struct *, struct vm_area_struct *); -extern void remove_shared_vm_struct(struct vm_area_struct *); -extern void build_mmap_avl(struct mm_struct *); extern void exit_mmap(struct mm_struct *); extern int do_munmap(unsigned long, size_t); extern unsigned long get_unmapped_area(unsigned long, unsigned long); @@ -325,38 +320,30 @@ static inline int expand_stack(struct vm_area_struct * vma, unsigned long addres return 0; } -#define avl_empty (struct vm_area_struct *) NULL - /* Look up the first VMA which satisfies addr < vm_end, NULL if none. */ static inline struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr) { - struct vm_area_struct * result = NULL; + struct vm_area_struct *vma = NULL; if (mm) { - struct vm_area_struct ** next = &mm->mmap_avl; - for (;;) { - struct vm_area_struct *tree = *next; - if (tree == avl_empty) - break; - next = &tree->vm_avl_right; - if (tree->vm_end <= addr) - continue; - next = &tree->vm_avl_left; - result = tree; - if (tree->vm_start <= addr) - break; + /* Check the cache first. */ + vma = mm->mmap_cache; + if(!vma || (vma->vm_end <= addr) || (vma->vm_start > addr)) { + vma = mm->mmap; + while(vma && vma->vm_end <= addr) + vma = vma->vm_next; + mm->mmap_cache = vma; } } - return result; + return vma; } /* Look up the first VMA which intersects the interval start_addr..end_addr-1, NULL if none. Assume start_addr < end_addr. */ static inline struct vm_area_struct * find_vma_intersection(struct mm_struct * mm, unsigned long start_addr, unsigned long end_addr) { - struct vm_area_struct * vma; + struct vm_area_struct * vma = find_vma(mm,start_addr); - vma = find_vma(mm,start_addr); if (vma && end_addr <= vma->vm_start) vma = NULL; return vma; diff --git a/include/linux/sched.h b/include/linux/sched.h index c8ec07ab4a47..fab7bfb38005 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1,14 +1,6 @@ #ifndef _LINUX_SCHED_H #define _LINUX_SCHED_H -/* - * define DEBUG if you want the wait-queues to have some extra - * debugging code. It's not normally used, but might catch some - * wait-queue coding errors. - * - * #define DEBUG - */ - #include /* for HZ */ extern unsigned long event; @@ -149,29 +141,27 @@ struct fs_struct { } struct mm_struct { - int count; + struct vm_area_struct *mmap, *mmap_cache; pgd_t * pgd; + int count; + struct semaphore mmap_sem; unsigned long context; unsigned long start_code, end_code, start_data, end_data; unsigned long start_brk, brk, start_stack, start_mmap; unsigned long arg_start, arg_end, env_start, env_end; unsigned long rss, total_vm, locked_vm; unsigned long def_flags; - struct vm_area_struct * mmap; - struct vm_area_struct * mmap_avl; - struct semaphore mmap_sem; }; -#define INIT_MM { \ - 1, \ - swapper_pg_dir, \ - 0, \ - 0, 0, 0, 0, \ - 0, 0, 0, 0, \ - 0, 0, 0, 0, \ - 0, 0, 0, \ - 0, \ - &init_mmap, &init_mmap, MUTEX } +#define INIT_MM { \ + &init_mmap, NULL, swapper_pg_dir, 1, \ + MUTEX, \ + 0, \ + 0, 0, 0, 0, \ + 0, 0, 0, 0, \ + 0, 0, 0, 0, \ + 0, 0, 0, \ + 0 } struct signal_struct { atomic_t count; @@ -200,8 +190,6 @@ struct task_struct { struct linux_binfmt *binfmt; struct task_struct *next_task, *prev_task; struct task_struct *next_run, *prev_run; - unsigned long saved_kernel_stack; - unsigned long kernel_stack_page; int exit_code, exit_signal; /* ??? */ unsigned long personality; @@ -222,6 +210,14 @@ struct task_struct { * p->p_pptr->pid) */ struct task_struct *p_opptr, *p_pptr, *p_cptr, *p_ysptr, *p_osptr; + + /* PID hash table linkage. */ + struct task_struct *pidhash_next; + struct task_struct **pidhash_pprev; + + /* Pointer to task[] array linkage. */ + struct task_struct **tarray_ptr; + struct wait_queue *wait_chldexit; /* for wait4() */ unsigned short uid,euid,suid,fsuid; unsigned short gid,egid,sgid,fsgid; @@ -260,6 +256,7 @@ struct task_struct { /* signal handlers */ struct signal_struct *sig; /* SMP state */ + int has_cpu; int processor; int last_processor; int lock_depth; /* Lock depth. We can context switch in and out of holding a syscall kernel lock... */ @@ -304,11 +301,13 @@ struct task_struct { /* exec domain */&default_exec_domain, \ /* binfmt */ NULL, \ /* schedlink */ &init_task,&init_task, &init_task, &init_task, \ -/* stack */ 0,(unsigned long) &init_kernel_stack, \ /* ec,brk... */ 0,0,0,0,0, \ /* pid etc.. */ 0,0,0,0,0, \ /* suppl grps*/ 0, {0,}, \ -/* proc links*/ &init_task,&init_task,NULL,NULL,NULL,NULL, \ +/* proc links*/ &init_task,&init_task,NULL,NULL,NULL, \ +/* pidhash */ NULL, NULL, \ +/* tarray */ &task[0], \ +/* chld wait */ NULL, \ /* uid etc */ 0,0,0,0,0,0,0,0, \ /* timeout */ 0,SCHED_OTHER,0,0,0,0,0,0,0, \ /* timer */ { NULL, NULL, 0, 0, it_real_fn }, \ @@ -326,14 +325,85 @@ struct task_struct { /* files */ &init_files, \ /* mm */ &init_mm, \ /* signals */ &init_signals, \ -/* SMP */ 0,0,0, \ +/* SMP */ 0,0,0,0, \ +/* lock */ SPIN_LOCK_UNLOCKED \ } +union task_union { + struct task_struct task; + unsigned long stack[2048]; +}; + +extern union task_union init_task_union; + extern struct mm_struct init_mm; -extern struct task_struct init_task; extern struct task_struct *task[NR_TASKS]; extern struct task_struct *last_task_used_math; +extern struct task_struct **tarray_freelist; +extern spinlock_t taskslot_lock; + +extern __inline__ void add_free_taskslot(struct task_struct **t) +{ + spin_lock(&taskslot_lock); + *t = (struct task_struct *) tarray_freelist; + tarray_freelist = t; + spin_unlock(&taskslot_lock); +} + +extern __inline__ struct task_struct **get_free_taskslot(void) +{ + struct task_struct **tslot; + + spin_lock(&taskslot_lock); + if((tslot = tarray_freelist) != NULL) + tarray_freelist = (struct task_struct **) *tslot; + spin_unlock(&taskslot_lock); + + return tslot; +} + +/* PID hashing. */ +#define PIDHASH_SZ (NR_TASKS >> 2) +extern struct task_struct *pidhash[PIDHASH_SZ]; +extern spinlock_t pidhash_lock; + +#define pid_hashfn(x) ((((x) >> 8) ^ (x)) & (PIDHASH_SZ - 1)) + +extern __inline__ void hash_pid(struct task_struct *p) +{ + struct task_struct **htable = &pidhash[pid_hashfn(p->pid)]; + + spin_lock(&pidhash_lock); + if((p->pidhash_next = *htable) != NULL) + (*htable)->pidhash_pprev = &p->pidhash_next; + *htable = p; + p->pidhash_pprev = htable; + spin_unlock(&pidhash_lock); +} + +extern __inline__ void unhash_pid(struct task_struct *p) +{ + spin_lock(&pidhash_lock); + if(p->pidhash_next) + p->pidhash_next->pidhash_pprev = p->pidhash_pprev; + *p->pidhash_pprev = p->pidhash_next; + spin_unlock(&pidhash_lock); +} + +extern __inline__ struct task_struct *find_task_by_pid(int pid) +{ + struct task_struct **htable = &pidhash[pid_hashfn(pid)]; + struct task_struct *p; + + spin_lock(&pidhash_lock); + for(p = *htable; p && p->pid != pid; p = p->pidhash_next) + ; + spin_unlock(&pidhash_lock); + + return p; +} + #include extern unsigned long volatile jiffies; @@ -425,15 +495,15 @@ extern inline void __add_wait_queue(struct wait_queue ** p, struct wait_queue * wait->next = next; } -extern spinlock_t waitqueue_lock; +extern rwlock_t waitqueue_lock; extern inline void add_wait_queue(struct wait_queue ** p, struct wait_queue * wait) { unsigned long flags; - spin_lock_irqsave(&waitqueue_lock, flags); + write_lock_irqsave(&waitqueue_lock, flags); __add_wait_queue(p, wait); - spin_unlock_irqrestore(&waitqueue_lock, flags); + write_unlock_irqrestore(&waitqueue_lock, flags); } extern inline void __remove_wait_queue(struct wait_queue ** p, struct wait_queue * wait) @@ -454,9 +524,9 @@ extern inline void remove_wait_queue(struct wait_queue ** p, struct wait_queue * { unsigned long flags; - spin_lock_irqsave(&waitqueue_lock, flags); + write_lock_irqsave(&waitqueue_lock, flags); __remove_wait_queue(p, wait); - spin_unlock_irqrestore(&waitqueue_lock, flags); + write_unlock_irqrestore(&waitqueue_lock, flags); } extern inline void poll_wait(struct wait_queue ** wait_address, poll_table * p) diff --git a/include/linux/slab.h b/include/linux/slab.h index ccd2ba1d376a..d72ed0f35853 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -54,6 +54,7 @@ extern int get_slabinfo(char *); /* System wide slabs. */ extern kmem_cache_t *vm_area_cachep; +extern kmem_cache_t *mm_cachep; #endif /* __KERNEL__ */ diff --git a/include/linux/zorro.h b/include/linux/zorro.h index e19289877e70..7583bd9d0a67 100644 --- a/include/linux/zorro.h +++ b/include/linux/zorro.h @@ -626,645 +626,6 @@ extern u_long zorro_unused_z2ram[4]; #define Z2RAM_CHUNKSHIFT (16) -/* - * Verbose Board Identification - */ - -extern void zorro_identify(void); -extern int zorro_get_list(char *buffer); - -#endif /* !__ASSEMBLY__ */ -#endif /* __KERNEL__ */ - -#endif /* __ZORRO_H */ -/* - * linux/zorro.h -- Amiga AutoConfig (Zorro) Expansion Device Definitions - * - * Copyright (C) 1995 Geert Uytterhoeven - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive - * for more details. - */ - -#ifndef __ZORRO_H -#define __ZORRO_H - -#ifndef __ASSEMBLY__ - -/* - * Defined Board Manufacturers - * - * Please update arch/m68k/amiga/zorro.c if you make changes here - * Many IDs were obtained from ExpName/Identify ((C) Richard Körber) - * and by looking at the NetBSD-Amiga kernel sources - */ - -#define MANUF_PACIFIC (0x00D3) /* Pacific Peripherals */ -#define PROD_SE_2000_A500 (0x00) /* SE 2000 A500 */ -#define PROD_PACIFIC_HD (0x0A) /* HD Controller */ - -#define MANUF_KUPKE (0x00DD) /* Kupke */ -#define PROD_GOLEM_BOX_2 (0x00) /* Golem RAM Box 2MB */ - -#define MANUF_MEMPHIS (0x0100) /* Memphis */ -#define PROD_STORMBRINGER (0x00) /* Stormbringer */ - -#define MANUF_3_STATE (0x0200) /* 3-State */ -#define PROD_MEGAMIX_2000 (0x02) /* Megamix 2000 RAM */ - -#define MANUF_COMMODORE2 (0x0201) /* Commodore Braunschweig */ -#define PROD_A2088 (0x01) /* CBM A2088 XT Bridgeboard */ -#define PROD_A2286 (0x02) /* CBM A2286 AT Bridgeboard */ -#define PROD_A4091_2 (0x54) /* CBM A4091 SCSI Controller */ -#define PROD_A2386SX (0x67) /* CBM A2386-SX Bridgeboard */ - -#define MANUF_COMMODORE (0x0202) /* Commodore West Chester */ -#define PROD_A2090A (0x01) /* CBM A2090/A2090A HD Controller */ -#define PROD_A590 (0x02) /* CBM A590 SCSI Controller */ -#define PROD_A2091 (0x03) /* CBM A2091 SCSI Controller */ -#define PROD_A2090B (0x04) /* CBM A2090B 2090 Autoboot Card */ -#define PROD_ARCNET (0x09) /* CBM A2060 Arcnet Card */ -#define PROD_CBMRAM (0x0A) /* CBM A2052/58.RAM | 590/2091.RAM */ -#define PROD_A560RAM (0x20) /* CBM A560 Memory Module */ -#define PROD_A2232PROTO (0x45) /* CBM A2232 Serial Prototype */ -#define PROD_A2232 (0x46) /* CBM A2232 Serial Production */ -#define PROD_A2620 (0x50) /* CBM A2620 68020/RAM Card */ -#define PROD_A2630 (0x51) /* CBM A2630 68030/RAM Card */ -#define PROD_A4091 (0x54) /* CBM A4091 SCSI Controller */ -#define PROD_A2065_2 (0x5A) /* A2065 Ethernet Card */ -#define PROD_ROMULATOR (0x60) /* CBM Romulator Card */ -#define PROD_A3000TESTFIX (0x61) /* CBM A3000 Test Fixture */ -#define PROD_A2386SX_2 (0x67) /* A2386-SX Bridgeboard */ -#define PROD_A2065 (0x70) /* CBM A2065 Ethernet Card */ - -#define MANUF_COMMODORE3 (0x0203) /* Commodore West Chester */ -#define PROD_A2090A_CM (0x03) /* A2090A Combitec/MacroSystem */ - -#define MANUF_KCS (0x02FF) /* Kolff Computer Supplies */ -#define PROD_POWER_BOARD (0x00) /* KCS Power PC Board */ - -#define MANUF_CARDCO (0x03EC) /* Cardco */ -#define PROD_KRONOS_2000_SCSI (0x04) /* Kronos 2000 SCSI Controller */ -#define PROD_A1000_SCSI (0x0C) /* A1000 SCSI Controller */ -#define PROD_ESCORT_SCSI (0x0E) /* Escort SCSI Controller */ -#define PROD_CC_A2410 (0xF5) /* Cardco A2410 Hires Graphics Card */ - -#define MANUF_A_SQUARED (0x03ED) /* A-Squared */ -#define PROD_LIVE_2000 (0x01) /* Live! 2000 */ - -#define MANUF_COMSPEC (0x03EE) /* ComSpec Communications */ -#define PROD_AX2000 (0x01) /* AX2000 */ - -#define MANUF_ANAKIN (0x03F1) /* Anakin */ -#define PROD_EASYL (0x01) /* Easyl Tablet */ - -#define MANUF_MICROBOTICS (0x03F2) /* MicroBotics */ -#define PROD_STARBOARD_II (0x00) /* StarBoard II */ -#define PROD_STARDRIVE (0x02) /* StarDrive */ -#define PROD_8_UP_A (0x03) /* 8-Up (Rev A) */ -#define PROD_8_UP_Z (0x04) /* 8-Up (Rev Z) */ -#define PROD_DELTA_RAM (0x20) /* Delta Card RAM */ -#define PROD_8_STAR_RAM (0x40) /* 8-Star RAM */ -#define PROD_8_STAR (0x41) /* 8-Star */ -#define PROD_VXL_RAM (0x44) /* VXL RAM */ -#define PROD_VXL_30 (0x45) /* VXL-30 Turbo Board */ -#define PROD_DELTA (0x60) /* Delta Card */ -#define PROD_MBX_1200 (0x81) /* MBX 1200 */ -#define PROD_HARDFRAME_2000 (0x9E) /* Hardframe 2000 */ -#define PROD_MBX_1200_2 (0xC1) /* MBX 1200 */ - -#define MANUF_ACCESS (0x03F4) /* Access Associates */ - -#define MANUF_EXPANSION_TECH (0x03F6) /* Expansion Technologies */ - -#define MANUF_ASDG (0x03FF) /* ASDG */ -#define PROD_ASDG_MEMORY (0x01) /* Memory Expansion */ -#define PROD_ASDG_MEMORY_2 (0x02) /* Memory Expansion */ -#define PROD_LAN_ROVER (0xFE) /* Lan Rover Ethernet */ -#define PROD_TWIN_X (0xFF) /* Twin-X Serial Card */ - -#define MANUF_IMTRONICS (0x0404) /* Imtronics */ -#define PROD_HURRICANE_2800 (0x39) /* Hurricane 2800 68030 */ -#define PROD_HURRICANE_2800_2 (0x57) /* Hurricane 2800 68030 */ - -#define MANUF_UNIV_OF_LOWELL (0x0406) /* University of Lowell */ -#define PROD_A2410 (0x00) /* CBM A2410 Hires Graphics Card */ - -#define MANUF_AMERISTAR (0x041D) /* Ameristar */ -#define PROD_AMERISTAR2065 (0x01) /* A2065 Ethernet Card */ -#define PROD_A560 (0x09) /* Arcnet Card */ -#define PROD_A4066 (0x0A) /* A4066 Ethernet Card */ - -#define MANUF_SUPRA (0x0420) /* Supra */ -#define PROD_SUPRADRIVE_4x4 (0x01) /* SupraDrive 4x4 SCSI Controller */ -#define PROD_SUPRA_2000 (0x03) /* 2000 DMA HD */ -#define PROD_SUPRA_500 (0x05) /* 500 HD/RAM */ -#define PROD_SUPRA_500XP (0x09) /* 500XP/2000 RAM */ -#define PROD_SUPRA_500RX (0x0A) /* 500RX/2000 RAM */ -#define PROD_SUPRA_2400ZI (0x0B) /* 2400zi Modem */ -#define PROD_WORDSYNC (0x0C) /* Supra Wordsync SCSI Controller */ -#define PROD_WORDSYNC_II (0x0D) /* Supra Wordsync II SCSI Controller */ -#define PROD_SUPRA_2400ZIPLUS (0x10) /* 2400zi+ Modem */ - -#define MANUF_CSA (0x0422) /* Computer Systems Ass. */ -#define PROD_MAGNUM (0x11) /* Magnum 40 SCSI Controller */ -#define PROD_12GAUGE (0x15) /* 12 Gauge SCSI Controller */ - -#define MANUF_MTEC2 (0x0502) /* M-Tech */ -#define PROD_AT500_2 (0x03) /* AT500 RAM */ - -#define MANUF_GVP3 (0x06E1) /* Great Valley Products */ -#define PROD_IMPACT (0x08) /* Impact SCSI/Memory */ - -#define MANUF_BYTEBOX (0x07DA) /* ByteBox */ -#define PROD_BYTEBOX_A500 (0x00) /* A500 */ - -#define MANUF_HACKER (0x07DB) /* Test only: no product definitions */ - -#define MANUF_POWER_COMPUTING (0x07DC) /* Power Computing (DKB) */ -#define PROD_DKB_3128 (0x0E) /* DKB 3128 RAM */ -#define PROD_RAPID_FIRE (0x0F) /* Rapid Fire SCSI Controller */ -#define PROD_DKB_1202 (0x10) /* DKB 1202 RAM */ -#define PROD_VIPER_II_COBRA (0x12) /* Viper II Turbo Board (DKB Cobra) */ -#define PROD_WILDFIRE_060 (0x17) /* WildFire 060 Turbo Board */ -#define PROD_WILDFIRE_060_2 (0xFF) /* WildFire 060 Turbo Board */ - -#define MANUF_GVP (0x07E1) /* Great Valley Products */ -#define PROD_IMPACT_I_4K (0x01) /* Impact Series-I SCSI 4K */ -#define PROD_IMPACT_I_16K_2 (0x02) /* Impact Series-I SCSI 16K/2 */ -#define PROD_IMPACT_I_16K_3 (0x03) /* Impact Series-I SCSI 16K/3 */ -#define PROD_IMPACT_3001_IDE (0x08) /* Impact 3001 IDE */ -#define PROD_IMPACT_3001_RAM (0x09) /* Impact 3001 RAM */ -#define PROD_GVPIISCSI (0x0B) /* GVP Series II SCSI Controller */ -#define PROD_GVPIISCSI_2 (0x09) /* evidence that the driver works - for this product code also */ -#define PROD_GVPIIRAM (0x0A) /* GVP Series II RAM */ -#define PROD_GVP (0x0B) /* This code is used by a wide range of - GVP products - use the epc to - identify it correctly */ -#define PROD_GVP_A2000_030 (0x0D) /* GVP A2000 68030 Turbo Board */ -#define PROD_IMPACT_3001_IDE_2 (0x0D) /* Impact 3001 IDE */ -#define PROD_GFORCE_040_SCSI (0x16) /* GForce 040 with SCSI (new) */ -#define PROD_GVPIV_24 (0x20) /* GVP IV-24 Graphics Board */ -#define PROD_GFORCE_040 (0xFF) /* GForce 040 Turbo Board */ -/* #define PROD_GVPIO_EXT (0xFF)*/ /* GVP I/O Extender */ - -#define MANUF_SYNERGY (0x07E5) /* Synergy */ - -#define MANUF_XETEC (0x07E6) /* Xetec */ -#define PROD_FASTCARD_SCSI (0x01) /* FastCard SCSI Controller */ -#define PROD_FASTCARD_RAM (0x02) /* FastCard RAM */ - -#define MANUF_PPI (0x07EA) /* Progressive Peripherals Inc. */ -#define PROD_MERCURY (0x00) /* Mercury Turbo Board */ -#define PROD_PPS_A3000_040 (0x01) /* PP&S A3000 68040 Turbo Board */ -#define PROD_PPS_A2000_040 (0x69) /* PP&S A2000 68040 Turbo Board */ -#define PROD_ZEUS (0x96) /* Zeus SCSI Controller */ -#define PROD_PPS_A500_040 (0xBB) /* PP&S A500 68040 Turbo Board */ - -#define MANUF_XEBEC (0x07EC) /* Xebec */ - -#define MANUF_SPIRIT (0x07F2) /* Spirit */ -#define PROD_HDA_506 (0x04) /* HDA 506 Harddisk */ -#define PROD_OCTABYTE_RAM (0x06) /* OctaByte RAM */ - -#define MANUF_BSC (0x07FE) /* BSC */ -#define PROD_ALF_3_SCSI (0x03) /* BSC ALF 3 SCSI Controller */ - -#define MANUF_BSC3 (0x0801) /* BSC */ -#define PROD_ALF_2_SCSI (0x01) /* ALF 2 SCSI Controller */ -#define PROD_ALF_2_SCSI_2 (0x02) /* ALF 2 SCSI Controller */ -#define PROD_ALF_3_SCSI_2 (0x03) /* ALF 3 SCSI Controller */ - -#define MANUF_C_LTD (0x0802) /* C Ltd. */ -#define PROD_KRONOS_SCSI (0x04) /* Kronos SCSI Controller */ -#define PROD_A1000_SCSI_2 (0x0C) /* A1000 SCSI Controller */ - -#define MANUF_JOCHHEIM (0x0804) /* Jochheim */ -#define PROD_JOCHHEIM_RAM (0x01) /* Jochheim RAM */ - -#define MANUF_CHECKPOINT (0x0807) /* Checkpoint Technologies */ -#define PROD_SERIAL_SOLUTION (0x00) /* Serial Solution */ - -#define MANUF_ICD (0x0817) /* ICD */ -#define PROD_ADVANTAGE_2000 (0x01) /* Advantage 2000 SCSI Controller */ - -#define MANUF_KUPKE2 (0x0819) /* Kupke */ -#define PROD_KUPKE_SCSI_II (0x02) /* Golem SCSI-II Controller */ -#define PROD_GOLEM_BOX (0x03) /* Golem Box */ -#define PROD_KUPKE_TURBO (0x04) /* 030/882 Turbo Board */ -#define PROD_KUPKE_SCSI_AT (0x05) /* SCSI/AT Controller */ - -#define MANUF_GVP4 (0x081D) /* Great Valley Products */ -#define PROD_A2000_RAM8 (0x09) /* A2000-RAM8/2 */ - -#define MANUF_INTERWORKS_NET (0x081E) /* Interworks Network */ - -#define MANUF_HARDITAL (0x0820) /* Hardital Synthesis */ -#define PROD_TQM (0x14) /* TQM 68030+68882 Turbo Board */ - -#define MANUF_BSC2 (0x082C) /* BSC */ -#define PROD_OKTAGON_SCSI (0x05) /* BSC Oktagon 2008 SCSI Controller */ -#define PROD_TANDEM (0x06) /* BSC Tandem AT-2008/508 IDE */ -#define PROD_ALPHA_RAM_1200 (0x07) /* Alpha RAM 1200 */ -#define PROD_OKTAGON_RAM (0x08) /* BSC Oktagon 2008 RAM */ -#define PROD_MULTIFACE_I (0x10) /* Alfa Data MultiFace I */ -#define PROD_MULTIFACE_II (0x11) /* Alfa Data MultiFace II */ -#define PROD_MULTIFACE_III (0x12) /* Alfa Data MultiFace III */ -#define PROD_BSC_FRAEMBUFFER (0x20) /* Framebuffer */ -#define PROD_GRAFFITI_RAM (0x21) /* Graffiti Graphics Board */ -#define PROD_GRAFFITI_REG (0x22) -#define PROD_ISDN_MASTERCARD (0x40) /* BSC ISDN MasterCard */ -#define PROD_ISDN_MASTERCARD_2 (0x41) /* BSC ISDN MasterCard II */ - -#define MANUF_ADV_SYS_SOFT (0x0836) /* Advanced Systems & Software */ -#define PROD_NEXUS_SCSI (0x01) /* Nexus SCSI Controller */ -#define PROD_NEXUS_RAM (0x08) /* Nexus RAM */ - -#define MANUF_IMPULSE (0x0838) /* Impulse */ -#define PROD_FIRECRACKER_24 (0x00) /* FireCracker 24 */ - -#define MANUF_IVS (0x0840) /* IVS */ -#define PROD_GRANDSLAM_PIC_2 (0x02) /* GrandSlam PIC 2 RAM */ -#define PROD_GRANDSLAM_PIC_1 (0x04) /* GrandSlam PIC 1 RAM */ -#define PROD_IVS_OVERDRIVE (0x10) /* OverDrive HD */ -#define PROD_TRUMPCARD_CLASSIC (0x30) /* Trumpcard Classic SCSI Controller */ -#define PROD_TRUMPCARD_PRO (0x34) /* Trumpcard Pro SCSI Controller */ -#define PROD_META_4 (0x40) /* Meta-4 RAM */ -#define PROD_WAVETOOLS (0xBF) /* Wavetools Sound Board */ -#define PROD_VECTOR (0xF3) /* Vector SCSI Controller */ -#define PROD_VECTOR_2 (0xF4) /* Vector SCSI Controller */ - -#define MANUF_VECTOR (0x0841) /* Vector */ -#define PROD_CONNECTION (0xE3) /* Connection Serial IO */ - -#define MANUF_XPERT_PRODEV (0x0845) /* XPert/ProDev */ -#define PROD_VISIONA_RAM (0x01) /* Visiona Graphics Board */ -#define PROD_VISIONA_REG (0x02) -#define PROD_MERLIN_RAM (0x03) /* Merlin Graphics Board */ -#define PROD_MERLIN_REG (0x04) -#define PROD_MERLIN_REG_2 (0xC9) - -#define MANUF_HYDRA_SYSTEMS (0x0849) /* Hydra Systems */ -#define PROD_AMIGANET (0x01) /* Amiganet Board */ - -#define MANUF_SUNRIZE (0x084F) /* Sunrize Industries */ -#define PROD_AD1012 (0x01) /* AD1012 Sound Board */ -#define PROD_AD516 (0x02) /* AD516 Sound Board */ -#define PROD_DD512 (0x03) /* DD512 Sound Board */ - -#define MANUF_TRICERATOPS (0x0850) /* Triceratops */ -#define PROD_TRICERATOPS (0x01) /* Triceratops Multi I/O Board */ - -#define MANUF_APPLIED_MAGIC (0x0851) /* Applied Magic Inc */ -#define PROD_DMI_RESOLVER (0x01) /* DMI Resolver Graphics Board */ -#define PROD_DIGITAL_BCASTER (0x06) /* Digital Broadcaster */ - -#define MANUF_GFX_BASE (0x085E) /* GFX-Base */ -#define PROD_GDA_1_RAM (0x00) /* GDA-1 Graphics Board */ -#define PROD_GDA_1_REG (0x01) - -#define MANUF_ROCTEC (0x0860) /* RocTec */ -#define PROD_RH_800C (0x01) /* RH 800C Hard Disk Controller */ -#define PROD_RH_800C_RAM (0x01) /* RH 800C RAM */ - -#define MANUF_HELFRICH1 (0x0861) /* Helfrich */ -#define PROD_RAINBOW3 (0x21) /* Rainbow3 Graphics Board */ - -#define MANUF_SW_RESULT_ENTS (0x0866) /* Software Result Enterprises */ -#define PROD_GG2PLUS (0x01) /* GG2+ Bus Converter */ - -#define MANUF_MASOBOSHI (0x086D) /* Masoboshi */ -#define PROD_MASTER_CARD_RAM (0x03) /* Master Card RAM */ -#define PROD_MASTER_CARD_SCSI (0x04) /* Master Card SCSI Controller */ -#define PROD_MVD_819 (0x07) /* MVD 819 */ - -#define MANUF_DELACOMP (0x0873) /* DelaComp */ -#define PROD_DELACOMP_RAM_2000 (0x01) /* RAM Expansion 2000 */ - -#define MANUF_VILLAGE_TRONIC (0x0877) /* Village Tronic */ -#define PROD_DOMINO_RAM (0x01) /* Domino Graphics Board */ -#define PROD_DOMINO_REG (0x02) -#define PROD_PICASSO_II_RAM (0x0B) /* Picasso II/II+ Graphics Board */ -#define PROD_PICASSO_II_REG (0x0C) -#define PROD_PICASSO_II_SEGM (0x0D) /* Picasso II/II+ (Segmented Mode) */ -#define PROD_PICASSO_IV (0x15) /* Picassio IV Graphics Board */ -#define PROD_PICASSO_IV_2 (0x16) -#define PROD_PICASSO_IV_3 (0x17) -#define PROD_PICASSO_IV_4 (0x18) -#define PROD_ARIADNE (0xC9) /* Ariadne Ethernet */ - -#define MANUF_UTILITIES_ULTD (0x087B) /* Utilities Unlimited */ -#define PROD_EMPLANT_DELUXE (0x15) /* Emplant Deluxe SCSI Controller */ -#define PROD_EMPLANT_DELUXE2 (0x20) /* Emplant Deluxe SCSI Controller */ - -#define MANUF_AMITRIX (0x0880) /* Amitrix */ -#define PROD_AMITRIX_MULTI_IO (0x01) /* Multi-IO */ -#define PROD_AMITRIX_CD_RAM (0x02) /* CD-RAM Memory */ - -#define MANUF_ARMAX (0x0885) /* ArMax */ -#define PROD_OMNIBUS (0x00) /* OmniBus Graphics Board */ - -#define MANUF_NEWTEK (0x088F) /* NewTek */ -#define PROD_VIDEOTOASTER (0x00) /* VideoToaster */ - -#define MANUF_MTEC (0x0890) /* M-Tech Germany */ -#define PROD_AT500 (0x01) /* AT500 IDE Controller */ -#define PROD_MTEC_68030 (0x03) /* 68030 Turbo Board */ -#define PROD_MTEC_68020I (0x06) /* 68020i Turbo Board */ -#define PROD_MTEC_T1230 (0x20) /* A1200 T68030/42 RTC Turbo Board */ -#define PROD_MTEC_RAM (0x22) /* MTEC 8MB RAM */ - -#define MANUF_GVP2 (0x0891) /* Great Valley Products */ -#define PROD_SPECTRUM_RAM (0x01) /* EGS 28/24 Spectrum Graphics Board */ -#define PROD_SPECTRUM_REG (0x02) - -#define MANUF_HELFRICH2 (0x0893) /* Helfrich */ -#define PROD_PICCOLO_RAM (0x05) /* Piccolo Graphics Board */ -#define PROD_PICCOLO_REG (0x06) -#define PROD_PEGGY_PLUS (0x07) /* PeggyPlus MPEG Decoder Board */ -#define PROD_VIDEOCRUNCHER (0x08) /* VideoCruncher */ -#define PROD_SD64_RAM (0x0A) /* SD64 Graphics Board */ -#define PROD_SD64_REG (0x0B) - -#define MANUF_MACROSYSTEMS (0x089B) /* MacroSystems USA */ -#define PROD_WARP_ENGINE (0x13) /* Warp Engine 40xx SCSI Controller */ - -#define MANUF_ELBOX (0x089E) /* ElBox Computer */ -#define PROD_ELBOX_1200 (0x06) /* Elbox 1200/4 RAM */ - -#define MANUF_HARMS_PROF (0x0A00) /* Harms Professional */ -#define PROD_HARMS_030_PLUS (0x10) /* 030 plus */ -#define PROD_3500_TURBO (0xD0) /* 3500 Turbo board */ - -#define MANUF_MICRONIK (0x0A50) /* Micronik */ -#define PROD_RCA_120 (0x0A) /* RCA 120 RAM */ - -#define MANUF_MEGA_MICRO (0x1000) /* MegaMicro */ -#define PROD_SCRAM_500_SCSI (0x03) /* SCRAM 500 SCSI Controller */ -#define PROD_SCRAM_500_RAM (0x04) /* SCRAM 500 RAM */ - -#define MANUF_IMTRONICS2 (0x1028) /* Imtronics */ -#define PROD_HURRICANE_2800_3 (0x39) /* Hurricane 2800 68030 */ -#define PROD_HURRICANE_2800_4 (0x57) /* Hurricane 2800 68030 */ - -#define MANUF_KUPKE3 (0x1248) /* Kupke */ -#define PROD_GOLEM_3000 (0x01) /* Golem HD 3000 */ - -#define MANUF_ITH (0x1388) /* ITH */ -#define PROD_ISDN_MASTER_II (0x01) /* ISDN-Master II */ - -#define MANUF_VMC (0x1389) /* VMC */ -#define PROD_ISDN_BLASTER_Z2 (0x01) /* ISDN Blaster Z2 */ -#define PROD_HYPERCOM_4 (0x02) /* HyperCom 4 */ - -#define MANUF_INFORMATION (0x157C) /* Information */ -#define PROD_ISDN_ENGINE_I (0x64) /* ISDN Engine I */ - -#define MANUF_VORTEX (0x2017) /* Vortex */ -#define PROD_GOLDEN_GATE_386SX (0x07) /* Golden Gate 80386SX Board */ -#define PROD_GOLDEN_GATE_RAM (0x08) /* Golden Gate RAM */ -#define PROD_GOLDEN_GATE_486 (0x09) /* Golden Gate 80486 Board */ - -#define MANUF_DATAFLYER (0x2062) /* DataFlyer */ -#define PROD_DATAFLYER_4000SXS (0x01) /* DataFlyer 4000SX SCSI Controller */ -#define PROD_DATAFLYER_4000SXR (0x02) /* DataFlyer 4000SX RAM */ - -#define MANUF_READYSOFT (0x2100) /* ReadySoft */ -#define PROD_AMAX (0x01) /* AMax II/IV */ - -#define MANUF_PHASE5 (0x2140) /* Phase5 */ -#define PROD_BLIZZARD_RAM (0x01) /* Blizzard RAM */ -#define PROD_BLIZZARD (0x02) /* Blizzard */ -#define PROD_BLIZZARD_1220_IV (0x06) /* Blizzard 1220-IV Turbo Board */ -#define PROD_FASTLANE_RAM (0x0A) /* FastLane RAM */ -#define PROD_FASTLANE_SCSI (0x0B) /* FastLane/Blizzard 1230-II SCSI/CyberSCSI */ -#define PROD_CYBERSTORM_SCSI (0x0C) /* Blizzard 1220/CyberStorm */ -#define PROD_BLIZZARD_1230_III (0x0D) /* Blizzard 1230-III Turbo Board */ -#define PROD_BLIZZARD_1230_IV (0x11) /* Blizzard 1230-IV/1260 Turbo Board */ -#define PROD_BLIZZARD_2060SCSI (0x18) /* Blizzard 2060 SCSI Controller */ -#define PROD_CYBERSTORM_II (0x19) /* CyberStorm Mk II */ -#define PROD_CYBERVISION (0x22) /* CyberVision64 Graphics Board */ -#define PROD_CYBERVISION3D_PRT (0x32) /* CyberVision64-3D Prototype */ -#define PROD_CYBERVISION3D (0x43) /* CyberVision64-3D Graphics Board */ - -#define MANUF_DPS (0x2169) /* DPS */ -#define PROD_DPS_PAR (0x01) /* Personal Animation Recorder */ - -#define MANUF_APOLLO2 (0x2200) /* Apollo */ -#define PROD_A620 (0x00) /* A620 68020 Accelerator */ -#define PROD_A620_2 (0x01) /* A620 68020 Accelerator */ - -#define MANUF_APOLLO (0x2222) /* Apollo */ -#define PROD_AT_APOLLO (0x22) /* AT-Apollo */ -#define PROD_APOLLO_TURBO (0x23) /* Apollo Turbo Board */ - -#define MANUF_PETSOFF (0x38A5) /* Petsoff LP */ -#define PROD_DELFINA (0x00) /* Delfina DSP */ - -#define MANUF_UWE_GERLACH (0x3FF7) /* Uwe Gerlach */ -#define PROD_UG_RAM_ROM (0xd4) /* RAM/ROM */ - -#define MANUF_MACROSYSTEMS2 (0x4754) /* MacroSystems Germany */ -#define PROD_MAESTRO (0x03) /* Maestro */ -#define PROD_VLAB (0x04) /* VLab */ -#define PROD_MAESTRO_PRO (0x05) /* Maestro Pro */ -#define PROD_RETINA_Z2 (0x06) /* Retina Z2 Graphics Board */ -#define PROD_MULTI_EVOLUTION (0x08) /* MultiEvolution */ -#define PROD_TOCCATA (0x0C) /* Toccata Sound Board */ -#define PROD_RETINA_Z3 (0x10) /* Retina Z3 Graphics Board */ -#define PROD_VLAB_MOTION (0x12) /* VLab Motion */ -#define PROD_ALTAIS (0x13) /* Altais Graphics Board */ -#define PROD_FALCON_040 (0xFD) /* Falcon '040 Turbo Board */ - -#define MANUF_COMBITEC (0x6766) /* Combitec */ - -#define MANUF_SKI (0x8000) /* SKI Peripherals */ -#define PROD_MAST_FIREBALL (0x08) /* M.A.S.T. Fireball SCSI Controller */ -#define PROD_SKI_SCSI_SERIAL (0x80) /* SCSI / Dual Serial */ - -#define MANUF_CAMERON (0xAA01) /* Cameron */ -#define PROD_PERSONAL_A4 (0x10) /* Personal A4 */ - -#define MANUF_REIS_WARE (0xAA11) /* Reis-Ware */ -#define PROD_RW_HANDYSCANNER (0x11) /* Handyscanner */ - - -/* Illegal Manufacturer IDs. These do NOT appear in arch/m68k/amiga/zorro.c! */ - -#define MANUF_HACKER_INC (0x07DB) /* Hacker Inc. */ -#define PROD_HACKER_SCSI (0x01) /* Hacker Inc. SCSI Controller */ - -#define MANUF_RES_MNGT_FORCE (0x07DB) /* Resource Management Force */ -#define PROD_QUICKNET (0x02) /* QuickNet Ethernet */ - -#define MANUF_VECTOR2 (0x07DB) /* Vector */ -#define PROD_CONNECTION_2 (0xE0) /* Vector Connection */ -#define PROD_CONNECTION_3 (0xE1) /* Vector Connection */ -#define PROD_CONNECTION_4 (0xE2) /* Vector Connection */ -#define PROD_CONNECTION_5 (0xE3) /* Vector Connection */ - - -/* - * GVP's identifies most of their product through the 'extended - * product code' (epc). The epc has to be and'ed with the GVP_PRODMASK - * before the identification. - */ - -#define GVP_PRODMASK (0xf8) -#define GVP_SCSICLKMASK (0x01) - -enum GVP_ident { - GVP_GFORCE_040 = 0x20, - GVP_GFORCE_040_SCSI = 0x30, - GVP_A1291_SCSI = 0x40, - GVP_COMBO_R4 = 0x60, - GVP_COMBO_R4_SCSI = 0x70, - GVP_PHONEPAK = 0x78, - GVP_IOEXT = 0x98, - GVP_GFORCE_030 = 0xa0, - GVP_GFORCE_030_SCSI = 0xb0, - GVP_A530 = 0xc0, - GVP_A530_SCSI = 0xd0, - GVP_COMBO_R3 = 0xe0, - GVP_COMBO_R3_SCSI = 0xf0, - GVP_SERIESII = 0xf8, -}; - -enum GVP_flags { - GVP_IO = 0x01, - GVP_ACCEL = 0x02, - GVP_SCSI = 0x04, - GVP_24BITDMA = 0x08, - GVP_25BITDMA = 0x10, - GVP_NOBANK = 0x20, - GVP_14MHZ = 0x40, -}; - - -struct Node { - struct Node *ln_Succ; /* Pointer to next (successor) */ - struct Node *ln_Pred; /* Pointer to previous (predecessor) */ - u_char ln_Type; - char ln_Pri; /* Priority, for sorting */ - char *ln_Name; /* ID string, null terminated */ -}; - -struct ExpansionRom { - /* -First 16 bytes of the expansion ROM */ - u_char er_Type; /* Board type, size and flags */ - u_char er_Product; /* Product number, assigned by manufacturer */ - u_char er_Flags; /* Flags */ - u_char er_Reserved03; /* Must be zero ($ff inverted) */ - u_short er_Manufacturer; /* Unique ID,ASSIGNED BY COMMODORE-AMIGA! */ - u_long er_SerialNumber; /* Available for use by manufacturer */ - u_short er_InitDiagVec; /* Offset to optional "DiagArea" structure */ - u_char er_Reserved0c; - u_char er_Reserved0d; - u_char er_Reserved0e; - u_char er_Reserved0f; -}; - -/* er_Type board type bits */ -#define ERT_TYPEMASK 0xc0 -#define ERT_ZORROII 0xc0 -#define ERT_ZORROIII 0x80 - -/* other bits defined in er_Type */ -#define ERTB_MEMLIST 5 /* Link RAM into free memory list */ -#define ERTF_MEMLIST (1<<5) - -struct ConfigDev { - struct Node cd_Node; - u_char cd_Flags; /* (read/write) */ - u_char cd_Pad; /* reserved */ - struct ExpansionRom cd_Rom; /* copy of board's expansion ROM */ - void *cd_BoardAddr; /* where in memory the board was placed */ - u_long cd_BoardSize; /* size of board in bytes */ - u_short cd_SlotAddr; /* which slot number (PRIVATE) */ - u_short cd_SlotSize; /* number of slots (PRIVATE) */ - void *cd_Driver; /* pointer to node of driver */ - struct ConfigDev *cd_NextCD; /* linked list of drivers to config */ - u_long cd_Unused[4]; /* for whatever the driver wants */ -}; - -#else /* __ASSEMBLY__ */ - -LN_Succ = 0 -LN_Pred = LN_Succ+4 -LN_Type = LN_Pred+4 -LN_Pri = LN_Type+1 -LN_Name = LN_Pri+1 -LN_sizeof = LN_Name+4 - -ER_Type = 0 -ER_Product = ER_Type+1 -ER_Flags = ER_Product+1 -ER_Reserved03 = ER_Flags+1 -ER_Manufacturer = ER_Reserved03+1 -ER_SerialNumber = ER_Manufacturer+2 -ER_InitDiagVec = ER_SerialNumber+4 -ER_Reserved0c = ER_InitDiagVec+2 -ER_Reserved0d = ER_Reserved0c+1 -ER_Reserved0e = ER_Reserved0d+1 -ER_Reserved0f = ER_Reserved0e+1 -ER_sizeof = ER_Reserved0f+1 - -CD_Node = 0 -CD_Flags = CD_Node+LN_sizeof -CD_Pad = CD_Flags+1 -CD_Rom = CD_Pad+1 -CD_BoardAddr = CD_Rom+ER_sizeof -CD_BoardSize = CD_BoardAddr+4 -CD_SlotAddr = CD_BoardSize+4 -CD_SlotSize = CD_SlotAddr+2 -CD_Driver = CD_SlotSize+2 -CD_NextCD = CD_Driver+4 -CD_Unused = CD_NextCD+4 -CD_sizeof = CD_Unused+(4*4) - -#endif /* __ASSEMBLY__ */ - -#ifndef __ASSEMBLY__ - -#define ZORRO_NUM_AUTO 16 - -#ifdef __KERNEL__ - -extern int zorro_num_autocon; /* # of autoconfig devices found */ -extern struct ConfigDev zorro_autocon[ZORRO_NUM_AUTO]; - - -/* - * Zorro Functions - */ - -extern int zorro_find(int manuf, int prod, int part, int index); -extern struct ConfigDev *zorro_get_board(int key); -extern void zorro_config_board(int key, int part); -extern void zorro_unconfig_board(int key, int part); - - -/* - * Bitmask indicating portions of available Zorro II RAM that are unused - * by the system. Every bit represents a 64K chunk, for a maximum of 8MB - * (128 chunks, physical 0x00200000-0x009fffff). - * - * If you want to use (= allocate) portions of this RAM, you should clear - * the corresponding bits. - */ - -extern u_long zorro_unused_z2ram[4]; - -#define Z2RAM_START (0x00200000) -#define Z2RAM_END (0x00a00000) -#define Z2RAM_SIZE (0x00800000) -#define Z2RAM_CHUNKSIZE (0x00010000) -#define Z2RAM_CHUNKMASK (0x0000ffff) -#define Z2RAM_CHUNKSHIFT (16) - - /* * Verbose Board Identification */ diff --git a/init/main.c b/init/main.c index 15ab2176e75d..0d7d8570a465 100644 --- a/init/main.c +++ b/init/main.c @@ -257,7 +257,7 @@ extern void dquot_init(void); static char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, }; static char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, }; -__initfunc(char *get_options(char *str, int *ints)) +char *get_options(char *str, int *ints) { char *cur = str; int i=1; @@ -779,43 +779,11 @@ int cpu_idle(void *unused) extern int cpu_idle(void * unused); -/* - * Activate a secondary processor. - */ - -__initfunc(asmlinkage void start_secondary(void)) -{ - trap_init(); - init_IRQ(); - smp_callin(); - cpu_idle(NULL); -} - - - /* Called by boot processor to activate the rest. */ __initfunc(static void smp_init(void)) { - int i, j; - /* Get other processors into their bootup holding patterns. */ smp_boot_cpus(); - - /* Create the slave init tasks as sharing pid 0. This should only - * happen if we have virtual CPU numbers higher than 0. - */ - for (i=1; iprocessor=j; - } } /* @@ -832,6 +800,8 @@ __initfunc(static void smp_begin(void)) #endif +extern void initialize_secondary(void); + /* * Activate the first processor. */ @@ -840,18 +810,14 @@ __initfunc(asmlinkage void start_kernel(void)) { char * command_line; -/* - * This little check will move. - */ - #ifdef __SMP__ - static int first_cpu=1; - - if(!first_cpu) - start_secondary(); - first_cpu=0; - -#endif + static int boot_cpu = 1; + /* "current" has been set up, we need to load it now */ + if (!boot_cpu) + initialize_secondary(); + boot_cpu = 0; +#endif + /* * Interrupts are still disabled. Do necessary setups, then * enable them @@ -896,7 +862,6 @@ __initfunc(asmlinkage void start_kernel(void)) memory_start = kmem_cache_init(memory_start, memory_end); sti(); calibrate_delay(); - memory_start = file_table_init(memory_start,memory_end); memory_start = name_cache_init(memory_start,memory_end); #ifdef CONFIG_BLK_DEV_INITRD if (initrd_start && !initrd_below_start_ok && initrd_start < memory_start) { @@ -913,6 +878,7 @@ __initfunc(asmlinkage void start_kernel(void)) vma_init(); buffer_init(); inode_init(); + file_table_init(); sock_init(); #if defined(CONFIG_SYSVIPC) || defined(CONFIG_KERNELD) ipc_init(); diff --git a/ipc/shm.c b/ipc/shm.c index ab5974fed58f..d598696a6c08 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -402,42 +402,21 @@ static struct vm_operations_struct shm_vm_ops = { shm_swap_in /* swapin */ }; -/* Insert shmd into the circular list shp->attaches */ +/* Insert shmd into the list shp->attaches */ static inline void insert_attach (struct shmid_ds * shp, struct vm_area_struct * shmd) { - struct vm_area_struct * attaches; - - if ((attaches = shp->attaches)) { - shmd->vm_next_share = attaches; - shmd->vm_prev_share = attaches->vm_prev_share; - shmd->vm_prev_share->vm_next_share = shmd; - attaches->vm_prev_share = shmd; - } else - shp->attaches = shmd->vm_next_share = shmd->vm_prev_share = shmd; + if((shmd->vm_next_share = shp->attaches) != NULL) + shp->attaches->vm_pprev_share = &shmd->vm_next_share; + shp->attaches = shmd; + shmd->vm_pprev_share = &shp->attaches; } -/* Remove shmd from circular list shp->attaches */ +/* Remove shmd from list shp->attaches */ static inline void remove_attach (struct shmid_ds * shp, struct vm_area_struct * shmd) { - if (shmd->vm_next_share == shmd) { - if (shp->attaches != shmd) { - printk("shm_close: shm segment (id=%ld) attach list inconsistent\n", - SWP_OFFSET(shmd->vm_pte) & SHM_ID_MASK); - printk("shm_close: %08lx-%08lx %c%c%c%c %08lx %08lx\n", - shmd->vm_start, shmd->vm_end, - shmd->vm_flags & VM_READ ? 'r' : '-', - shmd->vm_flags & VM_WRITE ? 'w' : '-', - shmd->vm_flags & VM_EXEC ? 'x' : '-', - shmd->vm_flags & VM_MAYSHARE ? 's' : 'p', - shmd->vm_offset, shmd->vm_pte); - } - shp->attaches = NULL; - } else { - if (shp->attaches == shmd) - shp->attaches = shmd->vm_next_share; - shmd->vm_prev_share->vm_next_share = shmd->vm_next_share; - shmd->vm_next_share->vm_prev_share = shmd->vm_prev_share; - } + if(shmd->vm_next_share) + shmd->vm_next_share->vm_pprev_share = shmd->vm_pprev_share; + *shmd->vm_pprev_share = shmd->vm_next_share; } /* @@ -575,7 +554,6 @@ asmlinkage int sys_shmat (int shmid, char *shmaddr, int shmflg, ulong *raddr) shmd->vm_flags = VM_SHM | VM_MAYSHARE | VM_SHARED | VM_MAYREAD | VM_MAYEXEC | VM_READ | VM_EXEC | ((shmflg & SHM_RDONLY) ? 0 : VM_MAYWRITE | VM_WRITE); - shmd->vm_next_share = shmd->vm_prev_share = NULL; shmd->vm_inode = NULL; shmd->vm_offset = 0; shmd->vm_ops = &shm_vm_ops; diff --git a/kernel/exit.c b/kernel/exit.c index d6c43a625565..55a9dbf48316 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -4,8 +4,6 @@ * Copyright (C) 1991, 1992 Linus Torvalds */ -#undef DEBUG_PROC_TREE - #include #include #include @@ -16,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -124,132 +123,28 @@ void notify_parent(struct task_struct * tsk) wake_up_interruptible(&tsk->p_pptr->wait_chldexit); } -void release(struct task_struct * p) +static void release(struct task_struct * p) { - int i; - - if (!p) - return; - if (p == current) { - printk("task releasing itself\n"); - return; - } - for (i=1 ; iprocessor != NO_PROC_ID) - barrier(); - spin_unlock_wait(&scheduler_lock); + /* FIXME! Cheesy, but kills the window... -DaveM */ + while (p->has_cpu) + barrier(); + spin_unlock_wait(&scheduler_lock); #endif - nr_tasks--; - task[i] = NULL; - REMOVE_LINKS(p); - release_thread(p); - if (STACK_MAGIC != *(unsigned long *)p->kernel_stack_page) - printk(KERN_ALERT "release: %s kernel stack corruption. Aiee\n", p->comm); - free_kernel_stack(p->kernel_stack_page); - current->cmin_flt += p->min_flt + p->cmin_flt; - current->cmaj_flt += p->maj_flt + p->cmaj_flt; - current->cnswap += p->nswap + p->cnswap; - free_task_struct(p); - return; - } - panic("trying to release non-existent task"); -} - -#ifdef DEBUG_PROC_TREE -/* - * Check to see if a task_struct pointer is present in the task[] array - * Return 0 if found, and 1 if not found. - */ -int bad_task_ptr(struct task_struct *p) -{ - int i; - - if (!p) - return 0; - for (i=0 ; ip_pptr)) - printk("Warning, pid %d's parent link is bad\n", - task[i]->pid); - if (bad_task_ptr(task[i]->p_cptr)) - printk("Warning, pid %d's child link is bad\n", - task[i]->pid); - if (bad_task_ptr(task[i]->p_ysptr)) - printk("Warning, pid %d's ys link is bad\n", - task[i]->pid); - if (bad_task_ptr(task[i]->p_osptr)) - printk("Warning, pid %d's os link is bad\n", - task[i]->pid); - if (task[i]->p_pptr == task[i]) - printk("Warning, pid %d parent link points to self\n", - task[i]->pid); - if (task[i]->p_cptr == task[i]) - printk("Warning, pid %d child link points to self\n", - task[i]->pid); - if (task[i]->p_ysptr == task[i]) - printk("Warning, pid %d ys link points to self\n", - task[i]->pid); - if (task[i]->p_osptr == task[i]) - printk("Warning, pid %d os link points to self\n", - task[i]->pid); - if (task[i]->p_osptr) { - if (task[i]->p_pptr != task[i]->p_osptr->p_pptr) - printk( - "Warning, pid %d older sibling %d parent is %d\n", - task[i]->pid, task[i]->p_osptr->pid, - task[i]->p_osptr->p_pptr->pid); - if (task[i]->p_osptr->p_ysptr != task[i]) - printk( - "Warning, pid %d older sibling %d has mismatched ys link\n", - task[i]->pid, task[i]->p_osptr->pid); - } - if (task[i]->p_ysptr) { - if (task[i]->p_pptr != task[i]->p_ysptr->p_pptr) - printk( - "Warning, pid %d younger sibling %d parent is %d\n", - task[i]->pid, task[i]->p_osptr->pid, - task[i]->p_osptr->p_pptr->pid); - if (task[i]->p_ysptr->p_osptr != task[i]) - printk( - "Warning, pid %d younger sibling %d has mismatched os link\n", - task[i]->pid, task[i]->p_ysptr->pid); - } - if (task[i]->p_cptr) { - if (task[i]->p_cptr->p_pptr != task[i]) - printk( - "Warning, pid %d youngest child %d has mismatched parent link\n", - task[i]->pid, task[i]->p_cptr->pid); - if (task[i]->p_cptr->p_ysptr) - printk( - "Warning, pid %d youngest child %d has non-NULL ys link\n", - task[i]->pid, task[i]->p_cptr->pid); - } + nr_tasks--; + add_free_taskslot(p->tarray_ptr); + unhash_pid(p); + REMOVE_LINKS(p); + release_thread(p); + current->cmin_flt += p->min_flt + p->cmin_flt; + current->cmaj_flt += p->maj_flt + p->cmaj_flt; + current->cnswap += p->nswap + p->cnswap; + free_task_struct(p); + } else { + printk("task releasing itself\n"); } } -#endif /* DEBUG_PROC_TREE */ /* * This checks not only the pgrp, but falls back on the pid if no @@ -347,17 +242,12 @@ int kill_proc(int pid, int sig, int priv) retval = -EINVAL; if (sig >= 0 && sig <= 32) { - struct task_struct *p; + struct task_struct *p = find_task_by_pid(pid); - retval = -ESRCH; - read_lock(&tasklist_lock); - for_each_task(p) { - if (p->pid != pid) - continue; - retval = send_sig(sig,p,priv); - break; - } - read_unlock(&tasklist_lock); + if(p) + retval = send_sig(sig, p, priv); + else + retval = -ESRCH; } return retval; } @@ -550,7 +440,7 @@ static inline void __exit_mm(struct task_struct * tsk) if (!--mm->count) { exit_mmap(mm); free_page_tables(mm); - kfree(mm); + kmem_cache_free(mm_cachep, mm); } } } @@ -630,7 +520,7 @@ static void exit_notify(void) NORET_TYPE void do_exit(long code) { if (in_interrupt()) { - local_irq_count[smp_processor_id()] = 0; /* Not really correct */ + local_irq_count[hard_smp_processor_id()] = 0; /* Not really correct */ printk("Aiee, killing interrupt handler\n"); } fake_volatile: diff --git a/kernel/fork.c b/kernel/fork.c index 6204ffeaffe4..4175f5e476d5 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -33,9 +33,18 @@ int nr_running=1; unsigned long int total_forks=0; /* Handle normal Linux uptimes. */ int last_pid=0; +/* SLAB cache for mm_struct's. */ +kmem_cache_t *mm_cachep; + +struct task_struct *pidhash[PIDHASH_SZ]; +spinlock_t pidhash_lock = SPIN_LOCK_UNLOCKED; + +struct task_struct **tarray_freelist = NULL; +spinlock_t taskslot_lock = SPIN_LOCK_UNLOCKED; + static inline int find_empty_process(void) { - int i; + struct task_struct **tslot; if (nr_tasks >= NR_TASKS - MIN_TASKS_LEFT_FOR_ROOT) { if (current->uid) @@ -47,6 +56,7 @@ static inline int find_empty_process(void) max_tasks--; /* count the new process.. */ if (max_tasks < nr_tasks) { struct task_struct *p; + read_lock(&tasklist_lock); for_each_task (p) { if (p->uid == current->uid) @@ -58,10 +68,9 @@ static inline int find_empty_process(void) read_unlock(&tasklist_lock); } } - for (i = 0 ; i < NR_TASKS ; i++) { - if (!task[i]) - return i; - } + tslot = get_free_taskslot(); + if(tslot) + return tslot - &task[0]; return -EAGAIN; } @@ -89,12 +98,14 @@ repeat: static inline int dup_mmap(struct mm_struct * mm) { - struct vm_area_struct * mpnt, **p, *tmp; + struct vm_area_struct * mpnt, *tmp, **pprev; - mm->mmap = NULL; - p = &mm->mmap; + mm->mmap = mm->mmap_cache = NULL; flush_cache_mm(current->mm); + pprev = &mm->mmap; for (mpnt = current->mm->mmap ; mpnt ; mpnt = mpnt->vm_next) { + struct inode *inode; + tmp = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL); if (!tmp) { exit_mmap(mm); @@ -105,12 +116,18 @@ static inline int dup_mmap(struct mm_struct * mm) tmp->vm_flags &= ~VM_LOCKED; tmp->vm_mm = mm; tmp->vm_next = NULL; - if (tmp->vm_inode) { - tmp->vm_inode->i_count++; + inode = tmp->vm_inode; + if (inode) { + inode->i_count++; + if (tmp->vm_flags & VM_DENYWRITE) + inode->i_writecount--; + /* insert tmp into the share list, just after mpnt */ - tmp->vm_next_share->vm_prev_share = tmp; + if((tmp->vm_next_share = mpnt->vm_next_share) != NULL) + mpnt->vm_next_share->vm_pprev_share = + &tmp->vm_next_share; mpnt->vm_next_share = tmp; - tmp->vm_prev_share = mpnt; + tmp->vm_pprev_share = &mpnt->vm_next_share; } if (copy_page_range(mm, current->mm, tmp)) { exit_mmap(mm); @@ -119,18 +136,23 @@ static inline int dup_mmap(struct mm_struct * mm) } if (tmp->vm_ops && tmp->vm_ops->open) tmp->vm_ops->open(tmp); - *p = tmp; - p = &tmp->vm_next; + + /* Ok, finally safe to link it in. */ + if((tmp->vm_next = *pprev) != NULL) + (*pprev)->vm_pprev = &tmp->vm_next; + *pprev = tmp; + tmp->vm_pprev = pprev; + + pprev = &tmp->vm_next; } flush_tlb_mm(current->mm); - build_mmap_avl(mm); return 0; } static inline int copy_mm(unsigned long clone_flags, struct task_struct * tsk) { if (!(clone_flags & CLONE_VM)) { - struct mm_struct * mm = kmalloc(sizeof(*tsk->mm), GFP_KERNEL); + struct mm_struct * mm = kmem_cache_alloc(mm_cachep, SLAB_KERNEL); if (!mm) return -1; *mm = *current->mm; @@ -146,7 +168,7 @@ static inline int copy_mm(unsigned long clone_flags, struct task_struct * tsk) if (dup_mmap(mm)) { free_page_tables(mm); free_mm: - kfree(mm); + kmem_cache_free(mm_cachep, mm); return -1; } return 0; @@ -232,20 +254,17 @@ int do_fork(unsigned long clone_flags, unsigned long usp, struct pt_regs *regs) { int nr; int error = -ENOMEM; - unsigned long new_stack; struct task_struct *p; lock_kernel(); p = alloc_task_struct(); if (!p) goto bad_fork; - new_stack = alloc_kernel_stack(p); - if (!new_stack) - goto bad_fork_free_p; + error = -EAGAIN; nr = find_empty_process(); if (nr < 0) - goto bad_fork_free_stack; + goto bad_fork_free; *p = *current; @@ -256,8 +275,6 @@ int do_fork(unsigned long clone_flags, unsigned long usp, struct pt_regs *regs) p->did_exec = 0; p->swappable = 0; - p->kernel_stack_page = new_stack; - *(unsigned long *) p->kernel_stack_page = STACK_MAGIC; p->state = TASK_UNINTERRUPTIBLE; p->flags &= ~(PF_PTRACED|PF_TRACESYS|PF_SUPERPRIV); p->flags |= PF_FORKNOEXEC; @@ -277,12 +294,15 @@ int do_fork(unsigned long clone_flags, unsigned long usp, struct pt_regs *regs) p->utime = p->stime = 0; p->cutime = p->cstime = 0; #ifdef __SMP__ + p->has_cpu = 0; p->processor = NO_PROC_ID; #endif p->lock_depth = 0; p->start_time = jiffies; - task[nr] = p; + p->tarray_ptr = &task[nr]; + *p->tarray_ptr = p; SET_LINKS(p); + hash_pid(p); nr_tasks++; error = -ENOMEM; @@ -334,12 +354,11 @@ bad_fork_cleanup: __MOD_DEC_USE_COUNT(p->exec_domain->module); if (p->binfmt && p->binfmt->module) __MOD_DEC_USE_COUNT(p->binfmt->module); - task[nr] = NULL; + add_free_taskslot(p->tarray_ptr); + unhash_pid(p); REMOVE_LINKS(p); nr_tasks--; -bad_fork_free_stack: - free_kernel_stack(new_stack); -bad_fork_free_p: +bad_fork_free: free_task_struct(p); bad_fork: fork_out: diff --git a/kernel/ksyms.c b/kernel/ksyms.c index f5f202c8e7e2..835833cbc7dc 100644 --- a/kernel/ksyms.c +++ b/kernel/ksyms.c @@ -150,6 +150,7 @@ EXPORT_SYMBOL(lnamei); EXPORT_SYMBOL(open_namei); EXPORT_SYMBOL(sys_close); EXPORT_SYMBOL(close_fp); +EXPORT_SYMBOL(insert_file_free); EXPORT_SYMBOL(check_disk_change); EXPORT_SYMBOL(invalidate_buffers); EXPORT_SYMBOL(invalidate_inodes); diff --git a/kernel/printk.c b/kernel/printk.c index 0d5d619b0932..64d264d63374 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -28,7 +28,7 @@ #include -#define LOG_BUF_LEN 8192 +#define LOG_BUF_LEN (8192*4) static char buf[1024]; diff --git a/kernel/sched.c b/kernel/sched.c index 68be616be61d..0d9edf495e9e 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -88,16 +88,6 @@ unsigned long prof_shift = 0; extern void mem_use(void); -static unsigned long init_kernel_stack[1024] = { STACK_MAGIC, }; -unsigned long init_user_stack[1024] = { STACK_MAGIC, }; -static struct vm_area_struct init_mmap = INIT_MMAP; -static struct fs_struct init_fs = INIT_FS; -static struct files_struct init_files = INIT_FILES; -static struct signal_struct init_signals = INIT_SIGNALS; - -struct mm_struct init_mm = INIT_MM; -struct task_struct init_task = INIT_TASK; - unsigned long volatile jiffies=0; /* @@ -250,7 +240,7 @@ static inline int goodness(struct task_struct * p, struct task_struct * prev, in #ifdef __SMP__ /* Give a largish advantage to the same processor... */ /* (this is equivalent to penalizing other processors) */ - if (p->last_processor == this_cpu) + if (p->processor == this_cpu) weight += PROC_CHANGE_PENALTY; #endif @@ -265,7 +255,7 @@ static inline int goodness(struct task_struct * p, struct task_struct * prev, in #ifdef __SMP__ #define idle_task (task[cpu_number_map[this_cpu]]) -#define can_schedule(p) ((p)->processor == NO_PROC_ID) +#define can_schedule(p) (!(p)->has_cpu) #else @@ -292,12 +282,12 @@ asmlinkage void schedule(void) int this_cpu; need_resched = 0; + prev = current; this_cpu = smp_processor_id(); if (local_irq_count[this_cpu]) { printk("Scheduling in interrupt\n"); *(char *)0 = 0; } - prev = current; release_kernel_lock(prev, this_cpu, lock_depth); if (bh_active & bh_mask) do_bottom_half(); @@ -348,9 +338,7 @@ asmlinkage void schedule(void) * the scheduler lock */ spin_unlock_irq(&runqueue_lock); -#ifdef __SMP__ - prev->processor = NO_PROC_ID; -#endif + prev->has_cpu = 0; /* * Note! there may appear new tasks on the run-queue during this, as @@ -381,8 +369,8 @@ asmlinkage void schedule(void) } } + next->has_cpu = 1; next->processor = this_cpu; - next->last_processor = this_cpu; if (prev != next) { struct timer_list timer; @@ -421,19 +409,22 @@ asmlinkage int sys_pause(void) #endif -spinlock_t waitqueue_lock; +rwlock_t waitqueue_lock; /* * wake_up doesn't wake up stopped processes - they have to be awakened * with signals or similar. + * + * Note that we only need a read lock for the wait queue (and thus do not + * have to protect against interrupts), as the actual removal from the + * queue is handled by the process itself. */ void wake_up(struct wait_queue **q) { - unsigned long flags; struct wait_queue *next; struct wait_queue *head; - spin_lock_irqsave(&waitqueue_lock, flags); + read_lock(&waitqueue_lock); if (q && (next = *q)) { head = WAIT_QUEUE_HEAD(q); while (next != head) { @@ -453,16 +444,15 @@ void wake_up(struct wait_queue **q) break; } } - spin_unlock_irqrestore(&waitqueue_lock, flags); + read_unlock(&waitqueue_lock); } void wake_up_interruptible(struct wait_queue **q) { - unsigned long flags; struct wait_queue *next; struct wait_queue *head; - spin_lock_irqsave(&waitqueue_lock, flags); + read_lock(&waitqueue_lock); if (q && (next = *q)) { head = WAIT_QUEUE_HEAD(q); while (next != head) { @@ -481,7 +471,7 @@ void wake_up_interruptible(struct wait_queue **q) break; } } - spin_unlock_irqrestore(&waitqueue_lock, flags); + read_unlock(&waitqueue_lock); } /* @@ -603,14 +593,14 @@ static inline void __sleep_on(struct wait_queue **p, int state) if (current == task[0]) panic("task[0] trying to sleep"); current->state = state; - spin_lock_irqsave(&waitqueue_lock, flags); + write_lock_irqsave(&waitqueue_lock, flags); __add_wait_queue(p, &wait); - spin_unlock(&waitqueue_lock); + write_unlock(&waitqueue_lock); sti(); schedule(); - spin_lock_irq(&waitqueue_lock); + write_lock_irq(&waitqueue_lock); __remove_wait_queue(p, &wait); - spin_unlock_irqrestore(&waitqueue_lock, flags); + write_unlock_irqrestore(&waitqueue_lock, flags); } void interruptible_sleep_on(struct wait_queue **p) @@ -1338,22 +1328,12 @@ asmlinkage int sys_nice(int increment) #endif -static struct task_struct *find_process_by_pid(pid_t pid) +static inline struct task_struct *find_process_by_pid(pid_t pid) { - struct task_struct *p; - - p = current; - if (pid) { - read_lock(&tasklist_lock); - for_each_task(p) { - if (p->pid == pid) - goto found; - } - p = NULL; -found: - read_unlock(&tasklist_lock); - } - return p; + if (pid) + return find_task_by_pid(pid); + else + return current; } static int setscheduler(pid_t pid, int policy, @@ -1566,7 +1546,7 @@ asmlinkage int sys_nanosleep(struct timespec *rqtp, struct timespec *rmtp) static void show_task(int nr,struct task_struct * p) { - unsigned long free; + unsigned long free = 0; static const char * stat_nam[] = { "R", "S", "D", "Z", "T", "W" }; printk("%-8s %3d ", p->comm, (p == current) ? -nr : nr); @@ -1585,10 +1565,12 @@ static void show_task(int nr,struct task_struct * p) else printk(" %016lx ", thread_saved_pc(&p->tss)); #endif +#if 0 for (free = 1; free < PAGE_SIZE/sizeof(long) ; free++) { if (((unsigned long *)p->kernel_stack_page)[free]) break; } +#endif printk("%5lu %5d %6d ", free*sizeof(long), p->pid, p->p_pptr->pid); if (p->p_cptr) printk("%5d ", p->p_cptr->pid); @@ -1606,7 +1588,7 @@ static void show_task(int nr,struct task_struct * p) void show_state(void) { - int i; + struct task_struct *p; #if ((~0UL) == 0xffffffff) printk("\n" @@ -1617,9 +1599,10 @@ void show_state(void) " free sibling\n"); printk(" task PC stack pid father child younger older\n"); #endif - for (i=0 ; itarray_ptr - &task[0]),p); + read_unlock(&tasklist_lock); } void sched_init(void) @@ -1628,14 +1611,28 @@ void sched_init(void) * We have to do a little magic to get the first * process right in SMP mode. */ - int cpu=smp_processor_id(); + int cpu=hard_smp_processor_id(); + int nr = NR_TASKS; + #ifndef __SMP__ current_set[cpu]=&init_task; #else init_task.processor=cpu; + /* + * This looks strange, but we don't necessarily know which CPU + * we're booting on yet, so do them all.. + */ for(cpu = 0; cpu < NR_CPUS; cpu++) current_set[cpu] = &init_task; #endif + + /* Init task array free list and pidhash table. */ + while(--nr > 0) + add_free_taskslot(&task[nr]); + + for(nr = 0; nr < PIDHASH_SZ; nr++) + pidhash[nr] = NULL; + init_bh(TIMER_BH, timer_bh); init_bh(TQUEUE_BH, tqueue_bh); init_bh(IMMEDIATE_BH, immediate_bh); diff --git a/kernel/softirq.c b/kernel/softirq.c index 6b9b41aa588c..89745bbdbb86 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -62,7 +62,7 @@ static inline void run_bottom_halves(void) asmlinkage void do_bottom_half(void) { - int cpu = smp_processor_id(); + int cpu = hard_smp_processor_id(); if (hardirq_trylock(cpu)) { if (softirq_trylock()) { diff --git a/kernel/sys.c b/kernel/sys.c index 934108fa83f8..d51b04e5fd7e 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -709,22 +709,13 @@ asmlinkage int sys_setpgid(pid_t pid, pid_t pgid) if (pgid < 0) return -EINVAL; - read_lock(&tasklist_lock); - for_each_task(p) { - if (p->pid == pid) { - /* NOTE: I haven't dropped tasklist_lock, this is - * on purpose. -DaveM - */ - goto found_task; - } - } - read_unlock(&tasklist_lock); - return -ESRCH; + if((p = find_task_by_pid(pid)) == NULL) + return -ESRCH; -found_task: /* From this point forward we keep holding onto the tasklist lock * so that our parent does not change from under us. -DaveM */ + read_lock(&tasklist_lock); err = -ESRCH; if (p->p_pptr == current || p->p_opptr == current) { err = -EPERM; @@ -762,18 +753,12 @@ asmlinkage int sys_getpgid(pid_t pid) if (!pid) { return current->pgrp; } else { - struct task_struct *p; - int ret = -ESRCH; - - read_lock(&tasklist_lock); - for_each_task(p) { - if (p->pid == pid) { - ret = p->pgrp; - break; - } - } - read_unlock(&tasklist_lock); - return ret; + struct task_struct *p = find_task_by_pid(pid); + + if(p) + return p->pgrp; + else + return -ESRCH; } } @@ -785,25 +770,16 @@ asmlinkage int sys_getpgrp(void) asmlinkage int sys_getsid(pid_t pid) { - struct task_struct * p; - int ret; - - /* SMP: The 'self' case requires no lock */ if (!pid) { - ret = current->session; + return current->session; } else { - ret = -ESRCH; + struct task_struct *p = find_task_by_pid(pid); - read_lock(&tasklist_lock); - for_each_task(p) { - if (p->pid == pid) { - ret = p->session; - break; - } - } - read_unlock(&tasklist_lock); + if(p) + return p->session; + else + return -ESRCH; } - return ret; } asmlinkage int sys_setsid(void) diff --git a/mm/mmap.c b/mm/mmap.c index 231f5d0b3f06..639a88aa78b9 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -21,8 +21,7 @@ #include #include -/* - * description of effects of mapping type and prot in current implementation. +/* description of effects of mapping type and prot in current implementation. * this is due to the limited x86 page protection hardware. The expected * behavior is in parens: * @@ -37,7 +36,6 @@ * x: (no) no x: (no) yes x: (no) yes x: (yes) yes * */ - pgprot_t protection_map[16] = { __P000, __P001, __P010, __P011, __P100, __P101, __P110, __P111, __S000, __S001, __S010, __S011, __S100, __S101, __S110, __S111 @@ -48,20 +46,18 @@ kmem_cache_t *vm_area_cachep; int sysctl_overcommit_memory; -/* - * Check that a process has enough memory to allocate a +/* Check that a process has enough memory to allocate a * new virtual mapping. */ static inline int vm_enough_memory(long pages) { - /* - * stupid algorithm to decide if we have enough memory: while + /* Stupid algorithm to decide if we have enough memory: while * simple, it hopefully works in most obvious cases.. Easy to * fool it, but this should catch most mistakes. */ long freepages; - /* sometimes we want to use more memory than we have. */ + /* Sometimes we want to use more memory than we have. */ if (sysctl_overcommit_memory) return 1; @@ -74,6 +70,20 @@ static inline int vm_enough_memory(long pages) return freepages > pages; } +/* Remove one vm structure from the inode's i_mmap ring. */ +static inline void remove_shared_vm_struct(struct vm_area_struct *vma) +{ + struct inode * inode = vma->vm_inode; + + if (inode) { + if (vma->vm_flags & VM_DENYWRITE) + inode->i_writecount++; + if(vma->vm_next_share) + vma->vm_next_share->vm_pprev_share = vma->vm_pprev_share; + *vma->vm_pprev_share = vma->vm_next_share; + } +} + asmlinkage unsigned long sys_brk(unsigned long brk) { unsigned long rlim, retval; @@ -91,17 +101,14 @@ asmlinkage unsigned long sys_brk(unsigned long brk) goto out; } - /* - * Always allow shrinking brk - */ + /* Always allow shrinking brk. */ if (brk <= mm->brk) { retval = mm->brk = brk; do_munmap(newbrk, oldbrk-newbrk); goto out; } - /* - * Check against rlimit and stack.. - */ + + /* Check against rlimit and stack.. */ retval = mm->brk; rlim = current->rlim[RLIMIT_DATA].rlim_cur; if (rlim >= RLIM_INFINITY) @@ -109,21 +116,15 @@ asmlinkage unsigned long sys_brk(unsigned long brk) if (brk - mm->end_code > rlim) goto out; - /* - * Check against existing mmap mappings. - */ + /* Check against existing mmap mappings. */ if (find_vma_intersection(mm, oldbrk, newbrk+PAGE_SIZE)) goto out; - /* - * Check if we have enough memory.. - */ + /* Check if we have enough memory.. */ if (!vm_enough_memory((newbrk-oldbrk) >> PAGE_SHIFT)) goto out; - /* - * Ok, looks good - let it rip. - */ + /* Ok, looks good - let it rip. */ if(do_mmap(NULL, oldbrk, newbrk-oldbrk, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_FIXED|MAP_PRIVATE, 0) == oldbrk) @@ -134,8 +135,7 @@ out: return retval; } -/* - * Combine the mmap "prot" and "flags" argument into one "vm_flags" used +/* Combine the mmap "prot" and "flags" argument into one "vm_flags" used * internally. Essentially, translate the "PROT_xxx" and "MAP_xxx" bits * into "VM_xxx". */ @@ -162,6 +162,7 @@ unsigned long do_mmap(struct file * file, unsigned long addr, unsigned long len, { struct mm_struct * mm = current->mm; struct vm_area_struct * vma; + int correct_wcount = 0; if ((len = PAGE_ALIGN(len)) == 0) return addr; @@ -181,20 +182,17 @@ unsigned long do_mmap(struct file * file, unsigned long addr, unsigned long len, return -EAGAIN; } - /* - * do simple checking here so the lower-level routines won't have + /* Do simple checking here so the lower-level routines won't have * to. we assume access permissions have been handled by the open * of the memory object, so we don't do any here. */ - if (file != NULL) { switch (flags & MAP_TYPE) { case MAP_SHARED: if ((prot & PROT_WRITE) && !(file->f_mode & 2)) return -EACCES; - /* - * make sure there are no mandatory locks on the file. - */ + + /* make sure there are no mandatory locks on the file. */ if (locks_verify_locked(file->f_inode)) return -EAGAIN; /* fall through */ @@ -206,18 +204,12 @@ unsigned long do_mmap(struct file * file, unsigned long addr, unsigned long len, default: return -EINVAL; } - if (flags & MAP_DENYWRITE) { - if (file->f_inode->i_writecount > 0) - return -ETXTBSY; - } } else if ((flags & MAP_TYPE) != MAP_PRIVATE) return -EINVAL; - /* - * obtain the address to map to. we verify (or select) it and ensure + /* Obtain the address to map to. we verify (or select) it and ensure * that it represents a valid section of the address space. */ - if (flags & MAP_FIXED) { if (addr & ~PAGE_MASK) return -EINVAL; @@ -227,8 +219,7 @@ unsigned long do_mmap(struct file * file, unsigned long addr, unsigned long len, return -ENOMEM; } - /* - * determine the object being mapped and call the appropriate + /* Determine the object being mapped and call the appropriate * specific mapper. the address has already been validated, but * not unmapped, but the maps are removed from the list. */ @@ -249,8 +240,8 @@ unsigned long do_mmap(struct file * file, unsigned long addr, unsigned long len, vma->vm_flags |= VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC; if (flags & MAP_SHARED) { vma->vm_flags |= VM_SHARED | VM_MAYSHARE; - /* - * This looks strange, but when we don't have the file open + + /* This looks strange, but when we don't have the file open * for writing, we can demote the shared mapping to a simpler * private mapping. That also takes care of a security hole * with ptrace() writing to a shared mapping without write @@ -289,9 +280,26 @@ unsigned long do_mmap(struct file * file, unsigned long addr, unsigned long len, } if (file) { - int error = file->f_op->mmap(file->f_inode, file, vma); + int error = 0; + if (vma->vm_flags & VM_DENYWRITE) { + if (file->f_inode->i_writecount > 0) + error = -ETXTBSY; + else { + /* f_op->mmap might possibly sleep + * (generic_file_mmap doesn't, but other code + * might). In any case, this takes care of any + * race that this might cause. + */ + file->f_inode->i_writecount--; + correct_wcount = 1; + } + } + if (!error) + error = file->f_op->mmap(file->f_inode, file, vma); if (error) { + if (correct_wcount) + file->f_inode->i_writecount++; kmem_cache_free(vm_area_cachep, vma); return error; } @@ -299,6 +307,8 @@ unsigned long do_mmap(struct file * file, unsigned long addr, unsigned long len, flags = vma->vm_flags; insert_vm_struct(mm, vma); + if (correct_wcount) + file->f_inode->i_writecount++; merge_segments(mm, vma->vm_start, vma->vm_end); /* merge_segments might have merged our vma, so we can't use it any more */ @@ -317,8 +327,7 @@ unsigned long do_mmap(struct file * file, unsigned long addr, unsigned long len, return addr; } -/* - * Get an address range which is currently unmapped. +/* Get an address range which is currently unmapped. * For mmap() without MAP_FIXED and shmat() with addr=0. * Return value 0 means ENOMEM. */ @@ -342,376 +351,7 @@ unsigned long get_unmapped_area(unsigned long addr, unsigned long len) } } -/* - * Searching a VMA in the linear list task->mm->mmap is horribly slow. - * Use an AVL (Adelson-Velskii and Landis) tree to speed up this search - * from O(n) to O(log n), where n is the number of VMAs of the task - * (typically around 6, but may reach 3000 in some cases). - * Written by Bruno Haible . - */ - -/* We keep the list and tree sorted by address. */ -#define vm_avl_key vm_end -#define vm_avl_key_t unsigned long /* typeof(vma->avl_key) */ - -/* - * task->mm->mmap_avl is the AVL tree corresponding to task->mm->mmap - * or, more exactly, its root. - * A vm_area_struct has the following fields: - * vm_avl_left left son of a tree node - * vm_avl_right right son of a tree node - * vm_avl_height 1+max(heightof(left),heightof(right)) - * The empty tree is represented as NULL. - */ - -/* Since the trees are balanced, their height will never be large. */ -#define avl_maxheight 41 /* why this? a small exercise */ -#define heightof(tree) ((tree) == avl_empty ? 0 : (tree)->vm_avl_height) -/* - * Consistency and balancing rules: - * 1. tree->vm_avl_height == 1+max(heightof(tree->vm_avl_left),heightof(tree->vm_avl_right)) - * 2. abs( heightof(tree->vm_avl_left) - heightof(tree->vm_avl_right) ) <= 1 - * 3. foreach node in tree->vm_avl_left: node->vm_avl_key <= tree->vm_avl_key, - * foreach node in tree->vm_avl_right: node->vm_avl_key >= tree->vm_avl_key. - */ - -/* Look up the nodes at the left and at the right of a given node. */ -static inline void avl_neighbours (struct vm_area_struct * node, struct vm_area_struct * tree, struct vm_area_struct ** to_the_left, struct vm_area_struct ** to_the_right) -{ - vm_avl_key_t key = node->vm_avl_key; - - *to_the_left = *to_the_right = NULL; - for (;;) { - if (tree == avl_empty) { - printk("avl_neighbours: node not found in the tree\n"); - return; - } - if (key == tree->vm_avl_key) - break; - if (key < tree->vm_avl_key) { - *to_the_right = tree; - tree = tree->vm_avl_left; - } else { - *to_the_left = tree; - tree = tree->vm_avl_right; - } - } - if (tree != node) { - printk("avl_neighbours: node not exactly found in the tree\n"); - return; - } - if (tree->vm_avl_left != avl_empty) { - struct vm_area_struct * node; - for (node = tree->vm_avl_left; node->vm_avl_right != avl_empty; node = node->vm_avl_right) - continue; - *to_the_left = node; - } - if (tree->vm_avl_right != avl_empty) { - struct vm_area_struct * node; - for (node = tree->vm_avl_right; node->vm_avl_left != avl_empty; node = node->vm_avl_left) - continue; - *to_the_right = node; - } - if ((*to_the_left && ((*to_the_left)->vm_next != node)) || (node->vm_next != *to_the_right)) - printk("avl_neighbours: tree inconsistent with list\n"); -} - -/* - * Rebalance a tree. - * After inserting or deleting a node of a tree we have a sequence of subtrees - * nodes[0]..nodes[k-1] such that - * nodes[0] is the root and nodes[i+1] = nodes[i]->{vm_avl_left|vm_avl_right}. - */ -static inline void avl_rebalance (struct vm_area_struct *** nodeplaces_ptr, int count) -{ - for ( ; count > 0 ; count--) { - struct vm_area_struct ** nodeplace = *--nodeplaces_ptr; - struct vm_area_struct * node = *nodeplace; - struct vm_area_struct * nodeleft = node->vm_avl_left; - struct vm_area_struct * noderight = node->vm_avl_right; - int heightleft = heightof(nodeleft); - int heightright = heightof(noderight); - if (heightright + 1 < heightleft) { - /* */ - /* * */ - /* / \ */ - /* n+2 n */ - /* */ - struct vm_area_struct * nodeleftleft = nodeleft->vm_avl_left; - struct vm_area_struct * nodeleftright = nodeleft->vm_avl_right; - int heightleftright = heightof(nodeleftright); - if (heightof(nodeleftleft) >= heightleftright) { - /* */ - /* * n+2|n+3 */ - /* / \ / \ */ - /* n+2 n --> / n+1|n+2 */ - /* / \ | / \ */ - /* n+1 n|n+1 n+1 n|n+1 n */ - /* */ - node->vm_avl_left = nodeleftright; nodeleft->vm_avl_right = node; - nodeleft->vm_avl_height = 1 + (node->vm_avl_height = 1 + heightleftright); - *nodeplace = nodeleft; - } else { - /* */ - /* * n+2 */ - /* / \ / \ */ - /* n+2 n --> n+1 n+1 */ - /* / \ / \ / \ */ - /* n n+1 n L R n */ - /* / \ */ - /* L R */ - /* */ - nodeleft->vm_avl_right = nodeleftright->vm_avl_left; - node->vm_avl_left = nodeleftright->vm_avl_right; - nodeleftright->vm_avl_left = nodeleft; - nodeleftright->vm_avl_right = node; - nodeleft->vm_avl_height = node->vm_avl_height = heightleftright; - nodeleftright->vm_avl_height = heightleft; - *nodeplace = nodeleftright; - } - } - else if (heightleft + 1 < heightright) { - /* similar to the above, just interchange 'left' <--> 'right' */ - struct vm_area_struct * noderightright = noderight->vm_avl_right; - struct vm_area_struct * noderightleft = noderight->vm_avl_left; - int heightrightleft = heightof(noderightleft); - if (heightof(noderightright) >= heightrightleft) { - node->vm_avl_right = noderightleft; noderight->vm_avl_left = node; - noderight->vm_avl_height = 1 + (node->vm_avl_height = 1 + heightrightleft); - *nodeplace = noderight; - } else { - noderight->vm_avl_left = noderightleft->vm_avl_right; - node->vm_avl_right = noderightleft->vm_avl_left; - noderightleft->vm_avl_right = noderight; - noderightleft->vm_avl_left = node; - noderight->vm_avl_height = node->vm_avl_height = heightrightleft; - noderightleft->vm_avl_height = heightright; - *nodeplace = noderightleft; - } - } - else { - int height = (heightleftvm_avl_height) - break; - node->vm_avl_height = height; - } - } -} - -/* Insert a node into a tree. */ -static inline void avl_insert (struct vm_area_struct * new_node, struct vm_area_struct ** ptree) -{ - vm_avl_key_t key = new_node->vm_avl_key; - struct vm_area_struct ** nodeplace = ptree; - struct vm_area_struct ** stack[avl_maxheight]; - int stack_count = 0; - struct vm_area_struct *** stack_ptr = &stack[0]; /* = &stack[stackcount] */ - for (;;) { - struct vm_area_struct * node = *nodeplace; - if (node == avl_empty) - break; - *stack_ptr++ = nodeplace; stack_count++; - if (key < node->vm_avl_key) - nodeplace = &node->vm_avl_left; - else - nodeplace = &node->vm_avl_right; - } - new_node->vm_avl_left = avl_empty; - new_node->vm_avl_right = avl_empty; - new_node->vm_avl_height = 1; - *nodeplace = new_node; - avl_rebalance(stack_ptr,stack_count); -} - -/* Insert a node into a tree, and - * return the node to the left of it and the node to the right of it. - */ -static inline void avl_insert_neighbours (struct vm_area_struct * new_node, struct vm_area_struct ** ptree, - struct vm_area_struct ** to_the_left, struct vm_area_struct ** to_the_right) -{ - vm_avl_key_t key = new_node->vm_avl_key; - struct vm_area_struct ** nodeplace = ptree; - struct vm_area_struct ** stack[avl_maxheight]; - int stack_count = 0; - struct vm_area_struct *** stack_ptr = &stack[0]; /* = &stack[stackcount] */ - *to_the_left = *to_the_right = NULL; - for (;;) { - struct vm_area_struct * node = *nodeplace; - if (node == avl_empty) - break; - *stack_ptr++ = nodeplace; stack_count++; - if (key < node->vm_avl_key) { - *to_the_right = node; - nodeplace = &node->vm_avl_left; - } else { - *to_the_left = node; - nodeplace = &node->vm_avl_right; - } - } - new_node->vm_avl_left = avl_empty; - new_node->vm_avl_right = avl_empty; - new_node->vm_avl_height = 1; - *nodeplace = new_node; - avl_rebalance(stack_ptr,stack_count); -} - -/* Removes a node out of a tree. */ -static inline void avl_remove (struct vm_area_struct * node_to_delete, struct vm_area_struct ** ptree) -{ - vm_avl_key_t key = node_to_delete->vm_avl_key; - struct vm_area_struct ** nodeplace = ptree; - struct vm_area_struct ** stack[avl_maxheight]; - int stack_count = 0; - struct vm_area_struct *** stack_ptr = &stack[0]; /* = &stack[stackcount] */ - struct vm_area_struct ** nodeplace_to_delete; - for (;;) { - struct vm_area_struct * node = *nodeplace; - if (node == avl_empty) { - /* what? node_to_delete not found in tree? */ - printk("avl_remove: node to delete not found in tree\n"); - return; - } - *stack_ptr++ = nodeplace; stack_count++; - if (key == node->vm_avl_key) - break; - if (key < node->vm_avl_key) - nodeplace = &node->vm_avl_left; - else - nodeplace = &node->vm_avl_right; - } - nodeplace_to_delete = nodeplace; - /* Have to remove node_to_delete = *nodeplace_to_delete. */ - if (node_to_delete->vm_avl_left == avl_empty) { - *nodeplace_to_delete = node_to_delete->vm_avl_right; - stack_ptr--; stack_count--; - } else { - struct vm_area_struct *** stack_ptr_to_delete = stack_ptr; - struct vm_area_struct ** nodeplace = &node_to_delete->vm_avl_left; - struct vm_area_struct * node; - for (;;) { - node = *nodeplace; - if (node->vm_avl_right == avl_empty) - break; - *stack_ptr++ = nodeplace; stack_count++; - nodeplace = &node->vm_avl_right; - } - *nodeplace = node->vm_avl_left; - /* node replaces node_to_delete */ - node->vm_avl_left = node_to_delete->vm_avl_left; - node->vm_avl_right = node_to_delete->vm_avl_right; - node->vm_avl_height = node_to_delete->vm_avl_height; - *nodeplace_to_delete = node; /* replace node_to_delete */ - *stack_ptr_to_delete = &node->vm_avl_left; /* replace &node_to_delete->vm_avl_left */ - } - avl_rebalance(stack_ptr,stack_count); -} - -#ifdef DEBUG_AVL - -/* print a list */ -static void printk_list (struct vm_area_struct * vma) -{ - printk("["); - while (vma) { - printk("%08lX-%08lX", vma->vm_start, vma->vm_end); - vma = vma->vm_next; - if (!vma) - break; - printk(" "); - } - printk("]"); -} - -/* print a tree */ -static void printk_avl (struct vm_area_struct * tree) -{ - if (tree != avl_empty) { - printk("("); - if (tree->vm_avl_left != avl_empty) { - printk_avl(tree->vm_avl_left); - printk("<"); - } - printk("%08lX-%08lX", tree->vm_start, tree->vm_end); - if (tree->vm_avl_right != avl_empty) { - printk(">"); - printk_avl(tree->vm_avl_right); - } - printk(")"); - } -} - -static char *avl_check_point = "somewhere"; - -/* check a tree's consistency and balancing */ -static void avl_checkheights (struct vm_area_struct * tree) -{ - int h, hl, hr; - - if (tree == avl_empty) - return; - avl_checkheights(tree->vm_avl_left); - avl_checkheights(tree->vm_avl_right); - h = tree->vm_avl_height; - hl = heightof(tree->vm_avl_left); - hr = heightof(tree->vm_avl_right); - if ((h == hl+1) && (hr <= hl) && (hl <= hr+1)) - return; - if ((h == hr+1) && (hl <= hr) && (hr <= hl+1)) - return; - printk("%s: avl_checkheights: heights inconsistent\n",avl_check_point); -} - -/* check that all values stored in a tree are < key */ -static void avl_checkleft (struct vm_area_struct * tree, vm_avl_key_t key) -{ - if (tree == avl_empty) - return; - avl_checkleft(tree->vm_avl_left,key); - avl_checkleft(tree->vm_avl_right,key); - if (tree->vm_avl_key < key) - return; - printk("%s: avl_checkleft: left key %lu >= top key %lu\n",avl_check_point,tree->vm_avl_key,key); -} - -/* check that all values stored in a tree are > key */ -static void avl_checkright (struct vm_area_struct * tree, vm_avl_key_t key) -{ - if (tree == avl_empty) - return; - avl_checkright(tree->vm_avl_left,key); - avl_checkright(tree->vm_avl_right,key); - if (tree->vm_avl_key > key) - return; - printk("%s: avl_checkright: right key %lu <= top key %lu\n",avl_check_point,tree->vm_avl_key,key); -} - -/* check that all values are properly increasing */ -static void avl_checkorder (struct vm_area_struct * tree) -{ - if (tree == avl_empty) - return; - avl_checkorder(tree->vm_avl_left); - avl_checkorder(tree->vm_avl_right); - avl_checkleft(tree->vm_avl_left,tree->vm_avl_key); - avl_checkright(tree->vm_avl_right,tree->vm_avl_key); -} - -/* all checks */ -static void avl_check (struct task_struct * task, char *caller) -{ - avl_check_point = caller; -/* printk("task \"%s\", %s\n",task->comm,caller); */ -/* printk("task \"%s\" list: ",task->comm); printk_list(task->mm->mmap); printk("\n"); */ -/* printk("task \"%s\" tree: ",task->comm); printk_avl(task->mm->mmap_avl); printk("\n"); */ - avl_checkheights(task->mm->mmap_avl); - avl_checkorder(task->mm->mmap_avl); -} - -#endif - - -/* - * Normal function to fix up a mapping +/* Normal function to fix up a mapping * This function is the default for when an area has no specific * function. This may be used as part of a more specific routine. * This function works out what part of an area is affected and @@ -738,19 +378,11 @@ static void unmap_fixup(struct vm_area_struct *area, struct vm_area_struct *mpnt; unsigned long end = addr + len; - if (addr < area->vm_start || addr >= area->vm_end || - end <= area->vm_start || end > area->vm_end || - end < addr) - { - printk("unmap_fixup: area=%lx-%lx, unmap %lx-%lx!!\n", - area->vm_start, area->vm_end, addr, end); - return; - } area->vm_mm->total_vm -= len >> PAGE_SHIFT; if (area->vm_flags & VM_LOCKED) area->vm_mm->locked_vm -= len >> PAGE_SHIFT; - /* Unmapping the whole area */ + /* Unmapping the whole area. */ if (addr == area->vm_start && end == area->vm_end) { if (area->vm_ops && area->vm_ops->close) area->vm_ops->close(area); @@ -759,15 +391,13 @@ static void unmap_fixup(struct vm_area_struct *area, return; } - /* Work out to one of the ends */ + /* Work out to one of the ends. */ if (end == area->vm_end) area->vm_end = addr; - else - if (addr == area->vm_start) { + else if (addr == area->vm_start) { area->vm_offset += (end - area->vm_start); area->vm_start = end; - } - else { + } else { /* Unmapping a hole: area->vm_start < addr <= end < area->vm_end */ /* Add end mapping -- leave beginning for below */ mpnt = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL); @@ -785,7 +415,7 @@ static void unmap_fixup(struct vm_area_struct *area, insert_vm_struct(current->mm, mpnt); } - /* construct whatever mapping is needed */ + /* Construct whatever mapping is needed. */ mpnt = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL); if (!mpnt) return; @@ -809,15 +439,14 @@ asmlinkage int sys_munmap(unsigned long addr, size_t len) return ret; } -/* - * Munmap is split into 2 main parts -- this part which finds +/* Munmap is split into 2 main parts -- this part which finds * what needs doing, and the areas themselves, which do the * work. This now handles partial unmappings. * Jeremy Fitzhardine */ int do_munmap(unsigned long addr, size_t len) { - struct vm_area_struct *mpnt, *prev, *next, **npp, *free; + struct vm_area_struct *mpnt, *next, *free; if ((addr & ~PAGE_MASK) || addr > TASK_SIZE || len > TASK_SIZE-addr) return -EINVAL; @@ -825,33 +454,36 @@ int do_munmap(unsigned long addr, size_t len) if ((len = PAGE_ALIGN(len)) == 0) return 0; - /* - * Check if this memory area is ok - put it on the temporary + /* Check if this memory area is ok - put it on the temporary * list if so.. The checks here are pretty simple -- * every area affected in some way (by any overlap) is put * on the list. If nothing is put on, nothing is affected. */ - mpnt = find_vma(current->mm, addr); + mpnt = current->mm->mmap; + while(mpnt && mpnt->vm_end <= addr) + mpnt = mpnt->vm_next; if (!mpnt) return 0; - avl_neighbours(mpnt, current->mm->mmap_avl, &prev, &next); - /* we have prev->vm_next == mpnt && mpnt->vm_next = next */ - /* and addr < mpnt->vm_end */ - npp = (prev ? &prev->vm_next : ¤t->mm->mmap); + next = mpnt->vm_next; + + /* we have mpnt->vm_next = next and addr < mpnt->vm_end */ free = NULL; - for ( ; mpnt && mpnt->vm_start < addr+len; mpnt = *npp) { - *npp = mpnt->vm_next; + for ( ; mpnt && mpnt->vm_start < addr+len; ) { + struct vm_area_struct *next = mpnt->vm_next; + + if(mpnt->vm_next) + mpnt->vm_next->vm_pprev = mpnt->vm_pprev; + *mpnt->vm_pprev = mpnt->vm_next; + mpnt->vm_next = free; free = mpnt; - avl_remove(mpnt, ¤t->mm->mmap_avl); + mpnt = next; } - if (free == NULL) return 0; - /* - * Ok - we have the memory areas we should free on the 'free' list, + /* Ok - we have the memory areas we should free on the 'free' list, * so release them, and unmap the page range.. * If the one of the segments is only being partially unmapped, * it will put new vm_area_struct(s) into the address space. @@ -871,36 +503,27 @@ int do_munmap(unsigned long addr, size_t len) if (mpnt->vm_ops && mpnt->vm_ops->unmap) mpnt->vm_ops->unmap(mpnt, st, size); + flush_cache_range(current->mm, st, end); zap_page_range(current->mm, st, size); flush_tlb_range(current->mm, st, end); + unmap_fixup(mpnt, st, size); + kmem_cache_free(vm_area_cachep, mpnt); } while (free); - /* we could zap the page tables here too.. */ - + current->mm->mmap_cache = NULL; /* Kill the cache. */ return 0; } -/* Build the AVL tree corresponding to the VMA list. */ -void build_mmap_avl(struct mm_struct * mm) -{ - struct vm_area_struct * vma; - - mm->mmap_avl = NULL; - for (vma = mm->mmap; vma; vma = vma->vm_next) - avl_insert(vma, &mm->mmap_avl); -} - /* Release all mmaps. */ void exit_mmap(struct mm_struct * mm) { struct vm_area_struct * mpnt; mpnt = mm->mmap; - mm->mmap = NULL; - mm->mmap_avl = NULL; + mm->mmap = mm->mmap_cache = NULL; mm->rss = 0; mm->total_vm = 0; mm->locked_vm = 0; @@ -925,81 +548,38 @@ void exit_mmap(struct mm_struct * mm) } } -/* - * Insert vm structure into process list sorted by address +/* Insert vm structure into process list sorted by address * and into the inode's i_mmap ring. */ void insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vmp) { - struct vm_area_struct *share; + struct vm_area_struct **pprev = &mm->mmap; struct inode * inode; -#if 0 /* equivalent, but slow */ - struct vm_area_struct **p, *mpnt; + /* Find where to link it in. */ + while(*pprev && (*pprev)->vm_start <= vmp->vm_start) + pprev = &(*pprev)->vm_next; - p = &mm->mmap; - while ((mpnt = *p) != NULL) { - if (mpnt->vm_start > vmp->vm_start) - break; - if (mpnt->vm_end > vmp->vm_start) - printk("insert_vm_struct: overlapping memory areas\n"); - p = &mpnt->vm_next; - } - vmp->vm_next = mpnt; - *p = vmp; -#else - struct vm_area_struct * prev, * next; - - avl_insert_neighbours(vmp, &mm->mmap_avl, &prev, &next); - if ((prev ? prev->vm_next : mm->mmap) != next) - printk("insert_vm_struct: tree inconsistent with list\n"); - if (prev) - prev->vm_next = vmp; - else - mm->mmap = vmp; - vmp->vm_next = next; -#endif + /* Insert it. */ + if((vmp->vm_next = *pprev) != NULL) + (*pprev)->vm_pprev = &vmp->vm_next; + *pprev = vmp; + vmp->vm_pprev = pprev; inode = vmp->vm_inode; - if (!inode) - return; - - /* insert vmp into inode's circular share list */ - if ((share = inode->i_mmap)) { - vmp->vm_next_share = share->vm_next_share; - vmp->vm_next_share->vm_prev_share = vmp; - share->vm_next_share = vmp; - vmp->vm_prev_share = share; - } else - inode->i_mmap = vmp->vm_next_share = vmp->vm_prev_share = vmp; -} - -/* - * Remove one vm structure from the inode's i_mmap ring. - */ -void remove_shared_vm_struct(struct vm_area_struct *mpnt) -{ - struct inode * inode = mpnt->vm_inode; - - if (!inode) - return; - - if (mpnt->vm_next_share == mpnt) { - if (inode->i_mmap != mpnt) - printk("Inode i_mmap ring corrupted\n"); - inode->i_mmap = NULL; - return; + if (inode) { + if (vmp->vm_flags & VM_DENYWRITE) + inode->i_writecount--; + + /* insert vmp into inode's share list */ + if((vmp->vm_next_share = inode->i_mmap) != NULL) + inode->i_mmap->vm_pprev_share = &vmp->vm_next_share; + inode->i_mmap = vmp; + vmp->vm_pprev_share = &inode->i_mmap; } - - if (inode->i_mmap == mpnt) - inode->i_mmap = mpnt->vm_next_share; - - mpnt->vm_prev_share->vm_next_share = mpnt->vm_next_share; - mpnt->vm_next_share->vm_prev_share = mpnt->vm_prev_share; } -/* - * Merge the list of memory segments if possible. +/* Merge the list of memory segments if possible. * Redundant vm_area_structs are freed. * This assumes that the list is ordered by address. * We don't need to traverse the entire list, only those segments @@ -1010,13 +590,19 @@ void merge_segments (struct mm_struct * mm, unsigned long start_addr, unsigned l struct vm_area_struct *prev, *mpnt, *next; down(&mm->mmap_sem); - mpnt = find_vma(mm, start_addr); + + prev = NULL; + mpnt = mm->mmap; + while(mpnt && mpnt->vm_end <= start_addr) { + prev = mpnt; + mpnt = mpnt->vm_next; + } if (!mpnt) goto no_vma; - avl_neighbours(mpnt, mm->mmap_avl, &prev, &next); - /* we have prev->vm_next == mpnt && mpnt->vm_next = next */ + next = mpnt->vm_next; + /* we have prev->vm_next == mpnt && mpnt->vm_next = next */ if (!prev) { prev = mpnt; mpnt = next; @@ -1026,41 +612,32 @@ void merge_segments (struct mm_struct * mm, unsigned long start_addr, unsigned l * start_addr < mpnt->vm_end && prev->vm_start < end_addr */ for ( ; mpnt && prev->vm_start < end_addr ; prev = mpnt, mpnt = next) { -#if 0 - printk("looping in merge_segments, mpnt=0x%lX\n", (unsigned long) mpnt); -#endif - next = mpnt->vm_next; - /* - * To share, we must have the same inode, operations.. - */ - if (mpnt->vm_inode != prev->vm_inode) - continue; - if (mpnt->vm_pte != prev->vm_pte) - continue; - if (mpnt->vm_ops != prev->vm_ops) - continue; - if (mpnt->vm_flags != prev->vm_flags) + /* To share, we must have the same inode, operations.. */ + if ((mpnt->vm_inode != prev->vm_inode) || + (mpnt->vm_pte != prev->vm_pte) || + (mpnt->vm_ops != prev->vm_ops) || + (mpnt->vm_flags != prev->vm_flags) || + (prev->vm_end != mpnt->vm_start)) continue; - if (prev->vm_end != mpnt->vm_start) - continue; - /* - * and if we have an inode, the offsets must be contiguous.. - */ + + /* and if we have an inode, the offsets must be contiguous.. */ if ((mpnt->vm_inode != NULL) || (mpnt->vm_flags & VM_SHM)) { - if (prev->vm_offset + prev->vm_end - prev->vm_start != mpnt->vm_offset) + unsigned long off = prev->vm_offset+prev->vm_end-prev->vm_start; + if (off != mpnt->vm_offset) continue; } - /* - * merge prev with mpnt and set up pointers so the new + /* merge prev with mpnt and set up pointers so the new * big segment can possibly merge with the next one. * The old unused mpnt is freed. */ - avl_remove(mpnt, &mm->mmap_avl); + if(mpnt->vm_next) + mpnt->vm_next->vm_pprev = mpnt->vm_pprev; + *mpnt->vm_pprev = mpnt->vm_next; + prev->vm_end = mpnt->vm_end; - prev->vm_next = mpnt->vm_next; if (mpnt->vm_ops && mpnt->vm_ops->close) { mpnt->vm_offset += mpnt->vm_end - mpnt->vm_start; mpnt->vm_start = mpnt->vm_end; @@ -1072,6 +649,7 @@ void merge_segments (struct mm_struct * mm, unsigned long start_addr, unsigned l kmem_cache_free(vm_area_cachep, mpnt); mpnt = prev; } + mm->mmap_cache = NULL; /* Kill the cache. */ no_vma: up(&mm->mmap_sem); } @@ -1084,4 +662,11 @@ void vma_init(void) NULL, NULL); if(!vm_area_cachep) panic("vma_init: Cannot alloc vm_area_struct cache."); + + mm_cachep = kmem_cache_create("mm_struct", + sizeof(struct mm_struct), + sizeof(long) * 4, SLAB_HWCACHE_ALIGN, + NULL, NULL); + if(!mm_cachep) + panic("vma_init: Cannot alloc mm_struct cache."); } diff --git a/mm/swapfile.c b/mm/swapfile.c index 202f7688a7e7..52b10b74f3bc 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -298,24 +298,25 @@ static int unuse_process(struct mm_struct * mm, unsigned int type, unsigned long */ static int try_to_unuse(unsigned int type) { - int nr; unsigned long page = get_free_page(GFP_KERNEL); + struct task_struct *p; if (!page) return -ENOMEM; - nr = 0; - while (nr < NR_TASKS) { - struct task_struct * p = task[nr]; - if (p) { - if (unuse_process(p->mm, type, page)) { - page = get_free_page(GFP_KERNEL); - if (!page) - return -ENOMEM; - continue; - } +again: + read_lock(&tasklist_lock); + for_each_task(p) { + read_unlock(&tasklist_lock); + if(unuse_process(p->mm, type, page)) { + page = get_free_page(GFP_KERNEL); + if(!page) + return -ENOMEM; + goto again; } - nr++; + read_lock(&tasklist_lock); } + read_unlock(&tasklist_lock); + free_page(page); return 0; } diff --git a/mm/vmscan.c b/mm/vmscan.c index b25c0a0ac7bf..d890be5df7cc 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -271,54 +271,72 @@ static int swap_out_process(struct task_struct * p, int dma, int wait) static int swap_out(unsigned int priority, int dma, int wait) { - static int swap_task; - int loop, counter; + static int skip_factor = 0; + int limit = nr_tasks - 1; + int loop, counter, i; struct task_struct *p; counter = ((PAGEOUT_WEIGHT * nr_tasks) >> 10) >> priority; + if(skip_factor > nr_tasks) + skip_factor = 0; + + read_lock(&tasklist_lock); + p = init_task.next_task; + i = skip_factor; + while(i--) + p = p->next_task; for(; counter >= 0; counter--) { - /* - * Check that swap_task is suitable for swapping. If not, look for - * the next suitable process. - */ + /* Check if task is suitable for swapping. */ loop = 0; while(1) { - if (swap_task >= NR_TASKS) { - swap_task = 1; + if(!--limit) { + limit = nr_tasks - 1; + /* See if all processes are unswappable or + * already swapped out. + */ if (loop) - /* all processes are unswappable or already swapped out */ - return 0; + goto out; loop = 1; } - - p = task[swap_task]; - if (p && p->swappable && p->mm->rss) + if (p->swappable && p->mm->rss) break; - - swap_task++; + if((p = p->next_task) == &init_task) + p = p->next_task; } + skip_factor++; - /* - * Determine the number of pages to swap from this process. - */ + /* Determine the number of pages to swap from this process. */ if (!p->swap_cnt) { - /* Normalise the number of pages swapped by + /* Normalise the number of pages swapped by multiplying by (RSS / 1MB) */ p->swap_cnt = AGE_CLUSTER_SIZE(p->mm->rss); } if (!--p->swap_cnt) - swap_task++; + skip_factor++; + read_unlock(&tasklist_lock); + switch (swap_out_process(p, dma, wait)) { - case 0: - if (p->swap_cnt) - swap_task++; - break; - case 1: - return 1; - default: - break; - } + case 0: + if (p->swap_cnt) + skip_factor++; + break; + case 1: + return 1; + default: + break; + }; + + /* Whoever we swapped may not even exist now, in fact we cannot + * assume anything about the list we were searching previously. + */ + read_lock(&tasklist_lock); + p = init_task.next_task; + i = skip_factor; + while(i--) + p = p->next_task; } +out: + read_unlock(&tasklist_lock); return 0; } diff --git a/net/socket.c b/net/socket.c index 2e53ed4461fb..dc4d962201e1 100644 --- a/net/socket.c +++ b/net/socket.c @@ -207,7 +207,6 @@ static int get_fd(struct inode *inode) file->f_op = &socket_file_ops; file->f_mode = 3; file->f_flags = O_RDWR; - file->f_count = 1; file->f_inode = inode; if (inode) inode->i_count++; -- 2.39.5