From fdb44c1063e82a850fa173bc0f20908bc6479814 Mon Sep 17 00:00:00 2001 From: Aleksandar Markovic Date: Mon, 21 Aug 2017 14:24:48 +0200 Subject: BACKPORT: MIPS: math-emu: RINT.: Fix several problems by reimplementation Reimplement RINT. kernel emulation so that all RINT. specifications are met. For the sake of simplicity, let's analyze RINT.S only. Prior to this patch, RINT.S emulation was essentially implemented as (in pseudocode) = ieee754sp_flong(ieee754sp_tlong()), where ieee754sp_tlong() and ieee754sp_flong() are functions providing conversion from double to integer, and from integer to double, respectively. On surface, this implementation looks correct, but actually fails in many cases. Following problems were detected: 1. NaN and infinity cases will not be handled properly. The function ieee754sp_flong() never returns NaN nor infinity. 2. For RINT.S, for all inputs larger than LONG_MAX, and smaller than FLT_MAX, the result will be wrong, and the overflow exception will be erroneously set. A similar problem for negative inputs exists as well. 3. For some rounding modes, for some negative inputs close to zero, the return value will be zero, and should be -zero. This is because ieee754sp_flong() never returns -zero. This patch removes the problems above by implementing dedicated functions for RINT. emulation. The core of the new function functionality is adapted version of the core of the function ieee754sp_tlong(). However, there are many details that are implemented to match RINT. specification. It should be said that the functionality of ieee754sp_tlong() actually closely corresponds to CVT.L.S instruction, and it is used while emulating CVT.L.S. However, RINT.S and CVT.L.S instructions differ in many aspects. This patch fulfills missing support for RINT.. Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Cc: David S. Miller Cc: Douglas Leung Cc: Greg Kroah-Hartman Cc: Hans Verkuil Cc: James Hogan Cc: Maciej W. Rozycki Cc: Masahiro Yamada Cc: Mauro Carvalho Chehab Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: Randy Dunlap Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17141/ Signed-off-by: Ralf Baechle (cherry picked from commit 3ec404d88cefbe42d96a46f20f554f8366d64c33) Conflicts: MAINTAINERS Signed-off-by: Greg Kroah-Hartman --- MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'MAINTAINERS') diff --git a/MAINTAINERS b/MAINTAINERS index 263e4dfb3fb0..bbdff393fa2f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7054,6 +7054,13 @@ S: Supported F: Documentation/mips/ F: arch/mips/ +MIPS RINT INSTRUCTION EMULATION +M: Aleksandar Markovic +L: linux-mips@linux-mips.org +S: Supported +F: arch/mips/math-emu/sp_rint.c +F: arch/mips/math-emu/dp_rint.c + MIROSOUND PCM20 FM RADIO RECEIVER DRIVER M: Hans Verkuil L: linux-media@vger.kernel.org -- cgit v1.2.3 From 150e79518f3095f73a6d2c6fe7e80c1a083fbca9 Mon Sep 17 00:00:00 2001 From: Aleksandar Markovic Date: Fri, 18 Aug 2017 15:08:53 +0200 Subject: BACKPORT: dt-bindings: Add device tree binding for Goldfish RTC driver Add documentation for DT binding of Goldfish RTC driver. The compatible string used by OS for binding the driver is "google,goldfish-rtc". Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Signed-off-by: Alexandre Belloni (cherry picked from commit 7a08de1d8fd27ac60ed8ce7a15efb88471014080) Conflicts: MAINTAINERS Signed-off-by: Greg Kroah-Hartman --- MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'MAINTAINERS') diff --git a/MAINTAINERS b/MAINTAINERS index bbdff393fa2f..dc56d4d951b2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -756,6 +756,11 @@ S: Supported F: drivers/android/ F: drivers/staging/android/ +ANDROID GOLDFISH RTC DRIVER +M: Miodrag Dinic +S: Supported +F: Documentation/devicetree/bindings/rtc/google,goldfish-rtc.txt + AOA (Apple Onboard Audio) ALSA DRIVER M: Johannes Berg L: linuxppc-dev@lists.ozlabs.org -- cgit v1.2.3 From e33cff3589a728d0f0f4e2800a7d1ead7f031636 Mon Sep 17 00:00:00 2001 From: Miodrag Dinic Date: Fri, 18 Aug 2017 15:08:54 +0200 Subject: UPSTREAM: rtc: goldfish: Add RTC driver for Android emulator Add device driver for a virtual RTC device in Android emulator. The compatible string used by OS for binding the driver is defined as "google,goldfish-rtc". Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Signed-off-by: Alexandre Belloni (cherry picked from commit f22d9cdcb5eb7ed1c4629a167474d68df0003a3d) Signed-off-by: Greg Kroah-Hartman --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) (limited to 'MAINTAINERS') diff --git a/MAINTAINERS b/MAINTAINERS index dc56d4d951b2..a9925754dd49 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -760,6 +760,7 @@ ANDROID GOLDFISH RTC DRIVER M: Miodrag Dinic S: Supported F: Documentation/devicetree/bindings/rtc/google,goldfish-rtc.txt +F: drivers/rtc/rtc-goldfish.c AOA (Apple Onboard Audio) ALSA DRIVER M: Johannes Berg -- cgit v1.2.3 From 848a96c7c180a528ac79b0ab73886842f707ec8e Mon Sep 17 00:00:00 2001 From: Aleksandar Markovic Date: Fri, 20 Oct 2017 16:27:44 +0200 Subject: UPSTREAM: MIPS: Update RINT emulation maintainer email address Change all relevant instances of aleksandar.markovic@imgtec.com email address to aleksandar.markovic@mips.com. Signed-off-by: Miodrag Dinic Signed-off-by: Aleksandar Markovic Patchwork: https://patchwork.linux-mips.org/patch/17514/ Signed-off-by: James Hogan (cherry picked from commit 89677e44b26ef49fd57208c7885fdd729b3724e5) Signed-off-by: Greg Kroah-Hartman --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MAINTAINERS') diff --git a/MAINTAINERS b/MAINTAINERS index a9925754dd49..d24aa29fdb13 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7061,7 +7061,7 @@ F: Documentation/mips/ F: arch/mips/ MIPS RINT INSTRUCTION EMULATION -M: Aleksandar Markovic +M: Aleksandar Markovic L: linux-mips@linux-mips.org S: Supported F: arch/mips/math-emu/sp_rint.c -- cgit v1.2.3 From 960cfd07111c3ec84829bb2665d9baf506e126bf Mon Sep 17 00:00:00 2001 From: Aleksandar Markovic Date: Fri, 20 Oct 2017 16:27:45 +0200 Subject: UPSTREAM: MIPS: Update Goldfish RTC driver maintainer email address Change all relevant instances of miodrag.dinic@imgtec.com email address to miodrag.dinic@mips.com. Signed-off-by: Miodrag Dinic Signed-off-by: Aleksandar Markovic Patchwork: https://patchwork.linux-mips.org/patch/17515/ [jhogan@kernel.org: Fix .mailmap direction] Signed-off-by: James Hogan (cherry picked from commit 0464a53eba0af434b8516c2e01d881aa587cd517) Signed-off-by: Greg Kroah-Hartman --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MAINTAINERS') diff --git a/MAINTAINERS b/MAINTAINERS index d24aa29fdb13..48bf18de18bb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -757,7 +757,7 @@ F: drivers/android/ F: drivers/staging/android/ ANDROID GOLDFISH RTC DRIVER -M: Miodrag Dinic +M: Miodrag Dinic S: Supported F: Documentation/devicetree/bindings/rtc/google,goldfish-rtc.txt F: drivers/rtc/rtc-goldfish.c -- cgit v1.2.3 From 4d143413ce843f4960fbdb5177b8aae6ab778296 Mon Sep 17 00:00:00 2001 From: Miodrag Dinic Date: Fri, 29 Dec 2017 16:41:45 +0100 Subject: UPSTREAM: dt-bindings/goldfish-pic: Add device tree binding for Goldfish PIC driver Add documentation for DT binding of Goldfish PIC driver. The compatible string used by OS for binding the driver is "google,goldfish-pic". Acked-by: Rob Herring Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Signed-off-by: Marc Zyngier (cherry picked from commit c2ba80af4805543ace4928191d877ffe706087e1) Signed-off-by: Greg Kroah-Hartman --- MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'MAINTAINERS') diff --git a/MAINTAINERS b/MAINTAINERS index 48bf18de18bb..84e5fdb02fb9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -756,6 +756,11 @@ S: Supported F: drivers/android/ F: drivers/staging/android/ +ANDROID GOLDFISH PIC DRIVER +M: Miodrag Dinic +S: Supported +F: Documentation/devicetree/bindings/interrupt-controller/google,goldfish-pic.txt + ANDROID GOLDFISH RTC DRIVER M: Miodrag Dinic S: Supported -- cgit v1.2.3 From 0e3eb81e608af3e2bbfb8aa49f8f6ab6e7bc5df1 Mon Sep 17 00:00:00 2001 From: Miodrag Dinic Date: Fri, 29 Dec 2017 16:41:46 +0100 Subject: BACKPORT: irqchip/irq-goldfish-pic: Add Goldfish PIC driver Add device driver for a virtual programmable interrupt controller The virtual PIC is designed as a device tree-based interrupt controller. The compatible string used by OS for binding the driver is "google,goldfish-pic". Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Signed-off-by: Marc Zyngier (cherry picked from commit 4235ff50cf98dd42ba15175687570f9f03e124a1) Conflicts: drivers/irqchip/Kconfig drivers/irqchip/Makefile drivers/irqchip/irq-goldfish-pic.c Signed-off-by: Greg Kroah-Hartman --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) (limited to 'MAINTAINERS') diff --git a/MAINTAINERS b/MAINTAINERS index 84e5fdb02fb9..0d2266dad653 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -760,6 +760,7 @@ ANDROID GOLDFISH PIC DRIVER M: Miodrag Dinic S: Supported F: Documentation/devicetree/bindings/interrupt-controller/google,goldfish-pic.txt +F: drivers/irqchip/irq-goldfish-pic.c ANDROID GOLDFISH RTC DRIVER M: Miodrag Dinic -- cgit v1.2.3 From 39678d21f51ce3b13f897ddbdc1b9c6d5e25f0e6 Mon Sep 17 00:00:00 2001 From: Paul Burton Date: Fri, 2 Jun 2017 12:29:56 -0700 Subject: BACKPORT: MIPS: generic: Add a MAINTAINERS entry Add an entry to MAINTAINERS for the generic platform code, such that relevant people, starting with myself, can be CC'd on patches. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16186/ Signed-off-by: Ralf Baechle (cherry picked from commit 032a469b1e6ef02209308a5b107c10beb4b12fb6) Conflicts: MAINTAINERS Signed-off-by: Greg Kroah-Hartman --- MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'MAINTAINERS') diff --git a/MAINTAINERS b/MAINTAINERS index 0d2266dad653..a1ec446c3358 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7066,6 +7066,12 @@ S: Supported F: Documentation/mips/ F: arch/mips/ +MIPS GENERIC PLATFORM +M: Paul Burton +L: linux-mips@linux-mips.org +S: Supported +F: arch/mips/generic/ + MIPS RINT INSTRUCTION EMULATION M: Aleksandar Markovic L: linux-mips@linux-mips.org -- cgit v1.2.3 From 7bad331b2528a21da3c4d981904c5ffe502c3573 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Tue, 2 Aug 2016 14:07:24 -0700 Subject: UPSTREAM: config: add android config fragments Copy the config fragments from the AOSP common kernel android-4.4 branch. It is becoming possible to run mainline kernels with Android, but the kernel defconfigs don't work as-is and debugging missing config options is a pain. Adding the config fragments into the kernel tree, makes configuring a mainline kernel as simple as: make ARCH=arm multi_v7_defconfig android-base.config android-recommended.config The following non-upstream config options were removed: CONFIG_NETFILTER_XT_MATCH_QTAGUID CONFIG_NETFILTER_XT_MATCH_QUOTA2 CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG CONFIG_PPPOLAC CONFIG_PPPOPNS CONFIG_SECURITY_PERF_EVENTS_RESTRICT CONFIG_USB_CONFIGFS_F_MTP CONFIG_USB_CONFIGFS_F_PTP CONFIG_USB_CONFIGFS_F_ACC CONFIG_USB_CONFIGFS_F_AUDIO_SRC CONFIG_USB_CONFIGFS_UEVENT CONFIG_INPUT_KEYCHORD CONFIG_INPUT_KEYRESET Link: http://lkml.kernel.org/r/1466708235-28593-1-git-send-email-robh@kernel.org Signed-off-by: Rob Herring Cc: Amit Pundir Cc: John Stultz Cc: Dmitry Shmidt Cc: Rom Lemarchand Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds (cherry picked from commit 27eb6622ab67bad75814c9b7b08096cfb16be63a) Signed-off-by: Greg Kroah-Hartman --- MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'MAINTAINERS') diff --git a/MAINTAINERS b/MAINTAINERS index a1ec446c3358..46da781dae65 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -746,6 +746,11 @@ W: http://ez.analog.com/community/linux-device-drivers S: Supported F: drivers/dma/dma-axi-dmac.c +ANDROID CONFIG FRAGMENTS +M: Rob Herring +S: Supported +F: kernel/configs/android* + ANDROID DRIVERS M: Greg Kroah-Hartman M: Arve Hjønnevåg -- cgit v1.2.3 From 22904b58933d0d2cfe3e9c0014d02a198320a5c9 Mon Sep 17 00:00:00 2001 From: Paul Burton Date: Fri, 19 Jan 2018 16:40:48 +0100 Subject: FROMLIST: dt-bindings: Document mti,mips-cpc binding Document a binding for the MIPS Cluster Power Controller (CPC) that allows the device tree to specify where the CPC registers are located. Signed-off-by: Paul Burton Signed-off-by: Aleksandar Markovic Reviewed-by: Rob Herring (cherry picked from: https://patchwork.linux-mips.org/patch/18512/) Signed-off-by: Greg Kroah-Hartman --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) (limited to 'MAINTAINERS') diff --git a/MAINTAINERS b/MAINTAINERS index 46da781dae65..f5e6e92ec41b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7075,6 +7075,7 @@ MIPS GENERIC PLATFORM M: Paul Burton L: linux-mips@linux-mips.org S: Supported +F: Documentation/devicetree/bindings/power/mti,mips-cpc.txt F: arch/mips/generic/ MIPS RINT INSTRUCTION EMULATION -- cgit v1.2.3 From 0bc65cbcc33545f1718ea8a98272be931780271b Mon Sep 17 00:00:00 2001 From: Miodrag Dinic Date: Fri, 29 Dec 2017 16:41:47 +0100 Subject: FROMLIST: MIPS: ranchu: Add Ranchu as a new generic-based board Provide amendments to the MIPS generic platform framework so that the new generic-based board Ranchu can be chosen to be built. The Ranchu board is intended to be used by Android emulator. The name "Ranchu" originates from Android development community. "Goldfish" and "Ranchu" are terms used for two generations of virtual boards used by Android emulator. The name "Ranchu" is a newer one among the two, and this patch deals with Ranchu. However, for historical reasons, some devices/drivers still contain the name "Goldfish". MIPS Ranchu machine includes a number of Goldfish devices. The support for Virtio devices is also included. Ranchu board supports up to 16 Virtio devices which can be attached using Virtio MMIO Bus. This is summarized in the following picture: ABUS ||----MIPS CPU || | IRQs ||----Goldfish PIC------------(32)-------- || | | | | | | | | | ||----Goldfish TTY------ | | | | | | | | || | | | | | | | | ||----Goldfish RTC-------- | | | | | | | || | | | | | | | ||----Goldfish FB----------- | | | | | | || | | | | | | ||----Goldfish Events--------- | | | | | || | | | | | ||----Goldfish Audio------------ | | | | || | | | | ||----Goldfish Battery------------ | | | || | | | ||----Android PIPE------------------ | | || | | ||----Virtio MMIO Bus | | || | | | | | || | | (virtio-block)--------- | || (16) | | || | (virtio-net)------------------ Device Tree is created on the QEMU side based on the information about devices IO map and IRQ numbers. Kernel will load this DTB using UHI boot protocol DTB handover mode. Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Reviewed-by: James Hogan (cherry picked from: https://patchwork.linux-mips.org/patch/18138/) Signed-off-by: Greg Kroah-Hartman --- MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'MAINTAINERS') diff --git a/MAINTAINERS b/MAINTAINERS index f5e6e92ec41b..8368ad504c57 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8887,6 +8887,13 @@ S: Maintained F: Documentation/blockdev/ramdisk.txt F: drivers/block/brd.c +RANCHU VIRTUAL BOARD FOR MIPS +M: Miodrag Dinic +L: linux-mips@linux-mips.org +S: Supported +F: arch/mips/generic/board-ranchu.c +F: arch/mips/configs/generic/board-ranchu.config + RANDOM NUMBER DRIVER M: "Theodore Ts'o" S: Maintained -- cgit v1.2.3