]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
authorLinus Torvalds <torvalds@g5.osdl.org>
Fri, 24 Feb 2006 22:32:18 +0000 (14:32 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 24 Feb 2006 22:32:18 +0000 (14:32 -0800)
45 files changed:
Documentation/filesystems/tmpfs.txt
arch/i386/kernel/Makefile
arch/i386/kernel/cpu/common.c
arch/i386/kernel/efi.c
arch/i386/kernel/head.S
arch/i386/kernel/i386_ksyms.c
arch/i386/kernel/kprobes.c
arch/i386/kernel/smpboot.c
arch/i386/kernel/topology.c [new file with mode: 0644]
arch/i386/mach-default/Makefile
arch/i386/mach-default/topology.c [deleted file]
arch/i386/mach-voyager/voyager_basic.c
arch/i386/mach-voyager/voyager_smp.c
arch/m32r/Makefile
arch/m32r/kernel/signal.c
arch/m32r/lib/usercopy.c
arch/mips/kernel/scall32-o32.S
arch/s390/kernel/compat_wrapper.S
arch/um/drivers/cow.h
arch/um/drivers/cow_sys.h
arch/um/drivers/cow_user.c
arch/um/drivers/net_user.c
arch/um/drivers/ubd_kern.c
arch/um/include/init.h
arch/um/include/os.h
arch/um/os-Linux/file.c
arch/um/os-Linux/process.c
arch/um/sys-i386/ldt.c
drivers/md/dm.c
drivers/mtd/chips/cfi_cmdset_0001.c
drivers/video/Kconfig
drivers/video/asiliantfb.c
drivers/video/au1100fb.c
drivers/video/console/vgacon.c
drivers/video/gbefb.c
fs/namei.c
fs/ramfs/inode.c
include/asm-i386/desc.h
include/asm-i386/kprobes.h
include/asm-m32r/uaccess.h
include/linux/syscalls.h
mm/mempolicy.c
mm/vmscan.c
sound/drivers/opl3/opl3_oss.c
sound/isa/cs423x/cs4236.c

index 8a155418c705eac2a05d37ce7f20d2b0696c4a1d..1773106976a26ebf7aaf425141797ea43f4563f1 100644 (file)
@@ -92,6 +92,15 @@ NodeList format is a comma-separated list of decimal numbers and ranges,
 a range being two hyphen-separated decimal numbers, the smallest and
 largest node numbers in the range.  For example, mpol=bind:0-3,5,7,9-15
 
+Note that trying to mount a tmpfs with an mpol option will fail if the
+running kernel does not support NUMA; and will fail if its nodelist
+specifies a node >= MAX_NUMNODES.  If your system relies on that tmpfs
+being mounted, but from time to time runs a kernel built without NUMA
+capability (perhaps a safe recovery kernel), or configured to support
+fewer nodes, then it is advisable to omit the mpol option from automatic
+mount options.  It can be added later, when the tmpfs is already mounted
+on MountPoint, by 'mount -o remount,mpol=Policy:NodeList MountPoint'.
+
 
 To specify the initial root directory you can use the following mount
 options:
index 60c3f76dfca42efa00e71f9ae34a85d837511e27..53bb9a79e274e5cf685edf4ffaa89c840a5954bd 100644 (file)
@@ -7,7 +7,7 @@ extra-y := head.o init_task.o vmlinux.lds
 obj-y  := process.o semaphore.o signal.o entry.o traps.o irq.o \
                ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \
                pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o \
-               quirks.o i8237.o
+               quirks.o i8237.o topology.o
 
 obj-y                          += cpu/
 obj-y                          += timers/
index 7eb9213734a321614ea6da6837ccd1bbbdf1dd85..4ecd4b326ded5400a5e3641560c59c5e8621b6cd 100644 (file)
@@ -4,6 +4,7 @@
 #include <linux/smp.h>
 #include <linux/module.h>
 #include <linux/percpu.h>
+#include <linux/bootmem.h>
 #include <asm/semaphore.h>
 #include <asm/processor.h>
 #include <asm/i387.h>
@@ -18,6 +19,9 @@
 
 #include "cpu.h"
 
+DEFINE_PER_CPU(struct Xgt_desc_struct, cpu_gdt_descr);
+EXPORT_PER_CPU_SYMBOL(cpu_gdt_descr);
+
 DEFINE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]);
 EXPORT_PER_CPU_SYMBOL(cpu_16bit_stack);
 
@@ -571,8 +575,9 @@ void __devinit cpu_init(void)
        int cpu = smp_processor_id();
        struct tss_struct * t = &per_cpu(init_tss, cpu);
        struct thread_struct *thread = &current->thread;
-       struct desc_struct *gdt = get_cpu_gdt_table(cpu);
+       struct desc_struct *gdt;
        __u32 stk16_off = (__u32)&per_cpu(cpu_16bit_stack, cpu);
+       struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, cpu);
 
        if (cpu_test_and_set(cpu, cpu_initialized)) {
                printk(KERN_WARNING "CPU#%d already initialized!\n", cpu);
@@ -589,6 +594,25 @@ void __devinit cpu_init(void)
                set_in_cr4(X86_CR4_TSD);
        }
 
+       /*
+        * This is a horrible hack to allocate the GDT.  The problem
+        * is that cpu_init() is called really early for the boot CPU
+        * (and hence needs bootmem) but much later for the secondary
+        * CPUs, when bootmem will have gone away
+        */
+       if (NODE_DATA(0)->bdata->node_bootmem_map) {
+               gdt = (struct desc_struct *)alloc_bootmem_pages(PAGE_SIZE);
+               /* alloc_bootmem_pages panics on failure, so no check */
+               memset(gdt, 0, PAGE_SIZE);
+       } else {
+               gdt = (struct desc_struct *)get_zeroed_page(GFP_KERNEL);
+               if (unlikely(!gdt)) {
+                       printk(KERN_CRIT "CPU%d failed to allocate GDT\n", cpu);
+                       for (;;)
+                               local_irq_enable();
+               }
+       }
+
        /*
         * Initialize the per-CPU GDT with the boot GDT,
         * and set up the GDT descriptor:
@@ -601,10 +625,10 @@ void __devinit cpu_init(void)
                ((((__u64)stk16_off) << 32) & 0xff00000000000000ULL) |
                (CPU_16BIT_STACK_SIZE - 1);
 
-       cpu_gdt_descr[cpu].size = GDT_SIZE - 1;
-       cpu_gdt_descr[cpu].address = (unsigned long)gdt;
+       cpu_gdt_descr->size = GDT_SIZE - 1;
+       cpu_gdt_descr->address = (unsigned long)gdt;
 
-       load_gdt(&cpu_gdt_descr[cpu]);
+       load_gdt(cpu_gdt_descr);
        load_idt(&idt_descr);
 
        /*
index ecad519fd395f6a17607c65737713f5aca26c3d3..e3e42fd6240115f97904eefde20d8828b4bb9f4f 100644 (file)
@@ -103,17 +103,19 @@ static void efi_call_phys_prelog(void)
         */
        local_flush_tlb();
 
-       cpu_gdt_descr[0].address = __pa(cpu_gdt_descr[0].address);
-       load_gdt((struct Xgt_desc_struct *) __pa(&cpu_gdt_descr[0]));
+       per_cpu(cpu_gdt_descr, 0).address =
+                                __pa(per_cpu(cpu_gdt_descr, 0).address);
+       load_gdt((struct Xgt_desc_struct *)__pa(&per_cpu(cpu_gdt_descr, 0)));
 }
 
 static void efi_call_phys_epilog(void)
 {
        unsigned long cr4;
 
-       cpu_gdt_descr[0].address =
-               (unsigned long) __va(cpu_gdt_descr[0].address);
-       load_gdt(&cpu_gdt_descr[0]);
+       per_cpu(cpu_gdt_descr, 0).address =
+                       (unsigned long)__va(per_cpu(cpu_gdt_descr, 0).address);
+       load_gdt((struct Xgt_desc_struct *)__va(&per_cpu(cpu_gdt_descr, 0)));
+
        cr4 = read_cr4();
 
        if (cr4 & X86_CR4_PSE) {
index 2bee6499edd98a9b658aaed95787fbd05cb690ac..e0b7c632efbcb63fa6704baae50b300422da624e 100644 (file)
@@ -534,5 +534,3 @@ ENTRY(cpu_gdt_table)
        .quad 0x0000000000000000        /* 0xf0 - unused */
        .quad 0x0000000000000000        /* 0xf8 - GDT entry 31: double-fault TSS */
 
-       /* Be sure this is zeroed to avoid false validations in Xen */
-       .fill PAGE_SIZE_asm / 8 - GDT_ENTRIES,8,0
index 3999bec50c33d4aceb332d355a0bba15ddfaf3de..055325056a74aa7769d658b459f4840d7ffa328c 100644 (file)
@@ -3,8 +3,6 @@
 #include <asm/checksum.h>
 #include <asm/desc.h>
 
-EXPORT_SYMBOL_GPL(cpu_gdt_descr);
-
 EXPORT_SYMBOL(__down_failed);
 EXPORT_SYMBOL(__down_failed_interruptible);
 EXPORT_SYMBOL(__down_failed_trylock);
index 6483eeb1a4e809f3fef395af0dd151528520c9a4..694a13997637486eefa48313b1d68c37b113d41e 100644 (file)
@@ -58,6 +58,11 @@ static inline int is_IF_modifier(kprobe_opcode_t opcode)
 
 int __kprobes arch_prepare_kprobe(struct kprobe *p)
 {
+       /* insn: must be on special executable page on i386. */
+       p->ainsn.insn = get_insn_slot();
+       if (!p->ainsn.insn)
+               return -ENOMEM;
+
        memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t));
        p->opcode = *p->addr;
        return 0;
@@ -77,6 +82,13 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p)
                           (unsigned long) p->addr + sizeof(kprobe_opcode_t));
 }
 
+void __kprobes arch_remove_kprobe(struct kprobe *p)
+{
+       down(&kprobe_mutex);
+       free_insn_slot(p->ainsn.insn);
+       up(&kprobe_mutex);
+}
+
 static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb)
 {
        kcb->prev_kprobe.kp = kprobe_running();
@@ -111,7 +123,7 @@ static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs)
        if (p->opcode == BREAKPOINT_INSTRUCTION)
                regs->eip = (unsigned long)p->addr;
        else
-               regs->eip = (unsigned long)&p->ainsn.insn;
+               regs->eip = (unsigned long)p->ainsn.insn;
 }
 
 /* Called with kretprobe_lock held */
@@ -351,7 +363,7 @@ static void __kprobes resume_execution(struct kprobe *p,
 {
        unsigned long *tos = (unsigned long *)&regs->esp;
        unsigned long next_eip = 0;
-       unsigned long copy_eip = (unsigned long)&p->ainsn.insn;
+       unsigned long copy_eip = (unsigned long)p->ainsn.insn;
        unsigned long orig_eip = (unsigned long)p->addr;
 
        switch (p->ainsn.insn[0]) {
index fb00ab7b7612821e0c273df1d8f7f98b9a2aafb1..eba7f53f8b4a687c061601ea351943038a163c91 100644 (file)
@@ -898,12 +898,6 @@ static int __devinit do_boot_cpu(int apicid, int cpu)
        unsigned long start_eip;
        unsigned short nmi_high = 0, nmi_low = 0;
 
-       if (!cpu_gdt_descr[cpu].address &&
-           !(cpu_gdt_descr[cpu].address = get_zeroed_page(GFP_KERNEL))) {
-               printk("Failed to allocate GDT for CPU %d\n", cpu);
-               return 1;
-       }
-
        ++cpucount;
 
        /*
diff --git a/arch/i386/kernel/topology.c b/arch/i386/kernel/topology.c
new file mode 100644 (file)
index 0000000..67a0e1b
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * arch/i386/kernel/topology.c - Populate driverfs with topology information
+ *
+ * Written by: Matthew Dobson, IBM Corporation
+ * Original Code: Paul Dorwin, IBM Corporation, Patrick Mochel, OSDL
+ *
+ * Copyright (C) 2002, IBM Corp.
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
+ * NON INFRINGEMENT.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Send feedback to <colpatch@us.ibm.com>
+ */
+#include <linux/init.h>
+#include <linux/smp.h>
+#include <linux/nodemask.h>
+#include <asm/cpu.h>
+
+static struct i386_cpu cpu_devices[NR_CPUS];
+
+int arch_register_cpu(int num){
+       struct node *parent = NULL;
+
+#ifdef CONFIG_NUMA
+       int node = cpu_to_node(num);
+       if (node_online(node))
+               parent = &node_devices[node].node;
+#endif /* CONFIG_NUMA */
+
+       return register_cpu(&cpu_devices[num].cpu, num, parent);
+}
+
+#ifdef CONFIG_HOTPLUG_CPU
+
+void arch_unregister_cpu(int num) {
+       struct node *parent = NULL;
+
+#ifdef CONFIG_NUMA
+       int node = cpu_to_node(num);
+       if (node_online(node))
+               parent = &node_devices[node].node;
+#endif /* CONFIG_NUMA */
+
+       return unregister_cpu(&cpu_devices[num].cpu, parent);
+}
+EXPORT_SYMBOL(arch_register_cpu);
+EXPORT_SYMBOL(arch_unregister_cpu);
+#endif /*CONFIG_HOTPLUG_CPU*/
+
+
+
+#ifdef CONFIG_NUMA
+#include <linux/mmzone.h>
+#include <asm/node.h>
+
+struct i386_node node_devices[MAX_NUMNODES];
+
+static int __init topology_init(void)
+{
+       int i;
+
+       for_each_online_node(i)
+               arch_register_node(i);
+
+       for_each_present_cpu(i)
+               arch_register_cpu(i);
+       return 0;
+}
+
+#else /* !CONFIG_NUMA */
+
+static int __init topology_init(void)
+{
+       int i;
+
+       for_each_present_cpu(i)
+               arch_register_cpu(i);
+       return 0;
+}
+
+#endif /* CONFIG_NUMA */
+
+subsys_initcall(topology_init);
index e95bb0237921124720df2b12994e25f4376913e4..012fe34459e63e576566ccd9bf887ccea97c7a11 100644 (file)
@@ -2,4 +2,4 @@
 # Makefile for the linux kernel.
 #
 
-obj-y                          := setup.o topology.o
+obj-y                          := setup.o
diff --git a/arch/i386/mach-default/topology.c b/arch/i386/mach-default/topology.c
deleted file mode 100644 (file)
index b643140..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * arch/i386/mach-generic/topology.c - Populate driverfs with topology information
- *
- * Written by: Matthew Dobson, IBM Corporation
- * Original Code: Paul Dorwin, IBM Corporation, Patrick Mochel, OSDL
- *
- * Copyright (C) 2002, IBM Corp.
- *
- * All rights reserved.          
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
- * NON INFRINGEMENT.  See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Send feedback to <colpatch@us.ibm.com>
- */
-#include <linux/init.h>
-#include <linux/smp.h>
-#include <linux/nodemask.h>
-#include <asm/cpu.h>
-
-static struct i386_cpu cpu_devices[NR_CPUS];
-
-int arch_register_cpu(int num){
-       struct node *parent = NULL;
-       
-#ifdef CONFIG_NUMA
-       int node = cpu_to_node(num);
-       if (node_online(node))
-               parent = &node_devices[node].node;
-#endif /* CONFIG_NUMA */
-
-       return register_cpu(&cpu_devices[num].cpu, num, parent);
-}
-
-#ifdef CONFIG_HOTPLUG_CPU
-
-void arch_unregister_cpu(int num) {
-       struct node *parent = NULL;
-
-#ifdef CONFIG_NUMA
-       int node = cpu_to_node(num);
-       if (node_online(node))
-               parent = &node_devices[node].node;
-#endif /* CONFIG_NUMA */
-
-       return unregister_cpu(&cpu_devices[num].cpu, parent);
-}
-EXPORT_SYMBOL(arch_register_cpu);
-EXPORT_SYMBOL(arch_unregister_cpu);
-#endif /*CONFIG_HOTPLUG_CPU*/
-
-
-
-#ifdef CONFIG_NUMA
-#include <linux/mmzone.h>
-#include <asm/node.h>
-
-struct i386_node node_devices[MAX_NUMNODES];
-
-static int __init topology_init(void)
-{
-       int i;
-
-       for_each_online_node(i)
-               arch_register_node(i);
-
-       for_each_present_cpu(i)
-               arch_register_cpu(i);
-       return 0;
-}
-
-#else /* !CONFIG_NUMA */
-
-static int __init topology_init(void)
-{
-       int i;
-
-       for_each_present_cpu(i)
-               arch_register_cpu(i);
-       return 0;
-}
-
-#endif /* CONFIG_NUMA */
-
-subsys_initcall(topology_init);
index aa49a33a572cf29ec5ff684d3f20d39fc7568efc..6761d294f2605f12fdb8528f55af4352da3429c3 100644 (file)
@@ -23,6 +23,9 @@
 #include <linux/delay.h>
 #include <linux/reboot.h>
 #include <linux/sysrq.h>
+#include <linux/smp.h>
+#include <linux/nodemask.h>
+#include <asm/cpu.h>
 #include <asm/io.h>
 #include <asm/voyager.h>
 #include <asm/vic.h>
@@ -329,3 +332,15 @@ void machine_power_off(void)
                pm_power_off();
 }
 
+static struct i386_cpu cpu_devices[NR_CPUS];
+
+static int __init topology_init(void)
+{
+       int i;
+
+       for_each_present_cpu(i)
+               register_cpu(&cpu_devices[i].cpu, i, NULL);
+       return 0;
+}
+
+subsys_initcall(topology_init);
index 6e4c3baef6cc220af1e4d26a8808c77685120f60..8165626a5c30ba0e2967d9419ea8648033ba91c0 100644 (file)
@@ -402,6 +402,7 @@ find_smp_config(void)
        cpus_addr(phys_cpu_present_map)[0] |= voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 1) << 8;
        cpus_addr(phys_cpu_present_map)[0] |= voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 2) << 16;
        cpus_addr(phys_cpu_present_map)[0] |= voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 3) << 24;
+       cpu_possible_map = phys_cpu_present_map;
        printk("VOYAGER SMP: phys_cpu_present_map = 0x%lx\n", cpus_addr(phys_cpu_present_map)[0]);
        /* Here we set up the VIC to enable SMP */
        /* enable the CPIs by writing the base vector to their register */
index 983d438b14b61470b0daa57bca585f81c17f71d8..4b3c90ba926c7024108c4972680550126c03217e 100644 (file)
@@ -12,14 +12,14 @@ CFLAGS_MODULE += -mmodel=large
 
 ifdef CONFIG_CHIP_VDEC2
 cflags-$(CONFIG_ISA_M32R2)     += -DNO_FPU -Wa,-bitinst
-aflags-$(CONFIG_ISA_M32R2)     += -DNO_FPU -Wa,-bitinst
+aflags-$(CONFIG_ISA_M32R2)     += -DNO_FPU -O2 -Wa,-bitinst -Wa,-no-parallel
 else
 cflags-$(CONFIG_ISA_M32R2)     += -DNO_FPU -m32r2
-aflags-$(CONFIG_ISA_M32R2)     += -DNO_FPU -m32r2
+aflags-$(CONFIG_ISA_M32R2)     += -DNO_FPU -m32r2 -O2
 endif
 
 cflags-$(CONFIG_ISA_M32R)      += -DNO_FPU
-aflags-$(CONFIG_ISA_M32R)      += -DNO_FPU -Wa,-no-bitinst
+aflags-$(CONFIG_ISA_M32R)      += -DNO_FPU -O2 -Wa,-no-bitinst
 
 CFLAGS += $(cflags-y)
 AFLAGS += $(aflags-y)
index 71763f7a1d1989eb0cda8196694e07043a47ce52..cb33097fefc4453475451d31443b2e380b97f0d5 100644 (file)
@@ -36,7 +36,7 @@ int do_signal(struct pt_regs *, sigset_t *);
 asmlinkage int
 sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize,
                  unsigned long r2, unsigned long r3, unsigned long r4,
-                 unsigned long r5, unsigned long r6, struct pt_regs regs)
+                 unsigned long r5, unsigned long r6, struct pt_regs *regs)
 {
        sigset_t saveset, newset;
 
@@ -54,21 +54,21 @@ sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize,
        recalc_sigpending();
        spin_unlock_irq(&current->sighand->siglock);
 
-       regs.r0 = -EINTR;
+       regs->r0 = -EINTR;
        while (1) {
                current->state = TASK_INTERRUPTIBLE;
                schedule();
-               if (do_signal(&regs, &saveset))
-                       return regs.r0;
+               if (do_signal(regs, &saveset))
+                       return regs->r0;
        }
 }
 
 asmlinkage int
 sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
                unsigned long r2, unsigned long r3, unsigned long r4,
-               unsigned long r5, unsigned long r6, struct pt_regs regs)
+               unsigned long r5, unsigned long r6, struct pt_regs *regs)
 {
-       return do_sigaltstack(uss, uoss, regs.spu);
+       return do_sigaltstack(uss, uoss, regs->spu);
 }
 
 
@@ -140,11 +140,10 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
 asmlinkage int
 sys_rt_sigreturn(unsigned long r0, unsigned long r1,
                 unsigned long r2, unsigned long r3, unsigned long r4,
-                unsigned long r5, unsigned long r6, struct pt_regs regs)
+                unsigned long r5, unsigned long r6, struct pt_regs *regs)
 {
-       struct rt_sigframe __user *frame = (struct rt_sigframe __user *)regs.spu;
+       struct rt_sigframe __user *frame = (struct rt_sigframe __user *)regs->spu;
        sigset_t set;
-       stack_t st;
        int result;
 
        if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
@@ -158,14 +157,11 @@ sys_rt_sigreturn(unsigned long r0, unsigned long r1,
        recalc_sigpending();
        spin_unlock_irq(&current->sighand->siglock);
 
-       if (restore_sigcontext(&regs, &frame->uc.uc_mcontext, &result))
+       if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &result))
                goto badframe;
 
-       if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st)))
+       if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->spu) == -EFAULT)
                goto badframe;
-       /* It is more difficult to avoid calling this function than to
-          call it and ignore errors.  */
-       do_sigaltstack(&st, NULL, regs.spu);
 
        return result;
 
index ce16bbe26a522f57a61aaa1cb0c7faca8f145581..2d1dd2106c4dddac42d01732e2e20d863eb0c550 100644 (file)
@@ -64,7 +64,7 @@ do {                                                                  \
                "       .balign 4\n"                                    \
                "       .long 0b,3b\n"                                  \
                ".previous"                                             \
-               : "=r"(res), "=r"(count), "=&r" (__d0), "=&r" (__d1),   \
+               : "=&r"(res), "=&r"(count), "=&r" (__d0), "=&r" (__d1), \
                  "=&r" (__d2)                                          \
                : "i"(-EFAULT), "0"(count), "1"(count), "3"(src),       \
                  "4"(dst)                                              \
@@ -101,7 +101,7 @@ do {                                                                        \
                "       .balign 4\n"                                    \
                "       .long 0b,3b\n"                                  \
                ".previous"                                             \
-               : "=r"(res), "=r"(count), "=&r" (__d0), "=&r" (__d1),   \
+               : "=&r"(res), "=&r"(count), "=&r" (__d0), "=&r" (__d1), \
                  "=&r" (__d2)                                          \
                : "i"(-EFAULT), "0"(count), "1"(count), "3"(src),       \
                  "4"(dst)                                              \
index d83e033dbc87ec6cb7fc8a731753208df5f95b21..2f2dc54b2e267bce6ed09d31a0d1cc8738f81491 100644 (file)
@@ -626,7 +626,7 @@ einval:     li      v0, -EINVAL
        sys     sys_fstatat64           4
        sys     sys_unlinkat            3
        sys     sys_renameat            4       /* 4295 */
-       sys     sys_linkat              4
+       sys     sys_linkat              5
        sys     sys_symlinkat           3
        sys     sys_readlinkat          4
        sys     sys_fchmodat            3
index 615964cca15f8ec7e76d442d247502d5f66278a9..50e80138e7adeeaabb34aef7d879bbb69139a1e8 100644 (file)
@@ -1552,6 +1552,7 @@ sys_linkat_wrapper:
        llgtr   %r3,%r3                 # const char *
        lgfr    %r4,%r4                 # int
        llgtr   %r5,%r5                 # const char *
+       lgfr    %r6,%r6                 # int
        jg      sys_linkat
 
        .globl sys_symlinkat_wrapper
index dc36b222100b9abde780f996407a758f336afce4..04e3958266e07192c69a1b5ebba418a9e6cd43ed 100644 (file)
@@ -46,7 +46,7 @@ extern int file_reader(__u64 offset, char *buf, int len, void *arg);
 extern int read_cow_header(int (*reader)(__u64, char *, int, void *),
                           void *arg, __u32 *version_out,
                           char **backing_file_out, time_t *mtime_out,
-                          unsigned long long *size_out, int *sectorsize_out,
+                          __u64 *size_out, int *sectorsize_out,
                           __u32 *align_out, int *bitmap_offset_out);
 
 extern int write_cow_header(char *cow_file, int fd, char *backing_file,
index c83fc5d68936d18e8bb97dff24c8d9541498b096..94de4ead4f7a2533ee2cac6501acf925a5aa0ba2 100644 (file)
@@ -23,17 +23,17 @@ static inline char *cow_strdup(char *str)
        return(uml_strdup(str));
 }
 
-static inline int cow_seek_file(int fd, unsigned long long offset)
+static inline int cow_seek_file(int fd, __u64 offset)
 {
        return(os_seek_file(fd, offset));
 }
 
-static inline int cow_file_size(char *file, unsigned long long *size_out)
+static inline int cow_file_size(char *file, __u64 *size_out)
 {
        return(os_file_size(file, size_out));
 }
 
-static inline int cow_write_file(int fd, char *buf, int size)
+static inline int cow_write_file(int fd, void *buf, int size)
 {
        return(os_write_file(fd, buf, size));
 }
index fbe2217db5dd29676462ea9567b443579b9767a6..61951b721268f1c030279cff98b2a25213708ca8 100644 (file)
@@ -176,7 +176,7 @@ int write_cow_header(char *cow_file, int fd, char *backing_file,
        err = -ENOMEM;
        header = cow_malloc(sizeof(*header));
        if(header == NULL){
-               cow_printf("Failed to allocate COW V3 header\n");
+               cow_printf("write_cow_header - failed to allocate COW V3 header\n");
                goto out;
        }
        header->magic = htonl(COW_MAGIC);
@@ -196,15 +196,17 @@ int write_cow_header(char *cow_file, int fd, char *backing_file,
 
        err = os_file_modtime(header->backing_file, &modtime);
        if(err < 0){
-               cow_printf("Backing file '%s' mtime request failed, "
-                          "err = %d\n", header->backing_file, -err);
+               cow_printf("write_cow_header - backing file '%s' mtime "
+                          "request failed, err = %d\n", header->backing_file,
+                          -err);
                goto out_free;
        }
 
        err = cow_file_size(header->backing_file, size);
        if(err < 0){
-               cow_printf("Couldn't get size of backing file '%s', "
-                          "err = %d\n", header->backing_file, -err);
+               cow_printf("write_cow_header - couldn't get size of "
+                          "backing file '%s', err = %d\n",
+                          header->backing_file, -err);
                goto out_free;
        }
 
@@ -214,10 +216,11 @@ int write_cow_header(char *cow_file, int fd, char *backing_file,
        header->alignment = htonl(alignment);
        header->cow_format = COW_BITMAP;
 
-       err = os_write_file(fd, header, sizeof(*header));
+       err = cow_write_file(fd, header, sizeof(*header));
        if(err != sizeof(*header)){
-               cow_printf("Write of header to new COW file '%s' failed, "
-                          "err = %d\n", cow_file, -err);
+               cow_printf("write_cow_header - write of header to "
+                          "new COW file '%s' failed, err = %d\n", cow_file,
+                          -err);
                goto out_free;
        }
        err = 0;
@@ -299,7 +302,7 @@ int read_cow_header(int (*reader)(__u64, char *, int, void *), void *arg,
        }
        else if(version == 3){
                if(n < sizeof(header->v3)){
-                       cow_printf("read_cow_header - failed to read V2 "
+                       cow_printf("read_cow_header - failed to read V3 "
                                   "header\n");
                        goto out;
                }
@@ -359,7 +362,8 @@ int init_cow_file(int fd, char *cow_file, char *backing_file, int sectorsize,
        if(err != sizeof(zero)){
                cow_printf("Write of bitmap to new COW file '%s' failed, "
                           "err = %d\n", cow_file, -err);
-               err = -EINVAL;
+               if (err >= 0)
+                       err = -EINVAL;
                goto out;
        }
 
index 098fa65981aba6404eb9422137466d39d5ffc38b..0e2f06187ea7a1b306370edd7ff9baf03c04958b 100644 (file)
@@ -47,10 +47,12 @@ void tap_check_ips(char *gate_addr, unsigned char *eth_addr)
        }
 }
 
+/* Do reliable error handling as this fails frequently enough. */
 void read_output(int fd, char *output, int len)
 {
-       int remain, n, actual;
+       int remain, ret, expected;
        char c;
+       char *str;
 
        if(output == NULL){
                output = &c;
@@ -58,23 +60,31 @@ void read_output(int fd, char *output, int len)
        }
                
        *output = '\0';
-       n = os_read_file(fd, &remain, sizeof(remain));
-       if(n != sizeof(remain)){
-               printk("read_output - read of length failed, err = %d\n", -n);
-               return;
+       ret = os_read_file(fd, &remain, sizeof(remain));
+
+       if (ret != sizeof(remain)) {
+               expected = sizeof(remain);
+               str = "length";
+               goto err;
        }
 
        while(remain != 0){
-               n = (remain < len) ? remain : len;
-               actual = os_read_file(fd, output, n);
-               if(actual != n){
-                       printk("read_output - read of data failed, "
-                              "err = %d\n", -actual);
-                       return;
+               expected = (remain < len) ? remain : len;
+               ret = os_read_file(fd, output, expected);
+               if (ret != expected) {
+                       str = "data";
+                       goto err;
                }
-               remain -= actual;
+               remain -= ret;
        }
+
        return;
+
+err:
+       if (ret < 0)
+               printk("read_output - read of %s failed, errno = %d\n", str, -ret);
+       else
+               printk("read_output - read of %s failed, read only %d of %d bytes\n", str, ret, expected);
 }
 
 int net_read(int fd, void *buf, int len)
index 101efd26d46799a3eeda011409d181dc971502d7..fa617e0719ab61910d95817916fc774255d41406 100644 (file)
@@ -1135,7 +1135,7 @@ static int path_requires_switch(char *from_cmdline, char *from_cow, char *cow)
 static int backing_file_mismatch(char *file, __u64 size, time_t mtime)
 {
        unsigned long modtime;
-       long long actual;
+       unsigned long long actual;
        int err;
 
        err = os_file_modtime(file, &modtime);
index cbd79a8d213dc4532b8f760d3b1ca207fa98b3f1..d4de7c0120ced888209122f47424d9754c1ed50f 100644 (file)
@@ -122,7 +122,7 @@ extern struct uml_param __uml_setup_start, __uml_setup_end;
 
 #define __exitcall(fn) static exitcall_t __exitcall_##fn __exit_call = fn
 
-#define __init_call __attribute__ ((unused,__section__ (".initcall.init")))
+#define __init_call    __attribute_used__ __attribute__ ((__section__ (".initcall.init")))
 
 #endif
 
index eb1710b81255504bfdcb63f052bde2f77981a1fa..2a1c64d8d0bf25fab3f1f3da5606dd80e54f50a7 100644 (file)
@@ -179,8 +179,11 @@ extern void os_stop_process(int pid);
 extern void os_kill_process(int pid, int reap_child);
 extern void os_kill_ptraced_process(int pid, int reap_child);
 extern void os_usr1_process(int pid);
+extern long os_ptrace_ldt(long pid, long addr, long data);
+
 extern int os_getpid(void);
 extern int os_getpgrp(void);
+
 extern void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int));
 extern void init_new_thread_signals(int altstack);
 extern int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr);
index f55773c819e64fa6be68fe1d319326b11958c195..3bd10deea28063e5809f882e46be956220b0ed5f 100644 (file)
@@ -272,14 +272,23 @@ int os_connect_socket(char *name)
        snprintf(sock.sun_path, sizeof(sock.sun_path), "%s", name);
 
        fd = socket(AF_UNIX, SOCK_STREAM, 0);
-       if(fd < 0)
-               return(fd);
+       if(fd < 0) {
+               err = -errno;
+               goto out;
+       }
 
        err = connect(fd, (struct sockaddr *) &sock, sizeof(sock));
-       if(err)
-               return(-errno);
+       if(err) {
+               err = -errno;
+               goto out_close;
+       }
 
-       return(fd);
+       return fd;
+
+out_close:
+       close(fd);
+out:
+       return err;
 }
 
 void os_close_file(int fd)
index 7f5e2dac2a35ddc3a14eee73613a17d2e9911269..d261888f39c439493f1e2071ed4c98ba07b350ef 100644 (file)
@@ -19,6 +19,7 @@
 #include "irq_user.h"
 #include "kern_util.h"
 #include "longjmp.h"
+#include "skas_ptrace.h"
 
 #define ARBITRARY_ADDR -1
 #define FAILURE_PID    -1
@@ -100,6 +101,21 @@ void os_kill_process(int pid, int reap_child)
                
 }
 
+/* This is here uniquely to have access to the userspace errno, i.e. the one
+ * used by ptrace in case of error.
+ */
+
+long os_ptrace_ldt(long pid, long addr, long data)
+{
+       int ret;
+
+       ret = ptrace(PTRACE_LDT, pid, addr, data);
+
+       if (ret < 0)
+               return -errno;
+       return ret;
+}
+
 /* Kill off a ptraced child by all means available.  kill it normally first,
  * then PTRACE_KILL it, then PTRACE_CONT it in case it's in a run state from
  * which it can't exit directly.
index 1fa09a79a10b682fc74f81e9a4fcc072a5579b93..fe0877b3509ca12da1e0652ecbd245aeaab1f7f6 100644 (file)
@@ -107,7 +107,7 @@ long write_ldt_entry(struct mm_id * mm_idp, int func, struct user_desc * desc,
                 * So we need to switch child's mm into our userspace, then
                 * later switch back.
                 *
-                * Note: I'm unshure: should interrupts be disabled here?
+                * Note: I'm unsure: should interrupts be disabled here?
                 */
                if(!current->active_mm || current->active_mm == &init_mm ||
                   mm_idp != &current->active_mm->context.skas.id)
@@ -129,9 +129,7 @@ long write_ldt_entry(struct mm_id * mm_idp, int func, struct user_desc * desc,
                        pid = userspace_pid[cpu];
                }
 
-               res = ptrace(PTRACE_LDT, pid, 0, (unsigned long) &ldt_op);
-               if(res)
-                       res = errno;
+               res = os_ptrace_ldt(pid, 0, (unsigned long) &ldt_op);
 
                if(proc_mm)
                        put_cpu();
@@ -181,8 +179,7 @@ static long read_ldt_from_host(void __user * ptr, unsigned long bytecount)
         */
 
        cpu = get_cpu();
-       res = ptrace(PTRACE_LDT, userspace_pid[cpu], 0,
-                    (unsigned long) &ptrace_ldt);
+       res = os_ptrace_ldt(userspace_pid[cpu], 0, (unsigned long) &ptrace_ldt);
        put_cpu();
        if(res < 0)
                goto out;
index e9adeb9d172fa80c0f6140a6fcf4a034f4f0fdca..745ca1f67b14a93db8e7c2802746d7963641aa7e 100644 (file)
@@ -849,10 +849,16 @@ static struct mapped_device *alloc_dev(unsigned int minor, int persistent)
 
 static void free_dev(struct mapped_device *md)
 {
-       free_minor(md->disk->first_minor);
+       unsigned int minor = md->disk->first_minor;
+
+       if (md->suspended_bdev) {
+               thaw_bdev(md->suspended_bdev, NULL);
+               bdput(md->suspended_bdev);
+       }
        mempool_destroy(md->tio_pool);
        mempool_destroy(md->io_pool);
        del_gendisk(md->disk);
+       free_minor(minor);
        put_disk(md->disk);
        blk_put_queue(md->queue);
        kfree(md);
index ded2c33f5b853adc256b61c86efe15336a9b414b..1c074d63ff3af865d52acf29d59aa1be824c41bf 100644 (file)
@@ -408,6 +408,7 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary)
                cfi->chips[i].buffer_write_time = 1<<cfi->cfiq->BufWriteTimeoutTyp;
                cfi->chips[i].erase_time = 1<<cfi->cfiq->BlockEraseTimeoutTyp;
                cfi->chips[i].ref_point_counter = 0;
+               init_waitqueue_head(&(cfi->chips[i].wq));
        }
 
        map->fldrv = &cfi_intelext_chipdrv;
index e64ed16bd42fdd446d0a5b0a438b2955a907eabe..f5079c78ba4e0ed51829bf4b2cc669e3c1cb4cd2 100644 (file)
@@ -520,7 +520,7 @@ config FB_GBE
 config FB_GBE_MEM
        int "Video memory size in MB"
        depends on FB_GBE
-       default 8
+       default 4
        help
          This is the amount of memory reserved for the framebuffer,
          which can be any value between 1MB and 8MB.
index 69f75547865df1c799cf427d796672aa73c3ab48..c924d81f7978f2b01ee391afa38e3461357ab0b1 100644 (file)
@@ -322,32 +322,29 @@ static int asiliantfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
        writeb(green, mmio_base + 0x791);
        writeb(blue, mmio_base + 0x791);
 
-       switch(p->var.bits_per_pixel) {
-       case 15:
-               if (regno < 16) {
+       if (regno < 16) {
+               switch(p->var.red.offset) {
+               case 10: /* RGB 555 */
                        ((u32 *)(p->pseudo_palette))[regno] =
                                ((red & 0xf8) << 7) |
                                ((green & 0xf8) << 2) |
                                ((blue & 0xf8) >> 3);
-               }
-               break;
-       case 16:
-               if (regno < 16) {
+                       break;
+               case 11: /* RGB 565 */
                        ((u32 *)(p->pseudo_palette))[regno] =
                                ((red & 0xf8) << 8) |
                                ((green & 0xfc) << 3) |
                                ((blue & 0xf8) >> 3);
-               }
-               break;
-       case 24:
-               if (regno < 24) {
+                       break;
+               case 16: /* RGB 888 */
                        ((u32 *)(p->pseudo_palette))[regno] =
                                (red << 16)  |
                                (green << 8) |
                                (blue);
+                       break;
                }
-               break;
        }
+
        return 0;
 }
 
index 2406899f12078fd5d958a6b9495a3f6e33564fe3..3d04b2def0f165d5ab7cbc2afadace2fa7896eb8 100644 (file)
@@ -49,6 +49,7 @@
 #include <linux/interrupt.h>
 #include <linux/ctype.h>
 #include <linux/dma-mapping.h>
+#include <linux/platform_device.h>
 
 #include <asm/mach-au1x00/au1000.h>
 
@@ -406,7 +407,7 @@ int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma)
 
        vma->vm_flags |= VM_IO;
 
-       if (io_remap_page_range(vma, vma->vm_start, off,
+       if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT,
                                vma->vm_end - vma->vm_start,
                                vma->vm_page_prot)) {
                return -EAGAIN;
index 12d9329d1408bc4201fc07bb9d7d0ac0af15ad0f..5a86978537d242eb62d5eb5904f4db0c99b5b682 100644 (file)
@@ -509,57 +509,60 @@ static int vgacon_doresize(struct vc_data *c,
 {
        unsigned long flags;
        unsigned int scanlines = height * c->vc_font.height;
-       u8 scanlines_lo, r7, vsync_end, mode, max_scan;
+       u8 scanlines_lo = 0, r7 = 0, vsync_end = 0, mode, max_scan;
 
        spin_lock_irqsave(&vga_lock, flags);
 
-       outb_p(VGA_CRTC_MAX_SCAN, vga_video_port_reg);
-       max_scan = inb_p(vga_video_port_val);
-
-       if (max_scan & 0x80)
-               scanlines <<= 1;
-
        vgacon_xres = width * VGA_FONTWIDTH;
        vgacon_yres = height * c->vc_font.height;
-       outb_p(VGA_CRTC_MODE, vga_video_port_reg);
-       mode = inb_p(vga_video_port_val);
+       if (vga_video_type >= VIDEO_TYPE_VGAC) {
+               outb_p(VGA_CRTC_MAX_SCAN, vga_video_port_reg);
+               max_scan = inb_p(vga_video_port_val);
 
-       if (mode & 0x04)
-               scanlines >>= 1;
+               if (max_scan & 0x80)
+                       scanlines <<= 1;
 
-       scanlines -= 1;
-       scanlines_lo = scanlines & 0xff;
+               outb_p(VGA_CRTC_MODE, vga_video_port_reg);
+               mode = inb_p(vga_video_port_val);
 
-       outb_p(VGA_CRTC_OVERFLOW, vga_video_port_reg);
-       r7 = inb_p(vga_video_port_val) & ~0x42;
+               if (mode & 0x04)
+                       scanlines >>= 1;
 
-       if (scanlines & 0x100)
-               r7 |= 0x02;
-       if (scanlines & 0x200)
-               r7 |= 0x40;
+               scanlines -= 1;
+               scanlines_lo = scanlines & 0xff;
 
-       /* deprotect registers */
-       outb_p(VGA_CRTC_V_SYNC_END, vga_video_port_reg);
-       vsync_end = inb_p(vga_video_port_val);
-       outb_p(VGA_CRTC_V_SYNC_END, vga_video_port_reg);
-       outb_p(vsync_end & ~0x80, vga_video_port_val);
+               outb_p(VGA_CRTC_OVERFLOW, vga_video_port_reg);
+               r7 = inb_p(vga_video_port_val) & ~0x42;
+
+               if (scanlines & 0x100)
+                       r7 |= 0x02;
+               if (scanlines & 0x200)
+                       r7 |= 0x40;
+
+               /* deprotect registers */
+               outb_p(VGA_CRTC_V_SYNC_END, vga_video_port_reg);
+               vsync_end = inb_p(vga_video_port_val);
+               outb_p(VGA_CRTC_V_SYNC_END, vga_video_port_reg);
+               outb_p(vsync_end & ~0x80, vga_video_port_val);
+       }
 
        outb_p(VGA_CRTC_H_DISP, vga_video_port_reg);
        outb_p(width - 1, vga_video_port_val);
        outb_p(VGA_CRTC_OFFSET, vga_video_port_reg);
        outb_p(width >> 1, vga_video_port_val);
 
-       outb_p(VGA_CRTC_V_DISP_END, vga_video_port_reg);
-       outb_p(scanlines_lo, vga_video_port_val);
-       outb_p(VGA_CRTC_OVERFLOW, vga_video_port_reg);
-       outb_p(r7,vga_video_port_val);
+       if (vga_video_type >= VIDEO_TYPE_VGAC) {
+               outb_p(VGA_CRTC_V_DISP_END, vga_video_port_reg);
+               outb_p(scanlines_lo, vga_video_port_val);
+               outb_p(VGA_CRTC_OVERFLOW, vga_video_port_reg);
+               outb_p(r7,vga_video_port_val);
 
-       /* reprotect registers */
-       outb_p(VGA_CRTC_V_SYNC_END, vga_video_port_reg);
-       outb_p(vsync_end, vga_video_port_val);
+               /* reprotect registers */
+               outb_p(VGA_CRTC_V_SYNC_END, vga_video_port_reg);
+               outb_p(vsync_end, vga_video_port_val);
+       }
 
        spin_unlock_irqrestore(&vga_lock, flags);
-
        return 0;
 }
 
index c9a7cdf6d543e8edc9bb749d8de2413912c04dfe..5e25b98601967722df5e6014fbfb35d97abedcb7 100644 (file)
@@ -656,12 +656,15 @@ static int gbefb_set_par(struct fb_info *info)
        switch (bytesPerPixel) {
        case 1:
                SET_GBE_FIELD(WID, TYP, val, GBE_CMODE_I8);
+               info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
                break;
        case 2:
                SET_GBE_FIELD(WID, TYP, val, GBE_CMODE_ARGB5);
+               info->fix.visual = FB_VISUAL_TRUECOLOR;
                break;
        case 4:
                SET_GBE_FIELD(WID, TYP, val, GBE_CMODE_RGB8);
+               info->fix.visual = FB_VISUAL_TRUECOLOR;
                break;
        }
        SET_GBE_FIELD(WID, BUF, val, GBE_BMODE_BOTH);
index e28de846c5919f84ba0f45ea464a4ee91913f7a9..557dcf395ca122c1d30ca53b4b36293dab78da1f 100644 (file)
@@ -2224,13 +2224,17 @@ int vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_de
  * and other special files.  --ADM
  */
 asmlinkage long sys_linkat(int olddfd, const char __user *oldname,
-                          int newdfd, const char __user *newname)
+                          int newdfd, const char __user *newname,
+                          int flags)
 {
        struct dentry *new_dentry;
        struct nameidata nd, old_nd;
        int error;
        char * to;
 
+       if (flags != 0)
+               return -EINVAL;
+
        to = getname(newname);
        if (IS_ERR(to))
                return PTR_ERR(to);
@@ -2263,7 +2267,7 @@ exit:
 
 asmlinkage long sys_link(const char __user *oldname, const char __user *newname)
 {
-       return sys_linkat(AT_FDCWD, oldname, AT_FDCWD, newname);
+       return sys_linkat(AT_FDCWD, oldname, AT_FDCWD, newname, 0);
 }
 
 /*
index c66bd5e4c05c3935a2c60e2e53de0b7372b827e4..cde5d48994ae676806034f232775ef662c0cbd15 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/fs.h>
 #include <linux/pagemap.h>
 #include <linux/highmem.h>
+#include <linux/time.h>
 #include <linux/init.h>
 #include <linux/string.h>
 #include <linux/smp_lock.h>
@@ -104,6 +105,7 @@ ramfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
                d_instantiate(dentry, inode);
                dget(dentry);   /* Extra count - pin the dentry in core */
                error = 0;
+               dir->i_mtime = dir->i_ctime = CURRENT_TIME;
        }
        return error;
 }
index 494e73bca0956c2f327e0eaf07e1cb83752cf3bb..89b8b82c82b30bb50695a3d1e63e38324444d31f 100644 (file)
@@ -24,11 +24,13 @@ struct Xgt_desc_struct {
        unsigned short pad;
 } __attribute__ ((packed));
 
-extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS];
+extern struct Xgt_desc_struct idt_descr;
+DECLARE_PER_CPU(struct Xgt_desc_struct, cpu_gdt_descr);
+
 
 static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu)
 {
-       return ((struct desc_struct *)cpu_gdt_descr[cpu].address);
+       return (struct desc_struct *)per_cpu(cpu_gdt_descr, cpu).address;
 }
 
 #define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8))
index 27cac050a60e56cb71c750a196a80c8894e8abb1..a0d2d74a7dda9b9ff9fff6caeba4b062b7f936a3 100644 (file)
@@ -27,6 +27,9 @@
 #include <linux/types.h>
 #include <linux/ptrace.h>
 
+#define  __ARCH_WANT_KPROBES_INSN_SLOT
+
+struct kprobe;
 struct pt_regs;
 
 typedef u8 kprobe_opcode_t;
@@ -40,14 +43,14 @@ typedef u8 kprobe_opcode_t;
 
 #define JPROBE_ENTRY(pentry)   (kprobe_opcode_t *)pentry
 #define ARCH_SUPPORTS_KRETPROBES
-#define arch_remove_kprobe(p)  do {} while (0)
 
+void arch_remove_kprobe(struct kprobe *p);
 void kretprobe_trampoline(void);
 
 /* Architecture specific copy of original instruction*/
 struct arch_specific_insn {
        /* copy of the original instruction */
-       kprobe_opcode_t insn[MAX_INSN_SIZE];
+       kprobe_opcode_t *insn;
 };
 
 struct prev_kprobe {
index 0da7c47d2f01ce5fe0b0af464d3145b9653db18a..e8ae61956a5134fd3dab8d946fc152ffd6a22923 100644 (file)
@@ -328,7 +328,7 @@ extern void __put_user_bad(void);
                 "       .long 1b,4b\n"                                  \
                 "       .long 2b,4b\n"                                  \
                 ".previous"                                             \
-                : "=r"(err)                                             \
+                : "=&r"(err)                                             \
                 : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err)            \
                 : "r14", "memory")
 
@@ -353,7 +353,7 @@ extern void __put_user_bad(void);
                "       .long 1b,4b\n"                                  \
                "       .long 2b,4b\n"                                  \
                ".previous"                                             \
-               : "=r"(err)                                             \
+               : "=&r"(err)                                            \
                : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err)             \
                : "r14", "memory")
 #else
@@ -398,7 +398,7 @@ struct __large_struct { unsigned long buf[100]; };
                "       .balign 4\n"                                    \
                "       .long 1b,3b\n"                                  \
                ".previous"                                             \
-               : "=r"(err)                                             \
+               : "=&r"(err)                                            \
                : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err)             \
                : "r14", "memory")
 
@@ -442,7 +442,7 @@ do {                                                                        \
                "       .balign 4\n"                                    \
                "       .long 1b,3b\n"                                  \
                ".previous"                                             \
-               : "=r"(err), "=&r"(x)                                   \
+               : "=&r"(err), "=&r"(x)                                  \
                : "r"(addr), "i"(-EFAULT), "0"(err)                     \
                : "r14", "memory")
 
index d73501ba7e441ac7496f3cbf110c9cb95c718495..b9ea44ac0ddbb7df23a0600387d39df529fe4593 100644 (file)
@@ -543,7 +543,7 @@ asmlinkage long sys_unlinkat(int dfd, const char __user * pathname, int flag);
 asmlinkage long sys_symlinkat(const char __user * oldname,
                              int newdfd, const char __user * newname);
 asmlinkage long sys_linkat(int olddfd, const char __user *oldname,
-                          int newdfd, const char __user *newname);
+                          int newdfd, const char __user *newname, int flags);
 asmlinkage long sys_renameat(int olddfd, const char __user * oldname,
                             int newdfd, const char __user * newname);
 asmlinkage long sys_futimesat(int dfd, char __user *filename,
index 880831bd3003616cc7d44a8570f0d18fa41d0bfe..67af4cea1e23173dd918de5813bd591eb68423b3 100644 (file)
@@ -552,7 +552,7 @@ static void migrate_page_add(struct page *page, struct list_head *pagelist,
         */
        if ((flags & MPOL_MF_MOVE_ALL) || page_mapcount(page) == 1) {
                if (isolate_lru_page(page))
-                       list_add(&page->lru, pagelist);
+                       list_add_tail(&page->lru, pagelist);
        }
 }
 
@@ -569,6 +569,7 @@ static int migrate_pages_to(struct list_head *pagelist,
        LIST_HEAD(moved);
        LIST_HEAD(failed);
        int err = 0;
+       unsigned long offset = 0;
        int nr_pages;
        struct page *page;
        struct list_head *p;
@@ -576,8 +577,21 @@ static int migrate_pages_to(struct list_head *pagelist,
 redo:
        nr_pages = 0;
        list_for_each(p, pagelist) {
-               if (vma)
-                       page = alloc_page_vma(GFP_HIGHUSER, vma, vma->vm_start);
+               if (vma) {
+                       /*
+                        * The address passed to alloc_page_vma is used to
+                        * generate the proper interleave behavior. We fake
+                        * the address here by an increasing offset in order
+                        * to get the proper distribution of pages.
+                        *
+                        * No decision has been made as to which page
+                        * a certain old page is moved to so we cannot
+                        * specify the correct address.
+                        */
+                       page = alloc_page_vma(GFP_HIGHUSER, vma,
+                                       offset + vma->vm_start);
+                       offset += PAGE_SIZE;
+               }
                else
                        page = alloc_pages_node(dest, GFP_HIGHUSER, 0);
 
@@ -585,7 +599,7 @@ redo:
                        err = -ENOMEM;
                        goto out;
                }
-               list_add(&page->lru, &newlist);
+               list_add_tail(&page->lru, &newlist);
                nr_pages++;
                if (nr_pages > MIGRATE_CHUNK_SIZE)
                        break;
index 1838c15ca4fd8b3eb0ee70739ea63f765fb4689e..b0af7593d01e315a83c79ec6841c9a4a3b91c1e1 100644 (file)
@@ -1908,7 +1908,12 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
                sc.swap_cluster_max = SWAP_CLUSTER_MAX;
 
        cond_resched();
-       p->flags |= PF_MEMALLOC;
+       /*
+        * We need to be able to allocate from the reserves for RECLAIM_SWAP
+        * and we also need to be able to write out pages for RECLAIM_WRITE
+        * and RECLAIM_SWAP.
+        */
+       p->flags |= PF_MEMALLOC | PF_SWAPWRITE;
        reclaim_state.reclaimed_slab = 0;
        p->reclaim_state = &reclaim_state;
 
@@ -1932,11 +1937,10 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
                 * a long time.
                 */
                shrink_slab(sc.nr_scanned, gfp_mask, order);
-               sc.nr_reclaimed = 1;    /* Avoid getting the off node timeout */
        }
 
        p->reclaim_state = NULL;
-       current->flags &= ~PF_MEMALLOC;
+       current->flags &= ~(PF_MEMALLOC | PF_SWAPWRITE);
 
        if (sc.nr_reclaimed == 0)
                zone->last_unsuccessful_zone_reclaim = jiffies;
index 31f1f2e25aa076012d2b799d9619e1695f18887a..0345ae6476812803e1b539d75ffc54835b576cc8 100644 (file)
@@ -146,7 +146,7 @@ void snd_opl3_init_seq_oss(struct snd_opl3 *opl3, char *name)
 void snd_opl3_free_seq_oss(struct snd_opl3 *opl3)
 {
        if (opl3->oss_seq_dev) {
-               snd_device_free(opl3->card, opl3->oss_seq_dev);
+               /* The instance should have been released in prior */
                opl3->oss_seq_dev = NULL;
        }
 }
index 4fa4310405648ca2c96fd005ed3339e8e79791a8..99a42138bea047f28b10aa2f674f0eb2eac9e4f9 100644 (file)
@@ -414,7 +414,7 @@ static int __devinit snd_card_cs423x_pnpc(int dev, struct snd_card_cs4236 *acard
        }
        /* MPU initialization */
        if (acard->mpu && mpu_port[dev] > 0) {
-               if (snd_cs423x_pnp_init_mpu(dev, acard->ctrl, cfg) < 0)
+               if (snd_cs423x_pnp_init_mpu(dev, acard->mpu, cfg) < 0)
                        goto error;
        }
        kfree(cfg);