diff options
51 files changed, 217 insertions, 244 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 2524323671b0..8c8090e02d8e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -1585,12 +1585,6 @@ L: i2c@lm-sensors.org | |||
1585 | T: quilt http://khali.linux-fr.org/devel/linux-2.6/jdelvare-i2c/ | 1585 | T: quilt http://khali.linux-fr.org/devel/linux-2.6/jdelvare-i2c/ |
1586 | S: Maintained | 1586 | S: Maintained |
1587 | 1587 | ||
1588 | I2O | ||
1589 | P: Markus Lidel | ||
1590 | M: markus.lidel@shadowconnect.com | ||
1591 | W: http://i2o.shadowconnect.com/ | ||
1592 | S: Maintained | ||
1593 | |||
1594 | i386 BOOT CODE | 1588 | i386 BOOT CODE |
1595 | P: Riley H. Williams | 1589 | P: Riley H. Williams |
1596 | M: Riley@Williams.Name | 1590 | M: Riley@Williams.Name |
diff --git a/arch/i386/kernel/hpet.c b/arch/i386/kernel/hpet.c index f3ab61ee7498..76afea67f691 100644 --- a/arch/i386/kernel/hpet.c +++ b/arch/i386/kernel/hpet.c | |||
@@ -197,7 +197,7 @@ static int hpet_next_event(unsigned long delta, | |||
197 | cnt += delta; | 197 | cnt += delta; |
198 | hpet_writel(cnt, HPET_T0_CMP); | 198 | hpet_writel(cnt, HPET_T0_CMP); |
199 | 199 | ||
200 | return ((long)(hpet_readl(HPET_COUNTER) - cnt ) > 0); | 200 | return ((long)(hpet_readl(HPET_COUNTER) - cnt ) > 0) ? -ETIME : 0; |
201 | } | 201 | } |
202 | 202 | ||
203 | /* | 203 | /* |
diff --git a/arch/um/include/sysdep-x86_64/ptrace.h b/arch/um/include/sysdep-x86_64/ptrace.h index 66cb400c2c92..62403bd99661 100644 --- a/arch/um/include/sysdep-x86_64/ptrace.h +++ b/arch/um/include/sysdep-x86_64/ptrace.h | |||
@@ -104,10 +104,6 @@ union uml_pt_regs { | |||
104 | #endif | 104 | #endif |
105 | #ifdef UML_CONFIG_MODE_SKAS | 105 | #ifdef UML_CONFIG_MODE_SKAS |
106 | struct skas_regs { | 106 | struct skas_regs { |
107 | /* x86_64 ptrace uses sizeof(user_regs_struct) as its register | ||
108 | * file size, while i386 uses FRAME_SIZE. Therefore, we need | ||
109 | * to use UM_FRAME_SIZE here instead of HOST_FRAME_SIZE. | ||
110 | */ | ||
111 | unsigned long regs[MAX_REG_NR]; | 107 | unsigned long regs[MAX_REG_NR]; |
112 | unsigned long fp[HOST_FP_SIZE]; | 108 | unsigned long fp[HOST_FP_SIZE]; |
113 | struct faultinfo faultinfo; | 109 | struct faultinfo faultinfo; |
diff --git a/arch/um/os-Linux/skas/mem.c b/arch/um/os-Linux/skas/mem.c index b3c11cfa995a..9383e8751ae7 100644 --- a/arch/um/os-Linux/skas/mem.c +++ b/arch/um/os-Linux/skas/mem.c | |||
@@ -48,7 +48,7 @@ int multi_op_count = 0; | |||
48 | static inline long do_syscall_stub(struct mm_id * mm_idp, void **addr) | 48 | static inline long do_syscall_stub(struct mm_id * mm_idp, void **addr) |
49 | { | 49 | { |
50 | unsigned long regs[MAX_REG_NR]; | 50 | unsigned long regs[MAX_REG_NR]; |
51 | int n; | 51 | int n, i; |
52 | long ret, offset; | 52 | long ret, offset; |
53 | unsigned long * data; | 53 | unsigned long * data; |
54 | unsigned long * syscall; | 54 | unsigned long * syscall; |
@@ -66,9 +66,13 @@ static inline long do_syscall_stub(struct mm_id * mm_idp, void **addr) | |||
66 | (unsigned long) &__syscall_stub_start); | 66 | (unsigned long) &__syscall_stub_start); |
67 | 67 | ||
68 | n = ptrace_setregs(pid, regs); | 68 | n = ptrace_setregs(pid, regs); |
69 | if(n < 0) | 69 | if(n < 0){ |
70 | printk("Registers - \n"); | ||
71 | for(i = 0; i < MAX_REG_NR; i++) | ||
72 | printk("\t%d\t0x%lx\n", i, regs[i]); | ||
70 | panic("do_syscall_stub : PTRACE_SETREGS failed, errno = %d\n", | 73 | panic("do_syscall_stub : PTRACE_SETREGS failed, errno = %d\n", |
71 | n); | 74 | -n); |
75 | } | ||
72 | 76 | ||
73 | wait_stub_done(pid, 0, "do_syscall_stub"); | 77 | wait_stub_done(pid, 0, "do_syscall_stub"); |
74 | 78 | ||
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c index dda06789bcb0..0564422c155f 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c | |||
@@ -67,7 +67,7 @@ void wait_stub_done(int pid, int sig, char * fname) | |||
67 | 67 | ||
68 | if((n < 0) || !WIFSTOPPED(status) || | 68 | if((n < 0) || !WIFSTOPPED(status) || |
69 | (WSTOPSIG(status) != SIGUSR1 && WSTOPSIG(status) != SIGTRAP)){ | 69 | (WSTOPSIG(status) != SIGUSR1 && WSTOPSIG(status) != SIGTRAP)){ |
70 | unsigned long regs[HOST_FRAME_SIZE]; | 70 | unsigned long regs[MAX_REG_NR]; |
71 | 71 | ||
72 | if(ptrace(PTRACE_GETREGS, pid, 0, regs) < 0) | 72 | if(ptrace(PTRACE_GETREGS, pid, 0, regs) < 0) |
73 | printk("Failed to get registers from stub, " | 73 | printk("Failed to get registers from stub, " |
@@ -76,7 +76,7 @@ void wait_stub_done(int pid, int sig, char * fname) | |||
76 | int i; | 76 | int i; |
77 | 77 | ||
78 | printk("Stub registers -\n"); | 78 | printk("Stub registers -\n"); |
79 | for(i = 0; i < HOST_FRAME_SIZE; i++) | 79 | for(i = 0; i < ARRAY_SIZE(regs); i++) |
80 | printk("\t%d - %lx\n", i, regs[i]); | 80 | printk("\t%d - %lx\n", i, regs[i]); |
81 | } | 81 | } |
82 | panic("%s : failed to wait for SIGUSR1/SIGTRAP, " | 82 | panic("%s : failed to wait for SIGUSR1/SIGTRAP, " |
@@ -328,7 +328,7 @@ void userspace(union uml_pt_regs *regs) | |||
328 | int copy_context_skas0(unsigned long new_stack, int pid) | 328 | int copy_context_skas0(unsigned long new_stack, int pid) |
329 | { | 329 | { |
330 | int err; | 330 | int err; |
331 | unsigned long regs[HOST_FRAME_SIZE]; | 331 | unsigned long regs[MAX_REG_NR]; |
332 | unsigned long fp_regs[HOST_FP_SIZE]; | 332 | unsigned long fp_regs[HOST_FP_SIZE]; |
333 | unsigned long current_stack = current_stub_stack(); | 333 | unsigned long current_stack = current_stub_stack(); |
334 | struct stub_data *data = (struct stub_data *) current_stack; | 334 | struct stub_data *data = (struct stub_data *) current_stack; |
diff --git a/arch/um/os-Linux/sys-i386/registers.c b/arch/um/os-Linux/sys-i386/registers.c index 79cd93c8c5ed..84b44f9cd42a 100644 --- a/arch/um/os-Linux/sys-i386/registers.c +++ b/arch/um/os-Linux/sys-i386/registers.c | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | /* These are set once at boot time and not changed thereafter */ | 16 | /* These are set once at boot time and not changed thereafter */ |
17 | 17 | ||
18 | static unsigned long exec_regs[HOST_FRAME_SIZE]; | 18 | static unsigned long exec_regs[MAX_REG_NR]; |
19 | static unsigned long exec_fp_regs[HOST_FP_SIZE]; | 19 | static unsigned long exec_fp_regs[HOST_FP_SIZE]; |
20 | static unsigned long exec_fpx_regs[HOST_XFP_SIZE]; | 20 | static unsigned long exec_fpx_regs[HOST_XFP_SIZE]; |
21 | static int have_fpx_regs = 1; | 21 | static int have_fpx_regs = 1; |
@@ -101,6 +101,7 @@ void init_registers(int pid) | |||
101 | { | 101 | { |
102 | int err; | 102 | int err; |
103 | 103 | ||
104 | memset(exec_regs, 0, sizeof(exec_regs)); | ||
104 | err = ptrace(PTRACE_GETREGS, pid, 0, exec_regs); | 105 | err = ptrace(PTRACE_GETREGS, pid, 0, exec_regs); |
105 | if(err) | 106 | if(err) |
106 | panic("check_ptrace : PTRACE_GETREGS failed, errno = %d", | 107 | panic("check_ptrace : PTRACE_GETREGS failed, errno = %d", |
@@ -124,7 +125,7 @@ void init_registers(int pid) | |||
124 | 125 | ||
125 | void get_safe_registers(unsigned long *regs, unsigned long *fp_regs) | 126 | void get_safe_registers(unsigned long *regs, unsigned long *fp_regs) |
126 | { | 127 | { |
127 | memcpy(regs, exec_regs, HOST_FRAME_SIZE * sizeof(unsigned long)); | 128 | memcpy(regs, exec_regs, sizeof(exec_regs)); |
128 | if(fp_regs != NULL) | 129 | if(fp_regs != NULL) |
129 | memcpy(fp_regs, exec_fp_regs, | 130 | memcpy(fp_regs, exec_fp_regs, |
130 | HOST_FP_SIZE * sizeof(unsigned long)); | 131 | HOST_FP_SIZE * sizeof(unsigned long)); |
diff --git a/arch/um/os-Linux/sys-x86_64/registers.c b/arch/um/os-Linux/sys-x86_64/registers.c index a2d7e0c603f7..e6fc2179d1bc 100644 --- a/arch/um/os-Linux/sys-x86_64/registers.c +++ b/arch/um/os-Linux/sys-x86_64/registers.c | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | /* These are set once at boot time and not changed thereafter */ | 15 | /* These are set once at boot time and not changed thereafter */ |
16 | 16 | ||
17 | static unsigned long exec_regs[HOST_FRAME_SIZE]; | 17 | static unsigned long exec_regs[MAX_REG_NR]; |
18 | static unsigned long exec_fp_regs[HOST_FP_SIZE]; | 18 | static unsigned long exec_fp_regs[HOST_FP_SIZE]; |
19 | 19 | ||
20 | void init_thread_registers(union uml_pt_regs *to) | 20 | void init_thread_registers(union uml_pt_regs *to) |
@@ -72,7 +72,7 @@ void init_registers(int pid) | |||
72 | 72 | ||
73 | void get_safe_registers(unsigned long *regs, unsigned long *fp_regs) | 73 | void get_safe_registers(unsigned long *regs, unsigned long *fp_regs) |
74 | { | 74 | { |
75 | memcpy(regs, exec_regs, HOST_FRAME_SIZE * sizeof(unsigned long)); | 75 | memcpy(regs, exec_regs, sizeof(exec_regs)); |
76 | if(fp_regs != NULL) | 76 | if(fp_regs != NULL) |
77 | memcpy(fp_regs, exec_fp_regs, | 77 | memcpy(fp_regs, exec_fp_regs, |
78 | HOST_FP_SIZE * sizeof(unsigned long)); | 78 | HOST_FP_SIZE * sizeof(unsigned long)); |
diff --git a/arch/x86_64/kernel/acpi/sleep.c b/arch/x86_64/kernel/acpi/sleep.c index 23178ce6c783..e1548fbe95ae 100644 --- a/arch/x86_64/kernel/acpi/sleep.c +++ b/arch/x86_64/kernel/acpi/sleep.c | |||
@@ -66,8 +66,10 @@ static void init_low_mapping(void) | |||
66 | { | 66 | { |
67 | pgd_t *slot0 = pgd_offset(current->mm, 0UL); | 67 | pgd_t *slot0 = pgd_offset(current->mm, 0UL); |
68 | low_ptr = *slot0; | 68 | low_ptr = *slot0; |
69 | /* FIXME: We're playing with the current task's page tables here, which | ||
70 | * is potentially dangerous on SMP systems. | ||
71 | */ | ||
69 | set_pgd(slot0, *pgd_offset(current->mm, PAGE_OFFSET)); | 72 | set_pgd(slot0, *pgd_offset(current->mm, PAGE_OFFSET)); |
70 | WARN_ON(num_online_cpus() != 1); | ||
71 | local_flush_tlb(); | 73 | local_flush_tlb(); |
72 | } | 74 | } |
73 | 75 | ||
diff --git a/block/elevator.c b/block/elevator.c index 25f6ef28e3bb..96a00c822748 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
@@ -964,17 +964,18 @@ void elv_unregister_queue(struct request_queue *q) | |||
964 | 964 | ||
965 | int elv_register(struct elevator_type *e) | 965 | int elv_register(struct elevator_type *e) |
966 | { | 966 | { |
967 | char *def = ""; | ||
967 | spin_lock_irq(&elv_list_lock); | 968 | spin_lock_irq(&elv_list_lock); |
968 | BUG_ON(elevator_find(e->elevator_name)); | 969 | BUG_ON(elevator_find(e->elevator_name)); |
969 | list_add_tail(&e->list, &elv_list); | 970 | list_add_tail(&e->list, &elv_list); |
970 | spin_unlock_irq(&elv_list_lock); | 971 | spin_unlock_irq(&elv_list_lock); |
971 | 972 | ||
972 | printk(KERN_INFO "io scheduler %s registered", e->elevator_name); | ||
973 | if (!strcmp(e->elevator_name, chosen_elevator) || | 973 | if (!strcmp(e->elevator_name, chosen_elevator) || |
974 | (!*chosen_elevator && | 974 | (!*chosen_elevator && |
975 | !strcmp(e->elevator_name, CONFIG_DEFAULT_IOSCHED))) | 975 | !strcmp(e->elevator_name, CONFIG_DEFAULT_IOSCHED))) |
976 | printk(" (default)"); | 976 | def = " (default)"; |
977 | printk("\n"); | 977 | |
978 | printk(KERN_INFO "io scheduler %s registered%s\n", e->elevator_name, def); | ||
978 | return 0; | 979 | return 0; |
979 | } | 980 | } |
980 | EXPORT_SYMBOL_GPL(elv_register); | 981 | EXPORT_SYMBOL_GPL(elv_register); |
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 38c293b987b7..3de06953ac33 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c | |||
@@ -1221,7 +1221,7 @@ void blk_recount_segments(request_queue_t *q, struct bio *bio) | |||
1221 | * considered part of another segment, since that might | 1221 | * considered part of another segment, since that might |
1222 | * change with the bounce page. | 1222 | * change with the bounce page. |
1223 | */ | 1223 | */ |
1224 | high = page_to_pfn(bv->bv_page) >= q->bounce_pfn; | 1224 | high = page_to_pfn(bv->bv_page) > q->bounce_pfn; |
1225 | if (high || highprv) | 1225 | if (high || highprv) |
1226 | goto new_hw_segment; | 1226 | goto new_hw_segment; |
1227 | if (cluster) { | 1227 | if (cluster) { |
@@ -3658,8 +3658,8 @@ int __init blk_dev_init(void) | |||
3658 | open_softirq(BLOCK_SOFTIRQ, blk_done_softirq, NULL); | 3658 | open_softirq(BLOCK_SOFTIRQ, blk_done_softirq, NULL); |
3659 | register_hotcpu_notifier(&blk_cpu_notifier); | 3659 | register_hotcpu_notifier(&blk_cpu_notifier); |
3660 | 3660 | ||
3661 | blk_max_low_pfn = max_low_pfn; | 3661 | blk_max_low_pfn = max_low_pfn - 1; |
3662 | blk_max_pfn = max_pfn; | 3662 | blk_max_pfn = max_pfn - 1; |
3663 | 3663 | ||
3664 | return 0; | 3664 | return 0; |
3665 | } | 3665 | } |
diff --git a/drivers/char/generic_serial.c b/drivers/char/generic_serial.c index 337bbcdcf13d..8ea02755b1c9 100644 --- a/drivers/char/generic_serial.c +++ b/drivers/char/generic_serial.c | |||
@@ -710,12 +710,6 @@ void gs_close(struct tty_struct * tty, struct file * filp) | |||
710 | } | 710 | } |
711 | 711 | ||
712 | 712 | ||
713 | static unsigned int gs_baudrates[] = { | ||
714 | 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, | ||
715 | 9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600 | ||
716 | }; | ||
717 | |||
718 | |||
719 | void gs_set_termios (struct tty_struct * tty, | 713 | void gs_set_termios (struct tty_struct * tty, |
720 | struct ktermios * old_termios) | 714 | struct ktermios * old_termios) |
721 | { | 715 | { |
@@ -771,7 +765,6 @@ void gs_set_termios (struct tty_struct * tty, | |||
771 | 765 | ||
772 | baudrate = tty_get_baud_rate(tty); | 766 | baudrate = tty_get_baud_rate(tty); |
773 | 767 | ||
774 | baudrate = gs_baudrates[baudrate]; | ||
775 | if ((tiosp->c_cflag & CBAUD) == B38400) { | 768 | if ((tiosp->c_cflag & CBAUD) == B38400) { |
776 | if ( (port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI) | 769 | if ( (port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI) |
777 | baudrate = 57600; | 770 | baudrate = 57600; |
diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c index d42060ede930..5ac309ee7f05 100644 --- a/drivers/clocksource/acpi_pm.c +++ b/drivers/clocksource/acpi_pm.c | |||
@@ -90,7 +90,7 @@ __setup("acpi_pm_good", acpi_pm_good_setup); | |||
90 | static inline void acpi_pm_need_workaround(void) | 90 | static inline void acpi_pm_need_workaround(void) |
91 | { | 91 | { |
92 | clocksource_acpi_pm.read = acpi_pm_read_slow; | 92 | clocksource_acpi_pm.read = acpi_pm_read_slow; |
93 | clocksource_acpi_pm.rating = 110; | 93 | clocksource_acpi_pm.rating = 120; |
94 | } | 94 | } |
95 | 95 | ||
96 | /* | 96 | /* |
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index f52facc570f5..3162010900c9 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -1015,6 +1015,10 @@ static int cpufreq_remove_dev (struct sys_device * sys_dev) | |||
1015 | { | 1015 | { |
1016 | unsigned int cpu = sys_dev->id; | 1016 | unsigned int cpu = sys_dev->id; |
1017 | int retval; | 1017 | int retval; |
1018 | |||
1019 | if (cpu_is_offline(cpu)) | ||
1020 | return 0; | ||
1021 | |||
1018 | if (unlikely(lock_policy_rwsem_write(cpu))) | 1022 | if (unlikely(lock_policy_rwsem_write(cpu))) |
1019 | BUG(); | 1023 | BUG(); |
1020 | 1024 | ||
diff --git a/drivers/eisa/pci_eisa.c b/drivers/eisa/pci_eisa.c index 9e913629ef39..74edb1d0110f 100644 --- a/drivers/eisa/pci_eisa.c +++ b/drivers/eisa/pci_eisa.c | |||
@@ -19,8 +19,8 @@ | |||
19 | /* There is only *one* pci_eisa device per machine, right ? */ | 19 | /* There is only *one* pci_eisa device per machine, right ? */ |
20 | static struct eisa_root_device pci_eisa_root; | 20 | static struct eisa_root_device pci_eisa_root; |
21 | 21 | ||
22 | static int __devinit pci_eisa_init (struct pci_dev *pdev, | 22 | static int __init pci_eisa_init(struct pci_dev *pdev, |
23 | const struct pci_device_id *ent) | 23 | const struct pci_device_id *ent) |
24 | { | 24 | { |
25 | int rc; | 25 | int rc; |
26 | 26 | ||
diff --git a/drivers/isdn/hisax/isar.c b/drivers/isdn/hisax/isar.c index 9df9e3548cf1..c547a6665052 100644 --- a/drivers/isdn/hisax/isar.c +++ b/drivers/isdn/hisax/isar.c | |||
@@ -440,7 +440,7 @@ isar_bh(struct work_struct *work) | |||
440 | { | 440 | { |
441 | struct BCState *bcs = container_of(work, struct BCState, tqueue); | 441 | struct BCState *bcs = container_of(work, struct BCState, tqueue); |
442 | 442 | ||
443 | BChannel_bh(bcs); | 443 | BChannel_bh(work); |
444 | if (test_and_clear_bit(B_LL_NOCARRIER, &bcs->event)) | 444 | if (test_and_clear_bit(B_LL_NOCARRIER, &bcs->event)) |
445 | ll_deliver_faxstat(bcs, ISDN_FAX_CLASS1_NOCARR); | 445 | ll_deliver_faxstat(bcs, ISDN_FAX_CLASS1_NOCARR); |
446 | if (test_and_clear_bit(B_LL_CONNECT, &bcs->event)) | 446 | if (test_and_clear_bit(B_LL_CONNECT, &bcs->event)) |
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index bfa0ce42ea92..fbbf9d6b299f 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c | |||
@@ -618,7 +618,7 @@ static void fix_pmode_dataseg(int seg, struct kvm_save_segment *save) | |||
618 | { | 618 | { |
619 | struct kvm_vmx_segment_field *sf = &kvm_vmx_segment_fields[seg]; | 619 | struct kvm_vmx_segment_field *sf = &kvm_vmx_segment_fields[seg]; |
620 | 620 | ||
621 | if (vmcs_readl(sf->base) == save->base) { | 621 | if (vmcs_readl(sf->base) == save->base && (save->base & AR_S_MASK)) { |
622 | vmcs_write16(sf->selector, save->selector); | 622 | vmcs_write16(sf->selector, save->selector); |
623 | vmcs_writel(sf->base, save->base); | 623 | vmcs_writel(sf->base, save->base); |
624 | vmcs_write32(sf->limit, save->limit); | 624 | vmcs_write32(sf->limit, save->limit); |
@@ -1888,6 +1888,27 @@ again: | |||
1888 | [cr2]"i"(offsetof(struct kvm_vcpu, cr2)) | 1888 | [cr2]"i"(offsetof(struct kvm_vcpu, cr2)) |
1889 | : "cc", "memory" ); | 1889 | : "cc", "memory" ); |
1890 | 1890 | ||
1891 | /* | ||
1892 | * Reload segment selectors ASAP. (it's needed for a functional | ||
1893 | * kernel: x86 relies on having __KERNEL_PDA in %fs and x86_64 | ||
1894 | * relies on having 0 in %gs for the CPU PDA to work.) | ||
1895 | */ | ||
1896 | if (fs_gs_ldt_reload_needed) { | ||
1897 | load_ldt(ldt_sel); | ||
1898 | load_fs(fs_sel); | ||
1899 | /* | ||
1900 | * If we have to reload gs, we must take care to | ||
1901 | * preserve our gs base. | ||
1902 | */ | ||
1903 | local_irq_disable(); | ||
1904 | load_gs(gs_sel); | ||
1905 | #ifdef CONFIG_X86_64 | ||
1906 | wrmsrl(MSR_GS_BASE, vmcs_readl(HOST_GS_BASE)); | ||
1907 | #endif | ||
1908 | local_irq_enable(); | ||
1909 | |||
1910 | reload_tss(); | ||
1911 | } | ||
1891 | ++kvm_stat.exits; | 1912 | ++kvm_stat.exits; |
1892 | 1913 | ||
1893 | save_msrs(vcpu->guest_msrs, NR_BAD_MSRS); | 1914 | save_msrs(vcpu->guest_msrs, NR_BAD_MSRS); |
@@ -1905,22 +1926,6 @@ again: | |||
1905 | kvm_run->exit_reason = vmcs_read32(VM_INSTRUCTION_ERROR); | 1926 | kvm_run->exit_reason = vmcs_read32(VM_INSTRUCTION_ERROR); |
1906 | r = 0; | 1927 | r = 0; |
1907 | } else { | 1928 | } else { |
1908 | if (fs_gs_ldt_reload_needed) { | ||
1909 | load_ldt(ldt_sel); | ||
1910 | load_fs(fs_sel); | ||
1911 | /* | ||
1912 | * If we have to reload gs, we must take care to | ||
1913 | * preserve our gs base. | ||
1914 | */ | ||
1915 | local_irq_disable(); | ||
1916 | load_gs(gs_sel); | ||
1917 | #ifdef CONFIG_X86_64 | ||
1918 | wrmsrl(MSR_GS_BASE, vmcs_readl(HOST_GS_BASE)); | ||
1919 | #endif | ||
1920 | local_irq_enable(); | ||
1921 | |||
1922 | reload_tss(); | ||
1923 | } | ||
1924 | /* | 1929 | /* |
1925 | * Profile KVM exit RIPs: | 1930 | * Profile KVM exit RIPs: |
1926 | */ | 1931 | */ |
diff --git a/drivers/md/md.c b/drivers/md/md.c index 6c06e825cff5..2a9b6a07e3a2 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -1318,6 +1318,7 @@ static int bind_rdev_to_array(mdk_rdev_t * rdev, mddev_t * mddev) | |||
1318 | char b[BDEVNAME_SIZE]; | 1318 | char b[BDEVNAME_SIZE]; |
1319 | struct kobject *ko; | 1319 | struct kobject *ko; |
1320 | char *s; | 1320 | char *s; |
1321 | int err; | ||
1321 | 1322 | ||
1322 | if (rdev->mddev) { | 1323 | if (rdev->mddev) { |
1323 | MD_BUG(); | 1324 | MD_BUG(); |
@@ -1352,20 +1353,29 @@ static int bind_rdev_to_array(mdk_rdev_t * rdev, mddev_t * mddev) | |||
1352 | while ( (s=strchr(rdev->kobj.k_name, '/')) != NULL) | 1353 | while ( (s=strchr(rdev->kobj.k_name, '/')) != NULL) |
1353 | *s = '!'; | 1354 | *s = '!'; |
1354 | 1355 | ||
1355 | list_add(&rdev->same_set, &mddev->disks); | ||
1356 | rdev->mddev = mddev; | 1356 | rdev->mddev = mddev; |
1357 | printk(KERN_INFO "md: bind<%s>\n", b); | 1357 | printk(KERN_INFO "md: bind<%s>\n", b); |
1358 | 1358 | ||
1359 | rdev->kobj.parent = &mddev->kobj; | 1359 | rdev->kobj.parent = &mddev->kobj; |
1360 | kobject_add(&rdev->kobj); | 1360 | if ((err = kobject_add(&rdev->kobj))) |
1361 | goto fail; | ||
1361 | 1362 | ||
1362 | if (rdev->bdev->bd_part) | 1363 | if (rdev->bdev->bd_part) |
1363 | ko = &rdev->bdev->bd_part->kobj; | 1364 | ko = &rdev->bdev->bd_part->kobj; |
1364 | else | 1365 | else |
1365 | ko = &rdev->bdev->bd_disk->kobj; | 1366 | ko = &rdev->bdev->bd_disk->kobj; |
1366 | sysfs_create_link(&rdev->kobj, ko, "block"); | 1367 | if ((err = sysfs_create_link(&rdev->kobj, ko, "block"))) { |
1368 | kobject_del(&rdev->kobj); | ||
1369 | goto fail; | ||
1370 | } | ||
1371 | list_add(&rdev->same_set, &mddev->disks); | ||
1367 | bd_claim_by_disk(rdev->bdev, rdev, mddev->gendisk); | 1372 | bd_claim_by_disk(rdev->bdev, rdev, mddev->gendisk); |
1368 | return 0; | 1373 | return 0; |
1374 | |||
1375 | fail: | ||
1376 | printk(KERN_WARNING "md: failed to register dev-%s for %s\n", | ||
1377 | b, mdname(mddev)); | ||
1378 | return err; | ||
1369 | } | 1379 | } |
1370 | 1380 | ||
1371 | static void unbind_rdev_from_array(mdk_rdev_t * rdev) | 1381 | static void unbind_rdev_from_array(mdk_rdev_t * rdev) |
@@ -2966,7 +2976,9 @@ static struct kobject *md_probe(dev_t dev, int *part, void *data) | |||
2966 | mddev->kobj.k_name = NULL; | 2976 | mddev->kobj.k_name = NULL; |
2967 | snprintf(mddev->kobj.name, KOBJ_NAME_LEN, "%s", "md"); | 2977 | snprintf(mddev->kobj.name, KOBJ_NAME_LEN, "%s", "md"); |
2968 | mddev->kobj.ktype = &md_ktype; | 2978 | mddev->kobj.ktype = &md_ktype; |
2969 | kobject_register(&mddev->kobj); | 2979 | if (kobject_register(&mddev->kobj)) |
2980 | printk(KERN_WARNING "md: cannot register %s/md - name in use\n", | ||
2981 | disk->disk_name); | ||
2970 | return NULL; | 2982 | return NULL; |
2971 | } | 2983 | } |
2972 | 2984 | ||
@@ -3144,9 +3156,12 @@ static int do_md_run(mddev_t * mddev) | |||
3144 | bitmap_destroy(mddev); | 3156 | bitmap_destroy(mddev); |
3145 | return err; | 3157 | return err; |
3146 | } | 3158 | } |
3147 | if (mddev->pers->sync_request) | 3159 | if (mddev->pers->sync_request) { |
3148 | sysfs_create_group(&mddev->kobj, &md_redundancy_group); | 3160 | if (sysfs_create_group(&mddev->kobj, &md_redundancy_group)) |
3149 | else if (mddev->ro == 2) /* auto-readonly not meaningful */ | 3161 | printk(KERN_WARNING |
3162 | "md: cannot register extra attributes for %s\n", | ||
3163 | mdname(mddev)); | ||
3164 | } else if (mddev->ro == 2) /* auto-readonly not meaningful */ | ||
3150 | mddev->ro = 0; | 3165 | mddev->ro = 0; |
3151 | 3166 | ||
3152 | atomic_set(&mddev->writes_pending,0); | 3167 | atomic_set(&mddev->writes_pending,0); |
@@ -3160,7 +3175,9 @@ static int do_md_run(mddev_t * mddev) | |||
3160 | if (rdev->raid_disk >= 0) { | 3175 | if (rdev->raid_disk >= 0) { |
3161 | char nm[20]; | 3176 | char nm[20]; |
3162 | sprintf(nm, "rd%d", rdev->raid_disk); | 3177 | sprintf(nm, "rd%d", rdev->raid_disk); |
3163 | sysfs_create_link(&mddev->kobj, &rdev->kobj, nm); | 3178 | if (sysfs_create_link(&mddev->kobj, &rdev->kobj, nm)) |
3179 | printk("md: cannot register %s for %s\n", | ||
3180 | nm, mdname(mddev)); | ||
3164 | } | 3181 | } |
3165 | 3182 | ||
3166 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); | 3183 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); |
@@ -3325,6 +3342,7 @@ static int do_md_stop(mddev_t * mddev, int mode) | |||
3325 | mddev->queue->merge_bvec_fn = NULL; | 3342 | mddev->queue->merge_bvec_fn = NULL; |
3326 | mddev->queue->unplug_fn = NULL; | 3343 | mddev->queue->unplug_fn = NULL; |
3327 | mddev->queue->issue_flush_fn = NULL; | 3344 | mddev->queue->issue_flush_fn = NULL; |
3345 | mddev->queue->backing_dev_info.congested_fn = NULL; | ||
3328 | if (mddev->pers->sync_request) | 3346 | if (mddev->pers->sync_request) |
3329 | sysfs_remove_group(&mddev->kobj, &md_redundancy_group); | 3347 | sysfs_remove_group(&mddev->kobj, &md_redundancy_group); |
3330 | 3348 | ||
@@ -5385,8 +5403,12 @@ static int remove_and_add_spares(mddev_t *mddev) | |||
5385 | if (mddev->pers->hot_add_disk(mddev,rdev)) { | 5403 | if (mddev->pers->hot_add_disk(mddev,rdev)) { |
5386 | char nm[20]; | 5404 | char nm[20]; |
5387 | sprintf(nm, "rd%d", rdev->raid_disk); | 5405 | sprintf(nm, "rd%d", rdev->raid_disk); |
5388 | sysfs_create_link(&mddev->kobj, | 5406 | if (sysfs_create_link(&mddev->kobj, |
5389 | &rdev->kobj, nm); | 5407 | &rdev->kobj, nm)) |
5408 | printk(KERN_WARNING | ||
5409 | "md: cannot register " | ||
5410 | "%s for %s\n", | ||
5411 | nm, mdname(mddev)); | ||
5390 | spares++; | 5412 | spares++; |
5391 | md_new_event(mddev); | 5413 | md_new_event(mddev); |
5392 | } else | 5414 | } else |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 54a1ad5eef42..8d59914f2057 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -3642,12 +3642,15 @@ static int run(mddev_t *mddev) | |||
3642 | } | 3642 | } |
3643 | 3643 | ||
3644 | /* Ok, everything is just fine now */ | 3644 | /* Ok, everything is just fine now */ |
3645 | sysfs_create_group(&mddev->kobj, &raid5_attrs_group); | 3645 | if (sysfs_create_group(&mddev->kobj, &raid5_attrs_group)) |
3646 | printk(KERN_WARNING | ||
3647 | "raid5: failed to create sysfs attributes for %s\n", | ||
3648 | mdname(mddev)); | ||
3646 | 3649 | ||
3647 | mddev->queue->unplug_fn = raid5_unplug_device; | 3650 | mddev->queue->unplug_fn = raid5_unplug_device; |
3648 | mddev->queue->issue_flush_fn = raid5_issue_flush; | 3651 | mddev->queue->issue_flush_fn = raid5_issue_flush; |
3649 | mddev->queue->backing_dev_info.congested_fn = raid5_congested; | ||
3650 | mddev->queue->backing_dev_info.congested_data = mddev; | 3652 | mddev->queue->backing_dev_info.congested_data = mddev; |
3653 | mddev->queue->backing_dev_info.congested_fn = raid5_congested; | ||
3651 | 3654 | ||
3652 | mddev->array_size = mddev->size * (conf->previous_raid_disks - | 3655 | mddev->array_size = mddev->size * (conf->previous_raid_disks - |
3653 | conf->max_degraded); | 3656 | conf->max_degraded); |
@@ -3678,6 +3681,7 @@ static int stop(mddev_t *mddev) | |||
3678 | mddev->thread = NULL; | 3681 | mddev->thread = NULL; |
3679 | shrink_stripes(conf); | 3682 | shrink_stripes(conf); |
3680 | kfree(conf->stripe_hashtbl); | 3683 | kfree(conf->stripe_hashtbl); |
3684 | mddev->queue->backing_dev_info.congested_fn = NULL; | ||
3681 | blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/ | 3685 | blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/ |
3682 | sysfs_remove_group(&mddev->kobj, &raid5_attrs_group); | 3686 | sysfs_remove_group(&mddev->kobj, &raid5_attrs_group); |
3683 | kfree(conf->disks); | 3687 | kfree(conf->disks); |
@@ -3950,7 +3954,12 @@ static int raid5_start_reshape(mddev_t *mddev) | |||
3950 | added_devices++; | 3954 | added_devices++; |
3951 | rdev->recovery_offset = 0; | 3955 | rdev->recovery_offset = 0; |
3952 | sprintf(nm, "rd%d", rdev->raid_disk); | 3956 | sprintf(nm, "rd%d", rdev->raid_disk); |
3953 | sysfs_create_link(&mddev->kobj, &rdev->kobj, nm); | 3957 | if (sysfs_create_link(&mddev->kobj, |
3958 | &rdev->kobj, nm)) | ||
3959 | printk(KERN_WARNING | ||
3960 | "raid5: failed to create " | ||
3961 | " link %s for %s\n", | ||
3962 | nm, mdname(mddev)); | ||
3954 | } else | 3963 | } else |
3955 | break; | 3964 | break; |
3956 | } | 3965 | } |
@@ -4104,6 +4113,10 @@ static struct mdk_personality raid4_personality = | |||
4104 | .spare_active = raid5_spare_active, | 4113 | .spare_active = raid5_spare_active, |
4105 | .sync_request = sync_request, | 4114 | .sync_request = sync_request, |
4106 | .resize = raid5_resize, | 4115 | .resize = raid5_resize, |
4116 | #ifdef CONFIG_MD_RAID5_RESHAPE | ||
4117 | .check_reshape = raid5_check_reshape, | ||
4118 | .start_reshape = raid5_start_reshape, | ||
4119 | #endif | ||
4107 | .quiesce = raid5_quiesce, | 4120 | .quiesce = raid5_quiesce, |
4108 | }; | 4121 | }; |
4109 | 4122 | ||
diff --git a/drivers/media/common/ir-functions.c b/drivers/media/common/ir-functions.c index cbf7c0564889..fcb194135627 100644 --- a/drivers/media/common/ir-functions.c +++ b/drivers/media/common/ir-functions.c | |||
@@ -310,13 +310,15 @@ void ir_rc5_timer_end(unsigned long data) | |||
310 | tv.tv_usec - ir->base_time.tv_usec; | 310 | tv.tv_usec - ir->base_time.tv_usec; |
311 | } | 311 | } |
312 | 312 | ||
313 | /* Allow some timmer jitter (RC5 is ~24ms anyway so this is ok) */ | 313 | /* signal we're ready to start a new code */ |
314 | ir->active = 0; | ||
315 | |||
316 | /* Allow some timer jitter (RC5 is ~24ms anyway so this is ok) */ | ||
314 | if (gap < 28000) { | 317 | if (gap < 28000) { |
315 | dprintk(1, "ir-common: spurious timer_end\n"); | 318 | dprintk(1, "ir-common: spurious timer_end\n"); |
316 | return; | 319 | return; |
317 | } | 320 | } |
318 | 321 | ||
319 | ir->active = 0; | ||
320 | if (ir->last_bit < 20) { | 322 | if (ir->last_bit < 20) { |
321 | /* ignore spurious codes (caused by light/other remotes) */ | 323 | /* ignore spurious codes (caused by light/other remotes) */ |
322 | dprintk(1, "ir-common: short code: %x\n", ir->code); | 324 | dprintk(1, "ir-common: short code: %x\n", ir->code); |
diff --git a/drivers/media/dvb/dvb-core/dmxdev.c b/drivers/media/dvb/dvb-core/dmxdev.c index fc77de45ca4d..a5c0e1a3e6d1 100644 --- a/drivers/media/dvb/dvb-core/dmxdev.c +++ b/drivers/media/dvb/dvb-core/dmxdev.c | |||
@@ -180,8 +180,7 @@ static int dvb_dvr_release(struct inode *inode, struct file *file) | |||
180 | struct dvb_device *dvbdev = file->private_data; | 180 | struct dvb_device *dvbdev = file->private_data; |
181 | struct dmxdev *dmxdev = dvbdev->priv; | 181 | struct dmxdev *dmxdev = dvbdev->priv; |
182 | 182 | ||
183 | if (mutex_lock_interruptible(&dmxdev->mutex)) | 183 | mutex_lock(&dmxdev->mutex); |
184 | return -ERESTARTSYS; | ||
185 | 184 | ||
186 | if ((file->f_flags & O_ACCMODE) == O_WRONLY) { | 185 | if ((file->f_flags & O_ACCMODE) == O_WRONLY) { |
187 | dmxdev->demux->disconnect_frontend(dmxdev->demux); | 186 | dmxdev->demux->disconnect_frontend(dmxdev->demux); |
@@ -673,13 +672,8 @@ static int dvb_demux_open(struct inode *inode, struct file *file) | |||
673 | static int dvb_dmxdev_filter_free(struct dmxdev *dmxdev, | 672 | static int dvb_dmxdev_filter_free(struct dmxdev *dmxdev, |
674 | struct dmxdev_filter *dmxdevfilter) | 673 | struct dmxdev_filter *dmxdevfilter) |
675 | { | 674 | { |
676 | if (mutex_lock_interruptible(&dmxdev->mutex)) | 675 | mutex_lock(&dmxdev->mutex); |
677 | return -ERESTARTSYS; | 676 | mutex_lock(&dmxdevfilter->mutex); |
678 | |||
679 | if (mutex_lock_interruptible(&dmxdevfilter->mutex)) { | ||
680 | mutex_unlock(&dmxdev->mutex); | ||
681 | return -ERESTARTSYS; | ||
682 | } | ||
683 | 677 | ||
684 | dvb_dmxdev_filter_stop(dmxdevfilter); | 678 | dvb_dmxdev_filter_stop(dmxdevfilter); |
685 | dvb_dmxdev_filter_reset(dmxdevfilter); | 679 | dvb_dmxdev_filter_reset(dmxdevfilter); |
diff --git a/drivers/media/dvb/dvb-core/dvb_demux.c b/drivers/media/dvb/dvb-core/dvb_demux.c index fcff5eab21a3..6d8d1c3df863 100644 --- a/drivers/media/dvb/dvb-core/dvb_demux.c +++ b/drivers/media/dvb/dvb-core/dvb_demux.c | |||
@@ -673,8 +673,7 @@ static int dmx_ts_feed_stop_filtering(struct dmx_ts_feed *ts_feed) | |||
673 | struct dvb_demux *demux = feed->demux; | 673 | struct dvb_demux *demux = feed->demux; |
674 | int ret; | 674 | int ret; |
675 | 675 | ||
676 | if (mutex_lock_interruptible(&demux->mutex)) | 676 | mutex_lock(&demux->mutex); |
677 | return -ERESTARTSYS; | ||
678 | 677 | ||
679 | if (feed->state < DMX_STATE_GO) { | 678 | if (feed->state < DMX_STATE_GO) { |
680 | mutex_unlock(&demux->mutex); | 679 | mutex_unlock(&demux->mutex); |
@@ -748,8 +747,7 @@ static int dvbdmx_release_ts_feed(struct dmx_demux *dmx, | |||
748 | struct dvb_demux *demux = (struct dvb_demux *)dmx; | 747 | struct dvb_demux *demux = (struct dvb_demux *)dmx; |
749 | struct dvb_demux_feed *feed = (struct dvb_demux_feed *)ts_feed; | 748 | struct dvb_demux_feed *feed = (struct dvb_demux_feed *)ts_feed; |
750 | 749 | ||
751 | if (mutex_lock_interruptible(&demux->mutex)) | 750 | mutex_lock(&demux->mutex); |
752 | return -ERESTARTSYS; | ||
753 | 751 | ||
754 | if (feed->state == DMX_STATE_FREE) { | 752 | if (feed->state == DMX_STATE_FREE) { |
755 | mutex_unlock(&demux->mutex); | 753 | mutex_unlock(&demux->mutex); |
@@ -916,8 +914,7 @@ static int dmx_section_feed_stop_filtering(struct dmx_section_feed *feed) | |||
916 | struct dvb_demux *dvbdmx = dvbdmxfeed->demux; | 914 | struct dvb_demux *dvbdmx = dvbdmxfeed->demux; |
917 | int ret; | 915 | int ret; |
918 | 916 | ||
919 | if (mutex_lock_interruptible(&dvbdmx->mutex)) | 917 | mutex_lock(&dvbdmx->mutex); |
920 | return -ERESTARTSYS; | ||
921 | 918 | ||
922 | if (!dvbdmx->stop_feed) { | 919 | if (!dvbdmx->stop_feed) { |
923 | mutex_unlock(&dvbdmx->mutex); | 920 | mutex_unlock(&dvbdmx->mutex); |
@@ -942,8 +939,7 @@ static int dmx_section_feed_release_filter(struct dmx_section_feed *feed, | |||
942 | struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *)feed; | 939 | struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *)feed; |
943 | struct dvb_demux *dvbdmx = dvbdmxfeed->demux; | 940 | struct dvb_demux *dvbdmx = dvbdmxfeed->demux; |
944 | 941 | ||
945 | if (mutex_lock_interruptible(&dvbdmx->mutex)) | 942 | mutex_lock(&dvbdmx->mutex); |
946 | return -ERESTARTSYS; | ||
947 | 943 | ||
948 | if (dvbdmxfilter->feed != dvbdmxfeed) { | 944 | if (dvbdmxfilter->feed != dvbdmxfeed) { |
949 | mutex_unlock(&dvbdmx->mutex); | 945 | mutex_unlock(&dvbdmx->mutex); |
@@ -1016,8 +1012,7 @@ static int dvbdmx_release_section_feed(struct dmx_demux *demux, | |||
1016 | struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *)feed; | 1012 | struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *)feed; |
1017 | struct dvb_demux *dvbdmx = (struct dvb_demux *)demux; | 1013 | struct dvb_demux *dvbdmx = (struct dvb_demux *)demux; |
1018 | 1014 | ||
1019 | if (mutex_lock_interruptible(&dvbdmx->mutex)) | 1015 | mutex_lock(&dvbdmx->mutex); |
1020 | return -ERESTARTSYS; | ||
1021 | 1016 | ||
1022 | if (dvbdmxfeed->state == DMX_STATE_FREE) { | 1017 | if (dvbdmxfeed->state == DMX_STATE_FREE) { |
1023 | mutex_unlock(&dvbdmx->mutex); | 1018 | mutex_unlock(&dvbdmx->mutex); |
@@ -1126,8 +1121,7 @@ static int dvbdmx_connect_frontend(struct dmx_demux *demux, | |||
1126 | if (demux->frontend) | 1121 | if (demux->frontend) |
1127 | return -EINVAL; | 1122 | return -EINVAL; |
1128 | 1123 | ||
1129 | if (mutex_lock_interruptible(&dvbdemux->mutex)) | 1124 | mutex_lock(&dvbdemux->mutex); |
1130 | return -ERESTARTSYS; | ||
1131 | 1125 | ||
1132 | demux->frontend = frontend; | 1126 | demux->frontend = frontend; |
1133 | mutex_unlock(&dvbdemux->mutex); | 1127 | mutex_unlock(&dvbdemux->mutex); |
@@ -1138,8 +1132,7 @@ static int dvbdmx_disconnect_frontend(struct dmx_demux *demux) | |||
1138 | { | 1132 | { |
1139 | struct dvb_demux *dvbdemux = (struct dvb_demux *)demux; | 1133 | struct dvb_demux *dvbdemux = (struct dvb_demux *)demux; |
1140 | 1134 | ||
1141 | if (mutex_lock_interruptible(&dvbdemux->mutex)) | 1135 | mutex_lock(&dvbdemux->mutex); |
1142 | return -ERESTARTSYS; | ||
1143 | 1136 | ||
1144 | demux->frontend = NULL; | 1137 | demux->frontend = NULL; |
1145 | mutex_unlock(&dvbdemux->mutex); | 1138 | mutex_unlock(&dvbdemux->mutex); |
diff --git a/drivers/media/dvb/dvb-core/dvbdev.c b/drivers/media/dvb/dvb-core/dvbdev.c index 490337b5ee3e..14a372a0fe8b 100644 --- a/drivers/media/dvb/dvb-core/dvbdev.c +++ b/drivers/media/dvb/dvb-core/dvbdev.c | |||
@@ -203,8 +203,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev, | |||
203 | 203 | ||
204 | int id; | 204 | int id; |
205 | 205 | ||
206 | if (mutex_lock_interruptible(&dvbdev_register_lock)) | 206 | mutex_lock(&dvbdev_register_lock); |
207 | return -ERESTARTSYS; | ||
208 | 207 | ||
209 | if ((id = dvbdev_get_free_id (adap, type)) < 0){ | 208 | if ((id = dvbdev_get_free_id (adap, type)) < 0){ |
210 | mutex_unlock(&dvbdev_register_lock); | 209 | mutex_unlock(&dvbdev_register_lock); |
@@ -294,8 +293,7 @@ int dvb_register_adapter(struct dvb_adapter *adap, const char *name, struct modu | |||
294 | { | 293 | { |
295 | int num; | 294 | int num; |
296 | 295 | ||
297 | if (mutex_lock_interruptible(&dvbdev_register_lock)) | 296 | mutex_lock(&dvbdev_register_lock); |
298 | return -ERESTARTSYS; | ||
299 | 297 | ||
300 | if ((num = dvbdev_get_free_adapter_num ()) < 0) { | 298 | if ((num = dvbdev_get_free_adapter_num ()) < 0) { |
301 | mutex_unlock(&dvbdev_register_lock); | 299 | mutex_unlock(&dvbdev_register_lock); |
@@ -323,8 +321,7 @@ EXPORT_SYMBOL(dvb_register_adapter); | |||
323 | 321 | ||
324 | int dvb_unregister_adapter(struct dvb_adapter *adap) | 322 | int dvb_unregister_adapter(struct dvb_adapter *adap) |
325 | { | 323 | { |
326 | if (mutex_lock_interruptible(&dvbdev_register_lock)) | 324 | mutex_lock(&dvbdev_register_lock); |
327 | return -ERESTARTSYS; | ||
328 | list_del (&adap->list_head); | 325 | list_del (&adap->list_head); |
329 | mutex_unlock(&dvbdev_register_lock); | 326 | mutex_unlock(&dvbdev_register_lock); |
330 | return 0; | 327 | return 0; |
diff --git a/drivers/media/dvb/frontends/isl6421.c b/drivers/media/dvb/frontends/isl6421.c index ef319369ec26..c967148a5945 100644 --- a/drivers/media/dvb/frontends/isl6421.c +++ b/drivers/media/dvb/frontends/isl6421.c | |||
@@ -122,6 +122,7 @@ struct dvb_frontend *isl6421_attach(struct dvb_frontend *fe, struct i2c_adapter | |||
122 | /* detect if it is present or not */ | 122 | /* detect if it is present or not */ |
123 | if (isl6421_set_voltage(fe, SEC_VOLTAGE_OFF)) { | 123 | if (isl6421_set_voltage(fe, SEC_VOLTAGE_OFF)) { |
124 | kfree(isl6421); | 124 | kfree(isl6421); |
125 | fe->sec_priv = NULL; | ||
125 | return NULL; | 126 | return NULL; |
126 | } | 127 | } |
127 | 128 | ||
diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig index 920b63f8cf05..af66a5d5ecd8 100644 --- a/drivers/media/radio/Kconfig +++ b/drivers/media/radio/Kconfig | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | menu "Radio Adapters" | 5 | menu "Radio Adapters" |
6 | depends on VIDEO_DEV!=n | 6 | depends on VIDEO_DEV |
7 | 7 | ||
8 | config RADIO_CADET | 8 | config RADIO_CADET |
9 | tristate "ADS Cadet AM/FM Tuner" | 9 | tristate "ADS Cadet AM/FM Tuner" |
diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c index 2fb9fe6a1ae7..ba1af3c8525e 100644 --- a/drivers/media/video/msp3400-driver.c +++ b/drivers/media/video/msp3400-driver.c | |||
@@ -780,18 +780,16 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
780 | return 0; | 780 | return 0; |
781 | } | 781 | } |
782 | 782 | ||
783 | static int msp_suspend(struct device * dev, pm_message_t state) | 783 | static int msp_suspend(struct i2c_client *client, pm_message_t state) |
784 | { | 784 | { |
785 | struct i2c_client *client = container_of(dev, struct i2c_client, dev); | ||
786 | 785 | ||
787 | v4l_dbg(1, msp_debug, client, "suspend\n"); | 786 | v4l_dbg(1, msp_debug, client, "suspend\n"); |
788 | msp_reset(client); | 787 | msp_reset(client); |
789 | return 0; | 788 | return 0; |
790 | } | 789 | } |
791 | 790 | ||
792 | static int msp_resume(struct device * dev) | 791 | static int msp_resume(struct i2c_client *client) |
793 | { | 792 | { |
794 | struct i2c_client *client = container_of(dev, struct i2c_client, dev); | ||
795 | 793 | ||
796 | v4l_dbg(1, msp_debug, client, "resume\n"); | 794 | v4l_dbg(1, msp_debug, client, "resume\n"); |
797 | msp_wake_thread(client); | 795 | msp_wake_thread(client); |
@@ -825,7 +823,7 @@ static int msp_attach(struct i2c_adapter *adapter, int address, int kind) | |||
825 | if (msp_reset(client) == -1) { | 823 | if (msp_reset(client) == -1) { |
826 | v4l_dbg(1, msp_debug, client, "msp3400 not found\n"); | 824 | v4l_dbg(1, msp_debug, client, "msp3400 not found\n"); |
827 | kfree(client); | 825 | kfree(client); |
828 | return -1; | 826 | return 0; |
829 | } | 827 | } |
830 | 828 | ||
831 | state = kmalloc(sizeof(*state), GFP_KERNEL); | 829 | state = kmalloc(sizeof(*state), GFP_KERNEL); |
@@ -859,7 +857,7 @@ static int msp_attach(struct i2c_adapter *adapter, int address, int kind) | |||
859 | v4l_dbg(1, msp_debug, client, "not an msp3400 (cannot read chip version)\n"); | 857 | v4l_dbg(1, msp_debug, client, "not an msp3400 (cannot read chip version)\n"); |
860 | kfree(state); | 858 | kfree(state); |
861 | kfree(client); | 859 | kfree(client); |
862 | return -1; | 860 | return 0; |
863 | } | 861 | } |
864 | 862 | ||
865 | msp_set_audio(client); | 863 | msp_set_audio(client); |
@@ -996,11 +994,11 @@ static struct i2c_driver i2c_driver = { | |||
996 | .id = I2C_DRIVERID_MSP3400, | 994 | .id = I2C_DRIVERID_MSP3400, |
997 | .attach_adapter = msp_probe, | 995 | .attach_adapter = msp_probe, |
998 | .detach_client = msp_detach, | 996 | .detach_client = msp_detach, |
997 | .suspend = msp_suspend, | ||
998 | .resume = msp_resume, | ||
999 | .command = msp_command, | 999 | .command = msp_command, |
1000 | .driver = { | 1000 | .driver = { |
1001 | .name = "msp3400", | 1001 | .name = "msp3400", |
1002 | .suspend = msp_suspend, | ||
1003 | .resume = msp_resume, | ||
1004 | }, | 1002 | }, |
1005 | }; | 1003 | }; |
1006 | 1004 | ||
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c index 7735b6758921..4d5bbd859de1 100644 --- a/drivers/media/video/saa7115.c +++ b/drivers/media/video/saa7115.c | |||
@@ -961,7 +961,7 @@ static void saa711x_set_v4lstd(struct i2c_client *client, v4l2_std_id std) | |||
961 | reg |= 0x10; | 961 | reg |= 0x10; |
962 | } else if (std == V4L2_STD_NTSC_M_JP) { | 962 | } else if (std == V4L2_STD_NTSC_M_JP) { |
963 | reg |= 0x40; | 963 | reg |= 0x40; |
964 | } else if (std == V4L2_STD_SECAM) { | 964 | } else if (std & V4L2_STD_SECAM) { |
965 | reg |= 0x50; | 965 | reg |= 0x50; |
966 | } | 966 | } |
967 | saa711x_write(client, R_0E_CHROMA_CNTL_1, reg); | 967 | saa711x_write(client, R_0E_CHROMA_CNTL_1, reg); |
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 7be73e3763de..15dbc6bf42a7 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -804,9 +804,8 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
804 | return 0; | 804 | return 0; |
805 | } | 805 | } |
806 | 806 | ||
807 | static int tuner_suspend(struct device *dev, pm_message_t state) | 807 | static int tuner_suspend(struct i2c_client *c, pm_message_t state) |
808 | { | 808 | { |
809 | struct i2c_client *c = container_of (dev, struct i2c_client, dev); | ||
810 | struct tuner *t = i2c_get_clientdata (c); | 809 | struct tuner *t = i2c_get_clientdata (c); |
811 | 810 | ||
812 | tuner_dbg ("suspend\n"); | 811 | tuner_dbg ("suspend\n"); |
@@ -814,9 +813,8 @@ static int tuner_suspend(struct device *dev, pm_message_t state) | |||
814 | return 0; | 813 | return 0; |
815 | } | 814 | } |
816 | 815 | ||
817 | static int tuner_resume(struct device *dev) | 816 | static int tuner_resume(struct i2c_client *c) |
818 | { | 817 | { |
819 | struct i2c_client *c = container_of (dev, struct i2c_client, dev); | ||
820 | struct tuner *t = i2c_get_clientdata (c); | 818 | struct tuner *t = i2c_get_clientdata (c); |
821 | 819 | ||
822 | tuner_dbg ("resume\n"); | 820 | tuner_dbg ("resume\n"); |
@@ -837,10 +835,10 @@ static struct i2c_driver driver = { | |||
837 | .attach_adapter = tuner_probe, | 835 | .attach_adapter = tuner_probe, |
838 | .detach_client = tuner_detach, | 836 | .detach_client = tuner_detach, |
839 | .command = tuner_command, | 837 | .command = tuner_command, |
838 | .suspend = tuner_suspend, | ||
839 | .resume = tuner_resume, | ||
840 | .driver = { | 840 | .driver = { |
841 | .name = "tuner", | 841 | .name = "tuner", |
842 | .suspend = tuner_suspend, | ||
843 | .resume = tuner_resume, | ||
844 | }, | 842 | }, |
845 | }; | 843 | }; |
846 | static struct i2c_client client_template = { | 844 | static struct i2c_client client_template = { |
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 404c014db1bd..1d2d03f77894 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c | |||
@@ -815,7 +815,7 @@ mptsas_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) | |||
815 | static int | 815 | static int |
816 | mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) | 816 | mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) |
817 | { | 817 | { |
818 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; | 818 | MPT_SCSI_HOST *hd; |
819 | struct mptsas_target_reset_event *target_reset_list, *n; | 819 | struct mptsas_target_reset_event *target_reset_list, *n; |
820 | int rc; | 820 | int rc; |
821 | 821 | ||
@@ -827,7 +827,10 @@ mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) | |||
827 | if (reset_phase != MPT_IOC_POST_RESET) | 827 | if (reset_phase != MPT_IOC_POST_RESET) |
828 | goto out; | 828 | goto out; |
829 | 829 | ||
830 | if (!hd || !hd->ioc) | 830 | if (!ioc->sh || !ioc->sh->hostdata) |
831 | goto out; | ||
832 | hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; | ||
833 | if (!hd->ioc) | ||
831 | goto out; | 834 | goto out; |
832 | 835 | ||
833 | if (list_empty(&hd->target_reset_list)) | 836 | if (list_empty(&hd->target_reset_list)) |
diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c index da9859f2caf2..b17c4b2bc9ef 100644 --- a/drivers/message/i2o/i2o_block.c +++ b/drivers/message/i2o/i2o_block.c | |||
@@ -390,13 +390,6 @@ static int i2o_block_prep_req_fn(struct request_queue *q, struct request *req) | |||
390 | return BLKPREP_KILL; | 390 | return BLKPREP_KILL; |
391 | } | 391 | } |
392 | 392 | ||
393 | /* request is already processed by us, so return */ | ||
394 | if (blk_special_request(req)) { | ||
395 | osm_debug("REQ_SPECIAL already set!\n"); | ||
396 | req->cmd_flags |= REQ_DONTPREP; | ||
397 | return BLKPREP_OK; | ||
398 | } | ||
399 | |||
400 | /* connect the i2o_block_request to the request */ | 393 | /* connect the i2o_block_request to the request */ |
401 | if (!req->special) { | 394 | if (!req->special) { |
402 | ireq = i2o_block_request_alloc(); | 395 | ireq = i2o_block_request_alloc(); |
@@ -408,11 +401,8 @@ static int i2o_block_prep_req_fn(struct request_queue *q, struct request *req) | |||
408 | ireq->i2o_blk_dev = i2o_blk_dev; | 401 | ireq->i2o_blk_dev = i2o_blk_dev; |
409 | req->special = ireq; | 402 | req->special = ireq; |
410 | ireq->req = req; | 403 | ireq->req = req; |
411 | } else | 404 | } |
412 | ireq = req->special; | ||
413 | |||
414 | /* do not come back here */ | 405 | /* do not come back here */ |
415 | req->cmd_type = REQ_TYPE_SPECIAL; | ||
416 | req->cmd_flags |= REQ_DONTPREP; | 406 | req->cmd_flags |= REQ_DONTPREP; |
417 | 407 | ||
418 | return BLKPREP_OK; | 408 | return BLKPREP_OK; |
diff --git a/drivers/pcmcia/au1000_generic.c b/drivers/pcmcia/au1000_generic.c index 551bde5d9430..b693367d38cd 100644 --- a/drivers/pcmcia/au1000_generic.c +++ b/drivers/pcmcia/au1000_generic.c | |||
@@ -372,7 +372,7 @@ int au1x00_pcmcia_socket_probe(struct device *dev, struct pcmcia_low_level *ops, | |||
372 | skt->socket.resource_ops = &pccard_static_ops; | 372 | skt->socket.resource_ops = &pccard_static_ops; |
373 | skt->socket.ops = &au1x00_pcmcia_operations; | 373 | skt->socket.ops = &au1x00_pcmcia_operations; |
374 | skt->socket.owner = ops->owner; | 374 | skt->socket.owner = ops->owner; |
375 | skt->socket.dev.dev = dev; | 375 | skt->socket.dev.parent = dev; |
376 | 376 | ||
377 | init_timer(&skt->poll_timer); | 377 | init_timer(&skt->poll_timer); |
378 | skt->poll_timer.function = au1x00_pcmcia_poll_event; | 378 | skt->poll_timer.function = au1x00_pcmcia_poll_event; |
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c index 8c81cec85298..60446b88f721 100644 --- a/drivers/scsi/gdth.c +++ b/drivers/scsi/gdth.c | |||
@@ -3091,6 +3091,7 @@ static int gdth_fill_raw_cmd(int hanum,Scsi_Cmnd *scp,unchar b) | |||
3091 | cmdp->u.raw64.direction = | 3091 | cmdp->u.raw64.direction = |
3092 | gdth_direction_tab[scp->cmnd[0]]==DOU ? GDTH_DATA_OUT:GDTH_DATA_IN; | 3092 | gdth_direction_tab[scp->cmnd[0]]==DOU ? GDTH_DATA_OUT:GDTH_DATA_IN; |
3093 | memcpy(cmdp->u.raw64.cmd,scp->cmnd,16); | 3093 | memcpy(cmdp->u.raw64.cmd,scp->cmnd,16); |
3094 | cmdp->u.raw64.sg_ranz = 0; | ||
3094 | } else { | 3095 | } else { |
3095 | cmdp->u.raw.reserved = 0; | 3096 | cmdp->u.raw.reserved = 0; |
3096 | cmdp->u.raw.mdisc_time = 0; | 3097 | cmdp->u.raw.mdisc_time = 0; |
@@ -3107,6 +3108,7 @@ static int gdth_fill_raw_cmd(int hanum,Scsi_Cmnd *scp,unchar b) | |||
3107 | cmdp->u.raw.direction = | 3108 | cmdp->u.raw.direction = |
3108 | gdth_direction_tab[scp->cmnd[0]]==DOU ? GDTH_DATA_OUT:GDTH_DATA_IN; | 3109 | gdth_direction_tab[scp->cmnd[0]]==DOU ? GDTH_DATA_OUT:GDTH_DATA_IN; |
3109 | memcpy(cmdp->u.raw.cmd,scp->cmnd,12); | 3110 | memcpy(cmdp->u.raw.cmd,scp->cmnd,12); |
3111 | cmdp->u.raw.sg_ranz = 0; | ||
3110 | } | 3112 | } |
3111 | 3113 | ||
3112 | if (scp->use_sg) { | 3114 | if (scp->use_sg) { |
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 9d014e5a81c4..057fd7e0e379 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -1817,10 +1817,9 @@ static pci_ers_result_t lpfc_io_error_detected(struct pci_dev *pdev, | |||
1817 | struct lpfc_sli *psli = &phba->sli; | 1817 | struct lpfc_sli *psli = &phba->sli; |
1818 | struct lpfc_sli_ring *pring; | 1818 | struct lpfc_sli_ring *pring; |
1819 | 1819 | ||
1820 | if (state == pci_channel_io_perm_failure) { | 1820 | if (state == pci_channel_io_perm_failure) |
1821 | lpfc_pci_remove_one(pdev); | ||
1822 | return PCI_ERS_RESULT_DISCONNECT; | 1821 | return PCI_ERS_RESULT_DISCONNECT; |
1823 | } | 1822 | |
1824 | pci_disable_device(pdev); | 1823 | pci_disable_device(pdev); |
1825 | /* | 1824 | /* |
1826 | * There may be I/Os dropped by the firmware. | 1825 | * There may be I/Os dropped by the firmware. |
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 2328128728be..6657331eed93 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c | |||
@@ -189,8 +189,8 @@ static DECLARE_MUTEX(board_lock); | |||
189 | * this is exported so that for example a USB or parport based adapter | 189 | * this is exported so that for example a USB or parport based adapter |
190 | * driver could add devices (which it would learn about out-of-band). | 190 | * driver could add devices (which it would learn about out-of-band). |
191 | */ | 191 | */ |
192 | struct spi_device *__init_or_module | 192 | struct spi_device *spi_new_device(struct spi_master *master, |
193 | spi_new_device(struct spi_master *master, struct spi_board_info *chip) | 193 | struct spi_board_info *chip) |
194 | { | 194 | { |
195 | struct spi_device *proxy; | 195 | struct spi_device *proxy; |
196 | struct device *dev = master->cdev.dev; | 196 | struct device *dev = master->cdev.dev; |
@@ -352,8 +352,7 @@ static struct class spi_master_class = { | |||
352 | * the master's methods before calling spi_register_master(); and (after errors | 352 | * the master's methods before calling spi_register_master(); and (after errors |
353 | * adding the device) calling spi_master_put() to prevent a memory leak. | 353 | * adding the device) calling spi_master_put() to prevent a memory leak. |
354 | */ | 354 | */ |
355 | struct spi_master * __init_or_module | 355 | struct spi_master *spi_alloc_master(struct device *dev, unsigned size) |
356 | spi_alloc_master(struct device *dev, unsigned size) | ||
357 | { | 356 | { |
358 | struct spi_master *master; | 357 | struct spi_master *master; |
359 | 358 | ||
@@ -392,8 +391,7 @@ EXPORT_SYMBOL_GPL(spi_alloc_master); | |||
392 | * After a successful return, the caller is responsible for calling | 391 | * After a successful return, the caller is responsible for calling |
393 | * spi_unregister_master(). | 392 | * spi_unregister_master(). |
394 | */ | 393 | */ |
395 | int __init_or_module | 394 | int spi_register_master(struct spi_master *master) |
396 | spi_register_master(struct spi_master *master) | ||
397 | { | 395 | { |
398 | static atomic_t dyn_bus_id = ATOMIC_INIT((1<<16) - 1); | 396 | static atomic_t dyn_bus_id = ATOMIC_INIT((1<<16) - 1); |
399 | struct device *dev = master->cdev.dev; | 397 | struct device *dev = master->cdev.dev; |
@@ -136,7 +136,6 @@ static int aio_setup_ring(struct kioctx *ctx) | |||
136 | 0); | 136 | 0); |
137 | if (IS_ERR((void *)info->mmap_base)) { | 137 | if (IS_ERR((void *)info->mmap_base)) { |
138 | up_write(&ctx->mm->mmap_sem); | 138 | up_write(&ctx->mm->mmap_sem); |
139 | printk("mmap err: %ld\n", -info->mmap_base); | ||
140 | info->mmap_size = 0; | 139 | info->mmap_size = 0; |
141 | aio_free_ring(ctx); | 140 | aio_free_ring(ctx); |
142 | return -EAGAIN; | 141 | return -EAGAIN; |
diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c index 6f677988c71d..7e4bb0af24d7 100644 --- a/fs/nfsd/nfs3xdr.c +++ b/fs/nfsd/nfs3xdr.c | |||
@@ -859,8 +859,8 @@ compose_entry_fh(struct nfsd3_readdirres *cd, struct svc_fh *fhp, | |||
859 | #define NFS3_ENTRY_BAGGAGE (2 + 1 + 2 + 1) | 859 | #define NFS3_ENTRY_BAGGAGE (2 + 1 + 2 + 1) |
860 | #define NFS3_ENTRYPLUS_BAGGAGE (1 + 21 + 1 + (NFS3_FHSIZE >> 2)) | 860 | #define NFS3_ENTRYPLUS_BAGGAGE (1 + 21 + 1 + (NFS3_FHSIZE >> 2)) |
861 | static int | 861 | static int |
862 | encode_entry(struct readdir_cd *ccd, const char *name, | 862 | encode_entry(struct readdir_cd *ccd, const char *name, int namlen, |
863 | int namlen, off_t offset, ino_t ino, unsigned int d_type, int plus) | 863 | loff_t offset, ino_t ino, unsigned int d_type, int plus) |
864 | { | 864 | { |
865 | struct nfsd3_readdirres *cd = container_of(ccd, struct nfsd3_readdirres, | 865 | struct nfsd3_readdirres *cd = container_of(ccd, struct nfsd3_readdirres, |
866 | common); | 866 | common); |
@@ -880,7 +880,7 @@ encode_entry(struct readdir_cd *ccd, const char *name, | |||
880 | *cd->offset1 = htonl(offset64 & 0xffffffff); | 880 | *cd->offset1 = htonl(offset64 & 0xffffffff); |
881 | cd->offset1 = NULL; | 881 | cd->offset1 = NULL; |
882 | } else { | 882 | } else { |
883 | xdr_encode_hyper(cd->offset, (u64) offset); | 883 | xdr_encode_hyper(cd->offset, offset64); |
884 | } | 884 | } |
885 | } | 885 | } |
886 | 886 | ||
diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c index 832673b14587..673a53c014a3 100644 --- a/fs/nfsd/nfs4acl.c +++ b/fs/nfsd/nfs4acl.c | |||
@@ -228,7 +228,7 @@ _posix_to_nfsv4_one(struct posix_acl *pacl, struct nfs4_acl *acl, | |||
228 | struct posix_acl_summary pas; | 228 | struct posix_acl_summary pas; |
229 | unsigned short deny; | 229 | unsigned short deny; |
230 | int eflag = ((flags & NFS4_ACL_TYPE_DEFAULT) ? | 230 | int eflag = ((flags & NFS4_ACL_TYPE_DEFAULT) ? |
231 | NFS4_INHERITANCE_FLAGS : 0); | 231 | NFS4_INHERITANCE_FLAGS | NFS4_ACE_INHERIT_ONLY_ACE : 0); |
232 | 232 | ||
233 | BUG_ON(pacl->a_count < 3); | 233 | BUG_ON(pacl->a_count < 3); |
234 | summarize_posix_acl(pacl, &pas); | 234 | summarize_posix_acl(pacl, &pas); |
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 9e4067999209..af360705e551 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -750,9 +750,8 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
750 | status = nfserr_clid_inuse; | 750 | status = nfserr_clid_inuse; |
751 | if (!cmp_creds(&conf->cl_cred, &rqstp->rq_cred) | 751 | if (!cmp_creds(&conf->cl_cred, &rqstp->rq_cred) |
752 | || conf->cl_addr != sin->sin_addr.s_addr) { | 752 | || conf->cl_addr != sin->sin_addr.s_addr) { |
753 | printk("NFSD: setclientid: string in use by client" | 753 | dprintk("NFSD: setclientid: string in use by client" |
754 | "(clientid %08x/%08x)\n", | 754 | "at %u.%u.%u.%u\n", NIPQUAD(conf->cl_addr)); |
755 | conf->cl_clientid.cl_boot, conf->cl_clientid.cl_id); | ||
756 | goto out; | 755 | goto out; |
757 | } | 756 | } |
758 | } | 757 | } |
@@ -3261,7 +3260,6 @@ __nfs4_state_shutdown(void) | |||
3261 | unhash_delegation(dp); | 3260 | unhash_delegation(dp); |
3262 | } | 3261 | } |
3263 | 3262 | ||
3264 | cancel_delayed_work(&laundromat_work); | ||
3265 | nfsd4_shutdown_recdir(); | 3263 | nfsd4_shutdown_recdir(); |
3266 | nfs4_init = 0; | 3264 | nfs4_init = 0; |
3267 | } | 3265 | } |
diff --git a/fs/proc/Makefile b/fs/proc/Makefile index a6b3a8f878f0..bce38e3f06cb 100644 --- a/fs/proc/Makefile +++ b/fs/proc/Makefile | |||
@@ -8,8 +8,9 @@ proc-y := nommu.o task_nommu.o | |||
8 | proc-$(CONFIG_MMU) := mmu.o task_mmu.o | 8 | proc-$(CONFIG_MMU) := mmu.o task_mmu.o |
9 | 9 | ||
10 | proc-y += inode.o root.o base.o generic.o array.o \ | 10 | proc-y += inode.o root.o base.o generic.o array.o \ |
11 | proc_tty.o proc_misc.o proc_sysctl.o | 11 | proc_tty.o proc_misc.o |
12 | 12 | ||
13 | proc-$(CONFIG_PROC_SYSCTL) += proc_sysctl.o | ||
13 | proc-$(CONFIG_PROC_KCORE) += kcore.o | 14 | proc-$(CONFIG_PROC_KCORE) += kcore.o |
14 | proc-$(CONFIG_PROC_VMCORE) += vmcore.o | 15 | proc-$(CONFIG_PROC_VMCORE) += vmcore.o |
15 | proc-$(CONFIG_PROC_DEVICETREE) += proc_devtree.o | 16 | proc-$(CONFIG_PROC_DEVICETREE) += proc_devtree.o |
diff --git a/fs/splice.c b/fs/splice.c index 2fca6ebf4cc2..07f6556add0a 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -576,76 +576,21 @@ static int pipe_to_file(struct pipe_inode_info *pipe, struct pipe_buffer *buf, | |||
576 | if (this_len + offset > PAGE_CACHE_SIZE) | 576 | if (this_len + offset > PAGE_CACHE_SIZE) |
577 | this_len = PAGE_CACHE_SIZE - offset; | 577 | this_len = PAGE_CACHE_SIZE - offset; |
578 | 578 | ||
579 | /* | ||
580 | * Reuse buf page, if SPLICE_F_MOVE is set and we are doing a full | ||
581 | * page. | ||
582 | */ | ||
583 | if ((sd->flags & SPLICE_F_MOVE) && this_len == PAGE_CACHE_SIZE) { | ||
584 | /* | ||
585 | * If steal succeeds, buf->page is now pruned from the | ||
586 | * pagecache and we can reuse it. The page will also be | ||
587 | * locked on successful return. | ||
588 | */ | ||
589 | if (buf->ops->steal(pipe, buf)) | ||
590 | goto find_page; | ||
591 | |||
592 | page = buf->page; | ||
593 | if (add_to_page_cache(page, mapping, index, GFP_KERNEL)) { | ||
594 | unlock_page(page); | ||
595 | goto find_page; | ||
596 | } | ||
597 | |||
598 | page_cache_get(page); | ||
599 | |||
600 | if (!(buf->flags & PIPE_BUF_FLAG_LRU)) | ||
601 | lru_cache_add(page); | ||
602 | } else { | ||
603 | find_page: | 579 | find_page: |
604 | page = find_lock_page(mapping, index); | 580 | page = find_lock_page(mapping, index); |
605 | if (!page) { | 581 | if (!page) { |
606 | ret = -ENOMEM; | 582 | ret = -ENOMEM; |
607 | page = page_cache_alloc_cold(mapping); | 583 | page = page_cache_alloc_cold(mapping); |
608 | if (unlikely(!page)) | 584 | if (unlikely(!page)) |
609 | goto out_ret; | 585 | goto out_ret; |
610 | |||
611 | /* | ||
612 | * This will also lock the page | ||
613 | */ | ||
614 | ret = add_to_page_cache_lru(page, mapping, index, | ||
615 | GFP_KERNEL); | ||
616 | if (unlikely(ret)) | ||
617 | goto out; | ||
618 | } | ||
619 | 586 | ||
620 | /* | 587 | /* |
621 | * We get here with the page locked. If the page is also | 588 | * This will also lock the page |
622 | * uptodate, we don't need to do more. If it isn't, we | ||
623 | * may need to bring it in if we are not going to overwrite | ||
624 | * the full page. | ||
625 | */ | 589 | */ |
626 | if (!PageUptodate(page)) { | 590 | ret = add_to_page_cache_lru(page, mapping, index, |
627 | if (this_len < PAGE_CACHE_SIZE) { | 591 | GFP_KERNEL); |
628 | ret = mapping->a_ops->readpage(file, page); | 592 | if (unlikely(ret)) |
629 | if (unlikely(ret)) | 593 | goto out; |
630 | goto out; | ||
631 | |||
632 | lock_page(page); | ||
633 | |||
634 | if (!PageUptodate(page)) { | ||
635 | /* | ||
636 | * Page got invalidated, repeat. | ||
637 | */ | ||
638 | if (!page->mapping) { | ||
639 | unlock_page(page); | ||
640 | page_cache_release(page); | ||
641 | goto find_page; | ||
642 | } | ||
643 | ret = -EIO; | ||
644 | goto out; | ||
645 | } | ||
646 | } else | ||
647 | SetPageUptodate(page); | ||
648 | } | ||
649 | } | 594 | } |
650 | 595 | ||
651 | ret = mapping->a_ops->prepare_write(file, page, offset, offset+this_len); | 596 | ret = mapping->a_ops->prepare_write(file, page, offset, offset+this_len); |
@@ -706,9 +651,9 @@ out_ret: | |||
706 | * key here is the 'actor' worker passed in that actually moves the data | 651 | * key here is the 'actor' worker passed in that actually moves the data |
707 | * to the wanted destination. See pipe_to_file/pipe_to_sendpage above. | 652 | * to the wanted destination. See pipe_to_file/pipe_to_sendpage above. |
708 | */ | 653 | */ |
709 | static ssize_t __splice_from_pipe(struct pipe_inode_info *pipe, | 654 | ssize_t __splice_from_pipe(struct pipe_inode_info *pipe, |
710 | struct file *out, loff_t *ppos, size_t len, | 655 | struct file *out, loff_t *ppos, size_t len, |
711 | unsigned int flags, splice_actor *actor) | 656 | unsigned int flags, splice_actor *actor) |
712 | { | 657 | { |
713 | int ret, do_wakeup, err; | 658 | int ret, do_wakeup, err; |
714 | struct splice_desc sd; | 659 | struct splice_desc sd; |
@@ -802,6 +747,7 @@ static ssize_t __splice_from_pipe(struct pipe_inode_info *pipe, | |||
802 | 747 | ||
803 | return ret; | 748 | return ret; |
804 | } | 749 | } |
750 | EXPORT_SYMBOL(__splice_from_pipe); | ||
805 | 751 | ||
806 | ssize_t splice_from_pipe(struct pipe_inode_info *pipe, struct file *out, | 752 | ssize_t splice_from_pipe(struct pipe_inode_info *pipe, struct file *out, |
807 | loff_t *ppos, size_t len, unsigned int flags, | 753 | loff_t *ppos, size_t len, unsigned int flags, |
diff --git a/include/asm-i386/termbits.h b/include/asm-i386/termbits.h index 12baf1d6343f..2e6237693814 100644 --- a/include/asm-i386/termbits.h +++ b/include/asm-i386/termbits.h | |||
@@ -144,7 +144,7 @@ struct ktermios { | |||
144 | #define B3000000 0010015 | 144 | #define B3000000 0010015 |
145 | #define B3500000 0010016 | 145 | #define B3500000 0010016 |
146 | #define B4000000 0010017 | 146 | #define B4000000 0010017 |
147 | #define CIBAUD 002003600000 /* input baud rate (not used) */ | 147 | #define CIBAUD 002003600000 |
148 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | 148 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ |
149 | #define CRTSCTS 020000000000 /* flow control */ | 149 | #define CRTSCTS 020000000000 /* flow control */ |
150 | 150 | ||
diff --git a/include/asm-um/common.lds.S b/include/asm-um/common.lds.S index f0454516dd31..b16222b42821 100644 --- a/include/asm-um/common.lds.S +++ b/include/asm-um/common.lds.S | |||
@@ -15,6 +15,7 @@ | |||
15 | PROVIDE (_unprotected_end = .); | 15 | PROVIDE (_unprotected_end = .); |
16 | 16 | ||
17 | . = ALIGN(4096); | 17 | . = ALIGN(4096); |
18 | .note : { *(note.*) } | ||
18 | __start___ex_table = .; | 19 | __start___ex_table = .; |
19 | __ex_table : { *(__ex_table) } | 20 | __ex_table : { *(__ex_table) } |
20 | __stop___ex_table = .; | 21 | __stop___ex_table = .; |
diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h index 84cfa8bbdc36..d2a96cbf4f0e 100644 --- a/include/linux/eventpoll.h +++ b/include/linux/eventpoll.h | |||
@@ -31,12 +31,19 @@ | |||
31 | /* | 31 | /* |
32 | * On x86-64 make the 64bit structure have the same alignment as the | 32 | * On x86-64 make the 64bit structure have the same alignment as the |
33 | * 32bit structure. This makes 32bit emulation easier. | 33 | * 32bit structure. This makes 32bit emulation easier. |
34 | * | ||
35 | * UML/x86_64 needs the same packing as x86_64 - UML + UML_X86 + | ||
36 | * 64_BIT adds up to UML/x86_64. | ||
34 | */ | 37 | */ |
35 | #ifdef __x86_64__ | 38 | #ifdef __x86_64__ |
36 | #define EPOLL_PACKED __attribute__((packed)) | 39 | #define EPOLL_PACKED __attribute__((packed)) |
37 | #else | 40 | #else |
41 | #if defined(CONFIG_UML) && defined(CONFIG_UML_X86) && defined(CONFIG_64BIT) | ||
42 | #define EPOLL_PACKED __attribute__((packed)) | ||
43 | #else | ||
38 | #define EPOLL_PACKED | 44 | #define EPOLL_PACKED |
39 | #endif | 45 | #endif |
46 | #endif | ||
40 | 47 | ||
41 | struct epoll_event { | 48 | struct epoll_event { |
42 | __u32 events; | 49 | __u32 events; |
diff --git a/include/linux/ipc.h b/include/linux/ipc.h index 636094c29b16..6da6772c19ff 100644 --- a/include/linux/ipc.h +++ b/include/linux/ipc.h | |||
@@ -92,19 +92,16 @@ extern struct ipc_namespace init_ipc_ns; | |||
92 | 92 | ||
93 | #ifdef CONFIG_SYSVIPC | 93 | #ifdef CONFIG_SYSVIPC |
94 | #define INIT_IPC_NS(ns) .ns = &init_ipc_ns, | 94 | #define INIT_IPC_NS(ns) .ns = &init_ipc_ns, |
95 | extern int copy_ipcs(unsigned long flags, struct task_struct *tsk); | ||
95 | #else | 96 | #else |
96 | #define INIT_IPC_NS(ns) | 97 | #define INIT_IPC_NS(ns) |
98 | static inline int copy_ipcs(unsigned long flags, struct task_struct *tsk) | ||
99 | { return 0; } | ||
97 | #endif | 100 | #endif |
98 | 101 | ||
99 | #ifdef CONFIG_IPC_NS | 102 | #ifdef CONFIG_IPC_NS |
100 | extern void free_ipc_ns(struct kref *kref); | 103 | extern void free_ipc_ns(struct kref *kref); |
101 | extern int copy_ipcs(unsigned long flags, struct task_struct *tsk); | ||
102 | extern int unshare_ipcs(unsigned long flags, struct ipc_namespace **ns); | 104 | extern int unshare_ipcs(unsigned long flags, struct ipc_namespace **ns); |
103 | #else | ||
104 | static inline int copy_ipcs(unsigned long flags, struct task_struct *tsk) | ||
105 | { | ||
106 | return 0; | ||
107 | } | ||
108 | #endif | 105 | #endif |
109 | 106 | ||
110 | static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) | 107 | static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) |
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index 2e19478e9e84..8bcbc54e1b48 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -99,4 +99,8 @@ extern ssize_t splice_from_pipe(struct pipe_inode_info *, struct file *, | |||
99 | loff_t *, size_t, unsigned int, | 99 | loff_t *, size_t, unsigned int, |
100 | splice_actor *); | 100 | splice_actor *); |
101 | 101 | ||
102 | extern ssize_t __splice_from_pipe(struct pipe_inode_info *, struct file *, | ||
103 | loff_t *, size_t, unsigned int, | ||
104 | splice_actor *); | ||
105 | |||
102 | #endif | 106 | #endif |
diff --git a/include/linux/utsname.h b/include/linux/utsname.h index a4555fe3754c..e10267d402c5 100644 --- a/include/linux/utsname.h +++ b/include/linux/utsname.h | |||
@@ -70,6 +70,8 @@ static inline int unshare_utsname(unsigned long unshare_flags, | |||
70 | 70 | ||
71 | static inline int copy_utsname(int flags, struct task_struct *tsk) | 71 | static inline int copy_utsname(int flags, struct task_struct *tsk) |
72 | { | 72 | { |
73 | if (flags & CLONE_NEWUTS) | ||
74 | return -EINVAL; | ||
73 | return 0; | 75 | return 0; |
74 | } | 76 | } |
75 | static inline void put_uts_ns(struct uts_namespace *ns) | 77 | static inline void put_uts_ns(struct uts_namespace *ns) |
diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h index 83fe2e3d1e25..50e33b0e9349 100644 --- a/include/media/saa7146_vv.h +++ b/include/media/saa7146_vv.h | |||
@@ -239,7 +239,8 @@ void saa7146_res_free(struct saa7146_fh *fh, unsigned int bits); | |||
239 | #define SAA7146_HPS_SYNC_PORT_B 0x01 | 239 | #define SAA7146_HPS_SYNC_PORT_B 0x01 |
240 | 240 | ||
241 | /* some memory sizes */ | 241 | /* some memory sizes */ |
242 | #define SAA7146_CLIPPING_MEM (14*PAGE_SIZE) | 242 | /* max. 16 clipping rectangles */ |
243 | #define SAA7146_CLIPPING_MEM (16 * 4 * sizeof(u32)) | ||
243 | 244 | ||
244 | /* some defines for the various clipping-modes */ | 245 | /* some defines for the various clipping-modes */ |
245 | #define SAA7146_CLIPPING_RECT 0x4 | 246 | #define SAA7146_CLIPPING_RECT 0x4 |
diff --git a/ipc/util.c b/ipc/util.c index 08a647965b9e..0b652387d169 100644 --- a/ipc/util.c +++ b/ipc/util.c | |||
@@ -144,6 +144,13 @@ void free_ipc_ns(struct kref *kref) | |||
144 | shm_exit_ns(ns); | 144 | shm_exit_ns(ns); |
145 | kfree(ns); | 145 | kfree(ns); |
146 | } | 146 | } |
147 | #else | ||
148 | int copy_ipcs(unsigned long flags, struct task_struct *tsk) | ||
149 | { | ||
150 | if (flags & CLONE_NEWIPC) | ||
151 | return -EINVAL; | ||
152 | return 0; | ||
153 | } | ||
147 | #endif | 154 | #endif |
148 | 155 | ||
149 | /** | 156 | /** |
diff --git a/kernel/power/disk.c b/kernel/power/disk.c index dee0ff40befd..aec19b063e3f 100644 --- a/kernel/power/disk.c +++ b/kernel/power/disk.c | |||
@@ -58,7 +58,6 @@ static inline int platform_prepare(void) | |||
58 | 58 | ||
59 | static void power_down(suspend_disk_method_t mode) | 59 | static void power_down(suspend_disk_method_t mode) |
60 | { | 60 | { |
61 | disable_nonboot_cpus(); | ||
62 | switch(mode) { | 61 | switch(mode) { |
63 | case PM_DISK_PLATFORM: | 62 | case PM_DISK_PLATFORM: |
64 | if (pm_ops && pm_ops->enter) { | 63 | if (pm_ops && pm_ops->enter) { |
diff --git a/kernel/power/user.c b/kernel/power/user.c index bf211fee1222..7cf6713b2325 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c | |||
@@ -401,10 +401,9 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp, | |||
401 | 401 | ||
402 | case PMOPS_ENTER: | 402 | case PMOPS_ENTER: |
403 | if (data->platform_suspend) { | 403 | if (data->platform_suspend) { |
404 | disable_nonboot_cpus(); | ||
405 | kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK); | 404 | kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK); |
406 | error = pm_ops->enter(PM_SUSPEND_DISK); | 405 | error = pm_ops->enter(PM_SUSPEND_DISK); |
407 | enable_nonboot_cpus(); | 406 | error = 0; |
408 | } | 407 | } |
409 | break; | 408 | break; |
410 | 409 | ||
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index eb12509e00bd..cb25649c6f50 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c | |||
@@ -32,7 +32,7 @@ static u64 tick_length, tick_length_base; | |||
32 | /* TIME_ERROR prevents overwriting the CMOS clock */ | 32 | /* TIME_ERROR prevents overwriting the CMOS clock */ |
33 | static int time_state = TIME_OK; /* clock synchronization status */ | 33 | static int time_state = TIME_OK; /* clock synchronization status */ |
34 | int time_status = STA_UNSYNC; /* clock status bits */ | 34 | int time_status = STA_UNSYNC; /* clock status bits */ |
35 | static long time_offset; /* time adjustment (ns) */ | 35 | static s64 time_offset; /* time adjustment (ns) */ |
36 | static long time_constant = 2; /* pll time constant */ | 36 | static long time_constant = 2; /* pll time constant */ |
37 | long time_maxerror = NTP_PHASE_LIMIT; /* maximum error (us) */ | 37 | long time_maxerror = NTP_PHASE_LIMIT; /* maximum error (us) */ |
38 | long time_esterror = NTP_PHASE_LIMIT; /* estimated error (us) */ | 38 | long time_esterror = NTP_PHASE_LIMIT; /* estimated error (us) */ |
@@ -196,7 +196,7 @@ void __attribute__ ((weak)) notify_arch_cmos_timer(void) | |||
196 | */ | 196 | */ |
197 | int do_adjtimex(struct timex *txc) | 197 | int do_adjtimex(struct timex *txc) |
198 | { | 198 | { |
199 | long ltemp, mtemp, save_adjust; | 199 | long mtemp, save_adjust, rem; |
200 | s64 freq_adj, temp64; | 200 | s64 freq_adj, temp64; |
201 | int result; | 201 | int result; |
202 | 202 | ||
@@ -277,14 +277,14 @@ int do_adjtimex(struct timex *txc) | |||
277 | time_adjust = txc->offset; | 277 | time_adjust = txc->offset; |
278 | } | 278 | } |
279 | else if (time_status & STA_PLL) { | 279 | else if (time_status & STA_PLL) { |
280 | ltemp = txc->offset * NSEC_PER_USEC; | 280 | time_offset = txc->offset * NSEC_PER_USEC; |
281 | 281 | ||
282 | /* | 282 | /* |
283 | * Scale the phase adjustment and | 283 | * Scale the phase adjustment and |
284 | * clamp to the operating range. | 284 | * clamp to the operating range. |
285 | */ | 285 | */ |
286 | time_offset = min(ltemp, MAXPHASE * NSEC_PER_USEC); | 286 | time_offset = min(time_offset, (s64)MAXPHASE * NSEC_PER_USEC); |
287 | time_offset = max(time_offset, -MAXPHASE * NSEC_PER_USEC); | 287 | time_offset = max(time_offset, (s64)-MAXPHASE * NSEC_PER_USEC); |
288 | 288 | ||
289 | /* | 289 | /* |
290 | * Select whether the frequency is to be controlled | 290 | * Select whether the frequency is to be controlled |
@@ -297,11 +297,11 @@ int do_adjtimex(struct timex *txc) | |||
297 | mtemp = xtime.tv_sec - time_reftime; | 297 | mtemp = xtime.tv_sec - time_reftime; |
298 | time_reftime = xtime.tv_sec; | 298 | time_reftime = xtime.tv_sec; |
299 | 299 | ||
300 | freq_adj = (s64)time_offset * mtemp; | 300 | freq_adj = time_offset * mtemp; |
301 | freq_adj = shift_right(freq_adj, time_constant * 2 + | 301 | freq_adj = shift_right(freq_adj, time_constant * 2 + |
302 | (SHIFT_PLL + 2) * 2 - SHIFT_NSEC); | 302 | (SHIFT_PLL + 2) * 2 - SHIFT_NSEC); |
303 | if (mtemp >= MINSEC && (time_status & STA_FLL || mtemp > MAXSEC)) { | 303 | if (mtemp >= MINSEC && (time_status & STA_FLL || mtemp > MAXSEC)) { |
304 | temp64 = (s64)time_offset << (SHIFT_NSEC - SHIFT_FLL); | 304 | temp64 = time_offset << (SHIFT_NSEC - SHIFT_FLL); |
305 | if (time_offset < 0) { | 305 | if (time_offset < 0) { |
306 | temp64 = -temp64; | 306 | temp64 = -temp64; |
307 | do_div(temp64, mtemp); | 307 | do_div(temp64, mtemp); |
@@ -314,8 +314,10 @@ int do_adjtimex(struct timex *txc) | |||
314 | freq_adj += time_freq; | 314 | freq_adj += time_freq; |
315 | freq_adj = min(freq_adj, (s64)MAXFREQ_NSEC); | 315 | freq_adj = min(freq_adj, (s64)MAXFREQ_NSEC); |
316 | time_freq = max(freq_adj, (s64)-MAXFREQ_NSEC); | 316 | time_freq = max(freq_adj, (s64)-MAXFREQ_NSEC); |
317 | time_offset = (time_offset / NTP_INTERVAL_FREQ) | 317 | time_offset = div_long_long_rem_signed(time_offset, |
318 | << SHIFT_UPDATE; | 318 | NTP_INTERVAL_FREQ, |
319 | &rem); | ||
320 | time_offset <<= SHIFT_UPDATE; | ||
319 | } /* STA_PLL */ | 321 | } /* STA_PLL */ |
320 | } /* txc->modes & ADJ_OFFSET */ | 322 | } /* txc->modes & ADJ_OFFSET */ |
321 | if (txc->modes & ADJ_TICK) | 323 | if (txc->modes & ADJ_TICK) |
@@ -328,12 +330,12 @@ leave: if ((time_status & (STA_UNSYNC|STA_CLOCKERR)) != 0) | |||
328 | result = TIME_ERROR; | 330 | result = TIME_ERROR; |
329 | 331 | ||
330 | if ((txc->modes & ADJ_OFFSET_SINGLESHOT) == ADJ_OFFSET_SINGLESHOT) | 332 | if ((txc->modes & ADJ_OFFSET_SINGLESHOT) == ADJ_OFFSET_SINGLESHOT) |
331 | txc->offset = save_adjust; | 333 | txc->offset = save_adjust; |
332 | else | 334 | else |
333 | txc->offset = shift_right(time_offset, SHIFT_UPDATE) | 335 | txc->offset = ((long)shift_right(time_offset, SHIFT_UPDATE)) * |
334 | * NTP_INTERVAL_FREQ / 1000; | 336 | NTP_INTERVAL_FREQ / 1000; |
335 | txc->freq = (time_freq / NSEC_PER_USEC) | 337 | txc->freq = (time_freq / NSEC_PER_USEC) << |
336 | << (SHIFT_USEC - SHIFT_NSEC); | 338 | (SHIFT_USEC - SHIFT_NSEC); |
337 | txc->maxerror = time_maxerror; | 339 | txc->maxerror = time_maxerror; |
338 | txc->esterror = time_esterror; | 340 | txc->esterror = time_esterror; |
339 | txc->status = time_status; | 341 | txc->status = time_status; |
diff --git a/mm/bounce.c b/mm/bounce.c index 643efbe82402..ad401fc57440 100644 --- a/mm/bounce.c +++ b/mm/bounce.c | |||
@@ -204,7 +204,7 @@ static void __blk_queue_bounce(request_queue_t *q, struct bio **bio_orig, | |||
204 | /* | 204 | /* |
205 | * is destination page below bounce pfn? | 205 | * is destination page below bounce pfn? |
206 | */ | 206 | */ |
207 | if (page_to_pfn(page) < q->bounce_pfn) | 207 | if (page_to_pfn(page) <= q->bounce_pfn) |
208 | continue; | 208 | continue; |
209 | 209 | ||
210 | /* | 210 | /* |