1
0
Fork 0
Commit Graph

8764 Commits (7e1c4e27928e5f87b9b1eaf06dc31773b2f1e7f1)

Author SHA1 Message Date
Dongjiu Geng 58bf437ff6 arm/arm64: KVM: Enable 32 bits kvm vcpu events support
The commit 539aee0edb ("KVM: arm64: Share the parts of
get/set events useful to 32bit") shares the get/set events
helper for arm64 and arm32, but forgot to share the cap
extension code.

User space will check whether KVM supports vcpu events by
checking the KVM_CAP_VCPU_EVENTS extension

Acked-by: James Morse <james.morse@arm.com>
Reviewed-by : Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-18 10:14:03 +01:00
Dongjiu Geng 375bdd3b5d arm/arm64: KVM: Rename function kvm_arch_dev_ioctl_check_extension()
Rename kvm_arch_dev_ioctl_check_extension() to
kvm_arch_vm_ioctl_check_extension(), because it does
not have any relationship with device.

Renaming this function can make code readable.

Cc: James Morse <james.morse@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-18 10:12:53 +01:00
Suzuki K Poulose 4afe8e79da arm64: cpufeature: Trap CTR_EL0 access only where it is necessary
When there is a mismatch in the CTR_EL0 field, we trap
access to CTR from EL0 on all CPUs to expose the safe
value. However, we could skip trapping on a CPU which
matches the safe value.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-16 11:53:34 +01:00
Suzuki K Poulose 1602df02f3 arm64: cpufeature: Fix handling of CTR_EL0.IDC field
CTR_EL0.IDC reports the data cache clean requirements for instruction
to data coherence. However, if the field is 0, we need to check the
CLIDR_EL1 fields to detect the status of the feature. Currently we
don't do this and generate a warning with tainting the kernel, when
there is a mismatch in the field among the CPUs. Also the userspace
doesn't have a reliable way to check the CLIDR_EL1 register to check
the status.

This patch fixes the problem by checking the CLIDR_EL1 fields, when
(CTR_EL0.IDC == 0) and updates the kernel's copy of the CTR_EL0 for
the CPU with the actual status of the feature. This would allow the
sanity check infrastructure to do the proper checking of the fields
and also allow the CTR_EL0 emulation code to supply the real status
of the feature.

Now, if a CPU has raw CTR_EL0.IDC == 0 and effective IDC == 1 (with
overall system wide IDC == 1), we need to expose the real value to
the user. So, we trap CTR_EL0 access on the CPU which reports incorrect
CTR_EL0.IDC.

Fixes: commit 6ae4b6e057 ("arm64: Add support for new control bits CTR_EL0.DIC and CTR_EL0.IDC")
Cc: Shanker Donthineni <shankerd@codeaurora.org>
Cc: Philip Elcan <pelcan@codeaurora.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-16 11:53:31 +01:00
Suzuki K Poulose 8ab66cbe63 arm64: cpufeature: ctr: Fix cpu capability check for late CPUs
The matches() routine for a capability must honor the "scope"
passed to it and return the proper results.
i.e, when passed with SCOPE_LOCAL_CPU, it should check the
status of the capability on the current CPU. This is used by
verify_local_cpu_capabilities() on a late secondary CPU to make
sure that it's compliant with the established system features.
However, ARM64_HAS_CACHE_{IDC/DIC} always checks the system wide
registers and this could mean that a late secondary CPU could return
"true" (since the CPU hasn't updated the system wide registers yet)
and thus lead the system in an inconsistent state, where
the system assumes it has IDC/DIC feature, while the new CPU
doesn't.

Fixes: commit 6ae4b6e057 ("arm64: Add support for new control bits CTR_EL0.DIC and CTR_EL0.IDC")
Cc: Philip Elcan <pelcan@codeaurora.org>
Cc: Shanker Donthineni <shankerd@codeaurora.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-16 11:53:28 +01:00
Will Deacon ca2b497253 arm64: perf: Reject stand-alone CHAIN events for PMUv3
It doesn't make sense for a perf event to be configured as a CHAIN event
in isolation, so extend the arm_pmu structure with a ->filter_match()
function to allow the backend PMU implementation to reject CHAIN events
early.

Cc: <stable@vger.kernel.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-10-12 15:25:17 +01:00
Will Deacon d91680e687 arm64: Fix /proc/iomem for reserved but not memory regions
We describe ranges of 'reserved' memory to userspace via /proc/iomem.
Commit 50d7ba36b9 ("arm64: export memblock_reserve()d regions via
/proc/iomem") updated the logic to export regions that were reserved
because their contents should be preserved. This allowed kexec-tools
to tell the difference between 'reserved' memory that must be
preserved and not overwritten, (e.g. the ACPI tables), and 'nomap'
memory that must not be touched without knowing the memory-attributes
(e.g. RAS CPER regions).

The above commit wrongly assumed that memblock_reserve() would not
be used to reserve regions that aren't memory. It turns out this is
exactly what early_init_dt_reserve_memory_arch() will do if it finds
a DT reserved-memory that was also carved out of the memory node, which
results in a WARN_ON_ONCE() and the region being reserved instead of
ignored. The ramoops description on hikey and dragonboard-410c both do
this, so we can't simply write this configuration off as "buggy firmware".

Avoid this issue by rewriting reserve_memblock_reserved_regions() so
that only the portions of reserved regions which overlap with mapped
memory are actually reserved.

Fixes: 50d7ba36b9 ("arm64: export memblock_reserve()d regions via /proc/iomem")
Reported-by: John Stultz <john.stultz@linaro.org>
Reported-by: Paolo Pisati <p.pisati@gmail.com>
CC: Akashi Takahiro <takahiro.akashi@linaro.org>
CC: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-10-12 15:25:16 +01:00
Ard Biesheuvel cc3cc48972 crypto: arm64/aes-blk - ensure XTS mask is always loaded
Commit 2e5d2f33d1 ("crypto: arm64/aes-blk - improve XTS mask handling")
optimized away some reloads of the XTS mask vector, but failed to take
into account that calls into the XTS en/decrypt routines will take a
slightly different code path if a single block of input is split across
different buffers. So let's ensure that the first load occurs
unconditionally, and move the reload to the end so it doesn't occur
needlessly.

Fixes: 2e5d2f33d1 ("crypto: arm64/aes-blk - improve XTS mask handling")
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2018-10-12 14:20:45 +08:00
Arnd Bergmann be59a3282c SoCFPGA DTS updates for v4.20, part 3
- Add ethernet aliases for Stratix10
 - Move ethernet aliases from socfpga dtsi
 - Correct system manager register size for Stratix10
 - Correct SDRAM node address for Arria10
 -----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCgAyFiEEoHhMeiyk5VmwVMwNGZQEC4GjKPQFAlu+E5kUHGRpbmd1eWVu
 QGtlcm5lbC5vcmcACgkQGZQEC4GjKPQxVBAApS3jzuE6jofUL2CXccl8DGuHJ5Ur
 FV3qPKtHB5Zd44VxRk12SODKBED4ry8+vzixvF4+jryvXkXsUXB76p0h4zcmpb2g
 L1Ngl5S8LW0ES74Rr2BMglSPmabjGOK7mSqj+CREwsOmWufZXQkpPV1ytbqscqTt
 S0bXRjChFhvbyc5qJ9NGx96sFpqfAL4SXpb8s9+3nfs8K5BUxI4RQD4zQtr03Fk1
 7wHUo2m0eyQGtTGR8Euml73ZyYdJn3e9Tcfl0vNRcL36/yr/qlA4St7EjscuoUDc
 XBBFydoo8pZUKEHLkAo6m+nSFdDoap048cKf47OLA0R18tSNauknCjkJniftx6JM
 LdD+T/YDRMqXgA7AXPkGwtApVKymJVmVmh4yuyNtqkQ5GGAZu6jCYo7UnEhfAkoQ
 ml20lH+O0WkcyRSrokUQHm8v+xVYt9m21xkS7NaQzCcCwX2LVNJVsXNVDMHlkFvM
 Sm6xK7v1QCT4cst6wtJlE0NHyBRzer+GpP6xH7F57rUrTy99Hfb2wcQ4vN80sFep
 BkGk5NL9OA/LQUweEoPqNGfASfs1YwTZp8od0fCKsQBybIBE4JrbKHGFj91X53SG
 MEMFo8PaNmzbnbopwlqlmUw6Bu58SknuC4H7/Az8ENLZc8AjK/iozR3efqsA759K
 eQqIqZbpW/xORnU=
 =S+pP
 -----END PGP SIGNATURE-----

Merge tag 'socfpga_updates_for_v4.20_part3' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into next/dt

SoCFPGA DTS updates for v4.20, part 3
- Add ethernet aliases for Stratix10
- Move ethernet aliases from socfpga dtsi
- Correct system manager register size for Stratix10
- Correct SDRAM node address for Arria10

* tag 'socfpga_updates_for_v4.20_part3' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux:
  ARM: dts: socfgpa: remove ethernet aliases from dtsi
  arm64: dts: stratix10: add ethernet aliases
  arm64: dts: stratix10: Correct System Manager register size
  ARM: dts: socfpga: Fix SDRAM node address for Arria10

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-11 16:07:07 +02:00
Arnd Bergmann ce57b60f38 Samsung DTS ARM64 changes for v4.20
1. Use graph between USB-PHY and MUIC.
 2. Cleanup of SD card detect pin level.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAlu+QZQQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD12Y2D/9Y+btGTz/cP+VLMg4oQ+awJpbeCbX/i3qr
 4w9bpMTjPfS8J4bUprA1Ay/MbqeRtJgXxF8H+GvyWg/QPcaf8prsVIq2KQWM8yUa
 EWCoE+C+kDY4Q2ElDW8ftNmMFe4iTdsYgXpBuPFxP+7nK7fGEKutOVfIY4Mw9RcN
 R68nu7t7CJjJxKSAiTquGmrTXbO3QUA24uyxRLTaz7Wkrap4cvnu1kryqIA5ncmI
 ScOGiGxxv53gbK40ru8b1eVlVhlNSMgeh0S+NvqmR8r3AFAapmPgMzrMPL+2Y6Lh
 O6Diu/BNy1oqn/j9iXdTwLANWG/t+l/GdOb2TxXgHPpOG67VC5SIE8yJK9qmr82Q
 jC4r0jLGA7pbXbKtRvORVkT3fRro+8m1j0ATdH1DTWgEdjFG3LKJHThetntuK1pi
 EfHEmotrA6GlhYwUrXebrqeKEpEUT5uHjvGrQFlnJjWmkHGw2+cdIk1xzU5nAhTu
 NsctmUU/pMFabGaHZLHXgoXODom5QzZhoThFBLZiT36NeTlevrBH6K9qrYKzhUWk
 4q4BaivL0h6TyIm+TBROIWDGYdYC+MykVkcccUwCqzmRU/J1m71gpWjlm6AmL/IU
 qafQ57GArNJhplIfHHJjU4AXTdVrxNaClhHfc955mBO0ggx63skQvyoTHXL2zVkP
 wC4yNlxGIg==
 =9pHU
 -----END PGP SIGNATURE-----

Merge tag 'samsung-dt64-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt

Samsung DTS ARM64 changes for v4.20

1. Use graph between USB-PHY and MUIC.
2. Cleanup of SD card detect pin level.

* tag 'samsung-dt64-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  arm64: ARM: dts: exynos: Remove double SD card detect pin inversion on TM2
  arm64: dts: exynos: Add OF graph between USB-PHY and MUIC

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-11 16:06:17 +02:00
Marek Szyprowski 5220a73a40 arm64: exynos: Enable generic power domain support
Generic power domains are needed to enable support for Exynos power
domains.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-11 15:27:14 +02:00
Kees Cook 3ac946d12e vmlinux.lds.h: Move LSM_TABLE into INIT_DATA
Since the struct lsm_info table is not an initcall, we can just move it
into INIT_DATA like all the other tables.

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-by: John Johansen <john.johansen@canonical.com>
Reviewed-by: James Morris <james.morris@microsoft.com>
Signed-off-by: James Morris <james.morris@microsoft.com>
2018-10-10 20:40:21 -07:00
James Morse 26a6f87ef5 arm64: mm: Use __pa_symbol() for set_swapper_pgd()
commit 2330b7ca78 ("arm64/mm: use fixmap to modify
swapper_pg_dir") modifies the swapper_pg_dir via the fixmap
as the kernel page tables have been moved to a read-only
part of the kernel mapping.

Using __pa() to setup the fixmap causes CONFIG_DEBUG_VIRTUAL
to fire, as this function is used on the kernel-image swapper
address. The in_swapper_pgdir() test before each call of this
function means set_swapper_pgd() will only ever be called when
pgdp points somewhere in the kernel-image mapping of
swapper_pd_dir. Use __pa_symbol().

Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Jun Yao <yaojun8558363@gmail.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-10 17:57:06 +01:00
James Morse 3b82a6ea23 Revert "arm64: uaccess: implement unsafe accessors"
This reverts commit a1f33941f7.

The unsafe accessors allow the PAN enable/disable calls to be made
once for a group of accesses. Adding these means we can now have
sequences that look like this:

| user_access_begin();
| unsafe_put_user(static-value, x, err);
| unsafe_put_user(helper-that-sleeps(), x, err);
| user_access_end();

Calling schedule() without taking an exception doesn't switch the
PSTATE or TTBRs. We can switch out of a uaccess-enabled region, and
run other code with uaccess enabled for a different thread.

We can also switch from uaccess-disabled code back into this region,
meaning the unsafe_put_user()s will fault.

For software-PAN, threads that do this will get stuck as
handle_mm_fault() will determine the page has already been mapped in,
but we fault again as the page tables aren't loaded.

To solve this we need code in __switch_to() that save/restores the
PAN state.

Acked-by: Julien Thierry <julien.thierry@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-10 17:52:08 +01:00
Joerg Roedel 2f2fbfb71e Merge branches 'arm/renesas', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd' and 'core' into next 2018-10-10 18:09:37 +02:00
Shaokun Zhang 742fafa50b arm64: mm: Drop the unused cpu parameter
Cpu parameter is never used in flush_context, remove it.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-09 17:17:23 +01:00
Eric Biggers 7ff9036a62 crypto: arm64/aes - fix handling sub-block CTS-CBC inputs
In the new arm64 CTS-CBC implementation, return an error code rather
than crashing on inputs shorter than AES_BLOCK_SIZE bytes.  Also set
cra_blocksize to AES_BLOCK_SIZE (like is done in the cts template) to
indicate the minimum input size.

Fixes: dd597fb33f ("crypto: arm64/aes-blk - add support for CTS-CBC mode")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2018-10-08 13:47:02 +08:00
Ingo Molnar 02678a5823 Merge branch 'core/core' into x86/build, to prevent conflicts
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2018-10-06 15:51:56 +02:00
Thomas Gleixner a223464217 Merge tag 'irqchip-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core
Pull irqchip updates from Marc Zyngier:

 - kexec/kdump support for EFI-based GICv3 platforms
 - Marvell SEI support
 - QC PDC fixes
 - GIC cleanups and optimizations
 - DT updates

[ tglx: Dropped the madera driver as it breaks the build ]
2018-10-06 15:45:07 +02:00
James Morse e9ed821be4 arm64: mm: Use #ifdef for the __PAGETABLE_P?D_FOLDED defines
__is_defined(__PAGETABLE_P?D_FOLDED) doesn't quite work as intended
as these symbols are internal to asm-generic and aren't defined in the
way kconfig expects. This makes them always evaluate to false.
Switch to #ifdef.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-05 17:19:40 +01:00
Lokesh Vutla d59c774496 arm64: defconfig: Enable SERIAL_8250_OMAP
Enabling CONFIG_SERIAL_8250_OMAP that is used by TI's
AM6 SoC.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-05 17:46:00 +02:00
Lokesh Vutla 41925a21cd arm64: defconfig: Enable TI_SCI related configs
Enable TI System Control Interface (TI_SCI) Message Protocol library
and it's relevant power management drivers using this library.

TI's AM6 SoC uses this TI_SCI library to communicate to its system
controller(DMSC). While at it, enable TI_MESSAGE_MANAGER mailbox driver
using which this communication happens.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-05 17:45:40 +02:00
Dinh Nguyen 74cad26d8d arm64: dts: stratix10: add ethernet aliases
Add ethernet<n> alias for all gmacs on the devkit.

Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
---
v2: move ethernet aliases to board file
2018-10-05 10:29:13 -05:00
Arnd Bergmann 4e6a32e6eb mvebu dt64 for 4.20 (part 2)
- Add System Error Interrupt support to Armada SoCs (7K/8K)
  - Add CPU idle support on Armada 8K
 -----BEGIN PGP SIGNATURE-----
 
 iFwEABECAB0WIQQYqXDMF3cvSLY+g9cLBhiOFHI71QUCW7Y4zAAKCRALBhiOFHI7
 1QMVAKCqI2E6bf9ZiombIqMC/6/3IyxBMQCYxOCnpIbMbfaaufLkOf2XgOnq7g==
 =KspX
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-dt64-4.20-2' of git://git.infradead.org/linux-mvebu into next/dt

mvebu dt64 for 4.20 (part 2)

 - Add System Error Interrupt support to Armada SoCs (7K/8K)
 - Add CPU idle support on Armada 8K

* tag 'mvebu-dt64-4.20-2' of git://git.infradead.org/linux-mvebu:
  arm64: dts: clearfog-gt-8k: add PCIe slot description
  arm64: dts: marvell: add CP110 ICU SEI subnode
  arm64: dts: marvell: use new bindings for CP110 interrupts
  arm64: dts: marvell: add AP806 SEI subnode
  arm64: dts: marvell: add CPU Idle power state support on Armada 7K/8K
  arm64: dts: marvell: Add node labels for the cpus

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-05 17:23:48 +02:00
Kyrylo Tkachov 0293c8ba80 arm64: Fix typo in a comment in arch/arm64/mm/kasan_init.c
"bellow" -> "below"

The recommendation from kegel.com/kerspell is to only fix the howlers.
"Bellow" is a synonym of "howl" so this should be appropriate.

Signed-off-by: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-05 11:49:32 +01:00
Rob Herring 4355151de4 Merge branch 'all-dtbs' into dt/next 2018-10-04 14:16:15 -05:00
Arnd Bergmann afb8fb9ad9 Renesas ARM64 Based SoC SoC Updates for v4.20
* Add support for RZ/G2E (r8a774c0) and RZ/G2M (r8a774a1) SoCs
 * Enable Compare Match Timer (CMT) and Timer Unit (TMU)
   for Renesas SoCs
 * Remove no longer needed ARCH_SHMOBILE Kconfig symbol
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4nzZofWswv9L/nKF189kaWo3T74FAlut9qYACgkQ189kaWo3
 T76xVg/9GLAY6zTyb7L5sYXL77cBuP74hFKTSDVCii3oNEQcPg5faEKRt/wb4yub
 aivYWrOsH3O107e1jlmtXzOc2GOPu3dZuivrn8rw0YRHdDjZNTUxsfZEgFXwX747
 nuQ0IUhk6Tah3vJY9PtvNlcNt1DMFRSzwlfbxlFMKH9LyPulKkkwa43qq/O8HboZ
 m1BPRlV3sJwmPi1ll8CXkl0u7PUxBQjKD36rSU/nueV4zLuzIfyglSiMmYxw/8fR
 4rtHApxw2bDzFTkYHmMxWdhT1kUkL/d4uogiSGhqhd3AfPlrj2oOxAqeWcLZIbx3
 hA5T/bZQK4WC2Gjlkvt4Q5C+LltbIvI0zjow9+Yb6m57kzwOsbXKxPzdEz7PTCsh
 z1DdZTdsWswM/EQKv5VxYXSeRtXZkoWT30VKVqFfq7TQb8q1Z/2IAovXUf0zs6vw
 d0diRtb8UguCN9q8EUbfbz4+fbXHAQzbZ/mCfVhkBdR1qJOaHk5+fxCM+RsjlQWJ
 5EPzOM4NtvV+EypPe5903vkTquOvsatIpuNFyd7niwYQ8w3XA/Sr4+ZD7hAF1JQu
 yqVGSzDZZeQneodElWRmapNlu/C9D0hwb1KahHp3Gfs9aaMcngQNmKClMf3YWeFK
 +zobTE3gZkslshpw+VcMob0xtpFPSZJkD/mjRQcs/588LCjzmVg=
 =Ai7T
 -----END PGP SIGNATURE-----

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

Renesas ARM64 Based SoC SoC Updates for v4.20

* Add support for RZ/G2E (r8a774c0) and RZ/G2M (r8a774a1) SoCs
* Enable Compare Match Timer (CMT) and Timer Unit (TMU)
  for Renesas SoCs
* Remove no longer needed ARCH_SHMOBILE Kconfig symbol

* tag 'renesas-arm64-soc-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  arm64: Add Renesas R8A774C0 support
  arm64: Add Renesas R8A774A1 support
  arm64: enable CMT/TMU support for Renesas SoC
  arm64: renesas: Remove the ARCH_SHMOBILE Kconfig symbol

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-04 17:35:31 +02:00
Arnd Bergmann de5c3ace8c Enablement of the newly added Innosilicon hdmiphy.
-----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAluyLqkQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgekEB/9HyHoVUK9JOwmhfxut8Lm8/o1e+ORtxbbY
 S8sKfrdZzzJtMBD6njL8VDjEKn5owyDGqh8JmXaZerS16ZIbGX07H1BSW3Okw6Ei
 +LY22VBtwucwcdrXEiNcJfY45M4GJ8ZSGEcqISfLpDZRCTgxE77J+ml58kZcF2NB
 IuILk8zufnyxppqTac8llZlQejZ9w77p1JxVCnguJhA1Y4PT2r1wr0fpxXfB2yqE
 jnPLRd/pXCzHHgzkQeyC/14ASHpG5Fa5SZRtqJKZzLHbEpMnyIdRNrTOA4d0/EDW
 hSRUO4YB7TmYF7ST9pQ3cMtiBILhi0R3M0cmF1XTaLh0FPub9yRB
 =bQlW
 -----END PGP SIGNATURE-----

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

Enablement of the newly added Innosilicon hdmiphy.

* tag 'v4.20-rockchip-defconfig64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  arm64: defconfig: enable Rockchip Innosilicon hdmiphy

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-04 17:12:38 +02:00
Masahiro Yamada b6f8c4769f arm64: defconfig: enable CONFIG_MMC_UNIPHIER
Enable the UniPhier SD controller driver.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-04 17:10:02 +02:00
Arnd Bergmann b062e5b79c arm64: dts: Amlogic updates for v4.20, round 3
- AXG: fix eMMC
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEe4dGDhaSf6n1v/EMWTcYmtP7xmUFAlu15UwACgkQWTcYmtP7
 xmWjPw/8DZfKQp13ojoGjam31mYYeKgfYHOk7RU96vLkHSHsJEsH0uo4haJvRZND
 7n2bbPxiMUpPXmpwgTrcB3X/7HDgAwtA8me4+k1MwsKxC2S5g9zfJcVLy/Q3Vvho
 Pt3emwxyE4MXXis2RC8TqWNU6ZXD52XwP3XKWPWJyteX2a/eN2QdwDb5JfGfLvnL
 ke855Yg3d2p59Ax1WaDWS0E4nAsJ+XlVB6K+f/ItXFLKMUyQNsAOWwiWPU9SyKkJ
 KirBFR4u0qpk6OEw4NT9EfKPfCQz+xUo386+IFKfBNpxRIjDjJeSdHU4eQGxNSyt
 CEF39ONbct2JXOAVsxstw63ynYFJouWOvfc5hvvWCvGMlsDHcDOaeofPFxEuGqJi
 5+034qGnq9rOEPmDGC22dPHTove2GTOaTk5nm+omD+LYINv9n4qLbvoIJMIqghFz
 tl9/oVshObKchpujdyD/JGhDvPF0Pq9/tFJmwVhaGKYiJpexvvw9XkVaa6X18owp
 sRugeqm46tCabcHqop27gnYqLEZpqfWHjVYpFXkLJFYBBY44kLDV75Zbc0CJTo9x
 HuacQKlFob1SOdqybAu01MB49jAIMgCM0dzEPVq+/9cw5/Fm1W5ImkwUZtQkFib4
 8vUMooKhjxhy8NYozwzGuVnjavebe6dDMBcHTC8AL8jvEWMmgOU=
 =/0cS
 -----END PGP SIGNATURE-----

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

arm64: dts: Amlogic updates for v4.20, round 3
- AXG: fix eMMC

* tag 'amlogic-dt64-3' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  arm64: dts: meson-axg: s400: disable emmc
  arm64: dts: meson-axg: s400: add missing emmc pwrseq

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-04 17:08:52 +02:00
Arnd Bergmann 86dc4eaf12 UniPhier ARM SoC DT updates for v4.20
- Add more clocks to NAND controller nodes
 
 - Add SPI controller nodes
 
 - Add SD controller nodes
 
 - Add USB 3.0 and its PHY nodes
 
 - Add PHY nodes for USB 2.0
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJbtWLqAAoJED2LAQed4NsGES8P/2+T5horfJ9vZ8BQzv1Y4peV
 PZrIXNJGJtjtCZbYy2mMlwNqGHpsMSE6udGBsT/M4lVoUhAfd+H2kAHytoKRh/Jc
 lA3bvDnIv3iY7l0L0pQxJ2ADlyGH5Jw7XxZdTWDM7OPljfro1do4XovOZzrz8jgb
 hQvi2WtIkl3pLrhIBEObv0J/h7/bp3ssYTcireUWXgcJK2Mr55aY3BOZ91SojMwI
 4T8z7N6/wszvQX1rZdczOD9oblNIr604kmukhd2wWrhEKbrY9psCYeAHQTWvQ0UU
 GlhhOeojmsbEKjlqVQEA7+3Fccqq13ieaahFYP1SCYi647owNLTvq9zuO4ElQ+bC
 +eGt+eVmDYIM8giQEC5s4xmNqqXAgTIK0nPv27Hi7VHlrwY0bjbRXTm1fgSiNPyF
 3M587LMoOa2iQJbcO7RE7nHgAmiu7jqx+6I8iw+d6AyiHLq2kJNNGz0SE5XeBgsj
 pVrksz5wlPi+VzmjwtvUy0EUR7sr6mQtmsjt6i+Z3GdK28bRoNqXezShZ1cpjDiD
 Dsfx5qm4bn92LiE97tUAefa27GejScCA9TelGFwfvuKRKrb5R1mlU4Wp+65I9gce
 4cH0csYWKw/BDyQX2i7yQ2nNB9/VcNRp7qtizU8Ib8YxBNXpx7mjLUU1/LB4bo6h
 YY3e/IJPVR+JQzFZ7Nl3
 =9/hA
 -----END PGP SIGNATURE-----

Merge tag 'uniphier-dt-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into next/dt

UniPhier ARM SoC DT updates for v4.20

- Add more clocks to NAND controller nodes

- Add SPI controller nodes

- Add SD controller nodes

- Add USB 3.0 and its PHY nodes

- Add PHY nodes for USB 2.0

* tag 'uniphier-dt-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier:
  arm64: dts: uniphier: Add USB2 PHY nodes
  arm64: dts: uniphier: Add USB3 controller nodes
  ARM: dts: uniphier: Add USB2 PHY nodes
  ARM: dts: uniphier: Add USB3 controller nodes
  arm64: dts: uniphier: add SD controller nodes
  ARM: dts: uniphier: add SD/eMMC controller nodes
  arm64: dts: uniphier: add SPI node for LD20, LD11 and PXs3
  ARM: dts: uniphier: add SPI node for UniPhier 32bit SoCs
  ARM: dts: uniphier: add SPI pin-mux node
  arm64: uniphier: dts: add more clocks to Denali NAND controller node
  ARM: uniphier: dts: add more clocks to Denali NAND controller node

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-04 17:08:02 +02:00
Arnd Bergmann 22b9292141 Some additional new boards, the rk3399-based RockPro64 from Pine64, as well
as the Vamrs Rock960. Another big feature is display support including hdmi
 and the Innosilicon hdmiphy on the rk3328, right now enabled on the rock64.
 The rock64 also got its spi-nor and spdif enabled. On the px30 we can see
 dwc2-based usb support now and finally some misc fixes, like for a new dtc
 warning, missing address and size cells and microSD fix on sapphire.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAluyLSYQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgSyPB/4y5G/sz6xboaYAj1G14gZDgBeG3PKI2ek1
 klDXRhIETCBhwrxic5XErraF2PY+2KJybw85zUBt+d3Bnmixo85qqTKrAEzefvvw
 A9cDtzCl1qOjMUcuYKOVjiyl0k5QsEr1Rsl77DCrupNHsOqE6jDQzZbCMSdWIxrG
 5e6jyYYVPRibjOFS3AYBGJ5S026fHd/mq9GvUWPcOaOpDngQIvo26PD8H0vKWqXn
 py61c0WkOp/revpv9x8Tazz1D9w+xn60jrnXSkKXyKn/sDpixZSPslR2u0oZXP58
 lA+ku9XatjFkG1n2d00UQtb7QLpJod0Jrzcy/n5hSdY3C3mHjEE4
 =7qWr
 -----END PGP SIGNATURE-----

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

Some additional new boards, the rk3399-based RockPro64 from Pine64, as well
as the Vamrs Rock960. Another big feature is display support including hdmi
and the Innosilicon hdmiphy on the rk3328, right now enabled on the rock64.
The rock64 also got its spi-nor and spdif enabled. On the px30 we can see
dwc2-based usb support now and finally some misc fixes, like for a new dtc
warning, missing address and size cells and microSD fix on sapphire.

* tag 'v4.20-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  arm64: dts: rockchip: enable display nodes on rk3328-rock64
  arm64: dts: rockchip: add rk3328 display nodes
  arm64: dts: rockchip: add Innosilicon hdmi phy node to rk3328
  arm64: dts: rockchip: add missing address and size cells for rk3399 mipi dsi
  arm64: dts: rockchip: Enable SPI NOR flash on Rock64
  arm64: dts: rockchip: add initial dts support for Rockpro64
  arm64: dts: rockchip: enable dwc2-based otg controller on px30-evb
  arm64: dts: rockchip: add dwc2 otg controller on px30
  dt-bindings: usb: dwc2: add description for px30
  arm64: dts: rockchip: Enable SD card detection for Rock960 boards
  arm64: dts: rockchip: Add support for Rock960 board
  dt-bindings: arm: rockchip: Add binding for Rock960 board
  arm64: dts: rockchip: Split out common nodes for Rock960 based boards
  arm64: dts: rockchip: add spdif sound node for rock64
  arm64: dts: rockchip: Fix microSD in rk3399 sapphire board
  arm64: dts: rockchip: Fix I2C bus unit-address error on rk3399-puma-haikou

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-04 16:19:47 +02:00
Kunihiko Hayashi 546cba0623 arm64: dts: uniphier: Add USB2 PHY nodes
Add nodes of USB2 physical layer for UniPhier SoC. This supports LD11.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-10-04 09:41:06 +09:00
Kunihiko Hayashi d7b9beb830 arm64: dts: uniphier: Add USB3 controller nodes
Add USB3 controller nodes including usb-core, resets, regulator, ss-phy
and hs-phy. This supports for LD20, PXs3 and the boards. This includes
additional efuse nodes for obtaining PHY trimming values.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-10-04 09:41:06 +09:00
Jerome Brunet 59d925ac20 arm64: dts: meson-axg: s400: disable emmc
While it is possible to rework the s400 board to solder an eMMC on it,
it is not the default option and most boards are fitted with a NAND
instead.

Let's disable the emmc device by default to reflect this. The board
equipped with an eMMC will just have to alter the DT in the
bootloader, like we do for the reserved memory regions.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-10-03 08:52:04 -07:00
Jerome Brunet 087e9a465c arm64: dts: meson-axg: s400: add missing emmc pwrseq
eMMC pwrseq is defined in the s400 dts but not used in the emmc node.
This is probably just a copy/paste error

Fixes: 221cf34bac ("ARM64: dts: meson-axg: enable the eMMC controller")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-10-03 08:52:04 -07:00
Baruch Siach 91f84690b5 arm64: dts: clearfog-gt-8k: add PCIe slot description
This adds support for the PCIe interface on the CON4 mini-PCIe
connector.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-10-03 17:22:34 +02:00
Julien Thierry b0506a8bbb arm64: xen: Use existing helper to check interrupt status
The status of interrupts might depend on more than just pstate. Use
interrupts_disabled() instead of raw_irqs_disabled_flags() to take the full
context into account.

Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Julien Thierry <julien.thierry@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-03 16:14:11 +01:00
Julien Thierry 9a0c032825 arm64: Use daifflag_restore after bp_hardening
For EL0 entries requiring bp_hardening, daif status is kept at
DAIF_PROCCTX_NOIRQ until after hardening has been done. Then interrupts
are enabled through local_irq_enable().

Before using local_irq_* functions, daifflags should be properly restored
to a state where IRQs are enabled.

Enable IRQs by restoring DAIF_PROCCTX state after bp hardening.

Acked-by: James Morse <james.morse@arm.com>
Signed-off-by: Julien Thierry <julien.thierry@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-03 16:12:21 +01:00
Julien Thierry f05692919b arm64: daifflags: Use irqflags functions for daifflags
Some of the work done in daifflags save/restore is already provided
by irqflags functions. Daifflags should always be a superset of irqflags
(it handles irq status + status of other flags). Modifying behaviour of
irqflags should alter the behaviour of daifflags.

Use irqflags_save/restore functions for the corresponding daifflags
operation.

Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Julien Thierry <julien.thierry@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-03 16:08:52 +01:00
Eric W. Biederman f283801851 signal: Remove the need for __ARCH_SI_PREABLE_SIZE and SI_PAD_SIZE
Rework the defintion of struct siginfo so that the array padding
struct siginfo to SI_MAX_SIZE can be placed in a union along side of
the rest of the struct siginfo members.  The result is that we no
longer need the __ARCH_SI_PREAMBLE_SIZE or SI_PAD_SIZE definitions.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2018-10-03 16:46:43 +02:00
zhong jiang f0725345e3 arm64: KVM: Remove some extra semicolon in kvm_target_cpu
There are some extra semicolon in kvm_target_cpu, remove it.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-03 11:48:34 +01:00
Marc Zyngier bca607ebc7 KVM: arm/arm64: Rename kvm_arm_config_vm to kvm_arm_setup_stage2
VM tends to be a very overloaded term in KVM, so let's keep it
to describe the virtual machine. For the virtual memory setup,
let's use the "stage2" suffix.

Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-03 11:45:29 +01:00
Suzuki K Poulose 233a7cb235 kvm: arm64: Allow tuning the physical address size for VM
Allow specifying the physical address size limit for a new
VM via the kvm_type argument for the KVM_CREATE_VM ioctl. This
allows us to finalise the stage2 page table as early as possible
and hence perform the right checks on the memory slots
without complication. The size is encoded as Log2(PA_Size) in
bits[7:0] of the type field. For backward compatibility the
value 0 is reserved and implies 40bits. Also, lift the limit
of the IPA to host limit and allow lower IPA sizes (e.g, 32).

The userspace could check the extension KVM_CAP_ARM_VM_IPA_SIZE
for the availability of this feature. The cap check returns the
maximum limit for the physical address shift supported by the host.

Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Christoffer Dall <cdall@kernel.org>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-03 11:45:20 +01:00
Suzuki K Poulose 58b3efc820 kvm: arm64: Limit the minimum number of page table levels
Since we are about to remove the lower limit on the IPA size,
make sure that we do not go to 1 level page table (e.g, with
32bit IPA on 64K host with concatenation) to avoid splitting
the host PMD huge pages at stage2.

Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Christoffer Dall <cdall@kernel.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-03 11:45:14 +01:00
Suzuki K Poulose 0f62f0e95b kvm: arm64: Set a limit on the IPA size
So far we have restricted the IPA size of the VM to the default
value (40bits). Now that we can manage the IPA size per VM and
support dynamic stage2 page tables, we can allow VMs to have
larger IPA. This patch introduces a the maximum IPA size
supported on the host. This is decided by the following factors :

 1) Maximum PARange supported by the CPUs - This can be inferred
    from the system wide safe value.
 2) Maximum PA size supported by the host kernel (48 vs 52)
 3) Number of levels in the host page table (as we base our
    stage2 tables on the host table helpers).

Since the stage2 page table code is dependent on the stage1
page table, we always ensure that :

  Number of Levels at Stage1 >= Number of Levels at Stage2

So we limit the IPA to make sure that the above condition
is satisfied. This will affect the following combinations
of VA_BITS and IPA for different page sizes.

  Host configuration | Unsupported IPA ranges
  39bit VA, 4K       | [44, 48]
  36bit VA, 16K      | [41, 48]
  42bit VA, 64K      | [47, 52]

Supporting the above combinations need independent stage2
page table manipulation code, which would need substantial
changes. We could purse the solution independently and
switch the page table code once we have it ready.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Christoffer Dall <cdall@kernel.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-03 11:44:55 +01:00
Arnd Bergmann 040f340134 arm64: arch_timer: avoid unused function warning
arm64_1188873_read_cntvct_el0() is protected by the correct
CONFIG_ARM64_ERRATUM_1188873 #ifdef, but the only reference to it is
also inside of an CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND section,
and causes a warning if that is disabled:

drivers/clocksource/arm_arch_timer.c:323:20: error: 'arm64_1188873_read_cntvct_el0' defined but not used [-Werror=unused-function]

Since the erratum requires that we always apply the workaround
in the timer driver, select that symbol as we do for SoC
specific errata.

Fixes: 95b861a4a6 ("arm64: arch_timer: Add workaround for ARM erratum 1188873")
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-03 11:41:34 +01:00
Miquel Raynal b0e11e58c5 arm64: dts: marvell: add CP110 ICU SEI subnode
The ICU handles several interrupt groups, each of them being a subpart
of the ICU node.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-10-03 09:44:18 +02:00
Miquel Raynal f21bb56e84 arm64: dts: marvell: use new bindings for CP110 interrupts
Create an ICU subnode for the NSR interrupts. This subnode becomes the
CP110 interrupt parent, removing the need for the ICU_GRP_NSR parameter.
Move all DT110 nodes to use these new bindings.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-10-03 09:44:09 +02:00
Masahiro Yamada 84a9c4d559 arm64: dts: uniphier: add SD controller nodes
Add SD controller nodes for LD20 and PXs3.
LD20 does not support the UHS mode, while PXs3 supports it.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-10-03 08:21:27 +09:00
Miquel Raynal b9a5950fc5 arm64: dts: marvell: add AP806 SEI subnode
Add the System Error Interrupt node, representing an IRQ chip which is
part of the GIC. The SEI node aggregates interrupts from the AP through
wired interrupts, and from the CPs through MSIs.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-10-02 16:46:53 +02:00
orenbh 8ed4636877 arm64: dts: marvell: add CPU Idle power state support on Armada 7K/8K
This patch adds CPU deep Idle and Cluster deep Idle states BUT it defines
the idle state for each cpu (defined under cpu-idle-states parameter)
only for the quad version therefore it does NOT activate CPU Idle
capability for the other version.

[gregory: extract from a larger patch]
Signed-off-by: orenbh <orenbh@marvell.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-10-02 16:46:52 +02:00
Gregory CLEMENT 92e5d4e939 arm64: dts: marvell: Add node labels for the cpus
Aligned with what we have done for the others nodes. It will also allow
to easily modify the cpu configuration at board (or sub-SoC) level.

Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-10-02 16:46:52 +02:00
Rob Herring 37c8a5fafa kbuild: consolidate Devicetree dtb build rules
There is nothing arch specific about building dtb files other than their
location under /arch/*/boot/dts/. Keeping each arch aligned is a pain.
The dependencies and supported targets are all slightly different.
Also, a cross-compiler for each arch is needed, but really the host
compiler preprocessor is perfectly fine for building dtbs. Move the
build rules to a common location and remove the arch specific ones. This
is done in a single step to avoid warnings about overriding rules.

The build dependencies had been a mixture of 'scripts' and/or 'prepare'.
These pull in several dependencies some of which need a target compiler
(specifically devicetable-offsets.h) and aren't needed to build dtbs.
All that is really needed is dtc, so adjust the dependencies to only be
dtc.

This change enables support 'dtbs_install' on some arches which were
missing the target.

Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Paul Burton <paul.burton@mips.com>
Acked-by: Ley Foon Tan <ley.foon.tan@intel.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: linux-kbuild@vger.kernel.org
Cc: linux-snps-arc@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: uclinux-h8-devel@lists.sourceforge.jp
Cc: linux-mips@linux-mips.org
Cc: nios2-dev@lists.rocketboards.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-xtensa@linux-xtensa.org
Signed-off-by: Rob Herring <robh@kernel.org>
2018-10-02 09:23:21 -05:00
Miquel Raynal 228197c569 arm64: marvell: Enable SEI driver
Enable the newly introduced Marvell SEI driver for the 64-bit Marvell
EBU platforms.

Suggested-by: Haim Boot <hayim@marvell.com>
Reviewed-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-02 12:00:18 +01:00
Arnd Bergmann 16a1548013 Merge tag 'actions-arm64-soc-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions into next/soc
Actions Semi arm64 SoC for v4.20

This updates and extends the MAINTAINERS entry, adding Mani.
It also selects PINCTRL in Kconfig.

* tag 'actions-arm64-soc-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions:
  arm64: actions: Enable PINCTRL in platforms Kconfig
  MAINTAINERS: Add entry for Actions Semi Owl SoCs DMA driver
  MAINTAINERS: Add entry for Actions Semiconductor Owl I2C driver
  MAINTAINERS: Update clock binding entry for Actions Semi Owl SoCs
  MAINTAINERS: Add Actions Semi S900 clk entries
  MAINTAINERS: Add reviewer for ACTIONS platforms

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-02 12:05:16 +02:00
Arnd Bergmann e9a4dd9999 mvebu dt64 for 4.20 (part 1)
- Add watchdog node on Armada 37xx
  - Update PPv2 interrupts name
  - Add support for the SolidRun Clearfog GT 8K (Aramda 8040 based)
  - Add thermal-zone nodes for Aramda 7K/8K
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQYqXDMF3cvSLY+g9cLBhiOFHI71QUCW7HpQwAKCRALBhiOFHI7
 1a8HAJ4tUZNYmuo9AWVWLj+FJaTBgQSJYgCaA+tkbl2J+bsZfL7JFpHGVukKmzc=
 =4cF/
 -----END PGP SIGNATURE-----

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

mvebu dt64 for 4.20 (part 1)

 - Add watchdog node on Armada 37xx
 - Update PPv2 interrupts name
 - Add support for the SolidRun Clearfog GT 8K (Aramda 8040 based)
 - Add thermal-zone nodes for Aramda 7K/8K

* tag 'mvebu-dt64-4.20-1' of git://git.infradead.org/linux-mvebu:
  arm64: dts: marvell: armada-37xx: add nodes to support watchdog
  arm64: dts: marvell: armada-cp110: describe more PPv2 interrupts
  arm64: dts: marvell: armada-cp110: change the PPv2 IRQ names
  arm64: dts: add support for SolidRun Clearfog GT 8K
  arm64: dts: marvell: add thermal-zone node in cp110 DTSI file
  arm64: dts: marvell: add macro to make distinction between node names
  arm64: dts: marvell: add thermal-zone node in ap806 DTSI file
  arm64: dts: marvell: move AP806/CP110 thermal nodes into a new syscon

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-02 11:53:19 +02:00
Arnd Bergmann ca2fbd9ad4 Freescale arm64 device tree update for 4.20:
- Add the second Dual UART device for LS208xA SoCs.
  - Add necessary big-endian property for NOR device on LS104xA based
    boards, remove unneeded big-endian property from IFC controller.
  - DTC has new checks for I2C and SPI buses to land into 4.20.  A patch
    from Rob to fix the bus node names and warnings in unit-addresses.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJbscRcAAoJEFBXWFqHsHzOxVQIALdjNChTrg5K0GBRTavdl+Hq
 sOjW0W6Hh5MN4r1wKpSsKAPD/XsPmjMpsreC/qlR+uFGleKzhrHWRtbmR/FG7Aut
 Sv052Yew5Fc8mWzNGNwQes6rpagRioqnLD6L6bPFoelgGsVFxrysDhAWhBgp7Zj8
 HhQvgVaP2t2FDJX6O3Vbve4OgUNrmg5fp6bm19X3BSDa8Bsm6+9QU1w0ulCeWA/R
 HXiGtECO+N1td3ViVh2iZMoQgvXSxY0twn2srMlFP+TsfOxKvC8lN2/RhwqtrbQs
 AIWTbCuJHukGUQfRuIhVYhPUVZomPuaBUIBm8Semjn/dhjmBK7eXytFKY7AQcKM=
 =BFcP
 -----END PGP SIGNATURE-----

Merge tag 'imx-dt64-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt

Freescale arm64 device tree update for 4.20:
 - Add the second Dual UART device for LS208xA SoCs.
 - Add necessary big-endian property for NOR device on LS104xA based
   boards, remove unneeded big-endian property from IFC controller.
 - DTC has new checks for I2C and SPI buses to land into 4.20.  A patch
   from Rob to fix the bus node names and warnings in unit-addresses.

* tag 'imx-dt64-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  arm64: dts: fsl: Fix I2C and SPI bus warnings
  arm64: dts: ls208xa: add second duart
  arm64: dts: fsl: remove big-endian field from IFC controller
  arm64: dts: Add big-endian in nor node for ls104xa

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-02 11:41:59 +02:00
Arnd Bergmann 5908704d98 Qualcomm ARM64 Updates for v4.20
* Update Coresight for MSM8916
 * Switch to use mailbox for smp2p and smd on MSM8996
 * Add dispcc, dsp, USB, regulator, and other nodes for SDM845
 * Drop model/compatible from MSM8916 and MSM8996
 * Add compat for db820c
 * Add MSM8998 SoC and board support along with associated nodes
 * Add RESIN/PON for Qualcomm PM8916 and PM8994
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJbsRFHAAoJEFKiBbHx2RXVN/oP/iC8IadUtrHIqon5G7cW1iDJ
 ZV3b9BffFi+1pdPm3GYFafpPHsq3/aUjmam30sTNrsD/zRUvKMz3S2AuaclUdbwe
 0pjMAJ1PSBhcH8M9G1kWp2goOkNSUoWPt0zYegb2z5zPoqk54hqdzUupaX6E5hre
 VzhrbfN2xQb0T6F+HPhJTPcGkKHMQmQdfH3pn/DhfM9J9h5meSWTdSaVG53reDYK
 rluiK9YQhGMyYiAfupfoefE3eKD+LU6dveBm4gPBsHDM4Euq93y7NMNaEWh3Axp0
 Bdf5ZgADOsqTrFjRCKgI56l6gQt4Z8VQoY8Phc5iUq+3dcHukDFK0dDET/7g+FPe
 sHbqDGoiIIzaWPIP1r18vWcqy+SWCCkfDpuy0E9o6w61CcvkUTBShIovXfX1+rfS
 4ZckfKXIs8zuY19C5tRRcYR1t162G537rvTLM1byS7Qq7YDuvqOzahR1G0mpjr0I
 VzPOcYvxAhHGQxPCznp8XNiR9GiIWubwBgMsT0e7285VgZ6hARcdskXjAT1QNz8X
 LJd/77SkOyLLRWT96RCR5NFfbNkLDn1QKs7dSSwRPdcqJVVJ8798y5fsL86Uo/9w
 Ugue7HFhdGBRi6e33r1OArWvWbudHLuhTD29Rg7K5qs0RjQrtjcy3ywQZvoo3BLm
 sZk2Bp2DaG/bM2dQT3SU
 =E6nH
 -----END PGP SIGNATURE-----

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

Qualcomm ARM64 Updates for v4.20

* Update Coresight for MSM8916
* Switch to use mailbox for smp2p and smd on MSM8996
* Add dispcc, dsp, USB, regulator, and other nodes for SDM845
* Drop model/compatible from MSM8916 and MSM8996
* Add compat for db820c
* Add MSM8998 SoC and board support along with associated nodes
* Add RESIN/PON for Qualcomm PM8916 and PM8994

* tag 'qcom-arm64-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: (31 commits)
  Revert "dt-bindings: thermal: qcom-spmi-temp-alarm: Fix documentation of 'reg'"
  Revert "dt-bindings: iio: vadc: Fix documentation of 'reg'"
  arm64: dts: msm8916: Update coresight bindings for hardware ports
  arm64: dts: msm8996: Transition smp2p and smd to mailbox
  arm64: dts: qcom: pm8998: Add pm8998 thermal zone
  arm64: dts: qcom: pm8998: Add spmi-temp-alarm node
  dt-bindings: thermal: qcom-spmi-temp-alarm: Fix documentation of 'reg'
  arm64: dts: sdm845: Add dispcc node
  arm64: dts: qcom: sdm845: Add adsp, cdsp and slpi smp2p
  arm64: dts: qcom: sdm845-mtp: Add nodes for USB
  arm64: dts: qcom: sdm845-mtp: Add RPMh VRM/XOB regulators
  arm64: dts: qcom: sdm845: Add USB-related nodes
  arm64: dts: qcom: Add AOSS reset driver node for SDM845
  arm64: dts: msm8996: Drop model
  arm64: dts: msm8916: Drop model and compatible
  arm64: dts: db820c: Add qcom,apq8096 to compatible string
  arm64: dts: qcom: Populate pm8998 with additional nodes
  arm64: dts: qcom: msm8998: Add smp2p nodes
  arm64: dts: qcom: msm8998: Add the qfprom node
  arm64: dts: qcom: msm8998: Add firmware node
  ...

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-02 11:31:49 +02:00
Arnd Bergmann 6a11b1804a Actions Semi arm64 based SoC DT for v4.20
This updates SPDX headers for remaining files.
 
 For S900 it adds clock, pinctrl, i2c and dma nodes.
 S900 SPS is added via topic branch (shared with driver).
 
 For S700 it adds clock nodes.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEF08DRxvMIhphdW+W+i7RLT5+AT8FAluxCgERHGFmYWVyYmVy
 QHN1c2UuZGUACgkQ+i7RLT5+AT/nFA/+Iz3ut7PQddWvw0RQF9IG93Z8PwWDqDxu
 Rf0yDMeD3UJOMR35U0VAEK2rIOKxIMi82oc+rVMtGegSAaffHPuXIArhVazw+woZ
 blc6BHf1e9Ml1YRqBOGkuLQw79iV/vXtwafa/jPtX2rNfazjc/075s42ZW03wmur
 +nM3pCXrMDe0eGPW+t8I7yzFFpvAqLF3FcgV9R7M+Orb/47RuscGnbCpy+K1gip4
 F2ZxyXzna7/BypMpJQ63jqtE4Q7FDbhU0kb//tJtbjEHv+UxW7Zkj2Kew7YQxJDP
 GWIzPAcUmQm/Fyw59ViPKP2uN/HTe/vwnS2RhYm9tO80+rLA4J+Q/IWCWajYKaIv
 uYvw50I6ky7a1TuaCko1XCgZVG2gmplXxcnEQ+vFW/x6mRg9Chy3DRNe63O2ufZM
 JaoNE7gkIa4ezMBBOh5whUwGDlOlUNdQasGRpfPhOLU6bM9RtEgyX+U4FZpSSimr
 K7CdjfFezcYvI/9/C94et9CmBkgrDZMS83QEX/8/SH5TT9tad4JGrd5yMWXSovfX
 Z2PvIll2vdpIxBlENDBLDAjMBgtLd3S7iArIqZi0ngEb47rF8lTDpBBWfeWytZjr
 qGRPZOh8RmN23olgYWlWqER2zsNwwKwWXZ6zoOQx/HVz9hfPzkBh14XzJv+cV+H4
 ExkboNvlHTs=
 =CRn3
 -----END PGP SIGNATURE-----

Merge tag 'actions-arm64-dt-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions into next/dt

Actions Semi arm64 based SoC DT for v4.20

This updates SPDX headers for remaining files.

For S900 it adds clock, pinctrl, i2c and dma nodes.
S900 SPS is added via topic branch (shared with driver).

For S700 it adds clock nodes.

* tag 'actions-arm64-dt-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions:
  arm64: dts: actions: s700: Set UART clock references from CMU
  arm64: dts: actions: s700: Add Clock Management Unit
  arm64: dts: actions: s900: Add DMA Controller
  arm64: dts: actions: s900-bubblegum-96: Enable I2C1 and I2C2
  arm64: dts: actions: s900: Add I2C controller nodes
  arm64: dts: actions: s900-bubblegum-96: Add gpio line names
  arm64: dts: actions: s900: Add gpio properties to pinctrl node
  arm64: dts: actions: s900: Add pinctrl node
  arm64: dts: actions: s900: Add SPS node
  arm64: dts: actions: s900: Source CMU clock for UARTs
  arm64: dts: actions: s900: Add Clock Management Unit nodes
  dt-bindings: power: Add Actions Semi S900 SPS
  arm64: dts: actions: Convert to new-style SPDX license identifiers

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-02 11:19:36 +02:00
Arnd Bergmann 508b330b82 mt2712 - add spi slave node
mt7622:
 - add timer node
 - add CCI node
 - add PMU node
 - add bluetooth node
 - add SPI slave node
 - fix reference board (rfb1) memory and sort node alphabetically
 - add support for Bananapi-R64
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCAA1FiEEiUuSfQSYnG8EMsBltDliWyzx00MFAluvglMXHG1hdHRoaWFz
 LmJnZ0BnbWFpbC5jb20ACgkQtDliWyzx00Pnzg//Ygw/So3J9SQNxPyKyk9uoKAy
 jyhdWiy0/QUMfDSeLcDTwYRqmdb/Ofmw6PYxG6MouNmxDW6/Nlt4uYjBGgJy7w5a
 eN0oonhZTANSSduve2SX4RmKH9RasM2+YCMVWnwHH2SLKEiOEytUATKQYzoPw4gh
 JgkErAL9otGSPRMLIcgRcOnL700k1yBGERwOb3+0CYTWbPAbiuF34UVkeYt/CVID
 CxyY8Pi6vHkk6MmcsCa6jFY1+YoZQhOwR6FDk2dahYBStYFF37NtRcPv+ea9+t6k
 PhN1QeNJ7NJuRmfTgffHgBTkap3qBQjJyK3Bgc+88yi1d1Giuy1vRJfxmtK2thzt
 OP4MOD/t4hrV6tOrZ1V0ztVyQZCAYDEopM9XXe0o5Nb9dR9+Q+MRvb2VdgCBNT1F
 1lWwiZZtFNFzMPdNrC4fwhAPTM/9VBghCc2drxbizy2BtobDkkQK5/A7/UbHIVR5
 AV2HLPvCac27BbbYiSYemv5quSuBGVy4JoMhatKMwE7F798NLHipcanNpHVQR86n
 BvwQpglWgIjomDgu83LkaJZgs07esa5y1TJJpzJ0o8kAn13FgzK0UdiYeNy5Rprz
 sy+KzWy0PoL4yladowIFZRnFzkgXd+F00gZKKNdAdY04ZUp5CaDn0GVt9WqCkDwr
 Z+O3Budk3jyNRpF+Nv4=
 =ySpY
 -----END PGP SIGNATURE-----

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

mt2712 - add spi slave node

mt7622:
- add timer node
- add CCI node
- add PMU node
- add bluetooth node
- add SPI slave node
- fix reference board (rfb1) memory and sort node alphabetically
- add support for Bananapi-R64

* tag 'v4.19-next-dts64' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux:
  arm64: dts: Add spi slave dts
  arm64: dts: mt7622: add bananapi BPI-R64 board
  arm64: dts: mt7622: fix ram size for rfb1
  arm64: dts: mt7622: add a bluetooth 5 device node
  arm64: dts: mt7622: add timer, CCI-400 and PMU nodes

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-02 11:15:38 +02:00
Arnd Bergmann f6cfb90582 Allwinner arm64 DT changes for 4.20
Our usual set of DT changes for the arm64 Allwinner SoCs.
 
 The most notable things are:
   - HDMI support on the A64
   - New boards: OrangePi One Plus
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAluvknEACgkQ0rTAlCFN
 r3QcChAAh48PP26x4cemD+dmtOhXEPIBw1PRDHCwxIYXxlk//1pi2mbW3EJcgDF4
 boL1nANP+X06cveQqI28TImQWCOMTOXd7AWxyFZS+0QoORWXYwZMnrYydrscFvBr
 7eoBOou805RNLHeTn0w0TFHwRCSsh6XSLitGzec1NMh5v9YJMZamFWgUkCod7J8k
 uKfLuL7BqdBfAGJr83vwTds7y+r9bvZTDSIw1neAn2dfi8z3j5DortYcMp76jPJc
 51z64RSna9o4nYe9nLl4bORq9rTfH/CJf5cc+/Br6RTWzA4SlAGzyWBdwCH4fbWv
 BKVc5aDUpkoMkgNJmZP27L4tbsV7cH5sZ4s820yHioUn2ghUWjq585KyR7/1yqI5
 MGZDNzlUxbzGPBgObg8K8dl7ZL9f09ziDsoWF3ysL/vtYpkjxBML4mCsIiUgblkR
 kpleA1Zv8uL864MQBF0gUixRSeU4Lq4xu4fBI4Vi7CvzYrX1ZDEoiUvFd3OzxJmL
 ZeKmd0mOWu1y8oUyw4S4nvzrtklAAjU2pukfpUC5J66JFlcyJQ7ic7gZ3UMsyWTW
 5xsAWmqhToYQNKGdEsHoFtDI9clM/+0wpyedc655020biMP8/Wf7gHexVsM3+x6W
 fUbTqWHNkc7jD8lc0qZFQGZiGRMToZkTHALD0/kb+gvLYEblXtk=
 =sPs9
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-dt64-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt

Allwinner arm64 DT changes for 4.20

Our usual set of DT changes for the arm64 Allwinner SoCs.

The most notable things are:
  - HDMI support on the A64
  - New boards: OrangePi One Plus

* tag 'sunxi-dt64-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (28 commits)
  arm64: dts: allwinner: a64: a64-olinuxino: set the PHY TX delay
  arm64: dts: allwinner: a64: Enable HDMI output on A64 boards w/ HDMI
  arm64: dts: allwinner: a64: Add display pipeline
  arm64: dts: allwinner: h6: add system controller device tree node
  arm64: dts: allwinner: h6: Add OrangePi One Plus initial support
  arm64: dts: allwinner: a64: Rename r_i2c_pins_a label to r_i2c_pl89_pins
  arm64: dts: allwinner: a64: Rename uart0_pins_a label to uart0_pb_pins
  arm64: dts: allwinner: a64: Split out data strobe pin from mmc2 pinmux
  arm64: dts: allwinner: a64: NanoPi-A64: Add blue status LED
  arm64: dts: allwinner: a64: NanoPi-A64: Add Wifi chip
  arm64: dts: allwinner: a64: NanoPi-A64: Add Ethernet
  arm64: dts: allwinner: a64: NanoPi-A64: Fix DCDC1 voltage
  arm64: dts: allwinner: a64: Olinuxino: enable USB
  arm64: dts: allwinner: a64: Olinuxino: add Ethernet nodes
  arm64: dts: allwinner: a64: Olinuxino: fix DRAM voltage
  arm64: dts: allwinner: a64: Orange Pi Win: Adjust CSI power rails
  arm64: dts: allwinner: a64: Orange Pi Win: Add SPI flash node
  arm64: dts: allwinner: a64: Orange Pi Win: Add SDIO node
  arm64: dts: allwinner: a64: Orange Pi Win: Add LED node
  arm64: dts: allwinner: a64: Orange Pi Win: Add UARTs
  ...

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-02 10:28:23 +02:00
Arnd Bergmann 8bdc2e5686 Allwinner H3 and H5 DT additions for 4.20
This is our usual H3/H5 pull request
 
 The most notable changes are:
   - the video decoding / encoding unit is finally enabled on the H3
   - Mali support for the H5
   - New boards: BananaPi M2+ v1.2, Orange Pi Zero Plus 2 H3 support
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAluvhigACgkQ0rTAlCFN
 r3SHzA/+IsYaAQgvy8NE7Ok1rhy/OU7eLPjd2JVqBgJ6SwCkcM4eW7Zol6SoMawG
 Wt9Bh+1JFvyzi4GiftwL/rPzOh2rxjuuDZMmLo5sZBztTLoFmKv9XIYgjnv8kVJY
 WXQ5Z3BOKA0H6lyIw6jinS6uotTGiWhtvihOpoAeus8pHJ/AWo3lbntb0tdPob7b
 fA95Dsm5ddqhPonrkqq1WEJ+Yepetoa7m2U2dJLOUHPaX8AmIm4GgQNoA6MEVYRJ
 0sZ/FDhe+5yvDRKbebVRrlqITGgwEYuTPYO1zQEQleQo6SPEvJuUOo+CW5R3Pgqc
 sKk5UxohaAvxbATt5gYhqTl4GwSKkMrNdJroVTc3bf8CekwxgpnNoV2nszGQSrjH
 yU2Nwy0d2ok4ZacxoFBjosbGWYh2UuqAlv7lX/UPr79GbeJpA9IUDXQxBGJoodTH
 0Wy3rUSgAUU/nRfsaDZtkLqIB8/keiSZzWV97aCnIUGHWk00MfnB8nzhkU1YEel0
 8Lbqh+9NY4+P3Ps4UxsnOIL0LQZt2Twf738GF/boa4RftYQOUJJQmvNO8TpFL0OK
 VKe10hX0trfsNOv2Ws7oTsGrLZXqLsB8r6jjsSX84NR2Dft2CYj8s7u2lpnmFTxd
 ciBjzeyFb4TbYW2iYOsYLRaei0w8GSNMdHShNU04fO/zh1dP8lU=
 =AJmQ
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-h3-h5-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt

Allwinner H3 and H5 DT additions for 4.20

This is our usual H3/H5 pull request

The most notable changes are:
  - the video decoding / encoding unit is finally enabled on the H3
  - Mali support for the H5
  - New boards: BananaPi M2+ v1.2, Orange Pi Zero Plus 2 H3 support

* tag 'sunxi-h3-h5-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  ARM: dts: sunxi: h3-h5: Add Bananapi M2+ v1.2 device trees
  ARM: dts: sun8i-h3: Add Video Engine and reserved memory nodes
  arm64: dts: allwinner: h5: Add device tree for Bananapi M2 Plus H5
  ARM: dts: sun8i: h3: Split out non-SoC-specific parts of Bananapi M2 Plus
  ARM: dts: sun8i: h3: bpi-m2-plus: Fix address for external RGMII Ethernet PHY
  ARM: dts: sun8i: h3-h5: ir register size should be the whole memory block
  arm64: dts: allwinner: h5: Add device node for Mali-450 GPU
  ARM: dts: sun8i: Add initial Orangepi Zero Plus 2 H3 support
  nvmem: sunxi-sid: add support for H5's SID controller

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-02 10:24:41 +02:00
Arnd Bergmann 965a2dc757 Allwinner arm64 config changes for 4.20
Here is a single config change to enable the DRM driver in the arm64
 defconfig.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAluvh/UACgkQ0rTAlCFN
 r3QS1A//bYiQuFEcWbHOKQ7/WpPCyaHaENanOTvX0JluLakwq32/wFXkzJ4ioD9C
 cHUwLtwKBv4hxAzKkmrtWcFnSAOzaZio3EPgrsjlq5vi3hPVQVhW6VsezQiIRJ+3
 kgdEXU0n+zniYSNxAOuBB8N0Z2HjI5imBiqPO7663ID15ZwS/N2ERAr675G7iIac
 g5oN1W89XIf3dS1DmNDwohfgBXzQU9CuVJPKe/RravaRSy8q+2R214OUBRCZVC2F
 kJHr/HqL4Kj98M6qchqe6jS5HELIRMM1ihMc+Q5ysMVLgIDW1T8Ur2HAexb7xoK+
 OJqLx3AIXuLKilHSs6wjvR32RUJoiq1pWPNxrOnPP+Hk6SeXwao/Wcwr1YxUJ6Sl
 PRYxkLe/ae0c2dqJno2m0U4tQ2R9MvL+KIUdh8e5r0zgzMMk0i2MFNI5cmb6j0U+
 nycmc9ioCEaGibDeTm6pNg48xAg464uWDjnkM89+8PjPxEO2uVjQoMO8uk68kvWP
 urYiwsTirJz1xIeNYTZ0zXlDjkDTnJzUPmpXv1OZ46+iz0kq8rKrg1uCS9pSl2tH
 8WGV3ejWu+K3QA4XjbHwQd/4K8nexiPAkAFXcSjgJFy6t9QTakJfahrIN3LJ+5pi
 bH+WKardfjlGxMACQkS6tiXhyG2Nze9KTdJVctz5RtjaHH2PMaQ=
 =MBKv
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-config64-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/defconfig

Allwinner arm64 config changes for 4.20

Here is a single config change to enable the DRM driver in the arm64
defconfig.

* tag 'sunxi-config64-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  arm64: defconfig: Enable CONFIG_DRM_SUN4I

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-02 09:52:25 +02:00
Ingo Molnar b429f71bca Merge branch 'sched/urgent' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2018-10-02 09:43:39 +02:00
Kunihiko Hayashi 633da3f425 arm64: defconfig: Enable USB phys for UniPhier SoCs
Enable the USB3 and USB2 phys implemented in UniPhier SoCs.
These phys are necessary for dwc3 and ehci controllers driving
the USB ports on arm64 UniPhier SoCs.

Since the USB host drivers are already built-in, so only the phy
driver are missing to allow booting with USB devices.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-01 18:04:29 +02:00
Arnd Bergmann 4f5688908f Qualcomm ARM64 Based defconfig Updates for v4.20
* Enable Qualcomm QRTR driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJbsQzOAAoJEFKiBbHx2RXVgyUP/jKyXMB1W1PJ9j+s+fhPv+hV
 N1NkjC9jdL/z3DdX3pMKSOjEnIUhzrycNwByenyDAkuaRHdsShDF9G+CP38S5c6K
 W6kZK4P+tnlvRoNhEa2foKAjQbZb832sxhZPUyw7rNVKvT1yvsO6aYVTVzVF6uOj
 Xkpt1opaK1Ka2cUSPoUV+1VnPYEeNFaOA2qbFOnsWquhgVhVCntC2krWDSfpRCc8
 +z6Z4d3ND7SsZQmaw+b6q52iJgFhuqjhL2j0sfyuYSu3i3Klh7YK6tWJ1st3z6oV
 913Zrpc2lRj0hwFf04S7zU+3eOXGvy4HOoTvedoCjJ3sXdJocs/bTifT+m8HkCmz
 loXwt7hMZDJ9CrFW81Q5Q43LeMp0tooHpxt5Z0/BD16PY4Svrb9ZBgTGRKqQW8Ik
 jUu/QV2bUULTOnaUf4SS3XwSKmge0nYZjDrisVuYQRrEmdj8AwgnHEfXMkHrHMnk
 A8UjelhvHS4iMBdm8N9VZPKVy7usJHf19rhZ7Nud2eLbE5nJoZl7id5Y9AQsqHtj
 P0TfBt4410BJVtck3i3z+Dvst0gMmmFGN0zE4gIe3cxxXbs9be5Epw6+kF9Q0C4k
 sOpzX0yvE0VrSmR4sMSAIXau6K/moF9P1Kr7K2DnYIxl6Y8rlb4hDn+VgNw3c7tY
 /ku7A1fv4Kq1kOFT12Yx
 =ZNOd
 -----END PGP SIGNATURE-----

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

Qualcomm ARM64 Based defconfig Updates for v4.20

* Enable Qualcomm QRTR driver

* tag 'qcom-arm64-defconfig-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux:
  arm64: defconfig: Enable Qualcomm QRTR

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-01 17:59:42 +02:00
Marc Zyngier c219bc4e92 arm64: Trap WFI executed in userspace
It recently came to light that userspace can execute WFI, and that
the arm64 kernel doesn't trap this event. This sounds rather benign,
but the kernel should decide when it wants to wait for an interrupt,
and not userspace.

Let's trap WFI and immediately return after having skipped the
instruction. This effectively makes WFI a rather expensive NOP.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 16:52:24 +01:00
Jens Axboe c0aac682fa This is the 4.19-rc6 release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAluw4MIACgkQONu9yGCS
 aT7+8xAAiYnc4khUsxeInm3z44WPfRX1+UF51frTNSY5C8Nn5nvRSnTUNLuKkkrz
 8RbwCL6UYyJxF9I/oZdHPsPOD4IxXkQY55tBjz7ZbSBIFEwYM6RJMm8mAGlXY7wq
 VyWA5MhlpGHM9DjrguB4DMRipnrSc06CVAnC+ZyKLjzblzU1Wdf2dYu+AW9pUVXP
 j4r74lFED5djPY1xfqfzEwmYRCeEGYGx7zMqT3GrrF5uFPqj1H6O5klEsAhIZvdl
 IWnJTU2coC8R/Sd17g4lHWPIeQNnMUGIUbu+PhIrZ/lDwFxlocg4BvarPXEdzgYi
 gdZzKBfovpEsSu5RCQsKWG4IGQxY7I1p70IOP9eqEFHZy77qT1YcHVAWrK1Y/bJd
 UA08gUOSzRnhKkNR3+PsaMflUOl9WkpyHECZu394cyRGMutSS50aWkavJPJ/o1Qi
 D/oGqZLLcKFyuNcchG+Met1TzY3LvYEDgSburqwqeUZWtAsGs8kmiiq7qvmXx4zV
 IcgM8ERqJ8mbfhfsXQU7hwydIrPJ3JdIq19RnM5ajbv2Q4C/qJCyAKkQoacrlKR4
 aiow/qvyNrP80rpXfPJB8/8PiWeDtAnnGhM+xySZNlw3t8GR6NYpUkIzf5TdkSb3
 C8KuKg6FY9QAS62fv+5KK3LB/wbQanxaPNruQFGe5K1iDQ5Fvzw=
 =dMl4
 -----END PGP SIGNATURE-----

Merge tag 'v4.19-rc6' into for-4.20/block

Merge -rc6 in, for two reasons:

1) Resolve a trivial conflict in the blk-mq-tag.c documentation
2) A few important regression fixes went into upstream directly, so
   they aren't in the 4.20 branch.

Signed-off-by: Jens Axboe <axboe@kernel.dk>

* tag 'v4.19-rc6': (780 commits)
  Linux 4.19-rc6
  MAINTAINERS: fix reference to moved drivers/{misc => auxdisplay}/panel.c
  cpufreq: qcom-kryo: Fix section annotations
  perf/core: Add sanity check to deal with pinned event failure
  xen/blkfront: correct purging of persistent grants
  Revert "xen/blkfront: When purging persistent grants, keep them in the buffer"
  selftests/powerpc: Fix Makefiles for headers_install change
  blk-mq: I/O and timer unplugs are inverted in blktrace
  dax: Fix deadlock in dax_lock_mapping_entry()
  x86/boot: Fix kexec booting failure in the SEV bit detection code
  bcache: add separate workqueue for journal_write to avoid deadlock
  drm/amd/display: Fix Edid emulation for linux
  drm/amd/display: Fix Vega10 lightup on S3 resume
  drm/amdgpu: Fix vce work queue was not cancelled when suspend
  Revert "drm/panel: Add device_link from panel device to DRM device"
  xen/blkfront: When purging persistent grants, keep them in the buffer
  clocksource/drivers/timer-atmel-pit: Properly handle error cases
  block: fix deadline elevator drain for zoned block devices
  ACPI / hotplug / PCI: Don't scan for non-hotplug bridges if slot is not bridge
  drm/syncobj: Don't leak fences when WAIT_FOR_SUBMIT is set
  ...

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-10-01 08:58:57 -06:00
Marc Zyngier 2a3f93459d arm64: KVM: Sanitize PSTATE.M when being set from userspace
Not all execution modes are valid for a guest, and some of them
depend on what the HW actually supports. Let's verify that what
userspace provides is compatible with both the VM settings and
the HW capabilities.

Cc: <stable@vger.kernel.org>
Fixes: 0d854a60b1 ("arm64: KVM: enable initialization of a 32bit vcpu")
Reviewed-by: Christoffer Dall <christoffer.dall@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-10-01 14:38:26 +01:00
Dave Martin d26c25a9d1 arm64: KVM: Tighten guest core register access from userspace
We currently allow userspace to access the core register file
in about any possible way, including straddling multiple
registers and doing unaligned accesses.

This is not the expected use of the ABI, and nobody is actually
using it that way. Let's tighten it by explicitly checking
the size and alignment for each field of the register file.

Cc: <stable@vger.kernel.org>
Fixes: 2f4a07c5f9 ("arm64: KVM: guest one-reg interface")
Reviewed-by: Christoffer Dall <christoffer.dall@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
[maz: rewrote Dave's initial patch to be more easily backported]
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-10-01 14:38:05 +01:00
zhong jiang 2ba0dacbae arm64/kprobes: remove an extra semicolon in arch_prepare_kprobe
There is an extra semicolon in arch_prepare_kprobe, remove it.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 14:36:49 +01:00
Suzuki K Poulose bc1d7de8c5 kvm: arm64: Add 52bit support for PAR to HPFAR conversoin
Add support for handling 52bit addresses in PAR to HPFAR
conversion. Instead of hardcoding the address limits, we
now use PHYS_MASK_SHIFT.

Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Christoffer Dall <cdall@kernel.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-01 13:50:32 +01:00
Suzuki K Poulose 13ac4bbcc4 kvm: arm64: Switch to per VM IPA limit
Now that we can manage the stage2 page table per VM, switch the
configuration details to per VM instance. The VTCR is updated
with the values specific to the VM based on the configuration.
We store the IPA size and the number of stage2 page table levels
for the guest already in VTCR. Decode it back from the vtcr
field wherever we need it.

Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Christoffer Dall <cdall@kernel.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-01 13:50:32 +01:00
Suzuki K Poulose 7e8130456e kvm: arm64: Configure VTCR_EL2.SL0 per VM
VTCR_EL2 holds the following key stage2 translation table
parameters:
  SL0  - Entry level in the page table lookup.
  T0SZ - Denotes the size of the memory addressed by the table.

We have been using fixed values for the SL0 depending on the
page size as we have a fixed IPA size. But since we are about
to make it dynamic, we need to calculate the SL0 at runtime
per VM. This patch adds a helper to compute the value of SL0
for a VM based on the IPA size.

Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Christoffer Dall <cdall@kernel.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-01 13:50:31 +01:00
Suzuki K Poulose 5955833064 kvm: arm64: Dynamic configuration of VTTBR mask
On arm64 VTTBR_EL2:BADDR holds the base address for the stage2
translation table. The Arm ARM mandates that the bits BADDR[x-1:0]
should be 0, where 'x' is defined for a given IPA Size and the
number of levels for a translation granule size. It is defined
using some magical constants. This patch is a reverse engineered
implementation to calculate the 'x' at runtime for a given ipa and
number of page table levels. See patch for more details.

Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Christoffer Dall <cdall@kernel.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-01 13:50:31 +01:00
Suzuki K Poulose 61fa5a867b kvm: arm64: Make stage2 page table layout dynamic
Switch to dynamic stage2 page table layout based on the given
VM. So far we had a common stage2 table layout determined at
compile time. Make decision based on the VM instance depending
on the IPA limit for the VM. Adds helpers to compute the stage2
parameters based on the guest's IPA and uses them to make the decisions.

The IPA limit is still fixed to 40bits and the build time check
to ensure the stage2 doesn't exceed the host kernels page table
levels is retained. Also make sure that we use the pud/pmd level
helpers from the host only when they are not folded.

Cc: Christoffer Dall <cdall@kernel.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-01 13:50:31 +01:00
Suzuki K Poulose 865b30cdd9 kvm: arm64: Prepare for dynamic stage2 page table layout
Our stage2 page table helpers are statically defined based
on the fixed IPA of 40bits and the host page size. As we are
about to add support for configurable IPA size for VMs, we
need to make the page table checks for each VM. This patch
prepares the stage2 helpers to make the transition to a VM
dependent table layout easier. Instead of statically defining
the table helpers based on the page table levels, we now
check the page table levels in the helpers to do the right
thing. In effect, it simply converts the macros to static
inline functions.

Cc: Eric Auger <eric.auger@redhat.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Christoffer Dall <cdall@kernel.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-01 13:50:30 +01:00
Suzuki K Poulose e55cac5bf2 kvm: arm/arm64: Prepare for VM specific stage2 translations
Right now the stage2 page table for a VM is hard coded, assuming
an IPA of 40bits. As we are about to add support for per VM IPA,
prepare the stage2 page table helpers to accept the kvm instance
to make the right decision for the VM. No functional changes.
Adds stage2_pgd_size(kvm) to replace S2_PGD_SIZE. Also, moves
some of the definitions in arm32 to align with the arm64.
Also drop the _AC() specifier constants wherever possible.

Cc: Christoffer Dall <cdall@kernel.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-01 13:50:30 +01:00
Suzuki K Poulose 7665f3a849 kvm: arm64: Configure VTCR_EL2 per VM
Add support for setting the VTCR_EL2 per VM, rather than hard
coding a value at boot time per CPU. This would allow us to tune
the stage2 page table parameters per VM in the later changes.

We compute the VTCR fields based on the system wide sanitised
feature registers, except for the hardware management of Access
Flags (VTCR_EL2.HA). It is fine to run a system with a mix of
CPUs that may or may not update the page table Access Flags.
Since the bit is RES0 on CPUs that don't support it, the bit
should be ignored on them.

Suggested-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Christoffer Dall <cdall@kernel.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-01 13:50:29 +01:00
Suzuki K Poulose 5b6c6742b5 kvm: arm/arm64: Allow arch specific configurations for VM
Allow the arch backends to perform VM specific initialisation.
This will be later used to handle IPA size configuration and per-VM
VTCR configuration on arm64.

Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Christoffer Dall <cdall@kernel.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-01 13:50:29 +01:00
Suzuki K Poulose b2df44ffba kvm: arm64: Clean up VTCR_EL2 initialisation
Use the new helper for converting the parange to the physical shift.
Also, add the missing definitions for the VTCR_EL2 register fields
and use them instead of hard coding numbers.

Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Christoffer Dall <cdall@kernel.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-01 13:50:29 +01:00
Suzuki K Poulose ce00e3cb4f arm64: Add a helper for PARange to physical shift conversion
On arm64, ID_AA64MMFR0_EL1.PARange encodes the maximum Physical
Address range supported by the CPU. Add a helper to decode this
to actual physical shift. If we hit an unallocated value, return
the maximum range supported by the kernel.
This will be used by KVM to set the VTCR_EL2.T0SZ, as it
is about to move its place. Having this helper keeps the code
movement cleaner.

Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Christoffer Dall <cdall@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-01 13:50:15 +01:00
Anshuman Khandual 52338088ef arm64/numa: Unify common error path in numa_init()
At present numa_free_distance() is being called before numa_distance is
even initialized with numa_alloc_distance() which is really pointless.
Instead lets call numa_free_distance() on the common error path inside
numa_init() after numa_alloc_distance() has been successful.

Fixes: 1a2db30034 ("arm64, numa: Add NUMA support for arm64 platforms")
Acked-by: Punit Agrawal <punit.agrawal@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:49:52 +01:00
Anshuman Khandual 77cfe95090 arm64/numa: Report correct memblock range for the dummy node
The dummy node ID is marked into all memory ranges on the system. So the
dummy node really extends the entire memblock.memory. Hence report correct
extent information for the dummy node using memblock range helper functions
instead of the range [0LLU, PFN_PHYS(max_pfn) - 1)].

Fixes: 1a2db30034 ("arm64, numa: Add NUMA support for arm64 platforms")
Acked-by: Punit Agrawal <punit.agrawal@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:48:54 +01:00
Anshuman Khandual 359048f91d arm64/mm: Define esr_to_debug_fault_info()
fault_info[] and debug_fault_info[] are static arrays defining memory abort
exception handling functions looking into ESR fault status code encodings.
As esr_to_fault_info() is already available providing fault_info[] array
lookup, it really makes sense to have a corresponding debug_fault_info[]
array lookup function as well. This just adds an equivalent helper function
esr_to_debug_fault_info().

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:48:23 +01:00
Anshuman Khandual dbfe3828a6 arm64/mm: Reorganize arguments for is_el1_permission_fault()
Most memory abort exception handling related functions have the arguments
in the order (addr, esr, regs) except is_el1_permission_fault(). This
changes the argument order in this function as (addr, esr, regs) like
others.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:47:31 +01:00
Anshuman Khandual 00bbd5d901 arm64/mm: Use ESR_ELx_FSC macro while decoding fault exception
Just replace hard code value of 63 (0x111111) with an existing macro
ESR_ELx_FSC when parsing for the status code during fault exception.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:47:12 +01:00
Marc Zyngier 95b861a4a6 arm64: arch_timer: Add workaround for ARM erratum 1188873
When running on Cortex-A76, a timer access from an AArch32 EL0
task may end up with a corrupted value or register. The workaround for
this is to trap these accesses at EL1/EL2 and execute them there.

This only affects versions r0p0, r1p0 and r2p0 of the CPU.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:38:47 +01:00
Marc Zyngier 32a3e635fb arm64: compat: Add CNTFRQ trap handler
Just like CNTVCT, we need to handle userspace trapping into the
kernel if we're decided that the timer wasn't fit for purpose...
64bit userspace is already dealt with, but we're missing the
equivalent compat handling.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:36:03 +01:00
Marc Zyngier 50de013d22 arm64: compat: Add CNTVCT trap handler
Since people seem to make a point in breaking the userspace visible
counter, we have no choice but to trap the access. We already do this
for 64bit userspace, but this is lacking for compat. Let's provide
the required handler.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:36:01 +01:00
Marc Zyngier 2a8905e18c arm64: compat: Add cp15_32 and cp15_64 handler arrays
We're now ready to start handling CP15 access. Let's add (empty)
arrays for both 32 and 64bit accessors, and the code that deals
with them.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:35:59 +01:00
Marc Zyngier 1f1c014035 arm64: compat: Add condition code checks and IT advance
Here's a /really nice/ part of the architecture: a CP15 access is
allowed to trap even if it fails its condition check, and SW must
handle it. This includes decoding the IT state if this happens in
am IT block. As a consequence, SW must also deal with advancing
the IT state machine.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:35:56 +01:00
Marc Zyngier 70c63cdfd6 arm64: compat: Add separate CP15 trapping hook
Instead of directly generating an UNDEF when trapping a CP15 access,
let's add a new entry point to that effect (which only generates an
UNDEF for now).

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:35:53 +01:00
Marc Zyngier bd7ac140b8 arm64: Add decoding macros for CP15_32 and CP15_64 traps
So far, we don't have anything to help decoding ESR_ELx when dealing
with ESR_ELx_EC_CP15_{32,64}. As we're about to handle some of those,
let's add some useful macros.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:35:50 +01:00
Suzuki K Poulose 9f98ddd668 kvm: arm64: Add helper for loading the stage2 setting for a VM
We load the stage2 context of a guest for different operations,
including running the guest and tlb maintenance on behalf of the
guest. As of now only the vttbr is private to the guest, but this
is about to change with IPA per VM. Add a helper to load the stage2
configuration for a VM, which could do the right thing with the
future changes.

Cc: Christoffer Dall <cdall@kernel.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-01 13:08:41 +01:00
Ard Biesheuvel 9376b1e7b6 arm64: remove unused asm/compiler.h header file
arm64 does not define CONFIG_HAVE_ARCH_COMPILER_H, nor does it keep
anything useful in its copy of asm/compiler.h, so let's remove it
before anybody starts using it.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 11:57:04 +01:00
Will Deacon 24951465cb arm64: compat: Provide definition for COMPAT_SIGMINSTKSZ
arch/arm/ defines a SIGMINSTKSZ of 2k, so we should use the same value
for compat tasks.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Reported-by: Steve McIntyre <steve.mcintyre@arm.com>
Tested-by: Steve McIntyre <93sam@debian.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 11:44:02 +01:00
Manivannan Sadhasivam e0c27a1066 arm64: actions: Enable PINCTRL in platforms Kconfig
Select PINCTRL for Actions Semi SoCs.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2018-09-30 19:11:33 +02:00
Saravanan Sekar 01463ac63b arm64: dts: actions: s700: Set UART clock references from CMU
Remove fixed clock in Cubieboard 7 and use Clock Management Unit clocks
for all UART nodes in Actions Semi S700 SoC.

Signed-off-by: Parthiban Nallathambi <pn@denx.de>
Signed-off-by: Saravanan Sekar <sravanhome@gmail.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
[AF: Moved/added to SoC]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2018-09-30 18:57:23 +02:00