Commit Graph

9331 Commits

Author SHA1 Message Date
Mark Rutland 386b3c7bda arm64: add EXPORT_SYMBOL_NOKASAN()
So that we can export symbols directly from assembly files, let's make
use of the generic <asm/export.h>. We have a few symbols that we'll want
to conditionally export for !KASAN kernel builds, so we add a helper for
that in <asm/assembler.h>.

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>
2018-12-10 11:50:11 +00:00
Mark Rutland 03ef055fd3 arm64: move memstart_addr export inline
Since we define memstart_addr in a C file, we can have the export
immediately after the definition of the symbol, as we do elsewhere.

As a step towards removing arm64ksyms.c, move the export of
memstart_addr to init.c, where the symbol is defined.

There should be no functional change as a result of this patch.

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>
2018-12-10 11:50:11 +00:00
Mark Rutland 2d7c89b02c arm64: remove bitop exports
Now that the arm64 bitops are inlines built atop of the regular atomics,
we don't need to export anything.

Remove the redundant exports.

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>
2018-12-10 11:50:11 +00:00
Greg Kroah-Hartman c4aa8b2a8b Merge 4.20-rc6 into char-misc-next
This should resolve the hv driver merge conflict.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-10 09:22:34 +01:00
Olof Johansson 0603a9a846 mvebu fixes for 4.20
Adding CPU Idle state in the device tree for Armada 8040 seems to
 breaks boot on some board, so let's revert it waiting for a better
 solution.
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQYqXDMF3cvSLY+g9cLBhiOFHI71QUCXAuDHQAKCRALBhiOFHI7
 1c27AJ0ddbDv84YeIAMDGt7ne2W0sjfaTACeIMt0Gk3yNonkTHSnfISzZ9p1Cu4=
 =vrYg
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-fixes-4.20-1' of git://git.infradead.org/linux-mvebu into fixes

mvebu fixes for 4.20

Adding CPU Idle state in the device tree for Armada 8040 seems to
breaks boot on some board, so let's revert it waiting for a better
solution.

* tag 'mvebu-fixes-4.20-1' of git://git.infradead.org/linux-mvebu:
  Revert "arm64: dts: marvell: add CPU Idle power state support on Armada 7K/8K"

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-12-09 10:28:02 -08:00
Steven Rostedt (VMware) 421d1069cd arm64: function_graph: Remove use of FTRACE_NOTRACE_DEPTH
Functions in the set_graph_notrace no longer subtract FTRACE_NOTRACE_DEPTH
from curr_ret_stack, as that is now implemented via the trace_recursion
flags. Access to curr_ret_stack no longer needs to worry about checking for
this. curr_ret_stack is still initialized to -1, when there's not a shadow
stack allocated.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Acked-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2018-12-08 20:53:38 -05:00
Linus Torvalds 570c9139c3 A few clk driver fixes this time:
- Introduce protected-clock DT binding to fix breakage on qcom sdm845-mtp
    boards where the qspi clks introduced this merge window cause the
    firmware on those boards to take down the system if we try to read
    the clk registers
 
  - Fix a couple off-by-one errors found by Dan Carpenter
 
  - Handle failure in zynq fixed factor clk driver to avoid using
    uninitialized data
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEE9L57QeeUxqYDyoaDrQKIl8bklSUFAlwLBpERHHNib3lkQGtl
 cm5lbC5vcmcACgkQrQKIl8bklSUmVRAAuswyoavqTsj09/lhEeM1w8f+2QlnCFb2
 6kUuVYmQP35u2MhuXv0sHwe1Gnnf5dL4r1d2TwCdZDTJxGIT6lbkLmeKxJzeAJzO
 TgVCSNxTfwNyAAY16tFSdY3sigjQCFL+0LrKTh8ID6Ub05xz2NUZ17d0eC8WTsn1
 6O66QBzCOAWvJ6LO8ktnpLpRUQAoECjKs9Vn2bnpBV+jxnuqthaD6LbK/snzNgI1
 NE+CKeFjs1bFP4WiXUn7HATw+GQxmMN3MOB9KSd36OILQYA5eMYS0voJW6V/LmJv
 5HImYCPc+vBhptLWflzQrbGmGV57zTH3V6OVXd0BD/tBxbIF/l56Xpv8YDC0ahe3
 RklehCka/o+cF7O9/sRLwLKKNYVNJs+JOX+MxJ3Pv/ANMaeZepMtTII38IcJFKQS
 aVXKbAwHvxWDI88PmdykO2gS5Nu6sdjkriQ63FdvRFL9UmnCTl3ruk/9Ww8aV04v
 cwwHJlw6sHVcRnzHJidh3UAyvEY8cSD9nbS2zV+xbiw1nR3S94hTx05N4UCc2Q/6
 7dRlZ9B+STni4YOnQlU0u6ApICrZEkcZk30dW7bX154x9WKbX7yusOCrpHa2Bx5b
 xvdNmuiSjNjLjmi2ZR0nFF/DAhBW9dAva/keeV7IC0Gilakgp33/MvUiLPFZ0piz
 5/vCWZx88FY=
 =t1kp
 -----END PGP SIGNATURE-----

Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux

Pull clk fixes from Stephen Boyd:
 "A few clk driver fixes this time:

   - Introduce protected-clock DT binding to fix breakage on qcom
     sdm845-mtp boards where the qspi clks introduced this merge window
     cause the firmware on those boards to take down the system if we
     try to read the clk registers

   - Fix a couple off-by-one errors found by Dan Carpenter

   - Handle failure in zynq fixed factor clk driver to avoid using
     uninitialized data"

* tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
  clk: zynqmp: Off by one in zynqmp_is_valid_clock()
  clk: mmp: Off by one in mmp_clk_add()
  clk: mvebu: Off by one bugs in cp110_of_clk_get()
  arm64: dts: qcom: sdm845-mtp: Mark protected gcc clocks
  clk: qcom: Support 'protected-clocks' property
  dt-bindings: clk: Introduce 'protected-clocks' property
  clk: zynqmp: handle fixed factor param query error
2018-12-08 11:33:26 -08:00
Baruch Siach dfc1259a3f arm64: dts: clearfog-gt-8k: describe mini-PCIe CON2 USB
Enable the USB3 peripheral that is wired to CON2 on the Clearfog GT-8K
board.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-12-08 09:26:51 +01:00
Russell King b1f0bbe270 arm64: dts: add support for Macchiatobin Single Shot board
Add DT support for the Macchiatobin Single Shot board from SolidRun,
which is similar to the Double Shot board, but does not have the
10G 3310 PHYs - the two ethernet ports are instead connected directly
to the SFP+ cages.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-12-08 09:26:51 +01:00
Ding Tao 43ebc7c1b3 arm64: dts: marvell: armada-37xx: Enable emmc on espressobin
The ESPRESSObin board has a emmc interface available on U11: declare it
and let the bootloader enable it if the emmc is present.

[gregory.clement@bootlin.com: disable the emmc by default]
Signed-off-by: Ding Tao <miyatsu@qq.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-12-08 09:25:10 +01:00
Peng Ma 58f5fa6837 arm64: dts: ls1046a: add qdma device tree nodes
add the qDMA device tree nodes for LS1046A devices.

Signed-off-by: Wen He <wen.he_1@nxp.com>
Signed-off-by: Peng Ma <peng.ma@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2018-12-08 10:28:39 +08:00
Peng Ma 29813f669d arm64: dts: ls1043a: add qdma device tree nodes
add the qDMA device tree nodes for LS1043A devices.

Signed-off-by: Wen He <wen.he_1@nxp.com>
Signed-off-by: Peng Ma <peng.ma@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2018-12-08 10:28:39 +08:00
Ioana Ciocoi Radulescu d9a71ef086 arm64: dts: ls1088a: Add missing dma-ranges property
LS1088A has a 48-bit address size so make sure that the
dma-ranges property reflects this.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2018-12-08 10:28:38 +08:00
Ioana Ciocoi Radulescu a2468676cc arm64: dts: ls1088a: Move fsl-mc node
The fsl-mc node should sit under the soc node, so move it to
its proper location.

Fixes: ac7c9ff741 ("arm64: dts: ls1088a: add fsl-mc hardware resource manager node")
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2018-12-08 10:28:38 +08:00
Viresh Kumar c9a1f24304 arm64: dts: fsl: Add all CPUs in cooling maps
Each CPU can (and does) participate in cooling down the system but the
DT only captures a handful of them, normally CPU0, in the cooling maps.
Things work by chance currently as under normal circumstances its the
first CPU of each cluster which is used by the operating systems to
probe the cooling devices. But as soon as this CPU ordering changes and
any other CPU is used to bring up the cooling device, we will start
seeing failures.

Also the DT is rather incomplete when we list only one CPU in the
cooling maps, as the hardware doesn't have any such limitations.

Update cooling maps to include all devices affected by individual trip
points.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2018-12-08 10:28:38 +08:00
Bhaskar Upadhaya 8897f3255c arm64: dts: Add support for NXP LS1028A SoC
LS1028A contains two ARM v8 CortexA72 processor cores
with 32 KB L1-D cache and 48 KB L1-I cache

Features summary
 Two 32-bit / 64-bit ARM v8 Cortex-A72 CPUs
  - Arranged as single clusters of two cores sharing a 1 MB L2 cache
  - Speed Up to 1.3 GHz
  - Support for cluster power-gating.
 Cache coherent interconnect (CCI-400)
  - Hardware-managed data coherency
  - Up to 400 MHz
 32-bit DDR4 SDRAM memory controller with ECC
 Two PCIe 3.0 controllers
 One serial ATA (SATA 3.0) controller
 Two high-speed USB 3.0 controllers with integrated PHY

 Following levels of DTSI/DTS files have been created for the LS1028A
  SoC family:

         - fsl-ls1028a.dtsi:
                 DTS-Include file for NXP LS1028A SoC.

         - fsl-ls1028a-qds.dts:
                 DTS file for NXP LS1028A QDS board.

         - fsl-ls1028a-rdb.dts:
                 DTS file for NXP LS1028A RDB board

Signed-off-by: Sudhanshu Gupta <sudhanshu.gupta@nxp.com>
Signed-off-by: Rai Harninder <harninder.rai@nxp.com>
Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
Acked-by: Li Yang <leoyang.li@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2018-12-08 10:28:38 +08:00
Hou Zhiqiang 1fa35bc09d arm64: dts: layerscape: removed compatible string "snps,dw-pcie"
Removed the wrong compatible string "snps,dw-pcie", in case
match incorrect driver.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2018-12-08 10:28:38 +08:00
Bao Xiaowei aa2aa88847 arm64: dts: fsl: Add the status property disable PCIe
Add the status property disable the PCIe, the property will be enable
by bootloader.

Signed-off-by: Bao Xiaowei <xiaowei.bao@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2018-12-08 10:28:37 +08:00
Pramod Kumar 26a06c6e29 arm64: dts: ls1012a: Add FRWY-LS1012A board support
LS1012A-FRWY is an ls1012a based SoC board.
Key features of this board are  Micro SD, USB 3.0,
upto 1GB DDR, UART

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2018-12-08 10:28:37 +08:00
Carlo Caione 8b3e6f8999 arm64: dts: meson: Fix IRQ trigger type for macirq
A long running stress test on a custom board shipping an AXG SoCs and a
Realtek RTL8211F PHY revealed that after a few hours the connection
speed would drop drastically, from ~1000Mbps to ~3Mbps. At the same time
the 'macirq' (eth0) IRQ would stop being triggered at all and as
consequence the GMAC IRQs never ACKed.

After a painful investigation the problem seemed to be due to a wrong
defined IRQ type for the GMAC IRQ that should be LEVEL_HIGH instead of
EDGE_RISING.

The change in the macirq IRQ type also solved another long standing
issue affecting this SoC/PHY where EEE was causing the network
connection to die after stressing it with iperf3 (even though much
sooner). It's now possible to remove the 'eee-broken-1000t' quirk as
well.

Fixes: feb3cbea09 ("ARM64: dts: meson-gxbb-odroidc2: fix GbE tx link breakage")
Fixes: 6d28d57751 ("ARM64: dts: meson-axg: fix ethernet stability issue")
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Tested-by: Jerome Brunet <jbrunet@baylibre.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-12-07 13:48:58 -08:00
Carlo Caione cbddb02e37 arm64: dts: meson-axg: Enable GPIO interrupt controller
Enable the GPIO interrupt controller for the AXG SoCs.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Tested-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-12-07 13:47:59 -08:00
Carlo Caione de7c2fa5fc arm64: dts: meson-axg: s400: Enable PHY interrupt
Now that the GPIO controller has been enabled also on AXG we can hook up
the GPIO interrupt for the PHY.

Tested-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-12-07 13:46:20 -08:00
Manu Gautam 1504b91c81 arm64: dts: msm8996: Use dwc3-qcom glue driver for USB
Move from dwc3-of-simple to dwc3-qcom glue driver to
support peripheral mode which requires qscratch wrapper
programming on VBUS event.

Fixes: a4333c3a6b ("usb: dwc3: Add Qualcomm DWC3 glue driver")
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Tested-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-12-07 14:10:56 -06:00
Andy Gross 818046ebe2 arm64: dts: qcom: msm8998: Fixup clock to use xo_board
This patch sets the msm8998 xo clock name back to xo_board.  Recent
clock tree changes fixed the clock tree and the change to the xo name
is causing issues where msm8998 boards do not boot properly.  Let's
change it back and leave the xo label on it.

Fixes: 634da3307b (arm64: dts: qcom: msm8998: correct xo clock name)
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Jeffrey Hugo <jhugo@codeaurora.org>
2018-12-07 14:10:48 -06:00
Will Deacon 4230509978 arm64: cmpxchg: Use "K" instead of "L" for ll/sc immediate constraint
The "L" AArch64 machine constraint, which we use for the "old" value in
an LL/SC cmpxchg(), generates an immediate that is suitable for a 64-bit
logical instruction. However, for cmpxchg() operations on types smaller
than 64 bits, this constraint can result in an invalid instruction which
is correctly rejected by GAS, such as EOR W1, W1, #0xffffffff.

Whilst we could special-case the constraint based on the cmpxchg size,
it's far easier to change the constraint to "K" and put up with using
a register for large 64-bit immediates. For out-of-line LL/SC atomics,
this is all moot anyway.

Reported-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-07 17:28:13 +00:00
Will Deacon 959bf2fd03 arm64: percpu: Rewrite per-cpu ops to allow use of LSE atomics
Our percpu code is a bit of an inconsistent mess:

  * It rolls its own xchg(), but reuses cmpxchg_local()
  * It uses various different flavours of preempt_{enable,disable}()
  * It returns values even for the non-returning RmW operations
  * It makes no use of LSE atomics outside of the cmpxchg() ops
  * There are individual macros for different sizes of access, but these
    are all funneled through a switch statement rather than dispatched
    directly to the relevant case

This patch rewrites the per-cpu operations to address these shortcomings.
Whilst the new code is a lot cleaner, the big advantage is that we can
use the non-returning ST- atomic instructions when we have LSE.

Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-07 17:28:06 +00:00
Will Deacon b4f9209bfc arm64: Avoid masking "old" for LSE cmpxchg() implementation
The CAS instructions implicitly access only the relevant bits of the "old"
argument, so there is no need for explicit masking via type-casting as
there is in the LL/SC implementation.

Move the casting into the LL/SC code and remove it altogether for the LSE
implementation.

Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-07 17:28:01 +00:00
Will Deacon 5ef3fe4cec arm64: Avoid redundant type conversions in xchg() and cmpxchg()
Our atomic instructions (either LSE atomics of LDXR/STXR sequences)
natively support byte, half-word, word and double-word memory accesses
so there is no need to mask the data register prior to being stored.

Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-07 17:27:55 +00:00
Will Deacon b4aecf7808 arm64: hibernate: Avoid sending cross-calling with interrupts disabled
Since commit 3b8c9f1cdf ("arm64: IPI each CPU after invalidating the
I-cache for kernel mappings"), a call to flush_icache_range() will use
an IPI to cross-call other online CPUs so that any stale instructions
are flushed from their pipelines. This triggers a WARN during the
hibernation resume path, where flush_icache_range() is called with
interrupts disabled and is therefore prone to deadlock:

  | Disabling non-boot CPUs ...
  | CPU1: shutdown
  | psci: CPU1 killed.
  | CPU2: shutdown
  | psci: CPU2 killed.
  | CPU3: shutdown
  | psci: CPU3 killed.
  | WARNING: CPU: 0 PID: 1 at ../kernel/smp.c:416 smp_call_function_many+0xd4/0x350
  | Modules linked in:
  | CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.20.0-rc4 #1

Since all secondary CPUs have been taken offline prior to invalidating
the I-cache, there's actually no need for an IPI and we can simply call
__flush_icache_range() instead.

Cc: <stable@vger.kernel.org>
Fixes: 3b8c9f1cdf ("arm64: IPI each CPU after invalidating the I-cache for kernel mappings")
Reported-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Tested-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Tested-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-12-07 15:52:39 +00:00
James Morse 394135c1ff arm64: kexec_file: forbid kdump via kexec_file_load()
Now that kexec_walk_memblock() can do the crash-kernel placement itself
architectures that don't support kdump via kexe_file_load() need to
explicitly forbid it.

We don't support this on arm64 until the kernel can add the elfcorehdr
and usable-memory-range fields to the DT. Without these the crash-kernel
overwrites the previous kernel's memory during startup.

Add a check to refuse crash image loading.

Reviewed-by: Bhupesh Sharma <bhsharma@redhat.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-07 15:28:21 +00:00
Will Deacon 3962446922 arm64: preempt: Provide our own implementation of asm/preempt.h
The asm-generic/preempt.h implementation doesn't make use of the
PREEMPT_NEED_RESCHED flag, since this can interact badly with load/store
architectures which rely on the preempt_count word being unchanged across
an interrupt.

However, since we're a 64-bit architecture and the preempt count is
only 32 bits wide, we can simply pack it next to the resched flag and
load the whole thing in one go, so that a dec-and-test operation doesn't
need to load twice.

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-07 12:35:53 +00:00
Thierry Reding 611a1c69f8 arm64: tegra: Set reg property for display-hub on Tegra194
Technically the display-hub driver could access registers via the
specified region, though it practice it will do so via the display
controllers' register regions.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-07 12:57:26 +01:00
Thierry Reding ffa1ad89dd arm64: tegra: Set reg property for display-hub on Tegra186
Technically the display-hub driver could access registers via the
specified region, though it practice it will do so via the display
controllers' register regions.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-07 12:57:14 +01:00
Chen-Yu Tsai 44ff3cafcd arm64: dts: allwinner: a64: Fix up RTC device node and clock references
The RTC module on the A64 was claimed to be the same as on the A31, when
in fact it is not. It is actually compatible to the H3's RTC. The A64's
RTC has some extra crypto-related registers which the H3's does not, but
the exact function of these is not clear.

This patch fixes the compatible string and clock properties to conform
to the updated bindings. The device node for the internal oscillator is
removed, as it is internalized into the RTC device. Clock references to
the IOSC and LOSC are also fixed.

Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2018-12-07 10:23:39 +08:00
Chen-Yu Tsai 507c6e89d6 ARM: dts: sunxi: h3/h5: Fix up RTC device node and clock references
The RTC module on the H3 was claimed to be the same as on the A31, when
in fact it is not. The A31 does not have an RTC external clock output,
and its internal RC oscillator's average clock rate is not in the same
range. The H5's RTC has some extra crypto-related registers compared to
the H3. Their exact functions are not clear. Also the RTC-VIO regulator
has different settings.

This patch fixes the compatible string and clock properties to conform
to the updated bindings. The device node for the internal oscillator is
removed, as it is internalized into the RTC device. Clock references to
the IOSC and LOSC are also fixed.

Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2018-12-07 10:23:07 +08:00
Krishna Reddy 8589a649d5 arm64: dts: tegra186: Enable IOMMU for SDHCI
Enable IOMMU for all SDHCI controllers in Tegra186.

Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-06 19:08:35 +01:00
Thierry Reding caa7a8e3c3 arm64: tegra: Enable HDA controller on Jetson TX1
The HDA controller can be used for audio playback over HDMI.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-06 19:06:09 +01:00
Thierry Reding badb80bed0 arm64: tegra: Add CEC controller on Tegra194
The CEC controller found on Tegra194 can be used to control consumer
devices using the HDMI CEC pin.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-06 19:05:59 +01:00
Thierry Reding 01e13ae3b5 arm64: tegra: Enable HDA on Jetson Xavier
Enable the HDA controller on Jetson Xavier so that it can be used for
audio playback over HDMI.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-06 19:05:28 +01:00
Sameer Pujar 4878cc0c9f arm64: tegra: Add HDA controller on Tegra194
The HDA controller found on Tegra194 can be used for audio playback over
HDMI.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-06 19:04:26 +01:00
Thierry Reding 97cf683c12 arm64: tegra: Add CEC controller on Tegra186
The CEC controller found on Tegra186 can be used to control consumer
devices using the HDMI CEC pin.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-06 19:02:20 +01:00
Thierry Reding 7c3adf1243 arm64: tegra: Enable HDA on Jetson TX2
Enable the HDA controller on Jetson TX2 so that it can be used for audio
playback over HDMI.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-06 19:02:10 +01:00
Thierry Reding b066a31040 arm64: tegra: Add HDA controller on Tegra186
The HDA controller found on Tegra186 can be used for audio playback over
HDMI.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-06 19:01:58 +01:00
Allen Pais a21b0b78ea arm64: hugetlb: Register hugepages during arch init
Add hstate for each supported hugepage size using arch initcall.

* no hugepage parameters

  Without hugepage parameters, only a default hugepage size is
  available for dynamic allocation.  It's different, for example, from
  x86_64 and sparc64 where all supported hugepage sizes are available.

* only default_hugepagesz= is specified and set not to HPAGE_SIZE

  In spite of the fact that default_hugepagesz= is set to a valid
  hugepage size, it's treated as unsupported and reverted to
  HPAGE_SIZE.  Such behaviour is also different from x86_64 and
  sparc64.

Acked-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Tom Saeger <tom.saeger@oracle.com>
Signed-off-by: Dmitry Klochkov <dmitry.klochkov@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-06 17:01:13 +00:00
Jackie Liu cc9f8349cb arm64: crypto: add NEON accelerated XOR implementation
This is a NEON acceleration method that can improve
performance by approximately 20%. I got the following
data from the centos 7.5 on Huawei's HISI1616 chip:

[ 93.837726] xor: measuring software checksum speed
[ 93.874039]   8regs  : 7123.200 MB/sec
[ 93.914038]   32regs : 7180.300 MB/sec
[ 93.954043]   arm64_neon: 9856.000 MB/sec
[ 93.954047] xor: using function: arm64_neon (9856.000 MB/sec)

I believe this code can bring some optimization for
all arm64 platform. thanks for Ard Biesheuvel's suggestions.

Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-06 16:47:06 +00:00
Jackie Liu 21e28547f6 arm64/neon: add workaround for ambiguous C99 stdint.h types
In a way similar to ARM commit 09096f6a0e ("ARM: 7822/1: add workaround
for ambiguous C99 stdint.h types"), this patch redefines the macros that
are used in stdint.h so its definitions of uint64_t and int64_t are
compatible with those of the kernel.

This patch comes from: https://patchwork.kernel.org/patch/3540001/
Wrote by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

We mark this file as a private file and don't have to override asm/types.h

Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-06 16:47:05 +00:00
Will Deacon 8cb3451b1f arm64: entry: Remove confusing comment
The comment about SYS_MEMBARRIER_SYNC_CORE relying on ERET being
context-synchronizing is confusing and misplaced with kpti. Given that
this is already documented under Documentation/ (see arch-support.txt
for membarrier), remove the comment altogether.

Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-06 16:47:05 +00:00
Will Deacon 679db70801 arm64: entry: Place an SB sequence following an ERET instruction
Some CPUs can speculate past an ERET instruction and potentially perform
speculative accesses to memory before processing the exception return.
Since the register state is often controlled by a lower privilege level
at the point of an ERET, this could potentially be used as part of a
side-channel attack.

This patch emits an SB sequence after each ERET so that speculation is
held up on exception return.

Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-06 16:47:05 +00:00
Will Deacon bd4fb6d270 arm64: Add support for SB barrier and patch in over DSB; ISB sequences
We currently use a DSB; ISB sequence to inhibit speculation in set_fs().
Whilst this works for current CPUs, future CPUs may implement a new SB
barrier instruction which acts as an architected speculation barrier.

On CPUs that support it, patch in an SB; NOP sequence over the DSB; ISB
sequence and advertise the presence of the new instruction to userspace.

Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-06 16:47:04 +00:00
Will Deacon 121ca8e565 arm64: kexec_file: Refactor setup_dtb() to consolidate error checking
setup_dtb() is a little difficult to read. This is largely because it
duplicates the FDT -> Linux errno conversion for every intermediate
return value, but also because of silly cosmetic things like naming
and formatting.

Given that this is all brand new, refactor the function to get us off on
the right foot.

Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-06 15:16:58 +00:00
AKASHI Takahiro 884143f60c arm64: kexec_file: add kaslr support
Adding "kaslr-seed" to dtb enables triggering kaslr, or kernel virtual
address randomization, at secondary kernel boot. We always do this as
it will have no harm on kaslr-incapable kernel.

We don't have any "switch" to turn off this feature directly, but still
can suppress it by passing "nokaslr" as a kernel boot argument.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
[will: Use rng_is_initialized()]
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-06 15:16:57 +00:00
AKASHI Takahiro 732b7b93d8 arm64: kexec_file: add kernel signature verification support
With this patch, kernel verification can be done without IMA security
subsystem enabled. Turn on CONFIG_KEXEC_VERIFY_SIG instead.

On x86, a signature is embedded into a PE file (Microsoft's format) header
of binary. Since arm64's "Image" can also be seen as a PE file as far as
CONFIG_EFI is enabled, we adopt this format for kernel signing.

You can create a signed kernel image with:
    $ sbsign --key ${KEY} --cert ${CERT} Image

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Reviewed-by: James Morse <james.morse@arm.com>
[will: removed useless pr_debug()]
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-06 15:16:52 +00:00
Suzuki K Poulose 0b587c84e4 arm64: capabilities: Batch cpu_enable callbacks
We use a stop_machine call for each available capability to
enable it on all the CPUs available at boot time. Instead
we could batch the cpu_enable callbacks to a single stop_machine()
call to save us some time.

Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-06 15:12:26 +00:00
Suzuki K Poulose 606f8e7b27 arm64: capabilities: Use linear array for detection and verification
Use the sorted list of capability entries for the detection and
verification.

Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-06 15:12:26 +00:00
Suzuki K Poulose f7bfc14a08 arm64: capabilities: Optimize this_cpu_has_cap
Make use of the sorted capability list to access the capability
entry in this_cpu_has_cap() to avoid iterating over the two
tables.

Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-06 15:12:25 +00:00
Suzuki K Poulose 82a3a21b23 arm64: capabilities: Speed up capability lookup
We maintain two separate tables of capabilities, errata and features,
which decide the system capabilities. We iterate over each of these
tables for various operations (e.g, detection, verification etc.).
We do not have a way to map a system "capability" to its entry,
(i.e, cap -> struct arm64_cpu_capabilities) which is needed for
this_cpu_has_cap(). So we iterate over the table one by one to
find the entry and then do the operation. Also, this prevents
us from optimizing the way we "enable" the capabilities on the
CPUs, where we now issue a stop_machine() for each available
capability.

One solution is to merge the two tables into a single table,
sorted by the capability. But this is has the following
disadvantages:
  - We loose the "classification" of an errata vs. feature
  - It is quite easy to make a mistake when adding an entry,
    unless we sort the table at runtime.

So we maintain a list of pointers to the capability entry, sorted
by the "cap number" in a separate array, initialized at boot time.
The only restriction is that we can have one "entry" per capability.
While at it, remove the duplicate declaration of arm64_errata table.

Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-06 15:12:25 +00:00
Christoph Hellwig 7c703e54cc arch: switch the default on ARCH_HAS_SG_CHAIN
These days architectures are mostly out of the business of dealing with
struct scatterlist at all, unless they have architecture specific iommu
drivers.  Replace the ARCH_HAS_SG_CHAIN symbol with a ARCH_NO_SG_CHAIN
one only enabled for architectures with horrible legacy iommu drivers
like alpha and parisc, and conditionally for arm which wants to keep it
disable for legacy platforms.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
2018-12-06 07:04:56 -08:00
Christoph Hellwig cad34be747 iommu/dma-iommu: remove the mapping_error dma_map_ops method
Return DMA_MAPPING_ERROR instead of 0 on a dma mapping failure and let
the core dma-mapping code handle the rest.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-12-06 06:56:48 -08:00
Christoph Hellwig 52f0b3ee0b arm64: remove the dummy_dma_ops mapping_error method
Just return DMA_MAPPING_ERROR from __dummy_map_page and let the core
dma-mapping code handle the rest.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-12-06 06:56:41 -08:00
AKASHI Takahiro 4c9e7e649a arm64: kexec_file: invoke the kernel without purgatory
On arm64, purgatory would do almost nothing. So just invoke secondary
kernel directly by jumping into its entry code.

While, in this case, cpu_soft_restart() must be called with dtb address
in the fifth argument, the behavior still stays compatible with kexec_load
case as long as the argument is null.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: James Morse <james.morse@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>
2018-12-06 14:38:53 +00:00
AKASHI Takahiro f3b70e5094 arm64: kexec_file: allow for loading Image-format kernel
This patch provides kexec_file_ops for "Image"-format kernel. In this
implementation, a binary is always loaded with a fixed offset identified
in text_offset field of its header.

Regarding signature verification for trusted boot, this patch doesn't
contains CONFIG_KEXEC_VERIFY_SIG support, which is to be added later
in this series, but file-attribute-based verification is still a viable
option by enabling IMA security subsystem.

You can sign(label) a to-be-kexec'ed kernel image on target file system
with:
    $ evmctl ima_sign --key /path/to/private_key.pem Image

On live system, you must have IMA enforced with, at least, the following
security policy:
    "appraise func=KEXEC_KERNEL_CHECK appraise_type=imasig"

See more details about IMA here:
    https://sourceforge.net/p/linux-ima/wiki/Home/

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-06 14:38:52 +00:00
AKASHI Takahiro 52b2a8af74 arm64: kexec_file: load initrd and device-tree
load_other_segments() is expected to allocate and place all the necessary
memory segments other than kernel, including initrd and device-tree
blob (and elf core header for crash).
While most of the code was borrowed from kexec-tools' counterpart,
users may not be allowed to specify dtb explicitly, instead, the dtb
presented by the original boot loader is reused.

arch_kimage_kernel_post_load_cleanup() is responsible for freeing arm64-
specific data allocated in load_other_segments().

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-06 14:38:52 +00:00
AKASHI Takahiro 3ddd9992a5 arm64: enable KEXEC_FILE config
Modify arm64/Kconfig to enable kexec_file_load support.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Acked-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-06 14:38:52 +00:00
AKASHI Takahiro bdd2c9d1c3 arm64: cpufeature: add MMFR0 helper functions
Those helper functions for MMFR0 register will be used later by kexec_file
loader.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-06 14:38:51 +00:00
AKASHI Takahiro f56063c51f arm64: add image head flag definitions
Those image head's flags will be used later by kexec_file loader.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Acked-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-06 14:38:51 +00:00
Oskari Lemmela f7cb866a96 arm64: dts: rockchip: enable hdmi output on rk3399-rockpro64
The rockpro64 does have hdmi support, so add the necessary
devicetree node to enable it.

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2018-12-06 13:50:30 +01:00
Oskari Lemmela 690e16bada arm64: dts: rockchip: fix rk3399-rockpro64 regulator gpios
Rockpro64 is not able boot if GPIO1_C1 pin is pulled high
before loading linux kernel.

In rockpro64 GPIO1_C1 pin is connected vdd_cpu_b regulator
VSEL pin. Pin should be pulled down in normal operation and
pulled high in suspend.

PMIC LDO_REG2 is connected to touch panel connector.
Rename regulator and set it to correct voltage.

PCIe power is controller by GPIO1_D0.

Schematics can be downloaded from:
http://files.pine64.org/doc/rockpro64/rockpro64_v21-SCH.pdf

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
Acked-by: Akash Gajjar <Akash_Gajjar@mentor.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2018-12-06 13:46:16 +01:00
Suzuki K Poulose a3dcea2c85 arm64: capabilities: Merge duplicate entries for Qualcomm erratum 1003
Remove duplicate entries for Qualcomm erratum 1003. Since the entries
are not purely based on generic MIDR checks, use the multi_cap_entry
type to merge the entries.

Cc: Christopher Covington <cov@codeaurora.org>
Cc: Will Deacon <will.deacon@arm.com>
Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-06 11:47:44 +00:00
Suzuki K Poulose f58cdf7e3c arm64: capabilities: Merge duplicate Cavium erratum entries
Merge duplicate entries for a single capability using the midr
range list for Cavium errata 30115 and 27456.

Cc: Andrew Pinski <apinski@cavium.com>
Cc: David Daney <david.daney@cavium.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-06 11:47:44 +00:00
Suzuki K Poulose c9460dcb06 arm64: capabilities: Merge entries for ARM64_WORKAROUND_CLEAN_CACHE
We have two entries for ARM64_WORKAROUND_CLEAN_CACHE capability :

1) ARM Errata 826319, 827319, 824069, 819472 on A53 r0p[012]
2) ARM Errata 819472 on A53 r0p[01]

Both have the same work around. Merge these entries to avoid
duplicate entries for a single capability. Add a new Kconfig
entry to control the "capability" entry to make it easier
to handle combinations of the CONFIGs.

Cc: Will Deacon <will.deacon@arm.com>
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-06 11:47:44 +00:00
Ezequiel Garcia 5cd4c31a12 arm64: dts: rockchip: add VPU device node for RK3399
Add the Video Processing Unit node for the RK3399 SoC.

Also, fix the VPU IOMMU node, which was disabled and lacking
its power domain property.

Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2018-12-06 11:09:16 +01:00
Laurent Pinchart 4fbd4158fe arm64: dts: renesas: r8a77995: draak: Add backlight
Add the backlight device for the LVDS1 output, in preparation for panel
support.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-12-05 11:45:44 -08:00
Matthias Kaehlcke bb2203d5f1 arm64: dts: qcom: sdm845: Add UART nodes
This adds nodes for all possible UARTs to sdm845.dtsi. By default
only configure the RX/TX lines with pinctrl. Boards that use UARTs
with flow control can overwrite the configuration in the
<board>.dtsi.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-12-05 12:34:22 -06:00
Ard Biesheuvel 91fc957c9b arm64/bpf: don't allocate BPF JIT programs in module memory
The arm64 module region is a 128 MB region that is kept close to
the core kernel, in order to ensure that relative branches are
always in range. So using the same region for programs that do
not have this restriction is wasteful, and preferably avoided.

Now that the core BPF JIT code permits the alloc/free routines to
be overridden, implement them by vmalloc()/vfree() calls from a
dedicated 128 MB region set aside for BPF programs. This ensures
that BPF programs are still in branching range of each other, which
is something the JIT currently depends upon (and is not guaranteed
when using module_alloc() on KASLR kernels like we do currently).
It also ensures that placement of BPF programs does not correlate
with the placement of the core kernel or modules, making it less
likely that leaking the former will reveal the latter.

This also solves an issue under KASAN, where shadow memory is
needlessly allocated for all BPF programs (which don't require KASAN
shadow pages since they are not KASAN instrumented)

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2018-12-05 16:36:28 +01:00
Houlong Wei c2e66b8f7c arm64: dts: mt8173: Add GCE node
This patch adds the device node of the GCE hardware for CMDQ module.

Signed-off-by: Houlong Wei <houlong.wei@mediatek.com>
Signed-off-by: HS Liao <hs.liao@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2018-12-05 12:16:39 +01:00
Paul Kocialkowski d60ce24740
arm64: dts: allwinner: a64: Add Video Engine node
This adds the Video Engine node for the A64. Since it can map the whole
DRAM range, there is no particular need for a reserved memory node
(unlike platforms preceding the A33).

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-12-05 12:04:49 +01:00
Paul Kocialkowski 106deea8ba
arm64: dts: allwinner: a64: Add support for the SRAM C1 section
Add the description for the SRAM C1 section to the A64 device-tree.

Since there is no entry for this section in the A64 manual, the base
address and size were only verified to be consistent empirically.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-12-05 12:04:46 +01:00
Paul Kocialkowski 8be5b161bb
arm64: dts: allwinner: h5: Add Video Engine node
This adds the Video Engine node for the H5. Since it can map the whole
DRAM range, there is no particular need for a reserved memory node
(unlike platforms preceding the A33).

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-12-05 12:03:06 +01:00
Paul Kocialkowski 24a1be4e7e
ARM/arm64: dts: allwinner: Move H3/H5 syscon label over to soc-specific nodes
The EMAC driver requires a syscon node to access the EMAC clock
configuration register (that is part of the system-control register
range and controlled). For this purpose, a dummy syscon node was
introduced to let the driver access the register freely.

Recently, the EMAC driver was tuned to get access to the register when
the SRAM driver is registered (as used on the A64). As a result, it is
no longer necessary to have a dummy syscon node for that purpose.

Now that we have a proper system-control node for both the H3 and H5,
we can get rid of that dummy syscon node and have the EMAC driver use
the node corresponding to the proper SRAM driver (by switching the
syscon label over to each dtsi). This way, we no longer have two
separate nodes for the same register space.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-12-05 12:03:02 +01:00
Paul Kocialkowski 973efbc6a0
arm64: dts: allwinner: h5: Add system-control node with SRAM C1
Add the H5-specific system control node description to its device-tree
with support for the SRAM C1 section, that will be used by the video
codec node later on.

The CPU-side SRAM address was obtained empirically while the size was
taken from the documentation. They may not be entirely accurate.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-12-05 12:02:10 +01:00
Baruch Siach dae5220450 Revert "arm64: dts: marvell: add CPU Idle power state support on Armada 7K/8K"
This reverts commit 8ed4636877.

This commit breaks boot on Armada 8K based systems. Reverting it makes
affected systems boot again.

Reported-by: Sergey Matyukevich <geomatsi@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-12-05 09:28:17 +01:00
Jerome Brunet 16361ff23e arm64: dts: meson: add clock controller clock inputs
Add the clock inputs of the clock controllers

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-12-04 17:04:39 -08:00
Jerome Brunet ed85b3435e arm64: dts: meson-axg: remove alternate xtal
There is actually no alternate xtal on any of the axg board I have
seen so far. The 32k is actually generated internally, deriving from
the 24MHz main xtal.

Amlogic SoC also have the option to provide the 32k reference externally,
through one of the AO pads, but no platform is using this ATM.

Fixes: 5e395e1466 ("ARM64: dts: meson-axg: add an 32K alt aoclk")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-12-04 16:17:05 -08:00
Carlo Caione 6f31ba17c8 arm64: dts: meson-axg: Enable watchdog on Meson AXG SoCs
Add the watchdog node also on the AXG platforms.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-12-04 16:16:29 -08:00
Ard Biesheuvel 3bbd3db864 arm64: relocatable: fix inconsistencies in linker script and options
readelf complains about the section layout of vmlinux when building
with CONFIG_RELOCATABLE=y (for KASLR):

  readelf: Warning: [21]: Link field (0) should index a symtab section.
  readelf: Warning: [21]: Info field (0) should index a relocatable section.

Also, it seems that our use of '-pie -shared' is contradictory, and
thus ambiguous. In general, the way KASLR is wired up at the moment
is highly tailored to how ld.bfd happens to implement (and conflate)
PIE executables and shared libraries, so given the current effort to
support other toolchains, let's fix some of these issues as well.

- Drop the -pie linker argument and just leave -shared. In ld.bfd,
  the differences between them are unclear (except for the ELF type
  of the produced image [0]) but lld chokes on seeing both at the
  same time.

- Rename the .rela output section to .rela.dyn, as is customary for
  shared libraries and PIE executables, so that it is not misidentified
  by readelf as a static relocation section (producing the warnings
  above).

- Pass the -z notext and -z norelro options to explicitly instruct the
  linker to permit text relocations, and to omit the RELRO program
  header (which requires a certain section layout that we don't adhere
  to in the kernel). These are the defaults for current versions of
  ld.bfd.

- Discard .eh_frame and .gnu.hash sections to avoid them from being
  emitted between .head.text and .text, screwing up the section layout.

These changes only affect the ELF image, and produce the same binary
image.

[0] b9dce7f1ba ("arm64: kernel: force ET_DYN ELF type for ...")

Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Peter Smith <peter.smith@linaro.org>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-12-04 12:48:25 +00:00
Todor Tomov e0531312e7 arm64: dts: qcom: msm8996: Add CAMSS support
Add a node for the Camera Subsystem present on the Qualcomm
MSM8996 SoC.

Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-12-03 16:15:56 -06:00
Todor Tomov f3442ab972 arm64: dts: qcom: msm8996: Add VFE SMMU node
Add VFE SMMU node.

Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Reviewed-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-12-03 16:15:40 -06:00
Todor Tomov acd48330e9 arm64: dts: qcom: Add pinctrls for camera sensors
Add pinctrls required for camera sensors:
- power down signal;
- reset signal;
- camera external clock.

Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-12-03 16:11:11 -06:00
Todor Tomov 1ab0fb7581 arm64: dts: qcom: Add Camera Control Interface pinctrls
Add pinctrls required for Camera Control Interface.

Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-12-03 16:11:09 -06:00
Todor Tomov 58f479f90a arm64: dts: qcom: msm8916: Add CAMSS support
Add a node for the Camera Subsystem present on the Qualcomm
MSM8916 SoC.

Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-12-03 16:10:44 -06:00
Todor Tomov e7b6e5ccae arm64: dts: qcom: msm8916: Add IOMMU sub-node for VFE context bank
Add IOMMU sub-node for VFE secure context bank.

Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-12-03 16:10:40 -06:00
Viresh Kumar 40d9d791c9 arm64: dts: msm8916: Add all CPUs in cooling maps
Each CPU can (and does) participate in cooling down the system but the
DT only captures a handful of them, normally CPU0, in the cooling maps.
Things work by chance currently as under normal circumstances its the
first CPU of each cluster which is used by the operating systems to
probe the cooling devices. But as soon as this CPU ordering changes and
any other CPU is used to bring up the cooling device, we will start
seeing failures.

Also the DT is rather incomplete when we list only one CPU in the
cooling maps, as the hardware doesn't have any such limitations.

Update cooling maps to include all devices affected by individual trip
points.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-12-03 16:08:59 -06:00
Olof Johansson acfbaa5d3b Qualcomm ARM64 Updates for v4.21
* Add QCS404 base platform and nodes
 * Add QCS404 EVB boards
 * Add external SD and dependencies for MSM8998-mtp
 * Add default scm compatible for MSM8998
 * Fix XO clk name on MSM8998
 * Add prng-ee nodes for SDM845 and MSM8996
 * Add ADC die temp node for pm8998
 * Fix documentation on QCOM ADC sample
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJcBYHXAAoJEFKiBbHx2RXV79YQAKs+razLklv833WWQbUgucWu
 CvqIrZST3+sXxE2KQbZMev69HQY3G1+rEqnI1kIKoq4yEAiC9+XRRF4xoWfFGTQe
 X3JJGeBj7VL3ZPgKynB85wgXExSBJV1d28Uj2fIwqTf9tswLHk0QvmUvMVOJVbB/
 N/rEeyoVBDW8YuvkQNvJMHTHsjkueiBIcvkZPkCpTYEWLZnr+bgFZNUsyc78PWh1
 I4zF7vLYj+7NhoXKO5+Noll3Y/KAqS2dlBsYeH9pbuQ616JgOPUXGv5ZU9ncAPYR
 VVU+AL49cznEMRcacj7SX39EJrLmqdaLVU3p1y0RYDy5UGSCUHHPRufW0C4S7TQn
 VPROIsC9W2i3fTnvigBXsq/XJWk/40/UY3neL6roI67aMjID9PuKAnsQEYir0/0k
 gIY/VUGsgs9C05eETJ87brDoRnSzOZpLnjcte1OvjQWVyd+mC+CYRweEVu2Q3Mln
 QKZPBL3bP90YfnLg1VPAc92ySyPbbODSuVYqv7jLMr0X3JlmvErCGHSMPOa9CNoO
 WYzp7l62Vm6kc1s0Po7w+IK2AcXw0ykvDSVD+VK54j4ZKPOYeeTax4DO6rESwdOx
 mHVC0YxQd5H8upElLJd9oyMfYMEt6hFVDNxKmrhbdO06SSgLKoYecv2xc2JEvH5j
 jQuY0mEfTIlxh09gr2TW
 =vOeS
 -----END PGP SIGNATURE-----

Merge tag 'qcom-arm64-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/dt

Qualcomm ARM64 Updates for v4.21

* Add QCS404 base platform and nodes
* Add QCS404 EVB boards
* Add external SD and dependencies for MSM8998-mtp
* Add default scm compatible for MSM8998
* Fix XO clk name on MSM8998
* Add prng-ee nodes for SDM845 and MSM8996
* Add ADC die temp node for pm8998
* Fix documentation on QCOM ADC sample

* tag 'qcom-arm64-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: (34 commits)
  arm64: dts: qcom: msm8998: Fix compatible of scm node
  arm64: dts: qcom: msm8998: Add SDC2 control pins
  arm64: dts: qcom: msm8998-mtp: Add external SD
  arm64: dts: qcom: msm8998: Add SDCC2
  arm64: dts: qcom: msm8998: correct xo clock name
  arm64: dts: qcom: pms405: Add pon and pwrkey nodes
  arm64: dts: qcom: qcs404: Use BAM DMA for serial uart2
  arm64: dts: qcom: qcs404: Add BAM DMA node
  arm64: dts: qcom: qcs404: add prng-ee node
  arm64: dts: qcom: qcs404: Add remoteproc nodes
  arm64: dts: qcom: qcs404: Add scm firmware node
  arm64: dts: qcom: pms405: add gpios
  arm64: dts: qcom: pms405: add rtc node
  arm64: dts: qcom: qcs404: add spmi node
  arm64: dts: qcom: pms405: add spmi node
  arm64: dts: qcom: qcs404: Add sdcc1 node
  arm64: dts: qcom: qcs404: Add TLMM pinctrl node
  arm64: dts: qcom: qcs404: add smp2p nodes
  arm64: dts: qcom: qcs404: Add PMS405 RPM regulators
  arm64: dts: qcom: qcs404: Add RPM GLINK related nodes
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-12-03 13:04:14 -08:00
Olof Johansson d4907292ab Qualcomm ARM64 Based defconfig Updates for v4.21
* Enable Qualcomm QCS404 platform options
 * Enable Qualcomm MSM8998 clock and pinctrl
 * Enable Qualcomm SDM845 options
 * Add remoteproc related configs
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJcBX/PAAoJEFKiBbHx2RXVX+0P/20ZoXzRZL/Jc9sJwMEMy9mu
 mVCMpLaQQaqDsvlBi+xVb6CFlQqTLoIdDKmt7vACUVcuG+q+GzKF69ZKuJ8y5OhT
 JoAGbZ34eVCcrgQDvr0Epn/PMUwuvqVcVVJayUURGJgdXk8Ij2XV7OVyf0VdAvKR
 3mE09DKgt8wKNkOJ9gglBxTvmKa4r34+EJ2hNEQHu7TprNQRD6kf+RIAp/SzvTg3
 vQ0ScD9xWJPArjKkTFgliGdgEEDNreVw74MiYaAAr1KT1RHe5uKmTh9POD5rKoiT
 ocGJ7bHG7x3JLmpi8MWIr6jXiLMB+mRh9GCS28+xewl/Fogg2OL1bPnzFqSC3Ffe
 oQ+WuRlY74taf9buv/9U697w4JU4dYKJQJyhAN+a9M6vpySepj6V/8MTKOICFsHA
 7wHGFMynlJSg4/qMhDcQH1N9VFjBQLiK5JIyraRe3BRAyVg/iVGI8MxoDObLVV/K
 s8goOWSFukAY74oImx5omfUx5MfEtWEFJ79qFH7+V0N2MkZx7ZUOJH5WfRar9R0h
 Y8WcwR9UUgQjKkCsier9tRlM2CA0vPRPEynG5ixh3Wcgx5ZrbzBaF61WUEWxhpvQ
 hX9akoRTHx3gaQ7DTvM7ldfKMPvMF0AoTWZeMDSP7ZhM0xdHcg5m0sSZBwxpRh8J
 y7kT+7MvdDFe4yJWP8o3
 =7g6C
 -----END PGP SIGNATURE-----

Merge tag 'qcom-arm64-defconfig-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/defconfig

Qualcomm ARM64 Based defconfig Updates for v4.21

* Enable Qualcomm QCS404 platform options
* Enable Qualcomm MSM8998 clock and pinctrl
* Enable Qualcomm SDM845 options
* Add remoteproc related configs

* tag 'qcom-arm64-defconfig-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux:
  arm64: defconfig: Enable GCC and PINCTRL for MSM8998
  arm64: defconfig: Enable core Qualcomm SDM845 options
  arm64: defconfig: Enable some qcom remoteproc configs
  arm64: defconfig: Enable QCS404 configs

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-12-03 12:59:31 -08:00
Olof Johansson 358b5f73ce DT mt7622:
- kernelci awaits a working stdout-path.
   Fix the path for reference board and bananapi-r64
 - general propouse timer has issues with clocks that didn't
   get probed early. Delete the DT node as the timer isn't
   need, a ARM arch timer exists on the system.
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCAA1FiEEiUuSfQSYnG8EMsBltDliWyzx00MFAlv7yygXHG1hdHRoaWFz
 LmJnZ0BnbWFpbC5jb20ACgkQtDliWyzx00NH1w//fT6Tell3XQ5oOqwMHp4d44zK
 A5mCylaD5E4svlw/LQInc8EZX2V2jr0zdzT/51PN1KrgE/Bw/QPFv61V2nO1Zsn6
 SOn9eC3lsvbfxL45yjSONY/kbs1ceUQbpvbd19Xy9RS7pakCOt6SFiEIReRoat7Q
 Hhdq5aG6c6cnzElSa81saAia2Y9nlprqBZCgAuJRXp7w2Zd5qArponOhDaiuC8Z3
 HLLbu0OgHiBWCFlQ6Efa28oYj+ZqofueGbDpzDlekLJdmcZfYy1Y+dYRfUfo4I6c
 eQl06R8SSueJFzqFx8onHts0XHO+53UCEziThJU2qM7MxWdgvproEfXvb26fM04W
 HmrSrHj0vdBPnJ5wo4kCQIbxioUDMEAGuLq/LBthvQ0GU8dVob+ccGe0ifwVK1R0
 XsjsUqbb7u8gUT1A6nqRPjgDoD+VYka6Kz/HndpXM9xJ104BQdV87RRFrLrRXh5I
 s5MOwQE6pzOiuwP3pUVX9GnQdEaq6Mc5i97URlZi7rzPT8fcu/q52l7U/aBOWCnQ
 j+bgkc5Uat7wLL1bxAPStbh264AYQ4WE8BNAWaWKmzRQDfGKc1TCQKBz1nCcLDOq
 UG9LZIfPJ2bKWG+mcloT6xF+Uugy31EGVCDCIPMgL22ft05DT7vaZNfsb7EPzWCY
 fnRgmeYyEL9kTztTfvE=
 =9YyV
 -----END PGP SIGNATURE-----

Merge tag 'v4.19-next-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into fixes

DT mt7622:
- Kernelci awaits a working stdout-path.
  Fix the path for reference board and bananapi-r64
- General propouse timer has issues with clocks that didn't
  get probed early. Delete the DT node as the timer isn't
  need, a ARM arch timer exists on the system.

* tag 'v4.19-next-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux:
  arm64: dts: mt7622: Drop the general purpose timer node
  arm64: dts: mt7622: fix no more console output on BPI-R64 board
  arm64: dts: mt7622: fix no more console output on rfb1

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-12-03 12:37:41 -08:00
Thierry Reding 8b457812f5 arm64: tegra: Add temperature sensor on P2888
The P2888 processor module contains a TI TMP451 temperature sensor with
two channels. These are used to measure the temperatures at different
locations on the module.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-03 16:31:35 +01:00
Thierry Reding e47ac50885 arm64: tegra: Add gpio-keys on Jetson Xavier
The power and force recovery buttons found on Jetson Xavier are hooked
up to two Tegra GPIOs. The power button can also function as a wake-up
source.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-03 16:31:35 +01:00
Thierry Reding 4d286331bd arm64: tegra: Add AON GPIO controller on Tegra194
The AON GPIO controller is in an always-on power partition and typically
provides pins for functions that need to always work, such as the power
key for example.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-03 16:31:35 +01:00
Thierry Reding 3ae50e8331 arm64: tegra: p2888: Enable on-die RTC
The on-die RTC isn't hooked up to a backup battery, so it isn't useful
to track time across reboots, but as long as power remains enabled, it
keeps track of time accurately and can be used to wake the system from
sleep, for example.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-03 16:31:34 +01:00
Thierry Reding 37e5a31df5 arm64: tegra: Add RTC support on Tegra194
The RTC on Tegra194 is very similar to the RTC on earlier generations.
One notable exception is that the source clock is now the 32 kHz clock
instead of a dedicated RTC clock and the RTC alarm is a wake event and
can be used to wake the system from sleep.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-03 16:31:34 +01:00
Thierry Reding 38ecf1e5f4 arm64: tegra: Enable PMC wake events on Tegra194
Wake events are a feature that allows the interrupt and GPIO controllers
to be powered off as part of system sleep. The PMC which is always on is
monitoring these wake events and can power up subsequent controllers as
necessary to process them.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-03 16:31:34 +01:00
Thierry Reding 127d826701 arm64: tegra: p3310: Enable on-die RTC
The on-die RTC isn't hooked up to a backup battery, so it isn't useful
to track time across reboots, but as long as power remains enabled, it
keeps track of time accurately and can be used to wake the system from
sleep, for example.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-03 16:31:34 +01:00
Thierry Reding 9733a25172 arm64: tegra: Add RTC support on Tegra186
The RTC on Tegra186 is very similar to the RTC on earlier generations.
One notable exception is that the source clock is now the 32 kHz clock
instead of a dedicated RTC clock and the RTC alarm is a wake event and
can be used to wake the system from sleep.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-03 16:31:33 +01:00
Thierry Reding 32e66e46af arm64: tegra: Enable PMC wake events on Tegra186
Wake events are a feature that allows the interrupt and GPIO controllers
to be powered off as part of system sleep. The PMC which is always on is
monitoring these wake events and can power up subsequent controllers as
necessary to process them.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-03 16:31:33 +01:00
Thierry Reding 6f13f10b3b arm64: tegra: Fix power key interrupt type on Jetson TX2
In order for the correct interrupt type to be configured, the event
action for the power key needs to be "asserted".

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-03 16:31:33 +01:00
Thierry Reding cfe3af19d9 arm64: tegra: p2972: Enable the CPU, GPU and AUX thermal zones
Enable these thermal zones to be able to monitor their temperatures and
control the fan to cool down the system if necessary.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-03 16:31:33 +01:00
Thierry Reding 686ba00900 arm64: tegra: Add thermal zones on Tegra194
The NVIDIA Tegra194 SoC defines six thermal zones. Define all of them in
device tree.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-03 16:31:32 +01:00
Thierry Reding 33c038e4b5 arm64: tegra: Enable HDMI on P2972-0000
Add the 5V HDMI regulator and hook up the VDD_1V0 and VDD_1V8HS supplies
from the PMIC to the display block. Also enable the display hub which is
responsible for instantiating the display controllers. Finally, enable
the third SOR that drives the TMDS signals to the HDMI connector.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-03 16:31:32 +01:00
Thierry Reding 8d424ec221 arm64: tegra: Add VIC support on Tegra194
Tegra194 has a version of VIC that is very similar to that on Tegra186.
Add the device tree node for it that is enabled by default.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-03 16:31:32 +01:00
Thierry Reding 3db6d3ba08 arm64: tegra: Add display support on Tegra194
Tegra194 contains a display architecture very similar to that found on
the Tegra186. One notable exception is that DSI is no longer a supported
output. Instead there are four display controllers and four SORs (with a
DPAUX associated to each of them) that can drive HDMI or DP.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-12-03 16:31:27 +01:00
Greg Kroah-Hartman 22fee7d385 Merge 4.20-rc5 into char-misc-next
We need the fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-03 07:56:15 +01:00
Linus Torvalds 6a51272609 ARM: SoC fixes
Volume is a little higher than usual due to a set of gpio fixes for
 Davinci platforms that's been around a while, still seemed appropriate
 to not hold off until next merge window.
 
 Besides that it's the usual mix of minor fixes, mostly corrections of
 small stuff in device trees.
 
 Major stability-related one is the removal of a regulator from DT on
 Rock960, since DVFS caused undervoltage. I expect it'll be restored once
 they figure out the underlying issue.
 -----BEGIN PGP SIGNATURE-----
 
 iQJDBAABCAAtFiEElf+HevZ4QCAJmMQ+jBrnPN6EHHcFAlwEMLEPHG9sb2ZAbGl4
 b20ubmV0AAoJEIwa5zzehBx3WewP/2shRXHQ8mSwMbqLApBUgPASpGtyJsLgP4vX
 ROMHdfQr2nhZPu9vy973aVAztkG3FCsWNhKqNVWTfvNf9eNYRh62D8/gqNYavQJH
 Gtq/TpiJWWDWoXzxHpOE5vSunNDUGWRrbigmgcONogNs42iX0ngLAy7GWzWHB7oc
 O3HAYxNevsBTJkkKpKGnDqDM1P4WaEG5OPdjMUN25UD7IBshzuVq4eG3LuqLLZ01
 NzGV/RErCnnLP8VSJlu+LQkLBeO5WpcvqZMeC6lNGBEBQAscTYRTucmM9tflJgCK
 B3+GczLFdJXKwluVV055MfrBxUweZ+Tm2gk7Ojtou/ozhFOdWICVT6KSwTHiOUIB
 ZDP/f56QfJCxxc/NFX5fJHSaYhXl+tj1HVxwG/dK/l3blMOX5I7cZkBKnjI9sDVl
 H3on9r5S3j1x1T534zf/n0OUwztIBmPiEZTPeoz6L1HuqpusmWJZB3knW6RnA4Lv
 3JQPowK2k97/3Xp4xnzl5rQreBomXv1hsszXmPKX0pIFXF1C+BQ0LwNd9cC/Hnq2
 dz02JkzoAoEg1L5DYhG63vg/3beg//3Z7uGNMu4LMcaNlLxl5AqMM7O18qJCfMth
 nFZRx+ZkZ7h8EJqXnMxnXgwHUzWN6Iq2AjKFfmVWRQcDZk+Ys9BlRV5O9m0N0JHb
 KfdtL0SC
 =m41T
 -----END PGP SIGNATURE-----

Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "Volume is a little higher than usual due to a set of gpio fixes for
  Davinci platforms that's been around a while, still seemed appropriate
  to not hold off until next merge window.

  Besides that it's the usual mix of minor fixes, mostly corrections of
  small stuff in device trees.

  Major stability-related one is the removal of a regulator from DT on
  Rock960, since DVFS caused undervoltage. I expect it'll be restored
  once they figure out the underlying issue"

* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (28 commits)
  MAINTAINERS: Remove unused Qualcomm SoC mailing list
  ARM: davinci: dm644x: set the GPIO base to 0
  ARM: davinci: da830: set the GPIO base to 0
  ARM: davinci: dm355: set the GPIO base to 0
  ARM: davinci: dm646x: set the GPIO base to 0
  ARM: davinci: dm365: set the GPIO base to 0
  ARM: davinci: da850: set the GPIO base to 0
  gpio: davinci: restore a way to manually specify the GPIO base
  ARM: davinci: dm644x: define gpio interrupts as separate resources
  ARM: davinci: dm355: define gpio interrupts as separate resources
  ARM: davinci: dm646x: define gpio interrupts as separate resources
  ARM: davinci: dm365: define gpio interrupts as separate resources
  ARM: davinci: da8xx: define gpio interrupts as separate resources
  ARM: dts: at91: sama5d2: use the divided clock for SMC
  ARM: dts: imx51-zii-rdu1: Remove EEPROM node
  ARM: dts: rockchip: Remove @0 from the veyron memory node
  arm64: dts: rockchip: Fix PCIe reset polarity for rk3399-puma-haikou.
  arm64: dts: qcom: msm8998: Reserve gpio ranges on MTP
  arm64: dts: sdm845-mtp: Reserve reserved gpios
  arm64: dts: ti: k3-am654: Fix wakeup_uart reg address
  ...
2018-12-02 12:19:44 -08:00
Masahiro Yamada 8e9b61b293 kbuild: move .SECONDARY special target to Kbuild.include
In commit 54a702f705 ("kbuild: mark $(targets) as .SECONDARY and
remove .PRECIOUS markers"), I missed one important feature of the
.SECONDARY target:

    .SECONDARY with no prerequisites causes all targets to be
    treated as secondary.

... which agrees with the policy of Kbuild.

Let's move it to scripts/Kbuild.include, with no prerequisites.

Note:
If an intermediate file is generated by $(call if_changed,...), you
still need to add it to "targets" so its .*.cmd file is included.

The arm/arm64 crypto files are generated by $(call cmd,shipped),
so they do not need to be added to "targets", but need to be added
to "clean-files" so "make clean" can properly clean them away.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-12-02 14:11:49 +09:00
Christoph Hellwig 0c3b3171ce dma-mapping: move the arm64 noncoherent alloc/free support to common code
The arm64 codebase to implement coherent dma allocation for architectures
with non-coherent DMA is a good start for a generic implementation, given
that is uses the generic remap helpers, provides the atomic pool for
allocations that can't sleep and still is realtively simple and well
tested.  Move it to kernel/dma and allow architectures to opt into it
using a config symbol.  Architectures just need to provide a new
arch_dma_prep_coherent helper to writeback an invalidate the caches
for any memory that gets remapped for uncached access.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
2018-12-01 18:07:11 +01:00
Christoph Hellwig f0edfea8ef dma-mapping: move the remap helpers to a separate file
The dma remap code only makes sense for not cache coherent architectures
(or possibly the corner case of highmem CMA allocations) and currently
is only used by arm, arm64, csky and xtensa.  Split it out into a
separate file with a separate Kconfig symbol, which gets the right
copyright notice given that this code was written by Laura Abbott
working for Code Aurora at that point.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Laura Abbott <labbott@redhat.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
2018-12-01 17:58:34 +01:00
Linus Torvalds 868dda00b9 - Cortex-A76 erratum workaround
- ftrace fix to enable syscall events on arm64
 
 - Fix uninitialised pointer in iort_get_platform_device_domain()
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE5RElWfyWxS+3PLO2a9axLQDIXvEFAlwBhskACgkQa9axLQDI
 XvFS5g//UOW/9GvEXRCZF7Okm6FSYw/ADKnrr8Qv39JgKqp5AXG1Adg28QZzdiSD
 E+WKr07SyVj6lDc6gwGO4SzcOFNFO15DgdGY2i9v+cVQu5h/VmS3CiBlJG98WTFe
 Og0mDx3lnHLCUoYADt3YGzWDOXwco0OK2JGKs2Drk4ABoUEDt7dIsDfJtbIOGOpv
 Msx1KnQEuIV3dnZzr0+8PC89nbDG0A8+Mc7KScrESUmjNaO+c5hbcxxScsFswLCJ
 kaX6NttsqqilONt9JrQsDelYLrTP8A0UsYgTb2K36IyB5yCYhzZYMRVMw6wLhrKV
 VfnzjnN/xrJRnPoYW4yDTKLSLbnPuoF8k44XPR8AJA1AE+MLhT+C6yPZ3qcnFR7R
 LXtdDFBihe90HFYIBa1zt+E9jHoOTuWLkXJQTB0kdHjSXwwS0Ji7YuoyEolBQAUd
 QCkYdxSswnl5wGkXqI69V6lJ21lePtXZ8rnnl0lnNQNUyhzcuJFy9M7CcNKHHVcX
 pawnLlu3SJgZKrAR+d8SylSUVHqz3MV/8SuybC7WePl2d/0e4Qhry1y4RhrWuJZJ
 rxGNaBgql3sWmi4aHw65KaYna6YoXrsiwKwl0TK6ZgVzgR4Sk8AJkTk4WYF56ECc
 7E+szTmN3oFm+Bveua9ibryYlx9ayA9wh0UNIrjFCnZDNz9bl4s=
 =HpOx
 -----END PGP SIGNATURE-----

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:

 - Cortex-A76 erratum workaround

 - ftrace fix to enable syscall events on arm64

 - Fix uninitialised pointer in iort_get_platform_device_domain()

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  ACPI/IORT: Fix iort_get_platform_device_domain() uninitialized pointer value
  arm64: ftrace: Fix to enable syscall events on arm64
  arm64: Add workaround for Cortex-A76 erratum 1286807
2018-11-30 18:39:07 -08:00
Olof Johansson b71a29d57d ARM64: DT: Hisilicon SoCs DT updates for 4.21
* Hi3660 SoC and related boards:
   - Standardize LED labels and triggers for the hikey960 board
   - Add the missing cooling-cells property for the cpu nodes
   - Add all cpus into the cooling maps
 
 * Hi3670 SoC and related boards:
   - Add clock nodes and update the uart clock
   - Add Pinctrl, GPIO and uart nodes
   - Enable uart and add GPIO line names for the hikey970 board
 
 * Hi3798 SoC and related boards:
   - Standardize LED labels and triggers for the poplar board
 
 * Hi6220 SoC and related boards:
   - Standardize LED labels and triggers for the hikey board
   - Add all cpus into the cooling maps
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJb//QSAAoJEAvIV27ZiWZcyiYP/R/aPaFflGtUf5RDuy2IYTqJ
 k09V4ArTlVHb/NM0DPbfF38WILbpdXLYwo40T9NL6IytcRHkS+ggBxtyTlr6nzeL
 8pjXj/R6B34UANfKtSqnq0KmmxQdtvJW1eIbFVqJ87YmmmhJxtpUimtVV/IvtqI2
 9FD8dvB7vhgMvujCFlnzBLp0TVxTwRwkrMdFPxjN6sER9DmRJTX3R637pL1RG1Fv
 OTe5b2YRnjsYr3P7PQHPMGFYy2xQrZWyrxBO+d46o86eQodHRvSzysThU6CpM35d
 tgkEV5ToX3MMsNENbIWbFwvl7GjTfoE0IUb8SwypOWuRtffe2ix8/o7f+I1paSnD
 /hZnAd022OP33K/2D/T4Kg9T7z1O5FBUtYPkCWSrs5yYH7G06B2eg2FyCEFjGkwB
 XoNE1AWexzHqKptrILZ+YxrEzT2MJmbx3Us+BR6r9uVksMRkPxqJGFJCFIFpa1aW
 f3V1Nd7V6Od9XHiLXBeHLKR78kJzcQxr1ZqnQqmduwgwPr93P2VT380MWA+FcIGd
 L4dWnaYDguwZlBkDsxhxeUHsGFnmxcov3hMYv9mCSYWDR7rToKmspVeRvVR+r63h
 pNCir4JT6Dz6fWwyChuToR+3/i7fcETuYKgiuGIjhbdLuXvUWFrLfecFNbgB8974
 PZwCUBoM0rMcvK1ehfnN
 =hzY6
 -----END PGP SIGNATURE-----

Merge tag 'hisi-arm64-dt-for-4.21' of git://github.com/hisilicon/linux-hisi into next/dt

ARM64: DT: Hisilicon SoCs DT updates for 4.21

* Hi3660 SoC and related boards:
  - Standardize LED labels and triggers for the hikey960 board
  - Add the missing cooling-cells property for the cpu nodes
  - Add all cpus into the cooling maps

* Hi3670 SoC and related boards:
  - Add clock nodes and update the uart clock
  - Add Pinctrl, GPIO and uart nodes
  - Enable uart and add GPIO line names for the hikey970 board

* Hi3798 SoC and related boards:
  - Standardize LED labels and triggers for the poplar board

* Hi6220 SoC and related boards:
  - Standardize LED labels and triggers for the hikey board
  - Add all cpus into the cooling maps

* tag 'hisi-arm64-dt-for-4.21' of git://github.com/hisilicon/linux-hisi:
  ARM64: dts: hisilicon: Add all CPUs in cooling maps
  arm64: dts: hi3660: Add missing cooling device properties for CPUs
  arm64: dts: hisilicon: poplar: Standardize LED labels and triggers
  arm64: dts: hisilicon: hikey960: Standardize LED labels and triggers
  arm64: dts: hisilicon: hikey: Standardize LED labels and triggers
  arm64: dts: hisilicon: hikey970: Add GPIO line names
  arm64: dts: hisilicon: hikey970: Enable on-board UARTs
  arm64: dts: hisilicon: hi3670: Add UART nodes
  arm64: dts: hisilicon: hi3670: Add GPIO controller support
  arm64: dts: hisilicon: Add Pinctrl support for HiKey970 board
  arm64: dts: hisilicon: Source SoC clock for UART6
  arm64: dts: hisilicon: Add clock nodes for Hi3670 SoC

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-11-30 15:46:17 -08:00
Olof Johansson f6332990f6 arm64: Amlogic DT updates for v4.21
Some highlights:
 - new boards: Phicomm N1 (S905D), Libretech S805-AC
 - fixes for pinmux pad bias, GPIO line names
 - AXG: enable SCPI, add secure monitor
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEe4dGDhaSf6n1v/EMWTcYmtP7xmUFAlwATzUACgkQWTcYmtP7
 xmXNnw/5AU72YPDILN2tLywGYfBc/jlRgSVUo4411oGU5muxfNRYaOIHtLHhBWpV
 xbq4+gQQMxxXdflhYDJbuVmUQUYkuZMW0wePPEn0a/ZV9D/mPD559vl1erCJp0FL
 HuJH+EefFWYMzp2gT8BKDvOrYrEz499C2Xo2bqun21iCmDz649ypI+ODd5ojWWID
 eeatpq7VeRoKzrZrDNTGKbqBsLtRoSshBaYYbrw2iXRTA+AsD/sD7Tg6eus47m3p
 AmUVsUdJE/Czk/dzJoOwCKiWKEVk1FvssvzwjXFtYUbWQCwf6aWPsqDxLrAsKw88
 KzQ126Qc/3sFmtU++rOh2vI0GvyXtgQ81cPc3Eup+1by4tmxqMFIjVE92oWXecYd
 qrvyTyns6gMedHAgIKtvQFEPcaYj204b+aaDaZIA2qD/3b24BjcFwADSuxtl66to
 q8B6Ldvw7wr+C8LqO4eIwy3cS0YAeEz15SMGx5zMVAaQseNcqFwJW/eS/5Cgg4OH
 Ooic3qmkMR6oDGNJ0ied+J/98UtYGseR05EpGzAe1tRRuPPK/I4dQhnVIlz/d3Dq
 6ajkRTMWNH9rn0FTNeOX8GeUTLnS+hdmJ/JDxtgsk5Jy9nkv3+JlLY62F8sA5uu6
 0nX0GE6bxkqglx3LT1/qvhD4BN+zg7uA0QYVJzWyOT5VNHMBwxc=
 =dZPc
 -----END PGP SIGNATURE-----

Merge tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt

arm64: Amlogic DT updates for v4.21
Some highlights:
- new boards: Phicomm N1 (S905D), Libretech S805-AC
- fixes for pinmux pad bias, GPIO line names
- AXG: enable SCPI, add secure monitor

* tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: (26 commits)
  arm64: dts: meson-gx: Add Internal Clock Measurer node
  arm64: dts: amlogic: Add all CPUs in cooling maps
  arm64: dts: meson: add libretech aml-s805x-ac board
  dt-bindings: arm: amlogic: add libretech aml-s805x-ac bindings
  dt-bindings: arm: amlogic: Add Phicomm N1
  dt-bindings: Add vendor prefix for PHICOMM Co., Ltd.
  arm64: dts: meson-gxl: add support for phicomm n1
  arm64: dts: meson: consistently disable pin bias
  arm64: dts: meson: disable pad bias for mmc pinmuxes
  arm64: dts: meson: remove extra subnode in mmc clk_gate pinmux
  arm64: dts: meson: s400: add bcm bluetooth device
  arm64: dts: meson: p230: disable advertisement EEE for GbE.
  arm64: dts: meson-axg: enable SCPI
  Documentation: bindings: Add missing Amlogic SCPI sensor bindings
  arm64: dts: meson-axg: correct sram shared mem unit-address
  arm64: dts: meson-axg: fix mailbox address
  arm64: dts: meson-gx: Add hdmi_5v regulator as hdmi tx supply
  arm64: dts: meson-axg: add secure monitor
  arm64: dts: meson-axg: s400: add cts-rts to the bluetooth uart
  arm64: dts: meson-gxl-khadas-vim: fix GPIO lines names
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-11-30 15:18:30 -08:00
Olof Johansson 9cf0418ee0 Versatile Express DTS update for DRM:
This updates the Versatile Express family DTS files to
 contain the correct and detailed information required
 for the PL11x DRM driver to work properly.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJb/5ZcAAoJEEEQszewGV1zXo0QAMzrWDyBqNxgPR5XwNJBzgu1
 x68wAA9N3jLXvHm0KG+J5OP9830m3uCLefhH4/dZN5XV4EjMME9n1Uv+uz6/8/Uu
 fGBMFR1AwIH1qbN1bhG6wcC495vsUp+k8Q8zkpTZ4iT18pv0FMLgTugpOUIIbhxP
 1oUP4xi/c97190QRy1OS7MDTyXElhrxoVtrjmggE9kWgkHPP76FX9ZAQE5EMTDtU
 +O6JrpWuNjpusgOaTYwgNeKzOloAcFbNcaQOGLjHQmGoFRgRuK1jP+ZpULyFaJKo
 5U4D6haYKJqcVhzlMclZa2rh3gkH8M8YUGhDNDABKiTdy1R+gkn44GWKBT9+uKpl
 ve0Jd6ca3DhBe/XQlCADUYGmGy6PUJY9DpWCNxCZn/BBsSOLMiom51jndsnk8Y5b
 gszQnkDPIv6tKxuUIxLS7Q89Jf3TIlVwiDbVHlzvYjiAqJQ9fsRa/BrGM5FknMl6
 YAg8UPAqveUt26RL2t4VEpVY9FSJtCFsmvD202dbmbkJYHpihIN5Nse+msxAn5Ln
 GbCZsA5SFSUapXYDSPQmpLiu2fGS8ojVUzadAKvoG1ktIo1h1SMbvBpHjeERIKaM
 Zw1ErQ5IMyAhtXq64dqIEIgesb7zYiZ+TC89huJr96CRkShfu2bLy0oaqa09GUvk
 JXPF+OrQmUqmq/5P385H
 =4oHX
 -----END PGP SIGNATURE-----

Merge tag 'vexpress-drm-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/dt

Versatile Express DTS update for DRM:
This updates the Versatile Express family DTS files to
contain the correct and detailed information required
for the PL11x DRM driver to work properly.

* tag 'vexpress-drm-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator:
  ARM: dts: Modernize the Vexpress PL111 integration

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-11-30 15:16:42 -08:00
Olof Johansson 4abc79424f SoCFPGA DTS updates for v5.0
- Use SPDX license identifier for all SoCFPGA DTS files.
 - Remove dma-mask property as it has been deprecated.
 - Use tabs in DTS files.
 - Use the specific "altr,stratix10-rst-mgr" property for the Stratix10
   reset manager.
 -----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCgAyFiEEoHhMeiyk5VmwVMwNGZQEC4GjKPQFAlv+teoUHGRpbmd1eWVu
 QGtlcm5lbC5vcmcACgkQGZQEC4GjKPS9Sg//b6N0rtVZlkVaOVtTDR+X/y3/GKyx
 ZCbNaCygR5Iy17nz2XU/h9R/QEPDCWllmJyykvJ4jorwHLeebI2+CDN6aYRSZrA5
 dKw7OFsWntRYAE9Z2v23fATPK0Gc94GopcE0p53YBMS03atKdf06ORDdYPTWs+bi
 4TmP40NcQzTvcNDuOrnkE1Kg1QhH6hakt5u5d2zt4JK7oCkLsMH9uOF4XuoqXDfc
 1RatsAaSbA5JRAB09y+uvPrFrDeA3Guzx9FruBhR4EdSgDJzVnKLZM8/7z+Zmq52
 lwIcpaWBtSgcvB7BgfxgCEsfDbTIlrupWuWGubIShD6oBBdXqk8m5t2E0wqTbyuq
 LJ72OBpUIo2KvMb2Q2cBDW5nyTGkiimf7DUjcBRLmPtAbpubrovt8jJGyJqzzbvn
 p6Rf2AfYm43WiyeNCJGk4nnzO+gGS6T/RTvDIjMhLLRJtiftuj3JRlcJ7Ihx2deO
 Cwu84mbyLQjT9VGOuLdtXAy8fDsZfpkJ9DVavWq8FPbZCdKhuk3vSyrxSVx/QPHt
 uWeauXbyaL+aTOx6pH7opdl84nOwb8zVrldunmhzv0UmrrylttHGS0Dr1L2JiPip
 bOBaPmHKDUFNjgL67PLQ4QCXIUe+4YSFUqRwiyF6e47TR4yVj5cDsUbHI/ttPiR0
 cvfeRb6etth+ri0=
 =IDQS
 -----END PGP SIGNATURE-----

Merge tag 'socfpga_dts_updates_for_v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into next/dt

SoCFPGA DTS updates for v5.0
- Use SPDX license identifier for all SoCFPGA DTS files.
- Remove dma-mask property as it has been deprecated.
- Use tabs in DTS files.
- Use the specific "altr,stratix10-rst-mgr" property for the Stratix10
  reset manager.

* tag 'socfpga_dts_updates_for_v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux:
  arm64: dts: stratix10: use "altr,stratix10-rst-mgr" binding
  ARM: dts: socfpga: use tabs for indentation
  arm: dts: socfpga: remove dma-mask property
  arm: dts: socfpga*.dts*: use SPDX-License-Identifier

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-11-30 15:09:13 -08:00
Olof Johansson e3d3781393 Renesas ARM64 Based SoC DT Updates for v4.21
* H3 (r8a7795) SoC:
   - Remove unneeded sound #address/size-cells
 
 * M3-W (r8a7796) SoC:
   - Describe CMT (Compare Match Timer) devices in DT
   - Describe I2C-DVFS device node in DT
 
 * M3-N (r8a77965) SoC:
   - Describe CAN, CANFD and LVDS in DT
 
 * R-Car H3 (r8a7795) and M3-W (r8a7796) SoCs:
   - Describe CPU topology, capacity and cooling maps in DT
   - Add SSIU support to R-Car audio
 
 * R-Car H3 (r8a7795), M3-W (r8a7796) and M3-N (r8a77965) SoCs:
   - Extend register range of HSUSB device to match documentation
 
 * R-Car H3 (r8a7795), M3-W (r8a7796) and M3-N (r8a77965) based
   Salvator-X, Salvator-XS and ULCB boards:
   - Switch eMMC bus to 1V8
 
 * R-Car H3 (r8a7795), M3-W (r8a7796) and M3-N (r8a77965) based
   Salvator-X and Salvator-XS boards:
   - Describe USB3.0 xHCI host and prerepheral devices as companions
 
 * R-Car E3 (r8a77990) SoC:
   - Add thermal support
   - Add support for interupt controller for external devices (INTC-EX)
   - Describe all SCIF devices and SYS-DMA for I2C and MSIOF devices
 
 * R-Car E3 (r8a77990) based Ebisu board:
   - Enable SDHI, CAN, CANFD, audio and USB3.0
   - Describe serial console pins
 
 * R-Car E3 (r8a77990) based Ebisu and
   R-Car D3 (r8a77995) based Draak board:
   - Enable USB2.0 peripheral device
 
 * R-Car M3-N (r8a77965), E3 (r8a77990) and V3H (r8a77980) SoCs:
   - Connect EtherAVB to IPMMU
 
 * R-Car V3M (r8a77970) and V3H (r8a77980) SoCs:
   - Describe TMU (timer unit), PWM timer controller and MSIOF devides in DT
   - Add thermal support
 
 * RZ/G2M (r8a774a1) SoC:
   - Use clock and power index macros
   - Describe VIN, CSI-2 and CAN devices in DT
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4nzZofWswv9L/nKF189kaWo3T74FAlv70EIACgkQ189kaWo3
 T77EBg/8C7ix/yEsUoZkN9jQHvWUQnJBBwY/YExhMf6RqBGNz8k3Q/inGfxV/5w6
 +V+b/Xt7RrP+VOgP6PSig4QABKwjBpOhBPTg3So1w7Ne59uHMCofEYqg6HpYwT2K
 nfmp7gSN5C+iiwvwSZ8CypLZ5SKunqpQW53a7oeGlJauypcTJGQuVRRF/QGOAnbN
 jcIjvaSTVNo+CAuzFd11XZ5F4FEqZ4bEMR+F/Me6fvpOVH4W0nkKNYKdEFAJ2r6e
 ybAOyRSbE6aBhpXzPH0HT6wZMII6FtTQSPDhJ2xpt7Oe7Ou3GuQ+BRcRiS2nbvPQ
 xyJzobWAS5b7cNTr7vrruh8wKuOmu6v/SVtSCJbsLFFZibbFzPlg0l3tdlxI2oso
 UKwJtXnSVXDMXjp2RChfjpsqrT2sY3w/R9KVzKXsNwPN52saY2lnOw3iWOROGEC3
 smivtt46QRBygB8Q5GsjhLyPlWKj9Kfbt3+pWCRlbJ0sDPlJA9vkkkpKMIbp5U1q
 IiOFp0mSmM52MDlwSGZ7zPDpZeawxfeQnT/yEZ7cFdsHOBaruszyN8Rl9lTMf8Ph
 7i59aYDillhoBAL195Vapgmf1rmlFPQckUYw9+K0rmaWQZCSBZd87xLJ2StNPRcZ
 GdZIQ7tNulgVHetyPYPWfkeLjrpCC255Z5CQCChl+d8uGEL7K88=
 =DUcP
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm64-dt-for-v4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt

Renesas ARM64 Based SoC DT Updates for v4.21

* H3 (r8a7795) SoC:
  - Remove unneeded sound #address/size-cells

* M3-W (r8a7796) SoC:
  - Describe CMT (Compare Match Timer) devices in DT
  - Describe I2C-DVFS device node in DT

* M3-N (r8a77965) SoC:
  - Describe CAN, CANFD and LVDS in DT

* R-Car H3 (r8a7795) and M3-W (r8a7796) SoCs:
  - Describe CPU topology, capacity and cooling maps in DT
  - Add SSIU support to R-Car audio

* R-Car H3 (r8a7795), M3-W (r8a7796) and M3-N (r8a77965) SoCs:
  - Extend register range of HSUSB device to match documentation

* R-Car H3 (r8a7795), M3-W (r8a7796) and M3-N (r8a77965) based
  Salvator-X, Salvator-XS and ULCB boards:
  - Switch eMMC bus to 1V8

* R-Car H3 (r8a7795), M3-W (r8a7796) and M3-N (r8a77965) based
  Salvator-X and Salvator-XS boards:
  - Describe USB3.0 xHCI host and prerepheral devices as companions

* R-Car E3 (r8a77990) SoC:
  - Add thermal support
  - Add support for interupt controller for external devices (INTC-EX)
  - Describe all SCIF devices and SYS-DMA for I2C and MSIOF devices

* R-Car E3 (r8a77990) based Ebisu board:
  - Enable SDHI, CAN, CANFD, audio and USB3.0
  - Describe serial console pins

* R-Car E3 (r8a77990) based Ebisu and
  R-Car D3 (r8a77995) based Draak board:
  - Enable USB2.0 peripheral device

* R-Car M3-N (r8a77965), E3 (r8a77990) and V3H (r8a77980) SoCs:
  - Connect EtherAVB to IPMMU

* R-Car V3M (r8a77970) and V3H (r8a77980) SoCs:
  - Describe TMU (timer unit), PWM timer controller and MSIOF devides in DT
  - Add thermal support

* RZ/G2M (r8a774a1) SoC:
  - Use clock and power index macros
  - Describe VIN, CSI-2 and CAN devices in DT

* tag 'renesas-arm64-dt-for-v4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (40 commits)
  arm64: dts: renesas: Add all CPUs in cooling maps
  arm64: dts: renesas: r8a77990: add thermal device support
  arm64: dts: renesas: r8a77990: Enable I2C DMA
  arm64: dts: renesas: r8a7796: Add CMT device nodes
  arm64: dts: renesas: r8a7796: add SSIU support for sound
  arm64: dts: renesas: r8a77990: Add I2C-DVFS device node
  arm64: dts: renesas: r8a77990: ebisu: Add and enable CAN,FD device nodes
  arm64: dts: renesas: r8a77965: Add CAN and CANFD controller nodes
  arm64: dts: renesas: r8a77990: ebisu: Add and enable PCIe device node
  arm64: dts: renesas: Add CPU capacity-dmips-mhz
  arm64: dts: renesas: Add CPU topology on R-Car Gen3 SoCs
  arm64: dts: renesas: r8a774a1: Replace clock magic numbers
  arm64: dts: renesas: r8a774a1: Replace power magic numbers
  arm64: dts: renesas: r8a7795: add SSIU support for sound
  arm64: dts: renesas: r8a77990: Fix VIN endpoint numbering
  arm64: dts: renesas: ebisu: Add and enable SDHI device nodes
  arm64: dts: renesas: ebisu: Add serial console pins
  arm64: dts: renesas: Switch eMMC bus to 1V8 on Salvator-X and ULCB
  arm64: dts: renesas: r8a77990: Add all HSCIF nodes
  arm64: dts: renesas: r8a779{7|8}0: add TMU support
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-11-30 15:05:34 -08:00
Olof Johansson 42d76db96e New dts for Gru-Scarlet (tablet device), default backlight brightness
for all Gru devices, rk3399 spi dma properties, some improvements for
 the rk3399-sapphire board (fan, chosen, backlight), hs200 mode for the
 emmc on the rock64 and declaring all cpu cores in the cooling maps
 instead of just cpu0.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAlv2ni0QHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgeaVB/4vKlFs9CKs+oj7Wi5+UoSbsBReHqAuENVm
 6ShgnA15nCVaOzo3RT1ck8hHjKpAcTfX1siwmCK9OETwyxXI5vQCbKz3EIkoQYCQ
 WIyyqlTs6Ars67ZSxJSPgitj8kguzEfJo7T+mOhhQK0nWS1jjJRmdtMcsYXqJbMg
 OYj35cG4zRVFIQg87kQnVC3rkBu5Pb4LhY8J8+Ft2NUlRbUHBC08zgxe7oZLlTrt
 AIquFnEdhjSz0KxeN66wtvEyMT1e36qTjW8/iu3YQOIaxFoIcxCtrXIfxplFId6o
 f01Yu86wjfANQYIRzZLRV2GsLIlYpdiGk/aCQnSb6xgB4bcXiZQ9
 =WIig
 -----END PGP SIGNATURE-----

Merge tag 'v4.21-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt

New dts for Gru-Scarlet (tablet device), default backlight brightness
for all Gru devices, rk3399 spi dma properties, some improvements for
the rk3399-sapphire board (fan, chosen, backlight), hs200 mode for the
emmc on the rock64 and declaring all cpu cores in the cooling maps
instead of just cpu0.

* tag 'v4.21-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  arm64: dts: rockchip: Add all CPUs in cooling maps
  arm64: dts: rockchip: add Gru Scarlet devicetrees
  arm64: dts: rockchip: move backlight from rk3399 sapphire to excavator
  arm64: dts: rockchip: Use default brightness table for rk3399-gru
  arm64: dts: rockchip: add chosen node on rk3399-sapphire
  arm64: dts: rockchip: enable HS200 for eMMC on rock64
  arm64: dts: rockchip: add fan on rk3399-sapphire board
  arm64: dts: rockchip: add rk3399 SPI DMAs

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-11-30 15:04:01 -08:00
Bjorn Andersson b0bd6f1c03 arm64: defconfig: Enable GCC and PINCTRL for MSM8998
Enable the GCC and PINCTRL for MSM8998 to make upstream boot to console.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-11-30 15:12:46 -06:00
Olof Johansson adb97bcdbd Removal of vdd_log regulator on rk960 to fix a stability issue
and fixup of the pcie reset polarity on puma-haikou.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAlv2k2IQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgUp6CACrEQqPl2y2xqrQ/7CXNXQRVNEDqDdLkekq
 4nHTclyW8IsH1TFv/v4ihn35BYwlmE+SK0+eAkuV5AQ5//yLRz1tFCQI4tPcwtdM
 11amUnpmctTt4e2Gv5ryZy2cIUIQjaoolPN5bqmVdNSTe08s2aLmAogXRr0k32m5
 tkvZECKTe5C5C6oZ47DcSOkm1bTk3tdf+pMKjGEFsPaIYbeunjLmjdJ1ft9vU927
 yLag4S+iT8/klQDCt1CB5b98eS8jTZBZV0rEJBd/lqhXxvZoHDC/EkHZtYNsup4Q
 nTMXt12b+o5PPnpi/5p8gl5MJVbAZBhSdKe94akcp36LdhZUhJfW
 =D6/c
 -----END PGP SIGNATURE-----

Merge tag 'v4.20-rockchip-dts64fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into fixes

Removal of vdd_log regulator on rk960 to fix a stability issue
and fixup of the pcie reset polarity on puma-haikou.

* tag 'v4.20-rockchip-dts64fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  arm64: dts: rockchip: Fix PCIe reset polarity for rk3399-puma-haikou.
  arm64: dts: rockchip: remove vdd_log from rock960 to fix a stability issues

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-11-30 11:50:14 -08:00
Ding Tao eefe328439 arm64: dts: marvell: armada37xx: Add emmc/sdio pinctrl definition
Add emmc/sdio pinctrl definition for marvell armada37xx SoCs.

Signed-off-by: Ding Tao <miyatsu@qq.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-11-30 18:53:55 +01:00
Baruch Siach 235df2d80d arm64: dts: clearfog-gt-8k: enable mini-PCIe CON2 USB
Deassert the reset and wireless disable signals on the CON2 mini-PCIe
socket. That allows the host to detect USB devices on the mini-PCIe
socket.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-11-30 18:46:12 +01:00
Baruch Siach babc5544c2 arm64: dts: clearfog-gt-8k: 1G eth PHY reset signal
This reset signal controls the Marvell 1512 1G PHY.

Note that current implementation queries the PHY over the MDIO bus
(get_phy_device() call from of_mdiobus_register_phy()) before reset
signal deassert. If the PHY reset signal is asserted at boot time, PHY
registration fails. So current code relies on the bootloader to deassert
the reset signal.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-11-30 18:44:53 +01:00
Baruch Siach b597a6f542 arm64: dts: clearfog-gt-8k: fix USB regulator gpio polarity
The fixed regulator driver ignores the gpio flags, so this change has
no practical effect in the current implementation. Fix it anyway to
correct the hardware description.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-11-30 18:44:46 +01:00
Linus Torvalds 0f1f692375 While rewriting the function graph tracer, I discovered a design flaw that
was introduced by a patch that tried to fix one bug, but by doing so created
 another bug. As both bugs corrupt the output (but they do not crash the
 kernel), I decided to fix the design such that it could have both bugs
 fixed. The original fix, fixed time reporting of the function graph tracer
 when doing a max_depth of one. This was code that can test how much the
 kernel interferes with userspace. But in doing so, it could corrupt the time
 keeping of the function profiler.
 
 The issue is that the curr_ret_stack variable was being used for two
 different meanings. One was to keep track of the stack pointer on the
 ret_stack (shadow stack used by the function graph tracer), and the other
 use case was the graph call depth.  Although, the two may be closely
 related, where they got updated was the issue that lead to the two different
 bugs that required the two use cases to be updated differently.
 
 The big issue with this fix is that it requires changing each architecture.
 The good news is, I was able to remove a lot of code that was duplicated
 within the architectures and place it into a single location. Then I could
 make the fix in one place.
 
 I pushed this code into linux-next to let it settle over a week, and before
 doing so, I cross compiled all the affected architectures to make sure that
 they built fine.
 
 In the mean time, I also pulled in a patch that fixes the sched_switch
 previous tasks state output, that was not actually correct.
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYIADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCW/4NPhQccm9zdGVkdEBn
 b29kbWlzLm9yZwAKCRAp5XQQmuv6qnWAAQCyUIRLgYImr81eTl52lxNRsULk+aiI
 U29kRFWWU0c40AEA1X9sDF0MgOItbRGfZtnHTZEousXRDaDf4Fge2kF7Egg=
 =liQ0
 -----END PGP SIGNATURE-----

Merge tag 'trace-v4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull tracing fixes from Steven Rostedt:
 "While rewriting the function graph tracer, I discovered a design flaw
  that was introduced by a patch that tried to fix one bug, but by doing
  so created another bug.

  As both bugs corrupt the output (but they do not crash the kernel), I
  decided to fix the design such that it could have both bugs fixed. The
  original fix, fixed time reporting of the function graph tracer when
  doing a max_depth of one. This was code that can test how much the
  kernel interferes with userspace. But in doing so, it could corrupt
  the time keeping of the function profiler.

  The issue is that the curr_ret_stack variable was being used for two
  different meanings. One was to keep track of the stack pointer on the
  ret_stack (shadow stack used by the function graph tracer), and the
  other use case was the graph call depth. Although, the two may be
  closely related, where they got updated was the issue that lead to the
  two different bugs that required the two use cases to be updated
  differently.

  The big issue with this fix is that it requires changing each
  architecture. The good news is, I was able to remove a lot of code
  that was duplicated within the architectures and place it into a
  single location. Then I could make the fix in one place.

  I pushed this code into linux-next to let it settle over a week, and
  before doing so, I cross compiled all the affected architectures to
  make sure that they built fine.

  In the mean time, I also pulled in a patch that fixes the sched_switch
  previous tasks state output, that was not actually correct"

* tag 'trace-v4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  sched, trace: Fix prev_state output in sched_switch tracepoint
  function_graph: Have profiler use curr_ret_stack and not depth
  function_graph: Reverse the order of pushing the ret_stack and the callback
  function_graph: Move return callback before update of curr_ret_stack
  function_graph: Use new curr_ret_depth to manage depth instead of curr_ret_stack
  function_graph: Make ftrace_push_return_trace() static
  sparc/function_graph: Simplify with function_graph_enter()
  sh/function_graph: Simplify with function_graph_enter()
  s390/function_graph: Simplify with function_graph_enter()
  riscv/function_graph: Simplify with function_graph_enter()
  powerpc/function_graph: Simplify with function_graph_enter()
  parisc: function_graph: Simplify with function_graph_enter()
  nds32: function_graph: Simplify with function_graph_enter()
  MIPS: function_graph: Simplify with function_graph_enter()
  microblaze: function_graph: Simplify with function_graph_enter()
  arm64: function_graph: Simplify with function_graph_enter()
  ARM: function_graph: Simplify with function_graph_enter()
  x86/function_graph: Simplify with function_graph_enter()
  function_graph: Create function_graph_enter() to consolidate architecture code
2018-11-30 09:32:34 -08:00
Bjorn Andersson 70827d9f6b arm64: dts: qcom: msm8998: Fix compatible of scm node
The scm binding and driver was updated to rely on the fallback to the
default qcom,scm for any modern SoC and as such both are required. Add
the default compatible to make the scm instance probe.

Fixes: d850156a22 ("arm64: dts: qcom: msm8998: Add firmware node")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-11-30 07:59:02 -06:00
Ard Biesheuvel efdb25efc7 arm64/lib: improve CRC32 performance for deep pipelines
Improve the performance of the crc32() asm routines by getting rid of
most of the branches and small sized loads on the common path.

Instead, use a branchless code path involving overlapping 16 byte
loads to process the first (length % 32) bytes, and process the
remainder using a loop that processes 32 bytes at a time.

Tested using the following test program:

  #include <stdlib.h>

  extern void crc32_le(unsigned short, char const*, int);

  int main(void)
  {
    static const char buf[4096];

    srand(20181126);

    for (int i = 0; i < 100 * 1000 * 1000; i++)
      crc32_le(0, buf, rand() % 1024);

    return 0;
  }

On Cortex-A53 and Cortex-A57, the performance regresses but only very
slightly. On Cortex-A72 however, the performance improves from

  $ time ./crc32

  real  0m10.149s
  user  0m10.149s
  sys   0m0.000s

to

  $ time ./crc32

  real  0m7.915s
  user  0m7.915s
  sys   0m0.000s

Cc: Rui Sun <sunrui26@huawei.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-30 13:58:04 +00:00
Mark Rutland 7dc48bf96a arm64: ftrace: always pass instrumented pc in x0
The core ftrace hooks take the instrumented PC in x0, but for some
reason arm64's prepare_ftrace_return() takes this in x1.

For consistency, let's flip the argument order and always pass the
instrumented PC in x0.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Torsten Duwe <duwe@suse.de>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-30 13:29:05 +00:00
Mark Rutland 49e258e05e arm64: ftrace: remove return_regs macros
The save_return_regs and restore_return_regs macros are only used by
return_to_handler, and having them defined out-of-line only serves to
obscure the logic.

Before we complicate, let's clean this up and fold the logic directly
into return_to_handler, saving a few lines of macro boilerplate in the
process. At the same time, a missing trailing space is added to the
comments, fixing a code style violation.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Torsten Duwe <duwe@suse.de>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-30 13:29:05 +00:00
Mark Rutland 6e803e2e6e arm64: ftrace: don't adjust the LR value
The core ftrace code requires that when it is handed the PC of an
instrumented function, this PC is the address of the instrumented
instruction. This is necessary so that the core ftrace code can identify
the specific instrumentation site. Since the instrumented function will
be a BL, the address of the instrumented function is LR - 4 at entry to
the ftrace code.

This fixup is applied in the mcount_get_pc and mcount_get_pc0 helpers,
which acquire the PC of the instrumented function.

The mcount_get_lr helper is used to acquire the LR of the instrumented
function, whose value does not require this adjustment, and cannot be
adjusted to anything meaningful. No adjustment of this value is made on
other architectures, including arm. However, arm64 adjusts this value by
4.

This patch brings arm64 in line with other architectures and removes the
adjustment of the LR value.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Torsten Duwe <duwe@suse.de>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-30 13:29:05 +00:00
Mark Rutland 5c176aff5b arm64: ftrace: enable graph FP test
The core frace code has an optional sanity check on the frame pointer
passed by ftrace_graph_caller and return_to_handler. This is cheap,
useful, and enabled unconditionally on x86, sparc, and riscv.

Let's do the same on arm64, so that we can catch any problems early.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Torsten Duwe <duwe@suse.de>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-30 13:29:04 +00:00
Mark Rutland e4fe196642 arm64: ftrace: use GLOBAL()
The global exports of ftrace_call and ftrace_graph_call are somewhat
painful to read. Let's use the generic GLOBAL() macro to ameliorate
matters.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Torsten Duwe <duwe@suse.de>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-30 13:29:04 +00:00
Ard Biesheuvel dd6846d774 arm64: drop linker script hack to hide __efistub_ symbols
Commit 1212f7a16a ("scripts/kallsyms: filter arm64's __efistub_
symbols") updated the kallsyms code to filter out symbols with
the __efistub_ prefix explicitly, so we no longer require the
hack in our linker script to emit them as absolute symbols.

Cc: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-30 12:49:51 +00:00
Geert Uytterhoeven 41e30b515a arm64: dts: renesas: r8a7795-es1: Add missing power domains to IPMMU nodes
While commit 3b7e7848f0 ("arm64: dts: renesas: r8a7795: Add IPMMU
device nodes") for R-Car H3 ES2.0 did include power-domains properties,
they were forgotten in the counterpart for older R-Car H3 ES1.x SoCs.

Fixes: e4b9a493df ("arm64: dts: renesas: r8a7795-es1: Add IPMMU device nodes")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-11-30 11:16:55 +01:00
Geert Uytterhoeven d8c6557bc9 arm64: dts: renesas: r8a77965: Remove non-existent IPMMU-IR
The R-Car Gen3 HardWare Manual Errata for Rev. 1.00 (Aug 24, 2018)
removed the IPMMU-IR IOMMU instance on R-Car M3-N, as this SoC does not
have an Image Processing Unit (IMP-X5) nor the A3IR power domain.

Fixes: 55697cbb44 ("arm64: dts: renesas: r8a779{65,80,90}: Add IPMMU devices nodes")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-11-30 11:13:02 +01:00
Ard Biesheuvel cc2b8ed136 arm64/bpf: use movn/movk/movk sequence to generate kernel addresses
On arm64, all executable code is guaranteed to reside in the vmalloc
space (or the module space), and so jump targets will only use 48
bits at most, and the remaining bits are guaranteed to be 0x1.

This means we can generate an immediate jump address using a sequence
of one MOVN (move wide negated) and two MOVK instructions, where the
first one sets the lower 16 bits but also sets all top bits to 0x1.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2018-11-30 10:23:25 +01:00
Vasily Khoruzhick 2c8d843d49 arm64: dts: allwinner: a64: pinebook: enable power supplies
Pinebook has ACIN connector and 10000 mAh battery.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2018-11-30 16:27:33 +08:00
Oskari Lemmela 5e99c99aa8 arm64: dts: allwinner: a64: sopine-baseboard: enable power supplies
AXP803 ACIN pins are routed from SOM to the DC jack on the baseboard.
AXP803 charger pins BATSENSE, LOADSENSE, N_BATDRV, LX_CHG, VIN_CHG
and IPSOUT are connected via PMOS driver to SOM VBAT pins. VBAT and
AXP803 TS pins are routed to the baseboard 3-pin battery connector.

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
Reviewed-by: Quentin Schulz <quentin.schulz@bootlin.com>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2018-11-30 16:26:52 +08:00
Oskari Lemmela 7422115024 arm64: dts: allwinner: axp803: add AC and battery power supplies
Parts of the AXP803 are compatible with their counterparts on the AXP813.
Add DT nodes ADC, GPIO, AC and battery power supplies.

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
Reviewed-by: Quentin Schulz <quentin.schulz@bootlin.com>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Tested-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2018-11-30 16:25:56 +08:00
Bjorn Andersson 5b7f180fb3 arm64: defconfig: Enable core Qualcomm SDM845 options
Enable a few core config options to be able to boot SDM845 MTP.

The GCC, PINCTRL and GENI options are required to be able to boot to a
console. Several clocks from GCC are parented by the "bi_tcxo" clock
from the RPMH clock driver, so enable this to save others the time to
debug the missing parent clocks later. RPMH depends on the COMMAND_DB.
While we're enabling the others let's do RPMH regulators as well, as
everything beyond this point depends on that.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-11-29 19:50:44 -06:00
Jeffrey Hugo 6da8016109 arm64: dts: qcom: msm8998: Add SDC2 control pins
The SDC2 control pins are typically used to manage sleep.

Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-11-29 19:31:00 -06:00
Jeffrey Hugo 23bd4f785b arm64: dts: qcom: msm8998-mtp: Add external SD
The externally accessible SD card slot on the MTP is driven by SDCC2.
Wire it up for use.

Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-11-29 19:30:55 -06:00
Jeffrey Hugo 1cfce828dc arm64: dts: qcom: msm8998: Add SDCC2
SDCC2 is typically used as the controller for an external SD card slot.

Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-11-29 19:29:03 -06:00
Jeffrey Hugo 634da3307b arm64: dts: qcom: msm8998: correct xo clock name
The root parent clock of most msm8998 clock is the "xo" clock.  The DT node
is incorrectly named "xo_board", which prevents Linux from correctly
parsing the clock tree, resulting in most clocks being unparented and
unable to be manipulated.  The end result is that we can't turn on clocks
for peripherals like SD, so init usually fails.

Fixes: 4807c71cc6 (arm64: dts: Add msm8998 SoC and MTP board support)
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-11-29 19:28:58 -06:00
Andy Gross 2aaa1b2161 Merge branch 'qcs404-topic-revised' into arm64-for-4.21-3 2018-11-29 19:28:48 -06:00
Neil Armstrong 5e339a1d7e arm64: dts: meson-gx: Add Internal Clock Measurer node
The Amlogic Meson GX SoCs embeds a clock measurer IP to measure the internal
clock paths frequencies.
This patch adds the node in the top-level meson-gx dtsi.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-29 12:30:09 -08:00
Viresh Kumar 146e99be22 arm64: dts: amlogic: Add all CPUs in cooling maps
Each CPU can (and does) participate in cooling down the system but the
DT only captures a handful of them, normally CPU0, in the cooling maps.
Things work by chance currently as under normal circumstances its the
first CPU of each cluster which is used by the operating systems to
probe the cooling devices. But as soon as this CPU ordering changes and
any other CPU is used to bring up the cooling device, we will start
seeing failures.

Also the DT is rather incomplete when we list only one CPU in the
cooling maps, as the hardware doesn't have any such limitations.

Update cooling maps to include all devices affected by individual trip
points.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-29 12:30:09 -08:00
Neil Armstrong 0449b8e371 arm64: dts: meson: add libretech aml-s805x-ac board
Add Libretech aml-s805x-ac board (aka 'La Frite') support

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-29 12:30:08 -08:00
He Yangxuan ba1c84ee74 arm64: dts: meson-gxl: add support for phicomm n1
This patch adds support for the Phicomm N1. This device based on P230 reference design.
And this box doesn't have cvbs, so disable related section in device tree.

Signed-off-by: He Yangxuan <yangxuan8282@gmail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-29 12:30:04 -08:00
Jerome Brunet 1c5cc1c805 arm64: dts: meson: consistently disable pin bias
On Amlogic chipsets, the bias set through pinconf applies to the pad
itself, not only the GPIO function. This means that even when we change
the function of the pad from GPIO to anything else, the bias previously
set still applies.

As we have seen with the eMMC, depending on the bias type and the function,
it may trigger problems.

The underlying issue is that we inherit whatever was left by previous user
of the pad (pinconf, u-boot or the ROM code). As a consequence, the actual
setup we will get is undefined.

There is nothing mentioned in the documentation about pad bias and pinmux
function, however leaving it undefined is not an option.

This change consistently disable the pad bias for every pinmux functions.
It seems to work well, we can only assume that the necessary bias (if any)
is already provided by the pin function itself.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-29 12:30:03 -08:00
Jerome Brunet 96a13691c1 arm64: dts: meson: disable pad bias for mmc pinmuxes
In some cases (such as a boot from SPI) the bootloader or the ROM code may
leave a bias pull-down on the mmc pins. If so the MMC will fail during the
initialisation.

Explicitly disabling the pinmux solves the problem.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-29 12:30:03 -08:00
Jerome Brunet 06096d7a87 arm64: dts: meson: remove extra subnode in mmc clk_gate pinmux
In the pinmux of the mmc clk_gate nodes, we define 2 subnodes. One for
the function definition, the other for the bias. This is not necessary
since we can define the function and the bias in the same subnode.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-29 12:30:02 -08:00
Jerome Brunet ac444768bd arm64: dts: meson: s400: add bcm bluetooth device
Add broadcom bluetooth device on the s400

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-29 12:30:01 -08:00
He Yangxuan 920b4d3969 arm64: dts: meson: p230: disable advertisement EEE for GbE.
This patch disable EEE advertisement for P230 board (DWMAC + RTL8211F).
If not disable it, the network connection is not stable, will got issues
like throughput drop or broken link.

Signed-off-by: He Yangxuan <yangxuan8282@gmail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-29 12:30:00 -08:00
Jerome Brunet 2c130695ad arm64: dts: meson-axg: enable SCPI
Enable SCPI on the axg platform, with cpu clock and hwmon
(core temperature) support

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-29 12:29:59 -08:00
Jerome Brunet 9c2d16bbfd arm64: dts: meson-axg: correct sram shared mem unit-address
Correct the unit-address in the node name of the SRAM shared memory

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-29 12:29:58 -08:00
Jerome Brunet 9fdff382e3 arm64: dts: meson-axg: fix mailbox address
MHU mailbox address is wrong. Fixing it enables the mailboxes on the A113.
These mailboxes are needed for SCPI

Fixes: 9d59b70850 ("arm64: dts: meson-axg: add initial A113D SoC DT support")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-29 12:29:57 -08:00
Neil Armstrong e1f2163dea arm64: dts: meson-gx: Add hdmi_5v regulator as hdmi tx supply
The hdmi_5v regulator must be enabled to provide power to the physical HDMI
PHY and enables the HDMI 5V presence loopback for the monitor.

Fixes: b409f625a6 ("ARM64: dts: meson-gx: Add HDMI_5V regulator on selected boards")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-29 12:29:56 -08:00
Jerome Brunet 96dc5702ac arm64: dts: meson-axg: add secure monitor
Add the secure monitor device to the axg platform.
With this, we can read the SoC serial number.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-29 12:29:55 -08:00
Jerome Brunet a708c68563 arm64: dts: meson-axg: s400: add cts-rts to the bluetooth uart
The uart used with bluetooth chipset on the s400 has flow control
available. Let's enable it.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-29 12:29:54 -08:00
Neil Armstrong 5b78012636 arm64: dts: meson-gxl-khadas-vim: fix GPIO lines names
The gpio line names were set in the pinctrl node instead of the gpio node,
at the time it was merged, it worked, but was obviously wrong.
This patch moves the properties to the gpio nodes.

Fixes: 60795933b7 ("ARM64: dts: meson-gxl-khadas-vim: Add GPIO lines names")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-29 12:29:53 -08:00
Neil Armstrong 2165b006b6 arm64: dts: meson-gxbb-odroidc2: fix GPIO lines names
The gpio line names were set in the pinctrl node instead of the gpio node,
at the time it was merged, it worked, but was obviously wrong.
This patch moves the properties to the gpio nodes.

Fixes: b03c7d6438 ("ARM64: dts: meson-gxbb-odroidc2: Add GPIO lines names")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-29 12:29:53 -08:00
Neil Armstrong f0783f5edb arm64: dts: meson-gxbb-nanopi-k2: fix GPIO lines names
The gpio line names were set in the pinctrl node instead of the gpio node,
at the time it was merged, it worked, but was obviously wrong.
This patch moves the properties to the gpio nodes.

Fixes: 12ada0513d ("ARM64: dts: meson-gxbb-nanopi-k2: Add GPIO lines names")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-29 12:29:52 -08:00
Neil Armstrong 11fa977461 arm64: dts: meson-gxl-libretech-cc: fix GPIO lines names
The gpio line names were set in the pinctrl node instead of the gpio node,
at the time it was merged, it worked, but was obviously wrong.
This patch moves the properties to the gpio nodes.

Fixes: 47884c5c74 ("ARM64: dts: meson-gxl-libretech-cc: Add GPIO lines names")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-29 12:29:51 -08:00
Jerome Brunet fbd5cbc5c9 arm64: dts: meson-axg: fix dtc warning about unit address
section 2.2.1 of the DT specs says: " If the node has no reg property,
the @unit-address must be omitted and the node-name alone differentiates
the node from other nodes at the same level in the tree"

Simply replace the '@' with a '-' to fix this warning.

Cc: Fabio Estevam <festevam@gmail.com>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-29 12:29:50 -08:00
Christian Hewitt dd5297cc8b arm64: dts: meson-gxl-s905x-khadas-vim enable Bluetooth
This enables Bluetooth support for the following models:

- Khadas VIM basic (AP6212) using firmware BCM43438A1.hcd
- Khadas VIM pro (AP6255) using firmware BCM4345C0.hcd

The AP6212 module used on the VIM basic has an ID clash with another
device. To get Bluetooth working you either need to apply a kernel
patch to drivers/bluetooth/btbcm.c so 0x2209 loads BCM43438A1 or the
BCM43438A1.hcd firmware must be renamed to BCM43430A1.hcd.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-11-29 12:29:49 -08:00
Masami Hiramatsu 874bfc6e54 arm64: ftrace: Fix to enable syscall events on arm64
Since commit 4378a7d4be ("arm64: implement syscall wrappers")
introduced "__arm64_" prefix to all syscall wrapper symbols in
sys_call_table, syscall tracer can not find corresponding
metadata from syscall name. In the result, we have no syscall
ftrace events on arm64 kernel, and some bpf testcases are failed
on arm64.

To fix this issue, this introduces custom
arch_syscall_match_sym_name() which skips first 8 bytes when
comparing the syscall and symbol names.

Fixes: 4378a7d4be ("arm64: implement syscall wrappers")
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: stable@vger.kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-11-29 16:53:10 +00:00
Catalin Marinas ce8c80c536 arm64: Add workaround for Cortex-A76 erratum 1286807
On the affected Cortex-A76 cores (r0p0 to r3p0), if a virtual address
for a cacheable mapping of a location is being accessed by a core while
another core is remapping the virtual address to a new physical page
using the recommended break-before-make sequence, then under very rare
circumstances TLBI+DSB completes before a read using the translation
being invalidated has been observed by other observers. The workaround
repeats the TLBI+DSB operation and is shared with the Qualcomm Falkor
erratum 1009

Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-11-29 16:45:45 +00:00
Will Deacon 1b57ec8c75 arm64: io: Ensure value passed to __iormb() is held in a 64-bit register
As of commit 6460d32014 ("arm64: io: Ensure calls to delay routines
are ordered against prior readX()"), MMIO reads smaller than 64 bits
fail to compile under clang because we end up mixing 32-bit and 64-bit
register operands for the same data processing instruction:

./include/asm-generic/io.h:695:9: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
        return readb(addr);
               ^
./arch/arm64/include/asm/io.h:147:58: note: expanded from macro 'readb'
                                                                       ^
./include/asm-generic/io.h:695:9: note: use constraint modifier "w"
./arch/arm64/include/asm/io.h:147:50: note: expanded from macro 'readb'
                                                               ^
./arch/arm64/include/asm/io.h:118:24: note: expanded from macro '__iormb'
        asm volatile("eor       %0, %1, %1\n"                           \
                                    ^

Fix the build by casting the macro argument to 'unsigned long' when used
as an input to the inline asm.

Reported-by: Nick Desaulniers <nick.desaulniers@gmail.com>
Reported-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-29 16:36:18 +00:00
Viresh Kumar 6ad5506ed1 ARM64: dts: hisilicon: Add all CPUs in cooling maps
Each CPU can (and does) participate in cooling down the system but the
DT only captures a handful of them, normally CPU0, in the cooling maps.
Things work by chance currently as under normal circumstances its the
first CPU of each cluster which is used by the operating systems to
probe the cooling devices. But as soon as this CPU ordering changes and
any other CPU is used to bring up the cooling device, we will start
seeing failures.

Also the DT is rather incomplete when we list only one CPU in the
cooling maps, as the hardware doesn't have any such limitations.

Update cooling maps to include all devices affected by individual trip
points.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-11-29 10:11:21 +00:00
Viresh Kumar a7a6e2cbb4 arm64: dts: hi3660: Add missing cooling device properties for CPUs
The cooling device properties, like "#cooling-cells" and
"dynamic-power-coefficient", should either be present for all the CPUs
of a cluster or none. If these are present only for a subset of CPUs of
a cluster then things will start falling apart as soon as the CPUs are
brought online in a different order. For example, this will happen
because the operating system looks for such properties in the CPU node
it is trying to bring up, so that it can register a cooling device.

Add such missing properties.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-11-29 10:11:21 +00:00
Manivannan Sadhasivam 4c7c31104b arm64: dts: hisilicon: poplar: Standardize LED labels and triggers
For all 96Boards, the following standard is used for onboard LEDs.

green:user1  default-trigger: heartbeat
green:user2  default-trigger: mmc0/disk-activity(onboard-storage)
green:user3  default-trigger: mmc1 (SD-card)
green:user4  default-trigger: none, panic-indicator
yellow:wlan  default-trigger: phy0tx
blue:bt      default-trigger: hci0-power

So lets adopt the same for Poplar, which is one of the 96Boards
Enterprise edition platform.

Due to absence of WLAN and BT support, corresponding LED nodes are not
considered.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-11-29 10:11:20 +00:00
Manivannan Sadhasivam 28b45da9ac arm64: dts: hisilicon: hikey960: Standardize LED labels and triggers
For all 96Boards, the following standard is used for onboard LEDs.

green:user1  default-trigger: heartbeat
green:user2  default-trigger: mmc0/disk-activity(onboard-storage)
green:user3  default-trigger: mmc1 (SD-card)
green:user4  default-trigger: none, panic-indicator
yellow:wlan  default-trigger: phy0tx
blue:bt      default-trigger: hci0-power

So lets adopt the same for HiKey960 which is one of the 96Boards
CE platform.

Since there is no trigger available for onboard-storage UFS now, user2
trigger is set to none.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-11-29 10:11:20 +00:00
Manivannan Sadhasivam 2e3ea3e7fb arm64: dts: hisilicon: hikey: Standardize LED labels and triggers
For all 96Boards, the following standard is used for onboard LEDs.

green:user1  default-trigger: heartbeat
green:user2  default-trigger: mmc0/disk-activity(onboard-storage)
green:user3  default-trigger: mmc1 (SD-card)
green:user4  default-trigger: none, panic-indicator
yellow:wlan  default-trigger: phy0tx
blue:bt      default-trigger: hci0-power

So lets adopt the same for HiKey, which is one of the 96Boards
CE platform.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-11-29 10:11:20 +00:00
Manivannan Sadhasivam 8aa2fca834 arm64: dts: hisilicon: hikey970: Add GPIO line names
Add GPIO line names for HiSilicon HiKey970 board based on HI3670 SoC.
The Line names are derived from "hikey970-schematics.pdf" document and
named in conjunction with 96Boards CE Specification v1.0.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-11-29 10:11:19 +00:00
Manivannan Sadhasivam 84d9e4df19 arm64: dts: hisilicon: hikey970: Enable on-board UARTs
Enable on-board UARTs on HiSilicon HiKey970 board.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-11-29 10:11:19 +00:00
Manivannan Sadhasivam dd54bb8a0a arm64: dts: hisilicon: hi3670: Add UART nodes
Add UART nodes for HiSilicon HI3670 SoC and also relevant pinmux/pinconf
entries.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-11-29 10:11:18 +00:00
Manivannan Sadhasivam e18813021a arm64: dts: hisilicon: hi3670: Add GPIO controller support
Add GPIO controller support for HiSilicon HI3670 SoC based on ARM
Primecell PL061 GPIO controller.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-11-29 10:10:49 +00:00
Linus Walleij f1fe12c8bf ARM: dts: Modernize the Vexpress PL111 integration
The Versatile Express was submitted with the actual display
bridges unconnected (but defined in the device tree) and
mock "panels" encoded in the device tree node of the PL111
controller.

This doesn't even remotely describe the actual Versatile
Express hardware. Exploit the SiI9022 bridge by connecting
the PL111 pads to it, making it use EDID or fallback values
to drive the monitor.

The  also has to use the reserved memory through the
CMA pool rather than by open coding a memory region and
remapping it explicitly in the driver. To achieve this,
a reserved-memory node must exist in the root of the
device tree, so we need to pull that out of the
motherboard .dtsi include files, and push it into each
top-level device tree instead.

We do the same manouver for all the Versatile Express
boards, taking into account the different location of the
video RAM depending on which chip select is used on
each platform.

This plays nicely with the new PL111 DRM driver and
follows the standard ways of assigning bridges and
memory pools for graphics.

Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Tested-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-11-29 08:31:41 +01:00
Bjorn Andersson a03397e274 arm64: defconfig: Enable some qcom remoteproc configs
Enable remoteproc configs to boot the remoteprocs on QC chipsets. These
are common configs and not specific to a specific SoC so should be enabled
across the board.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-11-28 23:58:59 -06:00
Bjorn Andersson 671942e26e arm64: defconfig: Enable QCS404 configs
Enable GCC and pin control configs to make it possible to boot the
QCS404 EVBs.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-11-28 23:58:56 -06:00
Thierry Reding 73b551ba8f arm64: tegra: Clarify that P2972-0000 is Jetson Xavier
The official name for the P2972-0000 board is Jetson AGX Xavier
Development Kit. Set that as the model string in the device tree for
clarity.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-11-28 16:44:04 +01:00
Thierry Reding 585423535c arm64: tegra: Add PWM fan support on Jetson Xavier
Enable PWM4 in device tree and use it to drive the PWM fan on the Jetson
Xavier.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-11-28 16:44:04 +01:00
Thierry Reding 6a574ec70c arm64: tegra: Add PWM controllers on Tegra194
Tegra194 has eight single-channel PWM controllers, one of them in the
AON partition.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-11-28 16:44:04 +01:00
Jon Hunter 36ec29f781 arm64: dts: tegra210: Add power-domains for xHCI
Populate the power-domain properties for the xHCI device for Tegra210.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-11-28 16:44:04 +01:00
Dinh Nguyen 8bb4f3f559 arm64: dts: stratix10: use "altr,stratix10-rst-mgr" binding
The standard reset-simple driver the uses the "altr,rst-mgr" binding is
not getting initialized early enough in the boot process, so timers
that the kernel needs are still left in reset. Thus an early
reset driver was created. This early reset driver is only for the
SoCFPGA 32-bit platform.

The Stratix10 platform does not need any of the timers that in reset to
boot, thus we don't need to early reset driver. Therefore, use the
"altr,stratix10-rst-mgr" binding for the reset-simple platform driver on
the Stratix10 platform.

Also remove the "altr,modrst-offset" property because the driver no
longer needs it.

Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
2018-11-28 09:24:52 -06:00
Manivannan Sadhasivam 274c516d64 arm64: dts: hisilicon: Add Pinctrl support for HiKey970 board
Add pinctrl support based on "pinctrl-single" driver for HiKey970
development board from HiSilicon.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-11-28 15:22:49 +00:00
Manivannan Sadhasivam a758dd2e3a arm64: dts: hisilicon: Source SoC clock for UART6
Remove fixed clock and source SoC clock for UART6 for
HiSilicon Hi3670 SoC.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-11-28 15:17:50 +00:00
Manivannan Sadhasivam c00e3f8080 arm64: dts: hisilicon: Add clock nodes for Hi3670 SoC
Add clock nodes for HiSilicon Hi3670 SoC.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-11-28 14:35:59 +00:00
Derek Basehore 17222eb932 arm64: dts: rockchip: Add 32k clk on rk3399-gru
This adds the 32k clock to the RK3399 Gru board file, which is provided
by a Silego oscillator on Gru boards.

Even though it's not directly used, muxes will end up traversing the
entire clk tree on calls to determine_rate if it doesn't exist. This
is because the 32k clk is listed as a possible parent on some clks.
Since the clk doesn't know about the 32k clk (it was never registered),
it triggers a global search for it. This can happen about 40 times per
second, which isn't great for power.

Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
[moved clock position and adapted commit message a bit]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2018-11-28 14:38:37 +01:00
Bjorn Andersson d206e6b7ea arm64: dts: qcom: sdm845-mtp: Mark protected gcc clocks
As of v4.20-rc1 probing the GCC driver on a SDM845 device with the
standard security implementation causes an access violation and an
immediate system restart. Use the protected-clocks property to mark the
offending clocks protected for the MTP, in order to allow it to boot.

Cc: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2018-11-27 22:34:10 -08:00
Steven Rostedt (VMware) 01e0ab2c4f arm64: function_graph: Simplify with function_graph_enter()
The function_graph_enter() function does the work of calling the function
graph hook function and the management of the shadow stack, simplifying the
work done in the architecture dependent prepare_ftrace_return().

Have arm64 use the new code, and remove the shadow stack management as well as
having to set up the trace structure.

This is needed to prepare for a fix of a design bug on how the curr_ret_stack
is used.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: stable@kernel.org
Fixes: 03274a3ffb ("tracing/fgraph: Adjust fgraph depth before calling trace return callback")
Acked-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2018-11-27 20:30:01 -05:00
Will Deacon 3d65b6bbc0 arm64: tlbi: Set MAX_TLBI_OPS to PTRS_PER_PTE
In order to reduce the possibility of soft lock-ups, we bound the
maximum number of TLBI operations performed by a single call to
flush_tlb_range() to an arbitrary constant of 1024.

Whilst this does the job of avoiding lock-ups, we can actually be a bit
smarter by defining this as PTRS_PER_PTE. Due to the structure of our
page tables, using PTRS_PER_PTE means that an outer loop calling
flush_tlb_range() for entire table entries will end up performing just a
single TLBI operation for each entry. As an example, mremap()ing a 1GB
range mapped using 4k pages now requires only 512 TLBI operations when
moving the page tables as opposed to 262144 operations (512*512) when
using the current threshold of 1024.

Cc: Joel Fernandes <joel@joelfernandes.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-27 19:01:21 +00:00
Ard Biesheuvel bdb85cd1d2 arm64/module: switch to ADRP/ADD sequences for PLT entries
Now that we have switched to the small code model entirely, and
reduced the extended KASLR range to 4 GB, we can be sure that the
targets of relative branches that are out of range are in range
for a ADRP/ADD pair, which is one instruction shorter than our
current MOVN/MOVK/MOVK sequence, and is more idiomatic and so it
is more likely to be implemented efficiently by micro-architectures.

So switch over the ordinary PLT code and the special handling of
the Cortex-A53 ADRP errata, as well as the ftrace trampline
handling.

Reviewed-by: Torsten Duwe <duwe@lst.de>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
[will: Added a couple of comments in the plt equality check]
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-27 19:00:45 +00:00
Ard Biesheuvel 7aaf7b2fd2 arm64/insn: add support for emitting ADR/ADRP instructions
Add support for emitting ADR and ADRP instructions so we can switch
over our PLT generation code in a subsequent patch.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-27 18:47:33 +00:00
James Morse d8797b1257 arm64: Use a raw spinlock in __install_bp_hardening_cb()
__install_bp_hardening_cb() is called via stop_machine() as part
of the cpu_enable callback. To force each CPU to take its turn
when allocating slots, they take a spinlock.

With the RT patches applied, the spinlock becomes a mutex,
and we get warnings about sleeping while in stop_machine():
| [    0.319176] CPU features: detected: RAS Extension Support
| [    0.319950] BUG: scheduling while atomic: migration/3/36/0x00000002
| [    0.319955] Modules linked in:
| [    0.319958] Preemption disabled at:
| [    0.319969] [<ffff000008181ae4>] cpu_stopper_thread+0x7c/0x108
| [    0.319973] CPU: 3 PID: 36 Comm: migration/3 Not tainted 4.19.1-rt3-00250-g330fc2c2a880 #2
| [    0.319975] Hardware name: linux,dummy-virt (DT)
| [    0.319976] Call trace:
| [    0.319981]  dump_backtrace+0x0/0x148
| [    0.319983]  show_stack+0x14/0x20
| [    0.319987]  dump_stack+0x80/0xa4
| [    0.319989]  __schedule_bug+0x94/0xb0
| [    0.319991]  __schedule+0x510/0x560
| [    0.319992]  schedule+0x38/0xe8
| [    0.319994]  rt_spin_lock_slowlock_locked+0xf0/0x278
| [    0.319996]  rt_spin_lock_slowlock+0x5c/0x90
| [    0.319998]  rt_spin_lock+0x54/0x58
| [    0.320000]  enable_smccc_arch_workaround_1+0xdc/0x260
| [    0.320001]  __enable_cpu_capability+0x10/0x20
| [    0.320003]  multi_cpu_stop+0x84/0x108
| [    0.320004]  cpu_stopper_thread+0x84/0x108
| [    0.320008]  smpboot_thread_fn+0x1e8/0x2b0
| [    0.320009]  kthread+0x124/0x128
| [    0.320010]  ret_from_fork+0x10/0x18

Switch this to a raw spinlock, as we know this is only called with
IRQs masked.

Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-27 18:01:34 +00:00
Jeremy Linton 9eb1c92b47 arm64: acpi: Prepare for longer MADTs
The BAD_MADT_GICC_ENTRY check is a little too strict because
it rejects MADT entries that don't match the currently known
lengths. We should remove this restriction to avoid problems
if the table length changes. Future code which might depend on
additional fields should be written to validate those fields
before using them, rather than trying to globally check
known MADT version lengths.

Link: https://lkml.kernel.org/r/20181012192937.3819951-1-jeremy.linton@arm.com
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
[lorenzo.pieralisi@arm.com: added MADT macro comments]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Al Stone <ahs3@redhat.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-27 18:00:14 +00:00
Will Deacon 6460d32014 arm64: io: Ensure calls to delay routines are ordered against prior readX()
A relatively standard idiom for ensuring that a pair of MMIO writes to a
device arrive at that device with a specified minimum delay between them
is as follows:

	writel_relaxed(42, dev_base + CTL1);
	readl(dev_base + CTL1);
	udelay(10);
	writel_relaxed(42, dev_base + CTL2);

the intention being that the read-back from the device will push the
prior write to CTL1, and the udelay will hold up the write to CTL1 until
at least 10us have elapsed.

Unfortunately, on arm64 where the underlying delay loop is implemented
as a read of the architected counter, the CPU does not guarantee
ordering from the readl() to the delay loop and therefore the delay loop
could in theory be speculated and not provide the desired interval
between the two writes.

Fix this in a similar manner to PowerPC by introducing a dummy control
dependency on the output of readX() which, combined with the ISB in the
read of the architected counter, guarantees that a subsequent delay loop
can not be executed until the readX() has returned its result.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-27 12:18:07 +00:00
Chen-Yu Tsai c56689e6f2
arm64: dts: allwinner: a64: bananapi-m64: Enable audio codec
This patch enables audio via the SoC's internal audio codec. All
relevant device nodes are enabled, and the routing is set to match
the board design. MIC1 is routed to an onboard microphone, with MBIAS
providing power. MIC2 and HP are routed to the 3.5mm headset TRRS jack.
No phantom power is provided to the headset microphone.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-11-27 09:22:12 +01:00
Daniel Borkmann 8c11ea5ce1 bpf, arm64: fix getting subprog addr from aux for calls
The arm64 JIT has the same issue as ppc64 JIT in that the relative BPF
to BPF call offset can be too far away from core kernel in that relative
encoding into imm is not sufficient and could potentially be truncated,
see also fd045f6cd9 ("arm64: add support for module PLTs") which adds
spill-over space for module_alloc() and therefore bpf_jit_binary_alloc().
Therefore, use the recently added bpf_jit_get_func_addr() helper for
properly fetching the address through prog->aux->func[off]->bpf_func
instead. This also has the benefit to optimize normal helper calls since
their address can use the optimized emission. Tested on Cavium ThunderX
CN8890.

Fixes: db496944fd ("bpf: arm64: add JIT support for multi-function programs")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2018-11-26 17:34:24 -08:00
Florian Fainelli 229c55ccb4 arch: Move initrd= parsing into do_mounts_initrd.c
ARC, ARM, ARM64 and Unicore32 are all capable of parsing the "initrd="
command line parameter to allow specifying the physical address and size
of an initrd. Move that parsing into init/do_mounts_initrd.c such that
we no longer duplicate that logic.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2018-11-26 15:50:45 -06:00
Florian Fainelli cdbc848b03 of/fdt: Remove custom __early_init_dt_declare_initrd() implementation
Now that ARM64 uses phys_initrd_start/phys_initrd_size, we can get rid
of its custom __early_init_dt_declare_initrd() which causes a fair
amount of objects rebuild when changing CONFIG_BLK_DEV_INITRD. In order
to make sure ARM64 does not produce a BUG() when VM debugging is turned
on though, we must avoid early calls to __va() which is what
__early_init_dt_declare_initrd() does and wrap this around to avoid
running that code on ARM64.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2018-11-26 15:50:39 -06:00
Florian Fainelli c756c592e4 arm64: Utilize phys_initrd_start/phys_initrd_size
ARM64 is the only architecture that re-defines
__early_init_dt_declare_initrd() in order for that function to populate
initrd_start/initrd_end with physical addresses instead of virtual
addresses. Instead of having an override we can leverage
drivers/of/fdt.c populating phys_initrd_start/phys_initrd_size to
populate those variables for us.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2018-11-26 15:50:31 -06:00
Alan Tull 919d110037 arm64: dts: stratix10: add fpga manager and region
Add the Stratix10 FPGA manager and a FPGA region to the
device tree.

Signed-off-by: Alan Tull <atull@kernel.org>
Signed-off-by: Richard Gong <richard.gong@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-26 20:15:07 +01:00
Richard Gong adb9e3543d arm64: dts: stratix10: add stratix10 service driver binding to base dtsi
Add Intel Stratix10 service layer to the device tree

Signed-off-by: Richard Gong <richard.gong@intel.com>
Signed-off-by: Alan Tull <atull@kernel.org>
Acked-by: Moritz Fischer <mdf@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-26 20:13:50 +01:00
Alex Van Brunt 3403e56b41 arm64: mm: Don't wait for completion of TLB invalidation when page aging
When transitioning a PTE from young to old as part of page aging, we
can avoid waiting for the TLB invalidation to complete and therefore
drop the subsequent DSB instruction. Whilst this opens up a race with
page reclaim, where a PTE in active use via a stale, young TLB entry
does not update the underlying descriptor, the worst thing that happens
is that the page is reclaimed and then immediately faulted back in.

Given that we have a DSB in our context-switch path, the window for a
spurious reclaim is fairly limited and eliding the barrier claims to
boost NVMe/SSD accesses by over 10% on some platforms.

A similar optimisation was made for x86 in commit b13b1d2d86 ("x86/mm:
In the PTE swapout page reclaim case clear the accessed bit instead of
flushing the TLB").

Signed-off-by: Alex Van Brunt <avanbrunt@nvidia.com>
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
[will: rewrote patch]
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-26 16:59:46 +00:00
Ryder Lee ce68cc6fad arm64: dts: mt7622: Drop the general purpose timer node
MediaTeks general purpose timer register into system in early phase
during kernel boot, but the clock sources aren't probed at this point.

The system has the ARM architecture timer, so we don't need the GPT
timer from mediatek. Drop the DT node for it.

Fixes: 9cc7f0de9e ("arm64: dts: mt7622: add timer, CCI-400 and PMU nodes")
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
[mb: fix commit message]
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2018-11-26 11:19:19 +01:00
Viresh Kumar 275e4eb3f2 arm64: dts: renesas: Add all CPUs in cooling maps
Each CPU can (and does) participate in cooling down the system but the
DT only captures a handful of them, normally CPU0, in the cooling maps.
Things work by chance currently as under normal circumstances its the
first CPU of each cluster which is used by the operating systems to
probe the cooling devices. But as soon as this CPU ordering changes and
any other CPU is used to bring up the cooling device, we will start
seeing failures.

Also the DT is rather incomplete when we list only one CPU in the
cooling maps, as the hardware doesn't have any such limitations.

Update cooling maps to include all devices affected by individual trip
points.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-11-26 09:11:44 +01:00
Yoshihiro Kaneko 8f1ee2a166 arm64: dts: renesas: r8a77990: add thermal device support
This patch adds the thermal device node and the thermal-zone for
the R8A77990 SoC.

Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-11-26 09:11:44 +01:00
Takeshi Kihara 8fbe048bd9 arm64: dts: renesas: r8a77990: Enable I2C DMA
This patch enables I2C DMA.

NOTE: I2C7 DMA is not supported by R-Car Gen3 Hardware User's Manual
Rev.0.80E.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-11-26 09:11:34 +01:00
Will Deacon 4f9f49646a arm64: cpufeature: Fix mismerge of CONFIG_ARM64_SSBD block
When merging support for SSBD and the CRC32 instructions, the conflict
resolution for the new capability entries in arm64_features[]
inadvertedly predicated the availability of the CRC32 instructions on
CONFIG_ARM64_SSBD, despite the functionality being entirely unrelated.

Move the #ifdef CONFIG_ARM64_SSBD down so that it only covers the SSBD
capability.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-11-23 18:44:16 +00:00
Sergey Matyukevich b5d9a07ef7 arm64: sysreg: fix sparse warnings
Specify correct type for the constants to avoid
the following sparse complaints:

./arch/arm64/include/asm/sysreg.h:471:42: warning: constant 0xffffffffffffffff is so big it is unsigned long
./arch/arm64/include/asm/sysreg.h:512:42: warning: constant 0xffffffffffffffff is so big it is unsigned long

Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Olof Johansson <olof@lixom.net>
Acked-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-11-23 17:33:27 +00:00
Vasily Khoruzhick 6de8e71784 arm64: dts: allwinner: a64: enable sound on Pinebook
The Pinebook has a headphone jack tied to the HP headphone output of
the SoC, and internal speakers connected to the LINEOUT of the SoC,
through a standalone amplifier.

This commit enables I2S, digital and analog parts of audio codec on
Pinebook, along with a device node for the external amplifier.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
[wens@csie.org: dropped headphone_amp; added headphone amp regulator supply;
		fixed speaker_amp node name and sound-name-prefix name]
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Tested-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2018-11-23 23:23:38 +08:00
Vasily Khoruzhick 498c21f233 arm64: dts: allwinner: a64: enable sound on Pine64 and SoPine
This commit enables I2S, digital and analog parts of audiocodec on
Pine64 and SoPine boards.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
[wens@csie.org: Dropped headphone_amp; added headphone amp regulator supply]
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Tested-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2018-11-23 23:22:51 +08:00
Vasily Khoruzhick ec4a95409d arm64: dts: allwinner: a64: add nodes necessary for analog sound support
Add nodes for i2s, digital and analog parts of audiocodec on A64.

The routing paths listed are entries connecting the digital and analog
side of the audio codec together. Due to how device tree works, these
must be copied over to each board device tree, in addition to any board
level routes.

The oversampling rate is set to 128, so that when playing back 192 kHz
audio samples, the MCLK runs at the same rate as the module clock, at
24.576 MHz.

The user manual suggests using different oversampling rates for different
sample rates, but that's not possible without a platform-specific machine
driver.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
[wens@csie.org: Lowered oversampling rate to 128; expanded commit message]
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Tested-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2018-11-23 23:22:32 +08:00
Biju Das 8942ce2bfa arm64: dts: renesas: r8a7796: Add CMT device nodes
This patch adds CMT{0|1|2|3} device nodes for r8a7796 SoC.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-11-23 13:55:40 +01:00
Kuninori Morimoto 8d14bfa074 arm64: dts: renesas: r8a7796: add SSIU support for sound
rsnd driver supports SSIU now, let's use it.
Then, BUSIF DMA settings on rcar_sound,ssi (= rxu, txu) are
no longer needed.
To avoid git merge timing issue / git bisect issue,
this patch doesn't remove it so far, but will be removed in
the future.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-11-23 13:55:39 +01:00
Takeshi Kihara 44ea652a92 arm64: dts: renesas: r8a77990: Add I2C-DVFS device node
This patch adds I2C-DVFS device node for the R8A77990 SoC.

v2
* Drop aliases update as in upstream it is not required to configure the
  BD9571 PMIC for DDR backup, nor is the use of i2c are aliases desired.
* Do not describe the device as compatible with "renesas,rcar-gen3-iic" or
  "renesas,rmobile-iic" fallback compat strings. The absence of automatic
  transmission registers leads us to declare the r8a77990 IIC controller as
  incompatible.

v2.1
* Reduced register range to reflect documentation

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-11-23 13:55:39 +01:00
Marek Vasut 327d1f3208 arm64: dts: renesas: r8a77990: ebisu: Add and enable CAN,FD device nodes
This patch adds CAN0,1 and CANFD device nodes for the r8a77990 SoC
and enables CANFD connected to CN10 on the E3 Ebisu board using the
R8A77990 SoC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-11-23 13:55:23 +01:00
Ryder Lee 396defa852 arm64: dts: mt7622: fix no more console output on BPI-R64 board
Fix this by using a 'stdout-path' property that points to the device.

Fixes: 0b6286dd96 ("arm64: dts: mt7622: add bananapi BPI-R64 board")
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2018-11-23 11:47:51 +01:00
Ryder Lee 6c05946e34 arm64: dts: mt7622: fix no more console output on rfb1
No default serial console on boot.
Fix this by using a 'stdout-path' property that points to the device.

Fixes: c0d9f9ad4f ("arm64: dts: mt7622: add earlycon to mt7622-rfb1 board")
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
[mb: Fix commit message]
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2018-11-23 11:46:10 +01:00
Christoph Hellwig 20f1b79d33 PCI: consolidate the PCI_SYSCALL symbol
Let architectures select the syscall support instead of duplicating the
kconfig entry.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-11-23 11:45:52 +09:00
Christoph Hellwig 2eac9c2dfb PCI: consolidate the PCI_DOMAINS and PCI_DOMAINS_GENERIC config options
Move the definitions to drivers/pci and let the architectures select
them.  Two small differences to before: PCI_DOMAINS_GENERIC now selects
PCI_DOMAINS, cutting down the churn for modern architectures.  As the
only architectured arm did previously also offer PCI_DOMAINS as a user
visible choice in addition to selecting it from the relevant configs,
this is gone now.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Paul Burton <paul.burton@mips.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-11-23 11:45:44 +09:00
Christoph Hellwig eb01d42a77 PCI: consolidate PCI config entry in drivers/pci
There is no good reason to duplicate the PCI menu in every architecture.
Instead provide a selectable HAVE_PCI symbol that indicates availability
of PCI support, and a FORCE_PCI symbol to for PCI on and the handle the
rest in drivers/pci.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Paul Burton <paul.burton@mips.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-11-23 11:45:34 +09:00
Anders Roxell 81e9fa8bab arm64: perf: set suppress_bind_attrs flag to true
The armv8_pmuv3 driver doesn't have a remove function, and when the test
'CONFIG_DEBUG_TEST_DRIVER_REMOVE=y' is enabled, the following Call trace
can be seen.

[    1.424287] Failed to register pmu: armv8_pmuv3, reason -17
[    1.424870] WARNING: CPU: 0 PID: 1 at ../kernel/events/core.c:11771 perf_event_sysfs_init+0x98/0xdc
[    1.425220] Modules linked in:
[    1.425531] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W         4.19.0-rc7-next-20181012-00003-ge7a97b1ad77b-dirty #35
[    1.425951] Hardware name: linux,dummy-virt (DT)
[    1.426212] pstate: 80000005 (Nzcv daif -PAN -UAO)
[    1.426458] pc : perf_event_sysfs_init+0x98/0xdc
[    1.426720] lr : perf_event_sysfs_init+0x98/0xdc
[    1.426908] sp : ffff00000804bd50
[    1.427077] x29: ffff00000804bd50 x28: ffff00000934e078
[    1.427429] x27: ffff000009546000 x26: 0000000000000007
[    1.427757] x25: ffff000009280710 x24: 00000000ffffffef
[    1.428086] x23: ffff000009408000 x22: 0000000000000000
[    1.428415] x21: ffff000009136008 x20: ffff000009408730
[    1.428744] x19: ffff80007b20b400 x18: 000000000000000a
[    1.429075] x17: 0000000000000000 x16: 0000000000000000
[    1.429418] x15: 0000000000000400 x14: 2e79726f74636572
[    1.429748] x13: 696420656d617320 x12: 656874206e692065
[    1.430060] x11: 6d616e20656d6173 x10: 2065687420687469
[    1.430335] x9 : ffff00000804bd50 x8 : 206e6f7361657220
[    1.430610] x7 : 2c3376756d705f38 x6 : ffff00000954d7ce
[    1.430880] x5 : 0000000000000000 x4 : 0000000000000000
[    1.431226] x3 : 0000000000000000 x2 : ffffffffffffffff
[    1.431554] x1 : 4d151327adc50b00 x0 : 0000000000000000
[    1.431868] Call trace:
[    1.432102]  perf_event_sysfs_init+0x98/0xdc
[    1.432382]  do_one_initcall+0x6c/0x1a8
[    1.432637]  kernel_init_freeable+0x1bc/0x280
[    1.432905]  kernel_init+0x18/0x160
[    1.433115]  ret_from_fork+0x10/0x18
[    1.433297] ---[ end trace 27fd415390eb9883 ]---

Rework to set suppress_bind_attrs flag to avoid removing the device when
CONFIG_DEBUG_TEST_DRIVER_REMOVE=y, since there's no real reason to
remove the armv8_pmuv3 driver.

Cc: Arnd Bergmann <arnd@arndb.de>
Co-developed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-21 13:16:34 +00:00
Shaokun Zhang e2b5c5c7de arm64: perf: Fix typos in comment
Fix up one typos: Onl -> Only

Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-21 13:16:34 +00:00
Will Deacon 2ddd5e5825 arm64: perf: Hook up new events
There have been some additional events added to the PMU architecture
since Armv8.0, so expose them via our sysfs infrastructure.

Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-21 13:16:34 +00:00
Will Deacon 4b47e573a4 arm64: perf: Move event definitions into perf_event.h
The PMU event numbers are split between perf_event.h and perf_event.c,
which makes it difficult to spot any gaps in the numbers which may be
allocated in the future.

This patch sorts the events numerically, adds some missing events and
moves the definitions into perf_event.h.

Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-21 13:16:34 +00:00
Will Deacon cf7175ece0 arm64: perf: Remove duplicate generic cache events
We cannot distinguish reads from writes in our generic cache events, so
drop the WRITE entries and leave the READ entries pointing to the combined
read/write events, as is done by other CPUs and architectures.

Reported-by: Ganapatrao Kulkarni <Ganapatrao.Kulkarni@cavium.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-21 13:16:33 +00:00
Will Deacon 342e53bd85 arm64: perf: Add support for Armv8.1 PMCEID register format
Armv8.1 allocated the upper 32-bits of the PMCEID registers to describe
the common architectural and microarchitecture events beginning at 0x4000.

Add support for these registers to our probing code, so that we can
advertise the SPE events when they are supported by the CPU.

Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-21 13:16:33 +00:00
Will Deacon d3adeed728 arm64: perf: Terminate PMU assignment statements with semicolons
As a hangover from when this code used a designated initialiser, we've
been using commas to terminate the arm_pmu field assignments. Whilst
harmless, it's also weird, so replace them with semicolons instead.

Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-21 13:16:33 +00:00
Takeshi Kihara 55db8ac68d arm64: dts: renesas: r8a77965: Add CAN and CANFD controller nodes
This patch adds CAN{0,1} and CANFD controller nodes for the R8A77965 SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-11-21 10:54:06 +01:00
Jessica Yu c8ebf64eab arm64/module: use plt section indices for relocations
Instead of saving a pointer to the .plt and .init.plt sections to apply
plt-based relocations, save and use their section indices instead.

The mod->arch.{core,init}.plt pointers were problematic for livepatch
because they pointed within temporary section headers (provided by the
module loader via info->sechdrs) that would be freed after module load.
Since livepatch modules may need to apply relocations post-module-load
(for example, to patch a module that is loaded later), using section
indices to offset into the section headers (instead of accessing them
through a saved pointer) allows livepatch modules on arm64 to pass in
their own copy of the section headers to apply_relocate_add() to apply
delayed relocations.

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-20 11:38:26 +00:00
Ard Biesheuvel c55191e96c arm64: mm: apply r/o permissions of VM areas to its linear alias as well
On arm64, we use block mappings and contiguous hints to map the linear
region, to minimize the TLB footprint. However, this means that the
entire region is mapped using read/write permissions, which we cannot
modify at page granularity without having to take intrusive measures to
prevent TLB conflicts.

This means the linear aliases of pages belonging to read-only mappings
(executable or otherwise) in the vmalloc region are also mapped read/write,
and could potentially be abused to modify things like module code, bpf JIT
code or other read-only data.

So let's fix this, by extending the set_memory_ro/rw routines to take
the linear alias into account. The consequence of enabling this is
that we can no longer use block mappings or contiguous hints, so in
cases where the TLB footprint of the linear region is a bottleneck,
performance may be affected.

Therefore, allow this feature to be runtime en/disabled, by setting
rodata=full (or 'on' to disable just this enhancement, or 'off' to
disable read-only mappings for code and r/o data entirely) on the
kernel command line. Also, allow the default value to be set via a
Kconfig option.

Tested-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-20 11:38:26 +00:00
Ard Biesheuvel b34d2ef0c6 arm64: mm: purge lazily unmapped vm regions before changing permissions
Call vm_unmap_aliases() every time we apply any changes to permission
attributes of mappings in the vmalloc region. This avoids any potential
issues resulting from lingering writable or executable aliases of
mappings that should be read-only or non-executable, respectively.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-11-20 11:38:26 +00:00
Chen-Yu Tsai 1e33e0db82
arm64: dts: allwinner: h6: orangepi: Add device nodes for LEDs
The Orange Pi Lite 2 and Orange Pi One Plus both have two LEDs, one red
and one green. These are driven directly by GPIO lines in an active high
arrangement. The red LED is labeled "power", so it is set to be on by
default.

Note that the default drive current for the GPIO lines makes the LEDs
very bright.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-11-20 08:57:22 +01:00
Chen-Yu Tsai 9b8d1ccd6d
arm64: dts: allwinner: h6: orangepi: Enable USB 2.0 host and OTG ports
The Orange Pi Lite 2 and Orange Pi One Plus share the same design for
their USB 2.0 ports. VBUS is directly tied to the board wide 5V rail,
which is also directly tied to the DC jack. There is no current limiting
in this design.

This patch enables all the USB 2.0 related device nodes, and sets the
VBUS regulator supplies and OTG ID detection GPIO.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-11-20 08:57:20 +01:00
Chen-Yu Tsai 919d251464
arm64: dts: allwinner: h6: orangepi: Add board-wide 5V regulator
The Orange Pi Lite 2 and Orange Pi One Plus share the same design for
their USB 2.0 ports. VBUS is directly tied to the board wide 5V rail,
which is also directly tied to the DC jack. There is no current limiting
in this design. This 5V rail also supplies the various inputs to the
PMIC.

This patch adds a board wide 5V regulator and sets it as the input to
the PMIC inputs.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-11-20 08:57:17 +01:00
Icenowy Zheng 29ce4e436f
arm64: dts: allwinner: h6: fix EMAC compatible string sequence
The SoC-specific compatible should come before the fallback compatible
string when multiple compatible strings are present, but the sequence is
wrong currently on H6 EMAC node (A64 fallback before H6 compatible).

Fix the sequence.

Fixes: c8ced5516d ("arm64: allwinner: h6: add EMAC device nodes")
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-11-20 08:57:05 +01:00
Jagan Teki 6b683d7640
arm64: dts: allwinner: a64: Add device node for Mali-400 GPU
Add support for Allwinner A64 has Mali-400MP2.

All interrupt lines are mentioned in the manual so used the same.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-11-20 08:57:05 +01:00
Eric Biggers 1ca1b91794 crypto: chacha20-generic - refactor to allow varying number of rounds
In preparation for adding XChaCha12 support, rename/refactor
chacha20-generic to support different numbers of rounds.  The
justification for needing XChaCha12 support is explained in more detail
in the patch "crypto: chacha - add XChaCha12 support".

The only difference between ChaCha{8,12,20} are the number of rounds
itself; all other parts of the algorithm are the same.  Therefore,
remove the "20" from all definitions, structures, functions, files, etc.
that will be shared by all ChaCha versions.

Also make ->setkey() store the round count in the chacha_ctx (previously
chacha20_ctx).  The generic code then passes the round count through to
chacha_block().  There will be a ->setkey() function for each explicitly
allowed round count; the encrypt/decrypt functions will be the same.  I
decided not to do it the opposite way (same ->setkey() function for all
round counts, with different encrypt/decrypt functions) because that
would have required more boilerplate code in architecture-specific
implementations of ChaCha and XChaCha.

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Martin Willi <martin@strongswan.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2018-11-20 14:26:55 +08:00
Viresh Kumar cdd46460fe arm64: dts: rockchip: Add all CPUs in cooling maps
Each CPU can (and does) participate in cooling down the system but the
DT only captures a handful of them, normally CPU0, in the cooling maps.
Things work by chance currently as under normal circumstances its the
first CPU of each cluster which is used by the operating systems to
probe the cooling devices. But as soon as this CPU ordering changes and
any other CPU is used to bring up the cooling device, we will start
seeing failures.

Also the DT is rather incomplete when we list only one CPU in the
cooling maps, as the hardware doesn't have any such limitations.

Update cooling maps to include all devices affected by individual trip
points.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2018-11-19 14:45:35 +01:00
Takeshi Kihara ba3ac35b48 arm64: dts: renesas: r8a77990: ebisu: Add and enable PCIe device node
This patch adds PCI express channel 0 device node to the R8A77990 SoC
and enables PCIEC0 PCI express controller on the Ebisu board.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-11-19 11:33:09 +01:00
Viresh Kumar 9deffb5ee7 arm64: dts: exynos: Add all CPUs in cooling maps
Each CPU can (and does) participate in cooling down the system but the
DT only captures a handful of them, normally CPU0, in the cooling maps.
Things work by chance currently as under normal circumstances its the
first CPU of each cluster which is used by the operating systems to
probe the cooling devices. But as soon as this CPU ordering changes and
any other CPU is used to bring up the cooling device, we will start
seeing failures.

Also the DT is rather incomplete when we list only one CPU in the
cooling maps, as the hardware doesn't have any such limitations.

Update cooling maps to include all devices affected by individual trip
points.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2018-11-18 15:18:42 +01:00
Vinod Koul 85bc3096b3 arm64: dts: qcom: pms405: Add pon and pwrkey nodes
PMS405 also features PON block, so add PON and PWRKEY nodes

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-11-18 01:08:36 -06:00
Vinod Koul aec2a7659a arm64: dts: qcom: qcs404: Use BAM DMA for serial uart2
We can use BAM DAM for serial UART data transfers, so add it

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-11-18 01:08:36 -06:00