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

Merge tag 'v3.2' into staging/for_v3.3

* tag 'v3.2': (83 commits)
Linux 3.2
minixfs: misplaced checks lead to dentry leak
ptrace: ensure JOBCTL_STOP_SIGMASK is not zero after detach
ptrace: partially fix the do_wait(WEXITED) vs EXIT_DEAD->EXIT_ZOMBIE race
Revert "rtc: Expire alarms after the time is set."
[CIFS] default ntlmv2 for cifs mount delayed to 3.3
cifs: fix bad buffer length check in coalesce_t2
Revert "rtc: Disable the alarm in the hardware"
hung_task: fix false positive during vfork
security: Fix security_old_inode_init_security() when CONFIG_SECURITY is not set
fix CAN MAINTAINERS SCM tree type
mwifiex: fix crash during simultaneous scan and connect
b43: fix regression in PIO case
ath9k: Fix kernel panic in AR2427 in AP mode
CAN MAINTAINERS update
net: fsl: fec: fix build for mx23-only kernel
sch_qfq: fix overflow in qfq_update_start()
drm/radeon/kms/atom: fix possible segfault in pm setup
gspca: Fix falling back to lower isoc alt settings
futex: Fix uninterruptible loop due to gate_area
...

+570 -392
+16
Documentation/virtual/kvm/api.txt
··· 1100 1100 eax, ebx, ecx, edx: the values returned by the cpuid instruction for 1101 1101 this function/index combination 1102 1102 1103 + The TSC deadline timer feature (CPUID leaf 1, ecx[24]) is always returned 1104 + as false, since the feature depends on KVM_CREATE_IRQCHIP for local APIC 1105 + support. Instead it is reported via 1106 + 1107 + ioctl(KVM_CHECK_EXTENSION, KVM_CAP_TSC_DEADLINE_TIMER) 1108 + 1109 + if that returns true and you use KVM_CREATE_IRQCHIP, or if you emulate the 1110 + feature in userspace, then you can enable the feature for KVM_SET_CPUID2. 1111 + 1103 1112 4.47 KVM_PPC_GET_PVINFO 1104 1113 1105 1114 Capability: KVM_CAP_PPC_GET_PVINFO ··· 1159 1150 1160 1151 /* Depends on KVM_CAP_IOMMU */ 1161 1152 #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) 1153 + 1154 + The KVM_DEV_ASSIGN_ENABLE_IOMMU flag is a mandatory option to ensure 1155 + isolation of the device. Usages not specifying this flag are deprecated. 1156 + 1157 + Only PCI header type 0 devices with PCI BAR resources are supported by 1158 + device assignment. The user requesting this ioctl must have read/write 1159 + access to the PCI sysfs resource files associated with the device. 1162 1160 1163 1161 4.49 KVM_DEASSIGN_PCI_DEVICE 1164 1162
+6 -7
MAINTAINERS
··· 1698 1698 1699 1699 CAN NETWORK LAYER 1700 1700 M: Oliver Hartkopp <socketcan@hartkopp.net> 1701 - M: Oliver Hartkopp <oliver.hartkopp@volkswagen.de> 1702 - M: Urs Thuermann <urs.thuermann@volkswagen.de> 1703 1701 L: linux-can@vger.kernel.org 1704 - L: netdev@vger.kernel.org 1705 - W: http://developer.berlios.de/projects/socketcan/ 1702 + W: http://gitorious.org/linux-can 1703 + T: git git://gitorious.org/linux-can/linux-can-next.git 1706 1704 S: Maintained 1707 1705 F: net/can/ 1708 1706 F: include/linux/can.h ··· 1711 1713 1712 1714 CAN NETWORK DRIVERS 1713 1715 M: Wolfgang Grandegger <wg@grandegger.com> 1716 + M: Marc Kleine-Budde <mkl@pengutronix.de> 1714 1717 L: linux-can@vger.kernel.org 1715 - L: netdev@vger.kernel.org 1716 - W: http://developer.berlios.de/projects/socketcan/ 1718 + W: http://gitorious.org/linux-can 1719 + T: git git://gitorious.org/linux-can/linux-can-next.git 1717 1720 S: Maintained 1718 1721 F: drivers/net/can/ 1719 1722 F: include/linux/can/dev.h ··· 2699 2700 M: Stefan Richter <stefanr@s5r6.in-berlin.de> 2700 2701 L: linux1394-devel@lists.sourceforge.net 2701 2702 W: http://ieee1394.wiki.kernel.org/ 2702 - T: git git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git 2703 + T: git git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394.git 2703 2704 S: Maintained 2704 2705 F: drivers/firewire/ 2705 2706 F: include/linux/firewire*.h
+1 -1
Makefile
··· 1 1 VERSION = 3 2 2 PATCHLEVEL = 2 3 3 SUBLEVEL = 0 4 - EXTRAVERSION = -rc7 4 + EXTRAVERSION = 5 5 NAME = Saber-toothed Squirrel 6 6 7 7 # *DOCUMENTATION*
+2 -2
arch/arm/Kconfig
··· 1246 1246 1247 1247 config ARM_ERRATA_720789 1248 1248 bool "ARM errata: TLBIASIDIS and TLBIMVAIS operations can broadcast a faulty ASID" 1249 - depends on CPU_V7 && SMP 1249 + depends on CPU_V7 1250 1250 help 1251 1251 This option enables the workaround for the 720789 Cortex-A9 (prior to 1252 1252 r2p0) erratum. A faulty ASID can be sent to the other CPUs for the ··· 1282 1282 1283 1283 config ARM_ERRATA_751472 1284 1284 bool "ARM errata: Interrupted ICIALLUIS may prevent completion of broadcasted operation" 1285 - depends on CPU_V7 && SMP 1285 + depends on CPU_V7 1286 1286 help 1287 1287 This option enables the workaround for the 751472 Cortex-A9 (prior 1288 1288 to r3p0) erratum. An interrupted ICIALLUIS operation may prevent the
+49 -67
arch/arm/common/pl330.c
··· 221 221 */ 222 222 #define MCODE_BUFF_PER_REQ 256 223 223 224 - /* 225 - * Mark a _pl330_req as free. 226 - * We do it by writing DMAEND as the first instruction 227 - * because no valid request is going to have DMAEND as 228 - * its first instruction to execute. 229 - */ 230 - #define MARK_FREE(req) do { \ 231 - _emit_END(0, (req)->mc_cpu); \ 232 - (req)->mc_len = 0; \ 233 - } while (0) 234 - 235 224 /* If the _pl330_req is available to the client */ 236 225 #define IS_FREE(req) (*((u8 *)((req)->mc_cpu)) == CMD_DMAEND) 237 226 ··· 290 301 struct pl330_dmac *dmac; 291 302 /* Only two at a time */ 292 303 struct _pl330_req req[2]; 293 - /* Index of the last submitted request */ 304 + /* Index of the last enqueued request */ 294 305 unsigned lstenq; 306 + /* Index of the last submitted request or -1 if the DMA is stopped */ 307 + int req_running; 295 308 }; 296 309 297 310 enum pl330_dmac_state { ··· 769 778 writel(0, regs + DBGCMD); 770 779 } 771 780 781 + /* 782 + * Mark a _pl330_req as free. 783 + * We do it by writing DMAEND as the first instruction 784 + * because no valid request is going to have DMAEND as 785 + * its first instruction to execute. 786 + */ 787 + static void mark_free(struct pl330_thread *thrd, int idx) 788 + { 789 + struct _pl330_req *req = &thrd->req[idx]; 790 + 791 + _emit_END(0, req->mc_cpu); 792 + req->mc_len = 0; 793 + 794 + thrd->req_running = -1; 795 + } 796 + 772 797 static inline u32 _state(struct pl330_thread *thrd) 773 798 { 774 799 void __iomem *regs = thrd->dmac->pinfo->base; ··· 843 836 } 844 837 } 845 838 846 - /* If the request 'req' of thread 'thrd' is currently active */ 847 - static inline bool _req_active(struct pl330_thread *thrd, 848 - struct _pl330_req *req) 849 - { 850 - void __iomem *regs = thrd->dmac->pinfo->base; 851 - u32 buf = req->mc_bus, pc = readl(regs + CPC(thrd->id)); 852 - 853 - if (IS_FREE(req)) 854 - return false; 855 - 856 - return (pc >= buf && pc <= buf + req->mc_len) ? true : false; 857 - } 858 - 859 - /* Returns 0 if the thread is inactive, ID of active req + 1 otherwise */ 860 - static inline unsigned _thrd_active(struct pl330_thread *thrd) 861 - { 862 - if (_req_active(thrd, &thrd->req[0])) 863 - return 1; /* First req active */ 864 - 865 - if (_req_active(thrd, &thrd->req[1])) 866 - return 2; /* Second req active */ 867 - 868 - return 0; 869 - } 870 - 871 839 static void _stop(struct pl330_thread *thrd) 872 840 { 873 841 void __iomem *regs = thrd->dmac->pinfo->base; ··· 874 892 struct _arg_GO go; 875 893 unsigned ns; 876 894 u8 insn[6] = {0, 0, 0, 0, 0, 0}; 895 + int idx; 877 896 878 897 /* Return if already ACTIVE */ 879 898 if (_state(thrd) != PL330_STATE_STOPPED) 880 899 return true; 881 900 882 - if (!IS_FREE(&thrd->req[1 - thrd->lstenq])) 883 - req = &thrd->req[1 - thrd->lstenq]; 884 - else if (!IS_FREE(&thrd->req[thrd->lstenq])) 885 - req = &thrd->req[thrd->lstenq]; 886 - else 887 - req = NULL; 901 + idx = 1 - thrd->lstenq; 902 + if (!IS_FREE(&thrd->req[idx])) 903 + req = &thrd->req[idx]; 904 + else { 905 + idx = thrd->lstenq; 906 + if (!IS_FREE(&thrd->req[idx])) 907 + req = &thrd->req[idx]; 908 + else 909 + req = NULL; 910 + } 888 911 889 912 /* Return if no request */ 890 913 if (!req || !req->r) ··· 919 932 920 933 /* Only manager can execute GO */ 921 934 _execute_DBGINSN(thrd, insn, true); 935 + 936 + thrd->req_running = idx; 922 937 923 938 return true; 924 939 } ··· 1371 1382 1372 1383 thrd->req[0].r = NULL; 1373 1384 thrd->req[1].r = NULL; 1374 - MARK_FREE(&thrd->req[0]); 1375 - MARK_FREE(&thrd->req[1]); 1385 + mark_free(thrd, 0); 1386 + mark_free(thrd, 1); 1376 1387 1377 1388 /* Clear the reset flag */ 1378 1389 pl330->dmac_tbd.reset_chan &= ~(1 << i); ··· 1450 1461 1451 1462 thrd = &pl330->channels[id]; 1452 1463 1453 - active = _thrd_active(thrd); 1454 - if (!active) /* Aborted */ 1464 + active = thrd->req_running; 1465 + if (active == -1) /* Aborted */ 1455 1466 continue; 1456 1467 1457 - active -= 1; 1458 - 1459 1468 rqdone = &thrd->req[active]; 1460 - MARK_FREE(rqdone); 1469 + mark_free(thrd, active); 1461 1470 1462 1471 /* Get going again ASAP */ 1463 1472 _start(thrd); ··· 1496 1509 struct pl330_thread *thrd = ch_id; 1497 1510 struct pl330_dmac *pl330; 1498 1511 unsigned long flags; 1499 - int ret = 0, active; 1512 + int ret = 0, active = thrd->req_running; 1500 1513 1501 1514 if (!thrd || thrd->free || thrd->dmac->state == DYING) 1502 1515 return -EINVAL; ··· 1512 1525 1513 1526 thrd->req[0].r = NULL; 1514 1527 thrd->req[1].r = NULL; 1515 - MARK_FREE(&thrd->req[0]); 1516 - MARK_FREE(&thrd->req[1]); 1528 + mark_free(thrd, 0); 1529 + mark_free(thrd, 1); 1517 1530 break; 1518 1531 1519 1532 case PL330_OP_ABORT: 1520 - active = _thrd_active(thrd); 1521 - 1522 1533 /* Make sure the channel is stopped */ 1523 1534 _stop(thrd); 1524 1535 1525 1536 /* ABORT is only for the active req */ 1526 - if (!active) 1537 + if (active == -1) 1527 1538 break; 1528 1539 1529 - active--; 1530 - 1531 1540 thrd->req[active].r = NULL; 1532 - MARK_FREE(&thrd->req[active]); 1541 + mark_free(thrd, active); 1533 1542 1534 1543 /* Start the next */ 1535 1544 case PL330_OP_START: 1536 - if (!_thrd_active(thrd) && !_start(thrd)) 1545 + if ((active == -1) && !_start(thrd)) 1537 1546 ret = -EIO; 1538 1547 break; 1539 1548 ··· 1570 1587 else 1571 1588 pstatus->faulting = false; 1572 1589 1573 - active = _thrd_active(thrd); 1590 + active = thrd->req_running; 1574 1591 1575 - if (!active) { 1592 + if (active == -1) { 1576 1593 /* Indicate that the thread is not running */ 1577 1594 pstatus->top_req = NULL; 1578 1595 pstatus->wait_req = NULL; 1579 1596 } else { 1580 - active--; 1581 1597 pstatus->top_req = thrd->req[active].r; 1582 1598 pstatus->wait_req = !IS_FREE(&thrd->req[1 - active]) 1583 1599 ? thrd->req[1 - active].r : NULL; ··· 1641 1659 thrd->free = false; 1642 1660 thrd->lstenq = 1; 1643 1661 thrd->req[0].r = NULL; 1644 - MARK_FREE(&thrd->req[0]); 1662 + mark_free(thrd, 0); 1645 1663 thrd->req[1].r = NULL; 1646 - MARK_FREE(&thrd->req[1]); 1664 + mark_free(thrd, 1); 1647 1665 break; 1648 1666 } 1649 1667 } ··· 1749 1767 thrd->req[0].mc_bus = pl330->mcode_bus 1750 1768 + (thrd->id * pi->mcbufsz); 1751 1769 thrd->req[0].r = NULL; 1752 - MARK_FREE(&thrd->req[0]); 1770 + mark_free(thrd, 0); 1753 1771 1754 1772 thrd->req[1].mc_cpu = thrd->req[0].mc_cpu 1755 1773 + pi->mcbufsz / 2; 1756 1774 thrd->req[1].mc_bus = thrd->req[0].mc_bus 1757 1775 + pi->mcbufsz / 2; 1758 1776 thrd->req[1].r = NULL; 1759 - MARK_FREE(&thrd->req[1]); 1777 + mark_free(thrd, 1); 1760 1778 } 1761 1779 1762 1780 static int dmac_alloc_threads(struct pl330_dmac *pl330)
+7 -5
arch/arm/configs/imx_v4_v5_defconfig
··· 18 18 CONFIG_ARCH_IMX_V4_V5=y 19 19 CONFIG_ARCH_MX1ADS=y 20 20 CONFIG_MACH_SCB9328=y 21 + CONFIG_MACH_APF9328=y 21 22 CONFIG_MACH_MX21ADS=y 22 23 CONFIG_MACH_MX25_3DS=y 23 - CONFIG_MACH_EUKREA_CPUIMX25=y 24 + CONFIG_MACH_EUKREA_CPUIMX25SD=y 24 25 CONFIG_MACH_MX27ADS=y 25 26 CONFIG_MACH_PCM038=y 26 27 CONFIG_MACH_CPUIMX27=y ··· 73 72 CONFIG_MTD_CFI_INTELEXT=y 74 73 CONFIG_MTD_PHYSMAP=y 75 74 CONFIG_MTD_NAND=y 75 + CONFIG_MTD_NAND_MXC=y 76 76 CONFIG_MTD_UBI=y 77 77 CONFIG_MISC_DEVICES=y 78 78 CONFIG_EEPROM_AT24=y 79 79 CONFIG_EEPROM_AT25=y 80 80 CONFIG_NETDEVICES=y 81 - CONFIG_NET_ETHERNET=y 82 - CONFIG_SMC91X=y 83 81 CONFIG_DM9000=y 82 + CONFIG_SMC91X=y 84 83 CONFIG_SMC911X=y 85 - # CONFIG_NETDEV_1000 is not set 86 - # CONFIG_NETDEV_10000 is not set 84 + CONFIG_SMSC_PHY=y 87 85 # CONFIG_INPUT_MOUSEDEV is not set 88 86 CONFIG_INPUT_EVDEV=y 89 87 # CONFIG_INPUT_KEYBOARD is not set ··· 100 100 CONFIG_I2C_IMX=y 101 101 CONFIG_SPI=y 102 102 CONFIG_SPI_IMX=y 103 + CONFIG_SPI_SPIDEV=y 103 104 CONFIG_W1=y 104 105 CONFIG_W1_MASTER_MXC=y 105 106 CONFIG_W1_SLAVE_THERM=y ··· 140 139 CONFIG_MMC_MXC=y 141 140 CONFIG_NEW_LEDS=y 142 141 CONFIG_LEDS_CLASS=y 142 + CONFIG_LEDS_GPIO=y 143 143 CONFIG_LEDS_MC13783=y 144 144 CONFIG_LEDS_TRIGGERS=y 145 145 CONFIG_LEDS_TRIGGER_TIMER=y
-5
arch/arm/mach-exynos/cpu.c
··· 111 111 .length = SZ_4K, 112 112 .type = MT_DEVICE, 113 113 }, { 114 - .virtual = (unsigned long)S5P_VA_SROMC, 115 - .pfn = __phys_to_pfn(EXYNOS4_PA_SROMC), 116 - .length = SZ_4K, 117 - .type = MT_DEVICE, 118 - }, { 119 114 .virtual = (unsigned long)S3C_VA_USB_HSPHY, 120 115 .pfn = __phys_to_pfn(EXYNOS4_PA_HSPHY), 121 116 .length = SZ_4K,
+4 -4
arch/arm/mach-imx/Kconfig
··· 132 132 select IMX_HAVE_PLATFORM_MXC_NAND 133 133 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX 134 134 135 - config MACH_EUKREA_CPUIMX25 135 + config MACH_EUKREA_CPUIMX25SD 136 136 bool "Support Eukrea CPUIMX25 Platform" 137 137 select SOC_IMX25 138 138 select IMX_HAVE_PLATFORM_FLEXCAN ··· 148 148 149 149 choice 150 150 prompt "Baseboard" 151 - depends on MACH_EUKREA_CPUIMX25 151 + depends on MACH_EUKREA_CPUIMX25SD 152 152 default MACH_EUKREA_MBIMXSD25_BASEBOARD 153 153 154 154 config MACH_EUKREA_MBIMXSD25_BASEBOARD ··· 542 542 Include support for MX35PDK platform. This includes specific 543 543 configurations for the board and its peripherals. 544 544 545 - config MACH_EUKREA_CPUIMX35 545 + config MACH_EUKREA_CPUIMX35SD 546 546 bool "Support Eukrea CPUIMX35 Platform" 547 547 select SOC_IMX35 548 548 select IMX_HAVE_PLATFORM_FLEXCAN ··· 560 560 561 561 choice 562 562 prompt "Baseboard" 563 - depends on MACH_EUKREA_CPUIMX35 563 + depends on MACH_EUKREA_CPUIMX35SD 564 564 default MACH_EUKREA_MBIMXSD35_BASEBOARD 565 565 566 566 config MACH_EUKREA_MBIMXSD35_BASEBOARD
+2 -2
arch/arm/mach-imx/Makefile
··· 24 24 25 25 # i.MX25 based machines 26 26 obj-$(CONFIG_MACH_MX25_3DS) += mach-mx25_3ds.o 27 - obj-$(CONFIG_MACH_EUKREA_CPUIMX25) += mach-eukrea_cpuimx25.o 27 + obj-$(CONFIG_MACH_EUKREA_CPUIMX25SD) += mach-eukrea_cpuimx25.o 28 28 obj-$(CONFIG_MACH_EUKREA_MBIMXSD25_BASEBOARD) += eukrea_mbimxsd25-baseboard.o 29 29 30 30 # i.MX27 based machines ··· 57 57 # i.MX35 based machines 58 58 obj-$(CONFIG_MACH_PCM043) += mach-pcm043.o 59 59 obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35_3ds.o 60 - obj-$(CONFIG_MACH_EUKREA_CPUIMX35) += mach-cpuimx35.o 60 + obj-$(CONFIG_MACH_EUKREA_CPUIMX35SD) += mach-cpuimx35.o 61 61 obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o 62 62 obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o 63 63
+10 -10
arch/arm/mach-imx/clock-imx35.c
··· 507 507 508 508 int __init mx35_clocks_init() 509 509 { 510 - unsigned int cgr2 = 3 << 26, cgr3 = 0; 510 + unsigned int cgr2 = 3 << 26; 511 511 512 512 #if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_ICEDCC) 513 513 cgr2 |= 3 << 16; ··· 521 521 __raw_writel((3 << 18), CCM_BASE + CCM_CGR0); 522 522 __raw_writel((3 << 2) | (3 << 4) | (3 << 6) | (3 << 8) | (3 << 16), 523 523 CCM_BASE + CCM_CGR1); 524 + __raw_writel(cgr2, CCM_BASE + CCM_CGR2); 525 + __raw_writel(0, CCM_BASE + CCM_CGR3); 526 + 527 + clk_enable(&iim_clk); 528 + imx_print_silicon_rev("i.MX35", mx35_revision()); 529 + clk_disable(&iim_clk); 524 530 525 531 /* 526 532 * Check if we came up in internal boot mode. If yes, we need some ··· 535 529 */ 536 530 if (!(__raw_readl(CCM_BASE + CCM_RCSR) & (3 << 10))) { 537 531 /* Additionally turn on UART1, SCC, and IIM clocks */ 538 - cgr2 |= 3 << 16 | 3 << 4; 539 - cgr3 |= 3 << 2; 532 + clk_enable(&iim_clk); 533 + clk_enable(&uart1_clk); 534 + clk_enable(&scc_clk); 540 535 } 541 - 542 - __raw_writel(cgr2, CCM_BASE + CCM_CGR2); 543 - __raw_writel(cgr3, CCM_BASE + CCM_CGR3); 544 - 545 - clk_enable(&iim_clk); 546 - imx_print_silicon_rev("i.MX35", mx35_revision()); 547 - clk_disable(&iim_clk); 548 536 549 537 #ifdef CONFIG_MXC_USE_EPIT 550 538 epit_timer_init(&epit1_clk,
+7 -1
arch/arm/mach-imx/mach-cpuimx35.c
··· 53 53 .bitrate = 100000, 54 54 }; 55 55 56 + #define TSC2007_IRQGPIO IMX_GPIO_NR(3, 2) 57 + static int tsc2007_get_pendown_state(void) 58 + { 59 + return !gpio_get_value(TSC2007_IRQGPIO); 60 + } 61 + 56 62 static struct tsc2007_platform_data tsc2007_info = { 57 63 .model = 2007, 58 64 .x_plate_ohms = 180, 65 + .get_pendown_state = tsc2007_get_pendown_state, 59 66 }; 60 67 61 - #define TSC2007_IRQGPIO IMX_GPIO_NR(3, 2) 62 68 static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { 63 69 { 64 70 I2C_BOARD_INFO("pcf8563", 0x51),
-4
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
··· 3247 3247 3248 3248 /* 3430ES1-only hwmods */ 3249 3249 static __initdata struct omap_hwmod *omap3430es1_hwmods[] = { 3250 - &omap3xxx_iva_hwmod, 3251 3250 &omap3430es1_dss_core_hwmod, 3252 - &omap3xxx_mailbox_hwmod, 3253 3251 NULL 3254 3252 }; 3255 3253 3256 3254 /* 3430ES2+-only hwmods */ 3257 3255 static __initdata struct omap_hwmod *omap3430es2plus_hwmods[] = { 3258 - &omap3xxx_iva_hwmod, 3259 3256 &omap3xxx_dss_core_hwmod, 3260 3257 &omap3xxx_usbhsotg_hwmod, 3261 - &omap3xxx_mailbox_hwmod, 3262 3258 NULL 3263 3259 }; 3264 3260
+4 -2
arch/arm/mm/proc-v7.S
··· 363 363 orreq r10, r10, #1 << 6 @ set bit #6 364 364 mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register 365 365 #endif 366 - #ifdef CONFIG_ARM_ERRATA_751472 367 - cmp r6, #0x30 @ present prior to r3p0 366 + #if defined(CONFIG_ARM_ERRATA_751472) && defined(CONFIG_SMP) 367 + ALT_SMP(cmp r6, #0x30) @ present prior to r3p0 368 + ALT_UP_B(1f) 368 369 mrclt p15, 0, r10, c15, c0, 1 @ read diagnostic register 369 370 orrlt r10, r10, #1 << 11 @ set bit #11 370 371 mcrlt p15, 0, r10, c15, c0, 1 @ write diagnostic register 372 + 1: 371 373 #endif 372 374 373 375 3: mov r10, #0
+1 -1
arch/arm/oprofile/common.c
··· 116 116 return oprofile_perf_init(ops); 117 117 } 118 118 119 - void __exit oprofile_arch_exit(void) 119 + void oprofile_arch_exit(void) 120 120 { 121 121 oprofile_perf_exit(); 122 122 }
+1 -1
arch/arm/plat-mxc/cpufreq.c
··· 98 98 return ret; 99 99 } 100 100 101 - static int __init mxc_cpufreq_init(struct cpufreq_policy *policy) 101 + static int mxc_cpufreq_init(struct cpufreq_policy *policy) 102 102 { 103 103 int ret; 104 104 int i;
+1
arch/arm/plat-mxc/include/mach/uncompress.h
··· 98 98 case MACH_TYPE_PCM043: 99 99 case MACH_TYPE_LILLY1131: 100 100 case MACH_TYPE_VPR200: 101 + case MACH_TYPE_EUKREA_CPUIMX35SD: 101 102 uart_base = MX3X_UART1_BASE_ADDR; 102 103 break; 103 104 case MACH_TYPE_MAGX_ZN5:
+9
arch/arm/plat-mxc/pwm.c
··· 77 77 do_div(c, period_ns); 78 78 duty_cycles = c; 79 79 80 + /* 81 + * according to imx pwm RM, the real period value should be 82 + * PERIOD value in PWMPR plus 2. 83 + */ 84 + if (period_cycles > 2) 85 + period_cycles -= 2; 86 + else 87 + period_cycles = 0; 88 + 80 89 writel(duty_cycles, pwm->mmio_base + MX3_PWMSAR); 81 90 writel(period_cycles, pwm->mmio_base + MX3_PWMPR); 82 91
+5 -1
arch/arm/plat-orion/gpio.c
··· 384 384 struct orion_gpio_chip *ochip; 385 385 struct irq_chip_generic *gc; 386 386 struct irq_chip_type *ct; 387 + char gc_label[16]; 387 388 388 389 if (orion_gpio_chip_count == ARRAY_SIZE(orion_gpio_chips)) 389 390 return; 390 391 392 + snprintf(gc_label, sizeof(gc_label), "orion_gpio%d", 393 + orion_gpio_chip_count); 394 + 391 395 ochip = orion_gpio_chips + orion_gpio_chip_count; 392 - ochip->chip.label = "orion_gpio"; 396 + ochip->chip.label = kstrdup(gc_label, GFP_KERNEL); 393 397 ochip->chip.request = orion_gpio_request; 394 398 ochip->chip.direction_input = orion_gpio_direction_input; 395 399 ochip->chip.get = orion_gpio_get;
+15 -10
arch/arm/plat-samsung/include/plat/cpu-freq-core.h
··· 202 202 extern struct s3c_cpufreq_config *s3c_cpufreq_getconfig(void); 203 203 extern struct s3c_iotimings *s3c_cpufreq_getiotimings(void); 204 204 205 - extern void s3c2410_iotiming_debugfs(struct seq_file *seq, 206 - struct s3c_cpufreq_config *cfg, 207 - union s3c_iobank *iob); 208 - 209 - extern void s3c2412_iotiming_debugfs(struct seq_file *seq, 210 - struct s3c_cpufreq_config *cfg, 211 - union s3c_iobank *iob); 212 - 213 205 #ifdef CONFIG_CPU_FREQ_S3C24XX_DEBUGFS 214 206 #define s3c_cpufreq_debugfs_call(x) x 215 207 #else ··· 218 226 extern void s3c2410_set_fvco(struct s3c_cpufreq_config *cfg); 219 227 220 228 #ifdef CONFIG_S3C2410_IOTIMING 229 + extern void s3c2410_iotiming_debugfs(struct seq_file *seq, 230 + struct s3c_cpufreq_config *cfg, 231 + union s3c_iobank *iob); 232 + 221 233 extern int s3c2410_iotiming_calc(struct s3c_cpufreq_config *cfg, 222 234 struct s3c_iotimings *iot); 223 235 ··· 231 235 extern void s3c2410_iotiming_set(struct s3c_cpufreq_config *cfg, 232 236 struct s3c_iotimings *iot); 233 237 #else 238 + #define s3c2410_iotiming_debugfs NULL 234 239 #define s3c2410_iotiming_calc NULL 235 240 #define s3c2410_iotiming_get NULL 236 241 #define s3c2410_iotiming_set NULL ··· 239 242 240 243 /* S3C2412 compatible routines */ 241 244 242 - extern int s3c2412_iotiming_get(struct s3c_cpufreq_config *cfg, 243 - struct s3c_iotimings *timings); 245 + #ifdef CONFIG_S3C2412_IOTIMING 246 + extern void s3c2412_iotiming_debugfs(struct seq_file *seq, 247 + struct s3c_cpufreq_config *cfg, 248 + union s3c_iobank *iob); 244 249 245 250 extern int s3c2412_iotiming_get(struct s3c_cpufreq_config *cfg, 246 251 struct s3c_iotimings *timings); ··· 252 253 253 254 extern void s3c2412_iotiming_set(struct s3c_cpufreq_config *cfg, 254 255 struct s3c_iotimings *iot); 256 + #else 257 + #define s3c2412_iotiming_debugfs NULL 258 + #define s3c2412_iotiming_calc NULL 259 + #define s3c2412_iotiming_get NULL 260 + #define s3c2412_iotiming_set NULL 261 + #endif /* CONFIG_S3C2412_IOTIMING */ 255 262 256 263 #ifdef CONFIG_CPU_FREQ_S3C24XX_DEBUG 257 264 #define s3c_freq_dbg(x...) printk(KERN_INFO x)
+1
arch/ia64/include/asm/cputime.h
··· 60 60 */ 61 61 #define cputime_to_usecs(__ct) ((__ct) / NSEC_PER_USEC) 62 62 #define usecs_to_cputime(__usecs) ((__usecs) * NSEC_PER_USEC) 63 + #define usecs_to_cputime64(__usecs) usecs_to_cputime(__usecs) 63 64 64 65 /* 65 66 * Convert cputime <-> seconds
+2
arch/powerpc/include/asm/cputime.h
··· 150 150 return ct; 151 151 } 152 152 153 + #define usecs_to_cputime64(us) usecs_to_cputime(us) 154 + 153 155 /* 154 156 * Convert cputime <-> seconds 155 157 */
-33
arch/powerpc/include/asm/kvm_book3s.h
··· 381 381 } 382 382 #endif 383 383 384 - static inline unsigned long compute_tlbie_rb(unsigned long v, unsigned long r, 385 - unsigned long pte_index) 386 - { 387 - unsigned long rb, va_low; 388 - 389 - rb = (v & ~0x7fUL) << 16; /* AVA field */ 390 - va_low = pte_index >> 3; 391 - if (v & HPTE_V_SECONDARY) 392 - va_low = ~va_low; 393 - /* xor vsid from AVA */ 394 - if (!(v & HPTE_V_1TB_SEG)) 395 - va_low ^= v >> 12; 396 - else 397 - va_low ^= v >> 24; 398 - va_low &= 0x7ff; 399 - if (v & HPTE_V_LARGE) { 400 - rb |= 1; /* L field */ 401 - if (cpu_has_feature(CPU_FTR_ARCH_206) && 402 - (r & 0xff000)) { 403 - /* non-16MB large page, must be 64k */ 404 - /* (masks depend on page size) */ 405 - rb |= 0x1000; /* page encoding in LP field */ 406 - rb |= (va_low & 0x7f) << 16; /* 7b of VA in AVA/LP field */ 407 - rb |= (va_low & 0xfe); /* AVAL field (P7 doesn't seem to care) */ 408 - } 409 - } else { 410 - /* 4kB page */ 411 - rb |= (va_low & 0x7ff) << 12; /* remaining 11b of VA */ 412 - } 413 - rb |= (v >> 54) & 0x300; /* B field */ 414 - return rb; 415 - } 416 - 417 384 /* Magic register values loaded into r3 and r4 before the 'sc' assembly 418 385 * instruction for the OSI hypercalls */ 419 386 #define OSI_SC_MAGIC_R3 0x113724FA
+33
arch/powerpc/include/asm/kvm_book3s_64.h
··· 29 29 30 30 #define SPAPR_TCE_SHIFT 12 31 31 32 + static inline unsigned long compute_tlbie_rb(unsigned long v, unsigned long r, 33 + unsigned long pte_index) 34 + { 35 + unsigned long rb, va_low; 36 + 37 + rb = (v & ~0x7fUL) << 16; /* AVA field */ 38 + va_low = pte_index >> 3; 39 + if (v & HPTE_V_SECONDARY) 40 + va_low = ~va_low; 41 + /* xor vsid from AVA */ 42 + if (!(v & HPTE_V_1TB_SEG)) 43 + va_low ^= v >> 12; 44 + else 45 + va_low ^= v >> 24; 46 + va_low &= 0x7ff; 47 + if (v & HPTE_V_LARGE) { 48 + rb |= 1; /* L field */ 49 + if (cpu_has_feature(CPU_FTR_ARCH_206) && 50 + (r & 0xff000)) { 51 + /* non-16MB large page, must be 64k */ 52 + /* (masks depend on page size) */ 53 + rb |= 0x1000; /* page encoding in LP field */ 54 + rb |= (va_low & 0x7f) << 16; /* 7b of VA in AVA/LP field */ 55 + rb |= (va_low & 0xfe); /* AVAL field (P7 doesn't seem to care) */ 56 + } 57 + } else { 58 + /* 4kB page */ 59 + rb |= (va_low & 0x7ff) << 12; /* remaining 11b of VA */ 60 + } 61 + rb |= (v >> 54) & 0x300; /* B field */ 62 + return rb; 63 + } 64 + 32 65 #endif /* __ASM_KVM_BOOK3S_64_H__ */
+1 -1
arch/powerpc/kvm/book3s_hv.c
··· 538 538 tpaca->kvm_hstate.napping = 0; 539 539 vcpu->cpu = vc->pcpu; 540 540 smp_wmb(); 541 - #ifdef CONFIG_PPC_ICP_NATIVE 541 + #if defined(CONFIG_PPC_ICP_NATIVE) && defined(CONFIG_SMP) 542 542 if (vcpu->arch.ptid) { 543 543 tpaca->cpu_start = 0x80; 544 544 wmb();
+2
arch/powerpc/kvm/book3s_pr.c
··· 658 658 ulong cmd = kvmppc_get_gpr(vcpu, 3); 659 659 int i; 660 660 661 + #ifdef CONFIG_KVM_BOOK3S_64_PR 661 662 if (kvmppc_h_pr(vcpu, cmd) == EMULATE_DONE) { 662 663 r = RESUME_GUEST; 663 664 break; 664 665 } 666 + #endif 665 667 666 668 run->papr_hcall.nr = cmd; 667 669 for (i = 0; i < 9; ++i) {
+1
arch/powerpc/kvm/e500.c
··· 15 15 #include <linux/kvm_host.h> 16 16 #include <linux/slab.h> 17 17 #include <linux/err.h> 18 + #include <linux/export.h> 18 19 19 20 #include <asm/reg.h> 20 21 #include <asm/cputable.h>
+2
arch/s390/include/asm/cputime.h
··· 87 87 return (cputime_t) m * 4096; 88 88 } 89 89 90 + #define usecs_to_cputime64(m) usecs_to_cputime(m) 91 + 90 92 /* 91 93 * Convert cputime to milliseconds and back. 92 94 */
+2 -2
arch/sh/oprofile/common.c
··· 49 49 return oprofile_perf_init(ops); 50 50 } 51 51 52 - void __exit oprofile_arch_exit(void) 52 + void oprofile_arch_exit(void) 53 53 { 54 54 oprofile_perf_exit(); 55 55 kfree(sh_pmu_op_name); ··· 60 60 ops->backtrace = sh_backtrace; 61 61 return -ENODEV; 62 62 } 63 - void __exit oprofile_arch_exit(void) {} 63 + void oprofile_arch_exit(void) {} 64 64 #endif /* CONFIG_HW_PERF_EVENTS */
+1 -1
arch/x86/kernel/cpu/perf_event_intel.c
··· 1169 1169 */ 1170 1170 c = &unconstrained; 1171 1171 } else if (intel_try_alt_er(event, orig_idx)) { 1172 - raw_spin_unlock(&era->lock); 1172 + raw_spin_unlock_irqrestore(&era->lock, flags); 1173 1173 goto again; 1174 1174 } 1175 1175 raw_spin_unlock_irqrestore(&era->lock, flags);
+7 -3
arch/x86/kvm/i8254.c
··· 338 338 return HRTIMER_NORESTART; 339 339 } 340 340 341 - static void create_pit_timer(struct kvm_kpit_state *ps, u32 val, int is_period) 341 + static void create_pit_timer(struct kvm *kvm, u32 val, int is_period) 342 342 { 343 + struct kvm_kpit_state *ps = &kvm->arch.vpit->pit_state; 343 344 struct kvm_timer *pt = &ps->pit_timer; 344 345 s64 interval; 346 + 347 + if (!irqchip_in_kernel(kvm)) 348 + return; 345 349 346 350 interval = muldiv64(val, NSEC_PER_SEC, KVM_PIT_FREQ); 347 351 ··· 398 394 /* FIXME: enhance mode 4 precision */ 399 395 case 4: 400 396 if (!(ps->flags & KVM_PIT_FLAGS_HPET_LEGACY)) { 401 - create_pit_timer(ps, val, 0); 397 + create_pit_timer(kvm, val, 0); 402 398 } 403 399 break; 404 400 case 2: 405 401 case 3: 406 402 if (!(ps->flags & KVM_PIT_FLAGS_HPET_LEGACY)){ 407 - create_pit_timer(ps, val, 1); 403 + create_pit_timer(kvm, val, 1); 408 404 } 409 405 break; 410 406 default:
+9 -10
arch/x86/kvm/x86.c
··· 602 602 { 603 603 struct kvm_cpuid_entry2 *best; 604 604 struct kvm_lapic *apic = vcpu->arch.apic; 605 - u32 timer_mode_mask; 606 605 607 606 best = kvm_find_cpuid_entry(vcpu, 1, 0); 608 607 if (!best) ··· 614 615 best->ecx |= bit(X86_FEATURE_OSXSAVE); 615 616 } 616 617 617 - if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && 618 - best->function == 0x1) { 619 - best->ecx |= bit(X86_FEATURE_TSC_DEADLINE_TIMER); 620 - timer_mode_mask = 3 << 17; 621 - } else 622 - timer_mode_mask = 1 << 17; 623 - 624 - if (apic) 625 - apic->lapic_timer.timer_mode_mask = timer_mode_mask; 618 + if (apic) { 619 + if (best->ecx & bit(X86_FEATURE_TSC_DEADLINE_TIMER)) 620 + apic->lapic_timer.timer_mode_mask = 3 << 17; 621 + else 622 + apic->lapic_timer.timer_mode_mask = 1 << 17; 623 + } 626 624 } 627 625 628 626 int kvm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4) ··· 2130 2134 break; 2131 2135 case KVM_CAP_TSC_CONTROL: 2132 2136 r = kvm_has_tsc_control; 2137 + break; 2138 + case KVM_CAP_TSC_DEADLINE_TIMER: 2139 + r = boot_cpu_has(X86_FEATURE_TSC_DEADLINE_TIMER); 2133 2140 break; 2134 2141 default: 2135 2142 r = 0;
+1 -1
block/blk-map.c
··· 311 311 if (IS_ERR(bio)) 312 312 return PTR_ERR(bio); 313 313 314 - if (rq_data_dir(rq) == WRITE) 314 + if (!reading) 315 315 bio->bi_rw |= REQ_WRITE; 316 316 317 317 if (do_copy)
+2 -11
block/blk-tag.c
··· 282 282 void blk_queue_end_tag(struct request_queue *q, struct request *rq) 283 283 { 284 284 struct blk_queue_tag *bqt = q->queue_tags; 285 - int tag = rq->tag; 285 + unsigned tag = rq->tag; /* negative tags invalid */ 286 286 287 - BUG_ON(tag == -1); 288 - 289 - if (unlikely(tag >= bqt->max_depth)) { 290 - /* 291 - * This can happen after tag depth has been reduced. 292 - * But tag shouldn't be larger than real_max_depth. 293 - */ 294 - WARN_ON(tag >= bqt->real_max_depth); 295 - return; 296 - } 287 + BUG_ON(tag >= bqt->real_max_depth); 297 288 298 289 list_del_init(&rq->queuelist); 299 290 rq->cmd_flags &= ~REQ_QUEUED;
+12
block/cfq-iosched.c
··· 1655 1655 struct request *next) 1656 1656 { 1657 1657 struct cfq_queue *cfqq = RQ_CFQQ(rq); 1658 + struct cfq_data *cfqd = q->elevator->elevator_data; 1659 + 1658 1660 /* 1659 1661 * reposition in fifo if next is older than rq 1660 1662 */ ··· 1671 1669 cfq_remove_request(next); 1672 1670 cfq_blkiocg_update_io_merged_stats(&(RQ_CFQG(rq))->blkg, 1673 1671 rq_data_dir(next), rq_is_sync(next)); 1672 + 1673 + cfqq = RQ_CFQQ(next); 1674 + /* 1675 + * all requests of this queue are merged to other queues, delete it 1676 + * from the service tree. If it's the active_queue, 1677 + * cfq_dispatch_requests() will choose to expire it or do idle 1678 + */ 1679 + if (cfq_cfqq_on_rr(cfqq) && RB_EMPTY_ROOT(&cfqq->sort_list) && 1680 + cfqq != cfqd->active_queue) 1681 + cfq_del_cfqq_rr(cfqd, cfqq); 1674 1682 } 1675 1683 1676 1684 static int cfq_allow_merge(struct request_queue *q, struct request *rq,
+2 -2
drivers/dma/Kconfig
··· 124 124 125 125 config MX3_IPU 126 126 bool "MX3x Image Processing Unit support" 127 - depends on ARCH_MX3 127 + depends on SOC_IMX31 || SOC_IMX35 128 128 select DMA_ENGINE 129 129 default y 130 130 help ··· 216 216 217 217 config IMX_SDMA 218 218 tristate "i.MX SDMA support" 219 - depends on ARCH_MX25 || ARCH_MX3 || ARCH_MX5 219 + depends on ARCH_MX25 || SOC_IMX31 || SOC_IMX35 || ARCH_MX5 220 220 select DMA_ENGINE 221 221 help 222 222 Support the i.MX SDMA engine. This engine is integrated into
+2 -2
drivers/gpu/drm/i915/i915_gem_execbuffer.c
··· 756 756 if (i915_semaphores >= 0) 757 757 return i915_semaphores; 758 758 759 - /* Enable semaphores on SNB when IO remapping is off */ 759 + /* Disable semaphores on SNB */ 760 760 if (INTEL_INFO(dev)->gen == 6) 761 - return !intel_iommu_enabled; 761 + return 0; 762 762 763 763 return 1; 764 764 }
+3 -5
drivers/gpu/drm/i915/intel_display.c
··· 7922 7922 return 0; 7923 7923 7924 7924 /* 7925 - * Enable rc6 on Sandybridge if DMA remapping is disabled 7925 + * Disable rc6 on Sandybridge 7926 7926 */ 7927 7927 if (INTEL_INFO(dev)->gen == 6) { 7928 - DRM_DEBUG_DRIVER("Sandybridge: intel_iommu_enabled %s -- RC6 %sabled\n", 7929 - intel_iommu_enabled ? "true" : "false", 7930 - !intel_iommu_enabled ? "en" : "dis"); 7931 - return !intel_iommu_enabled; 7928 + DRM_DEBUG_DRIVER("Sandybridge: RC6 disabled\n"); 7929 + return 0; 7932 7930 } 7933 7931 DRM_DEBUG_DRIVER("RC6 enabled\n"); 7934 7932 return 1;
+12
drivers/gpu/drm/radeon/evergreen.c
··· 3276 3276 rdev->accel_working = false; 3277 3277 } 3278 3278 } 3279 + 3280 + /* Don't start up if the MC ucode is missing on BTC parts. 3281 + * The default clocks and voltages before the MC ucode 3282 + * is loaded are not suffient for advanced operations. 3283 + */ 3284 + if (ASIC_IS_DCE5(rdev)) { 3285 + if (!rdev->mc_fw && !(rdev->flags & RADEON_IS_IGP)) { 3286 + DRM_ERROR("radeon: MC ucode required for NI+.\n"); 3287 + return -EINVAL; 3288 + } 3289 + } 3290 + 3279 3291 return 0; 3280 3292 } 3281 3293
+5 -1
drivers/gpu/drm/radeon/radeon_atombios.c
··· 2560 2560 2561 2561 rdev->pm.current_power_state_index = rdev->pm.default_power_state_index; 2562 2562 rdev->pm.current_clock_mode_index = 0; 2563 - rdev->pm.current_vddc = rdev->pm.power_state[rdev->pm.default_power_state_index].clock_info[0].voltage.voltage; 2563 + if (rdev->pm.default_power_state_index >= 0) 2564 + rdev->pm.current_vddc = 2565 + rdev->pm.power_state[rdev->pm.default_power_state_index].clock_info[0].voltage.voltage; 2566 + else 2567 + rdev->pm.current_vddc = 0; 2564 2568 } 2565 2569 2566 2570 void radeon_atom_set_clock_gating(struct radeon_device *rdev, int enable)
+3 -3
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
··· 1093 1093 struct vmw_surface *surface = NULL; 1094 1094 struct vmw_dma_buffer *bo = NULL; 1095 1095 struct ttm_base_object *user_obj; 1096 - u64 required_size; 1097 1096 int ret; 1098 1097 1099 1098 /** ··· 1101 1102 * requested framebuffer. 1102 1103 */ 1103 1104 1104 - required_size = mode_cmd->pitch * mode_cmd->height; 1105 - if (unlikely(required_size > (u64) dev_priv->vram_size)) { 1105 + if (!vmw_kms_validate_mode_vram(dev_priv, 1106 + mode_cmd->pitch, 1107 + mode_cmd->height)) { 1106 1108 DRM_ERROR("VRAM size is too small for requested mode.\n"); 1107 1109 return ERR_PTR(-ENOMEM); 1108 1110 }
+4 -4
drivers/input/mouse/sentelic.c
··· 2 2 * Finger Sensing Pad PS/2 mouse driver. 3 3 * 4 4 * Copyright (C) 2005-2007 Asia Vital Components Co., Ltd. 5 - * Copyright (C) 2005-2010 Tai-hwa Liang, Sentelic Corporation. 5 + * Copyright (C) 2005-2011 Tai-hwa Liang, Sentelic Corporation. 6 6 * 7 7 * This program is free software; you can redistribute it and/or 8 8 * modify it under the terms of the GNU General Public License ··· 162 162 ps2_sendbyte(ps2dev, v, FSP_CMD_TIMEOUT2); 163 163 164 164 if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0) 165 - return -1; 165 + goto out; 166 166 167 167 if ((v = fsp_test_invert_cmd(reg_val)) != reg_val) { 168 168 /* inversion is required */ ··· 261 261 ps2_sendbyte(ps2dev, 0x88, FSP_CMD_TIMEOUT2); 262 262 263 263 if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0) 264 - return -1; 264 + goto out; 265 265 266 266 if ((v = fsp_test_invert_cmd(reg_val)) != reg_val) { 267 267 ps2_sendbyte(ps2dev, 0x47, FSP_CMD_TIMEOUT2); ··· 309 309 }; 310 310 int val; 311 311 312 - if (fsp_reg_read(psmouse, FSP_REG_TMOD_STATUS1, &val) == -1) 312 + if (fsp_reg_read(psmouse, FSP_REG_TMOD_STATUS, &val) == -1) 313 313 return -EIO; 314 314 315 315 *btn = buttons[(val & 0x30) >> 4];
+2 -1
drivers/input/mouse/sentelic.h
··· 2 2 * Finger Sensing Pad PS/2 mouse driver. 3 3 * 4 4 * Copyright (C) 2005-2007 Asia Vital Components Co., Ltd. 5 - * Copyright (C) 2005-2009 Tai-hwa Liang, Sentelic Corporation. 5 + * Copyright (C) 2005-2011 Tai-hwa Liang, Sentelic Corporation. 6 6 * 7 7 * This program is free software; you can redistribute it and/or 8 8 * modify it under the terms of the GNU General Public License ··· 33 33 /* Finger-sensing Pad control registers */ 34 34 #define FSP_REG_SYSCTL1 0x10 35 35 #define FSP_BIT_EN_REG_CLK BIT(5) 36 + #define FSP_REG_TMOD_STATUS 0x20 36 37 #define FSP_REG_OPC_QDOWN 0x31 37 38 #define FSP_BIT_EN_OPC_TAG BIT(7) 38 39 #define FSP_REG_OPTZ_XLO 0x34
+1 -1
drivers/iommu/iommu.c
··· 90 90 if (bus == NULL || bus->iommu_ops == NULL) 91 91 return NULL; 92 92 93 - domain = kmalloc(sizeof(*domain), GFP_KERNEL); 93 + domain = kzalloc(sizeof(*domain), GFP_KERNEL); 94 94 if (!domain) 95 95 return NULL; 96 96
+1 -1
drivers/media/video/gspca/gspca.c
··· 983 983 ret = -EIO; 984 984 goto out; 985 985 } 986 - alt = ep_tb[--alt_idx].alt; 986 + gspca_dev->alt = ep_tb[--alt_idx].alt; 987 987 } 988 988 } 989 989 out:
+10 -4
drivers/mmc/host/mmci.c
··· 675 675 unsigned int status) 676 676 { 677 677 /* First check for errors */ 678 - if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_TXUNDERRUN|MCI_RXOVERRUN)) { 678 + if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_STARTBITERR| 679 + MCI_TXUNDERRUN|MCI_RXOVERRUN)) { 679 680 u32 remain, success; 680 681 681 682 /* Terminate the DMA transfer */ ··· 755 754 } 756 755 757 756 if (!cmd->data || cmd->error) { 758 - if (host->data) 757 + if (host->data) { 758 + /* Terminate the DMA transfer */ 759 + if (dma_inprogress(host)) 760 + mmci_dma_data_error(host); 759 761 mmci_stop_data(host); 762 + } 760 763 mmci_request_end(host, cmd->mrq); 761 764 } else if (!(cmd->data->flags & MMC_DATA_READ)) { 762 765 mmci_start_data(host, cmd->data); ··· 960 955 dev_dbg(mmc_dev(host->mmc), "irq0 (data+cmd) %08x\n", status); 961 956 962 957 data = host->data; 963 - if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_TXUNDERRUN| 964 - MCI_RXOVERRUN|MCI_DATAEND|MCI_DATABLOCKEND) && data) 958 + if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_STARTBITERR| 959 + MCI_TXUNDERRUN|MCI_RXOVERRUN|MCI_DATAEND| 960 + MCI_DATABLOCKEND) && data) 965 961 mmci_data_irq(host, data, status); 966 962 967 963 cmd = host->cmd;
+2 -2
drivers/net/ethernet/freescale/Kconfig
··· 23 23 config FEC 24 24 bool "FEC ethernet controller (of ColdFire and some i.MX CPUs)" 25 25 depends on (M523x || M527x || M5272 || M528x || M520x || M532x || \ 26 - ARCH_MXC || ARCH_MXS) 27 - default ARCH_MXC || ARCH_MXS if ARM 26 + ARCH_MXC || SOC_IMX28) 27 + default ARCH_MXC || SOC_IMX28 if ARM 28 28 select PHYLIB 29 29 ---help--- 30 30 Say Y here if you want to use the built-in 10/100 Fast ethernet
+3
drivers/net/ethernet/marvell/skge.c
··· 2606 2606 spin_unlock_irq(&hw->hw_lock); 2607 2607 2608 2608 napi_enable(&skge->napi); 2609 + 2610 + skge_set_multicast(dev); 2611 + 2609 2612 return 0; 2610 2613 2611 2614 free_tx_ring:
+1
drivers/net/ethernet/mellanox/mlx4/en_cq.c
··· 147 147 mlx4_free_hwq_res(mdev->dev, &cq->wqres, cq->buf_size); 148 148 if (priv->mdev->dev->caps.comp_pool && cq->vector) 149 149 mlx4_release_eq(priv->mdev->dev, cq->vector); 150 + cq->vector = 0; 150 151 cq->buf_size = 0; 151 152 cq->buf = NULL; 152 153 }
+3
drivers/net/wireless/ath/ath9k/main.c
··· 1843 1843 struct ath_softc *sc = hw->priv; 1844 1844 struct ath_node *an = (struct ath_node *) sta->drv_priv; 1845 1845 1846 + if (!(sc->sc_flags & SC_OP_TXAGGR)) 1847 + return; 1848 + 1846 1849 switch (cmd) { 1847 1850 case STA_NOTIFY_SLEEP: 1848 1851 an->sleeping = true;
+13 -3
drivers/net/wireless/b43/pio.c
··· 617 617 const char *err_msg = NULL; 618 618 struct b43_rxhdr_fw4 *rxhdr = 619 619 (struct b43_rxhdr_fw4 *)wl->pio_scratchspace; 620 + size_t rxhdr_size = sizeof(*rxhdr); 620 621 621 622 BUILD_BUG_ON(sizeof(wl->pio_scratchspace) < sizeof(*rxhdr)); 622 - memset(rxhdr, 0, sizeof(*rxhdr)); 623 + switch (dev->fw.hdr_format) { 624 + case B43_FW_HDR_410: 625 + case B43_FW_HDR_351: 626 + rxhdr_size -= sizeof(rxhdr->format_598) - 627 + sizeof(rxhdr->format_351); 628 + break; 629 + case B43_FW_HDR_598: 630 + break; 631 + } 632 + memset(rxhdr, 0, rxhdr_size); 623 633 624 634 /* Check if we have data and wait for it to get ready. */ 625 635 if (q->rev >= 8) { ··· 667 657 668 658 /* Get the preamble (RX header) */ 669 659 if (q->rev >= 8) { 670 - b43_block_read(dev, rxhdr, sizeof(*rxhdr), 660 + b43_block_read(dev, rxhdr, rxhdr_size, 671 661 q->mmio_base + B43_PIO8_RXDATA, 672 662 sizeof(u32)); 673 663 } else { 674 - b43_block_read(dev, rxhdr, sizeof(*rxhdr), 664 + b43_block_read(dev, rxhdr, rxhdr_size, 675 665 q->mmio_base + B43_PIO_RXDATA, 676 666 sizeof(u16)); 677 667 }
+6 -1
drivers/net/wireless/mwifiex/sta_ioctl.c
··· 55 55 { 56 56 bool cancel_flag = false; 57 57 int status = adapter->cmd_wait_q.status; 58 - struct cmd_ctrl_node *cmd_queued = adapter->cmd_queued; 58 + struct cmd_ctrl_node *cmd_queued; 59 59 60 + if (!adapter->cmd_queued) 61 + return 0; 62 + 63 + cmd_queued = adapter->cmd_queued; 60 64 adapter->cmd_queued = NULL; 65 + 61 66 dev_dbg(adapter->dev, "cmd pending\n"); 62 67 atomic_inc(&adapter->cmd_pending); 63 68
+1 -1
drivers/of/platform.c
··· 314 314 if (!lookup) 315 315 return NULL; 316 316 317 - for(; lookup->name != NULL; lookup++) { 317 + for(; lookup->compatible != NULL; lookup++) { 318 318 if (!of_device_is_compatible(np, lookup->compatible)) 319 319 continue; 320 320 if (of_address_to_resource(np, 0, &res))
+10 -40
drivers/rtc/interface.c
··· 73 73 err = -EINVAL; 74 74 75 75 mutex_unlock(&rtc->ops_lock); 76 - /* A timer might have just expired */ 77 - schedule_work(&rtc->irqwork); 78 76 return err; 79 77 } 80 78 EXPORT_SYMBOL_GPL(rtc_set_time); ··· 112 114 err = -EINVAL; 113 115 114 116 mutex_unlock(&rtc->ops_lock); 115 - /* A timer might have just expired */ 116 - schedule_work(&rtc->irqwork); 117 117 118 118 return err; 119 119 } ··· 319 323 } 320 324 EXPORT_SYMBOL_GPL(rtc_read_alarm); 321 325 322 - static int ___rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) 323 - { 324 - int err; 325 - 326 - if (!rtc->ops) 327 - err = -ENODEV; 328 - else if (!rtc->ops->set_alarm) 329 - err = -EINVAL; 330 - else 331 - err = rtc->ops->set_alarm(rtc->dev.parent, alarm); 332 - 333 - return err; 334 - } 335 - 336 326 static int __rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) 337 327 { 338 328 struct rtc_time tm; ··· 342 360 * over right here, before we set the alarm. 343 361 */ 344 362 345 - return ___rtc_set_alarm(rtc, alarm); 363 + if (!rtc->ops) 364 + err = -ENODEV; 365 + else if (!rtc->ops->set_alarm) 366 + err = -EINVAL; 367 + else 368 + err = rtc->ops->set_alarm(rtc->dev.parent, alarm); 369 + 370 + return err; 346 371 } 347 372 348 373 int rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) ··· 396 407 timerqueue_add(&rtc->timerqueue, &rtc->aie_timer.node); 397 408 } 398 409 mutex_unlock(&rtc->ops_lock); 399 - /* maybe that was in the past.*/ 400 - schedule_work(&rtc->irqwork); 401 410 return err; 402 411 } 403 412 EXPORT_SYMBOL_GPL(rtc_initialize_alarm); ··· 763 776 return 0; 764 777 } 765 778 766 - static void rtc_alarm_disable(struct rtc_device *rtc) 767 - { 768 - struct rtc_wkalrm alarm; 769 - struct rtc_time tm; 770 - 771 - __rtc_read_time(rtc, &tm); 772 - 773 - alarm.time = rtc_ktime_to_tm(ktime_add(rtc_tm_to_ktime(tm), 774 - ktime_set(300, 0))); 775 - alarm.enabled = 0; 776 - 777 - ___rtc_set_alarm(rtc, &alarm); 778 - } 779 - 780 779 /** 781 780 * rtc_timer_remove - Removes a rtc_timer from the rtc_device timerqueue 782 781 * @rtc rtc device ··· 784 811 struct rtc_wkalrm alarm; 785 812 int err; 786 813 next = timerqueue_getnext(&rtc->timerqueue); 787 - if (!next) { 788 - rtc_alarm_disable(rtc); 814 + if (!next) 789 815 return; 790 - } 791 816 alarm.time = rtc_ktime_to_tm(next->expires); 792 817 alarm.enabled = 1; 793 818 err = __rtc_set_alarm(rtc, &alarm); ··· 847 876 err = __rtc_set_alarm(rtc, &alarm); 848 877 if (err == -ETIME) 849 878 goto again; 850 - } else 851 - rtc_alarm_disable(rtc); 879 + } 852 880 853 881 mutex_unlock(&rtc->ops_lock); 854 882 }
+4 -2
drivers/watchdog/coh901327_wdt.c
··· 76 76 static void __iomem *virtbase; 77 77 static unsigned long coh901327_users; 78 78 static unsigned long boot_status; 79 - static u16 wdogenablestore; 80 - static u16 irqmaskstore; 81 79 static struct device *parent; 82 80 83 81 /* ··· 459 461 } 460 462 461 463 #ifdef CONFIG_PM 464 + 465 + static u16 wdogenablestore; 466 + static u16 irqmaskstore; 467 + 462 468 static int coh901327_suspend(struct platform_device *pdev, pm_message_t state) 463 469 { 464 470 irqmaskstore = readw(virtbase + U300_WDOG_IMR) & 0x0001U;
+4 -1
drivers/watchdog/hpwdt.c
··· 231 231 232 232 cmn_regs.u1.reax = CRU_BIOS_SIGNATURE_VALUE; 233 233 234 + set_memory_x((unsigned long)bios32_entrypoint, (2 * PAGE_SIZE)); 234 235 asminline_call(&cmn_regs, bios32_entrypoint); 235 236 236 237 if (cmn_regs.u1.ral != 0) { ··· 249 248 if ((physical_bios_base + physical_bios_offset)) { 250 249 cru_rom_addr = 251 250 ioremap(cru_physical_address, cru_length); 252 - if (cru_rom_addr) 251 + if (cru_rom_addr) { 252 + set_memory_x((unsigned long)cru_rom_addr, cru_length); 253 253 retval = 0; 254 + } 254 255 } 255 256 256 257 printk(KERN_DEBUG "hpwdt: CRU Base Address: 0x%lx\n",
+3 -3
drivers/watchdog/iTCO_wdt.c
··· 384 384 "Watchdog cannot be stopped once started (default=" 385 385 __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); 386 386 387 - static int turn_SMI_watchdog_clear_off = 0; 387 + static int turn_SMI_watchdog_clear_off = 1; 388 388 module_param(turn_SMI_watchdog_clear_off, int, 0); 389 389 MODULE_PARM_DESC(turn_SMI_watchdog_clear_off, 390 - "Turn off SMI clearing watchdog (default=0)"); 390 + "Turn off SMI clearing watchdog (depends on TCO-version)(default=1)"); 391 391 392 392 /* 393 393 * Some TCO specific functions ··· 813 813 ret = -EIO; 814 814 goto out_unmap; 815 815 } 816 - if (turn_SMI_watchdog_clear_off) { 816 + if (turn_SMI_watchdog_clear_off >= iTCO_wdt_private.iTCO_version) { 817 817 /* Bit 13: TCO_EN -> 0 = Disables TCO logic generating an SMI# */ 818 818 val32 = inl(SMI_EN); 819 819 val32 &= 0xffffdfff; /* Turn off SMI clearing watchdog */
+1 -1
drivers/watchdog/sp805_wdt.c
··· 351 351 return 0; 352 352 } 353 353 354 - static struct amba_id sp805_wdt_ids[] __initdata = { 354 + static struct amba_id sp805_wdt_ids[] = { 355 355 { 356 356 .id = 0x00141805, 357 357 .mask = 0x00ffffff,
+3 -26
fs/ceph/dir.c
··· 1094 1094 /* 1095 1095 * Set/clear/test dir complete flag on the dir's dentry. 1096 1096 */ 1097 - static struct dentry * __d_find_any_alias(struct inode *inode) 1098 - { 1099 - struct dentry *alias; 1100 - 1101 - if (list_empty(&inode->i_dentry)) 1102 - return NULL; 1103 - alias = list_first_entry(&inode->i_dentry, struct dentry, d_alias); 1104 - return alias; 1105 - } 1106 - 1107 1097 void ceph_dir_set_complete(struct inode *inode) 1108 1098 { 1109 - struct dentry *dentry = __d_find_any_alias(inode); 1110 - 1111 - if (dentry && ceph_dentry(dentry)) { 1112 - dout(" marking %p (%p) complete\n", inode, dentry); 1113 - set_bit(CEPH_D_COMPLETE, &ceph_dentry(dentry)->flags); 1114 - } 1099 + /* not yet implemented */ 1115 1100 } 1116 1101 1117 1102 void ceph_dir_clear_complete(struct inode *inode) 1118 1103 { 1119 - struct dentry *dentry = __d_find_any_alias(inode); 1120 - 1121 - if (dentry && ceph_dentry(dentry)) { 1122 - dout(" marking %p (%p) NOT complete\n", inode, dentry); 1123 - clear_bit(CEPH_D_COMPLETE, &ceph_dentry(dentry)->flags); 1124 - } 1104 + /* not yet implemented */ 1125 1105 } 1126 1106 1127 1107 bool ceph_dir_test_complete(struct inode *inode) 1128 1108 { 1129 - struct dentry *dentry = __d_find_any_alias(inode); 1130 - 1131 - if (dentry && ceph_dentry(dentry)) 1132 - return test_bit(CEPH_D_COMPLETE, &ceph_dentry(dentry)->flags); 1109 + /* not yet implemented */ 1133 1110 return false; 1134 1111 } 1135 1112
+2 -2
fs/cifs/connect.c
··· 282 282 byte_count = be32_to_cpu(pTargetSMB->smb_buf_length); 283 283 byte_count += total_in_buf2; 284 284 /* don't allow buffer to overflow */ 285 - if (byte_count > CIFSMaxBufSize) 285 + if (byte_count > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE - 4) 286 286 return -ENOBUFS; 287 287 pTargetSMB->smb_buf_length = cpu_to_be32(byte_count); 288 288 ··· 2122 2122 warned_on_ntlm = true; 2123 2123 cERROR(1, "default security mechanism requested. The default " 2124 2124 "security mechanism will be upgraded from ntlm to " 2125 - "ntlmv2 in kernel release 3.2"); 2125 + "ntlmv2 in kernel release 3.3"); 2126 2126 } 2127 2127 ses->overrideSecFlg = volume_info->secFlg; 2128 2128
+3 -8
fs/locks.c
··· 1205 1205 int want_write = (mode & O_ACCMODE) != O_RDONLY; 1206 1206 1207 1207 new_fl = lease_alloc(NULL, want_write ? F_WRLCK : F_RDLCK); 1208 + if (IS_ERR(new_fl)) 1209 + return PTR_ERR(new_fl); 1208 1210 1209 1211 lock_flocks(); 1210 1212 ··· 1222 1220 for (fl = flock; fl && IS_LEASE(fl); fl = fl->fl_next) 1223 1221 if (fl->fl_owner == current->files) 1224 1222 i_have_this_lease = 1; 1225 - 1226 - if (IS_ERR(new_fl) && !i_have_this_lease 1227 - && ((mode & O_NONBLOCK) == 0)) { 1228 - error = PTR_ERR(new_fl); 1229 - goto out; 1230 - } 1231 1223 1232 1224 break_time = 0; 1233 1225 if (lease_break_time > 0) { ··· 1280 1284 1281 1285 out: 1282 1286 unlock_flocks(); 1283 - if (!IS_ERR(new_fl)) 1284 - locks_free_lock(new_fl); 1287 + locks_free_lock(new_fl); 1285 1288 return error; 1286 1289 } 1287 1290
+17 -17
fs/minix/inode.c
··· 263 263 goto out_no_root; 264 264 } 265 265 266 - ret = -ENOMEM; 267 - s->s_root = d_alloc_root(root_inode); 268 - if (!s->s_root) 269 - goto out_iput; 270 - 271 - if (!(s->s_flags & MS_RDONLY)) { 272 - if (sbi->s_version != MINIX_V3) /* s_state is now out from V3 sb */ 273 - ms->s_state &= ~MINIX_VALID_FS; 274 - mark_buffer_dirty(bh); 275 - } 276 - if (!(sbi->s_mount_state & MINIX_VALID_FS)) 277 - printk("MINIX-fs: mounting unchecked file system, " 278 - "running fsck is recommended\n"); 279 - else if (sbi->s_mount_state & MINIX_ERROR_FS) 280 - printk("MINIX-fs: mounting file system with errors, " 281 - "running fsck is recommended\n"); 282 - 283 266 /* Apparently minix can create filesystems that allocate more blocks for 284 267 * the bitmaps than needed. We simply ignore that, but verify it didn't 285 268 * create one with not enough blocks and bail out if so. ··· 282 299 "zmap blocks allocated. Refusing to mount.\n"); 283 300 goto out_iput; 284 301 } 302 + 303 + ret = -ENOMEM; 304 + s->s_root = d_alloc_root(root_inode); 305 + if (!s->s_root) 306 + goto out_iput; 307 + 308 + if (!(s->s_flags & MS_RDONLY)) { 309 + if (sbi->s_version != MINIX_V3) /* s_state is now out from V3 sb */ 310 + ms->s_state &= ~MINIX_VALID_FS; 311 + mark_buffer_dirty(bh); 312 + } 313 + if (!(sbi->s_mount_state & MINIX_VALID_FS)) 314 + printk("MINIX-fs: mounting unchecked file system, " 315 + "running fsck is recommended\n"); 316 + else if (sbi->s_mount_state & MINIX_ERROR_FS) 317 + printk("MINIX-fs: mounting file system with errors, " 318 + "running fsck is recommended\n"); 285 319 286 320 return 0; 287 321
+2 -2
fs/proc/stat.c
··· 32 32 idle = kstat_cpu(cpu).cpustat.idle; 33 33 idle = cputime64_add(idle, arch_idle_time(cpu)); 34 34 } else 35 - idle = nsecs_to_jiffies64(1000 * idle_time); 35 + idle = usecs_to_cputime64(idle_time); 36 36 37 37 return idle; 38 38 } ··· 46 46 /* !NO_HZ so we can rely on cpustat.iowait */ 47 47 iowait = kstat_cpu(cpu).cpustat.iowait; 48 48 else 49 - iowait = nsecs_to_jiffies64(1000 * iowait_time); 49 + iowait = usecs_to_cputime64(iowait_time); 50 50 51 51 return iowait; 52 52 }
+5 -25
fs/xfs/xfs_super.c
··· 869 869 } 870 870 871 871 STATIC int 872 - xfs_log_inode( 873 - struct xfs_inode *ip) 874 - { 875 - struct xfs_mount *mp = ip->i_mount; 876 - struct xfs_trans *tp; 877 - int error; 878 - 879 - tp = xfs_trans_alloc(mp, XFS_TRANS_FSYNC_TS); 880 - error = xfs_trans_reserve(tp, 0, XFS_FSYNC_TS_LOG_RES(mp), 0, 0, 0); 881 - if (error) { 882 - xfs_trans_cancel(tp, 0); 883 - return error; 884 - } 885 - 886 - xfs_ilock(ip, XFS_ILOCK_EXCL); 887 - xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); 888 - xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); 889 - return xfs_trans_commit(tp, 0); 890 - } 891 - 892 - STATIC int 893 872 xfs_fs_write_inode( 894 873 struct inode *inode, 895 874 struct writeback_control *wbc) ··· 881 902 882 903 if (XFS_FORCED_SHUTDOWN(mp)) 883 904 return -XFS_ERROR(EIO); 884 - if (!ip->i_update_core) 885 - return 0; 886 905 887 - if (wbc->sync_mode == WB_SYNC_ALL) { 906 + if (wbc->sync_mode == WB_SYNC_ALL || wbc->for_kupdate) { 888 907 /* 889 908 * Make sure the inode has made it it into the log. Instead 890 909 * of forcing it all the way to stable storage using a ··· 890 913 * ->sync_fs call do that for thus, which reduces the number 891 914 * of synchronous log forces dramatically. 892 915 */ 893 - error = xfs_log_inode(ip); 916 + error = xfs_log_dirty_inode(ip, NULL, 0); 894 917 if (error) 895 918 goto out; 896 919 return 0; 897 920 } else { 921 + if (!ip->i_update_core) 922 + return 0; 923 + 898 924 /* 899 925 * We make this non-blocking if the inode is contended, return 900 926 * EAGAIN to indicate to the caller that they did not succeed.
+36
fs/xfs/xfs_sync.c
··· 336 336 return error; 337 337 } 338 338 339 + int 340 + xfs_log_dirty_inode( 341 + struct xfs_inode *ip, 342 + struct xfs_perag *pag, 343 + int flags) 344 + { 345 + struct xfs_mount *mp = ip->i_mount; 346 + struct xfs_trans *tp; 347 + int error; 348 + 349 + if (!ip->i_update_core) 350 + return 0; 351 + 352 + tp = xfs_trans_alloc(mp, XFS_TRANS_FSYNC_TS); 353 + error = xfs_trans_reserve(tp, 0, XFS_FSYNC_TS_LOG_RES(mp), 0, 0, 0); 354 + if (error) { 355 + xfs_trans_cancel(tp, 0); 356 + return error; 357 + } 358 + 359 + xfs_ilock(ip, XFS_ILOCK_EXCL); 360 + xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); 361 + xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); 362 + return xfs_trans_commit(tp, 0); 363 + } 364 + 339 365 /* 340 366 * When remounting a filesystem read-only or freezing the filesystem, we have 341 367 * two phases to execute. This first phase is syncing the data before we ··· 384 358 struct xfs_mount *mp) 385 359 { 386 360 int error, error2 = 0; 361 + 362 + /* 363 + * Log all pending size and timestamp updates. The vfs writeback 364 + * code is supposed to do this, but due to its overagressive 365 + * livelock detection it will skip inodes where appending writes 366 + * were written out in the first non-blocking sync phase if their 367 + * completion took long enough that it happened after taking the 368 + * timestamp for the cut-off in the blocking phase. 369 + */ 370 + xfs_inode_ag_iterator(mp, xfs_log_dirty_inode, 0); 387 371 388 372 xfs_qm_sync(mp, SYNC_TRYLOCK); 389 373 xfs_qm_sync(mp, SYNC_WAIT);
+2
fs/xfs/xfs_sync.h
··· 34 34 35 35 void xfs_flush_inodes(struct xfs_inode *ip); 36 36 37 + int xfs_log_dirty_inode(struct xfs_inode *ip, struct xfs_perag *pag, int flags); 38 + 37 39 int xfs_reclaim_inodes(struct xfs_mount *mp, int mode); 38 40 int xfs_reclaim_inodes_count(struct xfs_mount *mp); 39 41 void xfs_reclaim_inodes_nr(struct xfs_mount *mp, int nr_to_scan);
+1
include/asm-generic/cputime.h
··· 40 40 */ 41 41 #define cputime_to_usecs(__ct) jiffies_to_usecs(__ct) 42 42 #define usecs_to_cputime(__msecs) usecs_to_jiffies(__msecs) 43 + #define usecs_to_cputime64(__msecs) nsecs_to_jiffies64((__msecs) * 1000) 43 44 44 45 /* 45 46 * Convert cputime to seconds and back.
+1
include/linux/kvm.h
··· 557 557 #define KVM_CAP_MAX_VCPUS 66 /* returns max vcpus per vm */ 558 558 #define KVM_CAP_PPC_PAPR 68 559 559 #define KVM_CAP_S390_GMAP 71 560 + #define KVM_CAP_TSC_DEADLINE_TIMER 72 560 561 561 562 #ifdef KVM_CAP_IRQ_ROUTING 562 563
+1 -1
include/linux/security.h
··· 2056 2056 char **name, void **value, 2057 2057 size_t *len) 2058 2058 { 2059 - return 0; 2059 + return -EOPNOTSUPP; 2060 2060 } 2061 2061 2062 2062 static inline int security_inode_create(struct inode *dir,
+1 -1
include/net/ip_vs.h
··· 1207 1207 extern struct ip_vs_dest * 1208 1208 ip_vs_find_dest(struct net *net, int af, const union nf_inet_addr *daddr, 1209 1209 __be16 dport, const union nf_inet_addr *vaddr, __be16 vport, 1210 - __u16 protocol, __u32 fwmark); 1210 + __u16 protocol, __u32 fwmark, __u32 flags); 1211 1211 extern struct ip_vs_dest *ip_vs_try_bind_dest(struct ip_vs_conn *cp); 1212 1212 1213 1213
+8 -1
kernel/exit.c
··· 1540 1540 } 1541 1541 1542 1542 /* dead body doesn't have much to contribute */ 1543 - if (p->exit_state == EXIT_DEAD) 1543 + if (unlikely(p->exit_state == EXIT_DEAD)) { 1544 + /* 1545 + * But do not ignore this task until the tracer does 1546 + * wait_task_zombie()->do_notify_parent(). 1547 + */ 1548 + if (likely(!ptrace) && unlikely(ptrace_reparented(p))) 1549 + wo->notask_error = 0; 1544 1550 return 0; 1551 + } 1545 1552 1546 1553 /* slay zombie? */ 1547 1554 if (p->exit_state == EXIT_ZOMBIE) {
+20 -8
kernel/futex.c
··· 314 314 #endif 315 315 316 316 lock_page(page_head); 317 + 318 + /* 319 + * If page_head->mapping is NULL, then it cannot be a PageAnon 320 + * page; but it might be the ZERO_PAGE or in the gate area or 321 + * in a special mapping (all cases which we are happy to fail); 322 + * or it may have been a good file page when get_user_pages_fast 323 + * found it, but truncated or holepunched or subjected to 324 + * invalidate_complete_page2 before we got the page lock (also 325 + * cases which we are happy to fail). And we hold a reference, 326 + * so refcount care in invalidate_complete_page's remove_mapping 327 + * prevents drop_caches from setting mapping to NULL beneath us. 328 + * 329 + * The case we do have to guard against is when memory pressure made 330 + * shmem_writepage move it from filecache to swapcache beneath us: 331 + * an unlikely race, but we do need to retry for page_head->mapping. 332 + */ 317 333 if (!page_head->mapping) { 334 + int shmem_swizzled = PageSwapCache(page_head); 318 335 unlock_page(page_head); 319 336 put_page(page_head); 320 - /* 321 - * ZERO_PAGE pages don't have a mapping. Avoid a busy loop 322 - * trying to find one. RW mapping would have COW'd (and thus 323 - * have a mapping) so this page is RO and won't ever change. 324 - */ 325 - if ((page_head == ZERO_PAGE(address))) 326 - return -EFAULT; 327 - goto again; 337 + if (shmem_swizzled) 338 + goto again; 339 + return -EFAULT; 328 340 } 329 341 330 342 /*
+10 -4
kernel/hung_task.c
··· 74 74 75 75 /* 76 76 * Ensure the task is not frozen. 77 - * Also, when a freshly created task is scheduled once, changes 78 - * its state to TASK_UNINTERRUPTIBLE without having ever been 79 - * switched out once, it musn't be checked. 77 + * Also, skip vfork and any other user process that freezer should skip. 80 78 */ 81 - if (unlikely(t->flags & PF_FROZEN || !switch_count)) 79 + if (unlikely(t->flags & (PF_FROZEN | PF_FREEZER_SKIP))) 80 + return; 81 + 82 + /* 83 + * When a freshly created task is scheduled once, changes its state to 84 + * TASK_UNINTERRUPTIBLE without having ever been switched out once, it 85 + * musn't be checked. 86 + */ 87 + if (unlikely(!switch_count)) 82 88 return; 83 89 84 90 if (switch_count != t->last_switch_count) {
+12 -1
kernel/ptrace.c
··· 96 96 */ 97 97 if (!(child->flags & PF_EXITING) && 98 98 (child->signal->flags & SIGNAL_STOP_STOPPED || 99 - child->signal->group_stop_count)) 99 + child->signal->group_stop_count)) { 100 100 child->jobctl |= JOBCTL_STOP_PENDING; 101 + 102 + /* 103 + * This is only possible if this thread was cloned by the 104 + * traced task running in the stopped group, set the signal 105 + * for the future reports. 106 + * FIXME: we should change ptrace_init_task() to handle this 107 + * case. 108 + */ 109 + if (!(child->jobctl & JOBCTL_STOP_SIGMASK)) 110 + child->jobctl |= SIGSTOP; 111 + } 101 112 102 113 /* 103 114 * If transition to TASK_STOPPED is pending or in TASK_TRACED, kick
-2
kernel/signal.c
··· 1994 1994 */ 1995 1995 if (!(sig->flags & SIGNAL_STOP_STOPPED)) 1996 1996 sig->group_exit_code = signr; 1997 - else 1998 - WARN_ON_ONCE(!current->ptrace); 1999 1997 2000 1998 sig->group_stop_count = 0; 2001 1999
-1
kernel/time/clockevents.c
··· 387 387 * released list and do a notify add later. 388 388 */ 389 389 if (old) { 390 - old->event_handler = clockevents_handle_noop; 391 390 clockevents_set_mode(old, CLOCK_EVT_MODE_UNUSED); 392 391 list_del(&old->list); 393 392 list_add(&old->list, &clockevents_released);
+1 -1
mm/hugetlb.c
··· 901 901 h->resv_huge_pages += delta; 902 902 ret = 0; 903 903 904 - spin_unlock(&hugetlb_lock); 905 904 /* Free the needed pages to the hugetlb pool */ 906 905 list_for_each_entry_safe(page, tmp, &surplus_list, lru) { 907 906 if ((--needed) < 0) ··· 914 915 VM_BUG_ON(page_count(page)); 915 916 enqueue_huge_page(h, page); 916 917 } 918 + spin_unlock(&hugetlb_lock); 917 919 918 920 /* Free unnecessary surplus pages to the buddy allocator */ 919 921 free:
+10 -1
mm/mempolicy.c
··· 636 636 struct vm_area_struct *prev; 637 637 struct vm_area_struct *vma; 638 638 int err = 0; 639 + pgoff_t pgoff; 639 640 unsigned long vmstart; 640 641 unsigned long vmend; 641 642 ··· 644 643 if (!vma || vma->vm_start > start) 645 644 return -EFAULT; 646 645 646 + if (start > vma->vm_start) 647 + prev = vma; 648 + 647 649 for (; vma && vma->vm_start < end; prev = vma, vma = next) { 648 650 next = vma->vm_next; 649 651 vmstart = max(start, vma->vm_start); 650 652 vmend = min(end, vma->vm_end); 651 653 654 + if (mpol_equal(vma_policy(vma), new_pol)) 655 + continue; 656 + 657 + pgoff = vma->vm_pgoff + 658 + ((vmstart - vma->vm_start) >> PAGE_SHIFT); 652 659 prev = vma_merge(mm, prev, vmstart, vmend, vma->vm_flags, 653 - vma->anon_vma, vma->vm_file, vma->vm_pgoff, 660 + vma->anon_vma, vma->vm_file, pgoff, 654 661 new_pol); 655 662 if (prev) { 656 663 vma = prev;
+1 -1
net/bluetooth/hci_core.c
··· 613 613 if (!test_bit(HCI_RAW, &hdev->flags)) { 614 614 set_bit(HCI_INIT, &hdev->flags); 615 615 __hci_request(hdev, hci_reset_req, 0, 616 - msecs_to_jiffies(HCI_INIT_TIMEOUT)); 616 + msecs_to_jiffies(250)); 617 617 clear_bit(HCI_INIT, &hdev->flags); 618 618 } 619 619
+1 -1
net/netfilter/ipvs/ip_vs_conn.c
··· 616 616 if ((cp) && (!cp->dest)) { 617 617 dest = ip_vs_find_dest(ip_vs_conn_net(cp), cp->af, &cp->daddr, 618 618 cp->dport, &cp->vaddr, cp->vport, 619 - cp->protocol, cp->fwmark); 619 + cp->protocol, cp->fwmark, cp->flags); 620 620 ip_vs_bind_dest(cp, dest); 621 621 return dest; 622 622 } else
+8 -2
net/netfilter/ipvs/ip_vs_ctl.c
··· 619 619 const union nf_inet_addr *daddr, 620 620 __be16 dport, 621 621 const union nf_inet_addr *vaddr, 622 - __be16 vport, __u16 protocol, __u32 fwmark) 622 + __be16 vport, __u16 protocol, __u32 fwmark, 623 + __u32 flags) 623 624 { 624 625 struct ip_vs_dest *dest; 625 626 struct ip_vs_service *svc; 627 + __be16 port = dport; 626 628 627 629 svc = ip_vs_service_get(net, af, fwmark, protocol, vaddr, vport); 628 630 if (!svc) 629 631 return NULL; 630 - dest = ip_vs_lookup_dest(svc, daddr, dport); 632 + if (fwmark && (flags & IP_VS_CONN_F_FWD_MASK) != IP_VS_CONN_F_MASQ) 633 + port = 0; 634 + dest = ip_vs_lookup_dest(svc, daddr, port); 635 + if (!dest) 636 + dest = ip_vs_lookup_dest(svc, daddr, port ^ dport); 631 637 if (dest) 632 638 atomic_inc(&dest->refcnt); 633 639 ip_vs_service_put(svc);
+1 -1
net/netfilter/ipvs/ip_vs_sync.c
··· 740 740 * but still handled. 741 741 */ 742 742 dest = ip_vs_find_dest(net, type, daddr, dport, param->vaddr, 743 - param->vport, protocol, fwmark); 743 + param->vport, protocol, fwmark, flags); 744 744 745 745 /* Set the approprite ativity flag */ 746 746 if (protocol == IPPROTO_TCP) {
+15 -7
net/netfilter/nf_conntrack_netlink.c
··· 135 135 static inline int 136 136 ctnetlink_dump_timeout(struct sk_buff *skb, const struct nf_conn *ct) 137 137 { 138 - long timeout = (ct->timeout.expires - jiffies) / HZ; 138 + long timeout = ((long)ct->timeout.expires - (long)jiffies) / HZ; 139 139 140 140 if (timeout < 0) 141 141 timeout = 0; ··· 1358 1358 nf_ct_protonum(ct)); 1359 1359 if (helper == NULL) { 1360 1360 rcu_read_unlock(); 1361 + spin_unlock_bh(&nf_conntrack_lock); 1361 1362 #ifdef CONFIG_MODULES 1362 1363 if (request_module("nfct-helper-%s", helpname) < 0) { 1364 + spin_lock_bh(&nf_conntrack_lock); 1363 1365 err = -EOPNOTSUPP; 1364 1366 goto err1; 1365 1367 } 1366 1368 1369 + spin_lock_bh(&nf_conntrack_lock); 1367 1370 rcu_read_lock(); 1368 1371 helper = __nf_conntrack_helper_find(helpname, 1369 1372 nf_ct_l3num(ct), ··· 1641 1638 const struct nf_conntrack_expect *exp) 1642 1639 { 1643 1640 struct nf_conn *master = exp->master; 1644 - long timeout = (exp->timeout.expires - jiffies) / HZ; 1641 + long timeout = ((long)exp->timeout.expires - (long)jiffies) / HZ; 1645 1642 struct nf_conn_help *help; 1646 1643 1647 1644 if (timeout < 0) ··· 1872 1869 1873 1870 err = -ENOMEM; 1874 1871 skb2 = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); 1875 - if (skb2 == NULL) 1872 + if (skb2 == NULL) { 1873 + nf_ct_expect_put(exp); 1876 1874 goto out; 1875 + } 1877 1876 1878 1877 rcu_read_lock(); 1879 1878 err = ctnetlink_exp_fill_info(skb2, NETLINK_CB(skb).pid, 1880 1879 nlh->nlmsg_seq, IPCTNL_MSG_EXP_NEW, exp); 1881 1880 rcu_read_unlock(); 1881 + nf_ct_expect_put(exp); 1882 1882 if (err <= 0) 1883 1883 goto free; 1884 1884 1885 - nf_ct_expect_put(exp); 1885 + err = netlink_unicast(ctnl, skb2, NETLINK_CB(skb).pid, MSG_DONTWAIT); 1886 + if (err < 0) 1887 + goto out; 1886 1888 1887 - return netlink_unicast(ctnl, skb2, NETLINK_CB(skb).pid, MSG_DONTWAIT); 1889 + return 0; 1888 1890 1889 1891 free: 1890 1892 kfree_skb(skb2); 1891 1893 out: 1892 - nf_ct_expect_put(exp); 1893 - return err; 1894 + /* this avoids a loop in nfnetlink. */ 1895 + return err == -EAGAIN ? -ENOBUFS : err; 1894 1896 } 1895 1897 1896 1898 static int
+5 -1
net/packet/af_packet.c
··· 2448 2448 { 2449 2449 struct packet_sock *po = pkt_sk(sk); 2450 2450 2451 - if (po->fanout) 2451 + if (po->fanout) { 2452 + if (dev) 2453 + dev_put(dev); 2454 + 2452 2455 return -EINVAL; 2456 + } 2453 2457 2454 2458 lock_sock(sk); 2455 2459
+4 -3
net/sched/sch_netem.c
··· 488 488 return -EINVAL; 489 489 490 490 s = sizeof(struct disttable) + n * sizeof(s16); 491 - d = kmalloc(s, GFP_KERNEL); 491 + d = kmalloc(s, GFP_KERNEL | __GFP_NOWARN); 492 492 if (!d) 493 493 d = vmalloc(s); 494 494 if (!d) ··· 501 501 root_lock = qdisc_root_sleeping_lock(sch); 502 502 503 503 spin_lock_bh(root_lock); 504 - dist_free(q->delay_dist); 505 - q->delay_dist = d; 504 + swap(q->delay_dist, d); 506 505 spin_unlock_bh(root_lock); 506 + 507 + dist_free(d); 507 508 return 0; 508 509 } 509 510
+2 -2
net/sched/sch_qfq.c
··· 817 817 static void qfq_update_start(struct qfq_sched *q, struct qfq_class *cl) 818 818 { 819 819 unsigned long mask; 820 - uint32_t limit, roundedF; 820 + u64 limit, roundedF; 821 821 int slot_shift = cl->grp->slot_shift; 822 822 823 823 roundedF = qfq_round_down(cl->F, slot_shift); 824 - limit = qfq_round_down(q->V, slot_shift) + (1UL << slot_shift); 824 + limit = qfq_round_down(q->V, slot_shift) + (1ULL << slot_shift); 825 825 826 826 if (!qfq_gt(cl->F, q->V) || qfq_gt(roundedF, limit)) { 827 827 /* timestamp was stale */
+1 -1
security/security.c
··· 381 381 void **value, size_t *len) 382 382 { 383 383 if (unlikely(IS_PRIVATE(inode))) 384 - return 0; 384 + return -EOPNOTSUPP; 385 385 return security_ops->inode_init_security(inode, dir, qstr, name, value, 386 386 len); 387 387 }
+1
sound/soc/codecs/wm8776.c
··· 235 235 switch (snd_pcm_format_width(params_format(params))) { 236 236 case 16: 237 237 iface = 0; 238 + break; 238 239 case 20: 239 240 iface = 0x10; 240 241 break;
+84 -9
virt/kvm/assigned-dev.c
··· 17 17 #include <linux/pci.h> 18 18 #include <linux/interrupt.h> 19 19 #include <linux/slab.h> 20 + #include <linux/namei.h> 21 + #include <linux/fs.h> 20 22 #include "irq.h" 21 23 22 24 static struct kvm_assigned_dev_kernel *kvm_find_assigned_dev(struct list_head *head, ··· 482 480 return r; 483 481 } 484 482 483 + /* 484 + * We want to test whether the caller has been granted permissions to 485 + * use this device. To be able to configure and control the device, 486 + * the user needs access to PCI configuration space and BAR resources. 487 + * These are accessed through PCI sysfs. PCI config space is often 488 + * passed to the process calling this ioctl via file descriptor, so we 489 + * can't rely on access to that file. We can check for permissions 490 + * on each of the BAR resource files, which is a pretty clear 491 + * indicator that the user has been granted access to the device. 492 + */ 493 + static int probe_sysfs_permissions(struct pci_dev *dev) 494 + { 495 + #ifdef CONFIG_SYSFS 496 + int i; 497 + bool bar_found = false; 498 + 499 + for (i = PCI_STD_RESOURCES; i <= PCI_STD_RESOURCE_END; i++) { 500 + char *kpath, *syspath; 501 + struct path path; 502 + struct inode *inode; 503 + int r; 504 + 505 + if (!pci_resource_len(dev, i)) 506 + continue; 507 + 508 + kpath = kobject_get_path(&dev->dev.kobj, GFP_KERNEL); 509 + if (!kpath) 510 + return -ENOMEM; 511 + 512 + /* Per sysfs-rules, sysfs is always at /sys */ 513 + syspath = kasprintf(GFP_KERNEL, "/sys%s/resource%d", kpath, i); 514 + kfree(kpath); 515 + if (!syspath) 516 + return -ENOMEM; 517 + 518 + r = kern_path(syspath, LOOKUP_FOLLOW, &path); 519 + kfree(syspath); 520 + if (r) 521 + return r; 522 + 523 + inode = path.dentry->d_inode; 524 + 525 + r = inode_permission(inode, MAY_READ | MAY_WRITE | MAY_ACCESS); 526 + path_put(&path); 527 + if (r) 528 + return r; 529 + 530 + bar_found = true; 531 + } 532 + 533 + /* If no resources, probably something special */ 534 + if (!bar_found) 535 + return -EPERM; 536 + 537 + return 0; 538 + #else 539 + return -EINVAL; /* No way to control the device without sysfs */ 540 + #endif 541 + } 542 + 485 543 static int kvm_vm_ioctl_assign_device(struct kvm *kvm, 486 544 struct kvm_assigned_pci_dev *assigned_dev) 487 545 { 488 546 int r = 0, idx; 489 547 struct kvm_assigned_dev_kernel *match; 490 548 struct pci_dev *dev; 549 + u8 header_type; 550 + 551 + if (!(assigned_dev->flags & KVM_DEV_ASSIGN_ENABLE_IOMMU)) 552 + return -EINVAL; 491 553 492 554 mutex_lock(&kvm->lock); 493 555 idx = srcu_read_lock(&kvm->srcu); ··· 579 513 r = -EINVAL; 580 514 goto out_free; 581 515 } 516 + 517 + /* Don't allow bridges to be assigned */ 518 + pci_read_config_byte(dev, PCI_HEADER_TYPE, &header_type); 519 + if ((header_type & PCI_HEADER_TYPE) != PCI_HEADER_TYPE_NORMAL) { 520 + r = -EPERM; 521 + goto out_put; 522 + } 523 + 524 + r = probe_sysfs_permissions(dev); 525 + if (r) 526 + goto out_put; 527 + 582 528 if (pci_enable_device(dev)) { 583 529 printk(KERN_INFO "%s: Could not enable PCI device\n", __func__); 584 530 r = -EBUSY; ··· 622 544 623 545 list_add(&match->list, &kvm->arch.assigned_dev_head); 624 546 625 - if (assigned_dev->flags & KVM_DEV_ASSIGN_ENABLE_IOMMU) { 626 - if (!kvm->arch.iommu_domain) { 627 - r = kvm_iommu_map_guest(kvm); 628 - if (r) 629 - goto out_list_del; 630 - } 631 - r = kvm_assign_device(kvm, match); 547 + if (!kvm->arch.iommu_domain) { 548 + r = kvm_iommu_map_guest(kvm); 632 549 if (r) 633 550 goto out_list_del; 634 551 } 552 + r = kvm_assign_device(kvm, match); 553 + if (r) 554 + goto out_list_del; 635 555 636 556 out: 637 557 srcu_read_unlock(&kvm->srcu, idx); ··· 669 593 goto out; 670 594 } 671 595 672 - if (match->flags & KVM_DEV_ASSIGN_ENABLE_IOMMU) 673 - kvm_deassign_device(kvm, match); 596 + kvm_deassign_device(kvm, match); 674 597 675 598 kvm_free_assigned_device(kvm, match); 676 599