summaryrefslogtreecommitdiffstats
path: root/kernel (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-11-26ARM: dts: add board dts file for Exynos3250-based Monk boardYoungjun Cho3-1/+582
This patch adds new board dts file to support Samsung Monk board which is based on Exynos3250 SoC and has different H/W configuration from Rinato. This dts file support following features: - eMMC - Main PMIC (Samsung S2MPS14) - Interface PMIC (Maxim MAX77836, MUIC, fuel-gauge, charger) - RTC of Exynos3250 - ADC of Exynos3250 with NTC thermistor - I2S of Exynos3250 - TMU of Exynos3250 - Secure firmware for Exynos3250 secondary cpu boot - Serial ports of Exynos3250 - gpio-key for power key Signed-off-by: Youngjun Cho <yj44.cho@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-11-26Documentation: devicetree: Add Exynos-based boards compatible stringChanwoo Choi1-5/+13
This patch adds the missing compatible/description of Exynos-based boards to remove following build warning. WARNING: DT compatible string "samsung,..." appears un-documented -- check ./Documentation/devicetree/bindings/ Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-11-22ARM: dts: add missing clock to MFC device for exynos4Marek Szyprowski1-2/+2
sclk_mfc is required for MFC device since commit 0c2272170d78f826f6e97f99fb8a67fc17feef07 ("media: s5p-mfc: rename special clock to sclk_mfc"), so add it to exynos4 dts. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-11-22ARM: dts: Specify audio clock parents and rates for exynos4412-odroid-commonSylwester Nawrocki1-0/+10
This ensures the core and the audio subsystem clocks are configured properly, as expected by the sound machine driver. These bits are missing to obtain proper audio sample rates in kernel v3.17, where audio support for Odroid X2/U3 was first added. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-11-22ARM: dts: Add trackpad to exynos5250-springAndreas Faerber1-0/+23
The HP Chromebook 11 uses an Atmel maXTouch as trackpad. The keymap was found by trial-and-error. Signed-off-by: Andreas Faerber <afaerber@suse.de> Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-11-22ARM: dts: Add temperature sensor to exynos5250-springAndreas Faerber1-0/+5
Spotted in the Chrome OS 3.8 based device tree. Needs CONFIG_SENSORS_LM90. Signed-off-by: Andreas Faerber <afaerber@suse.de> Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-11-22ARM: dts: Add usb3503 pinctrl to exynos5250-springAndreas Faerber1-0/+2
Reported-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Andreas Faerber <afaerber@suse.de> Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-11-22ARM: dts: Add max77693-haptic node for exynos4412-trats2Jaewon Kim1-0/+6
This patch adds max77693-haptic node to support for haptic motor driver. Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-11-22ARM: dts: add pwm node for exynos4412-trats2Jaewon Kim1-0/+7
This patch add PWM(Pulse Width Modulation) node and handle to use pwm property. Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-11-22ARM: dts: Specify default clocks for Exynos4 camera devicesSylwester Nawrocki4-3/+77
Specify the default mux and divider clocks in device tree to ensure the FIMC devices on Trats, Trats2, Universal_c210 and Odroid X2/U3 boards are clocked from recommended clock source and with maximum supported frequency. For Trats2 also the MIPI-CSIS and the camera sensor clocks are configured, the 'clock-frequency' property is deprecated in favour of 'assigned-clock-rates' property. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-11-22ARM: dts: Enable TMU support for exynos4412-trats2Lukasz Majewski1-0/+5
This patch enables support for TMU at Exynos4412 based Trats2 board. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-11-22ARM: dts: Device tree node definition for TMU on exynos4x12Lukasz Majewski1-0/+10
The TMU device tree node definition for Exynos4x12 family of SoCs. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-11-07ARM: dts: Add micro SD card SDHCI node for exynos4412-tratsKrzysztof Kozlowski1-0/+10
Add SDHCI node for supporting the micro SD card. On Trats2 board the SDHCI does not use sd2_cd pins (gpk2-2) for card detect but gpx3-4 instead. Power is supplied from LDO21 regulator which in off state is controlled by external GPIO pin. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-11-07ARM: dts: Add dts files for exynos4415 SoCChanwoo Choi2-0/+1177
This patch adds new exynos4415.dtsi to support Exynos4415 SoC based on Cortex-A9 quad cores and includes following dt nodes: - GIC interrupt controller (GIC-400) - Pinctrl to control three GPIO parts - CMU (Clock Management Unit) for CMU/CMU_DMC/AUDSS - CPU information (Cortex-A9 quad cores) - UART to support serial port - MCT (Multi Core Timer) - ADC (Analog Digital Converter) - RTC (Real Time Clock) - I2C/SPI busses - Power domains (CAM, TV, MFC, G3D, LCD0, ISP0/1) - PMU (Performance Monitoring Unit) - MSHC (Mobile Storage Host Controller) - EHCI (Enhanced Host Controller Interface) - OHIC (Open Host Controller Interface) - USB 2.0 device with hsotg - PWM (Pluse Width Modulation) Timer - AMBA bus for PDMA0/1 - SYSRAM node for memory mapping - SYSREG node for memory mapping - PMU (Power Management Unit) node for memory mapping Cc: Ben Dooks <ben-linux@fluff.org> Cc: Russell King <linux@arm.linux.org.uk> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Olof Johansson <olof@lixom.net> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> [m.szyprowski: Add OHCI node and correct EHCI node] Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> [yj44.cho: Add mipi-phy node] Signed-off-by: YoungJun Cho <yj44.cho@samsung.com> [jaewon02: Add EHCI and SPI_2 node] Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com> [ideal.song: Add I2S0 node for audio interface] Signed-off-by: Inha Song <ideal.song@samsung.com> [tomasz.figa: Add L2 cache node] Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-11-07ARM: dts: Add sleep mode of regulator for exynos3250-rinatoChanwoo Choi1-0/+108
This patch adds sleep mode of regulator for exynos3250-rinato board to optimize power-consumption in sleep state. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-11-07ARM: dts: Add sleep mode pin configuration for exynos3250-rinatoChanwoo Choi2-0/+170
This patch add sleep mode pin configuration using pinctrl subsystem to reduce leakage power-consumption of gpio pin in sleep state. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-11-07ARM: dts: Add board dts file for exynos3250-rinatoChanwoo Choi2-1/+426
This patch adds support for device tree source for Samsung Rinato board (Gear 2) based on Exynos3250 SoC. This dts file support following features: - eMMC - Main PMIC (Samsung S2MPS14) - Interface PMIC (Maxim MAX77836, MUIC, fuel-gauge, charger) - RTC of Exynos3250 - ADC of Exynos3250 with NTC thermistor - I2S of Exynos3250 - TMU of Exynos3250 - MFC of Exynos3250 - Secure firmware for Exynos3250 secondary cpu boot - Serial ports of Exynos3250 - gpio-key for power key Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-10-20ARM: dts: add CPU nodes for Exynos4 SoCsBartlomiej Zolnierkiewicz3-0/+63
Recent patch by Tomasz Figa ("irqchip: gic: Fix core ID calculation when topology is read from DT") fixed GIC driver to filter cluster ID from values returned by cpu_logical_map() for SoCs having registers mapped without per-CPU banking making it is possible to add CPU nodes for Exynos4 SoCs. In case of Exynos SoCs these CPU nodes are also required by future changes adding initialization of cpuidle states in Exynos cpuidle driver through DT. Tested on Origen board (Exynos4210 SoC) and Trats2 (Exynos4412 SoC). Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-10-20ARM: dts: add MFC codec device node for exynos3250Jacek Anaszewski1-0/+10
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-10-20ARM: dts: Add Maxim 77693 PMIC to exynos4412-trats2Krzysztof Kozlowski1-0/+32
The MAX77693 is a companion power management IC for smart phones and tablets. The MAX77693 contains input over-voltage protection (OVP), a fully-integrated 2.5A switching charger for Lithium Ion battery with integrated battery disconnect, OTG/accessory 5V output power, a high-current white LED driver for camera flash, two safeout LDOs, a haptic motor driver, Model Gauge m3 battery fuel gauge and MicroUSB Interface Controller (MUIC). I2C serial interface is used for communicating. Add MAX77693 node to the Trats2 board. This allows using: - charger regulator, - 2 safeout LDO regulators (for USB OTG), - extcon. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-10-20ARM: dts: Add sleep mode pin configuration for exynos4412-trats2Tomasz Figa1-0/+316
This patch adds sleep mode pin configuration using pin control hog mechanism to configure states of GPIO pins in sleep mode. This is required to reduce leakage current in sleep mode and prevent glitching of components on the board. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-10-20ARM: dts: Add utility macro to define pin sleep states for exynos4x12-pinctrlTomasz Figa1-0/+16
This patch adds a convenient macro which constructs an Exynos pinctrl pinconf node containing properties needed to configure sleep state of given pin with given parameters. It will be used by further patch which adds a large number of sleep states for pins that need such configuration on certain boards. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-10-20ARM: dts: Keep eMMC regulators soft-disabled for exynos4412-trats2Tomasz Figa1-4/+0
In MAX77686 PMIC two regulators dedicated for eMMC memory can be controlled both by I2C interface and a GPIO pin, with the resulting regulator state being a logical OR of both. Since the GPIO control is used both by the kernel and the lowest level bootloader at reset, the regulator should be disabled by I2C control to allow it to be turned off by GPIO control. This patch removes regulator-always-on properties from both regulators and, while at it, also unsupported regulator-mem-off. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-10-20ARM: dts: correct the mmc0 capability string for exynos Peach boardsNaveen Krishna Chatradhi2-2/+2
MMC capability for HS200 is parsed in mmc/core/host.c as dts string "mmc-hs200-1_8v". This patch corrects the dts string for Exynos5420 based peach-pit and Exynos5800 based peach-pi boards. Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-10-20ARM: dts: Add rtc_src clk for s3c-rtc on exynos5250-snowJavier Martinez Canillas1-1/+4
commit 546b117fdf17 ("rtc: s3c: add support for RTC of Exynos3250 SoC") added an "rtc_src" DT property for the Samsung's S3C Real Time Clock controller that specifies the 32.768 kHz clock that uses the RTC as its source clock. In the case of the Exynos5250 based Snow board, the Maxim 77686 32kHz AP clock is used as the source clock. Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-10-20ARM: dts: Add rtc_src clk for s3c-rtc on exynos Peach boardsJavier Martinez Canillas2-2/+8
commit 546b117fdf17 ("rtc: s3c: add support for RTC of Exynos3250 SoC") added an "rtc_src" DT property for the Samsung's S3C Real Time Clock controller that specifies the 32.768 kHz clock that uses the RTC as its source clock. In the case of the Peach Pit and Pi machines, the Maxim 77802 32kHz AP clock is used as the source clock. Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Reviewed-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-10-20ARM: dts: Enable PWM node by default for s3c64xxTomasz Figa2-5/+0
The PWM block is required for system clock source so it must be always enabled. This patch fixes boot issues on SMDK6410 which did not have the node enabled explicitly for other purposes. Fixes: eeb93d02 ("clocksource: of: Respect device tree node status") Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-10-20ARM: dts: Add exynos5250-spring device treeAndreas Faerber2-0/+537
Adds initial support for the HP Chromebook 11. Cc: Vincent Palatin <vpalatin@chromium.org> Cc: Doug Anderson <dianders@chromium.org> Cc: Stephan van Schaik <stephan@synkhronix.com> Signed-off-by: Andreas Faerber <afaerber@suse.de> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Reviewed-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-10-20ARM: dts: Simplify USB3503 on exynos5250-arndaleAndreas Faerber1-11/+5
There's no need for a simple-bus, place the smsc,usb3503a directly into the root node. That's what we're going to do on exynos5250-spring. Reported-by: Tomasz Figa <t.figa@samsung.com> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Andreas Faerber <afaerber@suse.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-10-20ARM: dts: Fix apparent GPIO typo in exynos5250-arndaleAndreas Faerber1-1/+1
The GPIO flag 2 has no constant assigned, so this was probably active-low. Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Andreas Faerber <afaerber@suse.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-10-20ARM: dts: Clean up exynos5250-arndaleAndreas Faerber1-453/+456
Use the new style of referencing inherited nodes, use symbolic names, tidy indentation and reorder includes. Goal is the alignment of all exynos5250 based device trees for comparison. Signed-off-by: Andreas Faerber <afaerber@suse.de> Reviewed-by: Tomasz Figa <t.figa@samsung.com> [kgene.kim@samsung.com: rebased] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-10-20ARM: dts: Clean up exynos5250-smdk5250Andreas Faerber2-307/+312
Use the new style for referencing inherited nodes and use symbolic names. Goal is the alignment of all exynos5250 based device trees for comparison. Signed-off-by: Andreas Faerber <afaerber@suse.de> Reviewed-by: Tomasz Figa <t.figa@samsung.com> [kgene.kim@samsung.com: rebased and squashed] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-10-20ARM: dts: Fill in bootargs for exynos5250-snowAndreas Faerber1-0/+1
exynos5250-cros-common.dtsi had an empty /chosen node. Fill in exemplary boot arguments. Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Andreas Faerber <afaerber@suse.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-10-20ARM: dts: Clean up exynos5250-snowAndreas Faerber1-130/+129
Use the new style of referencing inherited nodes and use symbolic names. Reorder one pinctrl node in GPIO order. Goal is the alignment of all exynos5250 based device trees for comparison. Suggested-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Andreas Faerber <afaerber@suse.de> Reviewed-by: Tomasz Figa <t.figa@samsung.com> [kgene.kim@samsung.com: rebased and squashed] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-10-20ARM: dts: Prepare node labels for exynos5250Andreas Faerber1-8/+8
Allows them to be extended by reference. Reviewed-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Andreas Faerber <afaerber@suse.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-10-20Linux 3.18-rc1v3.18-rc1Linus Torvalds1-2/+2
2014-10-19MAINTAINERS: corrected bcm2835 searchScott Branden1-6/+3
Corrected bcm2835 maintainer info by using N: to specify any files with bcm2835 in are directed to the proper maintainer. Also corrected minor mispelling of ARCHITECTURE in 2 comment locations. Signed-off-by: Scott Branden <sbranden@broadcom.com> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Olof Johansson <olof@lixom.net>
2014-10-19Net: DSA: Fix checking for get_phy_flags functionAndrew Lunn1-1/+1
The check for the presence or not of the optional switch function get_phy_flags() called the function, rather than checked to see if it is a NULL pointer. This causes a derefernce of a NULL pointer on all switch chips except the sf2, the only switch to implement this call. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Fixes: 6819563e646a ("net: dsa: allow switch drivers to specify phy_device::dev_flags") Cc: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-19sparc64: Do not define thread fpregs save area as zero-length array.David S. Miller1-1/+2
This breaks the stack end corruption detection facility. What that facility does it write a magic value to "end_of_stack()" and checking to see if it gets overwritten. "end_of_stack()" is "task_thread_info(p) + 1", which for sparc64 is the beginning of the FPU register save area. So once the user uses the FPU, the magic value is overwritten and the debug checks trigger. Fix this by making the size explicit. Due to the size we use for the fpsaved[], gsr[], and xfsr[] arrays we are limited to 7 levels of FPU state saves. So each FPU register set is 256 bytes, allocate 256 * 7 for the fpregs area. Reported-by: Meelis Roos <mroos@linux.ee> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-19sparc64: Fix corrupted thread fault code.David S. Miller2-6/+6
Every path that ends up at do_sparc64_fault() must install a valid FAULT_CODE_* bitmask in the per-thread fault code byte. Two paths leading to the label winfix_trampoline (which expects the FAULT_CODE_* mask in register %g4) were not doing so: 1) For pre-hypervisor TLB protection violation traps, if we took the 'winfix_trampoline' path we wouldn't have %g4 initialized with the FAULT_CODE_* value yet. Resulting in using the TLB_TAG_ACCESS register address value instead. 2) In the TSB miss path, when we notice that we are going to use a hugepage mapping, but we haven't allocated the hugepage TSB yet, we still have to take the window fixup case into consideration and in that particular path we leave %g4 not setup properly. Errors on this sort were largely invisible previously, but after commit 4ccb9272892c33ef1c19a783cfa87103b30c2784 ("sparc64: sun4v TLB error power off events") we now have a fault_code mask bit (FAULT_CODE_BAD_RA) that triggers due to this bug. FAULT_CODE_BAD_RA triggers because this bit is set in TLB_TAG_ACCESS (see #1 above) and thus we get seemingly random bus errors triggered for user processes. Fixes: 4ccb9272892c ("sparc64: sun4v TLB error power off events") Reported-by: Meelis Roos <mroos@linux.ee> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-18MAINTAINERS: Become the docs maintainerJonathan Corbet1-2/+1
It seems it's my turn to be the documentation maintainer for a bit. My plan is to work to ensure that docs patches don't fall through the cracks; I assume most changes will continue to flow through subsystem-specific trees. Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-18x86,kvm,vmx: Preserve CR4 across VM entryAndy Lutomirski1-2/+14
CR4 isn't constant; at least the TSD and PCE bits can vary. TBH, treating CR0 and CR3 as constant scares me a bit, too, but it looks like it's correct. This adds a branch and a read from cr4 to each vm entry. Because it is extremely likely that consecutive entries into the same vcpu will have the same host cr4 value, this fixes up the vmcs instead of restoring cr4 after the fact. A subsequent patch will add a kernel-wide cr4 shadow, reducing the overhead in the common case to just two memory reads and a branch. Signed-off-by: Andy Lutomirski <luto@amacapital.net> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Cc: stable@vger.kernel.org Cc: Petr Matousek <pmatouse@redhat.com> Cc: Gleb Natapov <gleb@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-18ipv6: fix a potential use after free in sit.cLi RongQing1-3/+3
pskb_may_pull() maybe change skb->data and make iph pointer oboslete, fix it by geting ip header length directly. Fixes: ca15a078 (sit: generate icmpv6 error when receiving icmpv4 error) Cc: Oussama Ghorbel <ghorbel@pivasoftware.com> Signed-off-by: Li RongQing <roy.qing.li@gmail.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-18ipv6: fix a potential use after free in ip6_offload.cLi RongQing1-0/+1
pskb_may_pull() maybe change skb->data and make opth pointer oboslete, so set the opth again Signed-off-by: Li RongQing <roy.qing.li@gmail.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-18ipv4: fix a potential use after free in gre_offload.cLi RongQing1-3/+3
pskb_may_pull() may change skb->data and make greh pointer oboslete; so need to reassign greh; but since first calling pskb_may_pull already ensured that skb->data has enough space for greh, so move the reference of greh before second calling pskb_may_pull(), to avoid reassign greh. Fixes: 7a7ffbabf9("ipv4: fix tunneled VM traffic over hw VXLAN/GRE GSO NIC") Cc: Wei-Chun Chao <weichunc@plumgrid.com> Signed-off-by: Li RongQing <roy.qing.li@gmail.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-18tcp: fix build error if IPv6 is not enabledEric Dumazet1-0/+2
$ make M=net/ipv4 CC net/ipv4/route.o In file included from net/ipv4/route.c:102:0: include/net/tcp.h: In function ‘tcp_v6_iif’: include/net/tcp.h:738:32: error: ‘union <anonymous>’ has no member named ‘h6’ return TCP_SKB_CB(skb)->header.h6.iif; Signed-off-by: Eric Dumazet <edumazet@google.com> Fixes: 870c3151382c ("ipv6: introduce tcp_v6_iif()") Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-18futex: Ensure get_futex_key_refs() always implies a barrierCatalin Marinas1-0/+2
Commit b0c29f79ecea (futexes: Avoid taking the hb->lock if there's nothing to wake up) changes the futex code to avoid taking a lock when there are no waiters. This code has been subsequently fixed in commit 11d4616bd07f (futex: revert back to the explicit waiter counting code). Both the original commit and the fix-up rely on get_futex_key_refs() to always imply a barrier. However, for private futexes, none of the cases in the switch statement of get_futex_key_refs() would be hit and the function completes without a memory barrier as required before checking the "waiters" in futex_wake() -> hb_waiters_pending(). The consequence is a race with a thread waiting on a futex on another CPU, allowing the waker thread to read "waiters == 0" while the waiter thread to have read "futex_val == locked" (in kernel). Without this fix, the problem (user space deadlocks) can be seen with Android bionic's mutex implementation on an arm64 multi-cluster system. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Reported-by: Matteo Franchin <Matteo.Franchin@arm.com> Fixes: b0c29f79ecea (futexes: Avoid taking the hb->lock if there's nothing to wake up) Acked-by: Davidlohr Bueso <dave@stgolabs.net> Tested-by: Mike Galbraith <umgwanakikbuti@gmail.com> Cc: <stable@vger.kernel.org> Cc: Darren Hart <dvhart@linux.intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-18bna: fix skb->truesize underestimationEric Dumazet1-1/+1
skb->truesize is not meant to be tracking amount of used bytes in an skb, but amount of reserved/consumed bytes in memory. For instance, if we use a single byte in last page fragment, we have to account the full size of the fragment. skb->truesize can be very different from skb->len, that has a very specific safety purpose. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Rasesh Mody <rasesh.mody@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-18net: dsa: add includes for ethtool and phy_fixed definitionsFlorian Fainelli2-0/+2
net/dsa/slave.c uses functions and structures declared in phy_fixed.h but does not explicitely include it, while dsa.h needs structure declarations for 'struct ethtool_wolinfo' and 'struct ethtool_eee', fix those by including the correct header files. Fixes: ec9436baedb6 ("net: dsa: allow drivers to do link adjustment") Fixes: ce31b31c68e7 ("net: dsa: allow updating fixed PHY link information") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-18openvswitch: Set flow-key members.Pravin B Shelar1-3/+3
This patch adds missing memset which are required to initialize flow key member. For example for IP flow we need to initialize ip.frag for all cases. Found by inspection. This bug is introduced by commit 0714812134d7dcadeb7ecfbfeb18788aa7e1eaac ("openvswitch: Eliminate memset() from flow_extract"). Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>