summaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)AuthorFilesLines
2016-06-16ARM: dts: imx6qdl.dtsi: add "arm,shared-override" for pl310Peter Chen1-0/+1
The imx6 SMP system has the same DMA memory coherency issue [1] with pl310 L2 controller. With this shared override bit set, the customer reports the DMA coherency issue is gone. Besides, I have tested the performance using USB ethernet with/without this bit, it shows no difference. [1] http://patchwork.ozlabs.org/patch/469362/ Signed-off-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-15ARM: imx25-pinfunc: remove SION from all modesUwe Kleine-König1-309/+309
With the SION bit set a pin can be read as GPIO even though it's not muxed as GPIO. This is useful at times. The downside however is that the signal is not only routed to the GPIO IP but also all other IPs that can make use of the pin. This resulted in more than one issue for me in the past. Things like spi transfers that result in usb reenumeration or setting a GPIO to a value that triggers an RTS irq for an UART. This convinces me that the SION bit does more harm than good and so all SION bits are removed that are not known to be needed. Note that this has no influence on GPIOs under Linux as the gpio-mxc driver just reports the level the pin is driven to for outputs and not the level as seen on the pin. If this commit introduces a regression for you, please report which SION bit is essential for your setup. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-15ARM: imx25-pinfunc: document SION being important for MX25_PAD_SD1_CMD__SD1_CMDUwe Kleine-König1-0/+9
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-11ARM: dts: ls1021a: Add dis_rxdet_inp3_quirk property to USB3 nodeRajesh Bhagat1-0/+1
Add "dis_rxdet_inp3_quirk" boolean property to USB3 node. This property is used to disable rx detection in P3 PHY mode. Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-11ARM: dts: imx6qdl-sabresd: Pass the correct PCI reset polarityFabio Estevam1-1/+1
The PCI reset GPIO is active low, so represent it with the GPIO_ACTIVE_LOW flag. Even though the imx6 PCI driver will not take the polarity into account in this case, it is better to provide a correct description in device-tree. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-11ARM: dts: imx6q-cm-fx6: Relicense under GPLv2/X11Christopher Spinrath1-5/+35
GPLv2-only devicetrees make reuse difficult for software components licensed under a different license. In particular, the Utilite Pro devicetree file (which includes imx6q-cm-fx6.dts) is already dual licensed under GPLv2/X11. Hence, relicense imx6q-cm-fx6.dts under GPLv2/X11 dual license. Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de> Acked-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-11ARM: dts: imx6q: add support for the Utilite ProChristopher Spinrath2-0/+154
The CompuLab Utilite Pro is a miniature fanless desktop pc based on the i.MX6 Quad powered cm-fx6 module. It features two serial ports, USB OTG, 4x USB, analog audio and S/PDIF, 2x Gb Ethernet, HDMI and DVI ports, an on-board 32GB SSD, a mmc slot, and on-board wifi/bt. Add initial support for it including USB, Ethernet (both ports), sata and HDMI support. Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de> Acked-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-11ARM: dts: imx6q: extend support for the cm-fx6Christopher Spinrath1-0/+125
The cm-fx6 module has an on-board spi-flash chip for its firmware, an eeprom (containing e.g. the mac address of the on-board Ethernet), a sata port, a pcie controller, an USB hub, and an USB otg port. Enable support for them. In addition, enable syscon poweroff support. Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Acked-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-11ARM: dts: imx6q-cm-fx6: remove iomuxc container nodeChristopher Spinrath1-48/+46
The imx6q-cm-fx6 iomuxc container node is not required. Remove it. Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de> Acked-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-11ARM: dts: imx28-tx28: fix dtc warningStefan Wahren1-1/+1
This fixes the following dtc warning by removing the unnecessary unit: Warning (unit_address_vs_reg): Node /matrix-keypad@0 has a unit name, but no reg property Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Acked-By: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-11ARM: dts: imx28-cfa10049: fix dtc warningStefan Wahren1-1/+1
This fixes the following dtc warning by removing the unnecessary unit: Warning (unit_address_vs_reg): Node /onewire@0 has a unit name, but no reg property Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-11ARM: dts: imx28-eukrea-mbmx28lc: add missing reg propertiesStefan Wahren1-0/+4
This patch adds the missing reg properties for the regulator nodes in order to fix the dtc warnings. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-11ARM: dts: mxs: add missing reg properties for GPIO banksStefan Wahren2-0/+8
This patch adds the missing reg properties for the MXS GPIO banks in order to fix the dtc warnings. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-11ARM: dts: imx6: add support for Auvidea H100 boardLucas Stach2-0/+396
The Auvidea H100 is a baseboard for the SolidRun MicroSOM. Its primary feature is a Toshiba TC358743 HDMI to CSI decoder, allowing the board to work as HDMI passthrough and framegrabber. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-11ARM: dts: imx6: tag boards that have the HW workaround for ERR006687Lucas Stach8-0/+8
Add the DT property to all boards that have the hardware workaround for erratum ERR006687 present. This allows the CPUidle driver to use the deep idle states, even if the FEC is active. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-11ARM: dts: imx6: fix IPU1 DI1 node nameJuergen Borleis2-3/+3
This node describes the DI1 port of IPU, fix the node name to reflect this. There's currently no user of this node in mainline, so this change should not break any supported platforms. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-11ARM: dts: imx6ul-14x14-evk: Add LCD and backlight supportFabio Estevam1-0/+48
Add support for the LCD8000-43T display and for the backlight controlled via PWM1. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-11ARM: dts: imx: Use generic uart-has-rtscts DT propertyGeert Uytterhoeven35-56/+56
As of commit 1006ed7e1b258dac ("serial: imx: Use generic uart-has-rtscts DT property"), the Freescale IMX UART driver recognizes the generic "uart-has-rtscts" DT property, deprecating the vendor-specific "fsl,uart-has-rtscts" DT property. Hence replace the latter by the former in all DTS files. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-11ARM: dts: imx28: Use generic uart-has-rtscts DT propertyGeert Uytterhoeven2-2/+2
As of commit 182cdcb8bb16e687 ("serial: mxs-auart: Use generic uart-has-rtscts DT property"), the Freescale MXS AUART driver recognizes the generic "uart-has-rtscts" DT property, deprecating the vendor-specific "fsl,uart-has-rtscts" DT property. Hence replace the latter by the former in all DTS files. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-10ARM: dts: mxs: Add SanDisk Sansa Fuze+ supportMarek Vasut2-0/+208
Add support for this small MP3 player based on STMP3780 (rev.3). Currently supported are both external microSD and internal SD-NAND bridge, PWM and USB gadget. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-10ARM: dts: mxs: Add Creative X-Fi3 supportMarek Vasut2-0/+180
Add support for this small MP3 player based on STMP3780 (rev.4). Currently supported is both external microSD and internal SD-NAND bridge, PWM and USB gadget. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-10ARM: dts: mxs: Add AUART2 pinmuxMarek Vasut1-0/+11
Add 2-pin pinmux settings for AUART2. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-10ARM: dts: mxs: Add SSP2 SD muxMarek Vasut1-0/+34
Add pinmux configuration for SSP2 port in SD mode, both for the 4-bit and 8-bit case. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-09ARM: dts: TS-4800: add CAN supportDamien Riegel1-0/+10
This enables support for the CAN controller located in the FPGA. Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-09ARM: dts: TS-4800: add FPGA's IRQ controller supportDamien Riegel1-0/+17
Enable FPGA's IRQ controller. It is in charge of dispatching interrupts generated by IPs in the FPGA. The SoC is notified that an interrupt occurred through a GPIO. Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-06ARM: dts: imx7d-pinfunc: add input mux for UART2 RX DTE modeStefan Agner1-1/+1
Add input mux for UART2 RX in DTE mode. This allows to use the pad UART2_TX_DATA_ALT0 as UART2 RX. This particular input select seems to be missing in current reference manuals (Rev. B), but when looking at the tables and other UART input select registers (e.g. UART3) it seems naturally that this input mux register also has a fourth pad option for UART2_TX_DATA_ALT0. It has also been proven to be required to use UART2 in DTE mode and the particular pads on the Colibri iMX7 platform. Signed-off-by: Stefan Agner <stefan@agner.ch> Acked-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-06ARM: dts: imx6ul-14x14-evk: Pass "fsl, sai-mclk-direction-output"Fabio Estevam1-0/+1
Pass "fsl,sai-mclk-direction-output" to the sai2 node, so that the SAI2_MCLK can be an output. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-06ARM: dts: imx6ul: Add SAI aliasFabio Estevam1-0/+3
Add SAI alias entries, which makes it possibe for the SAI driver to retrieve the port instance. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-06ARM: dts: imx: Remove unneeded unit-addressesFabio Estevam4-16/+16
Building with W=1 option leads to several warnings like: Warning (unit_address_vs_reg): Node /soc/aips-bus@02000000/anatop@020c8000/regulator-1p1@110 has a unit name, but no reg property Fix them by removing the unneeded unit-addresses. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-06ARM: dts: imx6sl: add clocks property for ocotp nodePeng Fan1-0/+1
Add clocks property for ocotp node. Signed-off-by: Peng Fan <van.freenix@gmail.com> Cc: Sascha Hauer <kernel@pengutronix.de> Cc: Rob Herring <robh+dt@kernel.org> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-06-06ARM: dts: imx6qdl: add clocks property for ocotp nodePeng Fan1-0/+1
Add clocks property for ocotp node. Signed-off-by: Peng Fan <van.freenix@gmail.com> Cc: Sascha Hauer <kernel@pengutronix.de> Cc: Rob Herring <robh+dt@kernel.org> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-05-29Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linusLinus Torvalds58-248/+353
Pull more MIPS updates from Ralf Baechle: "This is the secondnd batch of MIPS patches for 4.7. Summary: CPS: - Copy EVA configuration when starting secondary VPs. EIC: - Clear Status IPL. Lasat: - Fix a few off by one bugs. lib: - Mark intrinsics notrace. Not only are the intrinsics uninteresting, it would cause infinite recursion. MAINTAINERS: - Add file patterns for MIPS BRCM device tree bindings. - Add file patterns for mips device tree bindings. MT7628: - Fix MT7628 pinmux typos. - wled_an pinmux gpio. - EPHY LEDs pinmux support. Pistachio: - Enable KASLR VDSO: - Build microMIPS VDSO for microMIPS kernels. - Fix aliasing warning by building with `-fno-strict-aliasing' for debugging but also tracing them might result in recursion. Misc: - Add missing FROZEN hotplug notifier transitions. - Fix clk binding example for varioius PIC32 devices. - Fix cpu interrupt controller node-names in the DT files. - Fix XPA CPU feature separation. - Fix write_gc0_* macros when writing zero. - Add inline asm encoding helpers. - Add missing VZ accessor microMIPS encodings. - Fix little endian microMIPS MSA encodings. - Add 64-bit HTW fields and fix its configuration. - Fix sigreturn via VDSO on microMIPS kernel. - Lots of typo fixes. - Add definitions of SegCtl registers and use them" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (49 commits) MIPS: Add missing FROZEN hotplug notifier transitions MIPS: Build microMIPS VDSO for microMIPS kernels MIPS: Fix sigreturn via VDSO on microMIPS kernel MIPS: devicetree: fix cpu interrupt controller node-names MIPS: VDSO: Build with `-fno-strict-aliasing' MIPS: Pistachio: Enable KASLR MIPS: lib: Mark intrinsics notrace MIPS: Fix 64-bit HTW configuration MIPS: Add 64-bit HTW fields MAINTAINERS: Add file patterns for mips device tree bindings MAINTAINERS: Add file patterns for mips brcm device tree bindings MIPS: Simplify DSP instruction encoding macros MIPS: Add missing tlbinvf/XPA microMIPS encodings MIPS: Fix little endian microMIPS MSA encodings MIPS: Add missing VZ accessor microMIPS encodings MIPS: Add inline asm encoding helpers MIPS: Spelling fix lets -> let's MIPS: VR41xx: Fix typo MIPS: oprofile: Fix typo MIPS: math-emu: Fix typo ...
2016-05-29Merge branch 'hash' of git://ftp.sciencehorizons.net/linuxLinus Torvalds7-0/+204
Pull string hash improvements from George Spelvin: "This series does several related things: - Makes the dcache hash (fs/namei.c) useful for general kernel use. (Thanks to Bruce for noticing the zero-length corner case) - Converts the string hashes in <linux/sunrpc/svcauth.h> to use the above. - Avoids 64-bit multiplies in hash_64() on 32-bit platforms. Two 32-bit multiplies will do well enough. - Rids the world of the bad hash multipliers in hash_32. This finishes the job started in commit 689de1d6ca95 ("Minimal fix-up of bad hashing behavior of hash_64()") The vast majority of Linux architectures have hardware support for 32x32-bit multiply and so derive no benefit from "simplified" multipliers. The few processors that do not (68000, h8/300 and some models of Microblaze) have arch-specific implementations added. Those patches are last in the series. - Overhauls the dcache hash mixing. The patch in commit 0fed3ac866ea ("namei: Improve hash mixing if CONFIG_DCACHE_WORD_ACCESS") was an off-the-cuff suggestion. Replaced with a much more careful design that's simultaneously faster and better. (My own invention, as there was noting suitable in the literature I could find. Comments welcome!) - Modify the hash_name() loop to skip the initial HASH_MIX(). This would let us salt the hash if we ever wanted to. - Sort out partial_name_hash(). The hash function is declared as using a long state, even though it's truncated to 32 bits at the end and the extra internal state contributes nothing to the result. And some callers do odd things: - fs/hfs/string.c only allocates 32 bits of state - fs/hfsplus/unicode.c uses it to hash 16-bit unicode symbols not bytes - Modify bytemask_from_count to handle inputs of 1..sizeof(long) rather than 0..sizeof(long)-1. This would simplify users other than full_name_hash" Special thanks to Bruce Fields for testing and finding bugs in v1. (I learned some humbling lessons about "obviously correct" code.) On the arch-specific front, the m68k assembly has been tested in a standalone test harness, I've been in contact with the Microblaze maintainers who mostly don't care, as the hardware multiplier is never omitted in real-world applications, and I haven't heard anything from the H8/300 world" * 'hash' of git://ftp.sciencehorizons.net/linux: h8300: Add <asm/hash.h> microblaze: Add <asm/hash.h> m68k: Add <asm/hash.h> <linux/hash.h>: Add support for architecture-specific functions fs/namei.c: Improve dcache hash function Eliminate bad hash multipliers from hash_32() and hash_64() Change hash_64() return value to 32 bits <linux/sunrpc/svcauth.h>: Define hash_str() in terms of hashlen_string() fs/namei.c: Add hashlen_string() function Pull out string hash to <linux/stringhash.h>
2016-05-28h8300: Add <asm/hash.h>George Spelvin2-0/+54
This will improve the performance of hash_32() and hash_64(), but due to complete lack of multi-bit shift instructions on H8, performance will still be bad in surrounding code. Designing H8-specific hash algorithms to work around that is a separate project. (But if the maintainers would like to get in touch...) Signed-off-by: George Spelvin <linux@sciencehorizons.net> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: uclinux-h8-devel@lists.sourceforge.jp
2016-05-28microblaze: Add <asm/hash.h>George Spelvin2-0/+82
Microblaze is an FPGA soft core that can be configured various ways. If it is configured without a multiplier, the standard __hash_32() will require a call to __mulsi3, which is a slow software loop. Instead, use a shift-and-add sequence for the constant multiply. GCC knows how to do this, but it's not as clever as some. Signed-off-by: George Spelvin <linux@sciencehorizons.net> Cc: Alistair Francis <alistair.francis@xilinx.com> Cc: Michal Simek <michal.simek@xilinx.com>
2016-05-28m68k: Add <asm/hash.h>George Spelvin2-0/+60
This provides a multiply by constant GOLDEN_RATIO_32 = 0x61C88647 for the original mc68000, which lacks a 32x32-bit multiply instruction. Yes, the amount of optimization effort put in is excessive. :-) Shift-add chain found by Yevgen Voronenko's Hcub algorithm at http://spiral.ece.cmu.edu/mcm/gen.html Signed-off-by: George Spelvin <linux@sciencehorizons.net> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Greg Ungerer <gerg@linux-m68k.org> Cc: Andreas Schwab <schwab@linux-m68k.org> Cc: Philippe De Muyter <phdm@macq.eu> Cc: linux-m68k@lists.linux-m68k.org
2016-05-28<linux/hash.h>: Add support for architecture-specific functionsGeorge Spelvin1-0/+8
This is just the infrastructure; there are no users yet. This is modelled on CONFIG_ARCH_RANDOM; a CONFIG_ symbol declares the existence of <asm/hash.h>. That file may define its own versions of various functions, and define HAVE_* symbols (no CONFIG_ prefix!) to suppress the generic ones. Included is a self-test (in lib/test_hash.c) that verifies the basics. It is NOT in general required that the arch-specific functions compute the same thing as the generic, but if a HAVE_* symbol is defined with the value 1, then equality is tested. Signed-off-by: George Spelvin <linux@sciencehorizons.net> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Greg Ungerer <gerg@linux-m68k.org> Cc: Andreas Schwab <schwab@linux-m68k.org> Cc: Philippe De Muyter <phdm@macq.eu> Cc: linux-m68k@lists.linux-m68k.org Cc: Alistair Francis <alistai@xilinx.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: uclinux-h8-devel@lists.sourceforge.jp
2016-05-28MIPS: Add missing FROZEN hotplug notifier transitionsAnna-Maria Gleixner1-1/+1
The corresponding FROZEN hotplug notifier transitions used on suspend/resume are ignored. Therefore the switch case action argument is masked with the frozen hotplug notifier transition mask. Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: rt@linutronix.de Patchwork: https://patchwork.linux-mips.org/patch/13351/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-05-28MIPS: Build microMIPS VDSO for microMIPS kernelsJames Hogan1-0/+1
MicroMIPS kernels may be expected to run on microMIPS only cores which don't support the normal MIPS instruction set, so be sure to pass the -mmicromips flag through to the VDSO cflags. Fixes: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: <stable@vger.kernel.org> # 4.4.x- Patchwork: https://patchwork.linux-mips.org/patch/13349/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-05-28MIPS: Fix sigreturn via VDSO on microMIPS kernelJames Hogan1-8/+0
In microMIPS kernels, handle_signal() sets the isa16 mode bit in the vdso address so that the sigreturn trampolines (which are offset from the VDSO) get executed as microMIPS. However commit ebb5e78cc634 ("MIPS: Initial implementation of a VDSO") changed the offsets to come from the VDSO image, which already have the isa16 mode bit set correctly since they're extracted from the VDSO shared library symbol table. Drop the isa16 mode bit handling from handle_signal() to fix sigreturn for cores which support both microMIPS and normal MIPS. This doesn't fix microMIPS only cores, since the VDSO is still built for normal MIPS, but thats a separate problem. Fixes: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: <stable@vger.kernel.org> # 4.4.x- Patchwork: https://patchwork.linux-mips.org/patch/13348/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-05-28MIPS: devicetree: fix cpu interrupt controller node-namesAntony Pavlov6-6/+6
Here is the quote from [1]: The unit-address must match the first address specified in the reg property of the node. If the node has no reg property, the @ and unit-address must be omitted and the node-name alone differentiates the node from other nodes at the same level This patch adjusts MIPS dts-files and devicetree binding documentation in accordance with [1]. [1] Power.org(tm) Standard for Embedded Power Architecture(tm) Platform Requirements (ePAPR). Version 1.1 – 08 April 2011. Chapter 2.2.1.1 Node Name Requirements Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Cc: Rob Herring <robh+dt@kernel.org> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Kumar Gala <galak@codeaurora.org> Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13345/ Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-05-28MIPS: VDSO: Build with `-fno-strict-aliasing'Maciej W. Rozycki1-1/+2
Avoid an aliasing issue causing a build error in VDSO: In file included from include/linux/srcu.h:34:0, from include/linux/notifier.h:15, from ./arch/mips/include/asm/uprobes.h:9, from include/linux/uprobes.h:61, from include/linux/mm_types.h:13, from ./arch/mips/include/asm/vdso.h:14, from arch/mips/vdso/vdso.h:27, from arch/mips/vdso/gettimeofday.c:11: include/linux/workqueue.h: In function 'work_static': include/linux/workqueue.h:186:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] return *work_data_bits(work) & WORK_STRUCT_STATIC; ^ cc1: all warnings being treated as errors make[2]: *** [arch/mips/vdso/gettimeofday.o] Error 1 with a CONFIG_DEBUG_OBJECTS_WORK configuration and GCC 5.2.0. Include `-fno-strict-aliasing' along with compiler options used, as required for kernel code, fixing a problem present since the introduction of VDSO with commit ebb5e78cc634 ("MIPS: Initial implementation of a VDSO"). Thanks to Tejun for diagnosing this properly! Signed-off-by: Maciej W. Rozycki <macro@imgtec.com> Reviewed-by: James Hogan <james.hogan@imgtec.com> Fixes: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO") Cc: Tejun Heo <tj@kernel.org> Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org # v4.3+ Patchwork: https://patchwork.linux-mips.org/patch/13357/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-05-28MIPS: Pistachio: Enable KASLRMatt Redfearn2-2/+7
Allow KASLR to be selected on Pistachio based systems. Tested on a Creator Ci40. Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Reviewed-by: James Hogan <james.hogan@imgtec.com> Cc: Andrew Bresticker <abrestic@chromium.org> Cc: Jonas Gorski <jogo@openwrt.org> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13356/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-05-28MIPS: lib: Mark intrinsics notraceHarvey Hunt7-7/+7
On certain MIPS32 devices, the ftrace tracer "function_graph" uses __lshrdi3() during the capturing of trace data. ftrace then attempts to trace __lshrdi3() which leads to infinite recursion and a stack overflow. Fix this by marking __lshrdi3() as notrace. Mark the other compiler intrinsics as notrace in case the compiler decides to use them in the ftrace path. Signed-off-by: Harvey Hunt <harvey.hunt@imgtec.com> Cc: <linux-mips@linux-mips.org> Cc: <linux-kernel@vger.kernel.org> Cc: <stable@vger.kernel.org> # 4.2.x- Patchwork: https://patchwork.linux-mips.org/patch/13354/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-05-28MIPS: Fix 64-bit HTW configurationJames Hogan1-2/+12
The Hardware page Table Walker (HTW) is being misconfigured on 64-bit kernels. The PWSize.PS (pointer size) bit determines whether pointers within directories are loaded as 32-bit or 64-bit addresses, but was never being set to 1 for 64-bit kernels where the unsigned long in pgd_t is 64-bits wide. This actually reduces rather than improves performance when the HTW is enabled on P6600 since the HTW is initiated lots, but walks are all aborted due I think to bad intermediate pointers. Since we were already taking the width of the PTEs into account by setting PWSize.PTEW, which is the left shift applied to the page table index *in addition to* the native pointer size, we also need to reduce PTEW by 1 when PS=1. This is done by calculating PTEW based on the relative size of pte_t compared to pgd_t. Finally in order for the HTW to be used when PS=1, the appropriate XK/XS/XU bits corresponding to the different 64-bit segments need to be set in PWCtl. We enable only XU for now to enable walking for XUSeg. Supporting walking for XKSeg would be a bit more involved so is left for a future patch. It would either require the use of a per-CPU top level base directory if supported by the HTW (a bit like pgd_current but with a second entry pointing at swapper_pg_dir), or the HTW would prepend bit 63 of the address to the global directory index which doesn't really match how we split user and kernel page directories. Fixes: cab25bc7537b ("MIPS: Extend hardware table walking support to MIPS64") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13364/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-05-28MIPS: Add 64-bit HTW fieldsJames Hogan2-2/+14
Add field definitions for some of the 64-bit specific Hardware page Table Walker (HTW) register fields in PWSize and PWCtl, in preparation for fixing the 64-bit HTW configuration. Also print these fields out along with the others in print_htw_config(). Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13363/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-05-28MIPS: Simplify DSP instruction encoding macrosJames Hogan1-90/+17
Simplify the DSP instruction wrapper macros which use explicit encodings for microMIPS and normal MIPS by using the new encoding macros and removing duplication. To me this makes it easier to read since it is much shorter, but it also ensures .insn is used, preventing objdump disassembling the microMIPS code as normal MIPS. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13314/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-05-28MIPS: Add missing tlbinvf/XPA microMIPS encodingsJames Hogan1-5/+7
Hardcoded MIPS instruction encodings are provided for tlbinvf, mfhc0 & mthc0 instructions, but microMIPS encodings are missing. I doubt any microMIPS cores exist at present which support these instructions, but the microMIPS encodings exist, and microMIPS cores may support them in the future. Add the missing microMIPS encodings using the new macros. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13313/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-05-28MIPS: Fix little endian microMIPS MSA encodingsJames Hogan2-62/+58
When the toolchain doesn't support MSA we encode MSA instructions explicitly in assembly. Unfortunately we use .word for both MIPS and microMIPS encodings which is wrong, since 32-bit microMIPS instructions are made up from a pair of halfwords. - The most significant halfword always comes first, so for little endian builds the halves will be emitted in the wrong order. - 32-bit alignment isn't guaranteed, so the assembler may insert a 16-bit nop instruction to pad the instruction stream to a 32-bit boundary. Use the new instruction encoding macros to encode microMIPS MSA instructions correctly. Fixes: d96cc3d1ec5d ("MIPS: Add microMIPS MSA support.") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paul Burton <Paul.Burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13312/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-05-28MIPS: Add missing VZ accessor microMIPS encodingsJames Hogan1-9/+18
Toolchains may be used which support microMIPS but not VZ instructions (i.e. binutis 2.22 & 2.23), so extend the explicitly encoded versions of the guest COP0 register & guest TLB access macros to support microMIPS encodings too, using the new macros. This prevents non-microMIPS instructions being executed in microMIPS mode during CPU probe on cores supporting VZ (e.g. M5150), which cause reserved instruction exceptions early during boot. Fixes: bad50d79255a ("MIPS: Fix VZ probe gas errors with binutils <2.24") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13311/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>