summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ARM: dts: sun6i: Add support for Yones Toptech bs1078v2 tabletsLawrence Yu2015-09-272-1/+136
| | | | | | | | | | The bs1078v2 is a pcb found in 10.1" tablets with an A31 soc, 1G RAM and 8G NAND, rtl8723as usb wifi, 1 micro USB OTG port, 1 USB HOST port This commit adds a dts for v2 of the bs1078 pcb. Signed-off-by: Lawrence Yu <lyu@micile.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun4i: Enable USB DRC on the Marsboard A10Aleksei Mamlin2015-09-271-0/+19
| | | | | | | | | | Enable the otg/drc usb controller on the Marsboard A10. Similar to Cubieboard, the 5V of the otg is directly connected to the general 5V, so we only use the id pin. Signed-off-by: Aleksei Mamlin <mamlinav@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun4i: gemei-g9: Add accelerometer (bma250) IRQPriit Laes2015-09-271-7/+4Star
| | | | | | | Add IRQ configuration for bma250 accelerometer. Signed-off-by: Priit Laes <plaes@plaes.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun8i-a33: Add security system crypto engine clock and device nodesChen-Yu Tsai2015-09-271-0/+18
| | | | | | | | A33 has the same "Security System" crypto engine as A10/A20, but with a separate reset control. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun8i: Add pwm-backlight device for A23/A33 Q8 format tabletsChen-Yu Tsai2015-09-271-0/+20
| | | | | | | | | | | | | | | | | | The LCD backlight on the A23/A33 Q8 format tablets is enabled with a GPIO controlled regulator, and brightness controlled with the SoC's PWM controller. The backlight is powered from the AXP223 PMIC's DC1SW output, which is not supported yet. A proper bootloader is required to enable it. The brightness levels are arbitrary. The FEX files do not have such information. As such, actual brightness levels may differ from device to device. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: sun8i: A23: Add missing msgbox gateMaxime Ripard2015-09-271-4/+4
| | | | | | | | | Even though it's not mentionned in the A23 user manual, the A23 has a gate for the AHB1 clock to the msgbox IP. Add it to the clock-indices. Reported-by: Chen-Yu Tsai <wens@csie.org> Reviewed-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: sun8i: Move A23 AHB1 gates out of common DTSIMaxime Ripard2015-09-272-25/+25
| | | | | | | | | | The AHB1 gates were assumed to be identical between the A23 and the A33, which turned out to be wrong. Move the A23 gates definition to the A23 DTSI. Reported-by: Chen-Yu Tsai <wens@csie.org> Reviewed-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: sun8i: Add the A33 AHB1 gates clock driverMaxime Ripard2015-09-271-0/+27
| | | | | | | | The A33 has a different gates array than the A23, add the node to the DT. Reported-by: Chen-Yu Tsai <wens@csie.org> Reviewed-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun5i: Add dts file for q8 formfactor a13 based tabletsHans de Goede2015-09-272-0/+61
| | | | | | | | | | | | | | | | | | | | This commits adds a generic dts file for q8 formfactor a13 based tablets. The tablets ship in many variants, with the difference mainly being the touchscreen controller / accelerometer / wifi chip used. The wifi is USB based, and thus not listed in devicetree. The touchscreen controller / accelerometer may turn out to be a problem once we add support for those. We can either do something with devicetree overlays, or add sun5i-a13-<touchscreen>-<accelerometer>.dts files. The latter is what the android mod community is doing with firmware images. This dts was tested with an a13 q8 tablet with a pcb labelled: "94V-0", silead gsl1680 touchscreen controller and a mc32x0 accelerometer. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun5i: Add sun5i-q8-common.dtsiHans de Goede2015-09-271-0/+170
| | | | | | | | | | | | | This is the sun5i / a13 version of sun8i-q8-common.dtsi for use in dts files for a13 q8 based tablets. Compared to sun8i this uses uart1 for the serial console, and PG0 for card-detect for mmc0. This also adds pmic and otg support, which both use the same config on all known q8 a13 devices. This is not present in sun5i-q8-common.dtsi because pmic / otg support for sun8i has not yet been merged. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun8i: Add PWM channel 0 pinmux setting for A23/A33Chen-Yu Tsai2015-09-271-0/+7
| | | | | | | | | | The PWM controller has 2 outputs, with one usable pin for each. Add a pinmux setting for the first channel. This is often used for backlight dimming on tablets. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun8i: Add PWM controller node for A23/A33Chen-Yu Tsai2015-09-271-0/+8
| | | | | | | | | A23/A33 have a PWM controller that is compatible to the one on the A20. Add a device node for it. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun7i: Add keypad clk nodeYassin Jaffer2015-09-271-0/+8
| | | | | | | This patch add support to the keypad clock on sun7i Signed-off-by: Yassin Jaffer <yassinjaffer@gmail.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun6i: Add accelerometer on Columbus A31Sander Vermin2015-09-271-0/+7
| | | | | | | | Add mma8452 accelerometer to sun6i-a31-colombus.dts. Signed-off-by: Sander Vermin <sander@vermin.nl> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun5i: Add dts file for the Wobo i5 top set boxJelle van der Waa2015-09-272-0/+225
| | | | | | | | | | | | | The Wobo i5 top set box is a somewhat curious A10s based top set box, it uses an AXP209 rather then the AXP152 usually used in combination with the A10s. It has an ethernet phy connected to PORTD rather then PORTA, and its built-in usb wifi is connected via the otg controller. This commit adds a dts file adding support for this top set box. Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun5i: Add emac_pins_b definitionJelle van der Waa2015-09-271-0/+11
| | | | | | | | | The emac pins on an A10s can also be routed to the outside through PORTD rather then through PORTA, add a pinctrl node for this. Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* dts: sunxi: add eeprom to A20 OLinuXino micro boardOlliver Schinagl2015-09-271-0/+6
| | | | | | | | The Olimex A20 OLinuXino Micro features an eeprom that is always on the board. This patch adds it to the dts. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* dts: sunxi: add eeprom to A20 OLinuXino Lime2 boardOlliver Schinagl2015-09-271-0/+6
| | | | | | | | The Olimex A20 OLinuXino Lime2 features an eeprom that is always on the board. This patch adds it to the dts. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* dts: sunxi: add eeprom to A20 OLinuXino Lime boardOlliver Schinagl2015-09-271-0/+12
| | | | | | | | The Olimex A20 OLinuXino Lime features an eeprom that is always on the board. This patch adds it to the dts. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* dts: sunxi: correct vendor prefix on OLinuXino a10s microOlliver Schinagl2015-09-271-1/+1
| | | | | | | | | | | | The OLinuXino A10S micro features an eeprom. According to the eeprom.txt binding document, we should use the manufacturer and 'at' is not the proper manufacturer id according to the vendor-prefixes. This patch takes the proper vendor-prefix and uses it for the eeprom node. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* dts: sunxi: add eeprom to A10 OLinuXino Lime boardOlliver Schinagl2015-09-271-0/+12
| | | | | | | | The Olimex A10 OLinuXino Lime features an eeprom that is always on the board. This patch adds it to the dts. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun4i: Add dts file for iNet-1 based tabletsHans de Goede2015-09-272-0/+227
| | | | | | | | | | | | | | | | | The iNet-tek iNet-1 PCB is a PCB found in various generic 10.1" 1024x600 A10 based tablets such as the Point of View Protab2 XXL and the Cherry M1007. This patch has been tested on both rev2 and rev5 of this board / these tablets. It comes with a rtl8188cus usb wifi connected to ehci1, focal ft5406ee8 touchscreen connected to i2c2 addr 0x38, bosch bma 250 accelerometer connected to i2c1 addr 0x18 and the usual connectors: headphone, mini hdmi, power-barrel, mini-usb and a micro-sd slot. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun4i: Add dts file inet9f-rev03 based tabletsHans de Goede2015-09-272-0/+228
| | | | | | | | | | | | | | The inet9f-rev03 pcb is specially designed for gaming tablets, such as the qware tb-g100 tablet. These 7" tablets feature a dpad, firebuttons and 2 joysticks on the sides of the screen. Besides this they have the usual connectors: power-barrel, mini usb, mini hdmi, headphone and micro-sd slot. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sunxi: Add sun?i-q8-common.dtsi files for q8 tabletsHans de Goede2015-09-274-138/+162
| | | | | | | | | | | | | | | | | | | Cheap allwinner based devices in the q8 enclosure come in many variants, all sharing the case and a number of other basic features. They differ in the display, touchscreen, accelerometer and wifi chips used. This commit adds 2 dtsi files defining the shared features of all the q8 tablets. sunxi-q8-common.dtsi defines features shared amongst all q8 tablets, sun8i-q8-common.dtsi defines features shared amongst all a23 / a33 based q8 tablets, but not with a13 q8 based tablets. a13 based tablets use a different card-detect pin for the mmc, and use uart1 instead of the r_uart for the serial console. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun5i: Add dts file for inet98v_rev2 based tabletsHans de Goede2015-09-272-0/+228
| | | | | | | | | The inet98v_rev2 is a pcb used in generic A13 based tablets. It features volume buttons, a power barrel, micro-usb otg, headphone connector and a power button. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun6i: Add mmc2 pins for 8 bit emmcChen-Yu Tsai2015-09-271-0/+10
| | | | | | | This also includes the reset pin for emmc. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun6i: Add lradc nodeChen-Yu Tsai2015-09-271-0/+7
| | | | | | | sun6i also has the LRADC for tablet buttons. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun4i: inet97fv2: Enable i2c1 and i2c2 controllersHans de Goede2015-09-271-0/+12
| | | | | | | | Enable i2c1 and i2c2 controllers, these are used for the touchscreen resp. the accelerometer. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun4i: inet97fv2: Enable support for tablet keysHans de Goede2015-09-271-0/+41
| | | | | | | Enable support for the tablet keys which are connected via the lradc. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun4i: inet97fv2: Enable otg controllerHans de Goede2015-09-271-0/+34
| | | | | | | Enable the otg controller on the inet97fv2 tablet. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun4i: inet97fv2: Add regulator nodesHans de Goede2015-09-271-4/+31
| | | | | | | | Use axp209.dtsi and add regulator nodes for the regulators used on the inet97fv2 tablet. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun4i: inet97fv2: Disable unused usb controllersHans de Goede2015-09-271-17/+0Star
| | | | | | | | | The inet97fv2 tablet only has a usb-2 wifi device connected to the second ehci controller, disable the first ehci controller and both ohci controllers. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun5i: Add support for the Auxtek-T003 HDMI stickHans de Goede2015-09-272-0/+160
| | | | | | | | The Auxtek-T003 HDMI stick is an A10s based HDMI stick with USB wifi, and composite video out support. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun6i: hummingbird: Add missing pinmux setting for gmac phy resetChen-Yu Tsai2015-09-271-1/+8
| | | | | Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun7i: Enable USB DRC on cubieboard2Ralph Benadski2015-09-271-0/+19
| | | | | | | | | | | Enable the otg/drc usb controller on the cubieboard2. Note this board has the otg-vbus connected directly to the 5v-dcc of the board, so there is no vbus0 regulator, nor vbus0-det. Signed-off-by: Ralph Benadski <benadski@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun7i: Enable USB DRC on pcDuino 3Jelle van der Waa2015-09-271-0/+19
| | | | | | | | | | | Enable the otg/drc usb controller on the pcDuino 3. Note this board has the otg-vbus connected directly to the 5v-dcc of the board, so there is no vbus0 regulator, nor vbus0-det. Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun8i: Add support for qt90h-v4 tabletsHans de Goede2015-09-272-0/+146
| | | | | | | | | | The gt90h is a pcb found in generic 9" tablets with an A23 soc, 1G RAM and 8G nand, rtl8723as usb wifi, 1 micro usb port and 1 micro sd slot. This commit adds a dts for v4 of the gt90h pcb. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun7i: Add regulator configuration to the pcduino3 dts fileJelle van der Waa2015-09-271-4/+31
| | | | | | | | | Add regulator configuration to the pcduino3 dts file. Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl> Signed-off-by: Hans de Goede <hdegoede@redhat.com> [Maxime: Removed usb_power_supply node that isn't defined in the DTSI] Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun5i: Add simplefb node for tvencoder outputHans de Goede2015-09-271-0/+9
| | | | | | | | Add a simplefb node for tvencoder / composite-video output, such as found on the Auxtek-T003 and the CHIP. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun6i: Columbus: Add i2c controller for communicating with the LCDHans de Goede2015-09-271-0/+17
| | | | | | | | | The Colombus development kit uses an optional 2048x1536 edp panel using an anx9804 parallel lcd to edp converter. The anx9804 chip is controlled via an i2c bus which is connected to 2 regular gpio pins. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sunxi: enable otg port on the sun7i-a20-olinuxino-lime2Olliver Schinagl2015-09-131-0/+41
| | | | | | | | | | This patch enables the musb-otg USB controller on the Lime2. The Lime2 differs from the Lime1 series in pins used for usb0 power. Tested on a OlinuXino Lime2-4GB. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun4i: Enable i2c1 and i2c2 on the Chuwi V7-CW0825 tabletHans de Goede2015-09-131-0/+12
| | | | | | | | i2c1 has a freescale mma7660 accelerometer connected to it at addr 0x4c, i2c2 has a ft5x touchscreen connected to it at addr 0x38. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sun4i: Enable otg in host only mode on Jesurun Q5Hans de Goede2015-09-131-0/+15
| | | | | | | | The Jesurun Q5 has the musb hooked up to an usb-a receptacle, enable it in host-only mode. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: Fix Makefile target for sun4i-a10-itead-iteaduino-plusJosh Boyer2015-09-131-1/+1
| | | | | | | | | | | | | | | | Commit 79ae3e66f8d (ARM: dts: sun4i: Add Iteaduino Plus A10) added a new make target for the sun4i-a10-itead-iteaduino-plus dts file, but mistakenly used .dts instead of the correct .dtb suffix. This resulted in a build error like: scripts/Makefile.dtbinst:42: target 'sun4i-a10-itead-iteaduino-plus.dts' doesn't match the target pattern when doing a make dtbs_install. Fix it to use the proper file name. Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* ARM: dts: sunxi: Raise minimum CPU voltage for sun7i-a20 to meet SoC ↵Timo Sigurdsson2015-09-131-1/+1
| | | | | | | | | | | | | | | | specifications sun7i-a20.dtsi contains a cpufreq operating point at 0.9 volts. The minimum CPU voltage for the Allwinner A20 SoC, however, is 1.0 volts. Thus, raise the voltage for the lowest operating point to 1.0 volts in order to stay within the SoC specifications. It is an undervolted setting that isn't stable across all SoCs and boards out there. Cc: <stable@vger.kernel.org> # v4.0+ Fixes: d96b7161916f ("ARM: dts: sun7i: Add cpu clock reference and operating points to dtsi") Signed-off-by: Timo Sigurdsson <public_timo.s@silentcreek.de> Acked-by: Iain Paton <ipaton0@gmail.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* Linux 4.3-rc1Linus Torvalds2015-09-131-2/+2
|
* Merge tag 'cris-for-4.3' of ↵Linus Torvalds2015-09-1250-421/+220Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris Pull CRIS updates from Jesper Nilsson: "Mostly removal of old cruft of which we can use a generic version, or fixes for code not commonly run in the cris port, but also additions to enable some good debug" * tag 'cris-for-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris: (25 commits) CRISv10: delete unused lib/dmacopy.c CRISv10: delete unused lib/old_checksum.c CRIS: fix switch_mm() lockdep splat CRISv32: enable LOCKDEP_SUPPORT CRIS: add STACKTRACE_SUPPORT CRISv32: annotate irq enable in idle loop CRISv32: add support for irqflags tracing CRIS: UAPI: use generic types.h CRIS: UAPI: use generic shmbuf.h CRIS: UAPI: use generic msgbuf.h CRIS: UAPI: use generic socket.h CRIS: UAPI: use generic sembuf.h CRIS: UAPI: use generic sockios.h CRIS: UAPI: use generic auxvec.h CRIS: UAPI: use generic headers via Kbuild CRIS: UAPI: fix elf.h export CRIS: don't make asm/elf.h depend on asm/user.h CRIS: UAPI: fix ptrace.h CRISv32: Squash compile warnings for axisflashmap CRISv32: Add GPIO driver to the default configs ...
| * CRISv10: delete unused lib/dmacopy.cRabin Vincent2015-09-051-42/+0Star
| | | | | | | | | | | | | | This file is never built. Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Jesper Nilsson <jespern@axis.com>
| * CRISv10: delete unused lib/old_checksum.cRabin Vincent2015-09-051-86/+0Star
| | | | | | | | | | | | | | This file is never built. Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
| * CRIS: fix switch_mm() lockdep splatRabin Vincent2015-09-051-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With lockdep support implemented on CRISv32, we get the following splat. switch_mm() can be called both from the scheduler() (with interrupts disabled) and from flush_old_exec (via activate_mm()), with interrupts enabled. Fix it by disabling interrupts in activate_mm(), similar to powerpc and hexagon. t====================================================== [ INFO: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected ] 3.19.0-08802-g20bc9f1-dirty #323 Not tainted ------------------------------------------------------ init/1 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: (mmu_context_lock){+.+...}, at: [<c0009290>] switch_mm+0x22/0xc6 and this task is already holding: (&rq->lock){-.-.-.}, at: [<c01a0756>] __schedule+0x5e/0x648 which would create a new lock dependency: (&rq->lock){-.-.-.} -> (mmu_context_lock){+.+...} but this new dependency connects a HARDIRQ-irq-safe lock: (&rq->lock){-.-.-.} ... which became HARDIRQ-irq-safe at: [<c002b03c>] scheduler_tick+0x28/0x5e [<c0007c6c>] timer_interrupt+0x4e/0x6a [<c0043ac4>] handle_irq_event_percpu+0x54/0x13c [<c004343c>] generic_handle_irq+0x2a/0x36 to a HARDIRQ-irq-unsafe lock: (mmu_context_lock){+.+...} ... which became HARDIRQ-irq-unsafe at: ... [<c0039e60>] __lock_acquire+0x8f8/0x1d9c [<c0009290>] switch_mm+0x22/0xc6 [<c009c260>] flush_old_exec+0x500/0x5d4 [<c00da4c6>] load_elf_phdrs+0x7a/0x84 [<c00dbdb0>] load_elf_binary+0x21c/0x13b4 [<c009cdb6>] do_execve+0x22/0x2c [<c001dcf2>] ____call_usermodehelper+0x0/0x154 [<c000581e>] ret_from_kernel_thread+0xe/0x14 other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(mmu_context_lock); local_irq_disable(); lock(&rq->lock); lock(mmu_context_lock); <Interrupt> lock(&rq->lock); *** DEADLOCK *** 1 lock held by init/1: #0: (&rq->lock){-.-.-.}, at: [<c01a0756>] __schedule+0x5e/0x648 Call Trace: [<c019fe9e>] printk+0x0/0x4e [<c00368f8>] print_shortest_lock_dependencies+0x0/0x15c [<c0048628>] print_stack_trace+0x0/0x88 [<c0038912>] __lock_is_held+0x3e/0x5e [<c003b894>] lock_acquire+0x8a/0xcc [<c01a50c4>] _raw_spin_lock+0x44/0x7a [<c0009290>] switch_mm+0x22/0xc6 [<c01a06f8>] __schedule+0x0/0x648 [<c01a0d76>] schedule+0x36/0x7c [<c0037d04>] trace_hardirqs_on+0x0/0x1e [<c0004e18>] do_work_pending+0x30/0xd4 [<c000591a>] _work_pending+0xe/0x12 Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>