summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-10-11add configs required by Toradex Easy InstallerStefan Agner
Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit 944f626fab84a4457f36ec11270fd243f8d80edf) Conflicts: arch/arm64/configs/defconfig Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 75b89c90ac9c3a3b1374354cd3cc1aaa70cea0f0)
2018-10-11apalis-imx8qm: fix UART2 RTS/CTS signalStefan Agner
Add RTS/CTS signal to UART2. Also remove the wrong pins muxed for UART3 (lpuart0). UART3 does not have RTS/CTS pins in the Apalis standard. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit 7aa7248a3fc30f64061a18ad97d7b931b46fa79d) (cherry picked from commit 0ce4d474713d90d63841557b8e7978ff832de494)
2018-10-11apalis-imx8qm: enable USBH_EN by defaultStefan Agner
Make sure USBH_EN is enabled by default. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit 0258be2764f78860c59303154fa1793b420499a0) (cherry picked from commit 1732c23d6df1f69f0e8cca5186f1da29c1046895)
2018-10-11apalis-imx8qm: it seems that X2 peripheral clock is requiredStefan Agner
When pciea fails to probe, it disables X2 peripheral clock. Then when pcieb probes, the kernel crashes with various errors, but most often with a "Unhandled fault: synchronous external abort" in regmap_mmio_read32le. In contrast, X1 peripheral clock seems not to be required... Use just X2 on both PCIe instances. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit 97627bc30c391695a5bc10eeb19f762420b9772d) (cherry picked from commit 312eef1e1a59f4eee0f51e596a35a29d2ecf758b)
2018-10-11apalis-imx8qm: mux clock enable pin in clock driverStefan Agner
Make sure that the clock enable pin is assigned to the GPIO clock driver. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit 5d3e6620b685fe06d69479623f52264361ad26e0) (cherry picked from commit 47a9e5ec149776762a863a180b431960e5236315)
2018-10-11apalis-imx8qm: add HDMI CTRL GPIO in device treeStefan Agner
Now that the HDP driver support HDMI CTRL GPIOs make use of it and reference the HDMI_CTRL GPIO. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit a0b0515b3992b6361514a3c18740864321b5bf50) (cherry picked from commit 15d1a2a0acf6493829845c45963aed746b2765f1)
2018-10-11drm/imx/hdp: add HDMI CTRL GPIO supportStefan Agner
Add support to control HDMI levels using a GPIO. The driver simply sets the GPIO high for HDMI and low for DisplayPort. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit d8868d38dc929cc5c4591f583489cdc57e93e9f2) (cherry picked from commit b7d9e3c98e2d1681e2366f9011c599003e2179d3)
2018-10-11arm64: defconfig: add configs for BluetoothStefan Agner
Add Marvell/USB Bluetooth support. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit 9fe8e87ad955c087d2fa6a35fda3287aa5dccbd7) Conflicts: arch/arm64/configs/defconfig Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 9bd23adac54773bfd2ed02d577667053cc61dd74)
2018-10-11apalis-imx8qm: enable HDMIStefan Agner
With newer U-Boot the proper HDMI firmware gets loaded, with that Linux can use the HDMI driver. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit db14ad6e5cf9cc8b89f0c61b2e2229fafeebef40) (cherry picked from commit e0f027ae6690dbf270fd98b1f89fc622f9a193c3)
2018-10-11apalis-imx8qm: add USB HSIC supportStefan Agner
With that external USBH2/3 do work now. Also the on-module Azurewave AW-CM276NF Wi-Fi/Bluetooth enumerates after downloading the firmware over PCIe. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit 321682bbb78507ae3dc84a3cd8ced2186b00818c) (cherry picked from commit 01e32582a087bef1d5b382907f6ac65bf7afa196)
2018-10-11apalis-imx8qm: disable HDMI I2C to avoid freezeStefan Agner
Since beta2 the kernel crashes when trying to use HDMI I2C: [ 0.793055] usbphynop2 supply vcc not found, using dummy regulator [ 0.799867] i2c i2c-0: LPI2C adapter registered [ 0.804437] i2c i2c-1: LPI2C adapter registered <freeze> Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit 05063862c0dcf542ec9beb4f3d5c8404ebc3f9e0) (cherry picked from commit 571c461dc90c17711e42bd7ea2f88e1957427095)
2018-10-11apalis-imx8qm: migrate device tree to beta2Stefan Agner
Enabled new nodes crucial for graphics. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit 5410d1ab5b8382ac67423d129d1744a337de47dc) (cherry picked from commit f5dd3c7792d39dd33d358e1aaf2c76c900160ead)
2018-10-11arm64: defconfig: add Marvell Wi-Fi supportStefan Agner
Add Marvell Wi-Fi support using the mwifiex driver. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit acc1f6790a86f38398da46bc30908c8e8e2c0757) Conflicts: arch/arm64/configs/defconfig Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 734a9127e49ce3592b804afb8379f8fa1fc41c9e)
2018-10-11apalis-imx8qm: take PLX PCIe switch out of reset via GPIO7Stefan Agner
The Apalis iMX8 does not make use of the PCIE_CTRL0_PERST_B signal. However, the Apalis Evaluation Board uses GPIO7 as a PCIe reset signal for the PLX PCIe switch. With this the Apalis PCIe port comes up as Gen2 successfully on the Apalis Evaluation board. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit daed8f84e1675e9c091ae240d041c458be6f263f) (cherry picked from commit b2b9f4eebd50b2419d54109677c164a3eb906357)
2018-10-11apalis-imx8qm: enable PCIe/Wi-FiStefan Agner
Add external clock nodes to model the on-module PCIe reference clock generator. Assign it to the two PCIe instances so any of those can be disabled if required. Also add Wi-Fi pins to the PCIe B instance. The AzureWave AW-CM276NF Wi-Fi/Bluetooth chip (using Marvell 88W8997 chipset) appears on the PCIe bus: 00:00.0 PCI bridge: Freescale Semiconductor Inc Device 0000 (rev 01) 01:00.0 Ethernet controller: Marvell Technology Group Ltd. Device 2b42 (rev 11) Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit fa6d28db220ac331e4515de4783a33b95f46582f) (cherry picked from commit 7b0a9869abda29b358dc231d17aa372c5e82ee09)
2018-10-11PCI: imx6: add external clock support for i.MX8QMStefan Agner
Add external reference clock via clock tree. This allows to model the shared reference clock provided via PCIE_SATA_REFCLK100M_P/N properly. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit db22e75903386929c76188978f28b3bf355322a0) Conflicts: drivers/pci/host/pci-imx6.c Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 57364eca822fb2803b6aa93257e93e0d4242282d)
2018-10-11apalis-imx8qm: disable HDMIStefan Agner
HDMI is currently not working, disable for now. This prevents the X-Server does not spawn accross HDMI/LVDS output by default. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit 12bf961b9bf2507ddbbfd35f3da82472bba544da) (cherry picked from commit b8d55aa110d2448068bae33d16b9fa143941be0a)
2018-10-11apalis-imx8qm: improve OV5640 MIPI CSI2 supportStefan Agner
With a valid master clock and power down/reset GPIO correctly specified the sensor is detectable via I2C. However, the sensor driver does not work with the i.MX8QM camera stack yet, further investigations are needed. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit 8f1b8afa036ea0a9b21fbf0e9b42e797dd4fdebe) (cherry picked from commit af808fb163bfd87a7c230a012819f75a9a92b913)
2018-10-11arm64: defconfig: add configs for Apalis iMX8Stefan Agner
Add GPIO fan/backlight for Apalis iMX8. Enable USB camera support. Also enable configs relevant for MIPI CSI2 camera (OV5640) support, but this needs further changes to the driver to work with i.MX8QM. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit 6a74107935a0d4a3a7cebf879a1ae684366bec19) Conflicts: arch/arm64/configs/defconfig Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 471a0d336d637ed1c66c96d10a9f998d0cafc510)
2018-10-11apalis-imx8qm: add Apalis I2C3 for camera and OV5640Stefan Agner
Currently the master clock is missing hence the camera can not work. Further investigations are needed. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit 64d13945ae6c1df3e29541771dbbff3037ab43da) (cherry picked from commit fb308ea347365e763434196df1f8aaadc47e8642)
2018-10-11apalis-imx8qm: add USB3503a hub supportStefan Agner
Add support for the on-module USB HSIC hub. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit 30e7b3ac678c2dcc7c3aa5249fe5431454ef1b33) (cherry picked from commit 87f3bafdf88d207ef225d1991663352adfa725d2)
2018-10-11apalis-imx8qm: add GPIO FAN and USBH_EN regulatorStefan Agner
Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit 15e2b8932de93127d528459bc1006f3e8a4776d2) (cherry picked from commit dffbc3c2f509e36cd10c28a1c52973c084975d5b)
2018-10-11apalis-imx8qm: use GPIO backlight driverStefan Agner
Use GPIO backlight driver and specify for BKL1_ON and BKL1_PWM as a GPIO for now. There seem to be no driver for the LVDS PWM currently. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit 38f04eea77266fd8edeac5817484507468deac56) (cherry picked from commit 37a75ecefd92d3a696bc5485aa0870206f71b33d)
2018-10-11apalis-imx8qm: adopt device tree for Apalis iMX8QMStefan Agner
Initial changes for Apalis iMX8QM. LVDS dual-channel full-HD panel seems to work, HDMI seems to output signals but display are not able to sync on the signal (or only after a long time, displaying everything in a weired binned mode). Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit b7b13555c1f11b65f36493c12b9af3d8c4e89fbb) (cherry picked from commit b741d849c4f8bd56c290770d315e9ad090e684d9)
2018-10-11apalis-imx8qm: add initial device treeStefan Agner
Currently a copy of fsl-imx8qm-lpddr4-arm2.dts to set boot UART to LPUART1 and make Ethernet and SDHC work. (cherry picked from commit 891b801dd1ef7d6fec46a4056058535553294e73) Conflicts: arch/arm64/boot/dts/freescale/Makefile Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit dab44052613777b65fe66c672d2d4fb2371c373f)
2018-09-07MLK-19468: drm: imx: dcss: fix blkctl setting for B1 siliconLaurentiu Palcu
B1 silicon has a new ID and we need to handle it properly. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
2018-09-05MLK-19432-2: ARM64: dts: imx8mq-evk: MQ specific ak5558 compatibleViorel Suman
Use MQ specific ak5558 sound card compatible string in order to handle properly 1:2 bclk:mclk SAI ratio. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com> (cherry picked from commit 20d6d65c330a1560407bc99e0a7f90225ceaf7d8)
2018-09-05MLK-19432-1: ASoC: imx-ak5558: limit max rate as function of sample bitsViorel Suman
According to AK5558 MCLK frequence must not exceed 36.864 MHz. Limit maximum supported rate as function of max MCLK frequency, sample bits and number of slots. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com> (cherry picked from commit 236796cad225daa39d5b77d763a1d964dd4de4c9)
2018-09-05MLK-18898-5: ARM64: dts: imx8mq: change the sdma script for SAIViorel Suman
The IMX_DMATYPE_SAI(24) performance is not enough to support high sample rate/channels of audio case, there is a lot of underrun and the sound is noise, the reason is that with this script, sdma copy data through a long path (SDMA->pl301_audio -> pl301_display -> … -> pl301_wakeup -> AIPS1 -> SPBA2 -> SAI). The IMX_DMATYPE_SSI_SP(2) performance is better, which go through a shorter path (SDMA -> SPBA2 -> SAI). So we switch to use the IMX_DMATYPE_SSI_SP script, then 384k/32b/16c is supported well. Cloned from commit d5b70e923221 ("MLK-18643: ARM64: dts: imx8mm: change the sdma script for SAI"). Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Signed-off-by: Viorel Suman <viorel.suman@nxp.com> (cherry picked from commit 390620091748db98216c2f95fe95fb4ac3284564)
2018-09-05MLK-18898-4: ARM64: dts: imx8mq-evk: add SAI1 pcm_b2m pinctrl stateViorel Suman
Add SAI1 pcm_b2m pinctrl state needed to map SAI1 BCLK to codec MCLK pin. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> (cherry picked from commit 63c362c8c6cbe1e3a6b752ada828418e3c3e4363)
2018-09-05MLK-18898-3: ARM64: dts: fsl-imx8mq-evk-audio-tdm: remove redundant configViorel Suman
Remove redundant configuration already present in fsl-imx8mq-evk.dts. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> (cherry picked from commit 45545e75ca9cc29418d9674d22c8c6310ccdd0cd)
2018-09-05MLK-18898-2: ASoC: imx-ak4458: refine mclk rate calculationViorel Suman
The existing implementation calculates mclk rate as function of audio sample rate multiplied to multiplier taken from Table 5. However this is not accurate for Manual Setting Mode - tables 3 & 4 from AK4458 RM defines rate (LRCK/FS) and frame width (MCLK/16fs..1152fs) ranges as parameters to calculate mclk frequency. Aside of this - adjust bclk:mclk ratio from machine driver as function of "compatible" id. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> (cherry picked from commit 527b8b7032dcb75c14bb2790330ab96743d83b16)
2018-09-05MLK-18898-1: ASoC: fsl_sai: select pinctrl state as function of bitclock rateViorel Suman
Similar to DSD512 case we need a PCM pinctrl state option to map SAI BCLK to codec MCLK pin. Given that bitclock rate is function of slots number and slot width - pass bclk rate as parameter value from SAI driver. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> (cherry picked from commit 826caeae32713cff7ad50de8ebc9915de975edd9)
2018-09-03MLK-19412 PCI: imx: keep clkreq# active in compliance testsRichard Zhu
- Do not de-assert the clkreq# when compliance tests mode is enabled, make sure that the ref_clk is turned on. - Correct the PLL lock bit check point. - Adjust the TRSV PHY registers to pass the compliance tests. Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com> (cherry picked from commit 5b0a24521116b4a2be8e1592acf9d3eca5600f97)
2018-09-03MLK-19318 drm/imx: lcdif: avoid log print when no device attachedFancy Fang
In the 'lcdif_crtc_atomic_check()', when the 'bus_format' is zero which means that there is no valid display peripherals attached to LCDIF, return directly to avoid below error log to make noises, since the error log is not cared in this case. Signed-off-by: Fancy Fang <chen.fang@nxp.com> (cherry picked from commit 25d2b80f637af06094f56c60d46404af3b7ff381)
2018-09-03MLK-19400-2 drm/imx: sec-dsim_imx: alter 'rpm_suspended' to a counterFancy Fang
Since the DSIM's runtime PM suspend() and resume() callbacks are also called during system PM suspend() and resume(), it is necessary to use a counter to record the suspended depth, and 'rpm_suspended' field can be used as this purpose which can help to detect and avoid runtime suspend and resume calls mismatch caused problems, by changing the 'rpm_suspended' to be an atomic integer from a boolean type. Signed-off-by: Fancy Fang <chen.fang@nxp.com> (cherry picked from commit 91a8e6c8f63db328fbc752b1659bdaa67ee5c8d5)
2018-09-03MLK-19400-1 drm/bridge: sec-dsim: correct one fail branchingFancy Fang
Obviously, DRM panel prepare is done after the DSIM PLL config, so when PLL config failed, the 'sec_mipi_dsim_bridge_enable()' should return directly instead of goto DRM panel unprepare. Signed-off-by: Fancy Fang <chen.fang@nxp.com> (cherry picked from commit 9c77865d6ec98ff60a82f03743fd797d082634cc)
2018-09-03MLK-19317-2 drm/bridge: sec-dsim: fine tune for '720p@60Hz' mode on 2 lanesFancy Fang
There is an issue that run several times of modetest 720p@60 test, display turns to be abnormal or no display. So fine tunning the DPHY TIMING config to use the same timing config of '720p@60Hz' mode on 4 data lanes for the same display mode no 2 data lanes. Until now, it works fine with this config. Signed-off-by: Fancy Fang <chen.fang@nxp.com> (cherry picked from commit 6ca115f778cf61691ef4c20d8473e5818f96ad31)
2018-09-03MLK-19317-1 drm/bridge: sec-dsim: add missing 'ctrail' assignmentFancy Fang
In the macro 'DSIM_DPHY_TIMING' definition, the field 'clk_trail' assignment to 'ctrail' is missing which certainly needs to be added. Signed-off-by: Fancy Fang <chen.fang@nxp.com> (cherry picked from commit f2818410d3d8d3b09002a85b593cee192d60bb06)
2018-09-01MGS-4197 [#imx-1160] fix suspend failure with ctrl-CXianzhong
do not set interruptable when from power management Signed-off-by: Xianzhong <xianzhong.li@nxp.com> (cherry picked from commit 751fbd840640ed4c9afcfca6d945bd941b50395a)
2018-08-31MLK-19380 driver: soc: update the noc QoS setting on imx8mqBai Ping
update the noc QoS setting for CPU & VPU on i.MX8MQ. Signed-off-by: Bai Ping <ping.bai@nxp.com> Reviewed-by: Jian Li <jian.li@nxp.com> (cherry picked from commit 45d2dcaecce6d83e5c4a7e9488c651a05b0f05ac)
2018-08-31MLK-19408: ARM64: dts: freescale: add timer stop in suspend flag on imx8mmBai Ping
When system enter suspend, the system counter timer will stop counting. So need to add "arm,no-tick-in-suspend" flag. Otherwise, the system timekeeping will be wrong. Signed-off-by: Bai Ping <ping.bai@nxp.com> Reviewed-by: Anson Huang <Anson.Huang@nxp.com> (cherry picked from commit 1e15dda8c50a474891ccd1cb7fa7b41a8abbadc2)
2018-08-31mmc: block: Fix incorrectly initialized requestsAdrian Hunter
mmc_init_request() depends on card->bouncesz so it must be calculated before blk_init_allocated_queue() starts allocating requests. Reported-by: Seraphime Kirkovski <kirkseraph@gmail.com> Fixes: 304419d8a7e9 ("mmc: core: Allocate per-request data using the..") Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Tested-by: Seraphime Kirkovski <kirkseraph@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Pavel Machek <pavel@ucw.cz> (cherry picked from commit 01f5bbd17a8066b58dba9b5049fad504bce67322)
2018-08-31MGS-4192 dts: gpu: add board compatible stringXianzhong
add board compatible string for imx7ulp and m845s Signed-off-by: Xianzhong <xianzhong.li@nxp.com> (cherry picked from commit 84dd5711edb0ee6344898c08a019db5bdb78909c)
2018-08-29arm64: fix possible spectre-v1 write in ptrace_hbp_set_event()Mark Rutland
It's possible for userspace to control idx. Sanitize idx when using it as an array index, to inhibit the potential spectre-v1 write gadget. Found by smatch. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from commit 14d6e289a89780377f8bb09de8926d3c62d763cd) [Jason]: fix build break by include the nospec.h (cherry picked from commit 0340679319c7d64970606a4480998af372beea2c)
2018-08-29ARM: spectre-v1: mitigate user accessesRussell King
Spectre variant 1 attacks are about this sequence of pseudo-code: index = load(user-manipulated pointer); access(base + index * stride); In order for the cache side-channel to work, the access() must me made to memory which userspace can detect whether cache lines have been loaded. On 32-bit ARM, this must be either user accessible memory, or a kernel mapping of that same user accessible memory. The problem occurs when the load() speculatively loads privileged data, and the subsequent access() is made to user accessible memory. Any load() which makes use of a user-maniplated pointer is a potential problem if the data it has loaded is used in a subsequent access. This also applies for the access() if the data loaded by that access is used by a subsequent access. Harden the get_user() accessors against Spectre attacks by forcing out of bounds addresses to a NULL pointer. This prevents get_user() being used as the load() step above. As a side effect, put_user() will also be affected even though it isn't implicated. Also harden copy_from_user() by redoing the bounds check within the arm_copy_from_user() code, and NULLing the pointer if out of bounds. Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> (cherry picked from commit a3c0f84765bb429ba0fd23de1c57b5e1591c9389) (cherry picked from commit 5cbee49c47b3f7c81e9c205e83ff6b72afd8a494)
2018-08-29ARM: spectre-v1: use get_user() for __get_user()Russell King
Fixing __get_user() for spectre variant 1 is not sane: we would have to add address space bounds checking in order to validate that the location should be accessed, and then zero the address if found to be invalid. Since __get_user() is supposed to avoid the bounds check, and this is exactly what get_user() does, there's no point having two different implementations that are doing the same thing. So, when the Spectre workarounds are required, make __get_user() an alias of get_user(). Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> (cherry picked from commit b1cd0a14806321721aae45f5446ed83a3647c914) (cherry picked from commit ce991311120bf9e7ec4b3e5f40fe96b5233b5be1)
2018-08-29ARM: use __inttype() in get_user()Russell King
Borrow the x86 implementation of __inttype() to use in get_user() to select an integer type suitable to temporarily hold the result value. This is necessary to avoid propagating the volatile nature of the result argument, which can cause the following warning: lib/iov_iter.c:413:5: warning: optimization may eliminate reads and/or writes to register variables [-Wvolatile-register-var] Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> (cherry picked from commit d09fbb327d670737ab40fd8bbb0765ae06b8b739) (cherry picked from commit 65bb2baffe6dde557abd138282024e2f3e0fa987)
2018-08-29ARM: oabi-compat: copy semops using __copy_from_user()Russell King
__get_user_error() is used as a fast accessor to make copying structure members as efficient as possible. However, with software PAN and the recent Spectre variant 1, the efficiency is reduced as these are no longer fast accessors. In the case of software PAN, it has to switch the domain register around each access, and with Spectre variant 1, it would have to repeat the access_ok() check for each access. Rather than using __get_user_error() to copy each semops element member, copy each semops element in full using __copy_from_user(). Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> (cherry picked from commit 8c8484a1c18e3231648f5ba7cc5ffb7fd70b3ca4) (cherry picked from commit 8d1a14088dc605f22e11dc9b3dda5d0580946882)
2018-08-29ARM: vfp: use __copy_from_user() when restoring VFP stateRussell King
__get_user_error() is used as a fast accessor to make copying structure members in the signal handling path as efficient as possible. However, with software PAN and the recent Spectre variant 1, the efficiency is reduced as these are no longer fast accessors. In the case of software PAN, it has to switch the domain register around each access, and with Spectre variant 1, it would have to repeat the access_ok() check for each access. Use __copy_from_user() rather than __get_user_err() for individual members when restoring VFP state. Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> (cherry picked from commit 42019fc50dfadb219f9e6ddf4c354f3837057d80) Fixed conflicts caused by older versions missing commit ce184a0dee92 ("ARM: 8687/1: signal: Fix unparseable iwmmxt_sigframe in uc_regspace[]") (cherry picked from commit 04de67be2d4d84db018d641563cafc9c36dba6f0)