Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull net into net-next to get the synchronize_net() bug fix in
bonding.

Signed-off-by: David S. Miller <davem@davemloft.net>

+626 -263
+1 -1
arch/arm/boot/dts/armada-370-mirabox.dts
··· 54 54 }; 55 55 56 56 mvsdio@d00d4000 { 57 - pinctrl-0 = <&sdio_pins2>; 57 + pinctrl-0 = <&sdio_pins3>; 58 58 pinctrl-names = "default"; 59 59 status = "okay"; 60 60 /*
+6
arch/arm/boot/dts/armada-370.dtsi
··· 59 59 "mpp50", "mpp51", "mpp52"; 60 60 marvell,function = "sd0"; 61 61 }; 62 + 63 + sdio_pins3: sdio-pins3 { 64 + marvell,pins = "mpp48", "mpp49", "mpp50", 65 + "mpp51", "mpp52", "mpp53"; 66 + marvell,function = "sd0"; 67 + }; 62 68 }; 63 69 64 70 gpio0: gpio@d0018100 {
+2 -2
arch/arm/boot/dts/dbx5x0.dtsi
··· 191 191 192 192 prcmu: prcmu@80157000 { 193 193 compatible = "stericsson,db8500-prcmu"; 194 - reg = <0x80157000 0x1000>; 195 - reg-names = "prcmu"; 194 + reg = <0x80157000 0x1000>, <0x801b0000 0x8000>, <0x801b8000 0x1000>; 195 + reg-names = "prcmu", "prcmu-tcpm", "prcmu-tcdm"; 196 196 interrupts = <0 47 0x4>; 197 197 #address-cells = <1>; 198 198 #size-cells = <1>;
+1
arch/arm/boot/dts/kirkwood-goflexnet.dts
··· 77 77 }; 78 78 79 79 nand@3000000 { 80 + chip-delay = <40>; 80 81 status = "okay"; 81 82 82 83 partition@0 {
+7 -2
arch/arm/boot/dts/orion5x.dtsi
··· 13 13 compatible = "marvell,orion5x"; 14 14 interrupt-parent = <&intc>; 15 15 16 + aliases { 17 + gpio0 = &gpio0; 18 + }; 16 19 intc: interrupt-controller { 17 20 compatible = "marvell,orion-intc", "marvell,intc"; 18 21 interrupt-controller; ··· 35 32 #gpio-cells = <2>; 36 33 gpio-controller; 37 34 reg = <0x10100 0x40>; 38 - ngpio = <32>; 35 + ngpios = <32>; 36 + interrupt-controller; 37 + #interrupt-cells = <2>; 39 38 interrupts = <6>, <7>, <8>, <9>; 40 39 }; 41 40 ··· 96 91 reg = <0x90000 0x10000>, 97 92 <0xf2200000 0x800>; 98 93 reg-names = "regs", "sram"; 99 - interrupts = <22>; 94 + interrupts = <28>; 100 95 status = "okay"; 101 96 }; 102 97 };
+3 -13
arch/arm/mach-cns3xxx/core.c
··· 22 22 23 23 static struct map_desc cns3xxx_io_desc[] __initdata = { 24 24 { 25 - .virtual = CNS3XXX_TC11MP_TWD_BASE_VIRT, 26 - .pfn = __phys_to_pfn(CNS3XXX_TC11MP_TWD_BASE), 27 - .length = SZ_4K, 28 - .type = MT_DEVICE, 29 - }, { 30 - .virtual = CNS3XXX_TC11MP_GIC_CPU_BASE_VIRT, 31 - .pfn = __phys_to_pfn(CNS3XXX_TC11MP_GIC_CPU_BASE), 32 - .length = SZ_4K, 33 - .type = MT_DEVICE, 34 - }, { 35 - .virtual = CNS3XXX_TC11MP_GIC_DIST_BASE_VIRT, 36 - .pfn = __phys_to_pfn(CNS3XXX_TC11MP_GIC_DIST_BASE), 37 - .length = SZ_4K, 25 + .virtual = CNS3XXX_TC11MP_SCU_BASE_VIRT, 26 + .pfn = __phys_to_pfn(CNS3XXX_TC11MP_SCU_BASE), 27 + .length = SZ_8K, 38 28 .type = MT_DEVICE, 39 29 }, { 40 30 .virtual = CNS3XXX_TIMER1_2_3_BASE_VIRT,
+8 -8
arch/arm/mach-cns3xxx/include/mach/cns3xxx.h
··· 94 94 #define RTC_INTR_STS_OFFSET 0x34 95 95 96 96 #define CNS3XXX_MISC_BASE 0x76000000 /* Misc Control */ 97 - #define CNS3XXX_MISC_BASE_VIRT 0xFFF07000 /* Misc Control */ 97 + #define CNS3XXX_MISC_BASE_VIRT 0xFB000000 /* Misc Control */ 98 98 99 99 #define CNS3XXX_PM_BASE 0x77000000 /* Power Management Control */ 100 - #define CNS3XXX_PM_BASE_VIRT 0xFFF08000 100 + #define CNS3XXX_PM_BASE_VIRT 0xFB001000 101 101 102 102 #define PM_CLK_GATE_OFFSET 0x00 103 103 #define PM_SOFT_RST_OFFSET 0x04 ··· 109 109 #define PM_PLL_HM_PD_OFFSET 0x1C 110 110 111 111 #define CNS3XXX_UART0_BASE 0x78000000 /* UART 0 */ 112 - #define CNS3XXX_UART0_BASE_VIRT 0xFFF09000 112 + #define CNS3XXX_UART0_BASE_VIRT 0xFB002000 113 113 114 114 #define CNS3XXX_UART1_BASE 0x78400000 /* UART 1 */ 115 115 #define CNS3XXX_UART1_BASE_VIRT 0xFFF0A000 ··· 130 130 #define CNS3XXX_I2S_BASE_VIRT 0xFFF10000 131 131 132 132 #define CNS3XXX_TIMER1_2_3_BASE 0x7C800000 /* Timer */ 133 - #define CNS3XXX_TIMER1_2_3_BASE_VIRT 0xFFF10800 133 + #define CNS3XXX_TIMER1_2_3_BASE_VIRT 0xFB003000 134 134 135 135 #define TIMER1_COUNTER_OFFSET 0x00 136 136 #define TIMER1_AUTO_RELOAD_OFFSET 0x04 ··· 227 227 * Testchip peripheral and fpga gic regions 228 228 */ 229 229 #define CNS3XXX_TC11MP_SCU_BASE 0x90000000 /* IRQ, Test chip */ 230 - #define CNS3XXX_TC11MP_SCU_BASE_VIRT 0xFF000000 230 + #define CNS3XXX_TC11MP_SCU_BASE_VIRT 0xFB004000 231 231 232 232 #define CNS3XXX_TC11MP_GIC_CPU_BASE 0x90000100 /* Test chip interrupt controller CPU interface */ 233 - #define CNS3XXX_TC11MP_GIC_CPU_BASE_VIRT 0xFF000100 233 + #define CNS3XXX_TC11MP_GIC_CPU_BASE_VIRT (CNS3XXX_TC11MP_SCU_BASE_VIRT + 0x100) 234 234 235 235 #define CNS3XXX_TC11MP_TWD_BASE 0x90000600 236 - #define CNS3XXX_TC11MP_TWD_BASE_VIRT 0xFF000600 236 + #define CNS3XXX_TC11MP_TWD_BASE_VIRT (CNS3XXX_TC11MP_SCU_BASE_VIRT + 0x600) 237 237 238 238 #define CNS3XXX_TC11MP_GIC_DIST_BASE 0x90001000 /* Test chip interrupt controller distributor */ 239 - #define CNS3XXX_TC11MP_GIC_DIST_BASE_VIRT 0xFF001000 239 + #define CNS3XXX_TC11MP_GIC_DIST_BASE_VIRT (CNS3XXX_TC11MP_SCU_BASE_VIRT + 0x1000) 240 240 241 241 #define CNS3XXX_TC11MP_L220_BASE 0x92002000 /* L220 registers */ 242 242 #define CNS3XXX_TC11MP_L220_BASE_VIRT 0xFF002000
+7 -3
arch/arm/mach-ep93xx/include/mach/uncompress.h
··· 47 47 48 48 static inline void putc(int c) 49 49 { 50 - /* Transmit fifo not full? */ 51 - while (__raw_readb(PHYS_UART_FLAG) & UART_FLAG_TXFF) 52 - ; 50 + int i; 51 + 52 + for (i = 0; i < 10000; i++) { 53 + /* Transmit fifo not full? */ 54 + if (!(__raw_readb(PHYS_UART_FLAG) & UART_FLAG_TXFF)) 55 + break; 56 + } 53 57 54 58 __raw_writeb(c, PHYS_UART_DATA); 55 59 }
+2
arch/arm/mach-imx/common.h
··· 110 110 111 111 extern void imx_enable_cpu(int cpu, bool enable); 112 112 extern void imx_set_cpu_jump(int cpu, void *jump_addr); 113 + extern u32 imx_get_cpu_arg(int cpu); 114 + extern void imx_set_cpu_arg(int cpu, u32 arg); 113 115 extern void v7_cpu_resume(void); 114 116 extern u32 *pl310_get_save_ptr(void); 115 117 #ifdef CONFIG_SMP
+12
arch/arm/mach-imx/hotplug.c
··· 46 46 void imx_cpu_die(unsigned int cpu) 47 47 { 48 48 cpu_enter_lowpower(); 49 + /* 50 + * We use the cpu jumping argument register to sync with 51 + * imx_cpu_kill() which is running on cpu0 and waiting for 52 + * the register being cleared to kill the cpu. 53 + */ 54 + imx_set_cpu_arg(cpu, ~0); 49 55 cpu_do_idle(); 50 56 } 51 57 52 58 int imx_cpu_kill(unsigned int cpu) 53 59 { 60 + unsigned long timeout = jiffies + msecs_to_jiffies(50); 61 + 62 + while (imx_get_cpu_arg(cpu) == 0) 63 + if (time_after(jiffies, timeout)) 64 + return 0; 54 65 imx_enable_cpu(cpu, false); 66 + imx_set_cpu_arg(cpu, 0); 55 67 return 1; 56 68 }
+12
arch/arm/mach-imx/src.c
··· 43 43 src_base + SRC_GPR1 + cpu * 8); 44 44 } 45 45 46 + u32 imx_get_cpu_arg(int cpu) 47 + { 48 + cpu = cpu_logical_map(cpu); 49 + return readl_relaxed(src_base + SRC_GPR1 + cpu * 8 + 4); 50 + } 51 + 52 + void imx_set_cpu_arg(int cpu, u32 arg) 53 + { 54 + cpu = cpu_logical_map(cpu); 55 + writel_relaxed(arg, src_base + SRC_GPR1 + cpu * 8 + 4); 56 + } 57 + 46 58 void imx_src_prepare_restart(void) 47 59 { 48 60 u32 val;
+2
arch/arm/mach-kirkwood/guruplug-setup.c
··· 53 53 54 54 static struct mvsdio_platform_data guruplug_mvsdio_data = { 55 55 /* unfortunately the CD signal has not been connected */ 56 + .gpio_card_detect = -1, 57 + .gpio_write_protect = -1, 56 58 }; 57 59 58 60 static struct gpio_led guruplug_led_pins[] = {
+1
arch/arm/mach-kirkwood/openrd-setup.c
··· 55 55 56 56 static struct mvsdio_platform_data openrd_mvsdio_data = { 57 57 .gpio_card_detect = 29, /* MPP29 used as SD card detect */ 58 + .gpio_write_protect = -1, 58 59 }; 59 60 60 61 static unsigned int openrd_mpp_config[] __initdata = {
+1
arch/arm/mach-kirkwood/rd88f6281-setup.c
··· 69 69 70 70 static struct mvsdio_platform_data rd88f6281_mvsdio_data = { 71 71 .gpio_card_detect = 28, 72 + .gpio_write_protect = -1, 72 73 }; 73 74 74 75 static unsigned int rd88f6281_mpp_config[] __initdata = {
+4 -1
arch/arm/mach-msm/timer.c
··· 62 62 { 63 63 u32 ctrl = readl_relaxed(event_base + TIMER_ENABLE); 64 64 65 - writel_relaxed(0, event_base + TIMER_CLEAR); 65 + ctrl &= ~TIMER_ENABLE_EN; 66 + writel_relaxed(ctrl, event_base + TIMER_ENABLE); 67 + 68 + writel_relaxed(ctrl, event_base + TIMER_CLEAR); 66 69 writel_relaxed(cycles, event_base + TIMER_MATCH_VAL); 67 70 writel_relaxed(ctrl | TIMER_ENABLE_EN, event_base + TIMER_ENABLE); 68 71 return 0;
+5 -3
arch/arm/mach-mvebu/irq-armada-370-xp.c
··· 44 44 45 45 #define ARMADA_370_XP_MAX_PER_CPU_IRQS (28) 46 46 47 + #define ARMADA_370_XP_TIMER0_PER_CPU_IRQ (5) 48 + 47 49 #define ACTIVE_DOORBELLS (8) 48 50 49 51 static DEFINE_RAW_SPINLOCK(irq_controller_lock); ··· 64 62 #ifdef CONFIG_SMP 65 63 irq_hw_number_t hwirq = irqd_to_hwirq(d); 66 64 67 - if (hwirq > ARMADA_370_XP_MAX_PER_CPU_IRQS) 65 + if (hwirq != ARMADA_370_XP_TIMER0_PER_CPU_IRQ) 68 66 writel(hwirq, main_int_base + 69 67 ARMADA_370_XP_INT_CLEAR_ENABLE_OFFS); 70 68 else ··· 81 79 #ifdef CONFIG_SMP 82 80 irq_hw_number_t hwirq = irqd_to_hwirq(d); 83 81 84 - if (hwirq > ARMADA_370_XP_MAX_PER_CPU_IRQS) 82 + if (hwirq != ARMADA_370_XP_TIMER0_PER_CPU_IRQ) 85 83 writel(hwirq, main_int_base + 86 84 ARMADA_370_XP_INT_SET_ENABLE_OFFS); 87 85 else ··· 149 147 writel(hw, main_int_base + ARMADA_370_XP_INT_SET_ENABLE_OFFS); 150 148 irq_set_status_flags(virq, IRQ_LEVEL); 151 149 152 - if (hw < ARMADA_370_XP_MAX_PER_CPU_IRQS) { 150 + if (hw == ARMADA_370_XP_TIMER0_PER_CPU_IRQ) { 153 151 irq_set_percpu_devid(virq); 154 152 irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip, 155 153 handle_percpu_devid_irq);
+1 -11
arch/arm/mach-omap1/clock_data.c
··· 543 543 /* Direct from ULPD, no parent */ 544 544 .rate = 48000000, 545 545 .enable_reg = OMAP1_IO_ADDRESS(SOFT_REQ_REG), 546 - .enable_bit = USB_REQ_EN_SHIFT, 547 - }; 548 - 549 - static struct clk usb_dc_ck7xx = { 550 - .name = "usb_dc_ck", 551 - .ops = &clkops_generic, 552 - /* Direct from ULPD, no parent */ 553 - .rate = 48000000, 554 - .enable_reg = OMAP1_IO_ADDRESS(SOFT_REQ_REG), 555 546 .enable_bit = SOFT_USB_OTG_DPLL_REQ_SHIFT, 556 547 }; 557 548 ··· 718 727 CLK(NULL, "usb_clko", &usb_clko, CK_16XX | CK_1510 | CK_310), 719 728 CLK(NULL, "usb_hhc_ck", &usb_hhc_ck1510, CK_1510 | CK_310), 720 729 CLK(NULL, "usb_hhc_ck", &usb_hhc_ck16xx, CK_16XX), 721 - CLK(NULL, "usb_dc_ck", &usb_dc_ck, CK_16XX), 722 - CLK(NULL, "usb_dc_ck", &usb_dc_ck7xx, CK_7XX), 730 + CLK(NULL, "usb_dc_ck", &usb_dc_ck, CK_16XX | CK_7XX), 723 731 CLK(NULL, "mclk", &mclk_1510, CK_1510 | CK_310), 724 732 CLK(NULL, "mclk", &mclk_16xx, CK_16XX), 725 733 CLK(NULL, "bclk", &bclk_1510, CK_1510 | CK_310),
+20
arch/arm/mach-omap2/cclock44xx_data.c
··· 52 52 */ 53 53 #define OMAP4_DPLL_ABE_DEFFREQ 98304000 54 54 55 + /* 56 + * OMAP4 USB DPLL default frequency. In OMAP4430 TRM version V, section 57 + * "3.6.3.9.5 DPLL_USB Preferred Settings" shows that the preferred 58 + * locked frequency for the USB DPLL is 960MHz. 59 + */ 60 + #define OMAP4_DPLL_USB_DEFFREQ 960000000 61 + 55 62 /* Root clocks */ 56 63 57 64 DEFINE_CLK_FIXED_RATE(extalt_clkin_ck, CLK_IS_ROOT, 59000000, 0x0); ··· 1018 1011 OMAP4430_CM_L3INIT_MMC2_CLKCTRL, OMAP4430_CLKSEL_MASK, 1019 1012 hsmmc1_fclk_parents, func_dmic_abe_gfclk_ops); 1020 1013 1014 + DEFINE_CLK_GATE(ocp2scp_usb_phy_phy_48m, "func_48m_fclk", &func_48m_fclk, 0x0, 1015 + OMAP4430_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, 1016 + OMAP4430_OPTFCLKEN_PHY_48M_SHIFT, 0x0, NULL); 1017 + 1021 1018 DEFINE_CLK_GATE(sha2md5_fck, "l3_div_ck", &l3_div_ck, 0x0, 1022 1019 OMAP4430_CM_L4SEC_SHA2MD51_CLKCTRL, 1023 1020 OMAP4430_MODULEMODE_SWCTRL_SHIFT, 0x0, NULL); ··· 1549 1538 CLK(NULL, "per_mcbsp4_gfclk", &per_mcbsp4_gfclk, CK_443X), 1550 1539 CLK(NULL, "hsmmc1_fclk", &hsmmc1_fclk, CK_443X), 1551 1540 CLK(NULL, "hsmmc2_fclk", &hsmmc2_fclk, CK_443X), 1541 + CLK(NULL, "ocp2scp_usb_phy_phy_48m", &ocp2scp_usb_phy_phy_48m, CK_443X), 1552 1542 CLK(NULL, "sha2md5_fck", &sha2md5_fck, CK_443X), 1553 1543 CLK(NULL, "slimbus1_fclk_1", &slimbus1_fclk_1, CK_443X), 1554 1544 CLK(NULL, "slimbus1_fclk_0", &slimbus1_fclk_0, CK_443X), ··· 1716 1704 rc = clk_set_rate(&dpll_abe_ck, OMAP4_DPLL_ABE_DEFFREQ); 1717 1705 if (rc) 1718 1706 pr_err("%s: failed to configure ABE DPLL!\n", __func__); 1707 + 1708 + /* 1709 + * Lock USB DPLL on OMAP4 devices so that the L3INIT power 1710 + * domain can transition to retention state when not in use. 1711 + */ 1712 + rc = clk_set_rate(&dpll_usb_ck, OMAP4_DPLL_USB_DEFFREQ); 1713 + if (rc) 1714 + pr_err("%s: failed to configure USB DPLL!\n", __func__); 1719 1715 1720 1716 return 0; 1721 1717 }
+3
arch/arm/mach-omap2/common.h
··· 293 293 struct omap_hwmod; 294 294 extern int omap_dss_reset(struct omap_hwmod *); 295 295 296 + /* SoC specific clock initializer */ 297 + extern int (*omap_clk_init)(void); 298 + 296 299 #endif /* __ASSEMBLER__ */ 297 300 #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */
+12 -6
arch/arm/mach-omap2/io.c
··· 55 55 #include "prm44xx.h" 56 56 57 57 /* 58 + * omap_clk_init: points to a function that does the SoC-specific 59 + * clock initializations 60 + */ 61 + int (*omap_clk_init)(void); 62 + 63 + /* 58 64 * The machine specific code may provide the extra mapping besides the 59 65 * default mapping provided here. 60 66 */ ··· 403 397 omap242x_clockdomains_init(); 404 398 omap2420_hwmod_init(); 405 399 omap_hwmod_init_postsetup(); 406 - omap2420_clk_init(); 400 + omap_clk_init = omap2420_clk_init; 407 401 } 408 402 409 403 void __init omap2420_init_late(void) ··· 433 427 omap243x_clockdomains_init(); 434 428 omap2430_hwmod_init(); 435 429 omap_hwmod_init_postsetup(); 436 - omap2430_clk_init(); 430 + omap_clk_init = omap2430_clk_init; 437 431 } 438 432 439 433 void __init omap2430_init_late(void) ··· 468 462 omap3xxx_clockdomains_init(); 469 463 omap3xxx_hwmod_init(); 470 464 omap_hwmod_init_postsetup(); 471 - omap3xxx_clk_init(); 465 + omap_clk_init = omap3xxx_clk_init; 472 466 } 473 467 474 468 void __init omap3430_init_early(void) ··· 506 500 omap3xxx_clockdomains_init(); 507 501 omap3xxx_hwmod_init(); 508 502 omap_hwmod_init_postsetup(); 509 - omap3xxx_clk_init(); 503 + omap_clk_init = omap3xxx_clk_init; 510 504 } 511 505 512 506 void __init omap3_init_late(void) ··· 574 568 am33xx_clockdomains_init(); 575 569 am33xx_hwmod_init(); 576 570 omap_hwmod_init_postsetup(); 577 - am33xx_clk_init(); 571 + omap_clk_init = am33xx_clk_init; 578 572 } 579 573 #endif 580 574 ··· 599 593 omap44xx_clockdomains_init(); 600 594 omap44xx_hwmod_init(); 601 595 omap_hwmod_init_postsetup(); 602 - omap4xxx_clk_init(); 596 + omap_clk_init = omap4xxx_clk_init; 603 597 } 604 598 605 599 void __init omap4430_init_late(void)
+5 -2
arch/arm/mach-omap2/omap_hwmod.c
··· 1368 1368 } 1369 1369 1370 1370 if (sf & SYSC_HAS_MIDLEMODE) { 1371 - if (oh->flags & HWMOD_SWSUP_MSTANDBY) { 1371 + if (oh->flags & HWMOD_FORCE_MSTANDBY) { 1372 + idlemode = HWMOD_IDLEMODE_FORCE; 1373 + } else if (oh->flags & HWMOD_SWSUP_MSTANDBY) { 1372 1374 idlemode = HWMOD_IDLEMODE_NO; 1373 1375 } else { 1374 1376 if (sf & SYSC_HAS_ENAWAKEUP) ··· 1442 1440 } 1443 1441 1444 1442 if (sf & SYSC_HAS_MIDLEMODE) { 1445 - if (oh->flags & HWMOD_SWSUP_MSTANDBY) { 1443 + if ((oh->flags & HWMOD_SWSUP_MSTANDBY) || 1444 + (oh->flags & HWMOD_FORCE_MSTANDBY)) { 1446 1445 idlemode = HWMOD_IDLEMODE_FORCE; 1447 1446 } else { 1448 1447 if (sf & SYSC_HAS_ENAWAKEUP)
+7 -2
arch/arm/mach-omap2/omap_hwmod.h
··· 427 427 * 428 428 * HWMOD_SWSUP_SIDLE: omap_hwmod code should manually bring module in and out 429 429 * of idle, rather than relying on module smart-idle 430 - * HWMOD_SWSUP_MSTDBY: omap_hwmod code should manually bring module in and out 431 - * of standby, rather than relying on module smart-standby 430 + * HWMOD_SWSUP_MSTANDBY: omap_hwmod code should manually bring module in and 431 + * out of standby, rather than relying on module smart-standby 432 432 * HWMOD_INIT_NO_RESET: don't reset this module at boot - important for 433 433 * SDRAM controller, etc. XXX probably belongs outside the main hwmod file 434 434 * XXX Should be HWMOD_SETUP_NO_RESET ··· 459 459 * correctly, or this is being abused to deal with some PM latency 460 460 * issues -- but we're currently suffering from a shortage of 461 461 * folks who are able to track these issues down properly. 462 + * HWMOD_FORCE_MSTANDBY: Always keep MIDLEMODE bits cleared so that device 463 + * is kept in force-standby mode. Failing to do so causes PM problems 464 + * with musb on OMAP3630 at least. Note that musb has a dedicated register 465 + * to control MSTANDBY signal when MIDLEMODE is set to force-standby. 462 466 */ 463 467 #define HWMOD_SWSUP_SIDLE (1 << 0) 464 468 #define HWMOD_SWSUP_MSTANDBY (1 << 1) ··· 475 471 #define HWMOD_16BIT_REG (1 << 8) 476 472 #define HWMOD_EXT_OPT_MAIN_CLK (1 << 9) 477 473 #define HWMOD_BLOCK_WFI (1 << 10) 474 + #define HWMOD_FORCE_MSTANDBY (1 << 11) 478 475 479 476 /* 480 477 * omap_hwmod._int_flags definitions
+6 -1
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
··· 1707 1707 * Erratum ID: i479 idle_req / idle_ack mechanism potentially 1708 1708 * broken when autoidle is enabled 1709 1709 * workaround is to disable the autoidle bit at module level. 1710 + * 1711 + * Enabling the device in any other MIDLEMODE setting but force-idle 1712 + * causes core_pwrdm not enter idle states at least on OMAP3630. 1713 + * Note that musb has OTG_FORCESTDBY register that controls MSTANDBY 1714 + * signal when MIDLEMODE is set to force-idle. 1710 1715 */ 1711 1716 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE 1712 - | HWMOD_SWSUP_MSTANDBY, 1717 + | HWMOD_FORCE_MSTANDBY, 1713 1718 }; 1714 1719 1715 1720 /* usb_otg_hs */
+6
arch/arm/mach-omap2/omap_hwmod_44xx_data.c
··· 2714 2714 { } 2715 2715 }; 2716 2716 2717 + static struct omap_hwmod_opt_clk ocp2scp_usb_phy_opt_clks[] = { 2718 + { .role = "48mhz", .clk = "ocp2scp_usb_phy_phy_48m" }, 2719 + }; 2720 + 2717 2721 /* ocp2scp_usb_phy */ 2718 2722 static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = { 2719 2723 .name = "ocp2scp_usb_phy", ··· 2732 2728 }, 2733 2729 }, 2734 2730 .dev_attr = ocp2scp_dev_attr, 2731 + .opt_clks = ocp2scp_usb_phy_opt_clks, 2732 + .opt_clks_cnt = ARRAY_SIZE(ocp2scp_usb_phy_opt_clks), 2735 2733 }; 2736 2734 2737 2735 /*
+4
arch/arm/mach-omap2/timer.c
··· 547 547 clksrc_nr, clksrc_src) \ 548 548 void __init omap##name##_gptimer_timer_init(void) \ 549 549 { \ 550 + if (omap_clk_init) \ 551 + omap_clk_init(); \ 550 552 omap_dmtimer_init(); \ 551 553 omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \ 552 554 omap2_gptimer_clocksource_init((clksrc_nr), clksrc_src); \ ··· 558 556 clksrc_nr, clksrc_src) \ 559 557 void __init omap##name##_sync32k_timer_init(void) \ 560 558 { \ 559 + if (omap_clk_init) \ 560 + omap_clk_init(); \ 561 561 omap_dmtimer_init(); \ 562 562 omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \ 563 563 /* Enable the use of clocksource="gp_timer" kernel parameter */ \
-1
arch/arm/mach-ux500/board-mop500-sdi.c
··· 81 81 #endif 82 82 83 83 struct mmci_platform_data mop500_sdi0_data = { 84 - .ios_handler = mop500_sdi0_ios_handler, 85 84 .ocr_mask = MMC_VDD_29_30, 86 85 .f_max = 50000000, 87 86 .capabilities = MMC_CAP_4_BIT_DATA |
+12
arch/arm/mach-ux500/board-mop500.c
··· 12 12 #include <linux/init.h> 13 13 #include <linux/interrupt.h> 14 14 #include <linux/platform_device.h> 15 + #include <linux/clk.h> 15 16 #include <linux/io.h> 16 17 #include <linux/i2c.h> 17 18 #include <linux/platform_data/i2c-nomadik.h> ··· 440 439 regulator_put(prox_regulator); 441 440 } 442 441 442 + void mop500_snowball_ethernet_clock_enable(void) 443 + { 444 + struct clk *clk; 445 + 446 + clk = clk_get_sys("fsmc", NULL); 447 + if (!IS_ERR(clk)) 448 + clk_prepare_enable(clk); 449 + } 450 + 443 451 static struct cryp_platform_data u8500_cryp1_platform_data = { 444 452 .mem_to_engine = { 445 453 .dir = STEDMA40_MEM_TO_PERIPH, ··· 692 682 mop500_spi_init(parent); 693 683 mop500_audio_init(parent); 694 684 mop500_uart_init(parent); 685 + 686 + mop500_snowball_ethernet_clock_enable(); 695 687 696 688 /* This board has full regulator constraints */ 697 689 regulator_has_full_constraints();
+1
arch/arm/mach-ux500/board-mop500.h
··· 104 104 void __init snowball_pinmaps_init(void); 105 105 void __init hrefv60_pinmaps_init(void); 106 106 void mop500_audio_init(struct device *parent); 107 + void mop500_snowball_ethernet_clock_enable(void); 107 108 108 109 int __init mop500_uib_init(void); 109 110 void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info,
+3 -2
arch/arm/mach-ux500/cpu-db8500.c
··· 312 312 /* Pinmaps must be in place before devices register */ 313 313 if (of_machine_is_compatible("st-ericsson,mop500")) 314 314 mop500_pinmaps_init(); 315 - else if (of_machine_is_compatible("calaosystems,snowball-a9500")) 315 + else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { 316 316 snowball_pinmaps_init(); 317 - else if (of_machine_is_compatible("st-ericsson,hrefv60+")) 317 + mop500_snowball_ethernet_clock_enable(); 318 + } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) 318 319 hrefv60_pinmaps_init(); 319 320 else if (of_machine_is_compatible("st-ericsson,ccu9540")) {} 320 321 /* TODO: Add pinmaps for ccu9540 board. */
+1 -2
arch/mips/Kconfig
··· 18 18 select HAVE_KRETPROBES 19 19 select HAVE_DEBUG_KMEMLEAK 20 20 select ARCH_BINFMT_ELF_RANDOMIZE_PIE 21 - select HAVE_ARCH_TRANSPARENT_HUGEPAGE 21 + select HAVE_ARCH_TRANSPARENT_HUGEPAGE if CPU_SUPPORTS_HUGEPAGES && 64BIT 22 22 select RTC_LIB if !MACH_LOONGSON 23 23 select GENERIC_ATOMIC64 if !64BIT 24 24 select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE ··· 1493 1493 select CPU_SUPPORTS_32BIT_KERNEL 1494 1494 select CPU_SUPPORTS_64BIT_KERNEL 1495 1495 select CPU_SUPPORTS_HIGHMEM 1496 - select CPU_HAS_LLSC 1497 1496 select WEAK_ORDERING 1498 1497 select WEAK_REORDERING_BEYOND_LLSC 1499 1498 select CPU_HAS_PREFETCH
+1 -4
arch/mips/bcm63xx/boards/board_bcm963xx.c
··· 745 745 strcpy(cfe_version, "unknown"); 746 746 printk(KERN_INFO PFX "CFE version: %s\n", cfe_version); 747 747 748 - if (bcm63xx_nvram_init(boot_addr + BCM963XX_NVRAM_OFFSET)) { 749 - printk(KERN_ERR PFX "invalid nvram checksum\n"); 750 - return; 751 - } 748 + bcm63xx_nvram_init(boot_addr + BCM963XX_NVRAM_OFFSET); 752 749 753 750 board_name = bcm63xx_nvram_get_name(); 754 751 /* find board by name */
+3 -4
arch/mips/bcm63xx/nvram.c
··· 38 38 static struct bcm963xx_nvram nvram; 39 39 static int mac_addr_used; 40 40 41 - int __init bcm63xx_nvram_init(void *addr) 41 + void __init bcm63xx_nvram_init(void *addr) 42 42 { 43 43 unsigned int check_len; 44 44 u32 crc, expected_crc; ··· 60 60 crc = crc32_le(~0, (u8 *)&nvram, check_len); 61 61 62 62 if (crc != expected_crc) 63 - return -EINVAL; 64 - 65 - return 0; 63 + pr_warn("nvram checksum failed, contents may be invalid (expected %08x, got %08x)\n", 64 + expected_crc, crc); 66 65 } 67 66 68 67 u8 *bcm63xx_nvram_get_name(void)
+1 -1
arch/mips/bcm63xx/setup.c
··· 157 157 return board_register_devices(); 158 158 } 159 159 160 - device_initcall(bcm63xx_register_devices); 160 + arch_initcall(bcm63xx_register_devices);
+1 -3
arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h
··· 9 9 * 10 10 * Initialized the local nvram copy from the target address and checks 11 11 * its checksum. 12 - * 13 - * Returns 0 on success. 14 12 */ 15 - int __init bcm63xx_nvram_init(void *nvram); 13 + void bcm63xx_nvram_init(void *nvram); 16 14 17 15 /** 18 16 * bcm63xx_nvram_get_name() - returns the board name according to nvram
-4
arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h
··· 28 28 /* #define cpu_has_prefetch ? */ 29 29 #define cpu_has_mcheck 1 30 30 /* #define cpu_has_ejtag ? */ 31 - #ifdef CONFIG_CPU_HAS_LLSC 32 31 #define cpu_has_llsc 1 33 - #else 34 - #define cpu_has_llsc 0 35 - #endif 36 32 /* #define cpu_has_vtag_icache ? */ 37 33 /* #define cpu_has_dc_aliases ? */ 38 34 /* #define cpu_has_ic_fills_f_dc ? */
+187 -16
arch/mips/include/asm/mipsregs.h
··· 1166 1166 unsigned int __dspctl; \ 1167 1167 \ 1168 1168 __asm__ __volatile__( \ 1169 + " .set push \n" \ 1170 + " .set dsp \n" \ 1169 1171 " rddsp %0, %x1 \n" \ 1172 + " .set pop \n" \ 1170 1173 : "=r" (__dspctl) \ 1171 1174 : "i" (mask)); \ 1172 1175 __dspctl; \ ··· 1178 1175 #define wrdsp(val, mask) \ 1179 1176 do { \ 1180 1177 __asm__ __volatile__( \ 1178 + " .set push \n" \ 1179 + " .set dsp \n" \ 1181 1180 " wrdsp %0, %x1 \n" \ 1181 + " .set pop \n" \ 1182 1182 : \ 1183 1183 : "r" (val), "i" (mask)); \ 1184 1184 } while (0) 1185 1185 1186 - #define mflo0() ({ long mflo0; __asm__("mflo %0, $ac0" : "=r" (mflo0)); mflo0;}) 1187 - #define mflo1() ({ long mflo1; __asm__("mflo %0, $ac1" : "=r" (mflo1)); mflo1;}) 1188 - #define mflo2() ({ long mflo2; __asm__("mflo %0, $ac2" : "=r" (mflo2)); mflo2;}) 1189 - #define mflo3() ({ long mflo3; __asm__("mflo %0, $ac3" : "=r" (mflo3)); mflo3;}) 1186 + #define mflo0() \ 1187 + ({ \ 1188 + long mflo0; \ 1189 + __asm__( \ 1190 + " .set push \n" \ 1191 + " .set dsp \n" \ 1192 + " mflo %0, $ac0 \n" \ 1193 + " .set pop \n" \ 1194 + : "=r" (mflo0)); \ 1195 + mflo0; \ 1196 + }) 1190 1197 1191 - #define mfhi0() ({ long mfhi0; __asm__("mfhi %0, $ac0" : "=r" (mfhi0)); mfhi0;}) 1192 - #define mfhi1() ({ long mfhi1; __asm__("mfhi %0, $ac1" : "=r" (mfhi1)); mfhi1;}) 1193 - #define mfhi2() ({ long mfhi2; __asm__("mfhi %0, $ac2" : "=r" (mfhi2)); mfhi2;}) 1194 - #define mfhi3() ({ long mfhi3; __asm__("mfhi %0, $ac3" : "=r" (mfhi3)); mfhi3;}) 1198 + #define mflo1() \ 1199 + ({ \ 1200 + long mflo1; \ 1201 + __asm__( \ 1202 + " .set push \n" \ 1203 + " .set dsp \n" \ 1204 + " mflo %0, $ac1 \n" \ 1205 + " .set pop \n" \ 1206 + : "=r" (mflo1)); \ 1207 + mflo1; \ 1208 + }) 1195 1209 1196 - #define mtlo0(x) __asm__("mtlo %0, $ac0" ::"r" (x)) 1197 - #define mtlo1(x) __asm__("mtlo %0, $ac1" ::"r" (x)) 1198 - #define mtlo2(x) __asm__("mtlo %0, $ac2" ::"r" (x)) 1199 - #define mtlo3(x) __asm__("mtlo %0, $ac3" ::"r" (x)) 1210 + #define mflo2() \ 1211 + ({ \ 1212 + long mflo2; \ 1213 + __asm__( \ 1214 + " .set push \n" \ 1215 + " .set dsp \n" \ 1216 + " mflo %0, $ac2 \n" \ 1217 + " .set pop \n" \ 1218 + : "=r" (mflo2)); \ 1219 + mflo2; \ 1220 + }) 1200 1221 1201 - #define mthi0(x) __asm__("mthi %0, $ac0" ::"r" (x)) 1202 - #define mthi1(x) __asm__("mthi %0, $ac1" ::"r" (x)) 1203 - #define mthi2(x) __asm__("mthi %0, $ac2" ::"r" (x)) 1204 - #define mthi3(x) __asm__("mthi %0, $ac3" ::"r" (x)) 1222 + #define mflo3() \ 1223 + ({ \ 1224 + long mflo3; \ 1225 + __asm__( \ 1226 + " .set push \n" \ 1227 + " .set dsp \n" \ 1228 + " mflo %0, $ac3 \n" \ 1229 + " .set pop \n" \ 1230 + : "=r" (mflo3)); \ 1231 + mflo3; \ 1232 + }) 1233 + 1234 + #define mfhi0() \ 1235 + ({ \ 1236 + long mfhi0; \ 1237 + __asm__( \ 1238 + " .set push \n" \ 1239 + " .set dsp \n" \ 1240 + " mfhi %0, $ac0 \n" \ 1241 + " .set pop \n" \ 1242 + : "=r" (mfhi0)); \ 1243 + mfhi0; \ 1244 + }) 1245 + 1246 + #define mfhi1() \ 1247 + ({ \ 1248 + long mfhi1; \ 1249 + __asm__( \ 1250 + " .set push \n" \ 1251 + " .set dsp \n" \ 1252 + " mfhi %0, $ac1 \n" \ 1253 + " .set pop \n" \ 1254 + : "=r" (mfhi1)); \ 1255 + mfhi1; \ 1256 + }) 1257 + 1258 + #define mfhi2() \ 1259 + ({ \ 1260 + long mfhi2; \ 1261 + __asm__( \ 1262 + " .set push \n" \ 1263 + " .set dsp \n" \ 1264 + " mfhi %0, $ac2 \n" \ 1265 + " .set pop \n" \ 1266 + : "=r" (mfhi2)); \ 1267 + mfhi2; \ 1268 + }) 1269 + 1270 + #define mfhi3() \ 1271 + ({ \ 1272 + long mfhi3; \ 1273 + __asm__( \ 1274 + " .set push \n" \ 1275 + " .set dsp \n" \ 1276 + " mfhi %0, $ac3 \n" \ 1277 + " .set pop \n" \ 1278 + : "=r" (mfhi3)); \ 1279 + mfhi3; \ 1280 + }) 1281 + 1282 + 1283 + #define mtlo0(x) \ 1284 + ({ \ 1285 + __asm__( \ 1286 + " .set push \n" \ 1287 + " .set dsp \n" \ 1288 + " mtlo %0, $ac0 \n" \ 1289 + " .set pop \n" \ 1290 + : \ 1291 + : "r" (x)); \ 1292 + }) 1293 + 1294 + #define mtlo1(x) \ 1295 + ({ \ 1296 + __asm__( \ 1297 + " .set push \n" \ 1298 + " .set dsp \n" \ 1299 + " mtlo %0, $ac1 \n" \ 1300 + " .set pop \n" \ 1301 + : \ 1302 + : "r" (x)); \ 1303 + }) 1304 + 1305 + #define mtlo2(x) \ 1306 + ({ \ 1307 + __asm__( \ 1308 + " .set push \n" \ 1309 + " .set dsp \n" \ 1310 + " mtlo %0, $ac2 \n" \ 1311 + " .set pop \n" \ 1312 + : \ 1313 + : "r" (x)); \ 1314 + }) 1315 + 1316 + #define mtlo3(x) \ 1317 + ({ \ 1318 + __asm__( \ 1319 + " .set push \n" \ 1320 + " .set dsp \n" \ 1321 + " mtlo %0, $ac3 \n" \ 1322 + " .set pop \n" \ 1323 + : \ 1324 + : "r" (x)); \ 1325 + }) 1326 + 1327 + #define mthi0(x) \ 1328 + ({ \ 1329 + __asm__( \ 1330 + " .set push \n" \ 1331 + " .set dsp \n" \ 1332 + " mthi %0, $ac0 \n" \ 1333 + " .set pop \n" \ 1334 + : \ 1335 + : "r" (x)); \ 1336 + }) 1337 + 1338 + #define mthi1(x) \ 1339 + ({ \ 1340 + __asm__( \ 1341 + " .set push \n" \ 1342 + " .set dsp \n" \ 1343 + " mthi %0, $ac1 \n" \ 1344 + " .set pop \n" \ 1345 + : \ 1346 + : "r" (x)); \ 1347 + }) 1348 + 1349 + #define mthi2(x) \ 1350 + ({ \ 1351 + __asm__( \ 1352 + " .set push \n" \ 1353 + " .set dsp \n" \ 1354 + " mthi %0, $ac2 \n" \ 1355 + " .set pop \n" \ 1356 + : \ 1357 + : "r" (x)); \ 1358 + }) 1359 + 1360 + #define mthi3(x) \ 1361 + ({ \ 1362 + __asm__( \ 1363 + " .set push \n" \ 1364 + " .set dsp \n" \ 1365 + " mthi %0, $ac3 \n" \ 1366 + " .set pop \n" \ 1367 + : \ 1368 + : "r" (x)); \ 1369 + }) 1205 1370 1206 1371 #else 1207 1372
+1 -1
arch/mips/include/asm/signal.h
··· 21 21 #include <asm/sigcontext.h> 22 22 #include <asm/siginfo.h> 23 23 24 - #define __ARCH_HAS_ODD_SIGACTION 24 + #define __ARCH_HAS_IRIX_SIGACTION 25 25 26 26 #endif /* _ASM_SIGNAL_H */
+6 -19
arch/mips/kernel/Makefile
··· 100 100 obj-$(CONFIG_JUMP_LABEL) += jump_label.o 101 101 102 102 # 103 - # DSP ASE supported for MIPS32 or MIPS64 Release 2 cores only. It is safe 104 - # to enable DSP assembler support here even if the MIPS Release 2 CPU we 105 - # are targetting does not support DSP because all code-paths making use of 106 - # it properly check that the running CPU *actually does* support these 107 - # instructions. 103 + # DSP ASE supported for MIPS32 or MIPS64 Release 2 cores only. It is not 104 + # safe to unconditionnaly use the assembler -mdsp / -mdspr2 switches 105 + # here because the compiler may use DSP ASE instructions (such as lwx) in 106 + # code paths where we cannot check that the CPU we are running on supports it. 107 + # Proper abstraction using HAVE_AS_DSP and macros is done in 108 + # arch/mips/include/asm/mipsregs.h. 108 109 # 109 110 ifeq ($(CONFIG_CPU_MIPSR2), y) 110 111 CFLAGS_DSP = -DHAVE_AS_DSP 111 - 112 - # 113 - # Check if assembler supports DSP ASE 114 - # 115 - ifeq ($(call cc-option-yn,-mdsp), y) 116 - CFLAGS_DSP += -mdsp 117 - endif 118 - 119 - # 120 - # Check if assembler supports DSP ASE Rev2 121 - # 122 - ifeq ($(call cc-option-yn,-mdspr2), y) 123 - CFLAGS_DSP += -mdspr2 124 - endif 125 112 126 113 CFLAGS_signal.o = $(CFLAGS_DSP) 127 114 CFLAGS_signal32.o = $(CFLAGS_DSP)
+4 -3
arch/mips/kernel/cpu-probe.c
··· 580 580 c->tlbsize = 48; 581 581 break; 582 582 case PRID_IMP_VR41XX: 583 + set_isa(c, MIPS_CPU_ISA_III); 584 + c->options = R4K_OPTS; 585 + c->tlbsize = 32; 583 586 switch (c->processor_id & 0xf0) { 584 587 case PRID_REV_VR4111: 585 588 c->cputype = CPU_VR4111; ··· 607 604 __cpu_name[cpu] = "NEC VR4131"; 608 605 } else { 609 606 c->cputype = CPU_VR4133; 607 + c->options |= MIPS_CPU_LLSC; 610 608 __cpu_name[cpu] = "NEC VR4133"; 611 609 } 612 610 break; ··· 617 613 __cpu_name[cpu] = "NEC Vr41xx"; 618 614 break; 619 615 } 620 - set_isa(c, MIPS_CPU_ISA_III); 621 - c->options = R4K_OPTS; 622 - c->tlbsize = 32; 623 616 break; 624 617 case PRID_IMP_R4300: 625 618 c->cputype = CPU_R4300;
+1 -1
arch/mips/kernel/linux32.c
··· 171 171 err = compat_sys_shmctl(first, second, compat_ptr(ptr)); 172 172 break; 173 173 default: 174 - err = -EINVAL; 174 + err = -ENOSYS; 175 175 break; 176 176 } 177 177
+1 -1
arch/mips/kernel/proc.c
··· 67 67 if (cpu_has_mips_r) { 68 68 seq_printf(m, "isa\t\t\t:"); 69 69 if (cpu_has_mips_1) 70 - seq_printf(m, "%s", "mips1"); 70 + seq_printf(m, "%s", " mips1"); 71 71 if (cpu_has_mips_2) 72 72 seq_printf(m, "%s", " mips2"); 73 73 if (cpu_has_mips_3)
+8 -8
arch/mips/lib/bitops.c
··· 90 90 unsigned bit = nr & SZLONG_MASK; 91 91 unsigned long mask; 92 92 unsigned long flags; 93 - unsigned long res; 93 + int res; 94 94 95 95 a += nr >> SZLONG_LOG; 96 96 mask = 1UL << bit; 97 97 raw_local_irq_save(flags); 98 - res = (mask & *a); 98 + res = (mask & *a) != 0; 99 99 *a |= mask; 100 100 raw_local_irq_restore(flags); 101 101 return res; ··· 116 116 unsigned bit = nr & SZLONG_MASK; 117 117 unsigned long mask; 118 118 unsigned long flags; 119 - unsigned long res; 119 + int res; 120 120 121 121 a += nr >> SZLONG_LOG; 122 122 mask = 1UL << bit; 123 123 raw_local_irq_save(flags); 124 - res = (mask & *a); 124 + res = (mask & *a) != 0; 125 125 *a |= mask; 126 126 raw_local_irq_restore(flags); 127 127 return res; ··· 141 141 unsigned bit = nr & SZLONG_MASK; 142 142 unsigned long mask; 143 143 unsigned long flags; 144 - unsigned long res; 144 + int res; 145 145 146 146 a += nr >> SZLONG_LOG; 147 147 mask = 1UL << bit; 148 148 raw_local_irq_save(flags); 149 - res = (mask & *a); 149 + res = (mask & *a) != 0; 150 150 *a &= ~mask; 151 151 raw_local_irq_restore(flags); 152 152 return res; ··· 166 166 unsigned bit = nr & SZLONG_MASK; 167 167 unsigned long mask; 168 168 unsigned long flags; 169 - unsigned long res; 169 + int res; 170 170 171 171 a += nr >> SZLONG_LOG; 172 172 mask = 1UL << bit; 173 173 raw_local_irq_save(flags); 174 - res = (mask & *a); 174 + res = (mask & *a) != 0; 175 175 *a ^= mask; 176 176 raw_local_irq_restore(flags); 177 177 return res;
+2 -2
arch/mips/lib/csum_partial.S
··· 270 270 #endif 271 271 272 272 /* odd buffer alignment? */ 273 - #ifdef CPU_MIPSR2 273 + #ifdef CONFIG_CPU_MIPSR2 274 274 wsbh v1, sum 275 275 movn sum, v1, t7 276 276 #else ··· 670 670 addu sum, v1 671 671 #endif 672 672 673 - #ifdef CPU_MIPSR2 673 + #ifdef CONFIG_CPU_MIPSR2 674 674 wsbh v1, sum 675 675 movn sum, v1, odd 676 676 #else
+1 -1
drivers/base/regmap/regcache-rbtree.c
··· 398 398 base = 0; 399 399 400 400 if (max < rbnode->base_reg + rbnode->blklen) 401 - end = rbnode->base_reg + rbnode->blklen - max; 401 + end = max - rbnode->base_reg + 1; 402 402 else 403 403 end = rbnode->blklen; 404 404
+5 -4
drivers/base/regmap/regmap.c
··· 710 710 } 711 711 } 712 712 713 + regmap_debugfs_init(map, config->name); 714 + 713 715 ret = regcache_init(map, config); 714 716 if (ret != 0) 715 717 goto err_range; 716 - 717 - regmap_debugfs_init(map, config->name); 718 718 719 719 /* Add a devres resource for dev_get_regmap() */ 720 720 m = devres_alloc(dev_get_regmap_release, sizeof(*m), GFP_KERNEL); ··· 943 943 unsigned int ival; 944 944 int val_bytes = map->format.val_bytes; 945 945 for (i = 0; i < val_len / val_bytes; i++) { 946 - memcpy(map->work_buf, val + (i * val_bytes), val_bytes); 947 - ival = map->format.parse_val(map->work_buf); 946 + ival = map->format.parse_val(val + (i * val_bytes)); 948 947 ret = regcache_write(map, reg + (i * map->reg_stride), 949 948 ival); 950 949 if (ret) { ··· 1035 1036 kfree(async->work_buf); 1036 1037 kfree(async); 1037 1038 } 1039 + 1040 + return ret; 1038 1041 } 1039 1042 1040 1043 trace_regmap_hw_write_start(map->dev, reg,
+8 -1
drivers/block/loop.c
··· 922 922 lo->lo_flags |= LO_FLAGS_PARTSCAN; 923 923 if (lo->lo_flags & LO_FLAGS_PARTSCAN) 924 924 ioctl_by_bdev(bdev, BLKRRPART, 0); 925 + 926 + /* Grab the block_device to prevent its destruction after we 927 + * put /dev/loopXX inode. Later in loop_clr_fd() we bdput(bdev). 928 + */ 929 + bdgrab(bdev); 925 930 return 0; 926 931 927 932 out_clr: ··· 1036 1031 memset(lo->lo_encrypt_key, 0, LO_KEY_SIZE); 1037 1032 memset(lo->lo_crypt_name, 0, LO_NAME_SIZE); 1038 1033 memset(lo->lo_file_name, 0, LO_NAME_SIZE); 1039 - if (bdev) 1034 + if (bdev) { 1035 + bdput(bdev); 1040 1036 invalidate_bdev(bdev); 1037 + } 1041 1038 set_capacity(lo->lo_disk, 0); 1042 1039 loop_sysfs_exit(lo); 1043 1040 if (bdev) {
+9
drivers/char/hw_random/core.c
··· 380 380 } 381 381 EXPORT_SYMBOL_GPL(hwrng_unregister); 382 382 383 + static void __exit hwrng_exit(void) 384 + { 385 + mutex_lock(&rng_mutex); 386 + BUG_ON(current_rng); 387 + kfree(rng_buffer); 388 + mutex_unlock(&rng_mutex); 389 + } 390 + 391 + module_exit(hwrng_exit); 383 392 384 393 MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver"); 385 394 MODULE_LICENSE("GPL");
+30 -14
drivers/char/virtio_console.c
··· 149 149 spinlock_t ports_lock; 150 150 151 151 /* To protect the vq operations for the control channel */ 152 - spinlock_t cvq_lock; 152 + spinlock_t c_ivq_lock; 153 + spinlock_t c_ovq_lock; 153 154 154 155 /* The current config space is stored here */ 155 156 struct virtio_console_config config; ··· 570 569 vq = portdev->c_ovq; 571 570 572 571 sg_init_one(sg, &cpkt, sizeof(cpkt)); 572 + 573 + spin_lock(&portdev->c_ovq_lock); 573 574 if (virtqueue_add_buf(vq, sg, 1, 0, &cpkt, GFP_ATOMIC) == 0) { 574 575 virtqueue_kick(vq); 575 576 while (!virtqueue_get_buf(vq, &len)) 576 577 cpu_relax(); 577 578 } 579 + spin_unlock(&portdev->c_ovq_lock); 578 580 return 0; 579 581 } 580 582 ··· 1440 1436 * rproc_serial does not want the console port, only 1441 1437 * the generic port implementation. 1442 1438 */ 1443 - port->host_connected = port->guest_connected = true; 1439 + port->host_connected = true; 1444 1440 else if (!use_multiport(port->portdev)) { 1445 1441 /* 1446 1442 * If we're not using multiport support, ··· 1713 1709 portdev = container_of(work, struct ports_device, control_work); 1714 1710 vq = portdev->c_ivq; 1715 1711 1716 - spin_lock(&portdev->cvq_lock); 1712 + spin_lock(&portdev->c_ivq_lock); 1717 1713 while ((buf = virtqueue_get_buf(vq, &len))) { 1718 - spin_unlock(&portdev->cvq_lock); 1714 + spin_unlock(&portdev->c_ivq_lock); 1719 1715 1720 1716 buf->len = len; 1721 1717 buf->offset = 0; 1722 1718 1723 1719 handle_control_message(portdev, buf); 1724 1720 1725 - spin_lock(&portdev->cvq_lock); 1721 + spin_lock(&portdev->c_ivq_lock); 1726 1722 if (add_inbuf(portdev->c_ivq, buf) < 0) { 1727 1723 dev_warn(&portdev->vdev->dev, 1728 1724 "Error adding buffer to queue\n"); 1729 1725 free_buf(buf, false); 1730 1726 } 1731 1727 } 1732 - spin_unlock(&portdev->cvq_lock); 1728 + spin_unlock(&portdev->c_ivq_lock); 1733 1729 } 1734 1730 1735 1731 static void out_intr(struct virtqueue *vq) ··· 1756 1752 port->inbuf = get_inbuf(port); 1757 1753 1758 1754 /* 1759 - * Don't queue up data when port is closed. This condition 1755 + * Normally the port should not accept data when the port is 1756 + * closed. For generic serial ports, the host won't (shouldn't) 1757 + * send data till the guest is connected. But this condition 1760 1758 * can be reached when a console port is not yet connected (no 1761 - * tty is spawned) and the host sends out data to console 1762 - * ports. For generic serial ports, the host won't 1763 - * (shouldn't) send data till the guest is connected. 1759 + * tty is spawned) and the other side sends out data over the 1760 + * vring, or when a remote devices start sending data before 1761 + * the ports are opened. 1762 + * 1763 + * A generic serial port will discard data if not connected, 1764 + * while console ports and rproc-serial ports accepts data at 1765 + * any time. rproc-serial is initiated with guest_connected to 1766 + * false because port_fops_open expects this. Console ports are 1767 + * hooked up with an HVC console and is initialized with 1768 + * guest_connected to true. 1764 1769 */ 1765 - if (!port->guest_connected) 1770 + 1771 + if (!port->guest_connected && !is_rproc_serial(port->portdev->vdev)) 1766 1772 discard_port_data(port); 1767 1773 1768 1774 spin_unlock_irqrestore(&port->inbuf_lock, flags); ··· 2000 1986 if (multiport) { 2001 1987 unsigned int nr_added_bufs; 2002 1988 2003 - spin_lock_init(&portdev->cvq_lock); 1989 + spin_lock_init(&portdev->c_ivq_lock); 1990 + spin_lock_init(&portdev->c_ovq_lock); 2004 1991 INIT_WORK(&portdev->control_work, &control_work_handler); 2005 1992 2006 - nr_added_bufs = fill_queue(portdev->c_ivq, &portdev->cvq_lock); 1993 + nr_added_bufs = fill_queue(portdev->c_ivq, 1994 + &portdev->c_ivq_lock); 2007 1995 if (!nr_added_bufs) { 2008 1996 dev_err(&vdev->dev, 2009 1997 "Error allocating buffers for control queue\n"); ··· 2156 2140 return ret; 2157 2141 2158 2142 if (use_multiport(portdev)) 2159 - fill_queue(portdev->c_ivq, &portdev->cvq_lock); 2143 + fill_queue(portdev->c_ivq, &portdev->c_ivq_lock); 2160 2144 2161 2145 list_for_each_entry(port, &portdev->ports, list) { 2162 2146 port->in_vq = portdev->in_vqs[port->id];
+1 -1
drivers/clk/tegra/clk-tegra20.c
··· 703 703 clks[pll_a_out0] = clk; 704 704 705 705 /* PLLE */ 706 - clk = tegra_clk_register_plle("pll_e", "pll_ref", clk_base, NULL, 706 + clk = tegra_clk_register_plle("pll_e", "pll_ref", clk_base, pmc_base, 707 707 0, 100000000, &pll_e_params, 708 708 0, pll_e_freq_table, NULL); 709 709 clk_register_clkdev(clk, "pll_e", NULL);
-2
drivers/gpu/drm/drm_crtc.c
··· 2326 2326 fb = dev->mode_config.funcs->fb_create(dev, file_priv, &r); 2327 2327 if (IS_ERR(fb)) { 2328 2328 DRM_DEBUG_KMS("could not create framebuffer\n"); 2329 - drm_modeset_unlock_all(dev); 2330 2329 return PTR_ERR(fb); 2331 2330 } 2332 2331 ··· 2505 2506 fb = dev->mode_config.funcs->fb_create(dev, file_priv, r); 2506 2507 if (IS_ERR(fb)) { 2507 2508 DRM_DEBUG_KMS("could not create framebuffer\n"); 2508 - drm_modeset_unlock_all(dev); 2509 2509 return PTR_ERR(fb); 2510 2510 } 2511 2511
+4 -2
drivers/gpu/drm/drm_fops.c
··· 123 123 int retcode = 0; 124 124 int need_setup = 0; 125 125 struct address_space *old_mapping; 126 + struct address_space *old_imapping; 126 127 127 128 minor = idr_find(&drm_minors_idr, minor_id); 128 129 if (!minor) ··· 138 137 if (!dev->open_count++) 139 138 need_setup = 1; 140 139 mutex_lock(&dev->struct_mutex); 140 + old_imapping = inode->i_mapping; 141 141 old_mapping = dev->dev_mapping; 142 142 if (old_mapping == NULL) 143 143 dev->dev_mapping = &inode->i_data; ··· 161 159 162 160 err_undo: 163 161 mutex_lock(&dev->struct_mutex); 164 - filp->f_mapping = old_mapping; 165 - inode->i_mapping = old_mapping; 162 + filp->f_mapping = old_imapping; 163 + inode->i_mapping = old_imapping; 166 164 iput(container_of(dev->dev_mapping, struct inode, i_data)); 167 165 dev->dev_mapping = old_mapping; 168 166 mutex_unlock(&dev->struct_mutex);
+1 -1
drivers/gpu/drm/i915/i915_gem_execbuffer.c
··· 57 57 if (eb == NULL) { 58 58 int size = args->buffer_count; 59 59 int count = PAGE_SIZE / sizeof(struct hlist_head) / 2; 60 - BUILD_BUG_ON(!is_power_of_2(PAGE_SIZE / sizeof(struct hlist_head))); 60 + BUILD_BUG_ON_NOT_POWER_OF_2(PAGE_SIZE / sizeof(struct hlist_head)); 61 61 while (count > 2*size) 62 62 count >>= 1; 63 63 eb = kzalloc(count*sizeof(struct hlist_head) +
+17 -23
drivers/gpu/drm/i915/intel_crt.c
··· 45 45 46 46 struct intel_crt { 47 47 struct intel_encoder base; 48 + /* DPMS state is stored in the connector, which we need in the 49 + * encoder's enable/disable callbacks */ 50 + struct intel_connector *connector; 48 51 bool force_hotplug_required; 49 52 u32 adpa_reg; 50 53 }; ··· 84 81 return true; 85 82 } 86 83 87 - static void intel_disable_crt(struct intel_encoder *encoder) 88 - { 89 - struct drm_i915_private *dev_priv = encoder->base.dev->dev_private; 90 - struct intel_crt *crt = intel_encoder_to_crt(encoder); 91 - u32 temp; 92 - 93 - temp = I915_READ(crt->adpa_reg); 94 - temp |= ADPA_HSYNC_CNTL_DISABLE | ADPA_VSYNC_CNTL_DISABLE; 95 - temp &= ~ADPA_DAC_ENABLE; 96 - I915_WRITE(crt->adpa_reg, temp); 97 - } 98 - 99 - static void intel_enable_crt(struct intel_encoder *encoder) 100 - { 101 - struct drm_i915_private *dev_priv = encoder->base.dev->dev_private; 102 - struct intel_crt *crt = intel_encoder_to_crt(encoder); 103 - u32 temp; 104 - 105 - temp = I915_READ(crt->adpa_reg); 106 - temp |= ADPA_DAC_ENABLE; 107 - I915_WRITE(crt->adpa_reg, temp); 108 - } 109 - 110 84 /* Note: The caller is required to filter out dpms modes not supported by the 111 85 * platform. */ 112 86 static void intel_crt_set_dpms(struct intel_encoder *encoder, int mode) ··· 114 134 115 135 I915_WRITE(crt->adpa_reg, temp); 116 136 } 137 + 138 + static void intel_disable_crt(struct intel_encoder *encoder) 139 + { 140 + intel_crt_set_dpms(encoder, DRM_MODE_DPMS_OFF); 141 + } 142 + 143 + static void intel_enable_crt(struct intel_encoder *encoder) 144 + { 145 + struct intel_crt *crt = intel_encoder_to_crt(encoder); 146 + 147 + intel_crt_set_dpms(encoder, crt->connector->base.dpms); 148 + } 149 + 117 150 118 151 static void intel_crt_dpms(struct drm_connector *connector, int mode) 119 152 { ··· 739 746 } 740 747 741 748 connector = &intel_connector->base; 749 + crt->connector = intel_connector; 742 750 drm_connector_init(dev, &intel_connector->base, 743 751 &intel_crt_connector_funcs, DRM_MODE_CONNECTOR_VGA); 744 752
+3
drivers/gpu/drm/i915/intel_dp.c
··· 2559 2559 { 2560 2560 struct intel_digital_port *intel_dig_port = enc_to_dig_port(encoder); 2561 2561 struct intel_dp *intel_dp = &intel_dig_port->dp; 2562 + struct drm_device *dev = intel_dp_to_dev(intel_dp); 2562 2563 2563 2564 i2c_del_adapter(&intel_dp->adapter); 2564 2565 drm_encoder_cleanup(encoder); 2565 2566 if (is_edp(intel_dp)) { 2566 2567 cancel_delayed_work_sync(&intel_dp->panel_vdd_work); 2568 + mutex_lock(&dev->mode_config.mutex); 2567 2569 ironlake_panel_vdd_off_sync(intel_dp); 2570 + mutex_unlock(&dev->mode_config.mutex); 2568 2571 } 2569 2572 kfree(intel_dig_port); 2570 2573 }
+10 -8
drivers/gpu/drm/nouveau/nouveau_abi16.c
··· 391 391 struct nouveau_drm *drm = nouveau_drm(dev); 392 392 struct nouveau_device *device = nv_device(drm->device); 393 393 struct nouveau_abi16 *abi16 = nouveau_abi16_get(file_priv, dev); 394 - struct nouveau_abi16_chan *chan, *temp; 394 + struct nouveau_abi16_chan *chan = NULL, *temp; 395 395 struct nouveau_abi16_ntfy *ntfy; 396 396 struct nouveau_object *object; 397 397 struct nv_dma_class args = {}; ··· 404 404 if (unlikely(nv_device(abi16->device)->card_type >= NV_C0)) 405 405 return nouveau_abi16_put(abi16, -EINVAL); 406 406 407 - list_for_each_entry_safe(chan, temp, &abi16->channels, head) { 408 - if (chan->chan->handle == (NVDRM_CHAN | info->channel)) 407 + list_for_each_entry(temp, &abi16->channels, head) { 408 + if (temp->chan->handle == (NVDRM_CHAN | info->channel)) { 409 + chan = temp; 409 410 break; 410 - chan = NULL; 411 + } 411 412 } 412 413 413 414 if (!chan) ··· 460 459 { 461 460 struct drm_nouveau_gpuobj_free *fini = data; 462 461 struct nouveau_abi16 *abi16 = nouveau_abi16_get(file_priv, dev); 463 - struct nouveau_abi16_chan *chan, *temp; 462 + struct nouveau_abi16_chan *chan = NULL, *temp; 464 463 struct nouveau_abi16_ntfy *ntfy; 465 464 int ret; 466 465 467 466 if (unlikely(!abi16)) 468 467 return -ENOMEM; 469 468 470 - list_for_each_entry_safe(chan, temp, &abi16->channels, head) { 471 - if (chan->chan->handle == (NVDRM_CHAN | fini->channel)) 469 + list_for_each_entry(temp, &abi16->channels, head) { 470 + if (temp->chan->handle == (NVDRM_CHAN | fini->channel)) { 471 + chan = temp; 472 472 break; 473 - chan = NULL; 473 + } 474 474 } 475 475 476 476 if (!chan)
+20 -12
drivers/gpu/drm/nouveau/nouveau_drm.c
··· 72 72 static struct drm_driver driver; 73 73 74 74 static int 75 + nouveau_drm_vblank_handler(struct nouveau_eventh *event, int head) 76 + { 77 + struct nouveau_drm *drm = 78 + container_of(event, struct nouveau_drm, vblank[head]); 79 + drm_handle_vblank(drm->dev, head); 80 + return NVKM_EVENT_KEEP; 81 + } 82 + 83 + static int 75 84 nouveau_drm_vblank_enable(struct drm_device *dev, int head) 76 85 { 77 86 struct nouveau_drm *drm = nouveau_drm(dev); 78 87 struct nouveau_disp *pdisp = nouveau_disp(drm->device); 79 - nouveau_event_get(pdisp->vblank, head, &drm->vblank); 88 + 89 + if (WARN_ON_ONCE(head > ARRAY_SIZE(drm->vblank))) 90 + return -EIO; 91 + WARN_ON_ONCE(drm->vblank[head].func); 92 + drm->vblank[head].func = nouveau_drm_vblank_handler; 93 + nouveau_event_get(pdisp->vblank, head, &drm->vblank[head]); 80 94 return 0; 81 95 } 82 96 ··· 99 85 { 100 86 struct nouveau_drm *drm = nouveau_drm(dev); 101 87 struct nouveau_disp *pdisp = nouveau_disp(drm->device); 102 - nouveau_event_put(pdisp->vblank, head, &drm->vblank); 103 - } 104 - 105 - static int 106 - nouveau_drm_vblank_handler(struct nouveau_eventh *event, int head) 107 - { 108 - struct nouveau_drm *drm = 109 - container_of(event, struct nouveau_drm, vblank); 110 - drm_handle_vblank(drm->dev, head); 111 - return NVKM_EVENT_KEEP; 88 + if (drm->vblank[head].func) 89 + nouveau_event_put(pdisp->vblank, head, &drm->vblank[head]); 90 + else 91 + WARN_ON_ONCE(1); 92 + drm->vblank[head].func = NULL; 112 93 } 113 94 114 95 static u64 ··· 301 292 302 293 dev->dev_private = drm; 303 294 drm->dev = dev; 304 - drm->vblank.func = nouveau_drm_vblank_handler; 305 295 306 296 INIT_LIST_HEAD(&drm->clients); 307 297 spin_lock_init(&drm->tile.lock);
+1 -1
drivers/gpu/drm/nouveau/nouveau_drm.h
··· 113 113 struct nvbios vbios; 114 114 struct nouveau_display *display; 115 115 struct backlight_device *backlight; 116 - struct nouveau_eventh vblank; 116 + struct nouveau_eventh vblank[4]; 117 117 118 118 /* power management */ 119 119 struct nouveau_pm *pm;
+1 -2
drivers/net/bonding/bond_main.c
··· 1975 1975 return -EINVAL; 1976 1976 } 1977 1977 1978 + write_unlock_bh(&bond->lock); 1978 1979 /* unregister rx_handler early so bond_handle_frame wouldn't be called 1979 1980 * for this slave anymore. 1980 1981 */ 1981 1982 netdev_rx_handler_unregister(slave_dev); 1982 - write_unlock_bh(&bond->lock); 1983 - synchronize_net(); 1984 1983 write_lock_bh(&bond->lock); 1985 1984 1986 1985 if (!all && !bond->params.fail_over_mac) {
+2 -2
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
··· 411 411 412 412 static void mlx4_en_u64_to_mac(unsigned char dst_mac[ETH_ALEN + 2], u64 src_mac) 413 413 { 414 - unsigned int i; 415 - for (i = ETH_ALEN - 1; i; --i) { 414 + int i; 415 + for (i = ETH_ALEN - 1; i >= 0; --i) { 416 416 dst_mac[i] = src_mac & 0xff; 417 417 src_mac >>= 8; 418 418 }
+3 -3
drivers/scsi/bnx2fc/bnx2fc_fcoe.c
··· 940 940 fc_exch_init(lport); 941 941 fc_rport_init(lport); 942 942 fc_disc_init(lport); 943 + fc_disc_config(lport, lport); 943 944 return 0; 944 945 } 945 946 ··· 2134 2133 } 2135 2134 2136 2135 ctlr = bnx2fc_to_ctlr(interface); 2136 + cdev = fcoe_ctlr_to_ctlr_dev(ctlr); 2137 2137 interface->vlan_id = vlan_id; 2138 2138 2139 2139 interface->timer_work_queue = ··· 2145 2143 goto ifput_err; 2146 2144 } 2147 2145 2148 - lport = bnx2fc_if_create(interface, &interface->hba->pcidev->dev, 0); 2146 + lport = bnx2fc_if_create(interface, &cdev->dev, 0); 2149 2147 if (!lport) { 2150 2148 printk(KERN_ERR PFX "Failed to create interface (%s)\n", 2151 2149 netdev->name); ··· 2160 2158 2161 2159 /* Make this master N_port */ 2162 2160 ctlr->lp = lport; 2163 - 2164 - cdev = fcoe_ctlr_to_ctlr_dev(ctlr); 2165 2161 2166 2162 if (link_state == BNX2FC_CREATE_LINK_UP) 2167 2163 cdev->enabled = FCOE_CTLR_ENABLED;
+11 -4
drivers/scsi/fcoe/fcoe.c
··· 490 490 { 491 491 struct net_device *netdev = fcoe->netdev; 492 492 struct fcoe_ctlr *fip = fcoe_to_ctlr(fcoe); 493 - struct fcoe_ctlr_device *ctlr_dev = fcoe_ctlr_to_ctlr_dev(fip); 494 493 495 494 rtnl_lock(); 496 495 if (!fcoe->removed) ··· 500 501 /* tear-down the FCoE controller */ 501 502 fcoe_ctlr_destroy(fip); 502 503 scsi_host_put(fip->lp->host); 503 - fcoe_ctlr_device_delete(ctlr_dev); 504 504 dev_put(netdev); 505 505 module_put(THIS_MODULE); 506 506 } ··· 2192 2194 */ 2193 2195 static void fcoe_destroy_work(struct work_struct *work) 2194 2196 { 2197 + struct fcoe_ctlr_device *cdev; 2198 + struct fcoe_ctlr *ctlr; 2195 2199 struct fcoe_port *port; 2196 2200 struct fcoe_interface *fcoe; 2197 2201 struct Scsi_Host *shost; ··· 2224 2224 mutex_lock(&fcoe_config_mutex); 2225 2225 2226 2226 fcoe = port->priv; 2227 + ctlr = fcoe_to_ctlr(fcoe); 2228 + cdev = fcoe_ctlr_to_ctlr_dev(ctlr); 2229 + 2227 2230 fcoe_if_destroy(port->lport); 2228 2231 fcoe_interface_cleanup(fcoe); 2229 2232 2230 2233 mutex_unlock(&fcoe_config_mutex); 2234 + 2235 + fcoe_ctlr_device_delete(cdev); 2231 2236 } 2232 2237 2233 2238 /** ··· 2340 2335 rc = -EIO; 2341 2336 rtnl_unlock(); 2342 2337 fcoe_interface_cleanup(fcoe); 2343 - goto out_nortnl; 2338 + mutex_unlock(&fcoe_config_mutex); 2339 + fcoe_ctlr_device_delete(ctlr_dev); 2340 + goto out; 2344 2341 } 2345 2342 2346 2343 /* Make this the "master" N_Port */ ··· 2382 2375 2383 2376 out_nodev: 2384 2377 rtnl_unlock(); 2385 - out_nortnl: 2386 2378 mutex_unlock(&fcoe_config_mutex); 2379 + out: 2387 2380 return rc; 2388 2381 } 2389 2382
+46 -14
drivers/scsi/fcoe/fcoe_ctlr.c
··· 2815 2815 } 2816 2816 2817 2817 /** 2818 + * fcoe_ctlr_mode_set() - Set or reset the ctlr's mode 2819 + * @lport: The local port to be (re)configured 2820 + * @fip: The FCoE controller whose mode is changing 2821 + * @fip_mode: The new fip mode 2822 + * 2823 + * Note that the we shouldn't be changing the libfc discovery settings 2824 + * (fc_disc_config) while an lport is going through the libfc state 2825 + * machine. The mode can only be changed when a fcoe_ctlr device is 2826 + * disabled, so that should ensure that this routine is only called 2827 + * when nothing is happening. 2828 + */ 2829 + void fcoe_ctlr_mode_set(struct fc_lport *lport, struct fcoe_ctlr *fip, 2830 + enum fip_state fip_mode) 2831 + { 2832 + void *priv; 2833 + 2834 + WARN_ON(lport->state != LPORT_ST_RESET && 2835 + lport->state != LPORT_ST_DISABLED); 2836 + 2837 + if (fip_mode == FIP_MODE_VN2VN) { 2838 + lport->rport_priv_size = sizeof(struct fcoe_rport); 2839 + lport->point_to_multipoint = 1; 2840 + lport->tt.disc_recv_req = fcoe_ctlr_disc_recv; 2841 + lport->tt.disc_start = fcoe_ctlr_disc_start; 2842 + lport->tt.disc_stop = fcoe_ctlr_disc_stop; 2843 + lport->tt.disc_stop_final = fcoe_ctlr_disc_stop_final; 2844 + priv = fip; 2845 + } else { 2846 + lport->rport_priv_size = 0; 2847 + lport->point_to_multipoint = 0; 2848 + lport->tt.disc_recv_req = NULL; 2849 + lport->tt.disc_start = NULL; 2850 + lport->tt.disc_stop = NULL; 2851 + lport->tt.disc_stop_final = NULL; 2852 + priv = lport; 2853 + } 2854 + 2855 + fc_disc_config(lport, priv); 2856 + } 2857 + 2858 + /** 2818 2859 * fcoe_libfc_config() - Sets up libfc related properties for local port 2819 2860 * @lport: The local port to configure libfc for 2820 2861 * @fip: The FCoE controller in use by the local port ··· 2874 2833 fc_exch_init(lport); 2875 2834 fc_elsct_init(lport); 2876 2835 fc_lport_init(lport); 2877 - if (fip->mode == FIP_MODE_VN2VN) 2878 - lport->rport_priv_size = sizeof(struct fcoe_rport); 2879 2836 fc_rport_init(lport); 2880 - if (fip->mode == FIP_MODE_VN2VN) { 2881 - lport->point_to_multipoint = 1; 2882 - lport->tt.disc_recv_req = fcoe_ctlr_disc_recv; 2883 - lport->tt.disc_start = fcoe_ctlr_disc_start; 2884 - lport->tt.disc_stop = fcoe_ctlr_disc_stop; 2885 - lport->tt.disc_stop_final = fcoe_ctlr_disc_stop_final; 2886 - mutex_init(&lport->disc.disc_mutex); 2887 - INIT_LIST_HEAD(&lport->disc.rports); 2888 - lport->disc.priv = fip; 2889 - } else { 2890 - fc_disc_init(lport); 2891 - } 2837 + fc_disc_init(lport); 2838 + fcoe_ctlr_mode_set(lport, fip, fip->mode); 2892 2839 return 0; 2893 2840 } 2894 2841 EXPORT_SYMBOL_GPL(fcoe_libfc_config); ··· 2904 2875 void fcoe_ctlr_set_fip_mode(struct fcoe_ctlr_device *ctlr_dev) 2905 2876 { 2906 2877 struct fcoe_ctlr *ctlr = fcoe_ctlr_device_priv(ctlr_dev); 2878 + struct fc_lport *lport = ctlr->lp; 2907 2879 2908 2880 mutex_lock(&ctlr->ctlr_mutex); 2909 2881 switch (ctlr_dev->mode) { ··· 2918 2888 } 2919 2889 2920 2890 mutex_unlock(&ctlr->ctlr_mutex); 2891 + 2892 + fcoe_ctlr_mode_set(lport, ctlr, ctlr->mode); 2921 2893 } 2922 2894 EXPORT_SYMBOL(fcoe_ctlr_set_fip_mode);
+18 -8
drivers/scsi/libfc/fc_disc.c
··· 712 712 } 713 713 714 714 /** 715 - * fc_disc_init() - Initialize the discovery layer for a local port 716 - * @lport: The local port that needs the discovery layer to be initialized 715 + * fc_disc_config() - Configure the discovery layer for a local port 716 + * @lport: The local port that needs the discovery layer to be configured 717 + * @priv: Private data structre for users of the discovery layer 717 718 */ 718 - int fc_disc_init(struct fc_lport *lport) 719 + void fc_disc_config(struct fc_lport *lport, void *priv) 719 720 { 720 - struct fc_disc *disc; 721 + struct fc_disc *disc = &lport->disc; 721 722 722 723 if (!lport->tt.disc_start) 723 724 lport->tt.disc_start = fc_disc_start; ··· 733 732 lport->tt.disc_recv_req = fc_disc_recv_req; 734 733 735 734 disc = &lport->disc; 735 + 736 + disc->priv = priv; 737 + } 738 + EXPORT_SYMBOL(fc_disc_config); 739 + 740 + /** 741 + * fc_disc_init() - Initialize the discovery layer for a local port 742 + * @lport: The local port that needs the discovery layer to be initialized 743 + */ 744 + void fc_disc_init(struct fc_lport *lport) 745 + { 746 + struct fc_disc *disc = &lport->disc; 747 + 736 748 INIT_DELAYED_WORK(&disc->disc_work, fc_disc_timeout); 737 749 mutex_init(&disc->disc_mutex); 738 750 INIT_LIST_HEAD(&disc->rports); 739 - 740 - disc->priv = lport; 741 - 742 - return 0; 743 751 } 744 752 EXPORT_SYMBOL(fc_disc_init);
+1
drivers/video/sh_mobile_lcdcfb.c
··· 858 858 tmp = ((mode->xres & 7) << 24) | ((display_h_total & 7) << 16) 859 859 | ((mode->hsync_len & 7) << 8) | (hsync_pos & 7); 860 860 lcdc_write_chan(ch, LDHAJR, tmp); 861 + lcdc_write_chan_mirror(ch, LDHAJR, tmp); 861 862 } 862 863 863 864 static void sh_mobile_lcdc_overlay_setup(struct sh_mobile_lcdc_overlay *ovl)
+1
fs/block_dev.c
··· 551 551 ihold(bdev->bd_inode); 552 552 return bdev; 553 553 } 554 + EXPORT_SYMBOL(bdgrab); 554 555 555 556 long nr_blockdev_pages(void) 556 557 {
+1 -1
fs/nfsd/nfs4xdr.c
··· 264 264 iattr->ia_valid |= ATTR_SIZE; 265 265 } 266 266 if (bmval[0] & FATTR4_WORD0_ACL) { 267 - int nace; 267 + u32 nace; 268 268 struct nfs4_ace *ace; 269 269 270 270 READ_BUF(4); len += 4;
+2 -2
include/linux/compat.h
··· 141 141 } compat_sigset_t; 142 142 143 143 struct compat_sigaction { 144 - #ifndef __ARCH_HAS_ODD_SIGACTION 144 + #ifndef __ARCH_HAS_IRIX_SIGACTION 145 145 compat_uptr_t sa_handler; 146 146 compat_ulong_t sa_flags; 147 147 #else 148 - compat_ulong_t sa_flags; 148 + compat_uint_t sa_flags; 149 149 compat_uptr_t sa_handler; 150 150 #endif 151 151 #ifdef __ARCH_HAS_SA_RESTORER
+2 -2
include/linux/signal.h
··· 250 250 extern int sigsuspend(sigset_t *); 251 251 252 252 struct sigaction { 253 - #ifndef __ARCH_HAS_ODD_SIGACTION 253 + #ifndef __ARCH_HAS_IRIX_SIGACTION 254 254 __sighandler_t sa_handler; 255 255 unsigned long sa_flags; 256 256 #else 257 - unsigned long sa_flags; 257 + unsigned int sa_flags; 258 258 __sighandler_t sa_handler; 259 259 #endif 260 260 #ifdef __ARCH_HAS_SA_RESTORER
+2 -1
include/scsi/libfc.h
··· 1074 1074 /* 1075 1075 * DISCOVERY LAYER 1076 1076 *****************************/ 1077 - int fc_disc_init(struct fc_lport *); 1077 + void fc_disc_init(struct fc_lport *); 1078 + void fc_disc_config(struct fc_lport *, void *); 1078 1079 1079 1080 static inline struct fc_lport *fc_disc_lport(struct fc_disc *disc) 1080 1081 {
+1
ipc/msg.c
··· 872 872 goto out_unlock; 873 873 break; 874 874 } 875 + msg = ERR_PTR(-EAGAIN); 875 876 } else 876 877 break; 877 878 msg_counter++;
+27
net/ipv6/addrconf.c
··· 2616 2616 static void init_loopback(struct net_device *dev) 2617 2617 { 2618 2618 struct inet6_dev *idev; 2619 + struct net_device *sp_dev; 2620 + struct inet6_ifaddr *sp_ifa; 2621 + struct rt6_info *sp_rt; 2619 2622 2620 2623 /* ::1 */ 2621 2624 ··· 2630 2627 } 2631 2628 2632 2629 add_addr(idev, &in6addr_loopback, 128, IFA_HOST); 2630 + 2631 + /* Add routes to other interface's IPv6 addresses */ 2632 + for_each_netdev(dev_net(dev), sp_dev) { 2633 + if (!strcmp(sp_dev->name, dev->name)) 2634 + continue; 2635 + 2636 + idev = __in6_dev_get(sp_dev); 2637 + if (!idev) 2638 + continue; 2639 + 2640 + read_lock_bh(&idev->lock); 2641 + list_for_each_entry(sp_ifa, &idev->addr_list, if_list) { 2642 + 2643 + if (sp_ifa->flags & (IFA_F_DADFAILED | IFA_F_TENTATIVE)) 2644 + continue; 2645 + 2646 + sp_rt = addrconf_dst_alloc(idev, &sp_ifa->addr, 0); 2647 + 2648 + /* Failure cases are ignored */ 2649 + if (!IS_ERR(sp_rt)) 2650 + ip6_ins_rt(sp_rt); 2651 + } 2652 + read_unlock_bh(&idev->lock); 2653 + } 2633 2654 } 2634 2655 2635 2656 static void addrconf_add_linklocal(struct inet6_dev *idev, const struct in6_addr *addr)
+4 -1
net/sched/sch_cbq.c
··· 962 962 cbq_update(q); 963 963 if ((incr -= incr2) < 0) 964 964 incr = 0; 965 + q->now += incr; 966 + } else { 967 + if (now > q->now) 968 + q->now = now; 965 969 } 966 - q->now += incr; 967 970 q->now_rt = now; 968 971 969 972 for (;;) {
+3 -3
net/vmw_vsock/af_vsock.c
··· 207 207 struct vsock_sock *vsk; 208 208 209 209 list_for_each_entry(vsk, vsock_bound_sockets(addr), bound_table) 210 - if (vsock_addr_equals_addr_any(addr, &vsk->local_addr)) 210 + if (addr->svm_port == vsk->local_addr.svm_port) 211 211 return sk_vsock(vsk); 212 212 213 213 return NULL; ··· 220 220 221 221 list_for_each_entry(vsk, vsock_connected_sockets(src, dst), 222 222 connected_table) { 223 - if (vsock_addr_equals_addr(src, &vsk->remote_addr) 224 - && vsock_addr_equals_addr(dst, &vsk->local_addr)) { 223 + if (vsock_addr_equals_addr(src, &vsk->remote_addr) && 224 + dst->svm_port == vsk->local_addr.svm_port) { 225 225 return sk_vsock(vsk); 226 226 } 227 227 }
+20 -11
net/vmw_vsock/vmci_transport.c
··· 472 472 struct vsock_sock *vlistener; 473 473 struct vsock_sock *vpending; 474 474 struct sock *pending; 475 + struct sockaddr_vm src; 476 + 477 + vsock_addr_init(&src, pkt->dg.src.context, pkt->src_port); 475 478 476 479 vlistener = vsock_sk(listener); 477 480 478 481 list_for_each_entry(vpending, &vlistener->pending_links, 479 482 pending_links) { 480 - struct sockaddr_vm src; 481 - struct sockaddr_vm dst; 482 - 483 - vsock_addr_init(&src, pkt->dg.src.context, pkt->src_port); 484 - vsock_addr_init(&dst, pkt->dg.dst.context, pkt->dst_port); 485 - 486 483 if (vsock_addr_equals_addr(&src, &vpending->remote_addr) && 487 - vsock_addr_equals_addr(&dst, &vpending->local_addr)) { 484 + pkt->dst_port == vpending->local_addr.svm_port) { 488 485 pending = sk_vsock(vpending); 489 486 sock_hold(pending); 490 487 goto found; ··· 746 749 */ 747 750 bh_lock_sock(sk); 748 751 749 - if (!sock_owned_by_user(sk) && sk->sk_state == SS_CONNECTED) 750 - vmci_trans(vsk)->notify_ops->handle_notify_pkt( 751 - sk, pkt, true, &dst, &src, 752 - &bh_process_pkt); 752 + if (!sock_owned_by_user(sk)) { 753 + /* The local context ID may be out of date, update it. */ 754 + vsk->local_addr.svm_cid = dst.svm_cid; 755 + 756 + if (sk->sk_state == SS_CONNECTED) 757 + vmci_trans(vsk)->notify_ops->handle_notify_pkt( 758 + sk, pkt, true, &dst, &src, 759 + &bh_process_pkt); 760 + } 753 761 754 762 bh_unlock_sock(sk); 755 763 ··· 914 912 915 913 lock_sock(sk); 916 914 915 + /* The local context ID may be out of date. */ 916 + vsock_sk(sk)->local_addr.svm_cid = pkt->dg.dst.context; 917 + 917 918 switch (sk->sk_state) { 918 919 case SS_LISTEN: 919 920 vmci_transport_recv_listen(sk, pkt); ··· 973 968 pending = vmci_transport_get_pending(sk, pkt); 974 969 if (pending) { 975 970 lock_sock(pending); 971 + 972 + /* The local context ID may be out of date. */ 973 + vsock_sk(pending)->local_addr.svm_cid = pkt->dg.dst.context; 974 + 976 975 switch (pending->sk_state) { 977 976 case SS_CONNECTING: 978 977 err = vmci_transport_recv_connecting_server(sk,
-10
net/vmw_vsock/vsock_addr.c
··· 64 64 } 65 65 EXPORT_SYMBOL_GPL(vsock_addr_equals_addr); 66 66 67 - bool vsock_addr_equals_addr_any(const struct sockaddr_vm *addr, 68 - const struct sockaddr_vm *other) 69 - { 70 - return (addr->svm_cid == VMADDR_CID_ANY || 71 - other->svm_cid == VMADDR_CID_ANY || 72 - addr->svm_cid == other->svm_cid) && 73 - addr->svm_port == other->svm_port; 74 - } 75 - EXPORT_SYMBOL_GPL(vsock_addr_equals_addr_any); 76 - 77 67 int vsock_addr_cast(const struct sockaddr *addr, 78 68 size_t len, struct sockaddr_vm **out_addr) 79 69 {
-2
net/vmw_vsock/vsock_addr.h
··· 24 24 void vsock_addr_unbind(struct sockaddr_vm *addr); 25 25 bool vsock_addr_equals_addr(const struct sockaddr_vm *addr, 26 26 const struct sockaddr_vm *other); 27 - bool vsock_addr_equals_addr_any(const struct sockaddr_vm *addr, 28 - const struct sockaddr_vm *other); 29 27 int vsock_addr_cast(const struct sockaddr *addr, size_t len, 30 28 struct sockaddr_vm **out_addr); 31 29