diff --git a/[refs] b/[refs] index 0674490de75d..43b4dfaf3be1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 68394bfbe507f266bb13d8152976218a97f51b45 +refs/heads/master: 00ba81c15276cd572c5a68b07936de4f1ae8597a diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index d1d9ae6173b8..03df1d15ebf3 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -4857,7 +4857,6 @@ M: Kevin Hilman L: linux-omap@vger.kernel.org S: Maintained F: arch/arm/*omap*/*pm* -F: drivers/cpufreq/omap-cpufreq.c OMAP POWERDOMAIN/CLOCKDOMAIN SOC ADAPTATION LAYER SUPPORT M: Rajendra Nayak diff --git a/trunk/arch/arm/configs/omap2plus_defconfig b/trunk/arch/arm/configs/omap2plus_defconfig index 11828e632532..9854ff4279e0 100644 --- a/trunk/arch/arm/configs/omap2plus_defconfig +++ b/trunk/arch/arm/configs/omap2plus_defconfig @@ -176,6 +176,7 @@ CONFIG_USB_ANNOUNCE_NEW_DEVICES=y CONFIG_USB_DEVICEFS=y CONFIG_USB_SUSPEND=y CONFIG_USB_MON=y +CONFIG_USB_EHCI_HCD=y CONFIG_USB_WDM=y CONFIG_USB_STORAGE=y CONFIG_USB_LIBUSUAL=y diff --git a/trunk/arch/arm/mach-omap2/clockdomain.h b/trunk/arch/arm/mach-omap2/clockdomain.h index 6227e9505c2d..f7b58609bad8 100644 --- a/trunk/arch/arm/mach-omap2/clockdomain.h +++ b/trunk/arch/arm/mach-omap2/clockdomain.h @@ -31,16 +31,12 @@ * * CLKDM_NO_AUTODEPS: Prevent "autodeps" from being added/removed from this * clockdomain. (Currently, this applies to OMAP3 clockdomains only.) - * CLKDM_ACTIVE_WITH_MPU: The PRCM guarantees that this clockdomain is - * active whenever the MPU is active. True for interconnects and - * the WKUP clockdomains. */ #define CLKDM_CAN_FORCE_SLEEP (1 << 0) #define CLKDM_CAN_FORCE_WAKEUP (1 << 1) #define CLKDM_CAN_ENABLE_AUTO (1 << 2) #define CLKDM_CAN_DISABLE_AUTO (1 << 3) #define CLKDM_NO_AUTODEPS (1 << 4) -#define CLKDM_ACTIVE_WITH_MPU (1 << 5) #define CLKDM_CAN_HWSUP (CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_DISABLE_AUTO) #define CLKDM_CAN_SWSUP (CLKDM_CAN_FORCE_SLEEP | CLKDM_CAN_FORCE_WAKEUP) diff --git a/trunk/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c b/trunk/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c index 4972219653ce..839145e1cfbe 100644 --- a/trunk/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c +++ b/trunk/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c @@ -88,5 +88,4 @@ struct clockdomain wkup_common_clkdm = { .name = "wkup_clkdm", .pwrdm = { .name = "wkup_pwrdm" }, .dep_bit = OMAP_EN_WKUP_SHIFT, - .flags = CLKDM_ACTIVE_WITH_MPU, }; diff --git a/trunk/arch/arm/mach-omap2/clockdomains44xx_data.c b/trunk/arch/arm/mach-omap2/clockdomains44xx_data.c index 7f2133abe7d3..c53425847493 100644 --- a/trunk/arch/arm/mach-omap2/clockdomains44xx_data.c +++ b/trunk/arch/arm/mach-omap2/clockdomains44xx_data.c @@ -381,7 +381,7 @@ static struct clockdomain l4_wkup_44xx_clkdm = { .cm_inst = OMAP4430_PRM_WKUP_CM_INST, .clkdm_offs = OMAP4430_PRM_WKUP_CM_WKUP_CDOFFS, .dep_bit = OMAP4430_L4WKUP_STATDEP_SHIFT, - .flags = CLKDM_CAN_HWSUP | CLKDM_ACTIVE_WITH_MPU, + .flags = CLKDM_CAN_HWSUP, }; static struct clockdomain emu_sys_44xx_clkdm = { diff --git a/trunk/arch/arm/mach-omap2/omap_hwmod.c b/trunk/arch/arm/mach-omap2/omap_hwmod.c index 2d710f50fca2..773193670ea2 100644 --- a/trunk/arch/arm/mach-omap2/omap_hwmod.c +++ b/trunk/arch/arm/mach-omap2/omap_hwmod.c @@ -1124,18 +1124,15 @@ static struct omap_hwmod_addr_space * __init _find_mpu_rt_addr_space(struct omap * _enable_sysc - try to bring a module out of idle via OCP_SYSCONFIG * @oh: struct omap_hwmod * * - * Ensure that the OCP_SYSCONFIG register for the IP block represented - * by @oh is set to indicate to the PRCM that the IP block is active. - * Usually this means placing the module into smart-idle mode and - * smart-standby, but if there is a bug in the automatic idle handling - * for the IP block, it may need to be placed into the force-idle or - * no-idle variants of these modes. No return value. + * If module is marked as SWSUP_SIDLE, force the module out of slave + * idle; otherwise, configure it for smart-idle. If module is marked + * as SWSUP_MSUSPEND, force the module out of master standby; + * otherwise, configure it for smart-standby. No return value. */ static void _enable_sysc(struct omap_hwmod *oh) { u8 idlemode, sf; u32 v; - bool clkdm_act; if (!oh->class->sysc) return; @@ -1144,16 +1141,8 @@ static void _enable_sysc(struct omap_hwmod *oh) sf = oh->class->sysc->sysc_flags; if (sf & SYSC_HAS_SIDLEMODE) { - clkdm_act = ((oh->clkdm && - oh->clkdm->flags & CLKDM_ACTIVE_WITH_MPU) || - (oh->_clk && oh->_clk->clkdm && - oh->_clk->clkdm->flags & CLKDM_ACTIVE_WITH_MPU)); - if (clkdm_act && !(oh->class->sysc->idlemodes & - (SIDLE_SMART | SIDLE_SMART_WKUP))) - idlemode = HWMOD_IDLEMODE_FORCE; - else - idlemode = (oh->flags & HWMOD_SWSUP_SIDLE) ? - HWMOD_IDLEMODE_NO : HWMOD_IDLEMODE_SMART; + idlemode = (oh->flags & HWMOD_SWSUP_SIDLE) ? + HWMOD_IDLEMODE_NO : HWMOD_IDLEMODE_SMART; _set_slave_idlemode(oh, idlemode, &v); } @@ -1219,13 +1208,8 @@ static void _idle_sysc(struct omap_hwmod *oh) sf = oh->class->sysc->sysc_flags; if (sf & SYSC_HAS_SIDLEMODE) { - /* XXX What about HWMOD_IDLEMODE_SMART_WKUP? */ - if (oh->flags & HWMOD_SWSUP_SIDLE || - !(oh->class->sysc->idlemodes & - (SIDLE_SMART | SIDLE_SMART_WKUP))) - idlemode = HWMOD_IDLEMODE_FORCE; - else - idlemode = HWMOD_IDLEMODE_SMART; + idlemode = (oh->flags & HWMOD_SWSUP_SIDLE) ? + HWMOD_IDLEMODE_FORCE : HWMOD_IDLEMODE_SMART; _set_slave_idlemode(oh, idlemode, &v); } diff --git a/trunk/arch/arm/mach-shmobile/platsmp.c b/trunk/arch/arm/mach-shmobile/platsmp.c index fde0d23121dc..e859fcdb3d58 100644 --- a/trunk/arch/arm/mach-shmobile/platsmp.c +++ b/trunk/arch/arm/mach-shmobile/platsmp.c @@ -22,13 +22,8 @@ #include #include -#ifdef CONFIG_ARCH_SH73A0 #define is_sh73a0() (machine_is_ag5evm() || machine_is_kota2() || \ of_machine_is_compatible("renesas,sh73a0")) -#else -#define is_sh73a0() (0) -#endif - #define is_r8a7779() machine_is_marzen() #ifdef CONFIG_ARCH_EMEV2 diff --git a/trunk/arch/arm/mach-ux500/board-mop500.c b/trunk/arch/arm/mach-ux500/board-mop500.c index 4fd93f5c49ec..1509a3cb5833 100644 --- a/trunk/arch/arm/mach-ux500/board-mop500.c +++ b/trunk/arch/arm/mach-ux500/board-mop500.c @@ -625,6 +625,11 @@ static struct platform_device *snowball_platform_devs[] __initdata = { &ab8500_device, }; +static struct platform_device *snowball_of_platform_devs[] __initdata = { + &snowball_led_dev, + &snowball_key_dev, +}; + static void __init mop500_init_machine(void) { struct device *parent = NULL; @@ -764,11 +769,6 @@ MACHINE_END #ifdef CONFIG_MACH_UX500_DT -static struct platform_device *snowball_of_platform_devs[] __initdata = { - &snowball_led_dev, - &snowball_key_dev, -}; - struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { /* Requires DMA and call-back bindings. */ OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat), @@ -786,8 +786,6 @@ struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e000, "gpio.6", NULL), OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e080, "gpio.7", NULL), OF_DEV_AUXDATA("st,nomadik-gpio", 0xa03fe000, "gpio.8", NULL), - /* Requires device name bindings. */ - OF_DEV_AUXDATA("stericsson,nmk_pinctrl", 0, "pinctrl-db8500", NULL), {}, }; diff --git a/trunk/arch/arm/mach-ux500/timer.c b/trunk/arch/arm/mach-ux500/timer.c index 66e7f00884ab..741e71feca78 100644 --- a/trunk/arch/arm/mach-ux500/timer.c +++ b/trunk/arch/arm/mach-ux500/timer.c @@ -63,10 +63,8 @@ static void __init ux500_timer_init(void) /* TODO: Once MTU has been DT:ed place code above into else. */ if (of_have_populated_dt()) { -#ifdef CONFIG_OF np = of_find_matching_node(NULL, prcmu_timer_of_match); if (!np) -#endif goto dt_fail; tmp_base = of_iomap(np, 0); diff --git a/trunk/arch/h8300/include/asm/pgtable.h b/trunk/arch/h8300/include/asm/pgtable.h index 62ef17676b40..a09230a08e02 100644 --- a/trunk/arch/h8300/include/asm/pgtable.h +++ b/trunk/arch/h8300/include/asm/pgtable.h @@ -70,7 +70,4 @@ extern int is_in_rom(unsigned long); #define VMALLOC_END 0xffffffff #define arch_enter_lazy_cpu_mode() do {} while (0) - -#include - #endif /* _H8300_PGTABLE_H */ diff --git a/trunk/arch/h8300/include/asm/uaccess.h b/trunk/arch/h8300/include/asm/uaccess.h index 8725d1ad4272..356068cd0879 100644 --- a/trunk/arch/h8300/include/asm/uaccess.h +++ b/trunk/arch/h8300/include/asm/uaccess.h @@ -100,6 +100,7 @@ extern int __put_user_bad(void); break; \ default: \ __gu_err = __get_user_bad(); \ + __gu_val = 0; \ break; \ } \ (x) = __gu_val; \ @@ -158,6 +159,4 @@ clear_user(void *to, unsigned long n) return 0; } -#define __clear_user clear_user - #endif /* _H8300_UACCESS_H */ diff --git a/trunk/arch/h8300/kernel/signal.c b/trunk/arch/h8300/kernel/signal.c index 5adaadaf9218..fca10378701b 100644 --- a/trunk/arch/h8300/kernel/signal.c +++ b/trunk/arch/h8300/kernel/signal.c @@ -447,7 +447,7 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, * want to handle. Thus you cannot kill init even with a SIGKILL even by * mistake. */ -static void do_signal(struct pt_regs *regs) +statis void do_signal(struct pt_regs *regs) { siginfo_t info; int signr; diff --git a/trunk/arch/h8300/kernel/time.c b/trunk/arch/h8300/kernel/time.c index e0f74191d553..32263a138aa6 100644 --- a/trunk/arch/h8300/kernel/time.c +++ b/trunk/arch/h8300/kernel/time.c @@ -27,7 +27,6 @@ #include #include -#include #include #define TICK_SIZE (tick_nsec / 1000) diff --git a/trunk/arch/mips/pci/pci-lantiq.c b/trunk/arch/mips/pci/pci-lantiq.c index 075d87acd12a..ea453532a33c 100644 --- a/trunk/arch/mips/pci/pci-lantiq.c +++ b/trunk/arch/mips/pci/pci-lantiq.c @@ -129,7 +129,7 @@ static int __devinit ltq_pci_startup(struct platform_device *pdev) /* setup reset gpio used by pci */ reset_gpio = of_get_named_gpio(node, "gpio-reset", 0); - if (gpio_is_valid(reset_gpio)) + if (reset_gpio > 0) devm_gpio_request(&pdev->dev, reset_gpio, "pci-reset"); /* enable auto-switching between PCI and EBU */ @@ -192,7 +192,7 @@ static int __devinit ltq_pci_startup(struct platform_device *pdev) ltq_ebu_w32(ltq_ebu_r32(LTQ_EBU_PCC_IEN) | 0x10, LTQ_EBU_PCC_IEN); /* toggle reset pin */ - if (gpio_is_valid(reset_gpio)) { + if (reset_gpio > 0) { __gpio_set_value(reset_gpio, 0); wmb(); mdelay(1); diff --git a/trunk/arch/mn10300/include/asm/ptrace.h b/trunk/arch/mn10300/include/asm/ptrace.h index 44251b974f1d..55b79ef10028 100644 --- a/trunk/arch/mn10300/include/asm/ptrace.h +++ b/trunk/arch/mn10300/include/asm/ptrace.h @@ -81,6 +81,9 @@ struct pt_regs { #define PTRACE_GETFPREGS 14 #define PTRACE_SETFPREGS 15 +/* options set using PTRACE_SETOPTIONS */ +#define PTRACE_O_TRACESYSGOOD 0x00000001 + #ifdef __KERNEL__ #define user_mode(regs) (((regs)->epsw & EPSW_nSL) == EPSW_nSL) diff --git a/trunk/arch/mn10300/include/asm/thread_info.h b/trunk/arch/mn10300/include/asm/thread_info.h index ac519bbd42ff..08251d6f6b11 100644 --- a/trunk/arch/mn10300/include/asm/thread_info.h +++ b/trunk/arch/mn10300/include/asm/thread_info.h @@ -123,7 +123,7 @@ static inline unsigned long current_stack_pointer(void) } #ifndef CONFIG_KGDB -void arch_release_thread_info(struct thread_info *ti); +void arch_release_thread_info(struct thread_info *ti) #endif #define get_thread_info(ti) get_task_struct((ti)->task) #define put_thread_info(ti) put_task_struct((ti)->task) diff --git a/trunk/arch/mn10300/include/asm/timex.h b/trunk/arch/mn10300/include/asm/timex.h index f8e66425cbf8..bd4e90dfe6c2 100644 --- a/trunk/arch/mn10300/include/asm/timex.h +++ b/trunk/arch/mn10300/include/asm/timex.h @@ -11,6 +11,7 @@ #ifndef _ASM_TIMEX_H #define _ASM_TIMEX_H +#include #include #define TICK_SIZE (tick_nsec / 1000) @@ -29,6 +30,16 @@ static inline cycles_t get_cycles(void) extern int init_clockevents(void); extern int init_clocksource(void); +static inline void setup_jiffies_interrupt(int irq, + struct irqaction *action) +{ + u16 tmp; + setup_irq(irq, action); + set_intr_level(irq, NUM2GxICR_LEVEL(CONFIG_TIMER_IRQ_LEVEL)); + GxICR(irq) |= GxICR_ENABLE | GxICR_DETECT | GxICR_REQUEST; + tmp = GxICR(irq); +} + #endif /* __KERNEL__ */ #endif /* _ASM_TIMEX_H */ diff --git a/trunk/arch/mn10300/kernel/cevt-mn10300.c b/trunk/arch/mn10300/kernel/cevt-mn10300.c index ccce35e3e179..69cae0260786 100644 --- a/trunk/arch/mn10300/kernel/cevt-mn10300.c +++ b/trunk/arch/mn10300/kernel/cevt-mn10300.c @@ -70,16 +70,6 @@ static void event_handler(struct clock_event_device *dev) { } -static inline void setup_jiffies_interrupt(int irq, - struct irqaction *action) -{ - u16 tmp; - setup_irq(irq, action); - set_intr_level(irq, NUM2GxICR_LEVEL(CONFIG_TIMER_IRQ_LEVEL)); - GxICR(irq) |= GxICR_ENABLE | GxICR_DETECT | GxICR_REQUEST; - tmp = GxICR(irq); -} - int __init init_clockevents(void) { struct clock_event_device *cd; diff --git a/trunk/arch/mn10300/kernel/internal.h b/trunk/arch/mn10300/kernel/internal.h index 2df440105a80..a5ac755dd69f 100644 --- a/trunk/arch/mn10300/kernel/internal.h +++ b/trunk/arch/mn10300/kernel/internal.h @@ -9,8 +9,6 @@ * 2 of the Licence, or (at your option) any later version. */ -#include - struct clocksource; struct clock_event_device; diff --git a/trunk/arch/mn10300/kernel/irq.c b/trunk/arch/mn10300/kernel/irq.c index 35932a8de8b8..2381df83bd00 100644 --- a/trunk/arch/mn10300/kernel/irq.c +++ b/trunk/arch/mn10300/kernel/irq.c @@ -170,9 +170,9 @@ mn10300_cpupic_setaffinity(struct irq_data *d, const struct cpumask *mask, case SC1TXIRQ: #ifdef CONFIG_MN10300_TTYSM1_TIMER12 case TM12IRQ: -#elif defined(CONFIG_MN10300_TTYSM1_TIMER9) +#elif CONFIG_MN10300_TTYSM1_TIMER9 case TM9IRQ: -#elif defined(CONFIG_MN10300_TTYSM1_TIMER3) +#elif CONFIG_MN10300_TTYSM1_TIMER3 case TM3IRQ: #endif /* CONFIG_MN10300_TTYSM1_TIMER12 */ #endif /* CONFIG_MN10300_TTYSM1 */ diff --git a/trunk/arch/mn10300/kernel/traps.c b/trunk/arch/mn10300/kernel/traps.c index b900e5afa0ae..94a9c6d53e1b 100644 --- a/trunk/arch/mn10300/kernel/traps.c +++ b/trunk/arch/mn10300/kernel/traps.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/mn10300/mm/dma-alloc.c b/trunk/arch/mn10300/mm/dma-alloc.c index e244ebe637e1..159acb02cfd4 100644 --- a/trunk/arch/mn10300/mm/dma-alloc.c +++ b/trunk/arch/mn10300/mm/dma-alloc.c @@ -15,7 +15,6 @@ #include #include #include -#include #include static unsigned long pci_sram_allocated = 0xbc000000; diff --git a/trunk/arch/mn10300/unit-asb2303/include/unit/timex.h b/trunk/arch/mn10300/unit-asb2303/include/unit/timex.h index c37f9832cf17..cc18fe7d8b90 100644 --- a/trunk/arch/mn10300/unit-asb2303/include/unit/timex.h +++ b/trunk/arch/mn10300/unit-asb2303/include/unit/timex.h @@ -11,6 +11,10 @@ #ifndef _ASM_UNIT_TIMEX_H #define _ASM_UNIT_TIMEX_H +#ifndef __ASSEMBLY__ +#include +#endif /* __ASSEMBLY__ */ + #include #include #include diff --git a/trunk/arch/mn10300/unit-asb2303/smc91111.c b/trunk/arch/mn10300/unit-asb2303/smc91111.c index 53677694b165..43c246439413 100644 --- a/trunk/arch/mn10300/unit-asb2303/smc91111.c +++ b/trunk/arch/mn10300/unit-asb2303/smc91111.c @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/trunk/arch/mn10300/unit-asb2305/include/unit/timex.h b/trunk/arch/mn10300/unit-asb2305/include/unit/timex.h index 4cefc224f448..758af30d1a16 100644 --- a/trunk/arch/mn10300/unit-asb2305/include/unit/timex.h +++ b/trunk/arch/mn10300/unit-asb2305/include/unit/timex.h @@ -11,6 +11,10 @@ #ifndef _ASM_UNIT_TIMEX_H #define _ASM_UNIT_TIMEX_H +#ifndef __ASSEMBLY__ +#include +#endif /* __ASSEMBLY__ */ + #include #include #include diff --git a/trunk/arch/mn10300/unit-asb2305/unit-init.c b/trunk/arch/mn10300/unit-asb2305/unit-init.c index bc4adfaf815c..e1becd6b7571 100644 --- a/trunk/arch/mn10300/unit-asb2305/unit-init.c +++ b/trunk/arch/mn10300/unit-asb2305/unit-init.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/mn10300/unit-asb2364/include/unit/timex.h b/trunk/arch/mn10300/unit-asb2364/include/unit/timex.h index 42f32db75087..ddb7ed010706 100644 --- a/trunk/arch/mn10300/unit-asb2364/include/unit/timex.h +++ b/trunk/arch/mn10300/unit-asb2364/include/unit/timex.h @@ -11,6 +11,10 @@ #ifndef _ASM_UNIT_TIMEX_H #define _ASM_UNIT_TIMEX_H +#ifndef __ASSEMBLY__ +#include +#endif /* __ASSEMBLY__ */ + #include #include #include diff --git a/trunk/arch/powerpc/include/asm/hw_irq.h b/trunk/arch/powerpc/include/asm/hw_irq.h index 0554ab062bdc..6eb75b80488c 100644 --- a/trunk/arch/powerpc/include/asm/hw_irq.h +++ b/trunk/arch/powerpc/include/asm/hw_irq.h @@ -86,8 +86,8 @@ static inline bool arch_irqs_disabled(void) } #ifdef CONFIG_PPC_BOOK3E -#define __hard_irq_enable() asm volatile("wrteei 1" : : : "memory") -#define __hard_irq_disable() asm volatile("wrteei 0" : : : "memory") +#define __hard_irq_enable() asm volatile("wrteei 1" : : : "memory"); +#define __hard_irq_disable() asm volatile("wrteei 0" : : : "memory"); #else #define __hard_irq_enable() __mtmsrd(local_paca->kernel_msr | MSR_EE, 1) #define __hard_irq_disable() __mtmsrd(local_paca->kernel_msr, 1) @@ -125,8 +125,6 @@ static inline bool arch_irq_disabled_regs(struct pt_regs *regs) return !regs->softe; } -extern bool prep_irq_for_idle(void); - #else /* CONFIG_PPC64 */ #define SET_MSR_EE(x) mtmsr(x) diff --git a/trunk/arch/powerpc/kernel/irq.c b/trunk/arch/powerpc/kernel/irq.c index 1f017bb7a7ce..1b415027ec0e 100644 --- a/trunk/arch/powerpc/kernel/irq.c +++ b/trunk/arch/powerpc/kernel/irq.c @@ -229,7 +229,7 @@ notrace void arch_local_irq_restore(unsigned long en) */ if (unlikely(irq_happened != PACA_IRQ_HARD_DIS)) __hard_irq_disable(); -#ifdef CONFIG_TRACE_IRQFLAGS +#ifdef CONFIG_TRACE_IRQFLAG else { /* * We should already be hard disabled here. We had bugs @@ -286,52 +286,6 @@ void notrace restore_interrupts(void) __hard_irq_enable(); } -/* - * This is a helper to use when about to go into idle low-power - * when the latter has the side effect of re-enabling interrupts - * (such as calling H_CEDE under pHyp). - * - * You call this function with interrupts soft-disabled (this is - * already the case when ppc_md.power_save is called). The function - * will return whether to enter power save or just return. - * - * In the former case, it will have notified lockdep of interrupts - * being re-enabled and generally sanitized the lazy irq state, - * and in the latter case it will leave with interrupts hard - * disabled and marked as such, so the local_irq_enable() call - * in cpu_idle() will properly re-enable everything. - */ -bool prep_irq_for_idle(void) -{ - /* - * First we need to hard disable to ensure no interrupt - * occurs before we effectively enter the low power state - */ - hard_irq_disable(); - - /* - * If anything happened while we were soft-disabled, - * we return now and do not enter the low power state. - */ - if (lazy_irq_pending()) - return false; - - /* Tell lockdep we are about to re-enable */ - trace_hardirqs_on(); - - /* - * Mark interrupts as soft-enabled and clear the - * PACA_IRQ_HARD_DIS from the pending mask since we - * are about to hard enable as well as a side effect - * of entering the low power state. - */ - local_paca->irq_happened &= ~PACA_IRQ_HARD_DIS; - local_paca->soft_enabled = 1; - - /* Tell the caller to enter the low power state */ - return true; -} - #endif /* CONFIG_PPC64 */ int arch_show_interrupts(struct seq_file *p, int prec) diff --git a/trunk/arch/powerpc/kvm/book3s_pr_papr.c b/trunk/arch/powerpc/kvm/book3s_pr_papr.c index ee02b30878ed..3ff9013d6e79 100644 --- a/trunk/arch/powerpc/kvm/book3s_pr_papr.c +++ b/trunk/arch/powerpc/kvm/book3s_pr_papr.c @@ -241,7 +241,6 @@ int kvmppc_h_pr(struct kvm_vcpu *vcpu, unsigned long cmd) case H_PUT_TCE: return kvmppc_h_pr_put_tce(vcpu); case H_CEDE: - vcpu->arch.shared->msr |= MSR_EE; kvm_vcpu_block(vcpu); clear_bit(KVM_REQ_UNHALT, &vcpu->requests); vcpu->stat.halt_wakeup++; diff --git a/trunk/arch/powerpc/mm/numa.c b/trunk/arch/powerpc/mm/numa.c index 1e95556dc692..6e8f677f5646 100644 --- a/trunk/arch/powerpc/mm/numa.c +++ b/trunk/arch/powerpc/mm/numa.c @@ -639,7 +639,7 @@ static void __init parse_drconf_memory(struct device_node *memory) unsigned int n, rc, ranges, is_kexec_kdump = 0; unsigned long lmb_size, base, size, sz; int nid; - struct assoc_arrays aa = { .arrays = NULL }; + struct assoc_arrays aa; n = of_get_drconf_memory(memory, &dm); if (!n) diff --git a/trunk/arch/powerpc/platforms/cell/pervasive.c b/trunk/arch/powerpc/platforms/cell/pervasive.c index d17e98bc0c10..efdacc829576 100644 --- a/trunk/arch/powerpc/platforms/cell/pervasive.c +++ b/trunk/arch/powerpc/platforms/cell/pervasive.c @@ -42,9 +42,11 @@ static void cbe_power_save(void) { unsigned long ctrl, thread_switch_control; - /* Ensure our interrupt state is properly tracked */ - if (!prep_irq_for_idle()) - return; + /* + * We need to hard disable interrupts, the local_irq_enable() done by + * our caller upon return will hard re-enable. + */ + hard_irq_disable(); ctrl = mfspr(SPRN_CTRLF); @@ -79,9 +81,6 @@ static void cbe_power_save(void) */ ctrl &= ~(CTRL_RUNLATCH | CTRL_TE); mtspr(SPRN_CTRLT, ctrl); - - /* Re-enable interrupts in MSR */ - __hard_irq_enable(); } static int cbe_system_reset_exception(struct pt_regs *regs) diff --git a/trunk/arch/powerpc/platforms/pseries/processor_idle.c b/trunk/arch/powerpc/platforms/pseries/processor_idle.c index c71be66bd5dc..e61483e8e960 100644 --- a/trunk/arch/powerpc/platforms/pseries/processor_idle.c +++ b/trunk/arch/powerpc/platforms/pseries/processor_idle.c @@ -99,18 +99,15 @@ static int snooze_loop(struct cpuidle_device *dev, static void check_and_cede_processor(void) { /* - * Ensure our interrupt state is properly tracked, - * also checks if no interrupt has occurred while we - * were soft-disabled + * Interrupts are soft-disabled at this point, + * but not hard disabled. So an interrupt might have + * occurred before entering NAP, and would be potentially + * lost (edge events, decrementer events, etc...) unless + * we first hard disable then check. */ - if (prep_irq_for_idle()) { + hard_irq_disable(); + if (!lazy_irq_pending()) cede_processor(); -#ifdef CONFIG_TRACE_IRQFLAGS - /* Ensure that H_CEDE returns with IRQs on */ - if (WARN_ON(!(mfmsr() & MSR_EE))) - __hard_irq_enable(); -#endif - } } static int dedicated_cede_loop(struct cpuidle_device *dev, diff --git a/trunk/arch/sh/include/asm/io_noioport.h b/trunk/arch/sh/include/asm/io_noioport.h index 4d48f1436a63..e136d28d1d2e 100644 --- a/trunk/arch/sh/include/asm/io_noioport.h +++ b/trunk/arch/sh/include/asm/io_noioport.h @@ -19,20 +19,9 @@ static inline u32 inl(unsigned long addr) return -1; } -static inline void outb(unsigned char x, unsigned long port) -{ - BUG(); -} - -static inline void outw(unsigned short x, unsigned long port) -{ - BUG(); -} - -static inline void outl(unsigned int x, unsigned long port) -{ - BUG(); -} +#define outb(x, y) BUG() +#define outw(x, y) BUG() +#define outl(x, y) BUG() #define inb_p(addr) inb(addr) #define inw_p(addr) inw(addr) diff --git a/trunk/arch/sh/kernel/cpu/sh3/serial-sh7720.c b/trunk/arch/sh/kernel/cpu/sh3/serial-sh7720.c index c4a0336660dd..8832c526cdf9 100644 --- a/trunk/arch/sh/kernel/cpu/sh3/serial-sh7720.c +++ b/trunk/arch/sh/kernel/cpu/sh3/serial-sh7720.c @@ -2,7 +2,7 @@ #include #include #include -#include +#include static void sh7720_sci_init_pins(struct uart_port *port, unsigned int cflag) { diff --git a/trunk/arch/tile/kernel/backtrace.c b/trunk/arch/tile/kernel/backtrace.c index f8b74ca83b92..9092ce8aa6b4 100644 --- a/trunk/arch/tile/kernel/backtrace.c +++ b/trunk/arch/tile/kernel/backtrace.c @@ -14,7 +14,6 @@ #include #include -#include #include #include #include @@ -337,12 +336,8 @@ static void find_caller_pc_and_caller_sp(CallerLocation *location, bytes_to_prefetch / sizeof(tile_bundle_bits); } - /* - * Decode the next bundle. - * TILE always stores instruction bundles in little-endian - * mode, even when the chip is running in big-endian mode. - */ - bundle.bits = le64_to_cpu(prefetched_bundles[next_bundle++]); + /* Decode the next bundle. */ + bundle.bits = prefetched_bundles[next_bundle++]; bundle.num_insns = parse_insn_tile(bundle.bits, pc, bundle.insns); num_info_ops = bt_get_info_ops(&bundle, info_operands); diff --git a/trunk/arch/xtensa/kernel/process.c b/trunk/arch/xtensa/kernel/process.c index 2c8d6a3d250a..9b306e550e3f 100644 --- a/trunk/arch/xtensa/kernel/process.c +++ b/trunk/arch/xtensa/kernel/process.c @@ -277,7 +277,7 @@ void xtensa_elf_core_copy_regs (xtensa_gregset_t *elfregs, struct pt_regs *regs) /* Don't leak any random bits. */ - memset(elfregs, 0, sizeof(*elfregs)); + memset(elfregs, 0, sizeof (elfregs)); /* Note: PS.EXCM is not set while user task is running; its * being set in regs->ps is for exception handling convenience. diff --git a/trunk/drivers/acpi/acpica/hwsleep.c b/trunk/drivers/acpi/acpica/hwsleep.c index 615996a36bed..0ed85cac3231 100644 --- a/trunk/drivers/acpi/acpica/hwsleep.c +++ b/trunk/drivers/acpi/acpica/hwsleep.c @@ -95,6 +95,18 @@ acpi_status acpi_hw_legacy_sleep(u8 sleep_state, u8 flags) return_ACPI_STATUS(status); } + if (sleep_state != ACPI_STATE_S5) { + /* + * Disable BM arbitration. This feature is contained within an + * optional register (PM2 Control), so ignore a BAD_ADDRESS + * exception. + */ + status = acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 1); + if (ACPI_FAILURE(status) && (status != AE_BAD_ADDRESS)) { + return_ACPI_STATUS(status); + } + } + /* * 1) Disable/Clear all GPEs * 2) Enable all wakeup GPEs @@ -352,6 +364,16 @@ acpi_status acpi_hw_legacy_wake(u8 sleep_state, u8 flags) [ACPI_EVENT_POWER_BUTTON]. status_register_id, ACPI_CLEAR_STATUS); + /* + * Enable BM arbitration. This feature is contained within an + * optional register (PM2 Control), so ignore a BAD_ADDRESS + * exception. + */ + status = acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 0); + if (ACPI_FAILURE(status) && (status != AE_BAD_ADDRESS)) { + return_ACPI_STATUS(status); + } + acpi_hw_execute_sleep_method(METHOD_PATHNAME__SST, ACPI_SST_WORKING); return_ACPI_STATUS(status); } diff --git a/trunk/drivers/gpio/Kconfig b/trunk/drivers/gpio/Kconfig index 542f0c04b695..c4067d0141f7 100644 --- a/trunk/drivers/gpio/Kconfig +++ b/trunk/drivers/gpio/Kconfig @@ -136,7 +136,7 @@ config GPIO_MPC8XXX config GPIO_MSM_V1 tristate "Qualcomm MSM GPIO v1" - depends on GPIOLIB && ARCH_MSM && (ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50) + depends on GPIOLIB && ARCH_MSM help Say yes here to support the GPIO interface on ARM v6 based Qualcomm MSM chips. Most of the pins on the MSM can be diff --git a/trunk/drivers/gpio/devres.c b/trunk/drivers/gpio/devres.c index 1077754f8289..9e9947cb86a3 100644 --- a/trunk/drivers/gpio/devres.c +++ b/trunk/drivers/gpio/devres.c @@ -98,7 +98,6 @@ int devm_gpio_request_one(struct device *dev, unsigned gpio, return 0; } -EXPORT_SYMBOL(devm_gpio_request_one); /** * devm_gpio_free - free an interrupt diff --git a/trunk/drivers/gpio/gpio-mxc.c b/trunk/drivers/gpio/gpio-mxc.c index c89c4c1e668d..c337143b18f8 100644 --- a/trunk/drivers/gpio/gpio-mxc.c +++ b/trunk/drivers/gpio/gpio-mxc.c @@ -398,12 +398,10 @@ static int __devinit mxc_gpio_probe(struct platform_device *pdev) writel(~0, port->base + GPIO_ISR); if (mxc_gpio_hwtype == IMX21_GPIO) { - /* - * Setup one handler for all GPIO interrupts. Actually setting - * the handler is needed only once, but doing it for every port - * is more robust and easier. - */ - irq_set_chained_handler(port->irq, mx2_gpio_irq_handler); + /* setup one handler for all GPIO interrupts */ + if (pdev->id == 0) + irq_set_chained_handler(port->irq, + mx2_gpio_irq_handler); } else { /* setup one handler for each entry */ irq_set_chained_handler(port->irq, mx3_gpio_irq_handler); diff --git a/trunk/drivers/gpio/gpio-omap.c b/trunk/drivers/gpio/gpio-omap.c index 4fbc208c32cf..c4ed1722734c 100644 --- a/trunk/drivers/gpio/gpio-omap.c +++ b/trunk/drivers/gpio/gpio-omap.c @@ -174,22 +174,12 @@ static inline void _gpio_dbck_enable(struct gpio_bank *bank) if (bank->dbck_enable_mask && !bank->dbck_enabled) { clk_enable(bank->dbck); bank->dbck_enabled = true; - - __raw_writel(bank->dbck_enable_mask, - bank->base + bank->regs->debounce_en); } } static inline void _gpio_dbck_disable(struct gpio_bank *bank) { if (bank->dbck_enable_mask && bank->dbck_enabled) { - /* - * Disable debounce before cutting it's clock. If debounce is - * enabled but the clock is not, GPIO module seems to be unable - * to detect events and generate interrupts at least on OMAP3. - */ - __raw_writel(0, bank->base + bank->regs->debounce_en); - clk_disable(bank->dbck); bank->dbck_enabled = false; } @@ -1091,6 +1081,7 @@ static int __devinit omap_gpio_probe(struct platform_device *pdev) bank->is_mpuio = pdata->is_mpuio; bank->non_wakeup_gpios = pdata->non_wakeup_gpios; bank->loses_context = pdata->loses_context; + bank->get_context_loss_count = pdata->get_context_loss_count; bank->regs = pdata->regs; #ifdef CONFIG_OF_GPIO bank->chip.of_node = of_node_get(node); @@ -1144,9 +1135,6 @@ static int __devinit omap_gpio_probe(struct platform_device *pdev) omap_gpio_chip_init(bank); omap_gpio_show_rev(bank); - if (bank->loses_context) - bank->get_context_loss_count = pdata->get_context_loss_count; - pm_runtime_put(bank->dev); list_add_tail(&bank->node, &omap_gpio_list); diff --git a/trunk/drivers/gpio/gpio-sta2x11.c b/trunk/drivers/gpio/gpio-sta2x11.c index 6064fb376e11..38416be8ba11 100644 --- a/trunk/drivers/gpio/gpio-sta2x11.c +++ b/trunk/drivers/gpio/gpio-sta2x11.c @@ -383,9 +383,8 @@ static int __devinit gsta_probe(struct platform_device *dev) } spin_lock_init(&chip->lock); gsta_gpio_setup(chip); - if (gpio_pdata) - for (i = 0; i < GSTA_NR_GPIO; i++) - gsta_set_config(chip, i, gpio_pdata->pinconfig[i]); + for (i = 0; i < GSTA_NR_GPIO; i++) + gsta_set_config(chip, i, gpio_pdata->pinconfig[i]); /* 384 was used in previous code: be compatible for other drivers */ err = irq_alloc_descs(-1, 384, GSTA_NR_GPIO, NUMA_NO_NODE); diff --git a/trunk/drivers/gpio/gpio-tps65910.c b/trunk/drivers/gpio/gpio-tps65910.c index 11f29c82253c..c1ad2884f2ed 100644 --- a/trunk/drivers/gpio/gpio-tps65910.c +++ b/trunk/drivers/gpio/gpio-tps65910.c @@ -149,9 +149,6 @@ static int __devinit tps65910_gpio_probe(struct platform_device *pdev) tps65910_gpio->gpio_chip.set = tps65910_gpio_set; tps65910_gpio->gpio_chip.get = tps65910_gpio_get; tps65910_gpio->gpio_chip.dev = &pdev->dev; -#ifdef CONFIG_OF_GPIO - tps65910_gpio->gpio_chip.of_node = tps65910->dev->of_node; -#endif if (pdata && pdata->gpio_base) tps65910_gpio->gpio_chip.base = pdata->gpio_base; else diff --git a/trunk/drivers/gpio/gpio-wm8994.c b/trunk/drivers/gpio/gpio-wm8994.c index aa61ad2fcaaa..92ea5350dfe9 100644 --- a/trunk/drivers/gpio/gpio-wm8994.c +++ b/trunk/drivers/gpio/gpio-wm8994.c @@ -89,11 +89,8 @@ static int wm8994_gpio_direction_out(struct gpio_chip *chip, struct wm8994_gpio *wm8994_gpio = to_wm8994_gpio(chip); struct wm8994 *wm8994 = wm8994_gpio->wm8994; - if (value) - value = WM8994_GPN_LVL; - return wm8994_set_bits(wm8994, WM8994_GPIO_1 + offset, - WM8994_GPN_DIR | WM8994_GPN_LVL, value); + WM8994_GPN_DIR, 0); } static void wm8994_gpio_set(struct gpio_chip *chip, unsigned offset, int value) diff --git a/trunk/drivers/hwspinlock/hwspinlock_core.c b/trunk/drivers/hwspinlock/hwspinlock_core.c index 1201a15784c3..61c9cf15fa52 100644 --- a/trunk/drivers/hwspinlock/hwspinlock_core.c +++ b/trunk/drivers/hwspinlock/hwspinlock_core.c @@ -345,7 +345,7 @@ int hwspin_lock_register(struct hwspinlock_device *bank, struct device *dev, spin_lock_init(&hwlock->lock); hwlock->bank = bank; - ret = hwspin_lock_register_single(hwlock, base_id + i); + ret = hwspin_lock_register_single(hwlock, i); if (ret) goto reg_failed; } @@ -354,7 +354,7 @@ int hwspin_lock_register(struct hwspinlock_device *bank, struct device *dev, reg_failed: while (--i >= 0) - hwspin_lock_unregister_single(base_id + i); + hwspin_lock_unregister_single(i); return ret; } EXPORT_SYMBOL_GPL(hwspin_lock_register); diff --git a/trunk/drivers/iommu/amd_iommu.c b/trunk/drivers/iommu/amd_iommu.c index 625626391f2d..a2e418cba0ff 100644 --- a/trunk/drivers/iommu/amd_iommu.c +++ b/trunk/drivers/iommu/amd_iommu.c @@ -83,8 +83,6 @@ static struct iommu_ops amd_iommu_ops; static ATOMIC_NOTIFIER_HEAD(ppr_notifier); int amd_iommu_max_glx_val = -1; -static struct dma_map_ops amd_iommu_dma_ops; - /* * general struct to manage commands send to an IOMMU */ @@ -404,7 +402,7 @@ static void amd_iommu_stats_init(void) return; de_fflush = debugfs_create_bool("fullflush", 0444, stats_dir, - &amd_iommu_unmap_flush); + (u32 *)&amd_iommu_unmap_flush); amd_iommu_stats_add(&compl_wait); amd_iommu_stats_add(&cnt_map_single); @@ -2269,13 +2267,6 @@ static int device_change_notifier(struct notifier_block *nb, list_add_tail(&dma_domain->list, &iommu_pd_list); spin_unlock_irqrestore(&iommu_pd_list_lock, flags); - dev_data = get_dev_data(dev); - - if (!dev_data->passthrough) - dev->archdata.dma_ops = &amd_iommu_dma_ops; - else - dev->archdata.dma_ops = &nommu_dma_ops; - break; case BUS_NOTIFY_DEL_DEVICE: diff --git a/trunk/drivers/iommu/amd_iommu_init.c b/trunk/drivers/iommu/amd_iommu_init.c index a33612f3206f..542024ba6dba 100644 --- a/trunk/drivers/iommu/amd_iommu_init.c +++ b/trunk/drivers/iommu/amd_iommu_init.c @@ -129,7 +129,7 @@ u16 amd_iommu_last_bdf; /* largest PCI device id we have to handle */ LIST_HEAD(amd_iommu_unity_map); /* a list of required unity mappings we find in ACPI */ -u32 amd_iommu_unmap_flush; /* if true, flush on every unmap */ +bool amd_iommu_unmap_flush; /* if true, flush on every unmap */ LIST_HEAD(amd_iommu_list); /* list of all AMD IOMMUs in the system */ @@ -1641,8 +1641,6 @@ static int __init amd_iommu_init(void) amd_iommu_init_api(); - x86_platform.iommu_shutdown = disable_iommus; - if (iommu_pass_through) goto out; @@ -1651,6 +1649,8 @@ static int __init amd_iommu_init(void) else printk(KERN_INFO "AMD-Vi: Lazy IO/TLB flushing enabled\n"); + x86_platform.iommu_shutdown = disable_iommus; + out: return ret; diff --git a/trunk/drivers/iommu/amd_iommu_types.h b/trunk/drivers/iommu/amd_iommu_types.h index c1b1d489817e..24355559a2ad 100644 --- a/trunk/drivers/iommu/amd_iommu_types.h +++ b/trunk/drivers/iommu/amd_iommu_types.h @@ -652,7 +652,7 @@ extern unsigned long *amd_iommu_pd_alloc_bitmap; * If true, the addresses will be flushed on unmap time, not when * they are reused */ -extern u32 amd_iommu_unmap_flush; +extern bool amd_iommu_unmap_flush; /* Smallest number of PASIDs supported by any IOMMU in the system */ extern u32 amd_iommu_max_pasids; diff --git a/trunk/drivers/iommu/tegra-smmu.c b/trunk/drivers/iommu/tegra-smmu.c index 3f3d09d560ea..ecd679043d77 100644 --- a/trunk/drivers/iommu/tegra-smmu.c +++ b/trunk/drivers/iommu/tegra-smmu.c @@ -550,13 +550,13 @@ static int alloc_pdir(struct smmu_as *as) return 0; as->pte_count = devm_kzalloc(smmu->dev, - sizeof(as->pte_count[0]) * SMMU_PDIR_COUNT, GFP_ATOMIC); + sizeof(as->pte_count[0]) * SMMU_PDIR_COUNT, GFP_KERNEL); if (!as->pte_count) { dev_err(smmu->dev, "failed to allocate smmu_device PTE cunters\n"); return -ENOMEM; } - as->pdir_page = alloc_page(GFP_ATOMIC | __GFP_DMA); + as->pdir_page = alloc_page(GFP_KERNEL | __GFP_DMA); if (!as->pdir_page) { dev_err(smmu->dev, "failed to allocate smmu_device page directory\n"); diff --git a/trunk/drivers/media/video/gspca/sn9c20x.c b/trunk/drivers/media/video/gspca/sn9c20x.c index b9c6f17eabb2..6c31e46a1fd2 100644 --- a/trunk/drivers/media/video/gspca/sn9c20x.c +++ b/trunk/drivers/media/video/gspca/sn9c20x.c @@ -2070,13 +2070,10 @@ static int sd_start(struct gspca_dev *gspca_dev) set_gamma(gspca_dev, v4l2_ctrl_g_ctrl(sd->gamma)); set_redblue(gspca_dev, v4l2_ctrl_g_ctrl(sd->blue), v4l2_ctrl_g_ctrl(sd->red)); - if (sd->gain) - set_gain(gspca_dev, v4l2_ctrl_g_ctrl(sd->gain)); - if (sd->exposure) - set_exposure(gspca_dev, v4l2_ctrl_g_ctrl(sd->exposure)); - if (sd->hflip) - set_hvflip(gspca_dev, v4l2_ctrl_g_ctrl(sd->hflip), - v4l2_ctrl_g_ctrl(sd->vflip)); + set_gain(gspca_dev, v4l2_ctrl_g_ctrl(sd->gain)); + set_exposure(gspca_dev, v4l2_ctrl_g_ctrl(sd->exposure)); + set_hvflip(gspca_dev, v4l2_ctrl_g_ctrl(sd->hflip), + v4l2_ctrl_g_ctrl(sd->vflip)); reg_w1(gspca_dev, 0x1007, 0x20); reg_w1(gspca_dev, 0x1061, 0x03); @@ -2179,7 +2176,7 @@ static void sd_dqcallback(struct gspca_dev *gspca_dev) struct sd *sd = (struct sd *) gspca_dev; int avg_lum; - if (sd->autogain == NULL || !v4l2_ctrl_g_ctrl(sd->autogain)) + if (!v4l2_ctrl_g_ctrl(sd->autogain)) return; avg_lum = atomic_read(&sd->avg_lum); diff --git a/trunk/drivers/media/video/mx2_camera.c b/trunk/drivers/media/video/mx2_camera.c index 637bde8aca28..41f9a254b245 100644 --- a/trunk/drivers/media/video/mx2_camera.c +++ b/trunk/drivers/media/video/mx2_camera.c @@ -83,7 +83,6 @@ #define CSICR1_INV_DATA (1 << 3) #define CSICR1_INV_PCLK (1 << 2) #define CSICR1_REDGE (1 << 1) -#define CSICR1_FMT_MASK (CSICR1_PACK_DIR | CSICR1_SWAP16_EN) #define SHIFT_STATFF_LEVEL 22 #define SHIFT_RXFF_LEVEL 19 @@ -231,7 +230,6 @@ struct mx2_prp_cfg { u32 src_pixel; u32 ch1_pixel; u32 irq_flags; - u32 csicr1; }; /* prp resizing parameters */ @@ -332,7 +330,6 @@ static struct mx2_fmt_cfg mx27_emma_prp_table[] = { .ch1_pixel = 0x2ca00565, /* RGB565 */ .irq_flags = PRP_INTR_RDERR | PRP_INTR_CH1WERR | PRP_INTR_CH1FC | PRP_INTR_LBOVF, - .csicr1 = 0, } }, { @@ -346,21 +343,6 @@ static struct mx2_fmt_cfg mx27_emma_prp_table[] = { .irq_flags = PRP_INTR_RDERR | PRP_INTR_CH2WERR | PRP_INTR_CH2FC | PRP_INTR_LBOVF | PRP_INTR_CH2OVF, - .csicr1 = CSICR1_PACK_DIR, - } - }, - { - .in_fmt = V4L2_MBUS_FMT_UYVY8_2X8, - .out_fmt = V4L2_PIX_FMT_YUV420, - .cfg = { - .channel = 2, - .in_fmt = PRP_CNTL_DATA_IN_YUV422, - .out_fmt = PRP_CNTL_CH2_OUT_YUV420, - .src_pixel = 0x22000888, /* YUV422 (YUYV) */ - .irq_flags = PRP_INTR_RDERR | PRP_INTR_CH2WERR | - PRP_INTR_CH2FC | PRP_INTR_LBOVF | - PRP_INTR_CH2OVF, - .csicr1 = CSICR1_SWAP16_EN, } }, }; @@ -1033,14 +1015,14 @@ static int mx2_camera_set_bus_param(struct soc_camera_device *icd) return ret; } - csicr1 = (csicr1 & ~CSICR1_FMT_MASK) | pcdev->emma_prp->cfg.csicr1; - if (common_flags & V4L2_MBUS_PCLK_SAMPLE_RISING) csicr1 |= CSICR1_REDGE; if (common_flags & V4L2_MBUS_VSYNC_ACTIVE_HIGH) csicr1 |= CSICR1_SOF_POL; if (common_flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH) csicr1 |= CSICR1_HSYNC_POL; + if (pcdev->platform_flags & MX2_CAMERA_SWAP16) + csicr1 |= CSICR1_SWAP16_EN; if (pcdev->platform_flags & MX2_CAMERA_EXT_VSYNC) csicr1 |= CSICR1_EXT_VSYNC; if (pcdev->platform_flags & MX2_CAMERA_CCIR) @@ -1051,6 +1033,8 @@ static int mx2_camera_set_bus_param(struct soc_camera_device *icd) csicr1 |= CSICR1_GCLK_MODE; if (pcdev->platform_flags & MX2_CAMERA_INV_DATA) csicr1 |= CSICR1_INV_DATA; + if (pcdev->platform_flags & MX2_CAMERA_PACK_DIR_MSB) + csicr1 |= CSICR1_PACK_DIR; pcdev->csicr1 = csicr1; @@ -1125,8 +1109,7 @@ static int mx2_camera_get_formats(struct soc_camera_device *icd, return 0; } - if (code == V4L2_MBUS_FMT_YUYV8_2X8 || - code == V4L2_MBUS_FMT_UYVY8_2X8) { + if (code == V4L2_MBUS_FMT_YUYV8_2X8) { formats++; if (xlate) { /* diff --git a/trunk/drivers/mfd/palmas.c b/trunk/drivers/mfd/palmas.c index 00c0aba7eba0..5d896b352284 100644 --- a/trunk/drivers/mfd/palmas.c +++ b/trunk/drivers/mfd/palmas.c @@ -472,6 +472,7 @@ static const struct i2c_device_id palmas_i2c_id[] = { { "twl6035", }, { "twl6037", }, { "tps65913", }, + { /* end */ } }; MODULE_DEVICE_TABLE(i2c, palmas_i2c_id); diff --git a/trunk/drivers/misc/mei/main.c b/trunk/drivers/misc/mei/main.c index 783fcd7365bc..7de13891e49e 100644 --- a/trunk/drivers/misc/mei/main.c +++ b/trunk/drivers/misc/mei/main.c @@ -1147,7 +1147,7 @@ static int mei_pci_resume(struct device *device) err = request_threaded_irq(pdev->irq, NULL, mei_interrupt_thread_handler, - IRQF_ONESHOT, mei_driver_name, dev); + 0, mei_driver_name, dev); else err = request_threaded_irq(pdev->irq, mei_interrupt_quick_handler, diff --git a/trunk/drivers/misc/sgi-xp/xpc_uv.c b/trunk/drivers/misc/sgi-xp/xpc_uv.c index 87b251ab6ec5..17bbacb1b4b1 100644 --- a/trunk/drivers/misc/sgi-xp/xpc_uv.c +++ b/trunk/drivers/misc/sgi-xp/xpc_uv.c @@ -452,9 +452,9 @@ xpc_handle_activate_mq_msg_uv(struct xpc_partition *part, if (msg->activate_gru_mq_desc_gpa != part_uv->activate_gru_mq_desc_gpa) { - spin_lock(&part_uv->flags_lock); + spin_lock_irqsave(&part_uv->flags_lock, irq_flags); part_uv->flags &= ~XPC_P_CACHED_ACTIVATE_GRU_MQ_DESC_UV; - spin_unlock(&part_uv->flags_lock); + spin_unlock_irqrestore(&part_uv->flags_lock, irq_flags); part_uv->activate_gru_mq_desc_gpa = msg->activate_gru_mq_desc_gpa; } diff --git a/trunk/drivers/of/base.c b/trunk/drivers/of/base.c index d9bfd49b1935..eada3f4ef801 100644 --- a/trunk/drivers/of/base.c +++ b/trunk/drivers/of/base.c @@ -511,6 +511,22 @@ struct device_node *of_find_node_with_property(struct device_node *from, } EXPORT_SYMBOL(of_find_node_with_property); +static const struct of_device_id *of_match_compat(const struct of_device_id *matches, + const char *compat) +{ + while (matches->name[0] || matches->type[0] || matches->compatible[0]) { + const char *cp = matches->compatible; + int len = strlen(cp); + + if (len > 0 && of_compat_cmp(compat, cp, len) == 0) + return matches; + + matches++; + } + + return NULL; +} + /** * of_match_node - Tell if an device_node has a matching of_match structure * @matches: array of of device match structures to search in @@ -521,9 +537,18 @@ EXPORT_SYMBOL(of_find_node_with_property); const struct of_device_id *of_match_node(const struct of_device_id *matches, const struct device_node *node) { + struct property *prop; + const char *cp; + if (!matches) return NULL; + of_property_for_each_string(node, "compatible", prop, cp) { + const struct of_device_id *match = of_match_compat(matches, cp); + if (match) + return match; + } + while (matches->name[0] || matches->type[0] || matches->compatible[0]) { int match = 1; if (matches->name[0]) @@ -532,10 +557,7 @@ const struct of_device_id *of_match_node(const struct of_device_id *matches, if (matches->type[0]) match &= node->type && !strcmp(matches->type, node->type); - if (matches->compatible[0]) - match &= of_device_is_compatible(node, - matches->compatible); - if (match) + if (match && !matches->compatible[0]) return matches; matches++; } diff --git a/trunk/drivers/of/platform.c b/trunk/drivers/of/platform.c index e44f8c2d239d..3132ea068d95 100644 --- a/trunk/drivers/of/platform.c +++ b/trunk/drivers/of/platform.c @@ -317,9 +317,10 @@ static const struct of_dev_auxdata *of_dev_lookup(const struct of_dev_auxdata *l for(; lookup->compatible != NULL; lookup++) { if (!of_device_is_compatible(np, lookup->compatible)) continue; - if (!of_address_to_resource(np, 0, &res)) - if (res.start != lookup->phys_addr) - continue; + if (of_address_to_resource(np, 0, &res)) + continue; + if (res.start != lookup->phys_addr) + continue; pr_debug("%s: devname=%s\n", np->full_name, lookup->name); return lookup; } diff --git a/trunk/drivers/pci/pci-driver.c b/trunk/drivers/pci/pci-driver.c index 099f46cd8e87..bf0cee629b60 100644 --- a/trunk/drivers/pci/pci-driver.c +++ b/trunk/drivers/pci/pci-driver.c @@ -748,18 +748,6 @@ static int pci_pm_suspend_noirq(struct device *dev) pci_pm_set_unknown_state(pci_dev); - /* - * Some BIOSes from ASUS have a bug: If a USB EHCI host controller's - * PCI COMMAND register isn't 0, the BIOS assumes that the controller - * hasn't been quiesced and tries to turn it off. If the controller - * is already in D3, this can hang or cause memory corruption. - * - * Since the value of the COMMAND register doesn't matter once the - * device has been suspended, we can safely set it to 0 here. - */ - if (pci_dev->class == PCI_CLASS_SERIAL_USB_EHCI) - pci_write_config_word(pci_dev, PCI_COMMAND, 0); - return 0; } diff --git a/trunk/drivers/pci/pci.c b/trunk/drivers/pci/pci.c index 447e83472c01..77cb54a65cde 100644 --- a/trunk/drivers/pci/pci.c +++ b/trunk/drivers/pci/pci.c @@ -1744,6 +1744,11 @@ int pci_prepare_to_sleep(struct pci_dev *dev) if (target_state == PCI_POWER_ERROR) return -EIO; + /* Some devices mustn't be in D3 during system sleep */ + if (target_state == PCI_D3hot && + (dev->dev_flags & PCI_DEV_FLAGS_NO_D3_DURING_SLEEP)) + return 0; + pci_enable_wake(dev, target_state, device_may_wakeup(&dev->dev)); error = pci_set_power_state(dev, target_state); diff --git a/trunk/drivers/pci/quirks.c b/trunk/drivers/pci/quirks.c index 2a7521677541..194b243a2817 100644 --- a/trunk/drivers/pci/quirks.c +++ b/trunk/drivers/pci/quirks.c @@ -2929,6 +2929,32 @@ static void __devinit disable_igfx_irq(struct pci_dev *dev) DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0102, disable_igfx_irq); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq); +/* + * The Intel 6 Series/C200 Series chipset's EHCI controllers on many + * ASUS motherboards will cause memory corruption or a system crash + * if they are in D3 while the system is put into S3 sleep. + */ +static void __devinit asus_ehci_no_d3(struct pci_dev *dev) +{ + const char *sys_info; + static const char good_Asus_board[] = "P8Z68-V"; + + if (dev->dev_flags & PCI_DEV_FLAGS_NO_D3_DURING_SLEEP) + return; + if (dev->subsystem_vendor != PCI_VENDOR_ID_ASUSTEK) + return; + sys_info = dmi_get_system_info(DMI_BOARD_NAME); + if (sys_info && memcmp(sys_info, good_Asus_board, + sizeof(good_Asus_board) - 1) == 0) + return; + + dev_info(&dev->dev, "broken D3 during system sleep on ASUS\n"); + dev->dev_flags |= PCI_DEV_FLAGS_NO_D3_DURING_SLEEP; + device_set_wakeup_capable(&dev->dev, false); +} +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x1c26, asus_ehci_no_d3); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x1c2d, asus_ehci_no_d3); + static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, struct pci_fixup *end) { diff --git a/trunk/drivers/regulator/core.c b/trunk/drivers/regulator/core.c index 8b4b3829d9e7..09a737c868b5 100644 --- a/trunk/drivers/regulator/core.c +++ b/trunk/drivers/regulator/core.c @@ -2519,12 +2519,9 @@ int regulator_set_optimum_mode(struct regulator *regulator, int uA_load) { struct regulator_dev *rdev = regulator->rdev; struct regulator *consumer; - int ret, output_uV, input_uV = 0, total_uA_load = 0; + int ret, output_uV, input_uV, total_uA_load = 0; unsigned int mode; - if (rdev->supply) - input_uV = regulator_get_voltage(rdev->supply); - mutex_lock(&rdev->mutex); /* @@ -2557,7 +2554,10 @@ int regulator_set_optimum_mode(struct regulator *regulator, int uA_load) goto out; } - /* No supply? Use constraint voltage */ + /* get input voltage */ + input_uV = 0; + if (rdev->supply) + input_uV = regulator_get_voltage(rdev->supply); if (input_uV <= 0) input_uV = rdev->constraints->input_uV; if (input_uV <= 0) { diff --git a/trunk/drivers/remoteproc/Kconfig b/trunk/drivers/remoteproc/Kconfig index f8d818abf98c..24d880e78ec6 100644 --- a/trunk/drivers/remoteproc/Kconfig +++ b/trunk/drivers/remoteproc/Kconfig @@ -4,11 +4,9 @@ menu "Remoteproc drivers (EXPERIMENTAL)" config REMOTEPROC tristate depends on EXPERIMENTAL - select FW_CONFIG config OMAP_REMOTEPROC tristate "OMAP remoteproc support" - depends on EXPERIMENTAL depends on ARCH_OMAP4 depends on OMAP_IOMMU select REMOTEPROC diff --git a/trunk/drivers/rpmsg/virtio_rpmsg_bus.c b/trunk/drivers/rpmsg/virtio_rpmsg_bus.c index 39d3aa41adda..75506ec2840e 100644 --- a/trunk/drivers/rpmsg/virtio_rpmsg_bus.c +++ b/trunk/drivers/rpmsg/virtio_rpmsg_bus.c @@ -188,26 +188,6 @@ static int rpmsg_uevent(struct device *dev, struct kobj_uevent_env *env) rpdev->id.name); } -/** - * __ept_release() - deallocate an rpmsg endpoint - * @kref: the ept's reference count - * - * This function deallocates an ept, and is invoked when its @kref refcount - * drops to zero. - * - * Never invoke this function directly! - */ -static void __ept_release(struct kref *kref) -{ - struct rpmsg_endpoint *ept = container_of(kref, struct rpmsg_endpoint, - refcount); - /* - * At this point no one holds a reference to ept anymore, - * so we can directly free it - */ - kfree(ept); -} - /* for more info, see below documentation of rpmsg_create_ept() */ static struct rpmsg_endpoint *__rpmsg_create_ept(struct virtproc_info *vrp, struct rpmsg_channel *rpdev, rpmsg_rx_cb_t cb, @@ -226,9 +206,6 @@ static struct rpmsg_endpoint *__rpmsg_create_ept(struct virtproc_info *vrp, return NULL; } - kref_init(&ept->refcount); - mutex_init(&ept->cb_lock); - ept->rpdev = rpdev; ept->cb = cb; ept->priv = priv; @@ -261,7 +238,7 @@ static struct rpmsg_endpoint *__rpmsg_create_ept(struct virtproc_info *vrp, idr_remove(&vrp->endpoints, request); free_ept: mutex_unlock(&vrp->endpoints_lock); - kref_put(&ept->refcount, __ept_release); + kfree(ept); return NULL; } @@ -325,17 +302,11 @@ EXPORT_SYMBOL(rpmsg_create_ept); static void __rpmsg_destroy_ept(struct virtproc_info *vrp, struct rpmsg_endpoint *ept) { - /* make sure new inbound messages can't find this ept anymore */ mutex_lock(&vrp->endpoints_lock); idr_remove(&vrp->endpoints, ept->addr); mutex_unlock(&vrp->endpoints_lock); - /* make sure in-flight inbound messages won't invoke cb anymore */ - mutex_lock(&ept->cb_lock); - ept->cb = NULL; - mutex_unlock(&ept->cb_lock); - - kref_put(&ept->refcount, __ept_release); + kfree(ept); } /** @@ -819,28 +790,12 @@ static void rpmsg_recv_done(struct virtqueue *rvq) /* use the dst addr to fetch the callback of the appropriate user */ mutex_lock(&vrp->endpoints_lock); - ept = idr_find(&vrp->endpoints, msg->dst); - - /* let's make sure no one deallocates ept while we use it */ - if (ept) - kref_get(&ept->refcount); - mutex_unlock(&vrp->endpoints_lock); - if (ept) { - /* make sure ept->cb doesn't go away while we use it */ - mutex_lock(&ept->cb_lock); - - if (ept->cb) - ept->cb(ept->rpdev, msg->data, msg->len, ept->priv, - msg->src); - - mutex_unlock(&ept->cb_lock); - - /* farewell, ept, we don't need you anymore */ - kref_put(&ept->refcount, __ept_release); - } else + if (ept && ept->cb) + ept->cb(ept->rpdev, msg->data, msg->len, ept->priv, msg->src); + else dev_warn(dev, "msg received with no recepient\n"); /* publish the real size of the buffer */ diff --git a/trunk/drivers/rtc/rtc-ab8500.c b/trunk/drivers/rtc/rtc-ab8500.c index 370889d0489b..4bcf9ca2818a 100644 --- a/trunk/drivers/rtc/rtc-ab8500.c +++ b/trunk/drivers/rtc/rtc-ab8500.c @@ -17,7 +17,6 @@ #include #include #include -#include #define AB8500_RTC_SOFF_STAT_REG 0x00 #define AB8500_RTC_CC_CONF_REG 0x01 @@ -423,7 +422,7 @@ static int __devinit ab8500_rtc_probe(struct platform_device *pdev) } err = request_threaded_irq(irq, NULL, rtc_alarm_handler, - IRQF_NO_SUSPEND | IRQF_ONESHOT, "ab8500-rtc", rtc); + IRQF_NO_SUSPEND, "ab8500-rtc", rtc); if (err < 0) { rtc_device_unregister(rtc); return err; @@ -431,6 +430,7 @@ static int __devinit ab8500_rtc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, rtc); + err = ab8500_sysfs_rtc_register(&pdev->dev); if (err) { dev_err(&pdev->dev, "sysfs RTC failed to register\n"); @@ -454,16 +454,10 @@ static int __devexit ab8500_rtc_remove(struct platform_device *pdev) return 0; } -static const struct of_device_id ab8500_rtc_match[] = { - { .compatible = "stericsson,ab8500-rtc", }, - {} -}; - static struct platform_driver ab8500_rtc_driver = { .driver = { .name = "ab8500-rtc", .owner = THIS_MODULE, - .of_match_table = ab8500_rtc_match, }, .probe = ab8500_rtc_probe, .remove = __devexit_p(ab8500_rtc_remove), diff --git a/trunk/drivers/rtc/rtc-mxc.c b/trunk/drivers/rtc/rtc-mxc.c index e3e50d69baf8..5e1d64ee5228 100644 --- a/trunk/drivers/rtc/rtc-mxc.c +++ b/trunk/drivers/rtc/rtc-mxc.c @@ -202,11 +202,10 @@ static irqreturn_t mxc_rtc_interrupt(int irq, void *dev_id) struct platform_device *pdev = dev_id; struct rtc_plat_data *pdata = platform_get_drvdata(pdev); void __iomem *ioaddr = pdata->ioaddr; - unsigned long flags; u32 status; u32 events = 0; - spin_lock_irqsave(&pdata->rtc->irq_lock, flags); + spin_lock_irq(&pdata->rtc->irq_lock); status = readw(ioaddr + RTC_RTCISR) & readw(ioaddr + RTC_RTCIENR); /* clear interrupt sources */ writew(status, ioaddr + RTC_RTCISR); @@ -225,7 +224,7 @@ static irqreturn_t mxc_rtc_interrupt(int irq, void *dev_id) events |= (RTC_PF | RTC_IRQF); rtc_update_irq(pdata->rtc, 1, events); - spin_unlock_irqrestore(&pdata->rtc->irq_lock, flags); + spin_unlock_irq(&pdata->rtc->irq_lock); return IRQ_HANDLED; } diff --git a/trunk/drivers/rtc/rtc-spear.c b/trunk/drivers/rtc/rtc-spear.c index e2785479113c..1f76320e545b 100644 --- a/trunk/drivers/rtc/rtc-spear.c +++ b/trunk/drivers/rtc/rtc-spear.c @@ -458,12 +458,12 @@ static int __devexit spear_rtc_remove(struct platform_device *pdev) clk_disable(config->clk); clk_put(config->clk); iounmap(config->ioaddr); + kfree(config); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (res) release_mem_region(res->start, resource_size(res)); platform_set_drvdata(pdev, NULL); rtc_device_unregister(config->rtc); - kfree(config); return 0; } diff --git a/trunk/drivers/rtc/rtc-twl.c b/trunk/drivers/rtc/rtc-twl.c index c5d06fe83bba..258abeabf624 100644 --- a/trunk/drivers/rtc/rtc-twl.c +++ b/trunk/drivers/rtc/rtc-twl.c @@ -510,7 +510,7 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev) } ret = request_threaded_irq(irq, NULL, twl_rtc_interrupt, - IRQF_TRIGGER_RISING | IRQF_ONESHOT, + IRQF_TRIGGER_RISING, dev_name(&rtc->dev), rtc); if (ret < 0) { dev_err(&pdev->dev, "IRQ is not free.\n"); diff --git a/trunk/drivers/scsi/aic94xx/aic94xx_task.c b/trunk/drivers/scsi/aic94xx/aic94xx_task.c index 393e7ce8e95a..532d212b6b2c 100644 --- a/trunk/drivers/scsi/aic94xx/aic94xx_task.c +++ b/trunk/drivers/scsi/aic94xx/aic94xx_task.c @@ -201,7 +201,7 @@ static void asd_get_response_tasklet(struct asd_ascb *ascb, if (SAS_STATUS_BUF_SIZE >= sizeof(*resp)) { resp->frame_len = le16_to_cpu(*(__le16 *)(r+6)); - memcpy(&resp->ending_fis[0], r+16, ATA_RESP_FIS_SIZE); + memcpy(&resp->ending_fis[0], r+16, 24); ts->buf_valid_size = sizeof(*resp); } } diff --git a/trunk/drivers/scsi/bnx2i/bnx2i.h b/trunk/drivers/scsi/bnx2i/bnx2i.h index 7e77cf620291..0c53c28dc3d3 100644 --- a/trunk/drivers/scsi/bnx2i/bnx2i.h +++ b/trunk/drivers/scsi/bnx2i/bnx2i.h @@ -350,7 +350,6 @@ struct bnx2i_hba { struct pci_dev *pcidev; struct net_device *netdev; void __iomem *regview; - resource_size_t reg_base; u32 age; unsigned long cnic_dev_type; diff --git a/trunk/drivers/scsi/bnx2i/bnx2i_hwi.c b/trunk/drivers/scsi/bnx2i/bnx2i_hwi.c index 86a12b48e477..ece47e502282 100644 --- a/trunk/drivers/scsi/bnx2i/bnx2i_hwi.c +++ b/trunk/drivers/scsi/bnx2i/bnx2i_hwi.c @@ -2724,6 +2724,7 @@ int bnx2i_map_ep_dbell_regs(struct bnx2i_endpoint *ep) goto arm_cq; } + reg_base = ep->hba->netdev->base_addr; if ((test_bit(BNX2I_NX2_DEV_5709, &ep->hba->cnic_dev_type)) && (ep->hba->mail_queue_access == BNX2I_MQ_BIN_MODE)) { config2 = REG_RD(ep->hba, BNX2_MQ_CONFIG2); @@ -2739,7 +2740,7 @@ int bnx2i_map_ep_dbell_regs(struct bnx2i_endpoint *ep) /* 5709 device in normal node and 5706/5708 devices */ reg_off = CTX_OFFSET + (MB_KERNEL_CTX_SIZE * cid_num); - ep->qp.ctx_base = ioremap_nocache(ep->hba->reg_base + reg_off, + ep->qp.ctx_base = ioremap_nocache(reg_base + reg_off, MB_KERNEL_CTX_SIZE); if (!ep->qp.ctx_base) return -ENOMEM; diff --git a/trunk/drivers/scsi/bnx2i/bnx2i_iscsi.c b/trunk/drivers/scsi/bnx2i/bnx2i_iscsi.c index 621538b8b544..f8d516b53161 100644 --- a/trunk/drivers/scsi/bnx2i/bnx2i_iscsi.c +++ b/trunk/drivers/scsi/bnx2i/bnx2i_iscsi.c @@ -811,13 +811,13 @@ struct bnx2i_hba *bnx2i_alloc_hba(struct cnic_dev *cnic) bnx2i_identify_device(hba); bnx2i_setup_host_queue_size(hba, shost); - hba->reg_base = pci_resource_start(hba->pcidev, 0); if (test_bit(BNX2I_NX2_DEV_5709, &hba->cnic_dev_type)) { - hba->regview = pci_iomap(hba->pcidev, 0, BNX2_MQ_CONFIG2); + hba->regview = ioremap_nocache(hba->netdev->base_addr, + BNX2_MQ_CONFIG2); if (!hba->regview) goto ioreg_map_err; } else if (test_bit(BNX2I_NX2_DEV_57710, &hba->cnic_dev_type)) { - hba->regview = pci_iomap(hba->pcidev, 0, 4096); + hba->regview = ioremap_nocache(hba->netdev->base_addr, 4096); if (!hba->regview) goto ioreg_map_err; } @@ -884,7 +884,7 @@ struct bnx2i_hba *bnx2i_alloc_hba(struct cnic_dev *cnic) bnx2i_free_mp_bdt(hba); mp_bdt_mem_err: if (hba->regview) { - pci_iounmap(hba->pcidev, hba->regview); + iounmap(hba->regview); hba->regview = NULL; } ioreg_map_err: @@ -910,7 +910,7 @@ void bnx2i_free_hba(struct bnx2i_hba *hba) pci_dev_put(hba->pcidev); if (hba->regview) { - pci_iounmap(hba->pcidev, hba->regview); + iounmap(hba->regview); hba->regview = NULL; } bnx2i_free_mp_bdt(hba); diff --git a/trunk/drivers/scsi/libsas/sas_ata.c b/trunk/drivers/scsi/libsas/sas_ata.c index d109cc3a17b6..441d88ad99a7 100644 --- a/trunk/drivers/scsi/libsas/sas_ata.c +++ b/trunk/drivers/scsi/libsas/sas_ata.c @@ -139,12 +139,12 @@ static void sas_ata_task_done(struct sas_task *task) if (stat->stat == SAS_PROTO_RESPONSE || stat->stat == SAM_STAT_GOOD || ((stat->stat == SAM_STAT_CHECK_CONDITION && dev->sata_dev.command_set == ATAPI_COMMAND_SET))) { - memcpy(dev->sata_dev.fis, resp->ending_fis, ATA_RESP_FIS_SIZE); + ata_tf_from_fis(resp->ending_fis, &dev->sata_dev.tf); if (!link->sactive) { - qc->err_mask |= ac_err_mask(dev->sata_dev.fis[2]); + qc->err_mask |= ac_err_mask(dev->sata_dev.tf.command); } else { - link->eh_info.err_mask |= ac_err_mask(dev->sata_dev.fis[2]); + link->eh_info.err_mask |= ac_err_mask(dev->sata_dev.tf.command); if (unlikely(link->eh_info.err_mask)) qc->flags |= ATA_QCFLAG_FAILED; } @@ -161,8 +161,8 @@ static void sas_ata_task_done(struct sas_task *task) qc->flags |= ATA_QCFLAG_FAILED; } - dev->sata_dev.fis[3] = 0x04; /* status err */ - dev->sata_dev.fis[2] = ATA_ERR; + dev->sata_dev.tf.feature = 0x04; /* status err */ + dev->sata_dev.tf.command = ATA_ERR; } } @@ -269,7 +269,7 @@ static bool sas_ata_qc_fill_rtf(struct ata_queued_cmd *qc) { struct domain_device *dev = qc->ap->private_data; - ata_tf_from_fis(dev->sata_dev.fis, &qc->result_tf); + memcpy(&qc->result_tf, &dev->sata_dev.tf, sizeof(qc->result_tf)); return true; } diff --git a/trunk/drivers/tty/hvc/hvc_opal.c b/trunk/drivers/tty/hvc/hvc_opal.c index 0d2ea0c224c3..ced26c8ccd57 100644 --- a/trunk/drivers/tty/hvc/hvc_opal.c +++ b/trunk/drivers/tty/hvc/hvc_opal.c @@ -401,7 +401,7 @@ void __init hvc_opal_init_early(void) } #ifdef CONFIG_PPC_EARLY_DEBUG_OPAL_RAW -void __init udbg_init_debug_opal_raw(void) +void __init udbg_init_debug_opal(void) { u32 index = CONFIG_PPC_EARLY_DEBUG_OPAL_VTERMNO; hvc_opal_privs[index] = &hvc_opal_boot_priv; diff --git a/trunk/drivers/usb/class/cdc-wdm.c b/trunk/drivers/usb/class/cdc-wdm.c index ee469274a3fe..8fd398dffced 100644 --- a/trunk/drivers/usb/class/cdc-wdm.c +++ b/trunk/drivers/usb/class/cdc-wdm.c @@ -500,8 +500,6 @@ static ssize_t wdm_read goto retry; } if (!desc->reslength) { /* zero length read */ - dev_dbg(&desc->intf->dev, "%s: zero length - clearing WDM_READ\n", __func__); - clear_bit(WDM_READ, &desc->flags); spin_unlock_irq(&desc->iuspin); goto retry; } diff --git a/trunk/drivers/usb/core/hub.c b/trunk/drivers/usb/core/hub.c index 8fb484984c86..25a7422ee657 100644 --- a/trunk/drivers/usb/core/hub.c +++ b/trunk/drivers/usb/core/hub.c @@ -2324,16 +2324,12 @@ static unsigned hub_is_wusb(struct usb_hub *hub) static int hub_port_reset(struct usb_hub *hub, int port1, struct usb_device *udev, unsigned int delay, bool warm); -/* Is a USB 3.0 port in the Inactive or Complinance Mode state? - * Port worm reset is required to recover - */ -static bool hub_port_warm_reset_required(struct usb_hub *hub, u16 portstatus) +/* Is a USB 3.0 port in the Inactive state? */ +static bool hub_port_inactive(struct usb_hub *hub, u16 portstatus) { return hub_is_superspeed(hub->hdev) && - (((portstatus & USB_PORT_STAT_LINK_STATE) == - USB_SS_PORT_LS_SS_INACTIVE) || - ((portstatus & USB_PORT_STAT_LINK_STATE) == - USB_SS_PORT_LS_COMP_MOD)) ; + (portstatus & USB_PORT_STAT_LINK_STATE) == + USB_SS_PORT_LS_SS_INACTIVE; } static int hub_port_wait_reset(struct usb_hub *hub, int port1, @@ -2369,7 +2365,7 @@ static int hub_port_wait_reset(struct usb_hub *hub, int port1, * * See https://bugzilla.kernel.org/show_bug.cgi?id=41752 */ - if (hub_port_warm_reset_required(hub, portstatus)) { + if (hub_port_inactive(hub, portstatus)) { int ret; if ((portchange & USB_PORT_STAT_C_CONNECTION)) @@ -4412,7 +4408,9 @@ static void hub_events(void) /* Warm reset a USB3 protocol port if it's in * SS.Inactive state. */ - if (hub_port_warm_reset_required(hub, portstatus)) { + if (hub_is_superspeed(hub->hdev) && + (portstatus & USB_PORT_STAT_LINK_STATE) + == USB_SS_PORT_LS_SS_INACTIVE) { dev_dbg(hub_dev, "warm reset port %d\n", i); hub_port_reset(hub, i, NULL, HUB_BH_RESET_TIME, true); diff --git a/trunk/drivers/usb/host/xhci-hub.c b/trunk/drivers/usb/host/xhci-hub.c index 7b01094d7993..2732ef660c5c 100644 --- a/trunk/drivers/usb/host/xhci-hub.c +++ b/trunk/drivers/usb/host/xhci-hub.c @@ -462,42 +462,6 @@ void xhci_test_and_clear_bit(struct xhci_hcd *xhci, __le32 __iomem **port_array, } } -/* Updates Link Status for super Speed port */ -static void xhci_hub_report_link_state(u32 *status, u32 status_reg) -{ - u32 pls = status_reg & PORT_PLS_MASK; - - /* resume state is a xHCI internal state. - * Do not report it to usb core. - */ - if (pls == XDEV_RESUME) - return; - - /* When the CAS bit is set then warm reset - * should be performed on port - */ - if (status_reg & PORT_CAS) { - /* The CAS bit can be set while the port is - * in any link state. - * Only roothubs have CAS bit, so we - * pretend to be in compliance mode - * unless we're already in compliance - * or the inactive state. - */ - if (pls != USB_SS_PORT_LS_COMP_MOD && - pls != USB_SS_PORT_LS_SS_INACTIVE) { - pls = USB_SS_PORT_LS_COMP_MOD; - } - /* Return also connection bit - - * hub state machine resets port - * when this bit is set. - */ - pls |= USB_PORT_STAT_CONNECTION; - } - /* update status field */ - *status |= pls; -} - int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, char *buf, u16 wLength) { @@ -642,9 +606,13 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, else status |= USB_PORT_STAT_POWER; } - /* Update Port Link State for super speed ports*/ + /* Port Link State */ if (hcd->speed == HCD_USB3) { - xhci_hub_report_link_state(&status, temp); + /* resume state is a xHCI internal state. + * Do not report it to usb core. + */ + if ((temp & PORT_PLS_MASK) != XDEV_RESUME) + status |= (temp & PORT_PLS_MASK); } if (bus_state->port_c_suspend & (1 << wIndex)) status |= 1 << USB_PORT_FEAT_C_SUSPEND; diff --git a/trunk/drivers/usb/host/xhci-ring.c b/trunk/drivers/usb/host/xhci-ring.c index 8275645889da..23b4aefd1036 100644 --- a/trunk/drivers/usb/host/xhci-ring.c +++ b/trunk/drivers/usb/host/xhci-ring.c @@ -885,17 +885,6 @@ static void update_ring_for_set_deq_completion(struct xhci_hcd *xhci, num_trbs_free_temp = ep_ring->num_trbs_free; dequeue_temp = ep_ring->dequeue; - /* If we get two back-to-back stalls, and the first stalled transfer - * ends just before a link TRB, the dequeue pointer will be left on - * the link TRB by the code in the while loop. So we have to update - * the dequeue pointer one segment further, or we'll jump off - * the segment into la-la-land. - */ - if (last_trb(xhci, ep_ring, ep_ring->deq_seg, ep_ring->dequeue)) { - ep_ring->deq_seg = ep_ring->deq_seg->next; - ep_ring->dequeue = ep_ring->deq_seg->trbs; - } - while (ep_ring->dequeue != dev->eps[ep_index].queued_deq_ptr) { /* We have more usable TRBs */ ep_ring->num_trbs_free++; diff --git a/trunk/drivers/usb/host/xhci.h b/trunk/drivers/usb/host/xhci.h index 55c0785810c9..de3d6e3e57be 100644 --- a/trunk/drivers/usb/host/xhci.h +++ b/trunk/drivers/usb/host/xhci.h @@ -341,11 +341,7 @@ struct xhci_op_regs { #define PORT_PLC (1 << 22) /* port configure error change - port failed to configure its link partner */ #define PORT_CEC (1 << 23) -/* Cold Attach Status - xHC can set this bit to report device attached during - * Sx state. Warm port reset should be perfomed to clear this bit and move port - * to connected state. - */ -#define PORT_CAS (1 << 24) +/* bit 24 reserved */ /* wake on connect (enable) */ #define PORT_WKCONN_E (1 << 25) /* wake on disconnect (enable) */ diff --git a/trunk/drivers/usb/serial/metro-usb.c b/trunk/drivers/usb/serial/metro-usb.c index d47eb06fe463..81423f7361db 100644 --- a/trunk/drivers/usb/serial/metro-usb.c +++ b/trunk/drivers/usb/serial/metro-usb.c @@ -222,6 +222,14 @@ static int metrousb_open(struct tty_struct *tty, struct usb_serial_port *port) metro_priv->throttled = 0; spin_unlock_irqrestore(&metro_priv->lock, flags); + /* + * Force low_latency on so that our tty_push actually forces the data + * through, otherwise it is scheduled, and with high data rates (like + * with OHCI) data can get lost. + */ + if (tty) + tty->low_latency = 1; + /* Clear the urb pipe. */ usb_clear_halt(serial->dev, port->interrupt_in_urb->pipe); diff --git a/trunk/drivers/usb/serial/option.c b/trunk/drivers/usb/serial/option.c index 417ab1b0aa30..adf8ce72be50 100644 --- a/trunk/drivers/usb/serial/option.c +++ b/trunk/drivers/usb/serial/option.c @@ -497,15 +497,6 @@ static void option_instat_callback(struct urb *urb); /* MediaTek products */ #define MEDIATEK_VENDOR_ID 0x0e8d -#define MEDIATEK_PRODUCT_DC_1COM 0x00a0 -#define MEDIATEK_PRODUCT_DC_4COM 0x00a5 -#define MEDIATEK_PRODUCT_DC_5COM 0x00a4 -#define MEDIATEK_PRODUCT_7208_1COM 0x7101 -#define MEDIATEK_PRODUCT_7208_2COM 0x7102 -#define MEDIATEK_PRODUCT_FP_1COM 0x0003 -#define MEDIATEK_PRODUCT_FP_2COM 0x0023 -#define MEDIATEK_PRODUCT_FPDC_1COM 0x0043 -#define MEDIATEK_PRODUCT_FPDC_2COM 0x0033 /* Cellient products */ #define CELLIENT_VENDOR_ID 0x2692 @@ -563,10 +554,6 @@ static const struct option_blacklist_info net_intf1_blacklist = { .reserved = BIT(1), }; -static const struct option_blacklist_info net_intf2_blacklist = { - .reserved = BIT(2), -}; - static const struct option_blacklist_info net_intf3_blacklist = { .reserved = BIT(3), }; @@ -1112,8 +1099,6 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1298, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1299, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1300, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1402, 0xff, 0xff, 0xff), - .driver_info = (kernel_ulong_t)&net_intf2_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_k3765_z_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) }, @@ -1255,17 +1240,6 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a1, 0xff, 0x02, 0x01) }, { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a2, 0xff, 0x00, 0x00) }, { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a2, 0xff, 0x02, 0x01) }, /* MediaTek MT6276M modem & app port */ - { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_1COM, 0x0a, 0x00, 0x00) }, - { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_5COM, 0xff, 0x02, 0x01) }, - { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_5COM, 0xff, 0x00, 0x00) }, - { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM, 0xff, 0x02, 0x01) }, - { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM, 0xff, 0x00, 0x00) }, - { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_7208_1COM, 0x02, 0x00, 0x00) }, - { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_7208_2COM, 0x02, 0x02, 0x01) }, - { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FP_1COM, 0x0a, 0x00, 0x00) }, - { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FP_2COM, 0x0a, 0x00, 0x00) }, - { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FPDC_1COM, 0x0a, 0x00, 0x00) }, - { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FPDC_2COM, 0x0a, 0x00, 0x00) }, { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) }, { } /* Terminating entry */ }; diff --git a/trunk/drivers/video/omap2/dss/core.c b/trunk/drivers/video/omap2/dss/core.c index 58bd9c27369d..5066eee10ccf 100644 --- a/trunk/drivers/video/omap2/dss/core.c +++ b/trunk/drivers/video/omap2/dss/core.c @@ -32,7 +32,6 @@ #include #include #include -#include #include