Import 2.3.12pre22.3.12pre2
authorLinus Torvalds<torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:26:22 +0000 (23 15:26 -0500)
committerLinus Torvalds<torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:26:22 +0000 (23 15:26 -0500)
55 files changed:
Makefile
arch/alpha/config.in
arch/arm/kernel/setup.c
arch/arm/mm/fault-common.c
arch/i386/config.in
arch/i386/kernel/setup.c
arch/i386/math-emu/fpu_entry.c
arch/i386/math-emu/fpu_system.h
arch/m68k/atari/stram.c
arch/m68k/kernel/process.c
arch/m68k/kernel/setup.c
arch/m68k/mm/fault.c
arch/mips/config.in
arch/mips/mm/fault.c
arch/ppc/config.in
arch/ppc/kernel/apus_setup.c
arch/ppc/kernel/idle.c
arch/ppc/kernel/setup.c
arch/ppc/kernel/smp.c
arch/ppc/mm/fault.c
arch/ppc/mm/init.c
arch/sparc/ap1000/apmmu.c
arch/sparc/kernel/setup.c
arch/sparc/kernel/sun4d_smp.c
arch/sparc/kernel/sun4m_smp.c
arch/sparc/mm/fault.c
arch/sparc/mm/srmmu.c
arch/sparc/mm/sun4c.c
arch/sparc64/config.in
arch/sparc64/kernel/setup.c
arch/sparc64/mm/fault.c
drivers/Makefile
drivers/char/ppdev.c
drivers/parport/BUGS-parport[moved from drivers/misc/BUGS-parport with 100% similarity]
drivers/parport/Config.in[moved from drivers/misc/Config.in with 100% similarity]
drivers/parport/Makefile[moved from drivers/misc/Makefile with 84% similarity]
drivers/parport/TODO-parport[moved from drivers/misc/TODO-parport with 100% similarity]
drivers/parport/daisy.c[moved from drivers/misc/parport_daisy.c with 100% similarity]
drivers/parport/ieee1284.c[moved from drivers/misc/parport_ieee1284.c with 100% similarity]
drivers/parport/ieee1284_ops.c[moved from drivers/misc/parport_ieee1284_ops.c with 100% similarity]
drivers/parport/init.c[moved from drivers/misc/parport_init.c with 100% similarity]
drivers/parport/multiface.h[moved from drivers/misc/multiface.h with 100% similarity]
drivers/parport/parport_amiga.c[moved from drivers/misc/parport_amiga.c with 100% similarity]
drivers/parport/parport_arc.c[moved from drivers/misc/parport_arc.c with 100% similarity]
drivers/parport/parport_atari.c[moved from drivers/misc/parport_atari.c with 100% similarity]
drivers/parport/parport_ax.c[moved from drivers/misc/parport_ax.c with 100% similarity]
drivers/parport/parport_mfc3.c[moved from drivers/misc/parport_mfc3.c with 100% similarity]
drivers/parport/parport_pc.c[moved from drivers/misc/parport_pc.c with 100% similarity]
drivers/parport/probe.c[moved from drivers/misc/parport_probe.c with 100% similarity]
drivers/parport/procfs.c[moved from drivers/misc/parport_procfs.c with 100% similarity]
drivers/parport/share.c[moved from drivers/misc/parport_share.c with 100% similarity]
fs/proc/array.c
fs/proc/link.c
include/asm-i386/semaphore.h
lib/vsprintf.c

index 429bced..8c5a43c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -111,7+111,7 @@ FILESYSTEMS =fs/filesystems.a
 NETWORKS       =net/network.a
 DRIVERS                =drivers/block/block.a \
                 drivers/char/char.a \
-                drivers/misc/misc.a
+                drivers/parport/parport.a
 LIBS           =$(TOPDIR)/lib/lib.a
 SUBDIRS                =kernel drivers mm fs net ipc lib
 
index eb97529..0c00ff2 100644 (file)
@@ -188,7+188,7 @@ tristate 'Kernel support for a.out (ECOFF) binaries' CONFIG_BINFMT_AOUT
 tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
 tristate 'Kernel support for Linux/Intel ELF binaries' CONFIG_BINFMT_EM86
-source drivers/misc/Config.in
+source drivers/parpor/Config.in
 endmenu
 
 source drivers/pnp/Config.in
index 4cec8cd..1555278 100644 (file)
@@ -297,10+297,10 @@ setup_arch(char **cmdline_p, unsigned long * memory_start_p, unsigned long * mem
 
        setup_processor();
 
-       init_task.mm->start_code = TASK_SIZE;
-       init_task.mm->end_code   = TASK_SIZE + (unsigned long) &_etext;
-       init_task.mm->end_data   = TASK_SIZE + (unsigned long) &_edata;
-       init_task.mm->brk        = TASK_SIZE + (unsigned long) &_end;
+       init_mm.start_code = TASK_SIZE;
+       init_mm.end_code         = TASK_SIZE + (unsigned long) &_etext;
+       init_mm.end_data         = TASK_SIZE + (unsigned long) &_edata;
+       init_mm.brk      = TASK_SIZE + (unsigned long) &_end;
 
        /*
         * Add your machine dependencies here
index 1251525..219fb34 100644 (file)
@@ -106,7+106,7 @@ static void do_page_fault(unsigned long addr, int mode, struct pt_regs *regs)
         * If we're in an interrupt or have no user
         * context, we must not take the fault..
         */
-       if (in_interrupt() || mm == &init_mm)
+       if (in_interrupt() || !mm)
                goto no_context;
 
        down(&mm->mmap_sem);
index 56b3fd8..ae09489 100644 (file)
@@ -92,7+92,7 @@ tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
 tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
 
-source drivers/misc/Config.in
+source drivers/parport/Config.in
 
 bool 'Advanced Power Management BIOS support' CONFIG_APM
 if [ "$CONFIG_APM" = "y" ]; then
index 38e3012..120454c 100644 (file)
@@ -313,10+313,10 @@ __initfunc(void setup_arch(char **cmdline_p,
        if (!MOUNT_ROOT_RDONLY)
                root_mountflags &= ~MS_RDONLY;
        memory_start = (unsigned long) &_end;
-       init_task.mm->start_code = PAGE_OFFSET;
-       init_task.mm->end_code = (unsigned long) &_etext;
-       init_task.mm->end_data = (unsigned long) &_edata;
-       init_task.mm->brk = (unsigned long) &_end;
+       init_mm.start_code = PAGE_OFFSET;
+       init_mm.end_code = (unsigned long) &_etext;
+       init_mm.end_data = (unsigned long) &_edata;
+       init_mm.brk = (unsigned long) &_end;
 
        /* Save unparsed command line copy for /proc/cmdline */
        memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
@@ -354,7+354,7 @@ __initfunc(void setup_arch(char **cmdline_p,
        *to = '\0';
        *cmdline_p = command_line;
 
-#define VMALLOC_RESERVE        (64 << 20)      /* 64MB for vmalloc */
+#define VMALLOC_RESERVE        (128 << 20)     /* 128MB for vmalloc and initrd */
 #define MAXMEM ((unsigned long)(-PAGE_OFFSET-VMALLOC_RESERVE))
 
        if (memory_end > MAXMEM)
index 1c5d30e..9e14848 100644 (file)
@@ -283,8+283,8 @@ do_another_FPU_instruction:
          FPU_EIP = FPU_ORIG_EIP;       /* Point to current FPU instruction. */
 
          RE_ENTRANT_CHECK_OFF;
-         current->tss.trap_no = 16;
-         current->tss.error_code = 0;
+         current->thread.trap_no = 16;
+         current->thread.error_code = 0;
          send_sig(SIGFPE, current, 1);
          return;
        }
@@ -662,8+662,8 @@ static int valid_prefix(u_char *Byte, u_char **fpu_eip,
 void math_abort(struct info * info, unsigned int signal)
 {
        FPU_EIP = FPU_ORIG_EIP;
-       current->tss.trap_no = 16;
-       current->tss.error_code = 0;
+       current->thread.trap_no = 16;
+       current->thread.error_code = 0;
        send_sig(signal,current,1);
        RE_ENTRANT_CHECK_OFF;
        __asm__("movl %0,%%esp ; ret": :"g" (((long) info)-4));
index 1571b2f..3cda85f 100644 (file)
 #define SEG_EXPAND_DOWN(s)     (((s).b & ((1 << 11) | (1 << 10))) \
                                 == (1 << 10))
 
-#define I387                   (current->tss.i387)
+#define I387                   (current->thread.i387)
 #define FPU_info               (I387.soft.info)
 
 #define FPU_CS                 (*(unsigned short *) &(FPU_info->___cs))
index cade217..f398f73 100644 (file)
@@ -805,7+805,7 @@ static void unswap_process(struct mm_struct * mm, unsigned long entry,
        /*
         * Go through process' page directory.
         */
-       if (!mm || mm == &init_mm)
+       if (!mm)
                return;
        for (vma = mm->mmap; vma; vma = vma->vm_next) {
                pgd_t * pgd = pgd_offset(mm, vma->vm_start);
index 97f3bd1..cb5e5f7 100644 (file)
@@ -43,7+43,7 @@ static struct fs_struct init_fs = INIT_FS;
 static struct file * init_fd_array[NR_OPEN] = { NULL, };
 static struct files_struct init_files = INIT_FILES;
 static struct signal_struct init_signals = INIT_SIGNALS;
-struct mm_struct init_mm = INIT_MM;
+struct mm_struct init_mm = INIT_MM(init_mm);
 
 union task_union init_task_union
        __attribute__((section("init_task"), aligned(2*PAGE_SIZE)))
index 39dcd9c..b9124ed 100644 (file)
@@ -213,10+213,10 @@ __initfunc(void setup_arch(char **cmdline_p, unsigned long * memory_start_p,
                asm __volatile__ ("frestore %0" : : "m" (zero));
        }
 
-       init_task.mm->start_code = PAGE_OFFSET;
-       init_task.mm->end_code = (unsigned long) &_etext;
-       init_task.mm->end_data = (unsigned long) &_edata;
-       init_task.mm->brk = (unsigned long) &_end;
+       init_mm.start_code = PAGE_OFFSET;
+       init_mm.end_code = (unsigned long) &_etext;
+       init_mm.end_data = (unsigned long) &_edata;
+       init_mm.brk = (unsigned long) &_end;
 
        *cmdline_p = m68k_command_line;
        memcpy(saved_command_line, *cmdline_p, CL_SIZE);
index ef1b855..7ae87b2 100644 (file)
@@ -49,7+49,7 @@ asmlinkage int do_page_fault(struct pt_regs *regs, unsigned long address,
         * If we're in an interrupt or have no user
         * context, we must not take the fault..
         */
-       if (in_interrupt() || mm == &init_mm)
+       if (in_interrupt() || !mm)
                goto no_context;
 
        down(&mm->mmap_sem);
index ea48cab..2170bde 100644 (file)
@@ -93,7+93,7 @@ bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
 bool 'Sysctl support' CONFIG_SYSCTL
 
 if [ "$CONFIG_SGI" != "y" -a "$CONFIG_DECSTATION" != "y" -a "$CONFIG_BAGET_MIPS" != "y" ]; then
-source drivers/misc/Config.in
+source drivers/parport/Config.in
 fi
 endmenu
 
index efc59de..2389c0b 100644 (file)
@@ -55,7+55,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long write,
         * If we're in an interrupt or have no user
         * context, we must not take the fault..
         */
-       if (in_interrupt() || mm == &init_mm)
+       if (in_interrupt() || !mm)
                goto no_context;
 #if 0
        printk("[%s:%d:%08lx:%ld:%08lx]\n", current->comm, current->pid,
index 3336277..416d1c5 100644 (file)
@@ -66,7+66,7 @@ define_bool CONFIG_BINFMT_ELF y
 define_bool CONFIG_KERNEL_ELF y
 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
 
-source drivers/misc/Config.in
+source drivers/parport/Config.in
 
 bool 'Support for VGA Console' CONFIG_VGA_CONSOLE
 bool 'Support for frame buffer devices' CONFIG_FB
index 2540e09..0ee33bb 100644 (file)
@@ -345,7+345,7 @@ void kernel_set_cachemode( unsigned long address, unsigned long size,
        {
                pte_t *pte;
 
-               pte = my_find_pte(init_task.mm, address);
+               pte = my_find_pte(&init_mm, address);
                if ( !pte )
                {
                        printk("pte NULL in kernel_set_cachemode()\n");
@@ -354,7+354,7 @@ void kernel_set_cachemode( unsigned long address, unsigned long size,
 
                 pte_val (*pte) &= mask;
                 pte_val (*pte) |= flags;
-                flush_tlb_page(find_vma(init_task.mm,address),address);
+                flush_tlb_page(find_vma(&init_mm,address),address);
 
                address += PAGE_SIZE;
        }
index 51246d3..a5a935c 100644 (file)
@@ -227,7+227,7 @@ void zero_paged(void)
                /*
                 * Make the page no cache so we don't blow our cache with 0's
                 */
-               pte = find_pte(init_task.mm, pageptr);
+               pte = find_pte(&init_mm, pageptr);
                if ( !pte )
                {
                        printk("pte NULL in zero_paged()\n");
@@ -235,7+235,7 @@ void zero_paged(void)
                }
                
                pte_uncache(*pte);
-               flush_tlb_page(find_vma(init_task.mm,pageptr),pageptr);
+               flush_tlb_page(find_vma(&init_mm,pageptr),pageptr);
                /*
                 * Important here to not take time away from real processes.
                 */
@@ -260,7+260,7 @@ void zero_paged(void)
                
                /* turn cache on for this page */
                pte_cache(*pte);
-               flush_tlb_page(find_vma(init_task.mm,pageptr),pageptr);
+               flush_tlb_page(find_vma(&init_mm,pageptr),pageptr);
                /* atomically add this page to the list */
                asm (   "101:lwarx  %0,0,%1\n"  /* reserve zero_cache */
                        "    stw    %0,0(%2)\n" /* update *pageptr */
index 181a72d..ee3ace0 100644 (file)
@@ -527,10+527,10 @@ __initfunc(void setup_arch(char **cmdline_p,
        /* reboot on panic */   
        panic_timeout = 180;
        
-       init_task.mm->start_code = PAGE_OFFSET;
-       init_task.mm->end_code = (unsigned long) _etext;
-       init_task.mm->end_data = (unsigned long) _edata;
-       init_task.mm->brk = (unsigned long) klimit;     
+       init_mm.start_code = PAGE_OFFSET;
+       init_mm.end_code = (unsigned long) _etext;
+       init_mm.end_data = (unsigned long) _edata;
+       init_mm.brk = (unsigned long) klimit;   
 
        /* Save unparsed command line copy for /proc/cmdline */
        strcpy(saved_command_line, cmd_line);
index ee48d5b..18c94c0 100644 (file)
@@ -403,7+403,7 @@ void __init smp_callin(void)
 #if 0
        current->mm->mmap->vm_page_prot = PAGE_SHARED;
        current->mm->mmap->vm_start = PAGE_OFFSET;
-       current->mm->mmap->vm_end = init_task.mm->mmap->vm_end;
+       current->mm->mmap->vm_end = init_mm.mmap->vm_end;
 #endif
        cpu_callin_map[current->processor] = 1;
        while(!smp_commenced)
index fde053d..e2f0213 100644 (file)
@@ -82,7+82,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address,
                        return;
        }
 #endif
-       if (in_interrupt()) {
+       if (in_interrupt() || !mm) {
                static int complained;
                if (complained < 20) {
                        ++complained;
index f4524bc..ec39072 100644 (file)
@@ -444,11+444,11 @@ unsigned long iopa(unsigned long addr)
 #endif /* CONFIG_APUS */
 #endif /* CONFIG_8xx */
        /* Do we have a page table? */
-       if (init_task.mm->pgd == NULL)
+       if (init_mm.pgd == NULL)
                return 0;
 
        /* Use upper 10 bits of addr to index the first level map */
-       pd = (pmd_t *) (init_task.mm->pgd + (addr >> PGDIR_SHIFT));
+       pd = (pmd_t *) (init_mm.pgd + (addr >> PGDIR_SHIFT));
        if (pmd_none(*pd))
                return 0;
 
index e07b4f4..0140cde 100644 (file)
@@ -295,7+295,7 @@ static inline unsigned long apmmu_hwprobe(unsigned long vaddr)
 
 static inline void apmmu_uncache_page(unsigned long addr)
 {
-       pgd_t *pgdp = apmmu_pgd_offset(init_task.mm, addr);
+       pgd_t *pgdp = apmmu_pgd_offset(&init_mm, addr);
        pmd_t *pmdp;
        pte_t *ptep;
 
@@ -316,7+316,7 @@ static inline void apmmu_uncache_page(unsigned long addr)
 
 static inline void apmmu_recache_page(unsigned long addr)
 {
-       pgd_t *pgdp = apmmu_pgd_offset(init_task.mm, addr);
+       pgd_t *pgdp = apmmu_pgd_offset(&init_mm, addr);
        pmd_t *pmdp;
        pte_t *ptep;
 
@@ -782,7+782,7 @@ __initfunc(static inline void apmmu_allocate_ptable_skeleton(unsigned long start
        pte_t *ptep;
 
        while(start < end) {
-               pgdp = apmmu_pgd_offset(init_task.mm, start);
+               pgdp = apmmu_pgd_offset(&init_mm, start);
                if(apmmu_pgd_none(*pgdp)) {
                        pmdp = sparc_init_alloc(&mempool, APMMU_PMD_TABLE_SIZE);
                        apmmu_early_pgd_set(pgdp, pmdp);
@@ -804,7+804,7 @@ __initfunc(static void make_page(unsigned virt_page, unsigned phys_page, unsigne
        pte_t *ptep;
        unsigned start = virt_page<<12;
 
-       pgdp = apmmu_pgd_offset(init_task.mm, start);
+       pgdp = apmmu_pgd_offset(&init_mm, start);
        if(apmmu_pgd_none(*pgdp)) {
                pmdp = sparc_init_alloc(&mempool, APMMU_PMD_TABLE_SIZE);
                apmmu_early_pgd_set(pgdp, pmdp);
@@ -824,7+824,7 @@ __initfunc(static void make_large_page(unsigned virt_page, unsigned phys_page, u
        pgd_t *pgdp;
        unsigned start = virt_page<<12;
 
-       pgdp = apmmu_pgd_offset(init_task.mm, start);
+       pgdp = apmmu_pgd_offset(&init_mm, start);
        *pgdp = __pgd((phys_page<<8) | prot);
 }
 
@@ -907,7+907,7 @@ __initfunc(static void map_kernel(void))
                make_large_page((KERNBASE+phys)>>12,
                                (phys>>12),
                                APMMU_CACHE|APMMU_PRIV|APMMU_VALID);
-       init_task.mm->mmap->vm_start = page_offset = KERNBASE;
+       init_mm.mmap->vm_start = page_offset = KERNBASE;
        stack_top = page_offset - PAGE_SIZE;
 }
 
index 1e22e08..35a0156 100644 (file)
@@ -489,10+489,10 @@ __initfunc(void setup_arch(char **cmdline_p,
 
 
        /* Due to stack alignment restrictions and assumptions... */
-       init_task.mm->mmap->vm_page_prot = PAGE_SHARED;
-       init_task.mm->mmap->vm_start = KERNBASE;
-       init_task.mm->mmap->vm_end = *memory_end_p;
-       init_task.mm->context = (unsigned long) NO_CONTEXT;
+       init_mm.mmap->vm_page_prot = PAGE_SHARED;
+       init_mm.mmap->vm_start = KERNBASE;
+       init_mm.mmap->vm_end = *memory_end_p;
+       init_mm.context = (unsigned long) NO_CONTEXT;
        init_task.tss.kregs = &fake_swapper_regs;
 
        if (serial_console)
index 64ef31b..bde7e58 100644 (file)
@@ -131,7+131,7 @@ __initfunc(void smp4d_callin(void))
        
        current->mm->mmap->vm_page_prot = PAGE_SHARED;
        current->mm->mmap->vm_start = PAGE_OFFSET;
-       current->mm->mmap->vm_end = init_task.mm->mmap->vm_end;
+       current->mm->mmap->vm_end = init_mm.mmap->vm_end;
        
        local_flush_cache_all();
        local_flush_tlb_all();
index 3fb1044..7146672 100644 (file)
@@ -109,7+109,7 @@ __initfunc(void smp4m_callin(void))
                             : "memory" /* paranoid */);
        current->mm->mmap->vm_page_prot = PAGE_SHARED;
        current->mm->mmap->vm_start = PAGE_OFFSET;
-       current->mm->mmap->vm_end = init_task.mm->mmap->vm_end;
+       current->mm->mmap->vm_end = init_mm.mmap->vm_end;
        
        while(!smp_commenced)
                barrier();
index 0f1f3d9..fab4084 100644 (file)
@@ -205,7+205,7 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,
         * If we're in an interrupt or have no user
         * context, we must not take the fault..
         */
-        if (in_interrupt() || mm == &init_mm)
+        if (in_interrupt() || !mm)
                 goto do_kernel_fault;
 
        down(&mm->mmap_sem);
index 66d3c53..51979a6 100644 (file)
@@ -846,7+846,7 @@ void srmmu_mapioaddr(unsigned long physaddr, unsigned long virt_addr, int bus_ty
        unsigned long tmp;
 
        physaddr &= PAGE_MASK;
-       pgdp = srmmu_pgd_offset(init_task.mm, virt_addr);
+       pgdp = srmmu_pgd_offset(&init_mm, virt_addr);
        pmdp = pmd_offset(pgdp, virt_addr);
        ptep = pte_offset(pmdp, virt_addr);
        tmp = (physaddr >> 4) | SRMMU_ET_PTE;
@@ -871,7+871,7 @@ void srmmu_unmapioaddr(unsigned long virt_addr)
        pmd_t *pmdp;
        pte_t *ptep;
 
-       pgdp = srmmu_pgd_offset(init_task.mm, virt_addr);
+       pgdp = srmmu_pgd_offset(&init_mm, virt_addr);
        pmdp = pmd_offset(pgdp, virt_addr);
        ptep = pte_offset(pmdp, virt_addr);
 
@@ -1476,7+1476,7 @@ static inline void srmmu_allocate_ptable_skeleton(unsigned long start, unsigned
        pte_t *ptep;
 
        while(start < end) {
-               pgdp = srmmu_pgd_offset(init_task.mm, start);
+               pgdp = srmmu_pgd_offset(&init_mm, start);
                if(srmmu_pgd_none(*pgdp)) {
                        pmdp = sparc_init_alloc(&mempool, SRMMU_PMD_TABLE_SIZE);
                        srmmu_early_pgd_set(pgdp, pmdp);
@@ -1526,7+1526,7 @@ __initfunc(void srmmu_inherit_prom_mappings(unsigned long start,unsigned long en
                                what = 2;
                }
     
-               pgdp = srmmu_pgd_offset(init_task.mm, start);
+               pgdp = srmmu_pgd_offset(&init_mm, start);
                if(what == 2) {
                        *pgdp = __pgd(prompte);
                        start += SRMMU_PGDIR_SIZE;
@@ -1626,7+1626,7 @@ __initfunc(void srmmu_end_memory(unsigned long memory_size, unsigned long *end_m
 /* Create a third-level SRMMU 16MB page mapping. */
 __initfunc(static void do_large_mapping(unsigned long vaddr, unsigned long phys_base))
 {
-       pgd_t *pgdp = srmmu_pgd_offset(init_task.mm, vaddr);
+       pgd_t *pgdp = srmmu_pgd_offset(&init_mm, vaddr);
        unsigned long big_pte;
 
        MKTRACE(("dlm[v<%08lx>-->p<%08lx>]", vaddr, phys_base));
@@ -1840,7+1840,7 @@ check_and_return:
                }
        }
        MKTRACE(("success\n"));
-       init_task.mm->mmap->vm_start = page_offset = low_base;
+       init_mm.mmap->vm_start = page_offset = low_base;
        stack_top = page_offset - PAGE_SIZE;
        BTFIXUPSET_SETHI(page_offset, low_base);
        BTFIXUPSET_SETHI(stack_top, page_offset - PAGE_SIZE);
index c6bf02f..7d825cc 100644 (file)
@@ -1560,7+1560,7 @@ __initfunc(static unsigned long sun4c_init_lock_areas(unsigned long start_mem))
        memset((void *) start_mem, 0, bitmap_size);
        start_mem += bitmap_size;
 
-       sun4c_kstack_vma.vm_mm = init_task.mm;
+       sun4c_kstack_vma.vm_mm = &init_mm;
        sun4c_kstack_vma.vm_start = sun4c_taskstack_start;
        sun4c_kstack_vma.vm_end = sun4c_taskstack_end;
        sun4c_kstack_vma.vm_page_prot = PAGE_SHARED;
index e03e9b4..bff4869 100644 (file)
@@ -68,7+68,7 @@ if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
 fi
 
 if [ "$CONFIG_PCI" = "y" ]; then
-  source drivers/misc/Config.in
+  source drivers/parport/Config.in
   dep_tristate '  Parallel printer support' CONFIG_PRINTER $CONFIG_PARPORT
   tristate 'SUNW,envctrl support' CONFIG_ENVCTRL
 fi
index d5e980e..d47cd82 100644 (file)
@@ -531,10+531,10 @@ __initfunc(void setup_arch(char **cmdline_p,
 #endif 
 
        /* Due to stack alignment restrictions and assumptions... */
-       init_task.mm->mmap->vm_page_prot = PAGE_SHARED;
-       init_task.mm->mmap->vm_start = PAGE_OFFSET;
-       init_task.mm->mmap->vm_end = *memory_end_p;
-       init_task.mm->context = (unsigned long) NO_CONTEXT;
+       init_mm.mmap->vm_page_prot = PAGE_SHARED;
+       init_mm.mmap->vm_start = PAGE_OFFSET;
+       init_mm.mmap->vm_end = *memory_end_p;
+       init_mm.context = (unsigned long) NO_CONTEXT;
        init_task.tss.kregs = &fake_swapper_regs;
 
 #ifdef CONFIG_IP_PNP
index 04aa828..7eae02a 100644 (file)
@@ -154,7+154,7 @@ asmlinkage void do_sparc64_fault(struct pt_regs *regs, unsigned long address, in
         * If we're in an interrupt or have no user
         * context, we must not take the fault..
         */
-       if (in_interrupt() || mm == &init_mm)
+       if (in_interrupt() || !mm)
                goto do_kernel_fault;
 
        down(&mm->mmap_sem);
index e516fe2..f9f067a 100644 (file)
@@ -7,7+7,7 @@
 #
 # Note 2! The CFLAGS definitions are now in the main makefile.
 
-SUB_DIRS     := block char net misc sound
+SUB_DIRS     := block char net parport sound
 MOD_SUB_DIRS := $(SUB_DIRS)
 ALL_SUB_DIRS := $(SUB_DIRS) pci sgi scsi sbus cdrom isdn pnp i2o \
                                macintosh video dio zorro fc4 usb \
index 4a24bf1..27fa2fe 100644 (file)
  * as published by the Free Software Foundation; either version
  * 2 of the License, or (at your option) any later version.
  *
- * A /dev/parportxy device node represents an arbitrary device ('y')
+ * A /dev/parportx device node represents an arbitrary device
  * on port 'x'.  The following operations are possible:
  *
  * open                do nothing, set up default IEEE 1284 protocol to be COMPAT
similarity index 84%
rename from drivers/misc/Makefile
rename to drivers/parport/Makefile
index 505a9d1..4149ce1 100644 (file)
@@ -16,18+16,17 @@ SUB_DIRS     :=
 MOD_SUB_DIRS := $(SUB_DIRS)
 ALL_SUB_DIRS := $(SUB_DIRS)
 
-L_TARGET := misc.a
+L_TARGET := parport.a
 MX_OBJS  :=
 LX_OBJS  := 
 MI_OBJS  :=
 MIX_OBJS :=
 
 ifeq ($(CONFIG_PARPORT),y)
-  L_OBJS += parport_share.o parport_ieee1284.o parport_ieee1284_ops.o \
-            parport_procfs.o
+  L_OBJS += share.o ieee1284.o ieee1284_ops.o procfs.o
 
   ifeq ($(CONFIG_PARPORT_1284),y)
-    L_OBJS += parport_daisy.o parport_probe.o
+    L_OBJS += daisy.o probe.o
   endif
 
   ifeq ($(CONFIG_PARPORT_PC),y)
@@ -65,17+64,17 @@ ifeq ($(CONFIG_PARPORT),y)
       M_OBJS += parport_atari.o
     endif
   endif
-  LX_OBJS += parport_init.o
+  LX_OBJS += init.o
 else
   ifeq ($(CONFIG_PARPORT),m)
-    MI_OBJS += parport_share.o parport_ieee1284.o parport_ieee1284_ops.o
+    MI_OBJS += share.o ieee1284.o ieee1284_ops.o
     ifeq ($(CONFIG_PARPORT_1284),y)
-      MI_OBJS += parport_daisy.o parport_probe.o
+      MI_OBJS += daisy.o probe.o
     endif
     ifneq ($(CONFIG_PROC_FS),n) 
-      MI_OBJS += parport_procfs.o
+      MI_OBJS += procfs.o
     endif
-    MIX_OBJS += parport_init.o
+    MIX_OBJS += init.o
     M_OBJS += parport.o
   endif
   ifeq ($(CONFIG_PARPORT_PC),m)
index fcf2038..bc4ca74 100644 (file)
@@ -743,10+743,11 @@ static inline char * task_mem(struct task_struct *p, char *buffer)
        struct mm_struct * mm = p->mm;
 
        if (mm) {
-               struct vm_area_struct * vma = mm->mmap;
+               struct vm_area_struct * vma;
                unsigned long data = 0, stack = 0;
                unsigned long exec = 0, lib = 0;
 
+               down(&mm->mmap_sem);
                for (vma = mm->mmap; vma; vma = vma->vm_next) {
                        unsigned long len = (vma->vm_end - vma->vm_start) >> 10;
                        if (!vma->vm_file) {
@@ -763,7+764,7 @@ static inline char * task_mem(struct task_struct *p, char *buffer)
                                        continue;
                                lib += len;
                        }
-               }       
+               }
                buffer += sprintf(buffer,
                        "VmSize:\t%8lu kB\n"
                        "VmLck:\t%8lu kB\n"
@@ -777,6+778,7 @@ static inline char * task_mem(struct task_struct *p, char *buffer)
                        mm->rss << (PAGE_SHIFT-10),
                        data - stack, stack,
                        exec - lib, lib);
+               up(&mm->mmap_sem);
        }
        return buffer;
 }
index 6f5c63e..6a856f2 100644 (file)
@@ -104,15+104,18 @@ static struct dentry * proc_follow_link(struct dentry *dentry,
                        struct vm_area_struct * vma;
                        if (!p->mm)
                                goto out_unlock;
+                       down(&p->mm->mmap_sem);
                        vma = p->mm->mmap;
                        while (vma) {
                                if ((vma->vm_flags & VM_EXECUTABLE) && 
                                    vma->vm_file) {
                                        result = vma->vm_file->f_dentry;
+                                       up(&p->mm->mmap_sem);
                                        goto out_dget;
                                }
                                vma = vma->vm_next;
                        }
+                       up(&p->mm->mmap_sem);
                        goto out_unlock;
                }
                default:
index 870fad7..56c7233 100644 (file)
  *                    potential and subtle race discovered by Ulrich Schmid
  *                    in down_interruptible(). Since I started to play here I
  *                    also implemented the `trylock' semaphore operation.
+ *          1999-07-02 Artur Skawina <skawina@geocities.com>
+ *                     Optimized "0(ecx)" -> "(ecx)" (the assembler does not
+ *                     do this). Changed calling sequences from push/jmp to
+ *                     traditional call/ret.
  *
  * If you would like to see an analysis of this implementation, please
  * ftp to gcom.com and download the file
@@ -112,12+116,12 @@ extern inline void down(struct semaphore * sem)
 #ifdef __SMP__
                "lock ; "
 #endif
-               "decl 0(%0)\n\t"
+               "decl (%0)\n\t"     /* --sem->count */
                "js 2f\n"
                "1:\n"
                ".section .text.lock,\"ax\"\n"
-               "2:\tpushl $1b\n\t"
-               "jmp __down_failed\n"
+               "2:\tcall __down_failed\n\t"
+               "jmp 1b\n"
                ".previous"
                :/* no outputs */
                :"c" (sem)
@@ -137,13+141,13 @@ extern inline int down_interruptible(struct semaphore * sem)
 #ifdef __SMP__
                "lock ; "
 #endif
-               "decl 0(%1)\n\t"
+               "decl (%1)\n\t"     /* --sem->count */
                "js 2f\n\t"
                "xorl %0,%0\n"
                "1:\n"
                ".section .text.lock,\"ax\"\n"
-               "2:\tpushl $1b\n\t"
-               "jmp __down_failed_interruptible\n"
+               "2:\tcall __down_failed_interruptible\n\t"
+               "jmp 1b\n"
                ".previous"
                :"=a" (result)
                :"c" (sem)
@@ -164,13+168,13 @@ extern inline int down_trylock(struct semaphore * sem)
 #ifdef __SMP__
                "lock ; "
 #endif
-               "decl 0(%1)\n\t"
+               "decl (%1)\n\t"     /* --sem->count */
                "js 2f\n\t"
                "xorl %0,%0\n"
                "1:\n"
                ".section .text.lock,\"ax\"\n"
-               "2:\tpushl $1b\n\t"
-               "jmp __down_failed_trylock\n"
+               "2:\tcall __down_failed_trylock\n\t"
+               "jmp 1b\n"
                ".previous"
                :"=a" (result)
                :"c" (sem)
@@ -194,12+198,12 @@ extern inline void up(struct semaphore * sem)
 #ifdef __SMP__
                "lock ; "
 #endif
-               "incl 0(%0)\n\t"
+               "incl (%0)\n\t"     /* ++sem->count */
                "jle 2f\n"
                "1:\n"
                ".section .text.lock,\"ax\"\n"
-               "2:\tpushl $1b\n\t"
-               "jmp __up_wakeup\n"
+               "2:\tcall __up_wakeup\n\t"
+               "jmp 1b\n"
                ".previous"
                :/* no outputs */
                :"c" (sem)
index 48959e3..54904a2 100644 (file)
@@ -156,7+156,9 @@ int vsprintf(char *buf, const char *fmt, va_list args)
        int precision;          /* min. # of digits for integers; max
                                   number of chars for from string */
        int qualifier;          /* 'h', 'l', or 'L' for integer fields */
+                               /* 'z' support added 23/7/1999 S.H.    */
 
+       
        for (str=buf ; *fmt ; ++fmt) {
                if (*fmt != '%') {
                        *str++ = *fmt;
@@ -206,7+208,7 @@ int vsprintf(char *buf, const char *fmt, va_list args)
 
                /* get the conversion qualifier */
                qualifier = -1;
-               if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L') {
+               if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt =='z') {
                        qualifier = *fmt;
                        ++fmt;
                }
@@ -255,6+257,9 @@ int vsprintf(char *buf, const char *fmt, va_list args)
                        if (qualifier == 'l') {
                                long * ip = va_arg(args, long *);
                                *ip = (str - buf);
+                       } else if (qualifier == 'z') {
+                               size_t * ip = va_arg(args, size_t *);
+                               *ip = (str - buf);
                        } else {
                                int * ip = va_arg(args, int *);
                                *ip = (str - buf);
@@ -292,6+297,8 @@ int vsprintf(char *buf, const char *fmt, va_list args)
                }
                if (qualifier == 'l')
                        num = va_arg(args, unsigned long);
+               else if (qualifier == 'z')
+                       num = va_arg(args, size_t);
                else if (qualifier == 'h') {
                        num = (unsigned short) va_arg(args, int);
                        if (flags & SIGN)
close