diff options
138 files changed, 770 insertions, 396 deletions
diff --git a/Documentation/vm/page-types.c b/Documentation/vm/page-types.c index ccd951fa94ee..cc96ee2666f2 100644 --- a/Documentation/vm/page-types.c +++ b/Documentation/vm/page-types.c | |||
| @@ -478,7 +478,7 @@ static void prepare_hwpoison_fd(void) | |||
| 478 | } | 478 | } |
| 479 | 479 | ||
| 480 | if (opt_unpoison && !hwpoison_forget_fd) { | 480 | if (opt_unpoison && !hwpoison_forget_fd) { |
| 481 | sprintf(buf, "%s/renew-pfn", hwpoison_debug_fs); | 481 | sprintf(buf, "%s/unpoison-pfn", hwpoison_debug_fs); |
| 482 | hwpoison_forget_fd = checked_open(buf, O_WRONLY); | 482 | hwpoison_forget_fd = checked_open(buf, O_WRONLY); |
| 483 | } | 483 | } |
| 484 | } | 484 | } |
diff --git a/MAINTAINERS b/MAINTAINERS index f46d8e66333f..d79fd7aae983 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -969,6 +969,16 @@ L: linux-samsung-soc@vger.kernel.org (moderated for non-subscribers) | |||
| 969 | S: Maintained | 969 | S: Maintained |
| 970 | F: arch/arm/mach-s5p*/ | 970 | F: arch/arm/mach-s5p*/ |
| 971 | 971 | ||
| 972 | ARM/SAMSUNG S5P SERIES FIMC SUPPORT | ||
| 973 | M: Kyungmin Park <kyungmin.park@samsung.com> | ||
| 974 | M: Sylwester Nawrocki <s.nawrocki@samsung.com> | ||
| 975 | L: linux-arm-kernel@lists.infradead.org | ||
| 976 | L: linux-media@vger.kernel.org | ||
| 977 | S: Maintained | ||
| 978 | F: arch/arm/plat-s5p/dev-fimc* | ||
| 979 | F: arch/arm/plat-samsung/include/plat/*fimc* | ||
| 980 | F: drivers/media/video/s5p-fimc/ | ||
| 981 | |||
| 972 | ARM/SHMOBILE ARM ARCHITECTURE | 982 | ARM/SHMOBILE ARM ARCHITECTURE |
| 973 | M: Paul Mundt <lethal@linux-sh.org> | 983 | M: Paul Mundt <lethal@linux-sh.org> |
| 974 | M: Magnus Damm <magnus.damm@gmail.com> | 984 | M: Magnus Damm <magnus.damm@gmail.com> |
| @@ -2535,7 +2545,7 @@ S: Supported | |||
| 2535 | F: drivers/scsi/gdt* | 2545 | F: drivers/scsi/gdt* |
| 2536 | 2546 | ||
| 2537 | GENERIC GPIO I2C DRIVER | 2547 | GENERIC GPIO I2C DRIVER |
| 2538 | M: Haavard Skinnemoen <hskinnemoen@atmel.com> | 2548 | M: Haavard Skinnemoen <hskinnemoen@gmail.com> |
| 2539 | S: Supported | 2549 | S: Supported |
| 2540 | F: drivers/i2c/busses/i2c-gpio.c | 2550 | F: drivers/i2c/busses/i2c-gpio.c |
| 2541 | F: include/linux/i2c-gpio.h | 2551 | F: include/linux/i2c-gpio.h |
| @@ -1,7 +1,7 @@ | |||
| 1 | VERSION = 2 | 1 | VERSION = 2 |
| 2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
| 3 | SUBLEVEL = 36 | 3 | SUBLEVEL = 36 |
| 4 | EXTRAVERSION = -rc6 | 4 | EXTRAVERSION = -rc7 |
| 5 | NAME = Sheep on Meth | 5 | NAME = Sheep on Meth |
| 6 | 6 | ||
| 7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
diff --git a/arch/arm/mach-s5p6440/cpu.c b/arch/arm/mach-s5p6440/cpu.c index 526f33adb31d..ec592e866054 100644 --- a/arch/arm/mach-s5p6440/cpu.c +++ b/arch/arm/mach-s5p6440/cpu.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/sysdev.h> | 19 | #include <linux/sysdev.h> |
| 20 | #include <linux/serial_core.h> | 20 | #include <linux/serial_core.h> |
| 21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
| 22 | #include <linux/sched.h> | ||
| 22 | 23 | ||
| 23 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
| 24 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
diff --git a/arch/arm/mach-s5p6442/cpu.c b/arch/arm/mach-s5p6442/cpu.c index a48fb553fd01..70ac681af72b 100644 --- a/arch/arm/mach-s5p6442/cpu.c +++ b/arch/arm/mach-s5p6442/cpu.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/sysdev.h> | 19 | #include <linux/sysdev.h> |
| 20 | #include <linux/serial_core.h> | 20 | #include <linux/serial_core.h> |
| 21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
| 22 | #include <linux/sched.h> | ||
| 22 | 23 | ||
| 23 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
| 24 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
diff --git a/arch/arm/mach-s5pc100/cpu.c b/arch/arm/mach-s5pc100/cpu.c index 251c92ac5b22..cd1afbce83e2 100644 --- a/arch/arm/mach-s5pc100/cpu.c +++ b/arch/arm/mach-s5pc100/cpu.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <linux/sysdev.h> | 21 | #include <linux/sysdev.h> |
| 22 | #include <linux/serial_core.h> | 22 | #include <linux/serial_core.h> |
| 23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
| 24 | #include <linux/sched.h> | ||
| 24 | 25 | ||
| 25 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
| 26 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c index cfecd70657cb..d562670e1b0b 100644 --- a/arch/arm/mach-s5pv210/clock.c +++ b/arch/arm/mach-s5pv210/clock.c | |||
| @@ -173,11 +173,6 @@ static int s5pv210_clk_ip3_ctrl(struct clk *clk, int enable) | |||
| 173 | return s5p_gatectrl(S5P_CLKGATE_IP3, clk, enable); | 173 | return s5p_gatectrl(S5P_CLKGATE_IP3, clk, enable); |
| 174 | } | 174 | } |
| 175 | 175 | ||
| 176 | static int s5pv210_clk_ip4_ctrl(struct clk *clk, int enable) | ||
| 177 | { | ||
| 178 | return s5p_gatectrl(S5P_CLKGATE_IP4, clk, enable); | ||
| 179 | } | ||
| 180 | |||
| 181 | static int s5pv210_clk_mask0_ctrl(struct clk *clk, int enable) | 176 | static int s5pv210_clk_mask0_ctrl(struct clk *clk, int enable) |
| 182 | { | 177 | { |
| 183 | return s5p_gatectrl(S5P_CLK_SRC_MASK0, clk, enable); | 178 | return s5p_gatectrl(S5P_CLK_SRC_MASK0, clk, enable); |
diff --git a/arch/arm/mach-s5pv210/cpu.c b/arch/arm/mach-s5pv210/cpu.c index 77f456c91ad3..245b82b53df4 100644 --- a/arch/arm/mach-s5pv210/cpu.c +++ b/arch/arm/mach-s5pv210/cpu.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
| 20 | #include <linux/sysdev.h> | 20 | #include <linux/sysdev.h> |
| 21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
| 22 | #include <linux/sched.h> | ||
| 22 | 23 | ||
| 23 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
| 24 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c index 0691176899ff..72e09eb642dd 100644 --- a/arch/arm/oprofile/common.c +++ b/arch/arm/oprofile/common.c | |||
| @@ -102,6 +102,7 @@ static int op_create_counter(int cpu, int event) | |||
| 102 | if (IS_ERR(pevent)) { | 102 | if (IS_ERR(pevent)) { |
| 103 | ret = PTR_ERR(pevent); | 103 | ret = PTR_ERR(pevent); |
| 104 | } else if (pevent->state != PERF_EVENT_STATE_ACTIVE) { | 104 | } else if (pevent->state != PERF_EVENT_STATE_ACTIVE) { |
| 105 | perf_event_release_kernel(pevent); | ||
| 105 | pr_warning("oprofile: failed to enable event %d " | 106 | pr_warning("oprofile: failed to enable event %d " |
| 106 | "on CPU %d\n", event, cpu); | 107 | "on CPU %d\n", event, cpu); |
| 107 | ret = -EBUSY; | 108 | ret = -EBUSY; |
| @@ -365,6 +366,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) | |||
| 365 | ret = init_driverfs(); | 366 | ret = init_driverfs(); |
| 366 | if (ret) { | 367 | if (ret) { |
| 367 | kfree(counter_config); | 368 | kfree(counter_config); |
| 369 | counter_config = NULL; | ||
| 368 | return ret; | 370 | return ret; |
| 369 | } | 371 | } |
| 370 | 372 | ||
| @@ -402,7 +404,6 @@ void oprofile_arch_exit(void) | |||
| 402 | struct perf_event *event; | 404 | struct perf_event *event; |
| 403 | 405 | ||
| 404 | if (*perf_events) { | 406 | if (*perf_events) { |
| 405 | exit_driverfs(); | ||
| 406 | for_each_possible_cpu(cpu) { | 407 | for_each_possible_cpu(cpu) { |
| 407 | for (id = 0; id < perf_num_counters; ++id) { | 408 | for (id = 0; id < perf_num_counters; ++id) { |
| 408 | event = perf_events[cpu][id]; | 409 | event = perf_events[cpu][id]; |
| @@ -413,8 +414,10 @@ void oprofile_arch_exit(void) | |||
| 413 | } | 414 | } |
| 414 | } | 415 | } |
| 415 | 416 | ||
| 416 | if (counter_config) | 417 | if (counter_config) { |
| 417 | kfree(counter_config); | 418 | kfree(counter_config); |
| 419 | exit_driverfs(); | ||
| 420 | } | ||
| 418 | } | 421 | } |
| 419 | #else | 422 | #else |
| 420 | int __init oprofile_arch_init(struct oprofile_operations *ops) | 423 | int __init oprofile_arch_init(struct oprofile_operations *ops) |
diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c index 04d9521ddc9f..e8f2be2d67f2 100644 --- a/arch/arm/plat-samsung/adc.c +++ b/arch/arm/plat-samsung/adc.c | |||
| @@ -435,7 +435,6 @@ static int s3c_adc_suspend(struct platform_device *pdev, pm_message_t state) | |||
| 435 | static int s3c_adc_resume(struct platform_device *pdev) | 435 | static int s3c_adc_resume(struct platform_device *pdev) |
| 436 | { | 436 | { |
| 437 | struct adc_device *adc = platform_get_drvdata(pdev); | 437 | struct adc_device *adc = platform_get_drvdata(pdev); |
| 438 | unsigned long flags; | ||
| 439 | 438 | ||
| 440 | clk_enable(adc->clk); | 439 | clk_enable(adc->clk); |
| 441 | enable_irq(adc->irq); | 440 | enable_irq(adc->irq); |
diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c index 90a20512d68d..e8d20b0bc50e 100644 --- a/arch/arm/plat-samsung/clock.c +++ b/arch/arm/plat-samsung/clock.c | |||
| @@ -48,6 +48,9 @@ | |||
| 48 | #include <plat/clock.h> | 48 | #include <plat/clock.h> |
| 49 | #include <plat/cpu.h> | 49 | #include <plat/cpu.h> |
| 50 | 50 | ||
| 51 | #include <linux/serial_core.h> | ||
| 52 | #include <plat/regs-serial.h> /* for s3c24xx_uart_devs */ | ||
| 53 | |||
| 51 | /* clock information */ | 54 | /* clock information */ |
| 52 | 55 | ||
| 53 | static LIST_HEAD(clocks); | 56 | static LIST_HEAD(clocks); |
| @@ -65,6 +68,28 @@ static int clk_null_enable(struct clk *clk, int enable) | |||
| 65 | return 0; | 68 | return 0; |
| 66 | } | 69 | } |
| 67 | 70 | ||
| 71 | static int dev_is_s3c_uart(struct device *dev) | ||
| 72 | { | ||
| 73 | struct platform_device **pdev = s3c24xx_uart_devs; | ||
| 74 | int i; | ||
| 75 | for (i = 0; i < ARRAY_SIZE(s3c24xx_uart_devs); i++, pdev++) | ||
| 76 | if (*pdev && dev == &(*pdev)->dev) | ||
| 77 | return 1; | ||
| 78 | return 0; | ||
| 79 | } | ||
| 80 | |||
| 81 | /* | ||
| 82 | * Serial drivers call get_clock() very early, before platform bus | ||
| 83 | * has been set up, this requires a special check to let them get | ||
| 84 | * a proper clock | ||
| 85 | */ | ||
| 86 | |||
| 87 | static int dev_is_platform_device(struct device *dev) | ||
| 88 | { | ||
| 89 | return dev->bus == &platform_bus_type || | ||
| 90 | (dev->bus == NULL && dev_is_s3c_uart(dev)); | ||
| 91 | } | ||
| 92 | |||
| 68 | /* Clock API calls */ | 93 | /* Clock API calls */ |
| 69 | 94 | ||
| 70 | struct clk *clk_get(struct device *dev, const char *id) | 95 | struct clk *clk_get(struct device *dev, const char *id) |
| @@ -73,7 +98,7 @@ struct clk *clk_get(struct device *dev, const char *id) | |||
| 73 | struct clk *clk = ERR_PTR(-ENOENT); | 98 | struct clk *clk = ERR_PTR(-ENOENT); |
| 74 | int idno; | 99 | int idno; |
| 75 | 100 | ||
| 76 | if (dev == NULL || dev->bus != &platform_bus_type) | 101 | if (dev == NULL || !dev_is_platform_device(dev)) |
| 77 | idno = -1; | 102 | idno = -1; |
| 78 | else | 103 | else |
| 79 | idno = to_platform_device(dev)->id; | 104 | idno = to_platform_device(dev)->id; |
diff --git a/arch/avr32/kernel/module.c b/arch/avr32/kernel/module.c index 98f94d041d9c..a727f54d64d6 100644 --- a/arch/avr32/kernel/module.c +++ b/arch/avr32/kernel/module.c | |||
| @@ -314,10 +314,9 @@ int module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, | |||
| 314 | vfree(module->arch.syminfo); | 314 | vfree(module->arch.syminfo); |
| 315 | module->arch.syminfo = NULL; | 315 | module->arch.syminfo = NULL; |
| 316 | 316 | ||
| 317 | return module_bug_finalize(hdr, sechdrs, module); | 317 | return 0; |
| 318 | } | 318 | } |
| 319 | 319 | ||
| 320 | void module_arch_cleanup(struct module *module) | 320 | void module_arch_cleanup(struct module *module) |
| 321 | { | 321 | { |
| 322 | module_bug_cleanup(module); | ||
| 323 | } | 322 | } |
diff --git a/arch/h8300/kernel/module.c b/arch/h8300/kernel/module.c index 0865e291c20d..db4953dc4e1b 100644 --- a/arch/h8300/kernel/module.c +++ b/arch/h8300/kernel/module.c | |||
| @@ -112,10 +112,9 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
| 112 | const Elf_Shdr *sechdrs, | 112 | const Elf_Shdr *sechdrs, |
| 113 | struct module *me) | 113 | struct module *me) |
| 114 | { | 114 | { |
| 115 | return module_bug_finalize(hdr, sechdrs, me); | 115 | return 0; |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | void module_arch_cleanup(struct module *mod) | 118 | void module_arch_cleanup(struct module *mod) |
| 119 | { | 119 | { |
| 120 | module_bug_cleanup(mod); | ||
| 121 | } | 120 | } |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 3ad59dde4852..5526faabfc21 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
| @@ -13,6 +13,7 @@ config MIPS | |||
| 13 | select HAVE_KPROBES | 13 | select HAVE_KPROBES |
| 14 | select HAVE_KRETPROBES | 14 | select HAVE_KRETPROBES |
| 15 | select RTC_LIB if !MACH_LOONGSON | 15 | select RTC_LIB if !MACH_LOONGSON |
| 16 | select GENERIC_ATOMIC64 if !64BIT | ||
| 16 | 17 | ||
| 17 | mainmenu "Linux/MIPS Kernel Configuration" | 18 | mainmenu "Linux/MIPS Kernel Configuration" |
| 18 | 19 | ||
| @@ -1646,8 +1647,16 @@ config MIPS_MT_SMP | |||
| 1646 | select SYS_SUPPORTS_SMP | 1647 | select SYS_SUPPORTS_SMP |
| 1647 | select SMP_UP | 1648 | select SMP_UP |
| 1648 | help | 1649 | help |
| 1649 | This is a kernel model which is also known a VSMP or lately | 1650 | This is a kernel model which is known a VSMP but lately has been |
| 1650 | has been marketesed into SMVP. | 1651 | marketesed into SMVP. |
| 1652 | Virtual SMP uses the processor's VPEs to implement virtual | ||
| 1653 | processors. In currently available configuration of the 34K processor | ||
| 1654 | this allows for a dual processor. Both processors will share the same | ||
| 1655 | primary caches; each will obtain the half of the TLB for it's own | ||
| 1656 | exclusive use. For a layman this model can be described as similar to | ||
| 1657 | what Intel calls Hyperthreading. | ||
| 1658 | |||
| 1659 | For further information see http://www.linux-mips.org/wiki/34K#VSMP | ||
| 1651 | 1660 | ||
| 1652 | config MIPS_MT_SMTC | 1661 | config MIPS_MT_SMTC |
| 1653 | bool "SMTC: Use all TCs on all VPEs for SMP" | 1662 | bool "SMTC: Use all TCs on all VPEs for SMP" |
| @@ -1664,6 +1673,14 @@ config MIPS_MT_SMTC | |||
| 1664 | help | 1673 | help |
| 1665 | This is a kernel model which is known a SMTC or lately has been | 1674 | This is a kernel model which is known a SMTC or lately has been |
| 1666 | marketesed into SMVP. | 1675 | marketesed into SMVP. |
| 1676 | is presenting the available TC's of the core as processors to Linux. | ||
| 1677 | On currently available 34K processors this means a Linux system will | ||
| 1678 | see up to 5 processors. The implementation of the SMTC kernel differs | ||
| 1679 | significantly from VSMP and cannot efficiently coexist in the same | ||
| 1680 | kernel binary so the choice between VSMP and SMTC is a compile time | ||
| 1681 | decision. | ||
| 1682 | |||
| 1683 | For further information see http://www.linux-mips.org/wiki/34K#SMTC | ||
| 1667 | 1684 | ||
| 1668 | endchoice | 1685 | endchoice |
| 1669 | 1686 | ||
diff --git a/arch/mips/alchemy/common/prom.c b/arch/mips/alchemy/common/prom.c index c29511b11d44..534021059629 100644 --- a/arch/mips/alchemy/common/prom.c +++ b/arch/mips/alchemy/common/prom.c | |||
| @@ -43,7 +43,7 @@ int prom_argc; | |||
| 43 | char **prom_argv; | 43 | char **prom_argv; |
| 44 | char **prom_envp; | 44 | char **prom_envp; |
| 45 | 45 | ||
| 46 | void prom_init_cmdline(void) | 46 | void __init prom_init_cmdline(void) |
| 47 | { | 47 | { |
| 48 | int i; | 48 | int i; |
| 49 | 49 | ||
| @@ -104,7 +104,7 @@ static inline void str2eaddr(unsigned char *ea, unsigned char *str) | |||
| 104 | } | 104 | } |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | int prom_get_ethernet_addr(char *ethernet_addr) | 107 | int __init prom_get_ethernet_addr(char *ethernet_addr) |
| 108 | { | 108 | { |
| 109 | char *ethaddr_str; | 109 | char *ethaddr_str; |
| 110 | 110 | ||
| @@ -123,7 +123,6 @@ int prom_get_ethernet_addr(char *ethernet_addr) | |||
| 123 | 123 | ||
| 124 | return 0; | 124 | return 0; |
| 125 | } | 125 | } |
| 126 | EXPORT_SYMBOL(prom_get_ethernet_addr); | ||
| 127 | 126 | ||
| 128 | void __init prom_free_prom_memory(void) | 127 | void __init prom_free_prom_memory(void) |
| 129 | { | 128 | { |
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile index ed9bb709c9a3..5fd7f7a58b7e 100644 --- a/arch/mips/boot/compressed/Makefile +++ b/arch/mips/boot/compressed/Makefile | |||
| @@ -59,7 +59,7 @@ $(obj)/piggy.o: $(obj)/dummy.o $(obj)/vmlinux.bin.z FORCE | |||
| 59 | hostprogs-y := calc_vmlinuz_load_addr | 59 | hostprogs-y := calc_vmlinuz_load_addr |
| 60 | 60 | ||
| 61 | VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \ | 61 | VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \ |
| 62 | $(objtree)/$(KBUILD_IMAGE) $(VMLINUX_LOAD_ADDRESS)) | 62 | $(obj)/vmlinux.bin $(VMLINUX_LOAD_ADDRESS)) |
| 63 | 63 | ||
| 64 | vmlinuzobjs-y += $(obj)/piggy.o | 64 | vmlinuzobjs-y += $(obj)/piggy.o |
| 65 | 65 | ||
diff --git a/arch/mips/cavium-octeon/Kconfig b/arch/mips/cavium-octeon/Kconfig index 094c17e38e16..47323ca452dc 100644 --- a/arch/mips/cavium-octeon/Kconfig +++ b/arch/mips/cavium-octeon/Kconfig | |||
| @@ -83,3 +83,7 @@ config ARCH_SPARSEMEM_ENABLE | |||
| 83 | def_bool y | 83 | def_bool y |
| 84 | select SPARSEMEM_STATIC | 84 | select SPARSEMEM_STATIC |
| 85 | depends on CPU_CAVIUM_OCTEON | 85 | depends on CPU_CAVIUM_OCTEON |
| 86 | |||
| 87 | config CAVIUM_OCTEON_HELPER | ||
| 88 | def_bool y | ||
| 89 | depends on OCTEON_ETHERNET || PCI | ||
diff --git a/arch/mips/cavium-octeon/cpu.c b/arch/mips/cavium-octeon/cpu.c index c664c8cc2b42..a5b427909b5c 100644 --- a/arch/mips/cavium-octeon/cpu.c +++ b/arch/mips/cavium-octeon/cpu.c | |||
| @@ -41,7 +41,7 @@ static int cnmips_cu2_call(struct notifier_block *nfb, unsigned long action, | |||
| 41 | return NOTIFY_OK; /* Let default notifier send signals */ | 41 | return NOTIFY_OK; /* Let default notifier send signals */ |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | static int cnmips_cu2_setup(void) | 44 | static int __init cnmips_cu2_setup(void) |
| 45 | { | 45 | { |
| 46 | return cu2_notifier(cnmips_cu2_call, 0); | 46 | return cu2_notifier(cnmips_cu2_call, 0); |
| 47 | } | 47 | } |
diff --git a/arch/mips/cavium-octeon/executive/Makefile b/arch/mips/cavium-octeon/executive/Makefile index 2fd66db6939e..7f41c5be2190 100644 --- a/arch/mips/cavium-octeon/executive/Makefile +++ b/arch/mips/cavium-octeon/executive/Makefile | |||
| @@ -11,4 +11,4 @@ | |||
| 11 | 11 | ||
| 12 | obj-y += cvmx-bootmem.o cvmx-l2c.o cvmx-sysinfo.o octeon-model.o | 12 | obj-y += cvmx-bootmem.o cvmx-l2c.o cvmx-sysinfo.o octeon-model.o |
| 13 | 13 | ||
| 14 | obj-$(CONFIG_PCI) += cvmx-helper-errata.o cvmx-helper-jtag.o | 14 | obj-$(CONFIG_CAVIUM_OCTEON_HELPER) += cvmx-helper-errata.o cvmx-helper-jtag.o |
diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h index c63c56bfd184..47d87da379f9 100644 --- a/arch/mips/include/asm/atomic.h +++ b/arch/mips/include/asm/atomic.h | |||
| @@ -782,6 +782,10 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) | |||
| 782 | */ | 782 | */ |
| 783 | #define atomic64_add_negative(i, v) (atomic64_add_return(i, (v)) < 0) | 783 | #define atomic64_add_negative(i, v) (atomic64_add_return(i, (v)) < 0) |
| 784 | 784 | ||
| 785 | #else /* !CONFIG_64BIT */ | ||
| 786 | |||
| 787 | #include <asm-generic/atomic64.h> | ||
| 788 | |||
| 785 | #endif /* CONFIG_64BIT */ | 789 | #endif /* CONFIG_64BIT */ |
| 786 | 790 | ||
| 787 | /* | 791 | /* |
diff --git a/arch/mips/include/asm/cop2.h b/arch/mips/include/asm/cop2.h index 2cb2f0c2c4f8..3532e2c5f098 100644 --- a/arch/mips/include/asm/cop2.h +++ b/arch/mips/include/asm/cop2.h | |||
| @@ -24,7 +24,7 @@ extern int cu2_notifier_call_chain(unsigned long val, void *v); | |||
| 24 | 24 | ||
| 25 | #define cu2_notifier(fn, pri) \ | 25 | #define cu2_notifier(fn, pri) \ |
| 26 | ({ \ | 26 | ({ \ |
| 27 | static struct notifier_block fn##_nb __cpuinitdata = { \ | 27 | static struct notifier_block fn##_nb = { \ |
| 28 | .notifier_call = fn, \ | 28 | .notifier_call = fn, \ |
| 29 | .priority = pri \ | 29 | .priority = pri \ |
| 30 | }; \ | 30 | }; \ |
diff --git a/arch/mips/include/asm/gic.h b/arch/mips/include/asm/gic.h index 9b9436a4d816..86548da650e7 100644 --- a/arch/mips/include/asm/gic.h +++ b/arch/mips/include/asm/gic.h | |||
| @@ -321,6 +321,7 @@ struct gic_intrmask_regs { | |||
| 321 | */ | 321 | */ |
| 322 | struct gic_intr_map { | 322 | struct gic_intr_map { |
| 323 | unsigned int cpunum; /* Directed to this CPU */ | 323 | unsigned int cpunum; /* Directed to this CPU */ |
| 324 | #define GIC_UNUSED 0xdead /* Dummy data */ | ||
| 324 | unsigned int pin; /* Directed to this Pin */ | 325 | unsigned int pin; /* Directed to this Pin */ |
| 325 | unsigned int polarity; /* Polarity : +/- */ | 326 | unsigned int polarity; /* Polarity : +/- */ |
| 326 | unsigned int trigtype; /* Trigger : Edge/Levl */ | 327 | unsigned int trigtype; /* Trigger : Edge/Levl */ |
diff --git a/arch/mips/include/asm/mach-tx49xx/kmalloc.h b/arch/mips/include/asm/mach-tx49xx/kmalloc.h index b74caf65482b..ff9a8b86cb93 100644 --- a/arch/mips/include/asm/mach-tx49xx/kmalloc.h +++ b/arch/mips/include/asm/mach-tx49xx/kmalloc.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #ifndef __ASM_MACH_TX49XX_KMALLOC_H | 1 | #ifndef __ASM_MACH_TX49XX_KMALLOC_H |
| 2 | #define __ASM_MACH_TX49XX_KMALLOC_H | 2 | #define __ASM_MACH_TX49XX_KMALLOC_H |
| 3 | 3 | ||
| 4 | #define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES | 4 | #define ARCH_DMA_MINALIGN L1_CACHE_BYTES |
| 5 | 5 | ||
| 6 | #endif /* __ASM_MACH_TX49XX_KMALLOC_H */ | 6 | #endif /* __ASM_MACH_TX49XX_KMALLOC_H */ |
diff --git a/arch/mips/include/asm/mips-boards/maltaint.h b/arch/mips/include/asm/mips-boards/maltaint.h index cea872fc6f5c..d11aa02a956a 100644 --- a/arch/mips/include/asm/mips-boards/maltaint.h +++ b/arch/mips/include/asm/mips-boards/maltaint.h | |||
| @@ -88,9 +88,6 @@ | |||
| 88 | 88 | ||
| 89 | #define GIC_EXT_INTR(x) x | 89 | #define GIC_EXT_INTR(x) x |
| 90 | 90 | ||
| 91 | /* Dummy data */ | ||
| 92 | #define X 0xdead | ||
| 93 | |||
| 94 | /* External Interrupts used for IPI */ | 91 | /* External Interrupts used for IPI */ |
| 95 | #define GIC_IPI_EXT_INTR_RESCHED_VPE0 16 | 92 | #define GIC_IPI_EXT_INTR_RESCHED_VPE0 16 |
| 96 | #define GIC_IPI_EXT_INTR_CALLFNC_VPE0 17 | 93 | #define GIC_IPI_EXT_INTR_CALLFNC_VPE0 17 |
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h index a16beafcea91..e59cd1ac09c2 100644 --- a/arch/mips/include/asm/page.h +++ b/arch/mips/include/asm/page.h | |||
| @@ -150,6 +150,20 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
| 150 | ((unsigned long)(x) - PAGE_OFFSET + PHYS_OFFSET) | 150 | ((unsigned long)(x) - PAGE_OFFSET + PHYS_OFFSET) |
| 151 | #endif | 151 | #endif |
| 152 | #define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET)) | 152 | #define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET)) |
| 153 | |||
| 154 | /* | ||
| 155 | * RELOC_HIDE was originally added by 6007b903dfe5f1d13e0c711ac2894bdd4a61b1ad | ||
| 156 | * (lmo) rsp. 8431fd094d625b94d364fe393076ccef88e6ce18 (kernel.org). The | ||
| 157 | * discussion can be found in lkml posting | ||
| 158 | * <a2ebde260608230500o3407b108hc03debb9da6e62c@mail.gmail.com> which is | ||
| 159 | * archived at http://lists.linuxcoding.com/kernel/2006-q3/msg17360.html | ||
| 160 | * | ||
| 161 | * It is unclear if the misscompilations mentioned in | ||
| 162 | * http://lkml.org/lkml/2010/8/8/138 also affect MIPS so we keep this one | ||
| 163 | * until GCC 3.x has been retired before we can apply | ||
| 164 | * https://patchwork.linux-mips.org/patch/1541/ | ||
| 165 | */ | ||
| 166 | |||
| 153 | #define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x), 0)) | 167 | #define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x), 0)) |
| 154 | 168 | ||
| 155 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) | 169 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) |
diff --git a/arch/mips/include/asm/siginfo.h b/arch/mips/include/asm/siginfo.h index 96e28f18dad1..1ca64b4d33d9 100644 --- a/arch/mips/include/asm/siginfo.h +++ b/arch/mips/include/asm/siginfo.h | |||
| @@ -88,6 +88,7 @@ typedef struct siginfo { | |||
| 88 | #ifdef __ARCH_SI_TRAPNO | 88 | #ifdef __ARCH_SI_TRAPNO |
| 89 | int _trapno; /* TRAP # which caused the signal */ | 89 | int _trapno; /* TRAP # which caused the signal */ |
| 90 | #endif | 90 | #endif |
| 91 | short _addr_lsb; | ||
| 91 | } _sigfault; | 92 | } _sigfault; |
| 92 | 93 | ||
| 93 | /* SIGPOLL, SIGXFSZ (To do ...) */ | 94 | /* SIGPOLL, SIGXFSZ (To do ...) */ |
diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h index 2376f2e06e47..70df9c0d3c5b 100644 --- a/arch/mips/include/asm/thread_info.h +++ b/arch/mips/include/asm/thread_info.h | |||
| @@ -146,7 +146,8 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
| 146 | #define _TIF_LOAD_WATCH (1<<TIF_LOAD_WATCH) | 146 | #define _TIF_LOAD_WATCH (1<<TIF_LOAD_WATCH) |
| 147 | 147 | ||
| 148 | /* work to do on interrupt/exception return */ | 148 | /* work to do on interrupt/exception return */ |
| 149 | #define _TIF_WORK_MASK (0x0000ffef & ~_TIF_SECCOMP) | 149 | #define _TIF_WORK_MASK (0x0000ffef & \ |
| 150 | ~(_TIF_SECCOMP | _TIF_SYSCALL_AUDIT)) | ||
| 150 | /* work to do on any return to u-space */ | 151 | /* work to do on any return to u-space */ |
| 151 | #define _TIF_ALLWORK_MASK (0x8000ffff & ~_TIF_SECCOMP) | 152 | #define _TIF_ALLWORK_MASK (0x8000ffff & ~_TIF_SECCOMP) |
| 152 | 153 | ||
diff --git a/arch/mips/include/asm/unistd.h b/arch/mips/include/asm/unistd.h index baa318a59c97..550725b881d5 100644 --- a/arch/mips/include/asm/unistd.h +++ b/arch/mips/include/asm/unistd.h | |||
| @@ -356,16 +356,19 @@ | |||
| 356 | #define __NR_perf_event_open (__NR_Linux + 333) | 356 | #define __NR_perf_event_open (__NR_Linux + 333) |
| 357 | #define __NR_accept4 (__NR_Linux + 334) | 357 | #define __NR_accept4 (__NR_Linux + 334) |
| 358 | #define __NR_recvmmsg (__NR_Linux + 335) | 358 | #define __NR_recvmmsg (__NR_Linux + 335) |
| 359 | #define __NR_fanotify_init (__NR_Linux + 336) | ||
| 360 | #define __NR_fanotify_mark (__NR_Linux + 337) | ||
| 361 | #define __NR_prlimit64 (__NR_Linux + 338) | ||
| 359 | 362 | ||
| 360 | /* | 363 | /* |
| 361 | * Offset of the last Linux o32 flavoured syscall | 364 | * Offset of the last Linux o32 flavoured syscall |
| 362 | */ | 365 | */ |
| 363 | #define __NR_Linux_syscalls 335 | 366 | #define __NR_Linux_syscalls 338 |
| 364 | 367 | ||
| 365 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 368 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
| 366 | 369 | ||
| 367 | #define __NR_O32_Linux 4000 | 370 | #define __NR_O32_Linux 4000 |
| 368 | #define __NR_O32_Linux_syscalls 335 | 371 | #define __NR_O32_Linux_syscalls 338 |
| 369 | 372 | ||
| 370 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 373 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
| 371 | 374 | ||
| @@ -668,16 +671,19 @@ | |||
| 668 | #define __NR_perf_event_open (__NR_Linux + 292) | 671 | #define __NR_perf_event_open (__NR_Linux + 292) |
| 669 | #define __NR_accept4 (__NR_Linux + 293) | 672 | #define __NR_accept4 (__NR_Linux + 293) |
| 670 | #define __NR_recvmmsg (__NR_Linux + 294) | 673 | #define __NR_recvmmsg (__NR_Linux + 294) |
| 674 | #define __NR_fanotify_init (__NR_Linux + 295) | ||
| 675 | #define __NR_fanotify_mark (__NR_Linux + 296) | ||
| 676 | #define __NR_prlimit64 (__NR_Linux + 297) | ||
| 671 | 677 | ||
| 672 | /* | 678 | /* |
| 673 | * Offset of the last Linux 64-bit flavoured syscall | 679 | * Offset of the last Linux 64-bit flavoured syscall |
| 674 | */ | 680 | */ |
| 675 | #define __NR_Linux_syscalls 294 | 681 | #define __NR_Linux_syscalls 297 |
| 676 | 682 | ||
| 677 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 683 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
| 678 | 684 | ||
| 679 | #define __NR_64_Linux 5000 | 685 | #define __NR_64_Linux 5000 |
| 680 | #define __NR_64_Linux_syscalls 294 | 686 | #define __NR_64_Linux_syscalls 297 |
| 681 | 687 | ||
| 682 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 688 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
| 683 | 689 | ||
| @@ -985,16 +991,19 @@ | |||
| 985 | #define __NR_accept4 (__NR_Linux + 297) | 991 | #define __NR_accept4 (__NR_Linux + 297) |
| 986 | #define __NR_recvmmsg (__NR_Linux + 298) | 992 | #define __NR_recvmmsg (__NR_Linux + 298) |
| 987 | #define __NR_getdents64 (__NR_Linux + 299) | 993 | #define __NR_getdents64 (__NR_Linux + 299) |
| 994 | #define __NR_fanotify_init (__NR_Linux + 300) | ||
| 995 | #define __NR_fanotify_mark (__NR_Linux + 301) | ||
| 996 | #define __NR_prlimit64 (__NR_Linux + 302) | ||
| 988 | 997 | ||
| 989 | /* | 998 | /* |
| 990 | * Offset of the last N32 flavoured syscall | 999 | * Offset of the last N32 flavoured syscall |
| 991 | */ | 1000 | */ |
| 992 | #define __NR_Linux_syscalls 299 | 1001 | #define __NR_Linux_syscalls 302 |
| 993 | 1002 | ||
| 994 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 1003 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
| 995 | 1004 | ||
| 996 | #define __NR_N32_Linux 6000 | 1005 | #define __NR_N32_Linux 6000 |
| 997 | #define __NR_N32_Linux_syscalls 299 | 1006 | #define __NR_N32_Linux_syscalls 302 |
| 998 | 1007 | ||
| 999 | #ifdef __KERNEL__ | 1008 | #ifdef __KERNEL__ |
| 1000 | 1009 | ||
diff --git a/arch/mips/kernel/irq-gic.c b/arch/mips/kernel/irq-gic.c index b181f2f0ea8e..82ba9f62f49e 100644 --- a/arch/mips/kernel/irq-gic.c +++ b/arch/mips/kernel/irq-gic.c | |||
| @@ -7,7 +7,6 @@ | |||
| 7 | #include <asm/io.h> | 7 | #include <asm/io.h> |
| 8 | #include <asm/gic.h> | 8 | #include <asm/gic.h> |
| 9 | #include <asm/gcmpregs.h> | 9 | #include <asm/gcmpregs.h> |
| 10 | #include <asm/mips-boards/maltaint.h> | ||
| 11 | #include <asm/irq.h> | 10 | #include <asm/irq.h> |
| 12 | #include <linux/hardirq.h> | 11 | #include <linux/hardirq.h> |
| 13 | #include <asm-generic/bitops/find.h> | 12 | #include <asm-generic/bitops/find.h> |
| @@ -131,7 +130,7 @@ static int gic_set_affinity(unsigned int irq, const struct cpumask *cpumask) | |||
| 131 | int i; | 130 | int i; |
| 132 | 131 | ||
| 133 | irq -= _irqbase; | 132 | irq -= _irqbase; |
| 134 | pr_debug(KERN_DEBUG "%s(%d) called\n", __func__, irq); | 133 | pr_debug("%s(%d) called\n", __func__, irq); |
| 135 | cpumask_and(&tmp, cpumask, cpu_online_mask); | 134 | cpumask_and(&tmp, cpumask, cpu_online_mask); |
| 136 | if (cpus_empty(tmp)) | 135 | if (cpus_empty(tmp)) |
| 137 | return -1; | 136 | return -1; |
| @@ -222,7 +221,7 @@ static void __init gic_basic_init(int numintrs, int numvpes, | |||
| 222 | /* Setup specifics */ | 221 | /* Setup specifics */ |
| 223 | for (i = 0; i < mapsize; i++) { | 222 | for (i = 0; i < mapsize; i++) { |
| 224 | cpu = intrmap[i].cpunum; | 223 | cpu = intrmap[i].cpunum; |
| 225 | if (cpu == X) | 224 | if (cpu == GIC_UNUSED) |
| 226 | continue; | 225 | continue; |
| 227 | if (cpu == 0 && i != 0 && intrmap[i].flags == 0) | 226 | if (cpu == 0 && i != 0 && intrmap[i].flags == 0) |
| 228 | continue; | 227 | continue; |
diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c index 1f4e2fa64140..f4546e97c60d 100644 --- a/arch/mips/kernel/kgdb.c +++ b/arch/mips/kernel/kgdb.c | |||
| @@ -283,7 +283,7 @@ static int kgdb_mips_notify(struct notifier_block *self, unsigned long cmd, | |||
| 283 | struct pt_regs *regs = args->regs; | 283 | struct pt_regs *regs = args->regs; |
| 284 | int trap = (regs->cp0_cause & 0x7c) >> 2; | 284 | int trap = (regs->cp0_cause & 0x7c) >> 2; |
| 285 | 285 | ||
| 286 | /* Userpace events, ignore. */ | 286 | /* Userspace events, ignore. */ |
| 287 | if (user_mode(regs)) | 287 | if (user_mode(regs)) |
| 288 | return NOTIFY_DONE; | 288 | return NOTIFY_DONE; |
| 289 | 289 | ||
diff --git a/arch/mips/kernel/kspd.c b/arch/mips/kernel/kspd.c index 80e2ba694bab..29811f043399 100644 --- a/arch/mips/kernel/kspd.c +++ b/arch/mips/kernel/kspd.c | |||
| @@ -251,7 +251,7 @@ void sp_work_handle_request(void) | |||
| 251 | memset(&tz, 0, sizeof(tz)); | 251 | memset(&tz, 0, sizeof(tz)); |
| 252 | if ((ret.retval = sp_syscall(__NR_gettimeofday, (int)&tv, | 252 | if ((ret.retval = sp_syscall(__NR_gettimeofday, (int)&tv, |
| 253 | (int)&tz, 0, 0)) == 0) | 253 | (int)&tz, 0, 0)) == 0) |
| 254 | ret.retval = tv.tv_sec; | 254 | ret.retval = tv.tv_sec; |
| 255 | break; | 255 | break; |
| 256 | 256 | ||
| 257 | case MTSP_SYSCALL_EXIT: | 257 | case MTSP_SYSCALL_EXIT: |
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index c2dab140dc98..6343b4a5b835 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
| @@ -341,3 +341,10 @@ asmlinkage long sys32_lookup_dcookie(u32 a0, u32 a1, char __user *buf, | |||
| 341 | { | 341 | { |
| 342 | return sys_lookup_dcookie(merge_64(a0, a1), buf, len); | 342 | return sys_lookup_dcookie(merge_64(a0, a1), buf, len); |
| 343 | } | 343 | } |
| 344 | |||
| 345 | SYSCALL_DEFINE6(32_fanotify_mark, int, fanotify_fd, unsigned int, flags, | ||
| 346 | u64, a3, u64, a4, int, dfd, const char __user *, pathname) | ||
| 347 | { | ||
| 348 | return sys_fanotify_mark(fanotify_fd, flags, merge_64(a3, a4), | ||
| 349 | dfd, pathname); | ||
| 350 | } | ||
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index 17202bbe843f..584415eef8c9 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
| @@ -583,7 +583,10 @@ einval: li v0, -ENOSYS | |||
| 583 | sys sys_rt_tgsigqueueinfo 4 | 583 | sys sys_rt_tgsigqueueinfo 4 |
| 584 | sys sys_perf_event_open 5 | 584 | sys sys_perf_event_open 5 |
| 585 | sys sys_accept4 4 | 585 | sys sys_accept4 4 |
| 586 | sys sys_recvmmsg 5 | 586 | sys sys_recvmmsg 5 /* 4335 */ |
| 587 | sys sys_fanotify_init 2 | ||
| 588 | sys sys_fanotify_mark 6 | ||
| 589 | sys sys_prlimit64 4 | ||
| 587 | .endm | 590 | .endm |
| 588 | 591 | ||
| 589 | /* We pre-compute the number of _instruction_ bytes needed to | 592 | /* We pre-compute the number of _instruction_ bytes needed to |
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index a8a6c596eb04..5573f8e4e326 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S | |||
| @@ -416,9 +416,12 @@ sys_call_table: | |||
| 416 | PTR sys_pipe2 | 416 | PTR sys_pipe2 |
| 417 | PTR sys_inotify_init1 | 417 | PTR sys_inotify_init1 |
| 418 | PTR sys_preadv | 418 | PTR sys_preadv |
| 419 | PTR sys_pwritev /* 5390 */ | 419 | PTR sys_pwritev /* 5290 */ |
| 420 | PTR sys_rt_tgsigqueueinfo | 420 | PTR sys_rt_tgsigqueueinfo |
| 421 | PTR sys_perf_event_open | 421 | PTR sys_perf_event_open |
| 422 | PTR sys_accept4 | 422 | PTR sys_accept4 |
| 423 | PTR sys_recvmmsg | 423 | PTR sys_recvmmsg |
| 424 | PTR sys_fanotify_init /* 5295 */ | ||
| 425 | PTR sys_fanotify_mark | ||
| 426 | PTR sys_prlimit64 | ||
| 424 | .size sys_call_table,.-sys_call_table | 427 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index a3d66137731a..1e38ec97672e 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
| @@ -419,5 +419,8 @@ EXPORT(sysn32_call_table) | |||
| 419 | PTR sys_perf_event_open | 419 | PTR sys_perf_event_open |
| 420 | PTR sys_accept4 | 420 | PTR sys_accept4 |
| 421 | PTR compat_sys_recvmmsg | 421 | PTR compat_sys_recvmmsg |
| 422 | PTR sys_getdents | 422 | PTR sys_getdents64 |
| 423 | PTR sys_fanotify_init /* 6300 */ | ||
| 424 | PTR sys_fanotify_mark | ||
| 425 | PTR sys_prlimit64 | ||
| 423 | .size sysn32_call_table,.-sysn32_call_table | 426 | .size sysn32_call_table,.-sysn32_call_table |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 813689ef2384..171979fc98e5 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
| @@ -538,5 +538,8 @@ sys_call_table: | |||
| 538 | PTR compat_sys_rt_tgsigqueueinfo | 538 | PTR compat_sys_rt_tgsigqueueinfo |
| 539 | PTR sys_perf_event_open | 539 | PTR sys_perf_event_open |
| 540 | PTR sys_accept4 | 540 | PTR sys_accept4 |
| 541 | PTR compat_sys_recvmmsg | 541 | PTR compat_sys_recvmmsg /* 4335 */ |
| 542 | PTR sys_fanotify_init | ||
| 543 | PTR sys_32_fanotify_mark | ||
| 544 | PTR sys_prlimit64 | ||
| 542 | .size sys_call_table,.-sys_call_table | 545 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index 7ba890860d98..469d4019f795 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c | |||
| @@ -44,27 +44,39 @@ static inline int cpu_is_noncoherent_r10000(struct device *dev) | |||
| 44 | 44 | ||
| 45 | static gfp_t massage_gfp_flags(const struct device *dev, gfp_t gfp) | 45 | static gfp_t massage_gfp_flags(const struct device *dev, gfp_t gfp) |
| 46 | { | 46 | { |
| 47 | gfp_t dma_flag; | ||
| 48 | |||
| 47 | /* ignore region specifiers */ | 49 | /* ignore region specifiers */ |
| 48 | gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM); | 50 | gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM); |
| 49 | 51 | ||
| 50 | #ifdef CONFIG_ZONE_DMA | 52 | #ifdef CONFIG_ISA |
| 51 | if (dev == NULL) | 53 | if (dev == NULL) |
| 52 | gfp |= __GFP_DMA; | 54 | dma_flag = __GFP_DMA; |
| 53 | else if (dev->coherent_dma_mask < DMA_BIT_MASK(24)) | ||
| 54 | gfp |= __GFP_DMA; | ||
| 55 | else | 55 | else |
| 56 | #endif | 56 | #endif |
| 57 | #ifdef CONFIG_ZONE_DMA32 | 57 | #if defined(CONFIG_ZONE_DMA32) && defined(CONFIG_ZONE_DMA) |
| 58 | if (dev->coherent_dma_mask < DMA_BIT_MASK(32)) | 58 | if (dev->coherent_dma_mask < DMA_BIT_MASK(32)) |
| 59 | gfp |= __GFP_DMA32; | 59 | dma_flag = __GFP_DMA; |
| 60 | else if (dev->coherent_dma_mask < DMA_BIT_MASK(64)) | ||
| 61 | dma_flag = __GFP_DMA32; | ||
| 62 | else | ||
| 63 | #endif | ||
| 64 | #if defined(CONFIG_ZONE_DMA32) && !defined(CONFIG_ZONE_DMA) | ||
| 65 | if (dev->coherent_dma_mask < DMA_BIT_MASK(64)) | ||
| 66 | dma_flag = __GFP_DMA32; | ||
| 67 | else | ||
| 68 | #endif | ||
| 69 | #if defined(CONFIG_ZONE_DMA) && !defined(CONFIG_ZONE_DMA32) | ||
| 70 | if (dev->coherent_dma_mask < DMA_BIT_MASK(64)) | ||
| 71 | dma_flag = __GFP_DMA; | ||
| 60 | else | 72 | else |
| 61 | #endif | 73 | #endif |
| 62 | ; | 74 | dma_flag = 0; |
| 63 | 75 | ||
| 64 | /* Don't invoke OOM killer */ | 76 | /* Don't invoke OOM killer */ |
| 65 | gfp |= __GFP_NORETRY; | 77 | gfp |= __GFP_NORETRY; |
| 66 | 78 | ||
| 67 | return gfp; | 79 | return gfp | dma_flag; |
| 68 | } | 80 | } |
| 69 | 81 | ||
| 70 | void *dma_alloc_noncoherent(struct device *dev, size_t size, | 82 | void *dma_alloc_noncoherent(struct device *dev, size_t size, |
diff --git a/arch/mips/mm/sc-rm7k.c b/arch/mips/mm/sc-rm7k.c index 1ef75cd80a0d..274af3be1442 100644 --- a/arch/mips/mm/sc-rm7k.c +++ b/arch/mips/mm/sc-rm7k.c | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | #define tc_lsize 32 | 30 | #define tc_lsize 32 |
| 31 | 31 | ||
| 32 | extern unsigned long icache_way_size, dcache_way_size; | 32 | extern unsigned long icache_way_size, dcache_way_size; |
| 33 | unsigned long tcache_size; | 33 | static unsigned long tcache_size; |
| 34 | 34 | ||
| 35 | #include <asm/r4kcache.h> | 35 | #include <asm/r4kcache.h> |
| 36 | 36 | ||
diff --git a/arch/mips/mti-malta/malta-int.c b/arch/mips/mti-malta/malta-int.c index 15949b0be811..b79b24afe3a2 100644 --- a/arch/mips/mti-malta/malta-int.c +++ b/arch/mips/mti-malta/malta-int.c | |||
| @@ -385,6 +385,8 @@ static int __initdata msc_nr_eicirqs = ARRAY_SIZE(msc_eicirqmap); | |||
| 385 | */ | 385 | */ |
| 386 | 386 | ||
| 387 | #define GIC_CPU_NMI GIC_MAP_TO_NMI_MSK | 387 | #define GIC_CPU_NMI GIC_MAP_TO_NMI_MSK |
| 388 | #define X GIC_UNUSED | ||
| 389 | |||
| 388 | static struct gic_intr_map gic_intr_map[GIC_NUM_INTRS] = { | 390 | static struct gic_intr_map gic_intr_map[GIC_NUM_INTRS] = { |
| 389 | { X, X, X, X, 0 }, | 391 | { X, X, X, X, 0 }, |
| 390 | { X, X, X, X, 0 }, | 392 | { X, X, X, X, 0 }, |
| @@ -404,6 +406,7 @@ static struct gic_intr_map gic_intr_map[GIC_NUM_INTRS] = { | |||
| 404 | { X, X, X, X, 0 }, | 406 | { X, X, X, X, 0 }, |
| 405 | /* The remainder of this table is initialised by fill_ipi_map */ | 407 | /* The remainder of this table is initialised by fill_ipi_map */ |
| 406 | }; | 408 | }; |
| 409 | #undef X | ||
| 407 | 410 | ||
| 408 | /* | 411 | /* |
| 409 | * GCMP needs to be detected before any SMP initialisation | 412 | * GCMP needs to be detected before any SMP initialisation |
diff --git a/arch/mips/pci/pci-rc32434.c b/arch/mips/pci/pci-rc32434.c index 71f7d27b0d4c..f31218e17d3c 100644 --- a/arch/mips/pci/pci-rc32434.c +++ b/arch/mips/pci/pci-rc32434.c | |||
| @@ -118,7 +118,7 @@ static int __init rc32434_pcibridge_init(void) | |||
| 118 | if (!((pcicvalue == PCIM_H_EA) || | 118 | if (!((pcicvalue == PCIM_H_EA) || |
| 119 | (pcicvalue == PCIM_H_IA_FIX) || | 119 | (pcicvalue == PCIM_H_IA_FIX) || |
| 120 | (pcicvalue == PCIM_H_IA_RR))) { | 120 | (pcicvalue == PCIM_H_IA_RR))) { |
| 121 | pr_err(KERN_ERR "PCI init error!!!\n"); | 121 | pr_err("PCI init error!!!\n"); |
| 122 | /* Not in Host Mode, return ERROR */ | 122 | /* Not in Host Mode, return ERROR */ |
| 123 | return -1; | 123 | return -1; |
| 124 | } | 124 | } |
diff --git a/arch/mips/pnx8550/common/reset.c b/arch/mips/pnx8550/common/reset.c index fadd8744a6bc..e7a12ff304b9 100644 --- a/arch/mips/pnx8550/common/reset.c +++ b/arch/mips/pnx8550/common/reset.c | |||
| @@ -22,29 +22,19 @@ | |||
| 22 | */ | 22 | */ |
| 23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
| 24 | 24 | ||
| 25 | #include <asm/processor.h> | ||
| 25 | #include <asm/reboot.h> | 26 | #include <asm/reboot.h> |
| 26 | #include <glb.h> | 27 | #include <glb.h> |
| 27 | 28 | ||
| 28 | void pnx8550_machine_restart(char *command) | 29 | void pnx8550_machine_restart(char *command) |
| 29 | { | 30 | { |
| 30 | char head[] = "************* Machine restart *************"; | ||
| 31 | char foot[] = "*******************************************"; | ||
| 32 | |||
| 33 | printk("\n\n"); | ||
| 34 | printk("%s\n", head); | ||
| 35 | if (command != NULL) | ||
| 36 | printk("* %s\n", command); | ||
| 37 | printk("%s\n", foot); | ||
| 38 | |||
| 39 | PNX8550_RST_CTL = PNX8550_RST_DO_SW_RST; | 31 | PNX8550_RST_CTL = PNX8550_RST_DO_SW_RST; |
| 40 | } | 32 | } |
| 41 | 33 | ||
| 42 | void pnx8550_machine_halt(void) | 34 | void pnx8550_machine_halt(void) |
| 43 | { | 35 | { |
| 44 | printk("*** Machine halt. (Not implemented) ***\n"); | 36 | while (1) { |
| 45 | } | 37 | if (cpu_wait) |
| 46 | 38 | cpu_wait(); | |
| 47 | void pnx8550_machine_power_off(void) | 39 | } |
| 48 | { | ||
| 49 | printk("*** Machine power off. (Not implemented) ***\n"); | ||
| 50 | } | 40 | } |
diff --git a/arch/mips/pnx8550/common/setup.c b/arch/mips/pnx8550/common/setup.c index 64246c9c875c..43cb3945fdbf 100644 --- a/arch/mips/pnx8550/common/setup.c +++ b/arch/mips/pnx8550/common/setup.c | |||
| @@ -44,7 +44,6 @@ | |||
| 44 | extern void __init board_setup(void); | 44 | extern void __init board_setup(void); |
| 45 | extern void pnx8550_machine_restart(char *); | 45 | extern void pnx8550_machine_restart(char *); |
| 46 | extern void pnx8550_machine_halt(void); | 46 | extern void pnx8550_machine_halt(void); |
| 47 | extern void pnx8550_machine_power_off(void); | ||
| 48 | extern struct resource ioport_resource; | 47 | extern struct resource ioport_resource; |
| 49 | extern struct resource iomem_resource; | 48 | extern struct resource iomem_resource; |
| 50 | extern char *prom_getcmdline(void); | 49 | extern char *prom_getcmdline(void); |
| @@ -100,7 +99,7 @@ void __init plat_mem_setup(void) | |||
| 100 | 99 | ||
| 101 | _machine_restart = pnx8550_machine_restart; | 100 | _machine_restart = pnx8550_machine_restart; |
| 102 | _machine_halt = pnx8550_machine_halt; | 101 | _machine_halt = pnx8550_machine_halt; |
| 103 | pm_power_off = pnx8550_machine_power_off; | 102 | pm_power_off = pnx8550_machine_halt; |
| 104 | 103 | ||
| 105 | /* Clear the Global 2 Register, PCI Inta Output Enable Registers | 104 | /* Clear the Global 2 Register, PCI Inta Output Enable Registers |
| 106 | Bit 1:Enable DAC Powerdown | 105 | Bit 1:Enable DAC Powerdown |
diff --git a/arch/mn10300/kernel/module.c b/arch/mn10300/kernel/module.c index 6aea7fd76993..196a111e2e29 100644 --- a/arch/mn10300/kernel/module.c +++ b/arch/mn10300/kernel/module.c | |||
| @@ -206,7 +206,7 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
| 206 | const Elf_Shdr *sechdrs, | 206 | const Elf_Shdr *sechdrs, |
| 207 | struct module *me) | 207 | struct module *me) |
| 208 | { | 208 | { |
| 209 | return module_bug_finalize(hdr, sechdrs, me); | 209 | return 0; |
| 210 | } | 210 | } |
| 211 | 211 | ||
| 212 | /* | 212 | /* |
| @@ -214,5 +214,4 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
| 214 | */ | 214 | */ |
| 215 | void module_arch_cleanup(struct module *mod) | 215 | void module_arch_cleanup(struct module *mod) |
| 216 | { | 216 | { |
| 217 | module_bug_cleanup(mod); | ||
| 218 | } | 217 | } |
diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c index 159a2b81e90c..6e81bb596e5b 100644 --- a/arch/parisc/kernel/module.c +++ b/arch/parisc/kernel/module.c | |||
| @@ -941,11 +941,10 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
| 941 | nsyms = newptr - (Elf_Sym *)symhdr->sh_addr; | 941 | nsyms = newptr - (Elf_Sym *)symhdr->sh_addr; |
| 942 | DEBUGP("NEW num_symtab %lu\n", nsyms); | 942 | DEBUGP("NEW num_symtab %lu\n", nsyms); |
| 943 | symhdr->sh_size = nsyms * sizeof(Elf_Sym); | 943 | symhdr->sh_size = nsyms * sizeof(Elf_Sym); |
| 944 | return module_bug_finalize(hdr, sechdrs, me); | 944 | return 0; |
| 945 | } | 945 | } |
| 946 | 946 | ||
| 947 | void module_arch_cleanup(struct module *mod) | 947 | void module_arch_cleanup(struct module *mod) |
| 948 | { | 948 | { |
| 949 | deregister_unwind_table(mod); | 949 | deregister_unwind_table(mod); |
| 950 | module_bug_cleanup(mod); | ||
| 951 | } | 950 | } |
diff --git a/arch/powerpc/kernel/module.c b/arch/powerpc/kernel/module.c index 477c663e0140..49cee9df225b 100644 --- a/arch/powerpc/kernel/module.c +++ b/arch/powerpc/kernel/module.c | |||
| @@ -63,11 +63,6 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
| 63 | const Elf_Shdr *sechdrs, struct module *me) | 63 | const Elf_Shdr *sechdrs, struct module *me) |
| 64 | { | 64 | { |
| 65 | const Elf_Shdr *sect; | 65 | const Elf_Shdr *sect; |
| 66 | int err; | ||
| 67 | |||
| 68 | err = module_bug_finalize(hdr, sechdrs, me); | ||
| 69 | if (err) | ||
| 70 | return err; | ||
| 71 | 66 | ||
| 72 | /* Apply feature fixups */ | 67 | /* Apply feature fixups */ |
| 73 | sect = find_section(hdr, sechdrs, "__ftr_fixup"); | 68 | sect = find_section(hdr, sechdrs, "__ftr_fixup"); |
| @@ -101,5 +96,4 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
| 101 | 96 | ||
| 102 | void module_arch_cleanup(struct module *mod) | 97 | void module_arch_cleanup(struct module *mod) |
| 103 | { | 98 | { |
| 104 | module_bug_cleanup(mod); | ||
| 105 | } | 99 | } |
diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c index 22cfd634c355..f7167ee4604c 100644 --- a/arch/s390/kernel/module.c +++ b/arch/s390/kernel/module.c | |||
| @@ -407,10 +407,9 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
| 407 | { | 407 | { |
| 408 | vfree(me->arch.syminfo); | 408 | vfree(me->arch.syminfo); |
| 409 | me->arch.syminfo = NULL; | 409 | me->arch.syminfo = NULL; |
| 410 | return module_bug_finalize(hdr, sechdrs, me); | 410 | return 0; |
| 411 | } | 411 | } |
| 412 | 412 | ||
| 413 | void module_arch_cleanup(struct module *mod) | 413 | void module_arch_cleanup(struct module *mod) |
| 414 | { | 414 | { |
| 415 | module_bug_cleanup(mod); | ||
| 416 | } | 415 | } |
diff --git a/arch/sh/kernel/module.c b/arch/sh/kernel/module.c index 43adddfe4c04..ae0be697a89e 100644 --- a/arch/sh/kernel/module.c +++ b/arch/sh/kernel/module.c | |||
| @@ -149,13 +149,11 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
| 149 | int ret = 0; | 149 | int ret = 0; |
| 150 | 150 | ||
| 151 | ret |= module_dwarf_finalize(hdr, sechdrs, me); | 151 | ret |= module_dwarf_finalize(hdr, sechdrs, me); |
| 152 | ret |= module_bug_finalize(hdr, sechdrs, me); | ||
| 153 | 152 | ||
| 154 | return ret; | 153 | return ret; |
| 155 | } | 154 | } |
| 156 | 155 | ||
| 157 | void module_arch_cleanup(struct module *mod) | 156 | void module_arch_cleanup(struct module *mod) |
| 158 | { | 157 | { |
| 159 | module_bug_cleanup(mod); | ||
| 160 | module_dwarf_cleanup(mod); | 158 | module_dwarf_cleanup(mod); |
| 161 | } | 159 | } |
diff --git a/arch/x86/kernel/cpu/perf_event_p4.c b/arch/x86/kernel/cpu/perf_event_p4.c index b560db3305be..249015173992 100644 --- a/arch/x86/kernel/cpu/perf_event_p4.c +++ b/arch/x86/kernel/cpu/perf_event_p4.c | |||
| @@ -660,8 +660,12 @@ static int p4_pmu_handle_irq(struct pt_regs *regs) | |||
| 660 | for (idx = 0; idx < x86_pmu.num_counters; idx++) { | 660 | for (idx = 0; idx < x86_pmu.num_counters; idx++) { |
| 661 | int overflow; | 661 | int overflow; |
| 662 | 662 | ||
| 663 | if (!test_bit(idx, cpuc->active_mask)) | 663 | if (!test_bit(idx, cpuc->active_mask)) { |
| 664 | /* catch in-flight IRQs */ | ||
| 665 | if (__test_and_clear_bit(idx, cpuc->running)) | ||
| 666 | handled++; | ||
| 664 | continue; | 667 | continue; |
| 668 | } | ||
| 665 | 669 | ||
| 666 | event = cpuc->events[idx]; | 670 | event = cpuc->events[idx]; |
| 667 | hwc = &event->hw; | 671 | hwc = &event->hw; |
diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c index e0bc186d7501..1c355c550960 100644 --- a/arch/x86/kernel/module.c +++ b/arch/x86/kernel/module.c | |||
| @@ -239,11 +239,10 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
| 239 | apply_paravirt(pseg, pseg + para->sh_size); | 239 | apply_paravirt(pseg, pseg + para->sh_size); |
| 240 | } | 240 | } |
| 241 | 241 | ||
| 242 | return module_bug_finalize(hdr, sechdrs, me); | 242 | return 0; |
| 243 | } | 243 | } |
| 244 | 244 | ||
| 245 | void module_arch_cleanup(struct module *mod) | 245 | void module_arch_cleanup(struct module *mod) |
| 246 | { | 246 | { |
| 247 | alternatives_smp_module_del(mod); | 247 | alternatives_smp_module_del(mod); |
| 248 | module_bug_cleanup(mod); | ||
| 249 | } | 248 | } |
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index 009b819f48d0..f1575c9a2572 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c | |||
| @@ -674,6 +674,7 @@ static int __init ppro_init(char **cpu_type) | |||
| 674 | case 0x0f: | 674 | case 0x0f: |
| 675 | case 0x16: | 675 | case 0x16: |
| 676 | case 0x17: | 676 | case 0x17: |
| 677 | case 0x1d: | ||
| 677 | *cpu_type = "i386/core_2"; | 678 | *cpu_type = "i386/core_2"; |
| 678 | break; | 679 | break; |
| 679 | case 0x1a: | 680 | case 0x1a: |
diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c index 1a5353a753fc..b2bb5aa3b054 100644 --- a/arch/x86/xen/time.c +++ b/arch/x86/xen/time.c | |||
| @@ -489,8 +489,9 @@ static void xen_hvm_setup_cpu_clockevents(void) | |||
| 489 | __init void xen_hvm_init_time_ops(void) | 489 | __init void xen_hvm_init_time_ops(void) |
| 490 | { | 490 | { |
| 491 | /* vector callback is needed otherwise we cannot receive interrupts | 491 | /* vector callback is needed otherwise we cannot receive interrupts |
| 492 | * on cpu > 0 */ | 492 | * on cpu > 0 and at this point we don't know how many cpus are |
| 493 | if (!xen_have_vector_callback && num_present_cpus() > 1) | 493 | * available */ |
| 494 | if (!xen_have_vector_callback) | ||
| 494 | return; | 495 | return; |
| 495 | if (!xen_feature(XENFEAT_hvm_safe_pvclock)) { | 496 | if (!xen_feature(XENFEAT_hvm_safe_pvclock)) { |
| 496 | printk(KERN_INFO "Xen doesn't support pvclock on HVM," | 497 | printk(KERN_INFO "Xen doesn't support pvclock on HVM," |
diff --git a/block/elevator.c b/block/elevator.c index 205b09a5bd9e..4e11559aa2b0 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
| @@ -938,6 +938,7 @@ int elv_register_queue(struct request_queue *q) | |||
| 938 | } | 938 | } |
| 939 | } | 939 | } |
| 940 | kobject_uevent(&e->kobj, KOBJ_ADD); | 940 | kobject_uevent(&e->kobj, KOBJ_ADD); |
| 941 | e->registered = 1; | ||
| 941 | } | 942 | } |
| 942 | return error; | 943 | return error; |
| 943 | } | 944 | } |
| @@ -947,6 +948,7 @@ static void __elv_unregister_queue(struct elevator_queue *e) | |||
| 947 | { | 948 | { |
| 948 | kobject_uevent(&e->kobj, KOBJ_REMOVE); | 949 | kobject_uevent(&e->kobj, KOBJ_REMOVE); |
| 949 | kobject_del(&e->kobj); | 950 | kobject_del(&e->kobj); |
| 951 | e->registered = 0; | ||
| 950 | } | 952 | } |
| 951 | 953 | ||
| 952 | void elv_unregister_queue(struct request_queue *q) | 954 | void elv_unregister_queue(struct request_queue *q) |
| @@ -1042,11 +1044,13 @@ static int elevator_switch(struct request_queue *q, struct elevator_type *new_e) | |||
| 1042 | 1044 | ||
| 1043 | spin_unlock_irq(q->queue_lock); | 1045 | spin_unlock_irq(q->queue_lock); |
| 1044 | 1046 | ||
| 1045 | __elv_unregister_queue(old_elevator); | 1047 | if (old_elevator->registered) { |
| 1048 | __elv_unregister_queue(old_elevator); | ||
| 1046 | 1049 | ||
| 1047 | err = elv_register_queue(q); | 1050 | err = elv_register_queue(q); |
| 1048 | if (err) | 1051 | if (err) |
| 1049 | goto fail_register; | 1052 | goto fail_register; |
| 1053 | } | ||
| 1050 | 1054 | ||
| 1051 | /* | 1055 | /* |
| 1052 | * finally exit old elevator and turn off BYPASS. | 1056 | * finally exit old elevator and turn off BYPASS. |
diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c index f7619600270a..af308d03f492 100644 --- a/drivers/acpi/blacklist.c +++ b/drivers/acpi/blacklist.c | |||
| @@ -204,6 +204,23 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
| 204 | }, | 204 | }, |
| 205 | }, | 205 | }, |
| 206 | { | 206 | { |
| 207 | /* | ||
| 208 | * There have a NVIF method in MSI GX723 DSDT need call by Nvidia | ||
| 209 | * driver (e.g. nouveau) when user press brightness hotkey. | ||
| 210 | * Currently, nouveau driver didn't do the job and it causes there | ||
| 211 | * have a infinite while loop in DSDT when user press hotkey. | ||
| 212 | * We add MSI GX723's dmi information to this table for workaround | ||
| 213 | * this issue. | ||
| 214 | * Will remove MSI GX723 from the table after nouveau grows support. | ||
| 215 | */ | ||
| 216 | .callback = dmi_disable_osi_vista, | ||
| 217 | .ident = "MSI GX723", | ||
| 218 | .matches = { | ||
| 219 | DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"), | ||
| 220 | DMI_MATCH(DMI_PRODUCT_NAME, "GX723"), | ||
| 221 | }, | ||
| 222 | }, | ||
| 223 | { | ||
| 207 | .callback = dmi_disable_osi_vista, | 224 | .callback = dmi_disable_osi_vista, |
| 208 | .ident = "Sony VGN-NS10J_S", | 225 | .ident = "Sony VGN-NS10J_S", |
| 209 | .matches = { | 226 | .matches = { |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index b618f888d66b..bec561c14beb 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
| @@ -346,4 +346,5 @@ void __init acpi_early_processor_set_pdc(void) | |||
| 346 | acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, | 346 | acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, |
| 347 | ACPI_UINT32_MAX, | 347 | ACPI_UINT32_MAX, |
| 348 | early_init_pdc, NULL, NULL, NULL); | 348 | early_init_pdc, NULL, NULL, NULL); |
| 349 | acpi_get_devices("ACPI0007", early_init_pdc, NULL, NULL); | ||
| 349 | } | 350 | } |
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 2aafafca2b13..1101e251a629 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
| @@ -202,6 +202,7 @@ static int virtblk_get_id(struct gendisk *disk, char *id_str) | |||
| 202 | struct virtio_blk *vblk = disk->private_data; | 202 | struct virtio_blk *vblk = disk->private_data; |
| 203 | struct request *req; | 203 | struct request *req; |
| 204 | struct bio *bio; | 204 | struct bio *bio; |
| 205 | int err; | ||
| 205 | 206 | ||
| 206 | bio = bio_map_kern(vblk->disk->queue, id_str, VIRTIO_BLK_ID_BYTES, | 207 | bio = bio_map_kern(vblk->disk->queue, id_str, VIRTIO_BLK_ID_BYTES, |
| 207 | GFP_KERNEL); | 208 | GFP_KERNEL); |
| @@ -215,7 +216,10 @@ static int virtblk_get_id(struct gendisk *disk, char *id_str) | |||
| 215 | } | 216 | } |
| 216 | 217 | ||
| 217 | req->cmd_type = REQ_TYPE_SPECIAL; | 218 | req->cmd_type = REQ_TYPE_SPECIAL; |
| 218 | return blk_execute_rq(vblk->disk->queue, vblk->disk, req, false); | 219 | err = blk_execute_rq(vblk->disk->queue, vblk->disk, req, false); |
| 220 | blk_put_request(req); | ||
| 221 | |||
| 222 | return err; | ||
| 219 | } | 223 | } |
| 220 | 224 | ||
| 221 | static int virtblk_locked_ioctl(struct block_device *bdev, fmode_t mode, | 225 | static int virtblk_locked_ioctl(struct block_device *bdev, fmode_t mode, |
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index c74e4e8006d4..2dd2c93ebfa3 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
| @@ -2231,6 +2231,9 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) | |||
| 2231 | dev_priv->mchdev_lock = &mchdev_lock; | 2231 | dev_priv->mchdev_lock = &mchdev_lock; |
| 2232 | spin_unlock(&mchdev_lock); | 2232 | spin_unlock(&mchdev_lock); |
| 2233 | 2233 | ||
| 2234 | /* XXX Prevent module unload due to memory corruption bugs. */ | ||
| 2235 | __module_get(THIS_MODULE); | ||
| 2236 | |||
| 2234 | return 0; | 2237 | return 0; |
| 2235 | 2238 | ||
| 2236 | out_workqueue_free: | 2239 | out_workqueue_free: |
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c index 56ad9df2ccb5..b61966c126d3 100644 --- a/drivers/gpu/drm/i915/intel_fb.c +++ b/drivers/gpu/drm/i915/intel_fb.c | |||
| @@ -238,8 +238,8 @@ int intel_fbdev_destroy(struct drm_device *dev, | |||
| 238 | 238 | ||
| 239 | drm_framebuffer_cleanup(&ifb->base); | 239 | drm_framebuffer_cleanup(&ifb->base); |
| 240 | if (ifb->obj) { | 240 | if (ifb->obj) { |
| 241 | drm_gem_object_handle_unreference(ifb->obj); | ||
| 242 | drm_gem_object_unreference(ifb->obj); | 241 | drm_gem_object_unreference(ifb->obj); |
| 242 | ifb->obj = NULL; | ||
| 243 | } | 243 | } |
| 244 | 244 | ||
| 245 | return 0; | 245 | return 0; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index d2047713dc59..dbd30b2e43fd 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c | |||
| @@ -352,7 +352,6 @@ nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *nfbdev) | |||
| 352 | 352 | ||
| 353 | if (nouveau_fb->nvbo) { | 353 | if (nouveau_fb->nvbo) { |
| 354 | nouveau_bo_unmap(nouveau_fb->nvbo); | 354 | nouveau_bo_unmap(nouveau_fb->nvbo); |
| 355 | drm_gem_object_handle_unreference_unlocked(nouveau_fb->nvbo->gem); | ||
| 356 | drm_gem_object_unreference_unlocked(nouveau_fb->nvbo->gem); | 355 | drm_gem_object_unreference_unlocked(nouveau_fb->nvbo->gem); |
| 357 | nouveau_fb->nvbo = NULL; | 356 | nouveau_fb->nvbo = NULL; |
| 358 | } | 357 | } |
diff --git a/drivers/gpu/drm/nouveau/nouveau_notifier.c b/drivers/gpu/drm/nouveau/nouveau_notifier.c index 3c9964a8fbad..3ec181ff50ce 100644 --- a/drivers/gpu/drm/nouveau/nouveau_notifier.c +++ b/drivers/gpu/drm/nouveau/nouveau_notifier.c | |||
| @@ -79,7 +79,6 @@ nouveau_notifier_takedown_channel(struct nouveau_channel *chan) | |||
| 79 | mutex_lock(&dev->struct_mutex); | 79 | mutex_lock(&dev->struct_mutex); |
| 80 | nouveau_bo_unpin(chan->notifier_bo); | 80 | nouveau_bo_unpin(chan->notifier_bo); |
| 81 | mutex_unlock(&dev->struct_mutex); | 81 | mutex_unlock(&dev->struct_mutex); |
| 82 | drm_gem_object_handle_unreference_unlocked(chan->notifier_bo->gem); | ||
| 83 | drm_gem_object_unreference_unlocked(chan->notifier_bo->gem); | 82 | drm_gem_object_unreference_unlocked(chan->notifier_bo->gem); |
| 84 | drm_mm_takedown(&chan->notifier_heap); | 83 | drm_mm_takedown(&chan->notifier_heap); |
| 85 | } | 84 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c index 9cdf6a35bc2c..40b0c087b592 100644 --- a/drivers/gpu/drm/radeon/radeon_fb.c +++ b/drivers/gpu/drm/radeon/radeon_fb.c | |||
| @@ -97,7 +97,6 @@ static void radeonfb_destroy_pinned_object(struct drm_gem_object *gobj) | |||
| 97 | radeon_bo_unpin(rbo); | 97 | radeon_bo_unpin(rbo); |
| 98 | radeon_bo_unreserve(rbo); | 98 | radeon_bo_unreserve(rbo); |
| 99 | } | 99 | } |
| 100 | drm_gem_object_handle_unreference(gobj); | ||
| 101 | drm_gem_object_unreference_unlocked(gobj); | 100 | drm_gem_object_unreference_unlocked(gobj); |
| 102 | } | 101 | } |
| 103 | 102 | ||
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index cb4cf7ef4d1e..db809e034cc4 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c | |||
| @@ -442,6 +442,43 @@ out_err: | |||
| 442 | } | 442 | } |
| 443 | 443 | ||
| 444 | /** | 444 | /** |
| 445 | * Call bo::reserved and with the lru lock held. | ||
| 446 | * Will release GPU memory type usage on destruction. | ||
| 447 | * This is the place to put in driver specific hooks. | ||
| 448 | * Will release the bo::reserved lock and the | ||
| 449 | * lru lock on exit. | ||
| 450 | */ | ||
| 451 | |||
| 452 | static void ttm_bo_cleanup_memtype_use(struct ttm_buffer_object *bo) | ||
| 453 | { | ||
| 454 | struct ttm_bo_global *glob = bo->glob; | ||
| 455 | |||
| 456 | if (bo->ttm) { | ||
| 457 | |||
| 458 | /** | ||
| 459 | * Release the lru_lock, since we don't want to have | ||
| 460 | * an atomic requirement on ttm_tt[unbind|destroy]. | ||
| 461 | */ | ||
| 462 | |||
| 463 | spin_unlock(&glob->lru_lock); | ||
| 464 | ttm_tt_unbind(bo->ttm); | ||
| 465 | ttm_tt_destroy(bo->ttm); | ||
| 466 | bo->ttm = NULL; | ||
| 467 | spin_lock(&glob->lru_lock); | ||
| 468 | } | ||
| 469 | |||
| 470 | if (bo->mem.mm_node) { | ||
| 471 | drm_mm_put_block(bo->mem.mm_node); | ||
| 472 | bo->mem.mm_node = NULL; | ||
| 473 | } | ||
| 474 | |||
| 475 | atomic_set(&bo->reserved, 0); | ||
| 476 | wake_up_all(&bo->event_queue); | ||
| 477 | spin_unlock(&glob->lru_lock); | ||
| 478 | } | ||
| 479 | |||
| 480 | |||
| 481 | /** | ||
| 445 | * If bo idle, remove from delayed- and lru lists, and unref. | 482 | * If bo idle, remove from delayed- and lru lists, and unref. |
| 446 | * If not idle, and already on delayed list, do nothing. | 483 | * If not idle, and already on delayed list, do nothing. |
| 447 | * If not idle, and not on delayed list, put on delayed list, | 484 | * If not idle, and not on delayed list, put on delayed list, |
| @@ -456,6 +493,7 @@ static int ttm_bo_cleanup_refs(struct ttm_buffer_object *bo, bool remove_all) | |||
| 456 | int ret; | 493 | int ret; |
| 457 | 494 | ||
| 458 | spin_lock(&bo->lock); | 495 | spin_lock(&bo->lock); |
| 496 | retry: | ||
| 459 | (void) ttm_bo_wait(bo, false, false, !remove_all); | 497 | (void) ttm_bo_wait(bo, false, false, !remove_all); |
| 460 | 498 | ||
| 461 | if (!bo->sync_obj) { | 499 | if (!bo->sync_obj) { |
| @@ -464,31 +502,52 @@ static int ttm_bo_cleanup_refs(struct ttm_buffer_object *bo, bool remove_all) | |||
| 464 | spin_unlock(&bo->lock); | 502 | spin_unlock(&bo->lock); |
| 465 | 503 | ||
| 466 | spin_lock(&glob->lru_lock); | 504 | spin_lock(&glob->lru_lock); |
| 467 | put_count = ttm_bo_del_from_lru(bo); | 505 | ret = ttm_bo_reserve_locked(bo, false, !remove_all, false, 0); |
| 506 | |||
| 507 | /** | ||
| 508 | * Someone else has the object reserved. Bail and retry. | ||
| 509 | */ | ||
| 468 | 510 | ||
| 469 | ret = ttm_bo_reserve_locked(bo, false, false, false, 0); | 511 | if (unlikely(ret == -EBUSY)) { |
| 470 | BUG_ON(ret); | 512 | spin_unlock(&glob->lru_lock); |
| 471 | if (bo->ttm) | 513 | spin_lock(&bo->lock); |
| 472 | ttm_tt_unbind(bo->ttm); | 514 | goto requeue; |
| 515 | } | ||
| 516 | |||
| 517 | /** | ||
| 518 | * We can re-check for sync object without taking | ||
| 519 | * the bo::lock since setting the sync object requires | ||
| 520 | * also bo::reserved. A busy object at this point may | ||
| 521 | * be caused by another thread starting an accelerated | ||
| 522 | * eviction. | ||
| 523 | */ | ||
| 524 | |||
| 525 | if (unlikely(bo->sync_obj)) { | ||
| 526 | atomic_set(&bo->reserved, 0); | ||
| 527 | wake_up_all(&bo->event_queue); | ||
| 528 | spin_unlock(&glob->lru_lock); | ||
| 529 | spin_lock(&bo->lock); | ||
| 530 | if (remove_all) | ||
| 531 | goto retry; | ||
| 532 | else | ||
| 533 | goto requeue; | ||
| 534 | } | ||
| 535 | |||
| 536 | put_count = ttm_bo_del_from_lru(bo); | ||
| 473 | 537 | ||
| 474 | if (!list_empty(&bo->ddestroy)) { | 538 | if (!list_empty(&bo->ddestroy)) { |
| 475 | list_del_init(&bo->ddestroy); | 539 | list_del_init(&bo->ddestroy); |
| 476 | ++put_count; | 540 | ++put_count; |
| 477 | } | 541 | } |
| 478 | if (bo->mem.mm_node) { | ||
| 479 | drm_mm_put_block(bo->mem.mm_node); | ||
| 480 | bo->mem.mm_node = NULL; | ||
| 481 | } | ||
| 482 | spin_unlock(&glob->lru_lock); | ||
| 483 | 542 | ||
| 484 | atomic_set(&bo->reserved, 0); | 543 | ttm_bo_cleanup_memtype_use(bo); |
| 485 | 544 | ||
| 486 | while (put_count--) | 545 | while (put_count--) |
| 487 | kref_put(&bo->list_kref, ttm_bo_ref_bug); | 546 | kref_put(&bo->list_kref, ttm_bo_ref_bug); |
| 488 | 547 | ||
| 489 | return 0; | 548 | return 0; |
| 490 | } | 549 | } |
| 491 | 550 | requeue: | |
| 492 | spin_lock(&glob->lru_lock); | 551 | spin_lock(&glob->lru_lock); |
| 493 | if (list_empty(&bo->ddestroy)) { | 552 | if (list_empty(&bo->ddestroy)) { |
| 494 | void *sync_obj = bo->sync_obj; | 553 | void *sync_obj = bo->sync_obj; |
diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c index f7bd2613cecc..f2de3be35df3 100644 --- a/drivers/i2c/busses/i2c-cpm.c +++ b/drivers/i2c/busses/i2c-cpm.c | |||
| @@ -677,6 +677,11 @@ static int __devinit cpm_i2c_probe(struct platform_device *ofdev, | |||
| 677 | dev_dbg(&ofdev->dev, "hw routines for %s registered.\n", | 677 | dev_dbg(&ofdev->dev, "hw routines for %s registered.\n", |
| 678 | cpm->adap.name); | 678 | cpm->adap.name); |
| 679 | 679 | ||
| 680 | /* | ||
| 681 | * register OF I2C devices | ||
| 682 | */ | ||
| 683 | of_i2c_register_devices(&cpm->adap); | ||
| 684 | |||
| 680 | return 0; | 685 | return 0; |
| 681 | out_shut: | 686 | out_shut: |
| 682 | cpm_i2c_shutdown(cpm); | 687 | cpm_i2c_shutdown(cpm); |
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c index 43ca32fddde2..89eedf45d30e 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c | |||
| @@ -761,6 +761,9 @@ static int __devinit iic_probe(struct platform_device *ofdev, | |||
| 761 | dev_info(&ofdev->dev, "using %s mode\n", | 761 | dev_info(&ofdev->dev, "using %s mode\n", |
| 762 | dev->fast_mode ? "fast (400 kHz)" : "standard (100 kHz)"); | 762 | dev->fast_mode ? "fast (400 kHz)" : "standard (100 kHz)"); |
| 763 | 763 | ||
| 764 | /* Now register all the child nodes */ | ||
| 765 | of_i2c_register_devices(adap); | ||
| 766 | |||
| 764 | return 0; | 767 | return 0; |
| 765 | 768 | ||
| 766 | error_cleanup: | 769 | error_cleanup: |
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c index a1c419a716af..b74e6dc6886c 100644 --- a/drivers/i2c/busses/i2c-mpc.c +++ b/drivers/i2c/busses/i2c-mpc.c | |||
| @@ -632,6 +632,7 @@ static int __devinit fsl_i2c_probe(struct platform_device *op, | |||
| 632 | dev_err(i2c->dev, "failed to add adapter\n"); | 632 | dev_err(i2c->dev, "failed to add adapter\n"); |
| 633 | goto fail_add; | 633 | goto fail_add; |
| 634 | } | 634 | } |
| 635 | of_i2c_register_devices(&i2c->adap); | ||
| 635 | 636 | ||
| 636 | return result; | 637 | return result; |
| 637 | 638 | ||
diff --git a/drivers/i2c/busses/i2c-pca-isa.c b/drivers/i2c/busses/i2c-pca-isa.c index bbd77603a417..29933f87d8fa 100644 --- a/drivers/i2c/busses/i2c-pca-isa.c +++ b/drivers/i2c/busses/i2c-pca-isa.c | |||
| @@ -71,8 +71,8 @@ static int pca_isa_readbyte(void *pd, int reg) | |||
| 71 | 71 | ||
| 72 | static int pca_isa_waitforcompletion(void *pd) | 72 | static int pca_isa_waitforcompletion(void *pd) |
| 73 | { | 73 | { |
| 74 | long ret = ~0; | ||
| 75 | unsigned long timeout; | 74 | unsigned long timeout; |
| 75 | long ret; | ||
| 76 | 76 | ||
| 77 | if (irq > -1) { | 77 | if (irq > -1) { |
| 78 | ret = wait_event_timeout(pca_wait, | 78 | ret = wait_event_timeout(pca_wait, |
| @@ -81,11 +81,15 @@ static int pca_isa_waitforcompletion(void *pd) | |||
| 81 | } else { | 81 | } else { |
| 82 | /* Do polling */ | 82 | /* Do polling */ |
| 83 | timeout = jiffies + pca_isa_ops.timeout; | 83 | timeout = jiffies + pca_isa_ops.timeout; |
| 84 | while (((pca_isa_readbyte(pd, I2C_PCA_CON) | 84 | do { |
| 85 | & I2C_PCA_CON_SI) == 0) | 85 | ret = time_before(jiffies, timeout); |
| 86 | && (ret = time_before(jiffies, timeout))) | 86 | if (pca_isa_readbyte(pd, I2C_PCA_CON) |
| 87 | & I2C_PCA_CON_SI) | ||
| 88 | break; | ||
| 87 | udelay(100); | 89 | udelay(100); |
| 90 | } while (ret); | ||
| 88 | } | 91 | } |
| 92 | |||
| 89 | return ret > 0; | 93 | return ret > 0; |
| 90 | } | 94 | } |
| 91 | 95 | ||
diff --git a/drivers/i2c/busses/i2c-pca-platform.c b/drivers/i2c/busses/i2c-pca-platform.c index ef5c78487eb7..5f6d7f89e225 100644 --- a/drivers/i2c/busses/i2c-pca-platform.c +++ b/drivers/i2c/busses/i2c-pca-platform.c | |||
| @@ -80,8 +80,8 @@ static void i2c_pca_pf_writebyte32(void *pd, int reg, int val) | |||
| 80 | static int i2c_pca_pf_waitforcompletion(void *pd) | 80 | static int i2c_pca_pf_waitforcompletion(void *pd) |
| 81 | { | 81 | { |
| 82 | struct i2c_pca_pf_data *i2c = pd; | 82 | struct i2c_pca_pf_data *i2c = pd; |
| 83 | long ret = ~0; | ||
| 84 | unsigned long timeout; | 83 | unsigned long timeout; |
| 84 | long ret; | ||
| 85 | 85 | ||
| 86 | if (i2c->irq) { | 86 | if (i2c->irq) { |
| 87 | ret = wait_event_timeout(i2c->wait, | 87 | ret = wait_event_timeout(i2c->wait, |
| @@ -90,10 +90,13 @@ static int i2c_pca_pf_waitforcompletion(void *pd) | |||
| 90 | } else { | 90 | } else { |
| 91 | /* Do polling */ | 91 | /* Do polling */ |
| 92 | timeout = jiffies + i2c->adap.timeout; | 92 | timeout = jiffies + i2c->adap.timeout; |
| 93 | while (((i2c->algo_data.read_byte(i2c, I2C_PCA_CON) | 93 | do { |
| 94 | & I2C_PCA_CON_SI) == 0) | 94 | ret = time_before(jiffies, timeout); |
| 95 | && (ret = time_before(jiffies, timeout))) | 95 | if (i2c->algo_data.read_byte(i2c, I2C_PCA_CON) |
| 96 | & I2C_PCA_CON_SI) | ||
| 97 | break; | ||
| 96 | udelay(100); | 98 | udelay(100); |
| 99 | } while (ret); | ||
| 97 | } | 100 | } |
| 98 | 101 | ||
| 99 | return ret > 0; | 102 | return ret > 0; |
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 6649176de940..bea4c5021d26 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
| @@ -32,7 +32,6 @@ | |||
| 32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
| 33 | #include <linux/idr.h> | 33 | #include <linux/idr.h> |
| 34 | #include <linux/mutex.h> | 34 | #include <linux/mutex.h> |
| 35 | #include <linux/of_i2c.h> | ||
| 36 | #include <linux/of_device.h> | 35 | #include <linux/of_device.h> |
| 37 | #include <linux/completion.h> | 36 | #include <linux/completion.h> |
| 38 | #include <linux/hardirq.h> | 37 | #include <linux/hardirq.h> |
| @@ -197,11 +196,12 @@ static int i2c_device_pm_suspend(struct device *dev) | |||
| 197 | { | 196 | { |
| 198 | const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; | 197 | const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; |
| 199 | 198 | ||
| 200 | if (pm_runtime_suspended(dev)) | 199 | if (pm) { |
| 201 | return 0; | 200 | if (pm_runtime_suspended(dev)) |
| 202 | 201 | return 0; | |
| 203 | if (pm) | 202 | else |
| 204 | return pm->suspend ? pm->suspend(dev) : 0; | 203 | return pm->suspend ? pm->suspend(dev) : 0; |
| 204 | } | ||
| 205 | 205 | ||
| 206 | return i2c_legacy_suspend(dev, PMSG_SUSPEND); | 206 | return i2c_legacy_suspend(dev, PMSG_SUSPEND); |
| 207 | } | 207 | } |
| @@ -216,12 +216,6 @@ static int i2c_device_pm_resume(struct device *dev) | |||
| 216 | else | 216 | else |
| 217 | ret = i2c_legacy_resume(dev); | 217 | ret = i2c_legacy_resume(dev); |
| 218 | 218 | ||
| 219 | if (!ret) { | ||
| 220 | pm_runtime_disable(dev); | ||
| 221 | pm_runtime_set_active(dev); | ||
| 222 | pm_runtime_enable(dev); | ||
| 223 | } | ||
| 224 | |||
| 225 | return ret; | 219 | return ret; |
| 226 | } | 220 | } |
| 227 | 221 | ||
| @@ -229,11 +223,12 @@ static int i2c_device_pm_freeze(struct device *dev) | |||
| 229 | { | 223 | { |
| 230 | const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; | 224 | const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; |
| 231 | 225 | ||
| 232 | if (pm_runtime_suspended(dev)) | 226 | if (pm) { |
| 233 | return 0; | 227 | if (pm_runtime_suspended(dev)) |
| 234 | 228 | return 0; | |
| 235 | if (pm) | 229 | else |
| 236 | return pm->freeze ? pm->freeze(dev) : 0; | 230 | return pm->freeze ? pm->freeze(dev) : 0; |
| 231 | } | ||
| 237 | 232 | ||
| 238 | return i2c_legacy_suspend(dev, PMSG_FREEZE); | 233 | return i2c_legacy_suspend(dev, PMSG_FREEZE); |
| 239 | } | 234 | } |
| @@ -242,11 +237,12 @@ static int i2c_device_pm_thaw(struct device *dev) | |||
| 242 | { | 237 | { |
| 243 | const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; | 238 | const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; |
| 244 | 239 | ||
| 245 | if (pm_runtime_suspended(dev)) | 240 | if (pm) { |
| 246 | return 0; | 241 | if (pm_runtime_suspended(dev)) |
| 247 | 242 | return 0; | |
| 248 | if (pm) | 243 | else |
| 249 | return pm->thaw ? pm->thaw(dev) : 0; | 244 | return pm->thaw ? pm->thaw(dev) : 0; |
| 245 | } | ||
| 250 | 246 | ||
| 251 | return i2c_legacy_resume(dev); | 247 | return i2c_legacy_resume(dev); |
| 252 | } | 248 | } |
| @@ -255,11 +251,12 @@ static int i2c_device_pm_poweroff(struct device *dev) | |||
| 255 | { | 251 | { |
| 256 | const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; | 252 | const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; |
| 257 | 253 | ||
| 258 | if (pm_runtime_suspended(dev)) | 254 | if (pm) { |
| 259 | return 0; | 255 | if (pm_runtime_suspended(dev)) |
| 260 | 256 | return 0; | |
| 261 | if (pm) | 257 | else |
| 262 | return pm->poweroff ? pm->poweroff(dev) : 0; | 258 | return pm->poweroff ? pm->poweroff(dev) : 0; |
| 259 | } | ||
| 263 | 260 | ||
| 264 | return i2c_legacy_suspend(dev, PMSG_HIBERNATE); | 261 | return i2c_legacy_suspend(dev, PMSG_HIBERNATE); |
| 265 | } | 262 | } |
| @@ -876,9 +873,6 @@ static int i2c_register_adapter(struct i2c_adapter *adap) | |||
| 876 | if (adap->nr < __i2c_first_dynamic_bus_num) | 873 | if (adap->nr < __i2c_first_dynamic_bus_num) |
| 877 | i2c_scan_static_board_info(adap); | 874 | i2c_scan_static_board_info(adap); |
| 878 | 875 | ||
| 879 | /* Register devices from the device tree */ | ||
| 880 | of_i2c_register_devices(adap); | ||
| 881 | |||
| 882 | /* Notify drivers */ | 876 | /* Notify drivers */ |
| 883 | mutex_lock(&core_lock); | 877 | mutex_lock(&core_lock); |
| 884 | bus_for_each_drv(&i2c_bus_type, NULL, adap, __process_new_adapter); | 878 | bus_for_each_drv(&i2c_bus_type, NULL, adap, __process_new_adapter); |
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index d85bd8a7967d..22239e988498 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c | |||
| @@ -483,6 +483,9 @@ static int joydev_handle_JSIOCSAXMAP(struct joydev *joydev, | |||
| 483 | 483 | ||
| 484 | memcpy(joydev->abspam, abspam, len); | 484 | memcpy(joydev->abspam, abspam, len); |
| 485 | 485 | ||
| 486 | for (i = 0; i < joydev->nabs; i++) | ||
| 487 | joydev->absmap[joydev->abspam[i]] = i; | ||
| 488 | |||
| 486 | out: | 489 | out: |
| 487 | kfree(abspam); | 490 | kfree(abspam); |
| 488 | return retval; | 491 | return retval; |
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index 0d4266a533a5..360698553eb5 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c | |||
| @@ -404,6 +404,13 @@ static int uinput_setup_device(struct uinput_device *udev, const char __user *bu | |||
| 404 | retval = uinput_validate_absbits(dev); | 404 | retval = uinput_validate_absbits(dev); |
| 405 | if (retval < 0) | 405 | if (retval < 0) |
| 406 | goto exit; | 406 | goto exit; |
| 407 | if (test_bit(ABS_MT_SLOT, dev->absbit)) { | ||
| 408 | int nslot = input_abs_get_max(dev, ABS_MT_SLOT) + 1; | ||
| 409 | input_mt_create_slots(dev, nslot); | ||
| 410 | input_set_events_per_packet(dev, 6 * nslot); | ||
| 411 | } else if (test_bit(ABS_MT_POSITION_X, dev->absbit)) { | ||
| 412 | input_set_events_per_packet(dev, 60); | ||
| 413 | } | ||
| 407 | } | 414 | } |
| 408 | 415 | ||
| 409 | udev->state = UIST_SETUP_COMPLETE; | 416 | udev->state = UIST_SETUP_COMPLETE; |
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 42ba3691d908..b35876ee6908 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c | |||
| @@ -103,27 +103,26 @@ static void wacom_sys_irq(struct urb *urb) | |||
| 103 | static int wacom_open(struct input_dev *dev) | 103 | static int wacom_open(struct input_dev *dev) |
| 104 | { | 104 | { |
| 105 | struct wacom *wacom = input_get_drvdata(dev); | 105 | struct wacom *wacom = input_get_drvdata(dev); |
| 106 | int retval = 0; | ||
| 106 | 107 | ||
| 107 | mutex_lock(&wacom->lock); | 108 | if (usb_autopm_get_interface(wacom->intf) < 0) |
| 108 | |||
| 109 | wacom->irq->dev = wacom->usbdev; | ||
| 110 | |||
| 111 | if (usb_autopm_get_interface(wacom->intf) < 0) { | ||
| 112 | mutex_unlock(&wacom->lock); | ||
| 113 | return -EIO; | 109 | return -EIO; |
| 114 | } | 110 | |
| 111 | mutex_lock(&wacom->lock); | ||
| 115 | 112 | ||
| 116 | if (usb_submit_urb(wacom->irq, GFP_KERNEL)) { | 113 | if (usb_submit_urb(wacom->irq, GFP_KERNEL)) { |
| 117 | usb_autopm_put_interface(wacom->intf); | 114 | retval = -EIO; |
| 118 | mutex_unlock(&wacom->lock); | 115 | goto out; |
| 119 | return -EIO; | ||
| 120 | } | 116 | } |
| 121 | 117 | ||
| 122 | wacom->open = true; | 118 | wacom->open = true; |
| 123 | wacom->intf->needs_remote_wakeup = 1; | 119 | wacom->intf->needs_remote_wakeup = 1; |
| 124 | 120 | ||
| 121 | out: | ||
| 125 | mutex_unlock(&wacom->lock); | 122 | mutex_unlock(&wacom->lock); |
| 126 | return 0; | 123 | if (retval) |
| 124 | usb_autopm_put_interface(wacom->intf); | ||
| 125 | return retval; | ||
| 127 | } | 126 | } |
| 128 | 127 | ||
| 129 | static void wacom_close(struct input_dev *dev) | 128 | static void wacom_close(struct input_dev *dev) |
| @@ -135,6 +134,8 @@ static void wacom_close(struct input_dev *dev) | |||
| 135 | wacom->open = false; | 134 | wacom->open = false; |
| 136 | wacom->intf->needs_remote_wakeup = 0; | 135 | wacom->intf->needs_remote_wakeup = 0; |
| 137 | mutex_unlock(&wacom->lock); | 136 | mutex_unlock(&wacom->lock); |
| 137 | |||
| 138 | usb_autopm_put_interface(wacom->intf); | ||
| 138 | } | 139 | } |
| 139 | 140 | ||
| 140 | static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hid_desc, | 141 | static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hid_desc, |
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index ed4900ade93a..e4fb58db5454 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
| @@ -1000,10 +1000,11 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start) | |||
| 1000 | page = bitmap->sb_page; | 1000 | page = bitmap->sb_page; |
| 1001 | offset = sizeof(bitmap_super_t); | 1001 | offset = sizeof(bitmap_super_t); |
| 1002 | if (!file) | 1002 | if (!file) |
| 1003 | read_sb_page(bitmap->mddev, | 1003 | page = read_sb_page( |
| 1004 | bitmap->mddev->bitmap_info.offset, | 1004 | bitmap->mddev, |
| 1005 | page, | 1005 | bitmap->mddev->bitmap_info.offset, |
| 1006 | index, count); | 1006 | page, |
| 1007 | index, count); | ||
| 1007 | } else if (file) { | 1008 | } else if (file) { |
| 1008 | page = read_page(file, index, bitmap, count); | 1009 | page = read_page(file, index, bitmap, count); |
| 1009 | offset = 0; | 1010 | offset = 0; |
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index ad83a4dcadc3..0b830bbe1d8b 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
| @@ -1839,7 +1839,9 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i | |||
| 1839 | 1839 | ||
| 1840 | /* take from bio_init */ | 1840 | /* take from bio_init */ |
| 1841 | bio->bi_next = NULL; | 1841 | bio->bi_next = NULL; |
| 1842 | bio->bi_flags &= ~(BIO_POOL_MASK-1); | ||
| 1842 | bio->bi_flags |= 1 << BIO_UPTODATE; | 1843 | bio->bi_flags |= 1 << BIO_UPTODATE; |
| 1844 | bio->bi_comp_cpu = -1; | ||
| 1843 | bio->bi_rw = READ; | 1845 | bio->bi_rw = READ; |
| 1844 | bio->bi_vcnt = 0; | 1846 | bio->bi_vcnt = 0; |
| 1845 | bio->bi_idx = 0; | 1847 | bio->bi_idx = 0; |
| @@ -1912,7 +1914,7 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i | |||
| 1912 | !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) | 1914 | !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) |
| 1913 | break; | 1915 | break; |
| 1914 | BUG_ON(sync_blocks < (PAGE_SIZE>>9)); | 1916 | BUG_ON(sync_blocks < (PAGE_SIZE>>9)); |
| 1915 | if (len > (sync_blocks<<9)) | 1917 | if ((len >> 9) > sync_blocks) |
| 1916 | len = sync_blocks<<9; | 1918 | len = sync_blocks<<9; |
| 1917 | } | 1919 | } |
| 1918 | 1920 | ||
diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c index 7e82a9df726b..7961d59f5cac 100644 --- a/drivers/media/IR/ir-keytable.c +++ b/drivers/media/IR/ir-keytable.c | |||
| @@ -319,7 +319,7 @@ static void ir_timer_keyup(unsigned long cookie) | |||
| 319 | * a keyup event might follow immediately after the keydown. | 319 | * a keyup event might follow immediately after the keydown. |
| 320 | */ | 320 | */ |
| 321 | spin_lock_irqsave(&ir->keylock, flags); | 321 | spin_lock_irqsave(&ir->keylock, flags); |
| 322 | if (time_is_after_eq_jiffies(ir->keyup_jiffies)) | 322 | if (time_is_before_eq_jiffies(ir->keyup_jiffies)) |
| 323 | ir_keyup(ir); | 323 | ir_keyup(ir); |
| 324 | spin_unlock_irqrestore(&ir->keylock, flags); | 324 | spin_unlock_irqrestore(&ir->keylock, flags); |
| 325 | } | 325 | } |
| @@ -510,6 +510,13 @@ int __ir_input_register(struct input_dev *input_dev, | |||
| 510 | (ir_dev->props && ir_dev->props->driver_type == RC_DRIVER_IR_RAW) ? | 510 | (ir_dev->props && ir_dev->props->driver_type == RC_DRIVER_IR_RAW) ? |
| 511 | " in raw mode" : ""); | 511 | " in raw mode" : ""); |
| 512 | 512 | ||
| 513 | /* | ||
| 514 | * Default delay of 250ms is too short for some protocols, expecially | ||
| 515 | * since the timeout is currently set to 250ms. Increase it to 500ms, | ||
| 516 | * to avoid wrong repetition of the keycodes. | ||
| 517 | */ | ||
| 518 | input_dev->rep[REP_DELAY] = 500; | ||
| 519 | |||
| 513 | return 0; | 520 | return 0; |
| 514 | 521 | ||
| 515 | out_event: | 522 | out_event: |
diff --git a/drivers/media/IR/ir-lirc-codec.c b/drivers/media/IR/ir-lirc-codec.c index 77b5946413c0..e63f757d5d72 100644 --- a/drivers/media/IR/ir-lirc-codec.c +++ b/drivers/media/IR/ir-lirc-codec.c | |||
| @@ -267,7 +267,7 @@ static int ir_lirc_register(struct input_dev *input_dev) | |||
| 267 | features |= LIRC_CAN_SET_SEND_CARRIER; | 267 | features |= LIRC_CAN_SET_SEND_CARRIER; |
| 268 | 268 | ||
| 269 | if (ir_dev->props->s_tx_duty_cycle) | 269 | if (ir_dev->props->s_tx_duty_cycle) |
| 270 | features |= LIRC_CAN_SET_REC_DUTY_CYCLE; | 270 | features |= LIRC_CAN_SET_SEND_DUTY_CYCLE; |
| 271 | } | 271 | } |
| 272 | 272 | ||
| 273 | if (ir_dev->props->s_rx_carrier_range) | 273 | if (ir_dev->props->s_rx_carrier_range) |
diff --git a/drivers/media/IR/ir-raw-event.c b/drivers/media/IR/ir-raw-event.c index 43094e7eccfa..8e0e1b1f8c87 100644 --- a/drivers/media/IR/ir-raw-event.c +++ b/drivers/media/IR/ir-raw-event.c | |||
| @@ -279,9 +279,11 @@ int ir_raw_event_register(struct input_dev *input_dev) | |||
| 279 | "rc%u", (unsigned int)ir->devno); | 279 | "rc%u", (unsigned int)ir->devno); |
| 280 | 280 | ||
| 281 | if (IS_ERR(ir->raw->thread)) { | 281 | if (IS_ERR(ir->raw->thread)) { |
| 282 | int ret = PTR_ERR(ir->raw->thread); | ||
| 283 | |||
| 282 | kfree(ir->raw); | 284 | kfree(ir->raw); |
| 283 | ir->raw = NULL; | 285 | ir->raw = NULL; |
| 284 | return PTR_ERR(ir->raw->thread); | 286 | return ret; |
| 285 | } | 287 | } |
| 286 | 288 | ||
| 287 | mutex_lock(&ir_raw_handler_lock); | 289 | mutex_lock(&ir_raw_handler_lock); |
diff --git a/drivers/media/IR/ir-sysfs.c b/drivers/media/IR/ir-sysfs.c index 96dafc425c8e..46d42467f9b4 100644 --- a/drivers/media/IR/ir-sysfs.c +++ b/drivers/media/IR/ir-sysfs.c | |||
| @@ -67,13 +67,14 @@ static ssize_t show_protocols(struct device *d, | |||
| 67 | char *tmp = buf; | 67 | char *tmp = buf; |
| 68 | int i; | 68 | int i; |
| 69 | 69 | ||
| 70 | if (ir_dev->props->driver_type == RC_DRIVER_SCANCODE) { | 70 | if (ir_dev->props && ir_dev->props->driver_type == RC_DRIVER_SCANCODE) { |
| 71 | enabled = ir_dev->rc_tab.ir_type; | 71 | enabled = ir_dev->rc_tab.ir_type; |
| 72 | allowed = ir_dev->props->allowed_protos; | 72 | allowed = ir_dev->props->allowed_protos; |
| 73 | } else { | 73 | } else if (ir_dev->raw) { |
| 74 | enabled = ir_dev->raw->enabled_protocols; | 74 | enabled = ir_dev->raw->enabled_protocols; |
| 75 | allowed = ir_raw_get_allowed_protocols(); | 75 | allowed = ir_raw_get_allowed_protocols(); |
| 76 | } | 76 | } else |
| 77 | return sprintf(tmp, "[builtin]\n"); | ||
| 77 | 78 | ||
| 78 | IR_dprintk(1, "allowed - 0x%llx, enabled - 0x%llx\n", | 79 | IR_dprintk(1, "allowed - 0x%llx, enabled - 0x%llx\n", |
| 79 | (long long)allowed, | 80 | (long long)allowed, |
| @@ -121,10 +122,14 @@ static ssize_t store_protocols(struct device *d, | |||
| 121 | int rc, i, count = 0; | 122 | int rc, i, count = 0; |
| 122 | unsigned long flags; | 123 | unsigned long flags; |
| 123 | 124 | ||
| 124 | if (ir_dev->props->driver_type == RC_DRIVER_SCANCODE) | 125 | if (ir_dev->props && ir_dev->props->driver_type == RC_DRIVER_SCANCODE) |
| 125 | type = ir_dev->rc_tab.ir_type; | 126 | type = ir_dev->rc_tab.ir_type; |
| 126 | else | 127 | else if (ir_dev->raw) |
| 127 | type = ir_dev->raw->enabled_protocols; | 128 | type = ir_dev->raw->enabled_protocols; |
| 129 | else { | ||
| 130 | IR_dprintk(1, "Protocol switching not supported\n"); | ||
| 131 | return -EINVAL; | ||
| 132 | } | ||
| 128 | 133 | ||
| 129 | while ((tmp = strsep((char **) &data, " \n")) != NULL) { | 134 | while ((tmp = strsep((char **) &data, " \n")) != NULL) { |
| 130 | if (!*tmp) | 135 | if (!*tmp) |
| @@ -185,7 +190,7 @@ static ssize_t store_protocols(struct device *d, | |||
| 185 | } | 190 | } |
| 186 | } | 191 | } |
| 187 | 192 | ||
| 188 | if (ir_dev->props->driver_type == RC_DRIVER_SCANCODE) { | 193 | if (ir_dev->props && ir_dev->props->driver_type == RC_DRIVER_SCANCODE) { |
| 189 | spin_lock_irqsave(&ir_dev->rc_tab.lock, flags); | 194 | spin_lock_irqsave(&ir_dev->rc_tab.lock, flags); |
| 190 | ir_dev->rc_tab.ir_type = type; | 195 | ir_dev->rc_tab.ir_type = type; |
| 191 | spin_unlock_irqrestore(&ir_dev->rc_tab.lock, flags); | 196 | spin_unlock_irqrestore(&ir_dev->rc_tab.lock, flags); |
diff --git a/drivers/media/IR/keymaps/rc-rc6-mce.c b/drivers/media/IR/keymaps/rc-rc6-mce.c index 64264f7f838f..39557ad401b6 100644 --- a/drivers/media/IR/keymaps/rc-rc6-mce.c +++ b/drivers/media/IR/keymaps/rc-rc6-mce.c | |||
| @@ -19,6 +19,7 @@ static struct ir_scancode rc6_mce[] = { | |||
| 19 | 19 | ||
| 20 | { 0x800f0416, KEY_PLAY }, | 20 | { 0x800f0416, KEY_PLAY }, |
| 21 | { 0x800f0418, KEY_PAUSE }, | 21 | { 0x800f0418, KEY_PAUSE }, |
| 22 | { 0x800f046e, KEY_PLAYPAUSE }, | ||
| 22 | { 0x800f0419, KEY_STOP }, | 23 | { 0x800f0419, KEY_STOP }, |
| 23 | { 0x800f0417, KEY_RECORD }, | 24 | { 0x800f0417, KEY_RECORD }, |
| 24 | 25 | ||
| @@ -37,6 +38,8 @@ static struct ir_scancode rc6_mce[] = { | |||
| 37 | { 0x800f0411, KEY_VOLUMEDOWN }, | 38 | { 0x800f0411, KEY_VOLUMEDOWN }, |
| 38 | { 0x800f0412, KEY_CHANNELUP }, | 39 | { 0x800f0412, KEY_CHANNELUP }, |
| 39 | { 0x800f0413, KEY_CHANNELDOWN }, | 40 | { 0x800f0413, KEY_CHANNELDOWN }, |
| 41 | { 0x800f043a, KEY_BRIGHTNESSUP }, | ||
| 42 | { 0x800f0480, KEY_BRIGHTNESSDOWN }, | ||
| 40 | 43 | ||
| 41 | { 0x800f0401, KEY_NUMERIC_1 }, | 44 | { 0x800f0401, KEY_NUMERIC_1 }, |
| 42 | { 0x800f0402, KEY_NUMERIC_2 }, | 45 | { 0x800f0402, KEY_NUMERIC_2 }, |
diff --git a/drivers/media/IR/mceusb.c b/drivers/media/IR/mceusb.c index ac6bb2c01a48..bc620e10ef77 100644 --- a/drivers/media/IR/mceusb.c +++ b/drivers/media/IR/mceusb.c | |||
| @@ -120,6 +120,10 @@ static struct usb_device_id mceusb_dev_table[] = { | |||
| 120 | { USB_DEVICE(VENDOR_PHILIPS, 0x0613) }, | 120 | { USB_DEVICE(VENDOR_PHILIPS, 0x0613) }, |
| 121 | /* Philips eHome Infrared Transceiver */ | 121 | /* Philips eHome Infrared Transceiver */ |
| 122 | { USB_DEVICE(VENDOR_PHILIPS, 0x0815) }, | 122 | { USB_DEVICE(VENDOR_PHILIPS, 0x0815) }, |
| 123 | /* Philips/Spinel plus IR transceiver for ASUS */ | ||
| 124 | { USB_DEVICE(VENDOR_PHILIPS, 0x206c) }, | ||
| 125 | /* Philips/Spinel plus IR transceiver for ASUS */ | ||
| 126 | { USB_DEVICE(VENDOR_PHILIPS, 0x2088) }, | ||
| 123 | /* Realtek MCE IR Receiver */ | 127 | /* Realtek MCE IR Receiver */ |
| 124 | { USB_DEVICE(VENDOR_REALTEK, 0x0161) }, | 128 | { USB_DEVICE(VENDOR_REALTEK, 0x0161) }, |
| 125 | /* SMK/Toshiba G83C0004D410 */ | 129 | /* SMK/Toshiba G83C0004D410 */ |
diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c index fe818348b8a3..48397f103d32 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_core.c +++ b/drivers/media/dvb/dvb-usb/dib0700_core.c | |||
| @@ -673,9 +673,6 @@ static int dib0700_probe(struct usb_interface *intf, | |||
| 673 | else | 673 | else |
| 674 | dev->props.rc.core.bulk_mode = false; | 674 | dev->props.rc.core.bulk_mode = false; |
| 675 | 675 | ||
| 676 | /* Need a higher delay, to avoid wrong repeat */ | ||
| 677 | dev->rc_input_dev->rep[REP_DELAY] = 500; | ||
| 678 | |||
| 679 | dib0700_rc_setup(dev); | 676 | dib0700_rc_setup(dev); |
| 680 | 677 | ||
| 681 | return 0; | 678 | return 0; |
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c index f634d2e784b2..e06acd1fecb6 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c | |||
| @@ -940,6 +940,58 @@ static int stk7070p_frontend_attach(struct dvb_usb_adapter *adap) | |||
| 940 | return adap->fe == NULL ? -ENODEV : 0; | 940 | return adap->fe == NULL ? -ENODEV : 0; |
| 941 | } | 941 | } |
| 942 | 942 | ||
| 943 | /* STK7770P */ | ||
| 944 | static struct dib7000p_config dib7770p_dib7000p_config = { | ||
| 945 | .output_mpeg2_in_188_bytes = 1, | ||
| 946 | |||
| 947 | .agc_config_count = 1, | ||
| 948 | .agc = &dib7070_agc_config, | ||
| 949 | .bw = &dib7070_bw_config_12_mhz, | ||
| 950 | .tuner_is_baseband = 1, | ||
| 951 | .spur_protect = 1, | ||
| 952 | |||
| 953 | .gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS, | ||
| 954 | .gpio_val = DIB7000P_GPIO_DEFAULT_VALUES, | ||
| 955 | .gpio_pwm_pos = DIB7000P_GPIO_DEFAULT_PWM_POS, | ||
| 956 | |||
| 957 | .hostbus_diversity = 1, | ||
| 958 | .enable_current_mirror = 1, | ||
| 959 | .disable_sample_and_hold = 0, | ||
| 960 | }; | ||
| 961 | |||
| 962 | static int stk7770p_frontend_attach(struct dvb_usb_adapter *adap) | ||
| 963 | { | ||
| 964 | struct usb_device_descriptor *p = &adap->dev->udev->descriptor; | ||
| 965 | if (p->idVendor == cpu_to_le16(USB_VID_PINNACLE) && | ||
| 966 | p->idProduct == cpu_to_le16(USB_PID_PINNACLE_PCTV72E)) | ||
| 967 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); | ||
| 968 | else | ||
| 969 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); | ||
| 970 | msleep(10); | ||
| 971 | dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); | ||
| 972 | dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); | ||
| 973 | dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); | ||
| 974 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); | ||
| 975 | |||
| 976 | dib0700_ctrl_clock(adap->dev, 72, 1); | ||
| 977 | |||
| 978 | msleep(10); | ||
| 979 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); | ||
| 980 | msleep(10); | ||
| 981 | dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); | ||
| 982 | |||
| 983 | if (dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 1, 18, | ||
| 984 | &dib7770p_dib7000p_config) != 0) { | ||
| 985 | err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n", | ||
| 986 | __func__); | ||
| 987 | return -ENODEV; | ||
| 988 | } | ||
| 989 | |||
| 990 | adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, | ||
| 991 | &dib7770p_dib7000p_config); | ||
| 992 | return adap->fe == NULL ? -ENODEV : 0; | ||
| 993 | } | ||
| 994 | |||
| 943 | /* DIB807x generic */ | 995 | /* DIB807x generic */ |
| 944 | static struct dibx000_agc_config dib807x_agc_config[2] = { | 996 | static struct dibx000_agc_config dib807x_agc_config[2] = { |
| 945 | { | 997 | { |
| @@ -1781,7 +1833,7 @@ struct usb_device_id dib0700_usb_id_table[] = { | |||
| 1781 | /* 60 */{ USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_T_XXS_2) }, | 1833 | /* 60 */{ USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_T_XXS_2) }, |
| 1782 | { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_STK807XPVR) }, | 1834 | { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_STK807XPVR) }, |
| 1783 | { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_STK807XP) }, | 1835 | { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_STK807XP) }, |
| 1784 | { USB_DEVICE(USB_VID_PIXELVIEW, USB_PID_PIXELVIEW_SBTVD) }, | 1836 | { USB_DEVICE_VER(USB_VID_PIXELVIEW, USB_PID_PIXELVIEW_SBTVD, 0x000, 0x3f00) }, |
| 1785 | { USB_DEVICE(USB_VID_EVOLUTEPC, USB_PID_TVWAY_PLUS) }, | 1837 | { USB_DEVICE(USB_VID_EVOLUTEPC, USB_PID_TVWAY_PLUS) }, |
| 1786 | /* 65 */{ USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV73ESE) }, | 1838 | /* 65 */{ USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV73ESE) }, |
| 1787 | { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV282E) }, | 1839 | { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV282E) }, |
| @@ -2406,7 +2458,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
| 2406 | .pid_filter_count = 32, | 2458 | .pid_filter_count = 32, |
| 2407 | .pid_filter = stk70x0p_pid_filter, | 2459 | .pid_filter = stk70x0p_pid_filter, |
| 2408 | .pid_filter_ctrl = stk70x0p_pid_filter_ctrl, | 2460 | .pid_filter_ctrl = stk70x0p_pid_filter_ctrl, |
| 2409 | .frontend_attach = stk7070p_frontend_attach, | 2461 | .frontend_attach = stk7770p_frontend_attach, |
| 2410 | .tuner_attach = dib7770p_tuner_attach, | 2462 | .tuner_attach = dib7770p_tuner_attach, |
| 2411 | 2463 | ||
| 2412 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 2464 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
diff --git a/drivers/media/dvb/dvb-usb/opera1.c b/drivers/media/dvb/dvb-usb/opera1.c index 6b22ec64ab0c..f896337b4535 100644 --- a/drivers/media/dvb/dvb-usb/opera1.c +++ b/drivers/media/dvb/dvb-usb/opera1.c | |||
| @@ -483,9 +483,7 @@ static int opera1_xilinx_load_firmware(struct usb_device *dev, | |||
| 483 | } | 483 | } |
| 484 | } | 484 | } |
| 485 | kfree(p); | 485 | kfree(p); |
| 486 | if (fw) { | 486 | release_firmware(fw); |
| 487 | release_firmware(fw); | ||
| 488 | } | ||
| 489 | return ret; | 487 | return ret; |
| 490 | } | 488 | } |
| 491 | 489 | ||
diff --git a/drivers/media/dvb/frontends/dib7000p.c b/drivers/media/dvb/frontends/dib7000p.c index 2e28b973dfd3..3aed0d433921 100644 --- a/drivers/media/dvb/frontends/dib7000p.c +++ b/drivers/media/dvb/frontends/dib7000p.c | |||
| @@ -260,6 +260,9 @@ static void dib7000p_set_adc_state(struct dib7000p_state *state, enum dibx000_ad | |||
| 260 | 260 | ||
| 261 | // dprintk( "908: %x, 909: %x\n", reg_908, reg_909); | 261 | // dprintk( "908: %x, 909: %x\n", reg_908, reg_909); |
| 262 | 262 | ||
| 263 | reg_909 |= (state->cfg.disable_sample_and_hold & 1) << 4; | ||
| 264 | reg_908 |= (state->cfg.enable_current_mirror & 1) << 7; | ||
| 265 | |||
| 263 | dib7000p_write_word(state, 908, reg_908); | 266 | dib7000p_write_word(state, 908, reg_908); |
| 264 | dib7000p_write_word(state, 909, reg_909); | 267 | dib7000p_write_word(state, 909, reg_909); |
| 265 | } | 268 | } |
| @@ -778,7 +781,10 @@ static void dib7000p_set_channel(struct dib7000p_state *state, struct dvb_fronte | |||
| 778 | default: | 781 | default: |
| 779 | case GUARD_INTERVAL_1_32: value *= 1; break; | 782 | case GUARD_INTERVAL_1_32: value *= 1; break; |
| 780 | } | 783 | } |
| 781 | state->div_sync_wait = (value * 3) / 2 + 32; // add 50% SFN margin + compensate for one DVSY-fifo TODO | 784 | if (state->cfg.diversity_delay == 0) |
| 785 | state->div_sync_wait = (value * 3) / 2 + 48; // add 50% SFN margin + compensate for one DVSY-fifo | ||
| 786 | else | ||
| 787 | state->div_sync_wait = (value * 3) / 2 + state->cfg.diversity_delay; // add 50% SFN margin + compensate for one DVSY-fifo | ||
| 782 | 788 | ||
| 783 | /* deactive the possibility of diversity reception if extended interleaver */ | 789 | /* deactive the possibility of diversity reception if extended interleaver */ |
| 784 | state->div_force_off = !1 && ch->u.ofdm.transmission_mode != TRANSMISSION_MODE_8K; | 790 | state->div_force_off = !1 && ch->u.ofdm.transmission_mode != TRANSMISSION_MODE_8K; |
diff --git a/drivers/media/dvb/frontends/dib7000p.h b/drivers/media/dvb/frontends/dib7000p.h index 805dd13a97ee..da17345bf5bd 100644 --- a/drivers/media/dvb/frontends/dib7000p.h +++ b/drivers/media/dvb/frontends/dib7000p.h | |||
| @@ -33,6 +33,11 @@ struct dib7000p_config { | |||
| 33 | int (*agc_control) (struct dvb_frontend *, u8 before); | 33 | int (*agc_control) (struct dvb_frontend *, u8 before); |
| 34 | 34 | ||
| 35 | u8 output_mode; | 35 | u8 output_mode; |
| 36 | u8 disable_sample_and_hold : 1; | ||
| 37 | |||
| 38 | u8 enable_current_mirror : 1; | ||
| 39 | u8 diversity_delay; | ||
| 40 | |||
| 36 | }; | 41 | }; |
| 37 | 42 | ||
| 38 | #define DEFAULT_DIB7000P_I2C_ADDRESS 18 | 43 | #define DEFAULT_DIB7000P_I2C_ADDRESS 18 |
diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c index d93468cd3a85..ff3b0fa901b3 100644 --- a/drivers/media/dvb/siano/smscoreapi.c +++ b/drivers/media/dvb/siano/smscoreapi.c | |||
| @@ -1098,33 +1098,26 @@ EXPORT_SYMBOL_GPL(smscore_onresponse); | |||
| 1098 | * | 1098 | * |
| 1099 | * @return pointer to descriptor on success, NULL on error. | 1099 | * @return pointer to descriptor on success, NULL on error. |
| 1100 | */ | 1100 | */ |
| 1101 | struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev) | 1101 | |
| 1102 | struct smscore_buffer_t *get_entry(struct smscore_device_t *coredev) | ||
| 1102 | { | 1103 | { |
| 1103 | struct smscore_buffer_t *cb = NULL; | 1104 | struct smscore_buffer_t *cb = NULL; |
| 1104 | unsigned long flags; | 1105 | unsigned long flags; |
| 1105 | 1106 | ||
| 1106 | DEFINE_WAIT(wait); | ||
| 1107 | |||
| 1108 | spin_lock_irqsave(&coredev->bufferslock, flags); | 1107 | spin_lock_irqsave(&coredev->bufferslock, flags); |
| 1109 | 1108 | if (!list_empty(&coredev->buffers)) { | |
| 1110 | /* This function must return a valid buffer, since the buffer list is | 1109 | cb = (struct smscore_buffer_t *) coredev->buffers.next; |
| 1111 | * finite, we check that there is an available buffer, if not, we wait | 1110 | list_del(&cb->entry); |
| 1112 | * until such buffer become available. | ||
| 1113 | */ | ||
| 1114 | |||
| 1115 | prepare_to_wait(&coredev->buffer_mng_waitq, &wait, TASK_INTERRUPTIBLE); | ||
| 1116 | if (list_empty(&coredev->buffers)) { | ||
| 1117 | spin_unlock_irqrestore(&coredev->bufferslock, flags); | ||
| 1118 | schedule(); | ||
| 1119 | spin_lock_irqsave(&coredev->bufferslock, flags); | ||
| 1120 | } | 1111 | } |
| 1112 | spin_unlock_irqrestore(&coredev->bufferslock, flags); | ||
| 1113 | return cb; | ||
| 1114 | } | ||
| 1121 | 1115 | ||
| 1122 | finish_wait(&coredev->buffer_mng_waitq, &wait); | 1116 | struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev) |
| 1123 | 1117 | { | |
| 1124 | cb = (struct smscore_buffer_t *) coredev->buffers.next; | 1118 | struct smscore_buffer_t *cb = NULL; |
| 1125 | list_del(&cb->entry); | ||
| 1126 | 1119 | ||
| 1127 | spin_unlock_irqrestore(&coredev->bufferslock, flags); | 1120 | wait_event(coredev->buffer_mng_waitq, (cb = get_entry(coredev))); |
| 1128 | 1121 | ||
| 1129 | return cb; | 1122 | return cb; |
| 1130 | } | 1123 | } |
diff --git a/drivers/media/radio/si470x/radio-si470x-i2c.c b/drivers/media/radio/si470x/radio-si470x-i2c.c index 67a4ec8768a6..4ce541a5eb47 100644 --- a/drivers/media/radio/si470x/radio-si470x-i2c.c +++ b/drivers/media/radio/si470x/radio-si470x-i2c.c | |||
| @@ -395,7 +395,7 @@ static int __devinit si470x_i2c_probe(struct i2c_client *client, | |||
| 395 | radio->registers[POWERCFG] = POWERCFG_ENABLE; | 395 | radio->registers[POWERCFG] = POWERCFG_ENABLE; |
| 396 | if (si470x_set_register(radio, POWERCFG) < 0) { | 396 | if (si470x_set_register(radio, POWERCFG) < 0) { |
| 397 | retval = -EIO; | 397 | retval = -EIO; |
| 398 | goto err_all; | 398 | goto err_video; |
| 399 | } | 399 | } |
| 400 | msleep(110); | 400 | msleep(110); |
| 401 | 401 | ||
diff --git a/drivers/media/video/cx231xx/Makefile b/drivers/media/video/cx231xx/Makefile index 755dd0ce65ff..6f2b57384488 100644 --- a/drivers/media/video/cx231xx/Makefile +++ b/drivers/media/video/cx231xx/Makefile | |||
| @@ -11,4 +11,5 @@ EXTRA_CFLAGS += -Idrivers/media/video | |||
| 11 | EXTRA_CFLAGS += -Idrivers/media/common/tuners | 11 | EXTRA_CFLAGS += -Idrivers/media/common/tuners |
| 12 | EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core | 12 | EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core |
| 13 | EXTRA_CFLAGS += -Idrivers/media/dvb/frontends | 13 | EXTRA_CFLAGS += -Idrivers/media/dvb/frontends |
| 14 | EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-usb | ||
| 14 | 15 | ||
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c index 6bdc0ef18119..f2a4900014bc 100644 --- a/drivers/media/video/cx231xx/cx231xx-cards.c +++ b/drivers/media/video/cx231xx/cx231xx-cards.c | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | #include <media/v4l2-chip-ident.h> | 32 | #include <media/v4l2-chip-ident.h> |
| 33 | 33 | ||
| 34 | #include <media/cx25840.h> | 34 | #include <media/cx25840.h> |
| 35 | #include "dvb-usb-ids.h" | ||
| 35 | #include "xc5000.h" | 36 | #include "xc5000.h" |
| 36 | 37 | ||
| 37 | #include "cx231xx.h" | 38 | #include "cx231xx.h" |
| @@ -175,6 +176,8 @@ struct usb_device_id cx231xx_id_table[] = { | |||
| 175 | .driver_info = CX231XX_BOARD_CNXT_RDE_250}, | 176 | .driver_info = CX231XX_BOARD_CNXT_RDE_250}, |
| 176 | {USB_DEVICE(0x0572, 0x58A1), | 177 | {USB_DEVICE(0x0572, 0x58A1), |
| 177 | .driver_info = CX231XX_BOARD_CNXT_RDU_250}, | 178 | .driver_info = CX231XX_BOARD_CNXT_RDU_250}, |
| 179 | {USB_DEVICE_VER(USB_VID_PIXELVIEW, USB_PID_PIXELVIEW_SBTVD, 0x4000,0x4fff), | ||
| 180 | .driver_info = CX231XX_BOARD_UNKNOWN}, | ||
| 178 | {}, | 181 | {}, |
| 179 | }; | 182 | }; |
| 180 | 183 | ||
| @@ -226,14 +229,16 @@ void cx231xx_pre_card_setup(struct cx231xx *dev) | |||
| 226 | dev->board.name, dev->model); | 229 | dev->board.name, dev->model); |
| 227 | 230 | ||
| 228 | /* set the direction for GPIO pins */ | 231 | /* set the direction for GPIO pins */ |
| 229 | cx231xx_set_gpio_direction(dev, dev->board.tuner_gpio->bit, 1); | 232 | if (dev->board.tuner_gpio) { |
| 230 | cx231xx_set_gpio_value(dev, dev->board.tuner_gpio->bit, 1); | 233 | cx231xx_set_gpio_direction(dev, dev->board.tuner_gpio->bit, 1); |
| 231 | cx231xx_set_gpio_direction(dev, dev->board.tuner_sif_gpio, 1); | 234 | cx231xx_set_gpio_value(dev, dev->board.tuner_gpio->bit, 1); |
| 235 | cx231xx_set_gpio_direction(dev, dev->board.tuner_sif_gpio, 1); | ||
| 232 | 236 | ||
| 233 | /* request some modules if any required */ | 237 | /* request some modules if any required */ |
| 234 | 238 | ||
| 235 | /* reset the Tuner */ | 239 | /* reset the Tuner */ |
| 236 | cx231xx_gpio_set(dev, dev->board.tuner_gpio); | 240 | cx231xx_gpio_set(dev, dev->board.tuner_gpio); |
| 241 | } | ||
| 237 | 242 | ||
| 238 | /* set the mode to Analog mode initially */ | 243 | /* set the mode to Analog mode initially */ |
| 239 | cx231xx_set_mode(dev, CX231XX_ANALOG_MODE); | 244 | cx231xx_set_mode(dev, CX231XX_ANALOG_MODE); |
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index 86ca8c2359dd..f5a3e74c3c7c 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c | |||
| @@ -1996,7 +1996,7 @@ static int cx25840_probe(struct i2c_client *client, | |||
| 1996 | 1996 | ||
| 1997 | state->volume = v4l2_ctrl_new_std(&state->hdl, | 1997 | state->volume = v4l2_ctrl_new_std(&state->hdl, |
| 1998 | &cx25840_audio_ctrl_ops, V4L2_CID_AUDIO_VOLUME, | 1998 | &cx25840_audio_ctrl_ops, V4L2_CID_AUDIO_VOLUME, |
| 1999 | 0, 65335, 65535 / 100, default_volume); | 1999 | 0, 65535, 65535 / 100, default_volume); |
| 2000 | state->mute = v4l2_ctrl_new_std(&state->hdl, | 2000 | state->mute = v4l2_ctrl_new_std(&state->hdl, |
| 2001 | &cx25840_audio_ctrl_ops, V4L2_CID_AUDIO_MUTE, | 2001 | &cx25840_audio_ctrl_ops, V4L2_CID_AUDIO_MUTE, |
| 2002 | 0, 1, 1, 0); | 2002 | 0, 1, 1, 0); |
diff --git a/drivers/media/video/cx88/Kconfig b/drivers/media/video/cx88/Kconfig index 99dbae117591..0fa85cbefbb1 100644 --- a/drivers/media/video/cx88/Kconfig +++ b/drivers/media/video/cx88/Kconfig | |||
| @@ -17,7 +17,7 @@ config VIDEO_CX88 | |||
| 17 | 17 | ||
| 18 | config VIDEO_CX88_ALSA | 18 | config VIDEO_CX88_ALSA |
| 19 | tristate "Conexant 2388x DMA audio support" | 19 | tristate "Conexant 2388x DMA audio support" |
| 20 | depends on VIDEO_CX88 && SND && EXPERIMENTAL | 20 | depends on VIDEO_CX88 && SND |
| 21 | select SND_PCM | 21 | select SND_PCM |
| 22 | ---help--- | 22 | ---help--- |
| 23 | This is a video4linux driver for direct (DMA) audio on | 23 | This is a video4linux driver for direct (DMA) audio on |
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index b9846106913e..78abc1c1f9d5 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c | |||
| @@ -223,6 +223,7 @@ static int alloc_and_submit_int_urb(struct gspca_dev *gspca_dev, | |||
| 223 | usb_rcvintpipe(dev, ep->bEndpointAddress), | 223 | usb_rcvintpipe(dev, ep->bEndpointAddress), |
| 224 | buffer, buffer_len, | 224 | buffer, buffer_len, |
| 225 | int_irq, (void *)gspca_dev, interval); | 225 | int_irq, (void *)gspca_dev, interval); |
| 226 | urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; | ||
| 226 | gspca_dev->int_urb = urb; | 227 | gspca_dev->int_urb = urb; |
| 227 | ret = usb_submit_urb(urb, GFP_KERNEL); | 228 | ret = usb_submit_urb(urb, GFP_KERNEL); |
| 228 | if (ret < 0) { | 229 | if (ret < 0) { |
diff --git a/drivers/media/video/gspca/sn9c20x.c b/drivers/media/video/gspca/sn9c20x.c index 83a718f0f3f9..9052d5702556 100644 --- a/drivers/media/video/gspca/sn9c20x.c +++ b/drivers/media/video/gspca/sn9c20x.c | |||
| @@ -2357,8 +2357,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, | |||
| 2357 | (data[33] << 10); | 2357 | (data[33] << 10); |
| 2358 | avg_lum >>= 9; | 2358 | avg_lum >>= 9; |
| 2359 | atomic_set(&sd->avg_lum, avg_lum); | 2359 | atomic_set(&sd->avg_lum, avg_lum); |
| 2360 | gspca_frame_add(gspca_dev, LAST_PACKET, | 2360 | gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0); |
| 2361 | data, len); | ||
| 2362 | return; | 2361 | return; |
| 2363 | } | 2362 | } |
| 2364 | if (gspca_dev->last_packet_type == LAST_PACKET) { | 2363 | if (gspca_dev->last_packet_type == LAST_PACKET) { |
diff --git a/drivers/media/video/ivtv/ivtvfb.c b/drivers/media/video/ivtv/ivtvfb.c index be03a712731c..f0316d02f09f 100644 --- a/drivers/media/video/ivtv/ivtvfb.c +++ b/drivers/media/video/ivtv/ivtvfb.c | |||
| @@ -466,6 +466,8 @@ static int ivtvfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long ar | |||
| 466 | struct fb_vblank vblank; | 466 | struct fb_vblank vblank; |
| 467 | u32 trace; | 467 | u32 trace; |
| 468 | 468 | ||
| 469 | memset(&vblank, 0, sizeof(struct fb_vblank)); | ||
| 470 | |||
| 469 | vblank.flags = FB_VBLANK_HAVE_COUNT |FB_VBLANK_HAVE_VCOUNT | | 471 | vblank.flags = FB_VBLANK_HAVE_COUNT |FB_VBLANK_HAVE_VCOUNT | |
| 470 | FB_VBLANK_HAVE_VSYNC; | 472 | FB_VBLANK_HAVE_VSYNC; |
| 471 | trace = read_reg(IVTV_REG_DEC_LINE_FIELD) >> 16; | 473 | trace = read_reg(IVTV_REG_DEC_LINE_FIELD) >> 16; |
diff --git a/drivers/media/video/mem2mem_testdev.c b/drivers/media/video/mem2mem_testdev.c index 4525335f9bd4..a7210d981388 100644 --- a/drivers/media/video/mem2mem_testdev.c +++ b/drivers/media/video/mem2mem_testdev.c | |||
| @@ -239,7 +239,7 @@ static int device_process(struct m2mtest_ctx *ctx, | |||
| 239 | return -EFAULT; | 239 | return -EFAULT; |
| 240 | } | 240 | } |
| 241 | 241 | ||
| 242 | if (in_buf->vb.size < out_buf->vb.size) { | 242 | if (in_buf->vb.size > out_buf->vb.size) { |
| 243 | v4l2_err(&dev->v4l2_dev, "Output buffer is too small\n"); | 243 | v4l2_err(&dev->v4l2_dev, "Output buffer is too small\n"); |
| 244 | return -EINVAL; | 244 | return -EINVAL; |
| 245 | } | 245 | } |
| @@ -1014,6 +1014,7 @@ static int m2mtest_remove(struct platform_device *pdev) | |||
| 1014 | v4l2_m2m_release(dev->m2m_dev); | 1014 | v4l2_m2m_release(dev->m2m_dev); |
| 1015 | del_timer_sync(&dev->timer); | 1015 | del_timer_sync(&dev->timer); |
| 1016 | video_unregister_device(dev->vfd); | 1016 | video_unregister_device(dev->vfd); |
| 1017 | video_device_release(dev->vfd); | ||
| 1017 | v4l2_device_unregister(&dev->v4l2_dev); | 1018 | v4l2_device_unregister(&dev->v4l2_dev); |
| 1018 | kfree(dev); | 1019 | kfree(dev); |
| 1019 | 1020 | ||
diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c index 758a4db27d65..c71af4e0e517 100644 --- a/drivers/media/video/mt9m111.c +++ b/drivers/media/video/mt9m111.c | |||
| @@ -447,6 +447,9 @@ static int mt9m111_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) | |||
| 447 | dev_dbg(&client->dev, "%s left=%d, top=%d, width=%d, height=%d\n", | 447 | dev_dbg(&client->dev, "%s left=%d, top=%d, width=%d, height=%d\n", |
| 448 | __func__, rect.left, rect.top, rect.width, rect.height); | 448 | __func__, rect.left, rect.top, rect.width, rect.height); |
| 449 | 449 | ||
| 450 | if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) | ||
| 451 | return -EINVAL; | ||
| 452 | |||
| 450 | ret = mt9m111_make_rect(client, &rect); | 453 | ret = mt9m111_make_rect(client, &rect); |
| 451 | if (!ret) | 454 | if (!ret) |
| 452 | mt9m111->rect = rect; | 455 | mt9m111->rect = rect; |
| @@ -466,12 +469,14 @@ static int mt9m111_g_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) | |||
| 466 | 469 | ||
| 467 | static int mt9m111_cropcap(struct v4l2_subdev *sd, struct v4l2_cropcap *a) | 470 | static int mt9m111_cropcap(struct v4l2_subdev *sd, struct v4l2_cropcap *a) |
| 468 | { | 471 | { |
| 472 | if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) | ||
| 473 | return -EINVAL; | ||
| 474 | |||
| 469 | a->bounds.left = MT9M111_MIN_DARK_COLS; | 475 | a->bounds.left = MT9M111_MIN_DARK_COLS; |
| 470 | a->bounds.top = MT9M111_MIN_DARK_ROWS; | 476 | a->bounds.top = MT9M111_MIN_DARK_ROWS; |
| 471 | a->bounds.width = MT9M111_MAX_WIDTH; | 477 | a->bounds.width = MT9M111_MAX_WIDTH; |
| 472 | a->bounds.height = MT9M111_MAX_HEIGHT; | 478 | a->bounds.height = MT9M111_MAX_HEIGHT; |
| 473 | a->defrect = a->bounds; | 479 | a->defrect = a->bounds; |
| 474 | a->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | ||
| 475 | a->pixelaspect.numerator = 1; | 480 | a->pixelaspect.numerator = 1; |
| 476 | a->pixelaspect.denominator = 1; | 481 | a->pixelaspect.denominator = 1; |
| 477 | 482 | ||
| @@ -487,6 +492,7 @@ static int mt9m111_g_fmt(struct v4l2_subdev *sd, | |||
| 487 | mf->width = mt9m111->rect.width; | 492 | mf->width = mt9m111->rect.width; |
| 488 | mf->height = mt9m111->rect.height; | 493 | mf->height = mt9m111->rect.height; |
| 489 | mf->code = mt9m111->fmt->code; | 494 | mf->code = mt9m111->fmt->code; |
| 495 | mf->colorspace = mt9m111->fmt->colorspace; | ||
| 490 | mf->field = V4L2_FIELD_NONE; | 496 | mf->field = V4L2_FIELD_NONE; |
| 491 | 497 | ||
| 492 | return 0; | 498 | return 0; |
diff --git a/drivers/media/video/mt9v022.c b/drivers/media/video/mt9v022.c index e7cd23cd6394..b48473c7896b 100644 --- a/drivers/media/video/mt9v022.c +++ b/drivers/media/video/mt9v022.c | |||
| @@ -402,9 +402,6 @@ static int mt9v022_s_fmt(struct v4l2_subdev *sd, | |||
| 402 | if (mt9v022->model != V4L2_IDENT_MT9V022IX7ATC) | 402 | if (mt9v022->model != V4L2_IDENT_MT9V022IX7ATC) |
| 403 | return -EINVAL; | 403 | return -EINVAL; |
| 404 | break; | 404 | break; |
| 405 | case 0: | ||
| 406 | /* No format change, only geometry */ | ||
| 407 | break; | ||
| 408 | default: | 405 | default: |
| 409 | return -EINVAL; | 406 | return -EINVAL; |
| 410 | } | 407 | } |
diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c index 66ff174151b5..b6ea67221d1d 100644 --- a/drivers/media/video/mx2_camera.c +++ b/drivers/media/video/mx2_camera.c | |||
| @@ -378,6 +378,9 @@ static void mx25_camera_frame_done(struct mx2_camera_dev *pcdev, int fb, | |||
| 378 | 378 | ||
| 379 | spin_lock_irqsave(&pcdev->lock, flags); | 379 | spin_lock_irqsave(&pcdev->lock, flags); |
| 380 | 380 | ||
| 381 | if (*fb_active == NULL) | ||
| 382 | goto out; | ||
| 383 | |||
| 381 | vb = &(*fb_active)->vb; | 384 | vb = &(*fb_active)->vb; |
| 382 | dev_dbg(pcdev->dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__, | 385 | dev_dbg(pcdev->dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__, |
| 383 | vb, vb->baddr, vb->bsize); | 386 | vb, vb->baddr, vb->bsize); |
| @@ -402,6 +405,7 @@ static void mx25_camera_frame_done(struct mx2_camera_dev *pcdev, int fb, | |||
| 402 | 405 | ||
| 403 | *fb_active = buf; | 406 | *fb_active = buf; |
| 404 | 407 | ||
| 408 | out: | ||
| 405 | spin_unlock_irqrestore(&pcdev->lock, flags); | 409 | spin_unlock_irqrestore(&pcdev->lock, flags); |
| 406 | } | 410 | } |
| 407 | 411 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c index 1b992b847198..55ea914c7fcd 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c +++ b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c | |||
| @@ -513,7 +513,7 @@ int pvr2_ctrl_sym_to_value(struct pvr2_ctrl *cptr, | |||
| 513 | if (ret >= 0) { | 513 | if (ret >= 0) { |
| 514 | ret = pvr2_ctrl_range_check(cptr,*valptr); | 514 | ret = pvr2_ctrl_range_check(cptr,*valptr); |
| 515 | } | 515 | } |
| 516 | if (maskptr) *maskptr = ~0; | 516 | *maskptr = ~0; |
| 517 | } else if (cptr->info->type == pvr2_ctl_bool) { | 517 | } else if (cptr->info->type == pvr2_ctl_bool) { |
| 518 | ret = parse_token(ptr,len,valptr,boolNames, | 518 | ret = parse_token(ptr,len,valptr,boolNames, |
| 519 | ARRAY_SIZE(boolNames)); | 519 | ARRAY_SIZE(boolNames)); |
| @@ -522,7 +522,7 @@ int pvr2_ctrl_sym_to_value(struct pvr2_ctrl *cptr, | |||
| 522 | } else if (ret == 0) { | 522 | } else if (ret == 0) { |
| 523 | *valptr = (*valptr & 1) ? !0 : 0; | 523 | *valptr = (*valptr & 1) ? !0 : 0; |
| 524 | } | 524 | } |
| 525 | if (maskptr) *maskptr = 1; | 525 | *maskptr = 1; |
| 526 | } else if (cptr->info->type == pvr2_ctl_enum) { | 526 | } else if (cptr->info->type == pvr2_ctl_enum) { |
| 527 | ret = parse_token( | 527 | ret = parse_token( |
| 528 | ptr,len,valptr, | 528 | ptr,len,valptr, |
| @@ -531,7 +531,7 @@ int pvr2_ctrl_sym_to_value(struct pvr2_ctrl *cptr, | |||
| 531 | if (ret >= 0) { | 531 | if (ret >= 0) { |
| 532 | ret = pvr2_ctrl_range_check(cptr,*valptr); | 532 | ret = pvr2_ctrl_range_check(cptr,*valptr); |
| 533 | } | 533 | } |
| 534 | if (maskptr) *maskptr = ~0; | 534 | *maskptr = ~0; |
| 535 | } else if (cptr->info->type == pvr2_ctl_bitmask) { | 535 | } else if (cptr->info->type == pvr2_ctl_bitmask) { |
| 536 | ret = parse_tlist( | 536 | ret = parse_tlist( |
| 537 | ptr,len,maskptr,valptr, | 537 | ptr,len,maskptr,valptr, |
diff --git a/drivers/media/video/s5p-fimc/fimc-core.c b/drivers/media/video/s5p-fimc/fimc-core.c index b151c7be8a50..6961c55baf9b 100644 --- a/drivers/media/video/s5p-fimc/fimc-core.c +++ b/drivers/media/video/s5p-fimc/fimc-core.c | |||
| @@ -393,6 +393,37 @@ static void fimc_set_yuv_order(struct fimc_ctx *ctx) | |||
| 393 | dbg("ctx->out_order_1p= %d", ctx->out_order_1p); | 393 | dbg("ctx->out_order_1p= %d", ctx->out_order_1p); |
| 394 | } | 394 | } |
| 395 | 395 | ||
| 396 | static void fimc_prepare_dma_offset(struct fimc_ctx *ctx, struct fimc_frame *f) | ||
| 397 | { | ||
| 398 | struct samsung_fimc_variant *variant = ctx->fimc_dev->variant; | ||
| 399 | |||
| 400 | f->dma_offset.y_h = f->offs_h; | ||
| 401 | if (!variant->pix_hoff) | ||
| 402 | f->dma_offset.y_h *= (f->fmt->depth >> 3); | ||
| 403 | |||
| 404 | f->dma_offset.y_v = f->offs_v; | ||
| 405 | |||
| 406 | f->dma_offset.cb_h = f->offs_h; | ||
| 407 | f->dma_offset.cb_v = f->offs_v; | ||
| 408 | |||
| 409 | f->dma_offset.cr_h = f->offs_h; | ||
| 410 | f->dma_offset.cr_v = f->offs_v; | ||
| 411 | |||
| 412 | if (!variant->pix_hoff) { | ||
| 413 | if (f->fmt->planes_cnt == 3) { | ||
| 414 | f->dma_offset.cb_h >>= 1; | ||
| 415 | f->dma_offset.cr_h >>= 1; | ||
| 416 | } | ||
| 417 | if (f->fmt->color == S5P_FIMC_YCBCR420) { | ||
| 418 | f->dma_offset.cb_v >>= 1; | ||
| 419 | f->dma_offset.cr_v >>= 1; | ||
| 420 | } | ||
| 421 | } | ||
| 422 | |||
| 423 | dbg("in_offset: color= %d, y_h= %d, y_v= %d", | ||
| 424 | f->fmt->color, f->dma_offset.y_h, f->dma_offset.y_v); | ||
| 425 | } | ||
| 426 | |||
| 396 | /** | 427 | /** |
| 397 | * fimc_prepare_config - check dimensions, operation and color mode | 428 | * fimc_prepare_config - check dimensions, operation and color mode |
| 398 | * and pre-calculate offset and the scaling coefficients. | 429 | * and pre-calculate offset and the scaling coefficients. |
| @@ -406,7 +437,6 @@ static int fimc_prepare_config(struct fimc_ctx *ctx, u32 flags) | |||
| 406 | { | 437 | { |
| 407 | struct fimc_frame *s_frame, *d_frame; | 438 | struct fimc_frame *s_frame, *d_frame; |
| 408 | struct fimc_vid_buffer *buf = NULL; | 439 | struct fimc_vid_buffer *buf = NULL; |
| 409 | struct samsung_fimc_variant *variant = ctx->fimc_dev->variant; | ||
| 410 | int ret = 0; | 440 | int ret = 0; |
| 411 | 441 | ||
| 412 | s_frame = &ctx->s_frame; | 442 | s_frame = &ctx->s_frame; |
| @@ -419,61 +449,16 @@ static int fimc_prepare_config(struct fimc_ctx *ctx, u32 flags) | |||
| 419 | swap(d_frame->width, d_frame->height); | 449 | swap(d_frame->width, d_frame->height); |
| 420 | } | 450 | } |
| 421 | 451 | ||
| 422 | /* Prepare the output offset ratios for scaler. */ | 452 | /* Prepare the DMA offset ratios for scaler. */ |
| 423 | d_frame->dma_offset.y_h = d_frame->offs_h; | 453 | fimc_prepare_dma_offset(ctx, &ctx->s_frame); |
| 424 | if (!variant->pix_hoff) | 454 | fimc_prepare_dma_offset(ctx, &ctx->d_frame); |
| 425 | d_frame->dma_offset.y_h *= (d_frame->fmt->depth >> 3); | ||
| 426 | |||
| 427 | d_frame->dma_offset.y_v = d_frame->offs_v; | ||
| 428 | |||
| 429 | d_frame->dma_offset.cb_h = d_frame->offs_h; | ||
| 430 | d_frame->dma_offset.cb_v = d_frame->offs_v; | ||
| 431 | |||
| 432 | d_frame->dma_offset.cr_h = d_frame->offs_h; | ||
| 433 | d_frame->dma_offset.cr_v = d_frame->offs_v; | ||
| 434 | 455 | ||
| 435 | if (!variant->pix_hoff && d_frame->fmt->planes_cnt == 3) { | ||
| 436 | d_frame->dma_offset.cb_h >>= 1; | ||
| 437 | d_frame->dma_offset.cb_v >>= 1; | ||
| 438 | d_frame->dma_offset.cr_h >>= 1; | ||
| 439 | d_frame->dma_offset.cr_v >>= 1; | ||
| 440 | } | ||
| 441 | |||
| 442 | dbg("out offset: color= %d, y_h= %d, y_v= %d", | ||
| 443 | d_frame->fmt->color, | ||
| 444 | d_frame->dma_offset.y_h, d_frame->dma_offset.y_v); | ||
| 445 | |||
| 446 | /* Prepare the input offset ratios for scaler. */ | ||
| 447 | s_frame->dma_offset.y_h = s_frame->offs_h; | ||
| 448 | if (!variant->pix_hoff) | ||
| 449 | s_frame->dma_offset.y_h *= (s_frame->fmt->depth >> 3); | ||
| 450 | s_frame->dma_offset.y_v = s_frame->offs_v; | ||
| 451 | |||
| 452 | s_frame->dma_offset.cb_h = s_frame->offs_h; | ||
| 453 | s_frame->dma_offset.cb_v = s_frame->offs_v; | ||
| 454 | |||
| 455 | s_frame->dma_offset.cr_h = s_frame->offs_h; | ||
| 456 | s_frame->dma_offset.cr_v = s_frame->offs_v; | ||
| 457 | |||
| 458 | if (!variant->pix_hoff && s_frame->fmt->planes_cnt == 3) { | ||
| 459 | s_frame->dma_offset.cb_h >>= 1; | ||
| 460 | s_frame->dma_offset.cb_v >>= 1; | ||
| 461 | s_frame->dma_offset.cr_h >>= 1; | ||
| 462 | s_frame->dma_offset.cr_v >>= 1; | ||
| 463 | } | ||
| 464 | |||
| 465 | dbg("in offset: color= %d, y_h= %d, y_v= %d", | ||
| 466 | s_frame->fmt->color, s_frame->dma_offset.y_h, | ||
| 467 | s_frame->dma_offset.y_v); | ||
| 468 | |||
| 469 | fimc_set_yuv_order(ctx); | ||
| 470 | |||
| 471 | /* Check against the scaler ratio. */ | ||
| 472 | if (s_frame->height > (SCALER_MAX_VRATIO * d_frame->height) || | 456 | if (s_frame->height > (SCALER_MAX_VRATIO * d_frame->height) || |
| 473 | s_frame->width > (SCALER_MAX_HRATIO * d_frame->width)) { | 457 | s_frame->width > (SCALER_MAX_HRATIO * d_frame->width)) { |
| 474 | err("out of scaler range"); | 458 | err("out of scaler range"); |
| 475 | return -EINVAL; | 459 | return -EINVAL; |
| 476 | } | 460 | } |
| 461 | fimc_set_yuv_order(ctx); | ||
| 477 | } | 462 | } |
| 478 | 463 | ||
| 479 | /* Input DMA mode is not allowed when the scaler is disabled. */ | 464 | /* Input DMA mode is not allowed when the scaler is disabled. */ |
| @@ -822,7 +807,8 @@ static int fimc_m2m_s_fmt(struct file *file, void *priv, struct v4l2_format *f) | |||
| 822 | } else { | 807 | } else { |
| 823 | v4l2_err(&ctx->fimc_dev->m2m.v4l2_dev, | 808 | v4l2_err(&ctx->fimc_dev->m2m.v4l2_dev, |
| 824 | "Wrong buffer/video queue type (%d)\n", f->type); | 809 | "Wrong buffer/video queue type (%d)\n", f->type); |
| 825 | return -EINVAL; | 810 | ret = -EINVAL; |
| 811 | goto s_fmt_out; | ||
| 826 | } | 812 | } |
| 827 | 813 | ||
| 828 | pix = &f->fmt.pix; | 814 | pix = &f->fmt.pix; |
| @@ -1414,8 +1400,10 @@ static int fimc_probe(struct platform_device *pdev) | |||
| 1414 | } | 1400 | } |
| 1415 | 1401 | ||
| 1416 | fimc->work_queue = create_workqueue(dev_name(&fimc->pdev->dev)); | 1402 | fimc->work_queue = create_workqueue(dev_name(&fimc->pdev->dev)); |
| 1417 | if (!fimc->work_queue) | 1403 | if (!fimc->work_queue) { |
| 1404 | ret = -ENOMEM; | ||
| 1418 | goto err_irq; | 1405 | goto err_irq; |
| 1406 | } | ||
| 1419 | 1407 | ||
| 1420 | ret = fimc_register_m2m_device(fimc); | 1408 | ret = fimc_register_m2m_device(fimc); |
| 1421 | if (ret) | 1409 | if (ret) |
| @@ -1492,6 +1480,7 @@ static struct samsung_fimc_variant fimc2_variant_s5p = { | |||
| 1492 | }; | 1480 | }; |
| 1493 | 1481 | ||
| 1494 | static struct samsung_fimc_variant fimc01_variant_s5pv210 = { | 1482 | static struct samsung_fimc_variant fimc01_variant_s5pv210 = { |
| 1483 | .pix_hoff = 1, | ||
| 1495 | .has_inp_rot = 1, | 1484 | .has_inp_rot = 1, |
| 1496 | .has_out_rot = 1, | 1485 | .has_out_rot = 1, |
| 1497 | .min_inp_pixsize = 16, | 1486 | .min_inp_pixsize = 16, |
| @@ -1506,6 +1495,7 @@ static struct samsung_fimc_variant fimc01_variant_s5pv210 = { | |||
| 1506 | }; | 1495 | }; |
| 1507 | 1496 | ||
| 1508 | static struct samsung_fimc_variant fimc2_variant_s5pv210 = { | 1497 | static struct samsung_fimc_variant fimc2_variant_s5pv210 = { |
| 1498 | .pix_hoff = 1, | ||
| 1509 | .min_inp_pixsize = 16, | 1499 | .min_inp_pixsize = 16, |
| 1510 | .min_out_pixsize = 32, | 1500 | .min_out_pixsize = 32, |
| 1511 | 1501 | ||
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index ec697fcd406e..bb8d83d8ddaf 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
| @@ -4323,13 +4323,13 @@ struct saa7134_board saa7134_boards[] = { | |||
| 4323 | }, | 4323 | }, |
| 4324 | [SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM] = { | 4324 | [SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM] = { |
| 4325 | /* Beholder Intl. Ltd. 2008 */ | 4325 | /* Beholder Intl. Ltd. 2008 */ |
| 4326 | /*Dmitry Belimov <d.belimov@gmail.com> */ | 4326 | /* Dmitry Belimov <d.belimov@gmail.com> */ |
| 4327 | .name = "Beholder BeholdTV Columbus TVFM", | 4327 | .name = "Beholder BeholdTV Columbus TV/FM", |
| 4328 | .audio_clock = 0x00187de7, | 4328 | .audio_clock = 0x00187de7, |
| 4329 | .tuner_type = TUNER_ALPS_TSBE5_PAL, | 4329 | .tuner_type = TUNER_ALPS_TSBE5_PAL, |
| 4330 | .radio_type = UNSET, | 4330 | .radio_type = TUNER_TEA5767, |
| 4331 | .tuner_addr = ADDR_UNSET, | 4331 | .tuner_addr = 0xc2 >> 1, |
| 4332 | .radio_addr = ADDR_UNSET, | 4332 | .radio_addr = 0xc0 >> 1, |
| 4333 | .tda9887_conf = TDA9887_PRESENT, | 4333 | .tda9887_conf = TDA9887_PRESENT, |
| 4334 | .gpiomask = 0x000A8004, | 4334 | .gpiomask = 0x000A8004, |
| 4335 | .inputs = {{ | 4335 | .inputs = {{ |
diff --git a/drivers/media/video/saa7164/saa7164-buffer.c b/drivers/media/video/saa7164/saa7164-buffer.c index 5713f3a4b76c..ddd25d32723d 100644 --- a/drivers/media/video/saa7164/saa7164-buffer.c +++ b/drivers/media/video/saa7164/saa7164-buffer.c | |||
| @@ -136,10 +136,11 @@ ret: | |||
| 136 | int saa7164_buffer_dealloc(struct saa7164_tsport *port, | 136 | int saa7164_buffer_dealloc(struct saa7164_tsport *port, |
| 137 | struct saa7164_buffer *buf) | 137 | struct saa7164_buffer *buf) |
| 138 | { | 138 | { |
| 139 | struct saa7164_dev *dev = port->dev; | 139 | struct saa7164_dev *dev; |
| 140 | 140 | ||
| 141 | if ((buf == 0) || (port == 0)) | 141 | if (!buf || !port) |
| 142 | return SAA_ERR_BAD_PARAMETER; | 142 | return SAA_ERR_BAD_PARAMETER; |
| 143 | dev = port->dev; | ||
| 143 | 144 | ||
| 144 | dprintk(DBGLVL_BUF, "%s() deallocating buffer @ 0x%p\n", __func__, buf); | 145 | dprintk(DBGLVL_BUF, "%s() deallocating buffer @ 0x%p\n", __func__, buf); |
| 145 | 146 | ||
diff --git a/drivers/media/video/uvc/uvc_driver.c b/drivers/media/video/uvc/uvc_driver.c index 8bdd940f32e6..2ac85d8984f0 100644 --- a/drivers/media/video/uvc/uvc_driver.c +++ b/drivers/media/video/uvc/uvc_driver.c | |||
| @@ -486,6 +486,12 @@ static int uvc_parse_format(struct uvc_device *dev, | |||
| 486 | max(frame->dwFrameInterval[0], | 486 | max(frame->dwFrameInterval[0], |
| 487 | frame->dwDefaultFrameInterval)); | 487 | frame->dwDefaultFrameInterval)); |
| 488 | 488 | ||
| 489 | if (dev->quirks & UVC_QUIRK_RESTRICT_FRAME_RATE) { | ||
| 490 | frame->bFrameIntervalType = 1; | ||
| 491 | frame->dwFrameInterval[0] = | ||
| 492 | frame->dwDefaultFrameInterval; | ||
| 493 | } | ||
| 494 | |||
| 489 | uvc_trace(UVC_TRACE_DESCR, "- %ux%u (%u.%u fps)\n", | 495 | uvc_trace(UVC_TRACE_DESCR, "- %ux%u (%u.%u fps)\n", |
| 490 | frame->wWidth, frame->wHeight, | 496 | frame->wWidth, frame->wHeight, |
| 491 | 10000000/frame->dwDefaultFrameInterval, | 497 | 10000000/frame->dwDefaultFrameInterval, |
| @@ -2026,6 +2032,15 @@ static struct usb_device_id uvc_ids[] = { | |||
| 2026 | .bInterfaceClass = USB_CLASS_VENDOR_SPEC, | 2032 | .bInterfaceClass = USB_CLASS_VENDOR_SPEC, |
| 2027 | .bInterfaceSubClass = 1, | 2033 | .bInterfaceSubClass = 1, |
| 2028 | .bInterfaceProtocol = 0 }, | 2034 | .bInterfaceProtocol = 0 }, |
| 2035 | /* Chicony CNF7129 (Asus EEE 100HE) */ | ||
| 2036 | { .match_flags = USB_DEVICE_ID_MATCH_DEVICE | ||
| 2037 | | USB_DEVICE_ID_MATCH_INT_INFO, | ||
| 2038 | .idVendor = 0x04f2, | ||
| 2039 | .idProduct = 0xb071, | ||
| 2040 | .bInterfaceClass = USB_CLASS_VIDEO, | ||
| 2041 | .bInterfaceSubClass = 1, | ||
| 2042 | .bInterfaceProtocol = 0, | ||
| 2043 | .driver_info = UVC_QUIRK_RESTRICT_FRAME_RATE }, | ||
| 2029 | /* Alcor Micro AU3820 (Future Boy PC USB Webcam) */ | 2044 | /* Alcor Micro AU3820 (Future Boy PC USB Webcam) */ |
| 2030 | { .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 2045 | { .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
| 2031 | | USB_DEVICE_ID_MATCH_INT_INFO, | 2046 | | USB_DEVICE_ID_MATCH_INT_INFO, |
| @@ -2091,6 +2106,15 @@ static struct usb_device_id uvc_ids[] = { | |||
| 2091 | .bInterfaceProtocol = 0, | 2106 | .bInterfaceProtocol = 0, |
| 2092 | .driver_info = UVC_QUIRK_PROBE_MINMAX | 2107 | .driver_info = UVC_QUIRK_PROBE_MINMAX |
| 2093 | | UVC_QUIRK_PROBE_DEF }, | 2108 | | UVC_QUIRK_PROBE_DEF }, |
| 2109 | /* IMC Networks (Medion Akoya) */ | ||
| 2110 | { .match_flags = USB_DEVICE_ID_MATCH_DEVICE | ||
| 2111 | | USB_DEVICE_ID_MATCH_INT_INFO, | ||
| 2112 | .idVendor = 0x13d3, | ||
| 2113 | .idProduct = 0x5103, | ||
| 2114 | .bInterfaceClass = USB_CLASS_VIDEO, | ||
| 2115 | .bInterfaceSubClass = 1, | ||
| 2116 | .bInterfaceProtocol = 0, | ||
| 2117 | .driver_info = UVC_QUIRK_STREAM_NO_FID }, | ||
| 2094 | /* Syntek (HP Spartan) */ | 2118 | /* Syntek (HP Spartan) */ |
| 2095 | { .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 2119 | { .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
| 2096 | | USB_DEVICE_ID_MATCH_INT_INFO, | 2120 | | USB_DEVICE_ID_MATCH_INT_INFO, |
diff --git a/drivers/media/video/uvc/uvcvideo.h b/drivers/media/video/uvc/uvcvideo.h index bdacf3beabf5..892e0e51916c 100644 --- a/drivers/media/video/uvc/uvcvideo.h +++ b/drivers/media/video/uvc/uvcvideo.h | |||
| @@ -182,6 +182,7 @@ struct uvc_xu_control { | |||
| 182 | #define UVC_QUIRK_IGNORE_SELECTOR_UNIT 0x00000020 | 182 | #define UVC_QUIRK_IGNORE_SELECTOR_UNIT 0x00000020 |
| 183 | #define UVC_QUIRK_FIX_BANDWIDTH 0x00000080 | 183 | #define UVC_QUIRK_FIX_BANDWIDTH 0x00000080 |
| 184 | #define UVC_QUIRK_PROBE_DEF 0x00000100 | 184 | #define UVC_QUIRK_PROBE_DEF 0x00000100 |
| 185 | #define UVC_QUIRK_RESTRICT_FRAME_RATE 0x00000200 | ||
| 185 | 186 | ||
| 186 | /* Format flags */ | 187 | /* Format flags */ |
| 187 | #define UVC_FMT_FLAG_COMPRESSED 0x00000001 | 188 | #define UVC_FMT_FLAG_COMPRESSED 0x00000001 |
diff --git a/drivers/media/video/videobuf-dma-contig.c b/drivers/media/video/videobuf-dma-contig.c index 372b87efcd05..6ff9e4bac3ea 100644 --- a/drivers/media/video/videobuf-dma-contig.c +++ b/drivers/media/video/videobuf-dma-contig.c | |||
| @@ -393,8 +393,10 @@ void videobuf_dma_contig_free(struct videobuf_queue *q, | |||
| 393 | } | 393 | } |
| 394 | 394 | ||
| 395 | /* read() method */ | 395 | /* read() method */ |
| 396 | dma_free_coherent(q->dev, mem->size, mem->vaddr, mem->dma_handle); | 396 | if (mem->vaddr) { |
| 397 | mem->vaddr = NULL; | 397 | dma_free_coherent(q->dev, mem->size, mem->vaddr, mem->dma_handle); |
| 398 | mem->vaddr = NULL; | ||
| 399 | } | ||
| 398 | } | 400 | } |
| 399 | EXPORT_SYMBOL_GPL(videobuf_dma_contig_free); | 401 | EXPORT_SYMBOL_GPL(videobuf_dma_contig_free); |
| 400 | 402 | ||
diff --git a/drivers/media/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma-sg.c index 06f9a9c2a39a..2ad0bc252b0e 100644 --- a/drivers/media/video/videobuf-dma-sg.c +++ b/drivers/media/video/videobuf-dma-sg.c | |||
| @@ -94,7 +94,7 @@ err: | |||
| 94 | * must free the memory. | 94 | * must free the memory. |
| 95 | */ | 95 | */ |
| 96 | static struct scatterlist *videobuf_pages_to_sg(struct page **pages, | 96 | static struct scatterlist *videobuf_pages_to_sg(struct page **pages, |
| 97 | int nr_pages, int offset) | 97 | int nr_pages, int offset, size_t size) |
| 98 | { | 98 | { |
| 99 | struct scatterlist *sglist; | 99 | struct scatterlist *sglist; |
| 100 | int i; | 100 | int i; |
| @@ -110,12 +110,14 @@ static struct scatterlist *videobuf_pages_to_sg(struct page **pages, | |||
| 110 | /* DMA to highmem pages might not work */ | 110 | /* DMA to highmem pages might not work */ |
| 111 | goto highmem; | 111 | goto highmem; |
| 112 | sg_set_page(&sglist[0], pages[0], PAGE_SIZE - offset, offset); | 112 | sg_set_page(&sglist[0], pages[0], PAGE_SIZE - offset, offset); |
| 113 | size -= PAGE_SIZE - offset; | ||
| 113 | for (i = 1; i < nr_pages; i++) { | 114 | for (i = 1; i < nr_pages; i++) { |
| 114 | if (NULL == pages[i]) | 115 | if (NULL == pages[i]) |
| 115 | goto nopage; | 116 | goto nopage; |
| 116 | if (PageHighMem(pages[i])) | 117 | if (PageHighMem(pages[i])) |
| 117 | goto highmem; | 118 | goto highmem; |
| 118 | sg_set_page(&sglist[i], pages[i], PAGE_SIZE, 0); | 119 | sg_set_page(&sglist[i], pages[i], min(PAGE_SIZE, size), 0); |
| 120 | size -= min(PAGE_SIZE, size); | ||
| 119 | } | 121 | } |
| 120 | return sglist; | 122 | return sglist; |
| 121 | 123 | ||
| @@ -170,7 +172,8 @@ static int videobuf_dma_init_user_locked(struct videobuf_dmabuf *dma, | |||
| 170 | 172 | ||
| 171 | first = (data & PAGE_MASK) >> PAGE_SHIFT; | 173 | first = (data & PAGE_MASK) >> PAGE_SHIFT; |
| 172 | last = ((data+size-1) & PAGE_MASK) >> PAGE_SHIFT; | 174 | last = ((data+size-1) & PAGE_MASK) >> PAGE_SHIFT; |
| 173 | dma->offset = data & ~PAGE_MASK; | 175 | dma->offset = data & ~PAGE_MASK; |
| 176 | dma->size = size; | ||
| 174 | dma->nr_pages = last-first+1; | 177 | dma->nr_pages = last-first+1; |
| 175 | dma->pages = kmalloc(dma->nr_pages * sizeof(struct page *), GFP_KERNEL); | 178 | dma->pages = kmalloc(dma->nr_pages * sizeof(struct page *), GFP_KERNEL); |
| 176 | if (NULL == dma->pages) | 179 | if (NULL == dma->pages) |
| @@ -252,7 +255,7 @@ int videobuf_dma_map(struct device *dev, struct videobuf_dmabuf *dma) | |||
| 252 | 255 | ||
| 253 | if (dma->pages) { | 256 | if (dma->pages) { |
| 254 | dma->sglist = videobuf_pages_to_sg(dma->pages, dma->nr_pages, | 257 | dma->sglist = videobuf_pages_to_sg(dma->pages, dma->nr_pages, |
| 255 | dma->offset); | 258 | dma->offset, dma->size); |
| 256 | } | 259 | } |
| 257 | if (dma->vaddr) { | 260 | if (dma->vaddr) { |
| 258 | dma->sglist = videobuf_vmalloc_to_sg(dma->vaddr, | 261 | dma->sglist = videobuf_vmalloc_to_sg(dma->vaddr, |
diff --git a/drivers/misc/bh1780gli.c b/drivers/misc/bh1780gli.c index 714c6b487313..d5f3a3fd2319 100644 --- a/drivers/misc/bh1780gli.c +++ b/drivers/misc/bh1780gli.c | |||
| @@ -190,7 +190,6 @@ static int __devexit bh1780_remove(struct i2c_client *client) | |||
| 190 | 190 | ||
| 191 | ddata = i2c_get_clientdata(client); | 191 | ddata = i2c_get_clientdata(client); |
| 192 | sysfs_remove_group(&client->dev.kobj, &bh1780_attr_group); | 192 | sysfs_remove_group(&client->dev.kobj, &bh1780_attr_group); |
| 193 | i2c_set_clientdata(client, NULL); | ||
| 194 | kfree(ddata); | 193 | kfree(ddata); |
| 195 | 194 | ||
| 196 | return 0; | 195 | return 0; |
diff --git a/drivers/regulator/ad5398.c b/drivers/regulator/ad5398.c index df1fb53c09d2..a4be41614eeb 100644 --- a/drivers/regulator/ad5398.c +++ b/drivers/regulator/ad5398.c | |||
| @@ -256,7 +256,6 @@ static int __devexit ad5398_remove(struct i2c_client *client) | |||
| 256 | 256 | ||
| 257 | regulator_unregister(chip->rdev); | 257 | regulator_unregister(chip->rdev); |
| 258 | kfree(chip); | 258 | kfree(chip); |
| 259 | i2c_set_clientdata(client, NULL); | ||
| 260 | 259 | ||
| 261 | return 0; | 260 | return 0; |
| 262 | } | 261 | } |
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 422a709d271d..cc8b337b9119 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
| @@ -700,7 +700,7 @@ static void print_constraints(struct regulator_dev *rdev) | |||
| 700 | constraints->min_uA != constraints->max_uA) { | 700 | constraints->min_uA != constraints->max_uA) { |
| 701 | ret = _regulator_get_current_limit(rdev); | 701 | ret = _regulator_get_current_limit(rdev); |
| 702 | if (ret > 0) | 702 | if (ret > 0) |
| 703 | count += sprintf(buf + count, "at %d uA ", ret / 1000); | 703 | count += sprintf(buf + count, "at %d mA ", ret / 1000); |
| 704 | } | 704 | } |
| 705 | 705 | ||
| 706 | if (constraints->valid_modes_mask & REGULATOR_MODE_FAST) | 706 | if (constraints->valid_modes_mask & REGULATOR_MODE_FAST) |
| @@ -2302,8 +2302,10 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, | |||
| 2302 | dev_set_name(&rdev->dev, "regulator.%d", | 2302 | dev_set_name(&rdev->dev, "regulator.%d", |
| 2303 | atomic_inc_return(®ulator_no) - 1); | 2303 | atomic_inc_return(®ulator_no) - 1); |
| 2304 | ret = device_register(&rdev->dev); | 2304 | ret = device_register(&rdev->dev); |
| 2305 | if (ret != 0) | 2305 | if (ret != 0) { |
| 2306 | put_device(&rdev->dev); | ||
| 2306 | goto clean; | 2307 | goto clean; |
| 2308 | } | ||
| 2307 | 2309 | ||
| 2308 | dev_set_drvdata(&rdev->dev, rdev); | 2310 | dev_set_drvdata(&rdev->dev, rdev); |
| 2309 | 2311 | ||
diff --git a/drivers/regulator/isl6271a-regulator.c b/drivers/regulator/isl6271a-regulator.c index d61ecb885a8c..b8cc6389a541 100644 --- a/drivers/regulator/isl6271a-regulator.c +++ b/drivers/regulator/isl6271a-regulator.c | |||
| @@ -191,8 +191,6 @@ static int __devexit isl6271a_remove(struct i2c_client *i2c) | |||
| 191 | struct isl_pmic *pmic = i2c_get_clientdata(i2c); | 191 | struct isl_pmic *pmic = i2c_get_clientdata(i2c); |
| 192 | int i; | 192 | int i; |
| 193 | 193 | ||
| 194 | i2c_set_clientdata(i2c, NULL); | ||
| 195 | |||
| 196 | for (i = 0; i < 3; i++) | 194 | for (i = 0; i < 3; i++) |
| 197 | regulator_unregister(pmic->rdev[i]); | 195 | regulator_unregister(pmic->rdev[i]); |
| 198 | 196 | ||
diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c index 4520ace3f7e7..6b60a9c0366b 100644 --- a/drivers/regulator/max8649.c +++ b/drivers/regulator/max8649.c | |||
| @@ -330,7 +330,7 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client, | |||
| 330 | /* set external clock frequency */ | 330 | /* set external clock frequency */ |
| 331 | info->extclk_freq = pdata->extclk_freq; | 331 | info->extclk_freq = pdata->extclk_freq; |
| 332 | max8649_set_bits(info->i2c, MAX8649_SYNC, MAX8649_EXT_MASK, | 332 | max8649_set_bits(info->i2c, MAX8649_SYNC, MAX8649_EXT_MASK, |
| 333 | info->extclk_freq); | 333 | info->extclk_freq << 6); |
| 334 | } | 334 | } |
| 335 | 335 | ||
| 336 | if (pdata->ramp_timing) { | 336 | if (pdata->ramp_timing) { |
diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index 9daed8db83d3..9de8516e3531 100644 --- a/drivers/rtc/rtc-ds3232.c +++ b/drivers/rtc/rtc-ds3232.c | |||
| @@ -268,7 +268,6 @@ out_irq: | |||
| 268 | free_irq(client->irq, client); | 268 | free_irq(client->irq, client); |
| 269 | 269 | ||
| 270 | out_free: | 270 | out_free: |
| 271 | i2c_set_clientdata(client, NULL); | ||
| 272 | kfree(ds3232); | 271 | kfree(ds3232); |
| 273 | return ret; | 272 | return ret; |
| 274 | } | 273 | } |
| @@ -287,7 +286,6 @@ static int __devexit ds3232_remove(struct i2c_client *client) | |||
| 287 | } | 286 | } |
| 288 | 287 | ||
| 289 | rtc_device_unregister(ds3232->rtc); | 288 | rtc_device_unregister(ds3232->rtc); |
| 290 | i2c_set_clientdata(client, NULL); | ||
| 291 | kfree(ds3232); | 289 | kfree(ds3232); |
| 292 | return 0; | 290 | return 0; |
| 293 | } | 291 | } |
diff --git a/drivers/staging/tm6000/Kconfig b/drivers/staging/tm6000/Kconfig index c725356cc346..de7ebb99d8f6 100644 --- a/drivers/staging/tm6000/Kconfig +++ b/drivers/staging/tm6000/Kconfig | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | config VIDEO_TM6000 | 1 | config VIDEO_TM6000 |
| 2 | tristate "TV Master TM5600/6000/6010 driver" | 2 | tristate "TV Master TM5600/6000/6010 driver" |
| 3 | depends on VIDEO_DEV && I2C && INPUT && USB && EXPERIMENTAL | 3 | depends on VIDEO_DEV && I2C && INPUT && IR_CORE && USB && EXPERIMENTAL |
| 4 | select VIDEO_TUNER | 4 | select VIDEO_TUNER |
| 5 | select MEDIA_TUNER_XC2028 | 5 | select MEDIA_TUNER_XC2028 |
| 6 | select MEDIA_TUNER_XC5000 | 6 | select MEDIA_TUNER_XC5000 |
diff --git a/drivers/staging/tm6000/tm6000-input.c b/drivers/staging/tm6000/tm6000-input.c index 32f7a0af6938..54f7667cc706 100644 --- a/drivers/staging/tm6000/tm6000-input.c +++ b/drivers/staging/tm6000/tm6000-input.c | |||
| @@ -46,7 +46,7 @@ MODULE_PARM_DESC(enable_ir, "enable ir (default is enable"); | |||
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | struct tm6000_ir_poll_result { | 48 | struct tm6000_ir_poll_result { |
| 49 | u8 rc_data[4]; | 49 | u16 rc_data; |
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | struct tm6000_IR { | 52 | struct tm6000_IR { |
| @@ -60,9 +60,9 @@ struct tm6000_IR { | |||
| 60 | int polling; | 60 | int polling; |
| 61 | struct delayed_work work; | 61 | struct delayed_work work; |
| 62 | u8 wait:1; | 62 | u8 wait:1; |
| 63 | u8 key:1; | ||
| 63 | struct urb *int_urb; | 64 | struct urb *int_urb; |
| 64 | u8 *urb_data; | 65 | u8 *urb_data; |
| 65 | u8 key:1; | ||
| 66 | 66 | ||
| 67 | int (*get_key) (struct tm6000_IR *, struct tm6000_ir_poll_result *); | 67 | int (*get_key) (struct tm6000_IR *, struct tm6000_ir_poll_result *); |
| 68 | 68 | ||
| @@ -122,13 +122,14 @@ static void tm6000_ir_urb_received(struct urb *urb) | |||
| 122 | 122 | ||
| 123 | if (urb->status != 0) | 123 | if (urb->status != 0) |
| 124 | printk(KERN_INFO "not ready\n"); | 124 | printk(KERN_INFO "not ready\n"); |
| 125 | else if (urb->actual_length > 0) | 125 | else if (urb->actual_length > 0) { |
| 126 | memcpy(ir->urb_data, urb->transfer_buffer, urb->actual_length); | 126 | memcpy(ir->urb_data, urb->transfer_buffer, urb->actual_length); |
| 127 | 127 | ||
| 128 | dprintk("data %02x %02x %02x %02x\n", ir->urb_data[0], | 128 | dprintk("data %02x %02x %02x %02x\n", ir->urb_data[0], |
| 129 | ir->urb_data[1], ir->urb_data[2], ir->urb_data[3]); | 129 | ir->urb_data[1], ir->urb_data[2], ir->urb_data[3]); |
| 130 | 130 | ||
| 131 | ir->key = 1; | 131 | ir->key = 1; |
| 132 | } | ||
| 132 | 133 | ||
| 133 | rc = usb_submit_urb(urb, GFP_ATOMIC); | 134 | rc = usb_submit_urb(urb, GFP_ATOMIC); |
| 134 | } | 135 | } |
| @@ -140,30 +141,47 @@ static int default_polling_getkey(struct tm6000_IR *ir, | |||
| 140 | int rc; | 141 | int rc; |
| 141 | u8 buf[2]; | 142 | u8 buf[2]; |
| 142 | 143 | ||
| 143 | if (ir->wait && !&dev->int_in) { | 144 | if (ir->wait && !&dev->int_in) |
| 144 | poll_result->rc_data[0] = 0xff; | ||
| 145 | return 0; | 145 | return 0; |
| 146 | } | ||
| 147 | 146 | ||
| 148 | if (&dev->int_in) { | 147 | if (&dev->int_in) { |
| 149 | poll_result->rc_data[0] = ir->urb_data[0]; | 148 | if (ir->ir.ir_type == IR_TYPE_RC5) |
| 150 | poll_result->rc_data[1] = ir->urb_data[1]; | 149 | poll_result->rc_data = ir->urb_data[0]; |
| 150 | else | ||
| 151 | poll_result->rc_data = ir->urb_data[0] | ir->urb_data[1] << 8; | ||
| 151 | } else { | 152 | } else { |
| 152 | tm6000_set_reg(dev, REQ_04_EN_DISABLE_MCU_INT, 2, 0); | 153 | tm6000_set_reg(dev, REQ_04_EN_DISABLE_MCU_INT, 2, 0); |
| 153 | msleep(10); | 154 | msleep(10); |
| 154 | tm6000_set_reg(dev, REQ_04_EN_DISABLE_MCU_INT, 2, 1); | 155 | tm6000_set_reg(dev, REQ_04_EN_DISABLE_MCU_INT, 2, 1); |
| 155 | msleep(10); | 156 | msleep(10); |
| 156 | 157 | ||
| 157 | rc = tm6000_read_write_usb(dev, USB_DIR_IN | USB_TYPE_VENDOR | | 158 | if (ir->ir.ir_type == IR_TYPE_RC5) { |
| 158 | USB_RECIP_DEVICE, REQ_02_GET_IR_CODE, 0, 0, buf, 1); | 159 | rc = tm6000_read_write_usb(dev, USB_DIR_IN | |
| 160 | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | ||
| 161 | REQ_02_GET_IR_CODE, 0, 0, buf, 1); | ||
| 159 | 162 | ||
| 160 | msleep(10); | 163 | msleep(10); |
| 161 | 164 | ||
| 162 | dprintk("read data=%02x\n", buf[0]); | 165 | dprintk("read data=%02x\n", buf[0]); |
| 163 | if (rc < 0) | 166 | if (rc < 0) |
| 164 | return rc; | 167 | return rc; |
| 165 | 168 | ||
| 166 | poll_result->rc_data[0] = buf[0]; | 169 | poll_result->rc_data = buf[0]; |
| 170 | } else { | ||
| 171 | rc = tm6000_read_write_usb(dev, USB_DIR_IN | | ||
| 172 | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | ||
| 173 | REQ_02_GET_IR_CODE, 0, 0, buf, 2); | ||
| 174 | |||
| 175 | msleep(10); | ||
| 176 | |||
| 177 | dprintk("read data=%04x\n", buf[0] | buf[1] << 8); | ||
| 178 | if (rc < 0) | ||
| 179 | return rc; | ||
| 180 | |||
| 181 | poll_result->rc_data = buf[0] | buf[1] << 8; | ||
| 182 | } | ||
| 183 | if ((poll_result->rc_data & 0x00ff) != 0xff) | ||
| 184 | ir->key = 1; | ||
| 167 | } | 185 | } |
| 168 | return 0; | 186 | return 0; |
| 169 | } | 187 | } |
| @@ -180,12 +198,11 @@ static void tm6000_ir_handle_key(struct tm6000_IR *ir) | |||
| 180 | return; | 198 | return; |
| 181 | } | 199 | } |
| 182 | 200 | ||
| 183 | dprintk("ir->get_key result data=%02x %02x\n", | 201 | dprintk("ir->get_key result data=%04x\n", poll_result.rc_data); |
| 184 | poll_result.rc_data[0], poll_result.rc_data[1]); | ||
| 185 | 202 | ||
| 186 | if (poll_result.rc_data[0] != 0xff && ir->key == 1) { | 203 | if (ir->key) { |
| 187 | ir_input_keydown(ir->input->input_dev, &ir->ir, | 204 | ir_input_keydown(ir->input->input_dev, &ir->ir, |
| 188 | poll_result.rc_data[0] | poll_result.rc_data[1] << 8); | 205 | (u32)poll_result.rc_data); |
| 189 | 206 | ||
| 190 | ir_input_nokey(ir->input->input_dev, &ir->ir); | 207 | ir_input_nokey(ir->input->input_dev, &ir->ir); |
| 191 | ir->key = 0; | 208 | ir->key = 0; |
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c index 29bac5118877..d409495876f1 100644 --- a/drivers/xen/xenbus/xenbus_probe.c +++ b/drivers/xen/xenbus/xenbus_probe.c | |||
| @@ -755,7 +755,10 @@ int register_xenstore_notifier(struct notifier_block *nb) | |||
| 755 | { | 755 | { |
| 756 | int ret = 0; | 756 | int ret = 0; |
| 757 | 757 | ||
| 758 | blocking_notifier_chain_register(&xenstore_chain, nb); | 758 | if (xenstored_ready > 0) |
| 759 | ret = nb->notifier_call(nb, 0, NULL); | ||
| 760 | else | ||
| 761 | blocking_notifier_chain_register(&xenstore_chain, nb); | ||
| 759 | 762 | ||
| 760 | return ret; | 763 | return ret; |
| 761 | } | 764 | } |
| @@ -769,7 +772,7 @@ EXPORT_SYMBOL_GPL(unregister_xenstore_notifier); | |||
| 769 | 772 | ||
| 770 | void xenbus_probe(struct work_struct *unused) | 773 | void xenbus_probe(struct work_struct *unused) |
| 771 | { | 774 | { |
| 772 | BUG_ON((xenstored_ready <= 0)); | 775 | xenstored_ready = 1; |
| 773 | 776 | ||
| 774 | /* Enumerate devices in xenstore and watch for changes. */ | 777 | /* Enumerate devices in xenstore and watch for changes. */ |
| 775 | xenbus_probe_devices(&xenbus_frontend); | 778 | xenbus_probe_devices(&xenbus_frontend); |
| @@ -835,8 +838,8 @@ static int __init xenbus_init(void) | |||
| 835 | xen_store_evtchn = xen_start_info->store_evtchn; | 838 | xen_store_evtchn = xen_start_info->store_evtchn; |
| 836 | xen_store_mfn = xen_start_info->store_mfn; | 839 | xen_store_mfn = xen_start_info->store_mfn; |
| 837 | xen_store_interface = mfn_to_virt(xen_store_mfn); | 840 | xen_store_interface = mfn_to_virt(xen_store_mfn); |
| 841 | xenstored_ready = 1; | ||
| 838 | } | 842 | } |
| 839 | xenstored_ready = 1; | ||
| 840 | } | 843 | } |
| 841 | 844 | ||
| 842 | /* Initialize the interface to xenstore. */ | 845 | /* Initialize the interface to xenstore. */ |
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 73c153092f72..5e9da996a151 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
| @@ -2283,7 +2283,8 @@ static void handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant, | |||
| 2283 | { | 2283 | { |
| 2284 | struct ceph_inode_info *ci = ceph_inode(inode); | 2284 | struct ceph_inode_info *ci = ceph_inode(inode); |
| 2285 | int mds = session->s_mds; | 2285 | int mds = session->s_mds; |
| 2286 | int seq = le32_to_cpu(grant->seq); | 2286 | unsigned seq = le32_to_cpu(grant->seq); |
| 2287 | unsigned issue_seq = le32_to_cpu(grant->issue_seq); | ||
| 2287 | int newcaps = le32_to_cpu(grant->caps); | 2288 | int newcaps = le32_to_cpu(grant->caps); |
| 2288 | int issued, implemented, used, wanted, dirty; | 2289 | int issued, implemented, used, wanted, dirty; |
| 2289 | u64 size = le64_to_cpu(grant->size); | 2290 | u64 size = le64_to_cpu(grant->size); |
| @@ -2295,8 +2296,8 @@ static void handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant, | |||
| 2295 | int revoked_rdcache = 0; | 2296 | int revoked_rdcache = 0; |
| 2296 | int queue_invalidate = 0; | 2297 | int queue_invalidate = 0; |
| 2297 | 2298 | ||
| 2298 | dout("handle_cap_grant inode %p cap %p mds%d seq %d %s\n", | 2299 | dout("handle_cap_grant inode %p cap %p mds%d seq %u/%u %s\n", |
| 2299 | inode, cap, mds, seq, ceph_cap_string(newcaps)); | 2300 | inode, cap, mds, seq, issue_seq, ceph_cap_string(newcaps)); |
| 2300 | dout(" size %llu max_size %llu, i_size %llu\n", size, max_size, | 2301 | dout(" size %llu max_size %llu, i_size %llu\n", size, max_size, |
| 2301 | inode->i_size); | 2302 | inode->i_size); |
| 2302 | 2303 | ||
| @@ -2392,6 +2393,7 @@ static void handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant, | |||
| 2392 | } | 2393 | } |
| 2393 | 2394 | ||
| 2394 | cap->seq = seq; | 2395 | cap->seq = seq; |
| 2396 | cap->issue_seq = issue_seq; | ||
| 2395 | 2397 | ||
| 2396 | /* file layout may have changed */ | 2398 | /* file layout may have changed */ |
| 2397 | ci->i_layout = grant->layout; | 2399 | ci->i_layout = grant->layout; |
| @@ -2774,15 +2776,7 @@ void ceph_handle_caps(struct ceph_mds_session *session, | |||
| 2774 | if (op == CEPH_CAP_OP_IMPORT) | 2776 | if (op == CEPH_CAP_OP_IMPORT) |
| 2775 | __queue_cap_release(session, vino.ino, cap_id, | 2777 | __queue_cap_release(session, vino.ino, cap_id, |
| 2776 | mseq, seq); | 2778 | mseq, seq); |
| 2777 | 2779 | goto flush_cap_releases; | |
| 2778 | /* | ||
| 2779 | * send any full release message to try to move things | ||
| 2780 | * along for the mds (who clearly thinks we still have this | ||
| 2781 | * cap). | ||
| 2782 | */ | ||
| 2783 | ceph_add_cap_releases(mdsc, session); | ||
| 2784 | ceph_send_cap_releases(mdsc, session); | ||
| 2785 | goto done; | ||
| 2786 | } | 2780 | } |
| 2787 | 2781 | ||
| 2788 | /* these will work even if we don't have a cap yet */ | 2782 | /* these will work even if we don't have a cap yet */ |
| @@ -2810,7 +2804,7 @@ void ceph_handle_caps(struct ceph_mds_session *session, | |||
| 2810 | dout(" no cap on %p ino %llx.%llx from mds%d\n", | 2804 | dout(" no cap on %p ino %llx.%llx from mds%d\n", |
| 2811 | inode, ceph_ino(inode), ceph_snap(inode), mds); | 2805 | inode, ceph_ino(inode), ceph_snap(inode), mds); |
| 2812 | spin_unlock(&inode->i_lock); | 2806 | spin_unlock(&inode->i_lock); |
| 2813 | goto done; | 2807 | goto flush_cap_releases; |
| 2814 | } | 2808 | } |
| 2815 | 2809 | ||
| 2816 | /* note that each of these drops i_lock for us */ | 2810 | /* note that each of these drops i_lock for us */ |
| @@ -2834,6 +2828,17 @@ void ceph_handle_caps(struct ceph_mds_session *session, | |||
| 2834 | ceph_cap_op_name(op)); | 2828 | ceph_cap_op_name(op)); |
| 2835 | } | 2829 | } |
| 2836 | 2830 | ||
| 2831 | goto done; | ||
| 2832 | |||
| 2833 | flush_cap_releases: | ||
| 2834 | /* | ||
| 2835 | * send any full release message to try to move things | ||
| 2836 | * along for the mds (who clearly thinks we still have this | ||
| 2837 | * cap). | ||
| 2838 | */ | ||
| 2839 | ceph_add_cap_releases(mdsc, session); | ||
| 2840 | ceph_send_cap_releases(mdsc, session); | ||
| 2841 | |||
| 2837 | done: | 2842 | done: |
| 2838 | mutex_unlock(&session->s_mutex); | 2843 | mutex_unlock(&session->s_mutex); |
| 2839 | done_unlocked: | 2844 | done_unlocked: |
diff --git a/fs/ceph/export.c b/fs/ceph/export.c index 4480cb1c63e7..e38423e82f2e 100644 --- a/fs/ceph/export.c +++ b/fs/ceph/export.c | |||
| @@ -42,32 +42,37 @@ struct ceph_nfs_confh { | |||
| 42 | static int ceph_encode_fh(struct dentry *dentry, u32 *rawfh, int *max_len, | 42 | static int ceph_encode_fh(struct dentry *dentry, u32 *rawfh, int *max_len, |
| 43 | int connectable) | 43 | int connectable) |
| 44 | { | 44 | { |
| 45 | int type; | ||
| 45 | struct ceph_nfs_fh *fh = (void *)rawfh; | 46 | struct ceph_nfs_fh *fh = (void *)rawfh; |
| 46 | struct ceph_nfs_confh *cfh = (void *)rawfh; | 47 | struct ceph_nfs_confh *cfh = (void *)rawfh; |
| 47 | struct dentry *parent = dentry->d_parent; | 48 | struct dentry *parent = dentry->d_parent; |
| 48 | struct inode *inode = dentry->d_inode; | 49 | struct inode *inode = dentry->d_inode; |
| 49 | int type; | 50 | int connected_handle_length = sizeof(*cfh)/4; |
| 51 | int handle_length = sizeof(*fh)/4; | ||
| 50 | 52 | ||
| 51 | /* don't re-export snaps */ | 53 | /* don't re-export snaps */ |
| 52 | if (ceph_snap(inode) != CEPH_NOSNAP) | 54 | if (ceph_snap(inode) != CEPH_NOSNAP) |
| 53 | return -EINVAL; | 55 | return -EINVAL; |
| 54 | 56 | ||
| 55 | if (*max_len >= sizeof(*cfh)) { | 57 | if (*max_len >= connected_handle_length) { |
| 56 | dout("encode_fh %p connectable\n", dentry); | 58 | dout("encode_fh %p connectable\n", dentry); |
| 57 | cfh->ino = ceph_ino(dentry->d_inode); | 59 | cfh->ino = ceph_ino(dentry->d_inode); |
| 58 | cfh->parent_ino = ceph_ino(parent->d_inode); | 60 | cfh->parent_ino = ceph_ino(parent->d_inode); |
| 59 | cfh->parent_name_hash = parent->d_name.hash; | 61 | cfh->parent_name_hash = parent->d_name.hash; |
| 60 | *max_len = sizeof(*cfh); | 62 | *max_len = connected_handle_length; |
| 61 | type = 2; | 63 | type = 2; |
| 62 | } else if (*max_len > sizeof(*fh)) { | 64 | } else if (*max_len >= handle_length) { |
| 63 | if (connectable) | 65 | if (connectable) { |
| 64 | return -ENOSPC; | 66 | *max_len = connected_handle_length; |
| 67 | return 255; | ||
| 68 | } | ||
| 65 | dout("encode_fh %p\n", dentry); | 69 | dout("encode_fh %p\n", dentry); |
| 66 | fh->ino = ceph_ino(dentry->d_inode); | 70 | fh->ino = ceph_ino(dentry->d_inode); |
| 67 | *max_len = sizeof(*fh); | 71 | *max_len = handle_length; |
| 68 | type = 1; | 72 | type = 1; |
| 69 | } else { | 73 | } else { |
| 70 | return -ENOSPC; | 74 | *max_len = handle_length; |
| 75 | return 255; | ||
| 71 | } | 76 | } |
| 72 | return type; | 77 | return type; |
| 73 | } | 78 | } |
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 8c044a4f0457..66e4da6dba22 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c | |||
| @@ -697,7 +697,7 @@ more: | |||
| 697 | * start_request so that a tid has been assigned. | 697 | * start_request so that a tid has been assigned. |
| 698 | */ | 698 | */ |
| 699 | spin_lock(&ci->i_unsafe_lock); | 699 | spin_lock(&ci->i_unsafe_lock); |
| 700 | list_add(&ci->i_unsafe_writes, &req->r_unsafe_item); | 700 | list_add(&req->r_unsafe_item, &ci->i_unsafe_writes); |
| 701 | spin_unlock(&ci->i_unsafe_lock); | 701 | spin_unlock(&ci->i_unsafe_lock); |
| 702 | ceph_get_cap_refs(ci, CEPH_CAP_FILE_WR); | 702 | ceph_get_cap_refs(ci, CEPH_CAP_FILE_WR); |
| 703 | } | 703 | } |
diff --git a/fs/ceph/osd_client.c b/fs/ceph/osd_client.c index dfced1dacbcd..3b5571b8ce22 100644 --- a/fs/ceph/osd_client.c +++ b/fs/ceph/osd_client.c | |||
| @@ -549,7 +549,7 @@ static void __unregister_request(struct ceph_osd_client *osdc, | |||
| 549 | */ | 549 | */ |
| 550 | static void __cancel_request(struct ceph_osd_request *req) | 550 | static void __cancel_request(struct ceph_osd_request *req) |
| 551 | { | 551 | { |
| 552 | if (req->r_sent) { | 552 | if (req->r_sent && req->r_osd) { |
| 553 | ceph_con_revoke(&req->r_osd->o_con, req->r_request); | 553 | ceph_con_revoke(&req->r_osd->o_con, req->r_request); |
| 554 | req->r_sent = 0; | 554 | req->r_sent = 0; |
| 555 | } | 555 | } |
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c index eb7368ebd8cd..3eadd97324b1 100644 --- a/fs/exofs/inode.c +++ b/fs/exofs/inode.c | |||
| @@ -54,6 +54,9 @@ struct page_collect { | |||
| 54 | unsigned nr_pages; | 54 | unsigned nr_pages; |
| 55 | unsigned long length; | 55 | unsigned long length; |
| 56 | loff_t pg_first; /* keep 64bit also in 32-arches */ | 56 | loff_t pg_first; /* keep 64bit also in 32-arches */ |
| 57 | bool read_4_write; /* This means two things: that the read is sync | ||
| 58 | * And the pages should not be unlocked. | ||
| 59 | */ | ||
| 57 | }; | 60 | }; |
| 58 | 61 | ||
| 59 | static void _pcol_init(struct page_collect *pcol, unsigned expected_pages, | 62 | static void _pcol_init(struct page_collect *pcol, unsigned expected_pages, |
| @@ -71,6 +74,7 @@ static void _pcol_init(struct page_collect *pcol, unsigned expected_pages, | |||
| 71 | pcol->nr_pages = 0; | 74 | pcol->nr_pages = 0; |
| 72 | pcol->length = 0; | 75 | pcol->length = 0; |
| 73 | pcol->pg_first = -1; | 76 | pcol->pg_first = -1; |
| 77 | pcol->read_4_write = false; | ||
| 74 | } | 78 | } |
| 75 | 79 | ||
| 76 | static void _pcol_reset(struct page_collect *pcol) | 80 | static void _pcol_reset(struct page_collect *pcol) |
| @@ -347,7 +351,8 @@ static int readpage_strip(void *data, struct page *page) | |||
| 347 | if (PageError(page)) | 351 | if (PageError(page)) |
| 348 | ClearPageError(page); | 352 | ClearPageError(page); |
| 349 | 353 | ||
| 350 | unlock_page(page); | 354 | if (!pcol->read_4_write) |
| 355 | unlock_page(page); | ||
| 351 | EXOFS_DBGMSG("readpage_strip(0x%lx, 0x%lx) empty page," | 356 | EXOFS_DBGMSG("readpage_strip(0x%lx, 0x%lx) empty page," |
| 352 | " splitting\n", inode->i_ino, page->index); | 357 | " splitting\n", inode->i_ino, page->index); |
| 353 | 358 | ||
| @@ -428,6 +433,7 @@ static int _readpage(struct page *page, bool is_sync) | |||
| 428 | /* readpage_strip might call read_exec(,is_sync==false) at several | 433 | /* readpage_strip might call read_exec(,is_sync==false) at several |
| 429 | * places but not if we have a single page. | 434 | * places but not if we have a single page. |
| 430 | */ | 435 | */ |
| 436 | pcol.read_4_write = is_sync; | ||
| 431 | ret = readpage_strip(&pcol, page); | 437 | ret = readpage_strip(&pcol, page); |
| 432 | if (ret) { | 438 | if (ret) { |
| 433 | EXOFS_ERR("_readpage => %d\n", ret); | 439 | EXOFS_ERR("_readpage => %d\n", ret); |
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 5581122bd2c0..ab38fef1c9a1 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c | |||
| @@ -72,22 +72,11 @@ int writeback_in_progress(struct backing_dev_info *bdi) | |||
| 72 | static inline struct backing_dev_info *inode_to_bdi(struct inode *inode) | 72 | static inline struct backing_dev_info *inode_to_bdi(struct inode *inode) |
| 73 | { | 73 | { |
| 74 | struct super_block *sb = inode->i_sb; | 74 | struct super_block *sb = inode->i_sb; |
| 75 | struct backing_dev_info *bdi = inode->i_mapping->backing_dev_info; | ||
| 76 | 75 | ||
| 77 | /* | 76 | if (strcmp(sb->s_type->name, "bdev") == 0) |
| 78 | * For inodes on standard filesystems, we use superblock's bdi. For | 77 | return inode->i_mapping->backing_dev_info; |
| 79 | * inodes on virtual filesystems, we want to use inode mapping's bdi | 78 | |
| 80 | * because they can possibly point to something useful (think about | 79 | return sb->s_bdi; |
| 81 | * block_dev filesystem). | ||
| 82 | */ | ||
| 83 | if (sb->s_bdi && sb->s_bdi != &noop_backing_dev_info) { | ||
| 84 | /* Some device inodes could play dirty tricks. Catch them... */ | ||
| 85 | WARN(bdi != sb->s_bdi && bdi_cap_writeback_dirty(bdi), | ||
| 86 | "Dirtiable inode bdi %s != sb bdi %s\n", | ||
| 87 | bdi->name, sb->s_bdi->name); | ||
| 88 | return sb->s_bdi; | ||
| 89 | } | ||
| 90 | return bdi; | ||
| 91 | } | 80 | } |
| 92 | 81 | ||
| 93 | static void bdi_queue_work(struct backing_dev_info *bdi, | 82 | static void bdi_queue_work(struct backing_dev_info *bdi, |
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index d367af1514ef..cde755cca564 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
| @@ -1354,7 +1354,7 @@ static int fuse_retrieve(struct fuse_conn *fc, struct inode *inode, | |||
| 1354 | loff_t file_size; | 1354 | loff_t file_size; |
| 1355 | unsigned int num; | 1355 | unsigned int num; |
| 1356 | unsigned int offset; | 1356 | unsigned int offset; |
| 1357 | size_t total_len; | 1357 | size_t total_len = 0; |
| 1358 | 1358 | ||
| 1359 | req = fuse_get_req(fc); | 1359 | req = fuse_get_req(fc); |
| 1360 | if (IS_ERR(req)) | 1360 | if (IS_ERR(req)) |
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c index d59c4a65d492..81976ffed7d6 100644 --- a/fs/xfs/linux-2.6/xfs_sync.c +++ b/fs/xfs/linux-2.6/xfs_sync.c | |||
| @@ -668,14 +668,11 @@ xfs_inode_set_reclaim_tag( | |||
| 668 | xfs_perag_put(pag); | 668 | xfs_perag_put(pag); |
| 669 | } | 669 | } |
| 670 | 670 | ||
| 671 | void | 671 | STATIC void |
| 672 | __xfs_inode_clear_reclaim_tag( | 672 | __xfs_inode_clear_reclaim( |
| 673 | xfs_mount_t *mp, | ||
| 674 | xfs_perag_t *pag, | 673 | xfs_perag_t *pag, |
| 675 | xfs_inode_t *ip) | 674 | xfs_inode_t *ip) |
| 676 | { | 675 | { |
| 677 | radix_tree_tag_clear(&pag->pag_ici_root, | ||
| 678 | XFS_INO_TO_AGINO(mp, ip->i_ino), XFS_ICI_RECLAIM_TAG); | ||
| 679 | pag->pag_ici_reclaimable--; | 676 | pag->pag_ici_reclaimable--; |
| 680 | if (!pag->pag_ici_reclaimable) { | 677 | if (!pag->pag_ici_reclaimable) { |
| 681 | /* clear the reclaim tag from the perag radix tree */ | 678 | /* clear the reclaim tag from the perag radix tree */ |
| @@ -689,6 +686,17 @@ __xfs_inode_clear_reclaim_tag( | |||
| 689 | } | 686 | } |
| 690 | } | 687 | } |
| 691 | 688 | ||
| 689 | void | ||
| 690 | __xfs_inode_clear_reclaim_tag( | ||
| 691 | xfs_mount_t *mp, | ||
| 692 | xfs_perag_t *pag, | ||
| 693 | xfs_inode_t *ip) | ||
| 694 | { | ||
| 695 | radix_tree_tag_clear(&pag->pag_ici_root, | ||
| 696 | XFS_INO_TO_AGINO(mp, ip->i_ino), XFS_ICI_RECLAIM_TAG); | ||
| 697 | __xfs_inode_clear_reclaim(pag, ip); | ||
| 698 | } | ||
| 699 | |||
| 692 | /* | 700 | /* |
| 693 | * Inodes in different states need to be treated differently, and the return | 701 | * Inodes in different states need to be treated differently, and the return |
| 694 | * value of xfs_iflush is not sufficient to get this right. The following table | 702 | * value of xfs_iflush is not sufficient to get this right. The following table |
| @@ -838,6 +846,7 @@ reclaim: | |||
| 838 | if (!radix_tree_delete(&pag->pag_ici_root, | 846 | if (!radix_tree_delete(&pag->pag_ici_root, |
| 839 | XFS_INO_TO_AGINO(ip->i_mount, ip->i_ino))) | 847 | XFS_INO_TO_AGINO(ip->i_mount, ip->i_ino))) |
| 840 | ASSERT(0); | 848 | ASSERT(0); |
| 849 | __xfs_inode_clear_reclaim(pag, ip); | ||
| 841 | write_unlock(&pag->pag_ici_lock); | 850 | write_unlock(&pag->pag_ici_lock); |
| 842 | 851 | ||
| 843 | /* | 852 | /* |
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h index 267a86c74e2e..2040e6c4f172 100644 --- a/include/drm/ttm/ttm_bo_api.h +++ b/include/drm/ttm/ttm_bo_api.h | |||
| @@ -246,9 +246,11 @@ struct ttm_buffer_object { | |||
| 246 | 246 | ||
| 247 | atomic_t reserved; | 247 | atomic_t reserved; |
| 248 | 248 | ||
| 249 | |||
| 250 | /** | 249 | /** |
| 251 | * Members protected by the bo::lock | 250 | * Members protected by the bo::lock |
| 251 | * In addition, setting sync_obj to anything else | ||
| 252 | * than NULL requires bo::reserved to be held. This allows for | ||
| 253 | * checking NULL while reserved but not holding bo::lock. | ||
| 252 | */ | 254 | */ |
| 253 | 255 | ||
| 254 | void *sync_obj_arg; | 256 | void *sync_obj_arg; |
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 926b50322a46..4fd978e7eb83 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
| @@ -93,6 +93,7 @@ struct elevator_queue | |||
| 93 | struct elevator_type *elevator_type; | 93 | struct elevator_type *elevator_type; |
| 94 | struct mutex sysfs_lock; | 94 | struct mutex sysfs_lock; |
| 95 | struct hlist_head *hash; | 95 | struct hlist_head *hash; |
| 96 | unsigned int registered:1; | ||
| 96 | }; | 97 | }; |
| 97 | 98 | ||
| 98 | /* | 99 | /* |
diff --git a/include/linux/module.h b/include/linux/module.h index 8a6b9fdc7ffa..aace066bad8f 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -686,17 +686,16 @@ extern int module_sysfs_initialized; | |||
| 686 | 686 | ||
| 687 | 687 | ||
| 688 | #ifdef CONFIG_GENERIC_BUG | 688 | #ifdef CONFIG_GENERIC_BUG |
| 689 | int module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *, | 689 | void module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *, |
| 690 | struct module *); | 690 | struct module *); |
| 691 | void module_bug_cleanup(struct module *); | 691 | void module_bug_cleanup(struct module *); |
| 692 | 692 | ||
| 693 | #else /* !CONFIG_GENERIC_BUG */ | 693 | #else /* !CONFIG_GENERIC_BUG */ |
| 694 | 694 | ||
| 695 | static inline int module_bug_finalize(const Elf_Ehdr *hdr, | 695 | static inline void module_bug_finalize(const Elf_Ehdr *hdr, |
| 696 | const Elf_Shdr *sechdrs, | 696 | const Elf_Shdr *sechdrs, |
| 697 | struct module *mod) | 697 | struct module *mod) |
| 698 | { | 698 | { |
| 699 | return 0; | ||
| 700 | } | 699 | } |
| 701 | static inline void module_bug_cleanup(struct module *mod) {} | 700 | static inline void module_bug_cleanup(struct module *mod) {} |
| 702 | #endif /* CONFIG_GENERIC_BUG */ | 701 | #endif /* CONFIG_GENERIC_BUG */ |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 9fbc54a2585d..83af1f8d8b74 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -454,7 +454,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) | |||
| 454 | * Makes rcu_dereference_check() do the dirty work. | 454 | * Makes rcu_dereference_check() do the dirty work. |
| 455 | */ | 455 | */ |
| 456 | #define rcu_dereference_bh(p) \ | 456 | #define rcu_dereference_bh(p) \ |
| 457 | rcu_dereference_check(p, rcu_read_lock_bh_held()) | 457 | rcu_dereference_check(p, rcu_read_lock_bh_held() || irqs_disabled()) |
| 458 | 458 | ||
| 459 | /** | 459 | /** |
| 460 | * rcu_dereference_sched - fetch RCU-protected pointer, checking for RCU-sched | 460 | * rcu_dereference_sched - fetch RCU-protected pointer, checking for RCU-sched |
diff --git a/include/linux/wait.h b/include/linux/wait.h index 0836ccc57121..3efc9f3f43a0 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
| @@ -614,6 +614,7 @@ int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | |||
| 614 | (wait)->private = current; \ | 614 | (wait)->private = current; \ |
| 615 | (wait)->func = autoremove_wake_function; \ | 615 | (wait)->func = autoremove_wake_function; \ |
| 616 | INIT_LIST_HEAD(&(wait)->task_list); \ | 616 | INIT_LIST_HEAD(&(wait)->task_list); \ |
| 617 | (wait)->flags = 0; \ | ||
| 617 | } while (0) | 618 | } while (0) |
| 618 | 619 | ||
| 619 | /** | 620 | /** |
diff --git a/include/media/videobuf-dma-sg.h b/include/media/videobuf-dma-sg.h index 97e07f46a0fa..aa4ebb42a565 100644 --- a/include/media/videobuf-dma-sg.h +++ b/include/media/videobuf-dma-sg.h | |||
| @@ -48,6 +48,7 @@ struct videobuf_dmabuf { | |||
| 48 | 48 | ||
| 49 | /* for userland buffer */ | 49 | /* for userland buffer */ |
| 50 | int offset; | 50 | int offset; |
| 51 | size_t size; | ||
| 51 | struct page **pages; | 52 | struct page **pages; |
| 52 | 53 | ||
| 53 | /* for kernel buffers */ | 54 | /* for kernel buffers */ |
diff --git a/kernel/module.c b/kernel/module.c index d0b5f8db11b4..ccd641991842 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
| @@ -1537,6 +1537,7 @@ static int __unlink_module(void *_mod) | |||
| 1537 | { | 1537 | { |
| 1538 | struct module *mod = _mod; | 1538 | struct module *mod = _mod; |
| 1539 | list_del(&mod->list); | 1539 | list_del(&mod->list); |
| 1540 | module_bug_cleanup(mod); | ||
| 1540 | return 0; | 1541 | return 0; |
| 1541 | } | 1542 | } |
| 1542 | 1543 | ||
| @@ -2625,6 +2626,7 @@ static struct module *load_module(void __user *umod, | |||
| 2625 | if (err < 0) | 2626 | if (err < 0) |
| 2626 | goto ddebug; | 2627 | goto ddebug; |
| 2627 | 2628 | ||
| 2629 | module_bug_finalize(info.hdr, info.sechdrs, mod); | ||
| 2628 | list_add_rcu(&mod->list, &modules); | 2630 | list_add_rcu(&mod->list, &modules); |
| 2629 | mutex_unlock(&module_mutex); | 2631 | mutex_unlock(&module_mutex); |
| 2630 | 2632 | ||
| @@ -2650,6 +2652,8 @@ static struct module *load_module(void __user *umod, | |||
| 2650 | mutex_lock(&module_mutex); | 2652 | mutex_lock(&module_mutex); |
| 2651 | /* Unlink carefully: kallsyms could be walking list. */ | 2653 | /* Unlink carefully: kallsyms could be walking list. */ |
| 2652 | list_del_rcu(&mod->list); | 2654 | list_del_rcu(&mod->list); |
| 2655 | module_bug_cleanup(mod); | ||
| 2656 | |||
| 2653 | ddebug: | 2657 | ddebug: |
| 2654 | if (!mod->taints) | 2658 | if (!mod->taints) |
| 2655 | dynamic_debug_remove(info.debug); | 2659 | dynamic_debug_remove(info.debug); |
diff --git a/kernel/signal.c b/kernel/signal.c index bded65187780..919562c3d6b7 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
| @@ -2215,6 +2215,14 @@ int copy_siginfo_to_user(siginfo_t __user *to, siginfo_t *from) | |||
| 2215 | #ifdef __ARCH_SI_TRAPNO | 2215 | #ifdef __ARCH_SI_TRAPNO |
| 2216 | err |= __put_user(from->si_trapno, &to->si_trapno); | 2216 | err |= __put_user(from->si_trapno, &to->si_trapno); |
| 2217 | #endif | 2217 | #endif |
| 2218 | #ifdef BUS_MCEERR_AO | ||
| 2219 | /* | ||
| 2220 | * Other callers might not initialize the si_lsb field, | ||
| 2221 | * so check explicitely for the right codes here. | ||
| 2222 | */ | ||
| 2223 | if (from->si_code == BUS_MCEERR_AR || from->si_code == BUS_MCEERR_AO) | ||
| 2224 | err |= __put_user(from->si_addr_lsb, &to->si_addr_lsb); | ||
| 2225 | #endif | ||
| 2218 | break; | 2226 | break; |
| 2219 | case __SI_CHLD: | 2227 | case __SI_CHLD: |
| 2220 | err |= __put_user(from->si_pid, &to->si_pid); | 2228 | err |= __put_user(from->si_pid, &to->si_pid); |
diff --git a/kernel/smp.c b/kernel/smp.c index 75c970c715d3..ed6aacfcb7ef 100644 --- a/kernel/smp.c +++ b/kernel/smp.c | |||
| @@ -365,9 +365,10 @@ call: | |||
| 365 | EXPORT_SYMBOL_GPL(smp_call_function_any); | 365 | EXPORT_SYMBOL_GPL(smp_call_function_any); |
| 366 | 366 | ||
| 367 | /** | 367 | /** |
| 368 | * __smp_call_function_single(): Run a function on another CPU | 368 | * __smp_call_function_single(): Run a function on a specific CPU |
| 369 | * @cpu: The CPU to run on. | 369 | * @cpu: The CPU to run on. |
| 370 | * @data: Pre-allocated and setup data structure | 370 | * @data: Pre-allocated and setup data structure |
| 371 | * @wait: If true, wait until function has completed on specified CPU. | ||
| 371 | * | 372 | * |
| 372 | * Like smp_call_function_single(), but allow caller to pass in a | 373 | * Like smp_call_function_single(), but allow caller to pass in a |
| 373 | * pre-allocated data structure. Useful for embedding @data inside | 374 | * pre-allocated data structure. Useful for embedding @data inside |
| @@ -376,8 +377,10 @@ EXPORT_SYMBOL_GPL(smp_call_function_any); | |||
| 376 | void __smp_call_function_single(int cpu, struct call_single_data *data, | 377 | void __smp_call_function_single(int cpu, struct call_single_data *data, |
| 377 | int wait) | 378 | int wait) |
| 378 | { | 379 | { |
| 379 | csd_lock(data); | 380 | unsigned int this_cpu; |
| 381 | unsigned long flags; | ||
| 380 | 382 | ||
| 383 | this_cpu = get_cpu(); | ||
| 381 | /* | 384 | /* |
| 382 | * Can deadlock when called with interrupts disabled. | 385 | * Can deadlock when called with interrupts disabled. |
| 383 | * We allow cpu's that are not yet online though, as no one else can | 386 | * We allow cpu's that are not yet online though, as no one else can |
| @@ -387,7 +390,15 @@ void __smp_call_function_single(int cpu, struct call_single_data *data, | |||
| 387 | WARN_ON_ONCE(cpu_online(smp_processor_id()) && wait && irqs_disabled() | 390 | WARN_ON_ONCE(cpu_online(smp_processor_id()) && wait && irqs_disabled() |
| 388 | && !oops_in_progress); | 391 | && !oops_in_progress); |
| 389 | 392 | ||
| 390 | generic_exec_single(cpu, data, wait); | 393 | if (cpu == this_cpu) { |
| 394 | local_irq_save(flags); | ||
| 395 | data->func(data->info); | ||
| 396 | local_irq_restore(flags); | ||
| 397 | } else { | ||
| 398 | csd_lock(data); | ||
| 399 | generic_exec_single(cpu, data, wait); | ||
| 400 | } | ||
| 401 | put_cpu(); | ||
| 391 | } | 402 | } |
| 392 | 403 | ||
| 393 | /** | 404 | /** |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index f88552c6d227..3a45c224770f 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
| @@ -2485,7 +2485,7 @@ static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int | |||
| 2485 | kbuf[left] = 0; | 2485 | kbuf[left] = 0; |
| 2486 | } | 2486 | } |
| 2487 | 2487 | ||
| 2488 | for (; left && vleft--; i++, min++, max++, first=0) { | 2488 | for (; left && vleft--; i++, first = 0) { |
| 2489 | unsigned long val; | 2489 | unsigned long val; |
| 2490 | 2490 | ||
| 2491 | if (write) { | 2491 | if (write) { |
| @@ -72,8 +72,8 @@ static const struct bug_entry *module_find_bug(unsigned long bugaddr) | |||
| 72 | return NULL; | 72 | return NULL; |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | int module_bug_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, | 75 | void module_bug_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, |
| 76 | struct module *mod) | 76 | struct module *mod) |
| 77 | { | 77 | { |
| 78 | char *secstrings; | 78 | char *secstrings; |
| 79 | unsigned int i; | 79 | unsigned int i; |
| @@ -97,8 +97,6 @@ int module_bug_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, | |||
| 97 | * could potentially lead to deadlock and thus be counter-productive. | 97 | * could potentially lead to deadlock and thus be counter-productive. |
| 98 | */ | 98 | */ |
| 99 | list_add(&mod->bug_list, &module_bug_list); | 99 | list_add(&mod->bug_list, &module_bug_list); |
| 100 | |||
| 101 | return 0; | ||
| 102 | } | 100 | } |
| 103 | 101 | ||
| 104 | void module_bug_cleanup(struct module *mod) | 102 | void module_bug_cleanup(struct module *mod) |
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 3eed583895a6..9be3cf8a5da4 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
| @@ -3587,9 +3587,13 @@ unlock: | |||
| 3587 | 3587 | ||
| 3588 | static void mem_cgroup_threshold(struct mem_cgroup *memcg) | 3588 | static void mem_cgroup_threshold(struct mem_cgroup *memcg) |
| 3589 | { | 3589 | { |
| 3590 | __mem_cgroup_threshold(memcg, false); | 3590 | while (memcg) { |
| 3591 | if (do_swap_account) | 3591 | __mem_cgroup_threshold(memcg, false); |
| 3592 | __mem_cgroup_threshold(memcg, true); | 3592 | if (do_swap_account) |
| 3593 | __mem_cgroup_threshold(memcg, true); | ||
| 3594 | |||
| 3595 | memcg = parent_mem_cgroup(memcg); | ||
| 3596 | } | ||
| 3593 | } | 3597 | } |
| 3594 | 3598 | ||
| 3595 | static int compare_thresholds(const void *a, const void *b) | 3599 | static int compare_thresholds(const void *a, const void *b) |
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 9c26eeca1342..757f6b0accfe 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
| @@ -183,7 +183,7 @@ EXPORT_SYMBOL_GPL(hwpoison_filter); | |||
| 183 | * signal. | 183 | * signal. |
| 184 | */ | 184 | */ |
| 185 | static int kill_proc_ao(struct task_struct *t, unsigned long addr, int trapno, | 185 | static int kill_proc_ao(struct task_struct *t, unsigned long addr, int trapno, |
| 186 | unsigned long pfn) | 186 | unsigned long pfn, struct page *page) |
| 187 | { | 187 | { |
| 188 | struct siginfo si; | 188 | struct siginfo si; |
| 189 | int ret; | 189 | int ret; |
| @@ -198,7 +198,7 @@ static int kill_proc_ao(struct task_struct *t, unsigned long addr, int trapno, | |||
| 198 | #ifdef __ARCH_SI_TRAPNO | 198 | #ifdef __ARCH_SI_TRAPNO |
| 199 | si.si_trapno = trapno; | 199 | si.si_trapno = trapno; |
| 200 | #endif | 200 | #endif |
| 201 | si.si_addr_lsb = PAGE_SHIFT; | 201 | si.si_addr_lsb = compound_order(compound_head(page)) + PAGE_SHIFT; |
| 202 | /* | 202 | /* |
| 203 | * Don't use force here, it's convenient if the signal | 203 | * Don't use force here, it's convenient if the signal |
| 204 | * can be temporarily blocked. | 204 | * can be temporarily blocked. |
| @@ -235,7 +235,7 @@ void shake_page(struct page *p, int access) | |||
| 235 | int nr; | 235 | int nr; |
| 236 | do { | 236 | do { |
| 237 | nr = shrink_slab(1000, GFP_KERNEL, 1000); | 237 | nr = shrink_slab(1000, GFP_KERNEL, 1000); |
| 238 | if (page_count(p) == 0) | 238 | if (page_count(p) == 1) |
| 239 | break; | 239 | break; |
| 240 | } while (nr > 10); | 240 | } while (nr > 10); |
| 241 | } | 241 | } |
| @@ -327,7 +327,7 @@ static void add_to_kill(struct task_struct *tsk, struct page *p, | |||
| 327 | * wrong earlier. | 327 | * wrong earlier. |
| 328 | */ | 328 | */ |
| 329 | static void kill_procs_ao(struct list_head *to_kill, int doit, int trapno, | 329 | static void kill_procs_ao(struct list_head *to_kill, int doit, int trapno, |
| 330 | int fail, unsigned long pfn) | 330 | int fail, struct page *page, unsigned long pfn) |
| 331 | { | 331 | { |
| 332 | struct to_kill *tk, *next; | 332 | struct to_kill *tk, *next; |
| 333 | 333 | ||
| @@ -352,7 +352,7 @@ static void kill_procs_ao(struct list_head *to_kill, int doit, int trapno, | |||
| 352 | * process anyways. | 352 | * process anyways. |
| 353 | */ | 353 | */ |
| 354 | else if (kill_proc_ao(tk->tsk, tk->addr, trapno, | 354 | else if (kill_proc_ao(tk->tsk, tk->addr, trapno, |
| 355 | pfn) < 0) | 355 | pfn, page) < 0) |
| 356 | printk(KERN_ERR | 356 | printk(KERN_ERR |
| 357 | "MCE %#lx: Cannot send advisory machine check signal to %s:%d\n", | 357 | "MCE %#lx: Cannot send advisory machine check signal to %s:%d\n", |
| 358 | pfn, tk->tsk->comm, tk->tsk->pid); | 358 | pfn, tk->tsk->comm, tk->tsk->pid); |
| @@ -928,7 +928,7 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn, | |||
| 928 | * any accesses to the poisoned memory. | 928 | * any accesses to the poisoned memory. |
| 929 | */ | 929 | */ |
| 930 | kill_procs_ao(&tokill, !!PageDirty(hpage), trapno, | 930 | kill_procs_ao(&tokill, !!PageDirty(hpage), trapno, |
| 931 | ret != SWAP_SUCCESS, pfn); | 931 | ret != SWAP_SUCCESS, p, pfn); |
| 932 | 932 | ||
| 933 | return ret; | 933 | return ret; |
| 934 | } | 934 | } |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a8cfa9cc6e86..f12ad1836abe 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
| @@ -5182,9 +5182,9 @@ void *__init alloc_large_system_hash(const char *tablename, | |||
| 5182 | if (!table) | 5182 | if (!table) |
| 5183 | panic("Failed to allocate %s hash table\n", tablename); | 5183 | panic("Failed to allocate %s hash table\n", tablename); |
| 5184 | 5184 | ||
| 5185 | printk(KERN_INFO "%s hash table entries: %d (order: %d, %lu bytes)\n", | 5185 | printk(KERN_INFO "%s hash table entries: %ld (order: %d, %lu bytes)\n", |
| 5186 | tablename, | 5186 | tablename, |
| 5187 | (1U << log2qty), | 5187 | (1UL << log2qty), |
| 5188 | ilog2(size) - PAGE_SHIFT, | 5188 | ilog2(size) - PAGE_SHIFT, |
| 5189 | size); | 5189 | size); |
| 5190 | 5190 | ||
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 4f1fa77c1feb..1950e19af1cf 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
| @@ -1017,7 +1017,7 @@ builtin-revert.o wt-status.o: wt-status.h | |||
| 1017 | # we compile into subdirectories. if the target directory is not the source directory, they might not exists. So | 1017 | # we compile into subdirectories. if the target directory is not the source directory, they might not exists. So |
| 1018 | # we depend the various files onto their directories. | 1018 | # we depend the various files onto their directories. |
| 1019 | DIRECTORY_DEPS = $(LIB_OBJS) $(BUILTIN_OBJS) $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h | 1019 | DIRECTORY_DEPS = $(LIB_OBJS) $(BUILTIN_OBJS) $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h |
| 1020 | $(DIRECTORY_DEPS): $(sort $(dir $(DIRECTORY_DEPS))) | 1020 | $(DIRECTORY_DEPS): | $(sort $(dir $(DIRECTORY_DEPS))) |
| 1021 | # In the second step, we make a rule to actually create these directories | 1021 | # In the second step, we make a rule to actually create these directories |
| 1022 | $(sort $(dir $(DIRECTORY_DEPS))): | 1022 | $(sort $(dir $(DIRECTORY_DEPS))): |
| 1023 | $(QUIET_MKDIR)$(MKDIR) -p $@ 2>/dev/null | 1023 | $(QUIET_MKDIR)$(MKDIR) -p $@ 2>/dev/null |
diff --git a/tools/perf/util/trace-event-scripting.c b/tools/perf/util/trace-event-scripting.c index 7ea983acfaea..f7af2fca965d 100644 --- a/tools/perf/util/trace-event-scripting.c +++ b/tools/perf/util/trace-event-scripting.c | |||
| @@ -97,7 +97,7 @@ void setup_python_scripting(void) | |||
| 97 | register_python_scripting(&python_scripting_unsupported_ops); | 97 | register_python_scripting(&python_scripting_unsupported_ops); |
| 98 | } | 98 | } |
| 99 | #else | 99 | #else |
| 100 | struct scripting_ops python_scripting_ops; | 100 | extern struct scripting_ops python_scripting_ops; |
| 101 | 101 | ||
| 102 | void setup_python_scripting(void) | 102 | void setup_python_scripting(void) |
| 103 | { | 103 | { |
| @@ -158,7 +158,7 @@ void setup_perl_scripting(void) | |||
| 158 | register_perl_scripting(&perl_scripting_unsupported_ops); | 158 | register_perl_scripting(&perl_scripting_unsupported_ops); |
| 159 | } | 159 | } |
| 160 | #else | 160 | #else |
| 161 | struct scripting_ops perl_scripting_ops; | 161 | extern struct scripting_ops perl_scripting_ops; |
| 162 | 162 | ||
| 163 | void setup_perl_scripting(void) | 163 | void setup_perl_scripting(void) |
| 164 | { | 164 | { |
diff --git a/tools/perf/util/ui/browsers/hists.c b/tools/perf/util/ui/browsers/hists.c index dafdf6775d77..6866aa4c41e0 100644 --- a/tools/perf/util/ui/browsers/hists.c +++ b/tools/perf/util/ui/browsers/hists.c | |||
| @@ -773,7 +773,7 @@ int hists__browse(struct hists *self, const char *helpline, const char *ev_name) | |||
| 773 | 773 | ||
| 774 | switch (key) { | 774 | switch (key) { |
| 775 | case 'a': | 775 | case 'a': |
| 776 | if (browser->selection->map == NULL && | 776 | if (browser->selection->map == NULL || |
| 777 | browser->selection->map->dso->annotate_warned) | 777 | browser->selection->map->dso->annotate_warned) |
| 778 | continue; | 778 | continue; |
| 779 | goto do_annotate; | 779 | goto do_annotate; |
