Commit Graph

3960 Commits

Author SHA1 Message Date
Vladimir Murzin 5a7a8426b2 arm64: KVM: Use static keys for selecting the GIC backend
Currently GIC backend is selected via alternative framework and this
is fine. We are going to introduce vgic-v3 to 32-bit world and there
we don't have patching framework in hand, so we can either check
support for GICv3 every time we need to choose which backend to use or
try to optimise it by using static keys. The later looks quite
promising because we can share logic involved in selecting GIC backend
between architectures if both uses static keys.

This patch moves arm64 from alternative to static keys framework for
selecting GIC backend. For that we embed static key into vgic_global
and enable the key during vgic initialisation based on what has
already been exposed by the host GIC driver.

Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2016-09-22 13:21:35 +02:00
Laura Abbott ca219452c6 arm64: Correctly bounds check virt_addr_valid
virt_addr_valid is supposed to return true if and only if virt_to_page
returns a valid page structure. The current macro does math on whatever
address is given and passes that to pfn_valid to verify. vmalloc and
module addresses can happen to generate a pfn that 'happens' to be
valid. Fix this by only performing the pfn_valid check on addresses that
have the potential to be valid.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-22 10:17:22 +01:00
Thomas Gleixner 464b5847e6 Merge branch 'irq/urgent' into irq/core
Merge urgent fixes so pending patches for 4.9 can be applied.
2016-09-20 23:20:32 +02:00
Marcin Wojtas 51227bf520 arm64: dts: marvell: fix clocksource for CP110 master SPI0
I2C and SPI interfaces share common clock trees within the CP110 HW block.
It occurred that SPI0 interface has wrong clock assignment in the device
tree, which is fixed in this commit to a proper value.

Fixes: 728dacc7f4 ("arm64: dts: marvell: initial DT description of ...")
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
CC: <stable@vger.kernel.org> v4.7+
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
2016-09-20 16:55:12 +02:00
Joerg Roedel 6e0a16673c Merge branch 'for-joerg/arm-smmu/updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/smmu 2016-09-20 13:24:14 +02:00
Paul Gortmaker 0edfa83916 arm64: migrate exception table users off module.h and onto extable.h
These files were only including module.h for exception table
related functions.  We've now separated that content out into its
own file "extable.h" so now move over to that and avoid all the
extra header content in module.h that we don't really need to compile
these files.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-20 09:36:21 +01:00
Ingo Molnar b2c16e1efd Merge branch 'linus' into x86/asm, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-09-20 08:29:21 +02:00
Arnd Bergmann a119a2c4c0 ZTE arm64 defconfig updates for 4.9:
- Enable ZTE ZX family support in arm64 defconfig
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJX25FiAAoJEFBXWFqHsHzOzJ4IAKAxI7W3Ubnhdxdu8akLYm6a
 VHtnqSyr43kKCUEbg05+oTmPzXVF7YdnYmZpyy2mhA9+wpGC6vSwtSDM6Tj8KN8H
 ZGzR5Op94GPN3RnLRyGlplltMEbH4I8l6A7SsiJ5VB4Uab2x4bmBagW/vG0O+XuP
 exzGQoqlrI5N2gmiSf6P+2Y1oEM+JvClvWPdb9zkMb0B4i8kNJgh+efyNaCv7m/R
 v0s9f9AhhK3Saj2TSaJuGuZNHw9vZpDUiOuyTOvnc35bJLjy0AsWqw4BfK8NegQE
 4tgXiyVdZxOHvUtAQgw7b2Wkcxo+407zDJE1q6HxR2uudpuTHm0hyWxN62MuXm8=
 =zgWs
 -----END PGP SIGNATURE-----

Merge tag 'zte-defconfig64-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/arm64

Pull "ZTE arm64 defconfig updates for 4.9" from Shawn Guo:
 - Enable ZTE ZX family support in arm64 defconfig

* tag 'zte-defconfig64-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  arm64: defconfig: enable ZTE ZX related config
2016-09-19 22:35:21 +02:00
Arnd Bergmann 6f9a53ee23 ZTE arm64 SoC changes for 4.9:
- Add a Kconfig option for ZTE ZX SoC family support
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJX25GmAAoJEFBXWFqHsHzOIh4H/30QlDQQyiPzTeKIn0Tfriyj
 aL13JVMxCIdGGLN3U1ruZReVwlBMnr14uWsjl7lFT3+VeOSEwyXbCzwn1SKGQ7uh
 GQ91KColUy2iFpWnhRCQHPUSUlBUq4R1qR4apP8laaM/xfS7QpG6dghzYcbwnrYG
 U51SLecjN234Oca5z7B1kIlOnxSxexEZfPIP2XfT1+ju+NyyU0yjSnLlAAgYVtbW
 SNAqrHj4gaZBe7VZB5hfE1ABPVjaXP8f8lkO9ihMHjR5tqEgfgZmayWKdVpR6Ky6
 7y0UzUBIuu9WDCvvTqIEXahG3Up+/eeN6lqi4XBlnBGJee+5LBGQ8iyamh5B7CY=
 =RDGI
 -----END PGP SIGNATURE-----

Merge tag 'zte-soc64-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/arm64

Pull "ZTE arm64 SoC changes for 4.9" from Shawn Guo:
 - Add a Kconfig option for ZTE ZX SoC family support

* tag 'zte-soc64-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  arm64: add ZTE ZX SoC family
2016-09-19 22:34:26 +02:00
Arnd Bergmann 80d9cf3474 ZTE arm64 device tree changes for 4.9:
- Add initial DTS support for ZTE ZX296718 SoC and ZX296718 EVB board.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJX22SoAAoJEFBXWFqHsHzOypkIAIj88TKFW6IWuiM+mFwu2Q3X
 3sqKB11szxucCd8XYHUQ/wknZX33sDSj63mUbYN20Mb4AbA7u1KG/hR6mBIq3no7
 xnIDixq6kIMmt3dY6OEgu3qlkEQnrbopcp7bt3N1QtXNtQazt5WWStSzBwAz1Qsq
 QQMUjoOyp3sx3E48HiAmPo2R8oh231w44aKS87YU7IIa3Ld9SyNW6/t8sAAhqvWH
 1DLFNgZ968jmbb46BylPSHslMSmjrv1HR+5nZ3zNOQeDcRvLqi7+z9xqhwJUVr08
 DXh90RaZNSULHlMWL3lEBLR9KTlca2+08c4ax5YOVeAQjaf+ZUAQUPGod+IBW7M=
 =KfUg
 -----END PGP SIGNATURE-----

Merge tag 'zte-dt64-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt64

Pull "ZTE arm64 device tree changes for 4.9" from Shawn Guo:

 - Add initial DTS support for ZTE ZX296718 SoC and ZX296718 EVB board.

* tag 'zte-dt64-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  arm64: dts: Add ZTE ZX296718 SoC dts and Makefile
2016-09-19 22:32:27 +02:00
Arnd Bergmann 85f8f5938c X-gene DTS changes queued for v4.9
This change set includes:
 + DTS entry to enable SoC PMU for X-Gene v1 SoC
 + DTS entry to enable SoC PMU for X-Gene v2 SoC
 + PCIe legacy interrupt polarity fix for X-Gene
 + X-Gene SoC hwmon DTS entry
 + DTS entries for X-Gene v2 CPU clock
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJX24y0AAoJEB11UG/BVQ/ghjgQAJBb7Hh523y8fRDVHx+/WIvv
 yMVqQtEGVGE9ATaVbofpQ4InCQzRNWA+lCX35Uw01k9PXixmevPnDvhUzocIeIGD
 uAKZrQHMMUuM6NyC8doPwWa27ouT0PkB4ZorDlnzjSV5aDC/C8nFXN/0CCnUwzdv
 nvR3Y3a4207l63FXhSaL0IkE0SXocFOYAvkCtws/rJExJkzrEksTwKQV0j1yxfxb
 urF+/fH2TgrApOucvQv0POZFLoRq4ZkkEjvWYgYB9VSo++ytpp/hl2uLfASduhqT
 AvoNiooQk5iir8oFWY0WQNWOsR4qm1IJ44Q1OnjIhi6THzLSCr2NnFBFkEYagW2P
 ViA332ZwBGOTheuQAfqadqDMn9/ZKm6aM7j6FnvT77fDUSoRZGFh/27/xNSo2jKD
 4Oz19AipJuy86NNSfnnfGUewUuPgQrP1p8KovjkkhSOIaU26ftrWNT7v+k7l0ZTH
 VoHBV835PoEEPyCiRK/++p8zzp8cfQANA0wS1B4ramPyzusZYc16AQmjiUZdcMUZ
 hIhFrwahU4zP2+jqwLmAosblYGujbgoUVRuViGix4r6HOde+W3gTC5m562DmPFCi
 MW/L1a53TYslzTI9l2KP+QGL77Eb+87ZDsUEQSZUvK8rGHlo1IetLgP4cppndFq7
 C5SEu8DbprXXjPq5A4fp
 =QQcM
 -----END PGP SIGNATURE-----

Merge tag 'xgene-dts-for-v4.9' of https://github.com/AppliedMicro/xgene-next into next/dt64

Pull "X-gene DTS changes queued for v4.9" from Duc Dang:

This change set includes:
+ DTS entry to enable SoC PMU for X-Gene v1 SoC
+ DTS entry to enable SoC PMU for X-Gene v2 SoC
+ PCIe legacy interrupt polarity fix for X-Gene
+ X-Gene SoC hwmon DTS entry
+ DTS entries for X-Gene v2 CPU clock

* tag 'xgene-dts-for-v4.9' of https://github.com/AppliedMicro/xgene-next:
  arm64: dts: apm: Add DT node for APM X-Gene 2 CPU clocks
  arm64: dts: apm: Add X-Gene SoC hwmon to device tree
  arm64: dts: apm: Fix interrupt polarity for X-Gene PCIe legacy interrupts
  arm64: dts: apm: Add APM X-Gene v2 SoC PMU DTS entries
  arm64: dts: apm: Add APM X-Gene SoC PMU DTS entries
2016-09-19 22:31:14 +02:00
Arnd Bergmann 473326a8d0 mvebu dt64 for 4.9 (part 2)
- enable MSI for PCIe on Armada 7K/8K
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlfZZyIACgkQCwYYjhRyO9WV9wCgplO/RTXtSazA02kkUsDSPezd
 tVkAnREnwZSo9CzGdQnEztgOpihvgBMH
 =2st8
 -----END PGP SIGNATURE-----

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

Pull "mvebu dt64 for 4.9 (part 2)" from Gregory CLEMENT:

- enable MSI for PCIe on Armada 7K/8K

* tag 'mvebu-dt64-4.9-2' of git://git.infradead.org/linux-mvebu:
  arm64: dts: marvell: enable MSI for PCIe on Armada 7K/8K
2016-09-19 22:29:45 +02:00
Linus Torvalds 7bb91e0673 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu:
 "This fixes a potential weakness in IPsec CBC IV generation, as well as
  a number of issues that arose out of an OOM crash on ARM with CTR-mode
  AES"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: arm64/aes-ctr - fix NULL dereference in tail processing
  crypto: arm/aes-ctr - fix NULL dereference in tail processing
  crypto: skcipher - Fix blkcipher walk OOM crash
  crypto: echainiv - Replace chaining with multiplication
2016-09-19 12:58:34 -07:00
Sebastian Andrzej Siewior c23a7266e6 arm64/FP/SIMD: Convert to hotplug state machine
Install the callbacks via the state machine.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: rt@linutronix.de
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/20160906170457.32393-2-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2016-09-19 21:44:25 +02:00
Arnd Bergmann c3a66272d6 Amlogic 64-bit DT changes for v4.9, round 2
Primarily adding support for newly added drivers
 
 - USB host
 - I2C
 - SPI flash controller
 - PWM
 - mailbox, MHU
 - pinctrl: add pins for SPI, I2C, SDIO
 
 and then enabling these drivers on various boards.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJX2yJ/AAoJEFk3GJrT+8ZlbE4QAJ9mkIsZ8aL4eZxkFpawzKUl
 glKK7nSZcToipC5i4BRdO9IUJKBYFzpJ+Mh/au25AabG5gE9u7lLMTp9mdXm4dZP
 9Vf0qYU0x2alG1vyzTIOkgF7AhgJa6lU1sa56HEKnzBd3hGBYcwdvPAOISLN300K
 UxDsbpTvzLK56RyWNicRD5kv9LvkF60gwJwb8s+LZl78T4ab4w7rUGd13ratafrn
 uzWbIvLztGUWH57j484/Sh2SFuTq4AKTxxpGFUOqhyS07VP2Ypkecv+RgzFpTjtU
 3TCQpz2Wr6Jt45HnB/i7ABwT8SSKjTqL0wgyw7oKdV9hdsXxMyPo1Ysa6EO3t6ve
 lMe+QjgA3iwRdr8tZvivDZwXh0eX8GJdtq6AfHi0jvtYSfKiw1DAfi1wTaq+ZWiZ
 pGg/yV1j5gfFHMxtYt/srIsISt1HdxsLmEx3DB102KAzvrDVzNgnt+HrSzG++XxF
 U1s+9tE05WTzlBZiAhk0/HllYepyKNI5qaLm7CxXC2se+UqSfa8hJaFuVBKAvMiD
 nKC51AhrHThVopXjkNnwYyA6+5ekhpR37ySi5fVkNXA0RIQPz3HUp+v+D2lsrQYE
 SLPVoSTodVIq3rqbg1pum31dlAmzHZmPgqXc7jCoLp1EEqyRn3m+OWrfz1HBlVqP
 LlZt6rcko++0zM7UJ17K
 =ahMS
 -----END PGP SIGNATURE-----

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

Pull "Amlogic 64-bit DT changes for v4.9, round 2" from Kevin Hilman:

Primarily adding support for newly added drivers

- USB host
- I2C
- SPI flash controller
- PWM
- mailbox, MHU
- pinctrl: add pins for SPI, I2C, SDIO

and then enabling these drivers on various boards.

* tag 'amlogic-dt64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  ARM64: dts: meson-gxbb-vega-s95: Enable USB Nodes
  ARM64: dts: meson-gxbb-p20x: Enable USB Nodes
  ARM64: dts: meson-gxbb: add USB Nodes
  ARM64: dts: gxbb: add i2c bus
  ARM64: dts: meson-gxbb: add I2C nodes
  ARM64: dts: meson-gxbb: add pins for I2C
  ARM64: dts: meson-gxbb: Add SPIFC node
  ARM64: dts: meson-gxbb: add the SDIO pins
  ARM64: dts: amlogic: add spi nor pins
  ARM64: dts: meson-gxbb: use the new GXBB DWMAC glue driver
  ARM64: dts: meson-gxbb: Add Meson GXBB PWM Controller nodes
  ARM64: dts: meson-gxbb: Add Meson MHU Node
  ARM64: dts: amlogic: enable ethernet on all Tronsmart Vega S95 devices
2016-09-19 17:53:38 +02:00
Linus Torvalds 008f08d64a ARM: SoC fixes
Here are a couple of bugfixes for v4.8-rc. Most of them have
 actually been around for a while this time but for some reason
 didn't get applied early on. The shmobile regulator fix is the
 only one that isn't completely obvious.
 
 device tree changes:
 - archtimer interrupts must be level triggered (multiple platforms)
 - fix for USB and MMC clocks on STiH410
 - fix split DT repository in case of raspberry-pi 3
 - A new use of skeleton.dtsi on arm64 has crept in after that
   was removed.
 
 defconfig updates:
 - xilinx vdma has a new Kconfig symbol name
 - keystone requires CONFIG_NOP_USB_XCEIV since v4.8-rc1
 
 code fixes:
 - fix regulator quirk on shmobile
 - suspend-to-ram regression on EXYNOS
 
 maintainer updates:
 - Javier Martinez Canillas is now a reviewer for Samsung EXYNOS
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIVAwUAV9wHNGCrR//JCVInAQKPBhAA4HWz5YoE1FwatmrZ7LyLgl+SD7ezDuGC
 w/oo01kGYSq9vN8E7rTWqTW/lylTgt7adX3E6wNPIIfVg9dx9TnJ0HofH3TjHku4
 K7HeqapNqqqWh3VF8xFZO6YkKi09uhsX+j8NOAGlhd50A4OrOA1xh1NtpIakLX7z
 TYBpbjW1TB3SwNiq7CbC1PJUKzTfP49hQmf6dUdKajLZ2Wova4H0bonyo45DhanZ
 JiZyZlR9NnieVcftAP+kGFskM8q2hyZPqtoCar/mWrmerWMUG3n1MWj9LyDTVsVc
 zd7wBcX9dLOe26qGW88MUnbUBC/R2nZ+VDzMwyoYoIHlHALDcn2ldDotLDVIRp6A
 xGMejt06Q2qG8zX4SCjyq9hu2LeyBRWHkRTaoAD2tsT5SD4KNMi3GeYnq9Su+iYw
 hXrCOrua1pMDhWsU5RMGrfPXKbZSkkcvvt1MAoUn5h7xTqLQ1+PKLIUVOPnAR6Ns
 lHR86oo1kAoXDPbKZRnMbHSQ76kW+nWF+vDOJ7ozXNwZtcmXZiqfKxs/RDVecqFL
 kJMPJBPUGW5FAakarLb68f8XVsiHQr3ujofTyA77cUACqLBidbhxbfq+5NMWyck/
 zXPLk4HEGBlg9v8g17g1MxdttS+Na9pzNVfE23CuGKc147QIh1M3DeLjoIZ9gSfH
 p8cxVpe5gBs=
 =tYAb
 -----END PGP SIGNATURE-----

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

Pull ARM SoC fixes from Arnd Bergmann:
 "Here are a couple of bugfixes for v4.8-rc.

  Most of them have actually been around for a while this time but for
  some reason didn't get applied early on.  The shmobile regulator fix
  is the only one that isn't completely obvious.

  Device tree changes:
   - archtimer interrupts must be level triggered (multiple platforms)
   - fix for USB and MMC clocks on STiH410
   - fix split DT repository in case of raspberry-pi 3
   - a new use of skeleton.dtsi on arm64 has crept in after that was
     removed.

  defconfig updates:
   - xilinx vdma has a new Kconfig symbol name
   - keystone requires CONFIG_NOP_USB_XCEIV since v4.8-rc1

  Code fixes:
   - fix regulator quirk on shmobile
   - suspend-to-ram regression on EXYNOS

  Maintainer updates:
   - Javier Martinez Canillas is now a reviewer for Samsung EXYNOS"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: keystone: defconfig: Fix USB configuration
  arm64: dts: Fix broken architected timer interrupt trigger
  ARM: multi_v7_defconfig: update XILINX_VDMA
  ARM64: dts: bcm: Use a symlink to R-Pi dtsi files from arch=arm
  ARM: dts: Remove use of skeleton.dtsi from bcm283x.dtsi
  ARM: dts: STiH407-family: Provide interconnect clock for consumption in ST SDHCI
  ARM: dts: STiH410: Handle interconnect clock required by EHCI/OHCI (USB)
  ARM: shmobile: fix regulator quirk for Gen2
  ARM: EXYNOS: Clear OF_POPULATED flag from PMU node in IRQ init callback
  MAINTAINERS: Add myself as reviewer for Samsung Exynos support
2016-09-16 12:15:41 -07:00
Jeremy Linton 85023b2e13 arm64: pmu: Hoist pmu platform device name
Move the PMU name into a common header file so it may
be referenced by other users.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-16 17:11:34 +01:00
Jeremy Linton 236b9b91cd arm64: pmu: Probe default hw/cache counters
ARMv8 machines can identify the micro/arch defined counters
that are available on a machine. Add all these counters to the
default armv8 perf map. At run-time disable the counters which
are not available on the given PMU.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-16 17:11:33 +01:00
Mark Salter dbee3a74ef arm64: pmu: add fallback probe table
In preparation for ACPI support, add a pmu_probe_info table to
the arm_pmu_device_probe() call. This table gets used when
probing in the absence of a devicetree node for PMU.

Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-16 17:11:33 +01:00
Robin Murphy fade1ec055 iommu/dma: Avoid PCI host bridge windows
With our DMA ops enabled for PCI devices, we should avoid allocating
IOVAs which a host bridge might misinterpret as peer-to-peer DMA and
lead to faults, corruption or other badness. To be safe, punch out holes
for all of the relevant host bridge's windows when initialising a DMA
domain for a PCI device.

CC: Marek Szyprowski <m.szyprowski@samsung.com>
CC: Inki Dae <inki.dae@samsung.com>
Reported-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-16 09:34:22 +01:00
Jun Nie 12496aea08 arm64: add ZTE ZX SoC family
This patch introduces ARCH_ZX to add the support of the ZTE ZX SoC
family for the arm64 architecture.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-09-16 14:30:20 +08:00
Jun Nie ba1f4d8170 arm64: defconfig: enable ZTE ZX related config
This patch enables the configuration for the ZTE ZX family.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-09-16 14:28:39 +08:00
Jun Nie 2e673c7dc3 arm64: dts: Add ZTE ZX296718 SoC dts and Makefile
Add device tree support for ZX296718 SoC and evaluation board based
on it.  Also document new values.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-09-16 10:47:05 +08:00
Al Viro 4855bd255f arm64: don't zero in __copy_from_user{,_inatomic}
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2016-09-15 19:51:56 -04:00
Martin Blumenstingl c763eb82a0 ARM64: dts: meson-gxbb-vega-s95: Enable USB Nodes
Enable both gxbb USB controller and add a 5V regulator for the OTG port
VBUS

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2016-09-15 15:02:59 -07:00
Jerome Brunet 8735053d79 ARM64: dts: meson-gxbb-p20x: Enable USB Nodes
Enable both gxbb USB controller and add a 5V regulator for the OTG port
VBUS

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
[khilman: rename vbus node to match P200 schematics]
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2016-09-15 15:02:25 -07:00
hotran 39936ae1ab arm64: dts: apm: Add DT node for APM X-Gene 2 CPU clocks
Add DT nodes to enable APM X-Gene 2 CPU clocks.

[dhdang: changelog]
Signed-off-by: Hoan Tran <hotran@apm.com>
Signed-off-by: Duc Dang <dhdang@apm.com>
2016-09-15 11:19:39 -07:00
hotran c6d62be5ea arm64: dts: apm: Add X-Gene SoC hwmon to device tree
This patch adds DT node to enable hwmon driver for APM X-Gene SoC.

Signed-off-by: Hoan Tran <hotran@apm.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
2016-09-15 11:13:35 -07:00
Duc Dang 7c7b08bfbd arm64: dts: apm: Fix interrupt polarity for X-Gene PCIe legacy interrupts
On X-Gene v1 and X-Gene v2, PCIe legacy interrupt
should be configured as level-active high.

Signed-off-by: Duc Dang <dhdang@apm.com>
2016-09-15 11:13:34 -07:00
Duc Dang d65b5d5a5c arm64: dts: apm: Add APM X-Gene v2 SoC PMU DTS entries
This patch adds APM X-Gene v2 SoC PMU DTS entries.

Signed-off-by: Duc Dang <dhdang@apm.com>
Cc: Tai Nguyen <ttnguyen@apm.com>
2016-09-15 11:13:34 -07:00
Tai Nguyen 0317cd525d arm64: dts: apm: Add APM X-Gene SoC PMU DTS entries
This patch adds APM X-Gene SoC PMU DTS entries.

Signed-off-by: Tai Nguyen <ttnguyen@apm.com>
2016-09-15 11:13:32 -07:00
David A. Long 3e593f6675 arm64: Improve kprobes test for atomic sequence
Kprobes searches backwards a finite number of instructions to determine if
there is an attempt to probe a load/store exclusive sequence. It stops when
it hits the maximum number of instructions or a load or store exclusive.
However this means it can run up past the beginning of the function and
start looking at literal constants. This has been shown to cause a false
positive and blocks insertion of the probe. To fix this, further limit the
backwards search to stop if it hits a symbol address from kallsyms. The
presumption is that this is the entry point to this code (particularly for
the common case of placing probes at the beginning of functions).

This also improves efficiency by not searching code that is not part of the
function. There may be some possibility that the label might not denote the
entry path to the probed instruction but the likelihood seems low and this
is just another example of how the kprobes user really needs to be
careful about what they are doing.

Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: David A. Long <dave.long@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-15 08:33:46 +01:00
Ingo Molnar d4b80afbba Merge branch 'linus' into x86/asm, to pick up recent fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-09-15 08:24:53 +02:00
Arnd Bergmann dc8c76dd82 Allwinner ARM64 Kconfig changes
Select the pinctrl driver in kconfig
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJX1cn/AAoJEBx+YmzsjxAg69QP/AunSj46Q/3JrDwGoGut5oQy
 aOKgZzVNry0DtDkY/F9NSBWuZoGM4jtCM79fpW+9dxzc8z0TcDUmA+FUjAzx7SyX
 ua9k6uvDlGta85jpb2UZApuc/1rXScXyGS6WVVYoV6P9AD7KqZVVBc7YxwNiPOw2
 +ZBO4veplhtFRvv2HS+V/gsqgHyNTlwYMz9U5bI82aPbVnew/N9y+TblZShIv8Sa
 9Lm+maNNMKXL7RQhbYPCVCE/d/Ym+xxTck+jR38VYnKruU35KaP/Wc2EeKt1UrGl
 NmoX71kTPD2DtkQ2vT6Jol8UrBe5GZ/X/ZKu1A8wkyXAnw6PAZ16hxL8+Z5tUHBg
 1n3gqHQbpnhQ2AFeyC0+D7xc+PruCH4cYBw/bCZxB0IFMkfYxA+75hVhAgQtnQeP
 otWPyfvkbCqBgMD0cUUKm9i1TjcFuOrXoKmGn+GdP+A+zER/tSbkvJEN5XBPd9nK
 w/CYJPEw+1dMbNzEqx1mgy8xbdcuDEQniZE5+ysTGm/erTbMGB6nL6csST+YqabV
 DaXIup3OPQBTplcacDi2b8O9izU8Yu5gq27J/MowtETCF10KDQPAJogs/ukdv3kW
 WSJmclTVUxNxrE5yQVW8jiJtmBXVbqRsR9QSR79fhjYbwFofxvvIyaCW3Xjuhr9X
 xikbiJO0gyhYf2toHeXD
 =Cik5
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-config64-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into next/arm64

Pull "Allwinner ARM64 Kconfig changes" from Maxime Ripard:

Select the pinctrl driver in kconfig

* tag 'sunxi-config64-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux:
  arm64: sunxi: Kconfig: add essential pinctrl driver
2016-09-15 00:43:43 +02:00
Arnd Bergmann 45624a6eb1 This pull request contains Broadcom ARM64-based SoC changes for 4.9, please pull
the following:
 
 - collective effort from Florian, Doug and Markus to add the ARCH_BRCMSTB Kconfig
   symbol to the ARM64 kernel build, which is purposedly the same as the ARM/Linux
   one in order not to update any driver dependencies
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXz3GCAAoJEIfQlpxEBwcExK8QAMSWny7XPDQGFOZm7w8T90Ud
 Cx2FaxNGNFybbuXT8Z6VinJU0YgCoGBnzTgI0hYj8JOX3iP5DQuh39Ar0ul7WswZ
 6KrQ/aP9a6b82jGO+0NoP0R83IJgjNRnK+sFt63+dVxJqIpH4m5d6nnCnFnJrsQD
 Clii0Ij2JEHNEjcEaoa50s4bvWj1cMmiiFaInfbKgM3AnsTPXX2PJJvSqxTuwnKn
 gMSp8FWXdkNm4u651VA6loIJETRZ5T4rhrDw1mFcfpVps6ews/Ga+XCx78z6gdYA
 p2aRZIp6xXsi1m5zCGLRq0WiRDMyjaMXljgNJ5+9gPgKKdxxyMr+HEVx0ANJqLW6
 HOYpxYX7+iDDZqgz1xf0LfYVbEFiohdFNPER/DKf4kTuc7QXD1AMfdlIcH3ndXzY
 BPLAeZkWWCjThRDEiOIEv4bx8OzwpcxqX4eRuQpXZFLxV2MkF9p9apepBJQxYubF
 n22AIBKDW1hYSKPhWoM4fVZQ5iK/oNAah48ignBTwawuCCZTwucQxkO0FV9G4Qpz
 bLJbXbEza7r5iQuPH3sRDLPCDsDmvBUv7M8WB4d+0ky/mHzjQ6JblK0LZ1kwMURt
 P4uPK8EhzyuyukTBwbr/LNhIie8i1rqBuIie4weGl1jUjiZ8NIn4fotkDn0c1xqq
 1VjMTrJfApiUiX2p4Fwp
 =AjHP
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-4.9/soc-arm64' of http://github.com/Broadcom/stblinux into next/arm64

Pull "Broadcom soc-arm64 changes for 4.9" from Florian Fainelli:

This pull request contains Broadcom ARM64-based SoC changes for 4.9, please pull
the following:

- collective effort from Florian, Doug and Markus to add the ARCH_BRCMSTB Kconfig
  symbol to the ARM64 kernel build, which is purposedly the same as the ARM/Linux
  one in order not to update any driver dependencies

* tag 'arm-soc/for-4.9/soc-arm64' of http://github.com/Broadcom/stblinux:
  arm64: Add Broadcom Set Top Box Kconfig entry point
2016-09-15 00:10:22 +02:00
Arnd Bergmann c975bd7ef5 Renesas ARM64 Based SoC Defconfig Updates for v4.9
* Enable HSUSB and SDHI
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXz8NJAAoJENfPZGlqN0++m3AQAI4IOiRcVRi4R+kypMqcnkyI
 dbQVd9CJl1H9ob4tpUL0hMvTSZdNzMDn4knHb5iUaqbeY865qLFZGqJ1z8+XYZ2a
 70kXHV0y2MLTZ/VPEsGRQLEjbyhq3hl5qbF5GXK1K7P63AMnXwnE6h99+ayWopQl
 lcVJbNkYFsn/F238zDUMFpJl3PIhDr4G3z/lqiFz1WydlK6APwHAfyHIsNTrX/+7
 ytzRLNtCLvpDSiwyOJ8ty5NMRBsBMUsq/REy0hsRabfP7ws9tC/Rpj9O5UGKueEQ
 wMkbTLYAwq8UrDGttrAY0lNNkzNVeBm/AO7VDDvfEl8BZKcxpGjF5t65miq4QWM8
 P2BBTIUHhyrbA98SwWjKCeZzqmisvQeCfKyRNJzgJViW3L0YW74ixmt0Q55wToqz
 CIcbnzLzfKfzVZpXHy0CvIIf+9reKyvQ/yLca6AAx14ZsMCKYP+EtwlG1pj1SMFE
 NB4tQKMWtK50TplqlTsmuXbSUu2QpbXyFE8vc/nCYLNHh4QfD/VaG0AmhThNg7Ix
 DFkdUM0rTz3Y7JKeGHWv6yzxuYQp39a+5Il2MaoxCq/W+Nx6u5bUkkwvei0RzvgC
 8EkPLu44hGcB+aFcX1tz0wE0X5ujRXvUCR2KcZlGrbNnvsvZcz5we7+NPBPVSFCj
 OiiHxPMYrOGuboR8dCcD
 =5O7N
 -----END PGP SIGNATURE-----

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

Pull "Renesas ARM64 Based SoC Defconfig Updates for v4.9" from Simon Horman:

* Enable HSUSB and SDHI

* tag 'renesas-arm64-defconfig-for-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  arm64: defconfig: Enable SDHI and GPIO_REGULATOR
  arm64: defconfig: Add Renesas R-Car HSUSB driver support as module
2016-09-15 00:08:55 +02:00
Leo Yan 57e109cb97 arm64: defconfig: enable common modules for power management
Enable common modules for power management; one is to enable
CPUFREQ_DT driver; the driver is used by many platforms by passing OPP
table from device tree.

Also enables thermal related drivers. Firstly we need enable
configuration CPU_THERMAL for CPU cooling device driver, this will bind
thermal zone with CPU cooling device; and enable 'power allocator'
thermal governor.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2016-09-15 00:07:46 +02:00
Arnd Bergmann dafa5d3952 mvebu defconfig64 for 4.9 (part 1)
- add PCIe driver for Aardvark for Armada 3700
 - enable xhci-platform for A7K/A8K
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlfMQewACgkQCwYYjhRyO9WrKgCeJWuHOFUlMYoZqEYKkdA5aJ9G
 iPsAoIFQivT7yCn9p7rJKzKt2NI4skoy
 =jIwM
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-defconfig64-4.9-1' of git://git.infradead.org/linux-mvebu into next/arm64

Pull "mvebu defconfig64 for 4.9 (part 1)" from Gregory CLEMENT:

- add PCIe driver for Aardvark for Armada 3700
- enable xhci-platform for A7K/A8K

* tag 'mvebu-defconfig64-4.9-1' of git://git.infradead.org/linux-mvebu:
  arm64: configs: enable PCIe driver for Aardvark
  arm64: defconfig: enable xhci-platform
2016-09-15 00:05:59 +02:00
Arnd Bergmann 23d4635ec9 Qualcomm ARM64 Based defconfig Updates for v4.9
* Enable defconfig options for QDF2432
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXycsjAAoJEFKiBbHx2RXVDBIQAKzDDaOiHHSMoGfQ2kFy64Q/
 1zDa0Ewnr5GW64N2roD6D1Z6eSnMY+8N+wtf6AUgBOmw8u1whwrYZ15BgIkuIhhU
 qOZHhes1FqE4hcAv8lOrJ9L+l1O48x6PJa/pdiZzIA3aGoVkROoJb2DVsLt/bneU
 Mmfx3ormi3srScUt1FhUlNFfDyQcSM/Q8B1b0oFcxE2SgZXIZZbr1GpZxYjf0Q3F
 XId7sjqwnSGYWhkGVjXIyewMbZS3+Jim87PO0lHgv651hyz6XHz2AE8Ceqb21ZHz
 jYZoGqb1l2rTSGoP6kK6ZLxBceSkwFS5ve6ldV6Pm4OpmRCyiS0vEUQD3iE6tHVG
 VW8xI+EnHbKunCa+rSSilefOjm359nj76K1LVANTipksCSwptDgh61fRqCnU8XGg
 OiFY/aoYq+FyZqnh7bNBmcXFwHvdMga/Knx8zEi1qIocMMU5r5BqVp2pXKJzxujj
 2rU1xk19YHvx1x7RC/cGUBmZb58uAU9UXinZ2k/BzDCYIK5X0NS/Qjm6P3hK0tDQ
 VaADHoUz83LRC/U/OrpDmOP9ErJBIu1y1fHQ48qYYW5e8uA7rMsJx9KEjZ4qjXM/
 wz8gzjETv9+UYD1szbY2hV4ZsUMSdvxjo+T7Z2pGIuGLKZ1ZpKHykaMDAuOHz7cY
 frtOPjV5O7MEzGCYa5bv
 =Y4cO
 -----END PGP SIGNATURE-----

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

Pull "Qualcomm ARM64 Based defconfig Updates for v4.9" from Andy Gross:

* Enable defconfig options for QDF2432

* tag 'qcom-arm64-defconfig-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux:
  arm64: defconfig: Enable QDF2432 config options
2016-09-15 00:04:53 +02:00
Kevin Hilman 699189c848 arm64: defconfig: enable meson I2C
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2016-09-15 00:03:46 +02:00
Kevin Hilman 5a9a9cf0a1 arm64: defconfig: enable meson SPI as module
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2016-09-15 00:03:41 +02:00
Kevin Hilman 19b9869192 arm64: defconfig: enable meson WDT as modules
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2016-09-15 00:03:31 +02:00
Kevin Hilman 5012a09b9b arm64: defconfig: enable HW random as module
drivers/char/hw_random/Kconfig has 'default m', so
simply removing this entry from the defconfig will
enable building HW random drivers as modules.

Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2016-09-15 00:03:21 +02:00
Arnd Bergmann a458ae7321 ARM64: hisilicon: defconfig updates for 4.9
- Enable hisilicon SAS and XGE for hip05 and hip06
 - Enable drm, powerkey, bluetooth and adv7511/adv7533 for hikey
 - Add PINCTRL to HISI platform
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXyVBpAAoJEAvIV27ZiWZcqWcQALMdZkeDs5iIwihsrRMnVmj9
 a/XA/xVFsZj8lys6LIhGWZ7L4BDZxLvF0065EeyVIDphhk51D5rgyYy2rP5SlDnj
 kZJxB/RoycDrp95rOZGHaC1prN23mmk6gGT3BK6CW6OJKEZI+UNu+a0P2EfntGR2
 vpGl4MeoI0GT2ZvpN0c2uzURHGof687mAgHbrNKDmKYKkHgV9hA2D2oFjWdYxcYB
 fXh7a7d5vRpTrYIKo5R2T2XUDIUQuohgIWDdyDTUsFTPqEXt9Dict5R6k6dXTiCR
 5SPKnZ8AgHU+wWTtB+A+XL5h+jbyftuymuaQY/iEESa/0e7xCWIRyk3wRYUKmNch
 Q5w4tqVzqeZjALKE1Lshaw78+SMf/vKSp09LSIx60hRNpuEXm9H7iALxETsgl8Av
 ofRD85K0HW18dhVTQoDB3hplqi485lSkkuigTX9R3TkE6iY2XitDJeseSxH/wHml
 0alpDMXqv4WNvrLfunZdVqOoLEbuFoYhwhq5EHv94LZoyIacVsd5dx7bg6P3o7sj
 3xRXyU3O7fSLc1Qr56+88i99PmbIX68B77V3xrwAJYW8kBGVdNci0ccLuVmlaSdc
 B3FmLk+MCd2gofNzyYG8lQeXCRM+ElnhAZ+QC0vQhvUETdGXSpA+ZJcph/adaq/j
 8im37ibx4oByG3TCk7w3
 =y80h
 -----END PGP SIGNATURE-----

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

Pull "ARM64: hisilicon: defconfig updates for 4.9" from Wei Xu:

- Enable hisilicon SAS and XGE for hip05 and hip06
- Enable drm, powerkey, bluetooth and adv7511/adv7533 for hikey
- Add PINCTRL to HISI platform

* tag 'hisi-defconfig-for-4.9' of git://github.com/hisilicon/linux-hisi:
  Kconfig: ARCH_HISI: Add PINCTRL to HISI platform
  arm64: defconfig: enable bluetooth supports as modules
  arm64: defconfig: enable CONFIG_INPUT_HISI_POWERKEY for HiKey
  arm64: defconfig: Enable HiSilicon kirin drm, adv7533 for HiKey
  arm64: defconfig: Enable Hisi SAS and HNS
2016-09-15 00:02:16 +02:00
Arnd Bergmann 37179033fc Merge branch 'dt/irq-fix' into next/dt64
* dt/irq-fix:
  arm64: dts: Fix broken architected timer interrupt trigger

This resolves a non-obvious conflict between a bugfix from
v4.8 and a cleanup for the exynos7 platform.
2016-09-14 22:48:29 +02:00
Arnd Bergmann d20ced23c7 Merge branch 'dt/irq-fix' into fixes
* dt/irq-fix:
  arm64: dts: Fix broken architected timer interrupt trigger
2016-09-14 22:47:36 +02:00
Marc Zyngier f2a89d3b2b arm64: dts: Fix broken architected timer interrupt trigger
The ARM architected timer specification mandates that the interrupt
associated with each timer is level triggered (which corresponds to
the "counter >= comparator" condition).

A number of DTs are being remarkably creative, declaring the interrupt
to be edge triggered. A quick look at the TRM for the corresponding ARM
CPUs clearly shows that this is wrong, and I've corrected those.
For non-ARM designs (and in the absence of a publicly available TRM),
I've made them active low as well, which can't be completely wrong
as the GIC cannot disinguish between level low and level high.

The respective maintainers are of course welcome to prove me wrong.

While I was at it, I took the liberty to fix a couple of related issue,
such as some spurious affinity bits on ThunderX, and their complete
absence on ls1043a (both of which seem to be related to copy-pasting
from other DTs).

Acked-by: Duc Dang <dhdang@apm.com>
Acked-by: Carlo Caione <carlo@endlessm.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2016-09-14 22:47:22 +02:00
Martin Blumenstingl 566603e5e6 ARM64: dts: meson-gxbb: add USB Nodes
Add the nodes for the dwc2 USB controller and the related USB PHYs.
Currently we force usb0 to host mode because OTG is currently not
working in our PHY driver.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2016-09-14 10:48:41 -07:00
Jerome Brunet cb700f4935 ARM64: dts: gxbb: add i2c bus
Add nodes for i2c bus on gxbb based platforms.
On the OdroidC2 (I2C A) and P200 (I2C B), the pull-up resistor are
present directly on the board. This indicates that these pins are
dedicated to i2c.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2016-09-14 10:48:36 -07:00
Neil Armstrong 1befc626c1 ARM64: dts: meson-gxbb: add I2C nodes
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2016-09-14 10:48:32 -07:00
Jerome Brunet 8c04d7950a ARM64: dts: meson-gxbb: add pins for I2C
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2016-09-14 10:48:27 -07:00
Neil Armstrong e9c9b651a3 ARM64: dts: meson-gxbb: Add SPIFC node
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2016-09-14 10:48:21 -07:00
Neil Armstrong 2d7ed3df44 ARM64: dts: meson-gxbb: add the SDIO pins
This is used to configure the pins of the sd_emmc_a controller to
which an SDIO module is connected (when available).

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2016-09-14 10:48:10 -07:00
Jerome Brunet c74b5ecfe3 ARM64: dts: amlogic: add spi nor pins
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2016-09-14 10:48:05 -07:00
Martin Blumenstingl 42bede64c8 ARM64: dts: meson-gxbb: use the new GXBB DWMAC glue driver
The Amlogic reference driver uses the "mc_val" devicetree property to
configure the PRG_ETHERNET_ADDR0 register. Unfortunately it uses magic
values for this configuration.
According to the datasheet the PRG_ETHERNET_ADDR0 register is at address
0xc8834108. However, the reference driver uses 0xc8834540 instead.
According to my tests, the value from the reference driver is correct.

No changes are required to the board dts files because the only
required configuration option is the phy-mode, which had to be
configured correctly before as well.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2016-09-14 10:47:52 -07:00
Neil Armstrong 8f14a89305 ARM64: dts: meson-gxbb: Add Meson GXBB PWM Controller nodes
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Tested-by: Jérôme Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2016-09-14 10:47:47 -07:00
Neil Armstrong 7b5682c64b ARM64: dts: meson-gxbb: Add Meson MHU Node
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2016-09-14 10:47:42 -07:00
Martin Blumenstingl f59063aee2 ARM64: dts: amlogic: enable ethernet on all Tronsmart Vega S95 devices
All of these have a Realtek Gbit RGMII PHY.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2016-09-14 10:47:32 -07:00
Arnd Bergmann 78dc6663a8 arm64: Xilinx ZynqMP dt patches for v4.9
- Fix gic ranges property
 - Use 64bit size cells format
 - Add PCIe node
 - Correct pmu and watchdog nodes
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAle24TYACgkQykllyylKDCHRQQCbBd1XdhPR6lxk4AxPLbbfEvaQ
 rHQAnjM3n2yuyc0Mlqsva7/VaWHtSsZ5
 =eOIL
 -----END PGP SIGNATURE-----

Merge tag 'zynqmp-dt-for-4.9' of https://github.com/Xilinx/linux-xlnx into next/dt64

Pull "arm64: Xilinx ZynqMP dt patches for v4.9" from Michal Simek:

- Fix gic ranges property
- Use 64bit size cells format
- Add PCIe node
- Correct pmu and watchdog nodes

* tag 'zynqmp-dt-for-4.9' of https://github.com/Xilinx/linux-xlnx:
  ARM64: zynqmp: Correct the watchdog timer interrupt number
  ARM64: zynqmp: Add missing interrupt-parent to PMU node
  ARM64: zynqmp: Add PCIe node
  ARM64: zynqmp: Use 64bit size cell format
  ARM64: zynqmp: Align gic ranges for 64k in device tree
2016-09-14 17:44:12 +02:00
Arnd Bergmann da9070b35c Renesas ARM64 Based SoC DT Updates for v4.9
Clean up:
 * Remove unnecessary cap-mmc-highspeed property from SDHI nodes on r8a7795 SoC
 * Add SoC-specific compatible property to audio-dmac nodes on r8a7795 SoC
 
 New Board:
 * Add r8a7794/h3ulcb board
 
 Enablement:
 * Add PFC and GPIO to r8a7796 SoC
 * Enable DU and USB 2.0 on r8a7795/salvator-x board
 * Add VTP, FCPV, FCPF and FDP1 to r8a7795 SoC
 * Set maximum frequency for SDHI clocks on r8a7795 SoC
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJX0RWZAAoJENfPZGlqN0++Ke4P/3e/vy1wOAIgqWTbsc3mlmXw
 3gOgJ5EZ+jkNTMiMGFPjmwTr3W+TABFtIDgERrhY/PC15eYLoPFmmTktDWeycLvF
 Rk+AkXJ8ijXpHB7J5HGT2ZJB3pWsPSoQ5iEJI53BJ084sfDJ38hn1Ew41v442j91
 W5FbWsjoKbouPnPsYPDRrOclEUvUoSZPY1ouY9ywfW1zijCvjiwlZ2xRa/df5mnv
 w8VGqhP1bD10LTfcyVGZ0YcHH8noSazoNrz8ZUct9ECwjwPJOHelj+3fKAkuEzPa
 R4GTNRhnlVR560Uk7yG9LdoB39JqE/D8rUOaLkzwFBcOuO8g+vTOV6E4wbX/0LWH
 J5YuMH78+wD6wNj7ON4saiT5SjkGCPkd12bTXrBA14gxCCYQTp/d9r4sGaykRDYO
 5NX4IRg/hbilgDMQxXLZkA5s9QRjFXe/4EIol8hF4zHU2RRKaMjMxpWOfLjKBXRQ
 wLrzitWtaMrrL0SLlUmKQ17TpfursVmaDU0S4F8VtPXfe8EdU52WWuN9u+e1vI9R
 lYwek8kq89aJqI06/N+gINCCWHKv2mbYJwcOIFIghvHub8ZBHzeoCx1SVN0W143P
 Cg6zJUgjvM0+OGTK3Q8IcVq/S60e/hN+ASJaHS/HJy+bQbSj/SkqAeyP1WomjQwp
 kX6RwdwpYxKATWr25xCa
 =Vd0J
 -----END PGP SIGNATURE-----

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

Pull "Renesas ARM64 Based SoC DT Updates for v4.9" from Simon Horman:

Clean up:
* Remove unnecessary cap-mmc-highspeed property from SDHI nodes on r8a7795 SoC
* Add SoC-specific compatible property to audio-dmac nodes on r8a7795 SoC

New Board:
* Add r8a7794/h3ulcb board

Enablement:
* Add PFC and GPIO to r8a7796 SoC
* Enable DU and USB 2.0 on r8a7795/salvator-x board
* Add VTP, FCPV, FCPF and FDP1 to r8a7795 SoC
* Set maximum frequency for SDHI clocks on r8a7795 SoC

* tag 'renesas-arm64-dt-for-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (43 commits)
  arm64: dts: r8a7796: Add GPIO device nodes
  arm64: dts: r8a7796: salvator-x: add serial console pins
  arm64: dts: r8a7796: Add pinctrl device node
  arm64: dts: r8a7795: salvator-x: Configure pins for the DU RGB output
  arm64: dts: h3ulcb: enable GPIO leds
  arm64: dts: h3ulcb: Sound SSI support
  arm64: dts: h3ulcb: enable SDHI0
  arm64: dts: h3ulcb: enable GPIO keys
  arm64: dts: r8a7795: remove unnecessary cap-mmc-highspeed property
  arm64: dts: h3ulcb: enable USB2.0 Host channel 1
  arm64: dts: h3ulcb: enable USB2 PHY of channel 1
  arm64: dts: h3ulcb: enable WDT
  arm64: dts: h3ulcb: enable EXTALR clk
  arm64: dts: h3ulcb: enable I2C2
  arm64: dts: h3ulcb: enable EthernetAVB
  arm64: dts: h3ulcb: enable SCIF clk and pins
  arm64: dts: h3ulcb: initial device tree
  arm64: dts: h3ulcb: add H3ULCB board DT bindings
  arm64: dts: r8a7795: Add SoC-specific compatible property to audio-dmac nodes
  arm64: dts: r8a7795: renesas: salvator-x: Enable DU
  ...
2016-09-14 17:42:12 +02:00
Arnd Bergmann e08644b0c7 Amlogic 64-bit DT changes for v4.9
- add watchdog, reset, IR remote, PWM
 - add secure monitor and eFuse
 - add always-on (AO) domain clock and reset
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJXyhPZAAoJEFk3GJrT+8ZlIQkP/1Xyb2A483CPDL4JZP/BHDjd
 DXLpjTeiL7JVtfCdjRNFL1mOMEwtbhjuwklRsBaHIGGHg8TK26RJAdxzmRPtZ2fd
 U8wLrSRCdesF6bwI4j8zomm2tAD3a0Ujik21AROKZj1pWh/n9k0m+CrPgwBCZoA9
 yM1/usSP0Gm0kLWgH1mwVjGJOgf7Xi6TGHBsNyy1zl+Jj4uTf+aB6auHygemznvi
 cANjibsOFY+KvcE19/y/yGJL7nFeln9C6TE1igDh2m/e+FR0+Ng3p1qtZxb2jsnv
 TOFROdTyEjPN9tmJQxoJfjpY2PUXE1rKezGnJBVBtpCijvSVl39goDvobUajFJ67
 g5O483kwsjEqx7uOvl4WU/kFqw2HunpILSR5QuJJ15n9kxVN+tNeAjIxo/dG7wgD
 8Byeu5FGa2va6YNEkQF7UGagKIgIloG1N59OkFwLWwMem/xtd1nuiSoLlyuw82/C
 EXu9N2I9UbOA3s6sEEJBazvtk+ueHaENwIFLo5yPDOLCKmt8/ii4dV4QWzn9R7Zy
 d2NZpNjPj/eBRDC6O+MgJVAEuikjvfn9tUcuVQGjJ+pq3mtpAxzdclVHMYlKclON
 /ykQqRZPE33CDRBdp5TCbJp/UMyXyjhdhcaAaY7yYPpjkEjFEaLWTMH7wua04754
 K57RdpXb1kQG7qGAy9xF
 =UZHB
 -----END PGP SIGNATURE-----

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

Pull "Amlogic 64-bit DT changes for v4.9" from Kevin Hilman:

- add watchdog, reset, IR remote, PWM
- add secure monitor and eFuse
- add always-on (AO) domain clock and reset

* tag 'amlogic-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  ARM64: dts: amlogic: gxbb: Enable NVMEM
  documentation: Add nvmem bindings documentation
  ARM64: dts: amlogic: gxbb: Enable secure monitor
  documentation: Add secure monitor bindings documentation
  ARM64: dts: meson-gxbb: Add PWM pinctrl nodes
  ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards
  ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder
  dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  ARM64: dts: amlogic: add the input pin for the IR remote
  ARM64: dts: meson-gxbb: Add GXBB AO Clock and Reset node
  clk: meson: Fix invalid use of sizeof in gxbb_aoclkc_probe()
  clk: meson: Add GXBB AO Clock and Reset controller driver
  dt-bindings: clock: reset: Add GXBB AO Clock and Reset Bindings
  ARM64: DTS: meson-gxbb: switch ethernet to real clock
  ARM64: dts: amlogic: meson-gxbb: Add watchdog node
2016-09-14 17:34:35 +02:00
Arnd Bergmann 2e1762c30f - add HDMI related nodes to mt8173
- enable the HDMI output on mt8173-evb
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJX1ssKAAoJELQ5Ylss8dND95sQAJgirPzd8k4VSQ8V6YYf9Ulr
 B3C/hy7gSZwwUlJ5kTh7Dp6IGqZqSdPcsj2kA6UYkJVRJHJ2Ji3kAqxEJGIZVBZL
 0XowoPnOztFaW0TrHeoDHBH8Ly8gT71VS9YRNqvHWzLR6XBj4qBP4CJzbvoeHriw
 9IiXq0MZ3/ii8RQ8pMSQFCE3kBfl9bL2YXIlnCC4jOA5892/kqETkLT1THyUDSTf
 PIAPYa1iIp/8GqM3BiJtji2bSc7aYEpRKiEtAziv5JAb4Ltbq75u+9YOOH8CU5BR
 maB/freg4UCLNl6jOiFxsBVPpdoUxHftcus67Q454ZKznKCgM3KDt/achNcV3BTU
 6Wj9oXGFVU/luKGVfYpyd2qD/7+ajmGlh0PRrag5AZ9+A/2a0LYvrYqHfedGwQU/
 qEQwRKxo6pphUxoWnXrx29A+H+V2w2coXI5FRa7JBpWkUR8UNyxuR+la2f5hWsOq
 N3mVc7idtoEvKGpdEd8NQ41Vj0GYfs9RxkARbwdLl+OI7v4SDEuB4bBaVh8WRrCR
 BCyy7LukSBMiivrCWCBScUa7i8Lo2o3tB7vq4cEr2emnX74LGFKr/TSFsvK8xS5I
 QNkgdWIERir0dTyNWjWAqRq+WWMINgQZizbSvJ05L2nqZlxN2r9UeY6um9JlQKD8
 LwCfHWMB9jNg7o3+XXyc
 =cx5v
 -----END PGP SIGNATURE-----

Merge tag 'v4.8-next-dts64' of https://github.com/mbgg/linux-mediatek into next/dt64

Pull "ARM: mediatek: dts64 updates for v4.9" from Matthias Brugger:

- add HDMI related nodes to mt8173
- enable the HDMI output on mt8173-evb

* tag 'v4.8-next-dts64' of https://github.com/mbgg/linux-mediatek:
  arm64: dts: mt8173-evb: enable HDMI output
  arm64: dts: mt8173: Add HDMI related nodes
2016-09-14 17:31:58 +02:00
Arnd Bergmann 3402a63d8d i.MX arm64 device tree changes for 4.9:
- Add property dma-coherent for ls2080a PCI device to save software
    cache maintenance.
  - Update serial aliases and use stdout-path to sepecify console for
    ls2080a and ls1043a boards.
  - Add DDR memory controller device node for ls2080a and ls1043a SoCs.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJX1lq1AAoJEFBXWFqHsHzOxA0H/3kkDhBMthlIkFk9BIEytFta
 O1U2f6pjjQg+YJIrhZLronqlp3o/cnkhEe16un/cBWk2mBSMbrt9/Mg5CJeUhz/I
 AcNAbwwoY0qRgYSgbEoFpZu6AKe8rjrKapPoOGgAWSVBBmPhM448l56PfVz2+DMT
 PgTqEkl+flH3ed7DhdL7NLhyYZQ5OanwjAk8K53tDIHSt8OP5ttxbXDNZxv0kUpI
 WLyqJkKpLyJm46H4tSjar5XtRSPf12+lz9sLOMdodEodxdofjIFiXHlNDEIwG0Xo
 NRYO4wAAWy+4D8VehAkCc64ZUOk5qBbpGZVWTNHjvanvQ1WLON7uroh3xAqZAsE=
 =cOOP
 -----END PGP SIGNATURE-----

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

Pull "i.MX arm64 device tree changes for 4.9" from Shawn Guo:
 - Add property dma-coherent for ls2080a PCI device to save software
   cache maintenance.
 - Update serial aliases and use stdout-path to sepecify console for
   ls2080a and ls1043a boards.
 - Add DDR memory controller device node for ls2080a and ls1043a SoCs.

* tag 'imx-dt64-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  arm64: dts: ls2080a: Add 'dma-coherent' for ls2080a PCI nodes
  arm64: dts: add stdout-path to chosen node for ls2080a/ls1043a boards
  arm64: dts: updates serial aliases for ls1043a rdb and qds boards
  arm64: dts: Add DDR memory controller for Layerscape SoCs
2016-09-14 17:28:21 +02:00
Arnd Bergmann 736ad004f8 arm64: tegra: Device tree changes for v4.9-rc1
Add a couple of devices (AGIC, ADMA) on Tegra210 and enable them on
 Smaug. Also enable DPAUX on Smaug to allow the I2C bus that shares pads
 with the DPAUX to be used to access various audio devices. Furthermore,
 enable the XUSB controller on Smaug for USB 3.0 support.
 
 Finally, select PM_GENERIC_DOMAINS for 64-bit Tegra devices to make sure
 devices are probed only after their power partitions have been enabled.
 -----BEGIN PGP SIGNATURE-----
 
 iQIwBAABCAAaBQJX0tItExx0cmVkaW5nQG52aWRpYS5jb20ACgkQ3SOs138+s6Em
 MRAAk1aMxkF0C3As4MDVK9F0fZpSgC6bUJE4d4HXEp6wklIgM8FPC4zPiBEGrkC/
 hGeDjCPNdyloE/Uv2FYIQMOBlQRSHYvFR928syTgAIpdTIVL9JDuMSSkWQM+x6Io
 E9+ydyVVDTqZHlkSP24uRIuWlLLjYg5hgT4jV8PsrVhitxzj9x9cuV+qP/mhIV94
 pnizwuGAZ1dzFFAbkJk66a5mcO3aTIRqzLd5HnfCwx7DGHyl62jmdeY90xxivndC
 VoF8Ez8dWQYKl1UtL3g2Ia3KqKfr+XbBJGmxa4JkEENm06f9XQrdwZNfqWRcDFrl
 LdpcdVp5Jnq9YBmoBOXm25+gIhF0h5Hk7at1/X8CZ3X6TuRhtEhdxJbvZZT2syKF
 55WvdV6jqZrAqxInNgLuvikQzWpIJ08JD6KeTo2umxB1MGZcXkxiarHVZRnIBUni
 qOcVAA4WEmJh4C3Hc0WKPFgqagbAnIqW1sPzxycqjBufd3TEqykuyXVHlTnZYZB7
 dZIyWRXgOoRbCD2Xx1lVe6Vimq0XeUYqWf6y6iqf7bHaFzUMuhWnRQDiPGFn3qkO
 7lc/fb+odhKeXMtFhVJ5m1RxObWExVle0N3ThmUOlyM1dWxxdVkwwodP+/Id/+Bt
 E5NQiCUTrcGz1E8zEJJxcr6MqnJYeAnrXK28Hshj/DCeKiw=
 =RrBi
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-4.9-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt64

Pull "arm64: tegra: Device tree changes for v4.9-rc1" from Thierry Reding:

Add a couple of devices (AGIC, ADMA) on Tegra210 and enable them on
Smaug. Also enable DPAUX on Smaug to allow the I2C bus that shares pads
with the DPAUX to be used to access various audio devices. Furthermore,
enable the XUSB controller on Smaug for USB 3.0 support.

Finally, select PM_GENERIC_DOMAINS for 64-bit Tegra devices to make sure
devices are probed only after their power partitions have been enabled.

* tag 'tegra-for-4.9-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  arm64: tegra: Select PM_GENERIC_DOMAINS
  arm64: tegra: Enable XUSB controller on Tegra210 Smaug
  arm64: tegra: Add the various audio devices for Tegra210 Smaug
  arm64: tegra: Enable DPAUX for Tegra210 Smaug
  arm64: tegra: Add ACONNECT, ADMA and AGIC nodes Tegra210 Smaug
  arm64: tegra: Add SOR power-domain for Tegra210
  arm64: tegra: Add ADMA node for Tegra210
  arm64: tegra: Add AGIC node for Tegra210
  arm64: tegra: Drop clock and reset names for XUSB powergates
  arm64: tegra: Simplify Tegra210 GPIO compatible value
2016-09-14 17:26:34 +02:00
Arnd Bergmann 291e287b97 Merge tag 'v4.9-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt64
Pull "Rockchip dts64 changes for 4.9" from Heiko Stübner:

64bit Rockchip devicetree changes containing support for the recently
added firmware reboot-flag support, one new board the Tronsmart Orion
based on the rk3368 and a large number of newly supported peripherals
for the rk3399 (type-c phy, usb2 phy, pcie controller and pcie phy,
gmac, arm-pmu using ppi partitioning, efuse, saradc) as well as some
smaller housekeeping and non-critical fixes.

* tag 'v4.9-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (22 commits)
  arm64: dts: rockchip: add Type-C phy for RK3399
  arm64: dts: rockchip: enable the gmac for rk3399 evb board
  arm64: dts: rockchip: add the gmac needed node for rk3399
  arm64: dts: rockchip: support the pmu node for rk3399
  arm64: dts: rockchip: change all interrupts cells to 4 on rk3399 SoCs
  arm64: dts: rockchip: add the tcpc for rk3399 power domain
  arm64: dts: rockchip: add efuse0 device node for rk3399
  arm64: dts: rockchip: configure PCIe support for rk3399-evb
  arm64: dts: rockchip: add the PCIe controller support for RK3399
  arm64: dts: rockchip: add the PCIe PHY for RK3399
  arm64: dts: rockchip: add the gmac power domain on rk3399
  arm64: dts: rockchip: Add pinctrl entry for 32k clock on rk3399
  arm64: dts: rockchip: set to CCI clock of RK3399 to 600M
  arm64: dts: rockchip: fix the address map for WDT0 and WDT1
  arm64: dts: rockchip: add the saradc for rk3399
  arm64: dts: rockchip: configure usb2-phy support for rk3399-evb
  arm64: dts: rockchip: add usb2-phy support for rk3399
  arm64: dts: rockchip: add syscon-reboot-mode DT node
  soc: rockchip: add reboot-mode header
  arm64: dts: rockchip: remove broken-cd from sdio0
  ...
2016-09-14 17:25:32 +02:00
Arnd Bergmann 3073be6c29 This pull request contains Broadcom ARM64-based SoC Device Tree changes for
v4.9, please pull the folllowing:
 
 - Dhanajay adds the PWM Device Tree nodes to the Northstar 2 DTS files
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXz3QwAAoJEIfQlpxEBwcEBgkP/1Ne9OcgX6Y2j7ZNJxn5fGQ7
 DjvqvxP8H5m2uJ4h/bFnMFtxeQja0buemkJO/HEULHzZ9bw5xsV4ANRQeTiOWPSY
 hjEXR0Ukt6+aW6lCDc0dN32QnZSi/ljh6k3rWnNk1vaj8to0D/hGeC3twOxV7y7T
 zHpqyqzL2HggUWrr+nM30zC6KfDGaH2EFqkFrzVM6YFnZ49NaRxTs8K8JbovYuTe
 5KTM8IG67tmVtriP3hSbj83d1Ozld7PvMG57CxsxX9e7lqZnYpwUGVhoT76527R/
 CdMlPVgnOrCCyq+pG++Va1i7kuoQ70+FQ6F/WeWAT6Nnh/3PqF+6tpygfhQ+yD7B
 qSv/5OILR80HxAaJlWTMITydLeYlaRCbYI7dwcsyYLNC2jybnSRlTl+lNCBAHo5K
 AK7Xoi+XWIUhKLqD2ewyN8X9/P/33eGx/Y2D1WbuI7A/TOkF0+nCnYdeLmzB7i6s
 V57piQh5XREbImlL4BwlMUjkRkNNIon0lbyp4SHBchFA+Jn/GkF+qF1qmFy+BwIa
 ujJStbTT+dXdBPqXdM46AMkYP3//3Y2hAMwhluJcZfTdqdB3/QWxA6Sw3n4uWUN0
 b8FVEMD1g9sEjEo6AIWFOPCEFoMl0ffhOuQI8x1VgKa+jxD/DzQcymzwtEGg6hpl
 emPZ3qDQw9RsLaVDUS/D
 =Gedm
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-4.9/devicetree-arm64' of http://github.com/Broadcom/stblinux into next/dt64

Pull "Broadcom devicetree-arm64 changes for 4.9" from Florian Fainelli:

This pull request contains Broadcom ARM64-based SoC Device Tree changes for
v4.9, please pull the folllowing:

- Dhanajay adds the PWM Device Tree nodes to the Northstar 2 DTS files

* tag 'arm-soc/for-4.9/devicetree-arm64' of http://github.com/Broadcom/stblinux:
  arm64: dts: Add PWM DT node for NS2
2016-09-14 17:17:53 +02:00
Arnd Bergmann ddee928d8f mvebu dt64 for 4.9 (part 1)
- add description for the new Armada 8040 dev board
 - add the PIC and PMU on Armada 7K/8K
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlfMQ9EACgkQCwYYjhRyO9UmVwCfZs5WQiOtUhnAc8xc1s1ac+AD
 tcoAoKnlIFxvt1QIGqxjfzk3tPtEAj0a
 =XbJ5
 -----END PGP SIGNATURE-----

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

Pull "mvebu dt64 for 4.9 (part 1)" from Gregory CLEMENT:

- add description for the new Armada 8040 dev board
- add the PIC and PMU on Armada 7K/8K

* tag 'mvebu-dt64-4.9-1' of git://git.infradead.org/linux-mvebu:
  arm64: dts: marvell: describe the PIC and PMU on Armada 7K/8K
  arm64: dts: marvell: add description for the Armada 8040 dev board
  arm64: dts: marvell: add description for the slave CP110 in Armada 8K
2016-09-14 17:10:35 +02:00
Arnd Bergmann bd3af15a4e Qualcomm ARM64 Updates for v4.9
* Updates for MSM8916 including TSCR, SMSM/SMP2P, and MBA reserve
 * Update SCM node to denote being a reset-controller
 * Fix broken interrupt settings
 * Add TSENS nodes for MSM8916/MSM8996
 * Add DB820c support
 * Add MSM8916/APQ8016 display support
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXycq8AAoJEFKiBbHx2RXVNsMQAK7/ATfXQmtOlw8i3gKsweHn
 XV8JLVnS+2NBL+vV3/5js/77weOtZZXPaVjYh+OY+UOtDl+yGGuizST3nRa2Ha05
 P0yiND5S1YmYLyQkCDn35LHBSeeFJUTWQ7ugcgKfPNazXpZBX73JXwr6VXJHD/M0
 LrE1tmcq7/cNm1b81+6MlgwTJPxf5OmXwcrMh7oIrXU1iU8jTlU1QB0P5fBJSfFt
 6k5+x354PBTD+lWhRZ50b8mnLr/ylJWGR4ZSiHDPqEY7VHYVldF41zZseQ+Nv70o
 2LDpUoBWEK0kdbqxWQiqKiheKHVgS0qKorMLyxEtjEnf24XY4xYzipjIZcZmwpYO
 zbh6MtR6P/KWv3hJHNS02hMJGCs0dkhArp8VFbI0CjGlngt0J9qZRsIFg1h/MPf4
 kUfrslQ1vtQwV4JZ38yTxRkdb2Tcr5ZFB8RGuuv3q0tapkHjGRmkYo1Z69/P8ftt
 OMMTR7u2jnOm/C8s2F51gOEfhjplax1RGcZqEWtxIW6TzkNXsfDpZmCdz9yf4jqI
 QAf8xS9N/OrwrJ36cQ9ElnmVPagQqt0fBx2VqcVoGh815Bw5DLWzr2jqCXtEONOF
 JZT+JTkjrtFcM/XsxT6u9QKWdh1qEJXQOa191hFFdEvPkYMmBzQTU3qELI8NQrHa
 r6aazwMpsk4hOjeNGVi1
 =O4O+
 -----END PGP SIGNATURE-----

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

Pull "Qualcomm ARM64 Updates for v4.9" from Andy Gross:

* Updates for MSM8916 including TSCR, SMSM/SMP2P, and MBA reserve
* Update SCM node to denote being a reset-controller
* Fix broken interrupt settings
* Add TSENS nodes for MSM8916/MSM8996
* Add DB820c support
* Add MSM8916/APQ8016 display support

* tag 'qcom-arm64-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux:
  arm64: dts: apq8016-sbc: Add HDMI display support
  arm64: dts: msm8916: Add display support
  arm64: dts: db820c: add support to external sd card.
  arm64: dts: db820c: add support to SPI on HS
  arm64: dts: db820c: add support to LS-SPI0
  arm64: dts: db820c: add support to I2C on HS
  arm64: dts: db820c: add support to LS-I2C1
  arm64: dts: db820c: add support to LS-I2C0
  arm64: dts: db820c: add support to LS-UART0
  arm64: dts: db820c: add basic board support
  arm64: dts: msm8996: Add thermal zones, tsens and qfprom nodes
  arm64: dts: msm8916: Add thermal zones, tsens and qfprom nodes
  arm64: dts: qcom: Fix broken interrupt trigger settings
  arm64: dts: qcom: msm8916: Add tcsr syscon
  arm64: dts: qcom: msm8916: Make scm a reset-controller
  arm64: dts: qcom: msm8916: Add mba memory reserve
  arm64: dts: qcom: msm8916: Add smsm and smp2p nodes
2016-09-14 17:07:38 +02:00
Arnd Bergmann 5661beb338 ARM64: DT: Hisilicon SoC DT updates for 4.9
- Set UART1 clock frequency to 150MHz for higher baud rates on hikey
 - Add display subsystem, HDMI and cma nodes on hikey to support display
 - Add syscon-reboot-mode support on hikey
 - Add pstore support on hikey
 - Add resets and sd-uhs-sdr property dwmmc ndoe on hikey
 - Remove hip05_hns.dtsi since it can not be built without mbigenv1
 - Update system controller bingding document for hip05 and hip06
 - Add xge and sas support on hip06
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXyU46AAoJEAvIV27ZiWZcHzgP/i1RAsUl1yoj8F4K6OolVeYA
 v5eEB6kfliB3LzpSl4cIndLP0X+XoRotKCwB7Wkomxc/Aq/Nr2IyPCbOhaPyUP1j
 TrcHr8Rwyeaz0ZhHum4iwMy5mkbMnrlShqbnYv4mBepWitSBgMz+NKWxERQEaEhb
 SjvO5aYtIzudK55BVtPCCvMjLpq7A2IZPPoIP4YbteACK69oGeWrwAEzhTUivUbJ
 g2zZvNzC6A/Mz+b2WuL7nhaK7dsHuJHcpBSBac0UzDKNSzn9IX8IqosTrMKv48LF
 zvKNDwTn47PRfsjvkK6QzRUa22qmMk0Py9dNP5UxonUXNp8cbOzYQjBOlemLfJUC
 TQHW2V9fTD7ICoYYv2OmAWkpOl6ix2CW4pZcXYZnwyzWomuNIYK0wOPmPeLlljC7
 D6w5JPbubGgn/k8AQu04DG5x0TXw9xu6GxWcFmNZAZqWj+Au106rc/UAonz/2OEh
 aCaLBdfEsi+VNwLHGwklTwOGmXZQ302g33yluNK0Aryws2PrHUa0o0T8EWhyWUhq
 msGbfDUTp+jQVb3oubg0YuF8UNSHogWCgPM6sQ31EBRxUBCimVKEqsoRRTXdrExo
 yxsIkSPBfwY7fO1psqOER6x+bEvw5rMZ5qMQB+zWtK3MYzRzYShXNufzJ4JyIWlT
 7Gn8ATf3hLuLHP3kNygI
 =yhRv
 -----END PGP SIGNATURE-----

Merge tag 'hisi-soc-dt-for-4.9' of git://github.com/hisilicon/linux-hisi into next/dt64

Pull "ARM64: DT: Hisilicon SoC DT updates for 4.9" from Wei Xu:

- Set UART1 clock frequency to 150MHz for higher baud rates on hikey
- Add display subsystem, HDMI and cma nodes on hikey to support display
- Add syscon-reboot-mode support on hikey
- Add pstore support on hikey
- Add resets and sd-uhs-sdr property dwmmc ndoe on hikey
- Remove hip05_hns.dtsi since it can not be built without mbigenv1
- Update system controller bingding document for hip05 and hip06
- Add xge and sas support on hip06

* tag 'hisi-soc-dt-for-4.9' of git://github.com/hisilicon/linux-hisi:
  arm64: dts: hi6220: add sd-uhs- properties into dwmmc_1
  arm64: dts: hi6220: add resets property into dwmmc nodes
  arm64: dts: hikey: extend default cma size to 128MB
  arm64: dts: hip06: Append sas node
  arm64: dts: hip06: Append hns node
  dt-bindings: hisilicon: Add Hip05 and Hip06 system controller support
  arm64: dts: hip05: kill hip05_hns.dtsi
  arm64: dts: hikey: Add pstore support for HiKey
  arm64: dts: hikey: Add hikey support for syscon-reboot-mode
  arm64: dts: Add HDMI node for hi6220-hikey
  arm64: dts: Add display subsystem DT nodes for hi6220-hikey
  arm64: dts: set UART1 clock frequency to 150MHz
2016-09-14 17:01:17 +02:00
Arnd Bergmann 530518af84 Samsung DeviceTree ARM64 update for v4.9:
1. Use human-friendly symbols for interrupt flags.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXxUvwAAoJEME3ZuaGi4PXHxYP/34lCHIKJh7I5Hs79vJUZjvL
 B6hkGHbuXf9GaSsrSruacI9Ju1bpJTRhB0OANZk75nYHOhO4zCQ7d4MMF9juDlWG
 XKaO/a47D3/RwEE1BUQJTaIFH8zmEsqzJi90cVynP9Vz0Jfb8YVb3DPwtWbVCB3t
 IVUBpP+e4MPrbpN3vy7Ja+xTaz3fLnJp24LYBfgY0+MzIIw2Go/u+9uYup2fXNRk
 H9Gk6LYQGlyNYHnpApiFKR/Iq/cnUPgJhe9SGACSiwlJFMVf8tmtw6QkdeapUx8P
 4XV8/9IuJJOTPBayaTLTVUTOEtZIbp+f7hiJLzB1b/vhME8v3L9T3UMtKo3Po3Ov
 ZHPNaRi+vV/QNw+Mcu5xhV/YFV+hURNat3TjLNcgPavINq8tixwH59wmvcx/Zbxe
 n/s1HSd1H6fiRA8oQiri46ciATf7fYkKyIewiqgrfQ02wN0Z6kY5V1t+sz1eaLEo
 6lHOsrQ56TWBBf6oFCZ8tLvXJgZNYYlgznIENxppitXwCz2r9CVHN29ZQPo1U8Xg
 6kQv5KWjpUo9Aqx0hSIiO+x3MykY8TwvpaZjycl/VA1JFca5rNvgF38cs3S3EfQw
 Sfm6+ZOHyntWes/pLpJdc6Ei4cyyXYWU/rN2QvrteJkd1GGVwUaX7OO2BDdLZCr3
 5HWdLg/h+WQCC8Dqt3j8
 =ILIK
 -----END PGP SIGNATURE-----

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

Pull "Samsung DeviceTree ARM64 update for v4.9" from Krzysztof Kozlowski:
1. Use human-friendly symbols for interrupt flags.

* tag 'samsung-dt64-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  arm64: dts: exynos: Use human-friendly symbols for timer interrupt flags
2016-09-14 16:51:15 +02:00
Arnd Bergmann 9b2a8b8bdb UniPhier ARM64 SoC DT updates for v4.9
* Match DT names other projects and documents
 * Use clock/reset drivers
 * Add new SoC/board support
 * Misc
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXxfu+AAoJED2LAQed4NsGwEIQAI8ducW3ueLPt/KqQF4ko3w9
 JAJPkXp30XLQ41SqcHpjCO1FCC5DMG5XCXCzFPkoCP4GSASI1Iz3PBXMChWbUHz7
 +6FUCMSAKOiWMmCD9K+iFB+9i3yTQsw9kHgV8Q+ZGo8LWE6fWufFJMQHWfVJ6R7p
 /Mu/rfvPBjPJ5/7w4MGrL5QW6AVgJbcazzFCi3CYzeEyp2AuTZybHnjVBMq10gLg
 7lcz9bgcPIlXF3HpMzGsENbgc3++D9Cw/K2ui9z2wc5P4KHDhA5cZ6qUhZi9/nKT
 ChxSqEt2gdQl0m6x1hEne8+CPN3WcX47jfp9mc4zWPvxC2afi+G2vNSsTmD6Q63X
 /h7pj0MHRYOEpjaLdFTvZkshF3h50HHguyqJ2JgSLwuyISY/0efm61LbUDmoUtpa
 IlbNVENzr3RSnyGN/AsNc+Hp5iLhpgaXW6x2FV93dIK/+eWkZFx4BR1lsfReP56z
 /dq/jNkBa4FAi/FmmGHldOggMohWMOBGI7Ehh2t388vZJcTR1w3DdC2TIoAwq8Xt
 X3W/VJOPjXSmecxFv3Dujoa9qbC0kPdtq5sPpCzOb64tL8ulFiLDvqI6KxmVghdF
 LFzvAsMat0JUG3esDRHqmnS4AgKm1+lDoDvzJgZ8xRQ0g5IVEoeAhpnoHTJfRh9e
 XU+xWUSQTrcHtXH1rMMq
 =ctoy
 -----END PGP SIGNATURE-----

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

Merge "UniPhier ARM64 SoC DT updates for v4.9" from Masahiro Yamada:

* Match DT names other projects and documents
* Use clock/reset drivers
* Add new SoC/board support
* Misc

* tag 'uniphier-dt64-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier:
  arm64: dts: uniphier: add LD11 SoC/Board support
  arm64: dts: uniphier: add specific compatible to SoC-Glue node
  arm64: dts: uniphier: use clock/reset controllers
  arm64: dts: uniphier: add pinctrl property to System Bus node
  arm64: dts: uniphier: match DT names to other projects and documents
2016-09-14 16:49:51 +02:00
Thomas Petazzoni 93970e67bd arm64: dts: marvell: enable MSI for PCIe on Armada 7K/8K
This commit adds a reference to the appropriate MSI controller in the
description of the PCIe controllers on Marvel Armada 7K and 8K
platforms.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
2016-09-14 16:21:09 +02:00
Paolo Bonzini ad53e35ae5 Merge branch 'kvm-ppc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD
Paul Mackerras writes:

    The highlights are:

    * Reduced latency for interrupts from PCI pass-through devices, from
      Suresh Warrier and me.
    * Halt-polling implementation from Suraj Jitindar Singh.
    * 64-bit VCPU statistics, also from Suraj.
    * Various other minor fixes and improvements.
2016-09-13 15:20:55 +02:00
Ard Biesheuvel 2db34e78f1 crypto: arm64/aes-ctr - fix NULL dereference in tail processing
The AES-CTR glue code avoids calling into the blkcipher API for the
tail portion of the walk, by comparing the remainder of walk.nbytes
modulo AES_BLOCK_SIZE with the residual nbytes, and jumping straight
into the tail processing block if they are equal. This tail processing
block checks whether nbytes != 0, and does nothing otherwise.

However, in case of an allocation failure in the blkcipher layer, we
may enter this code with walk.nbytes == 0, while nbytes > 0. In this
case, we should not dereference the source and destination pointers,
since they may be NULL. So instead of checking for nbytes != 0, check
for (walk.nbytes % AES_BLOCK_SIZE) != 0, which implies the former in
non-error conditions.

Fixes: 49788fe2a1 ("arm64/crypto: AES-ECB/CBC/CTR/XTS using ARMv8 NEON and Crypto Extensions")
Cc: stable@vger.kernel.org
Reported-by: xiakaixu <xiakaixu@huawei.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2016-09-13 18:44:59 +08:00
Linus Walleij eb8994172a Linux 4.8-rc2
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJXsSTlAAoJEHm+PkMAQRiGZaYH/1MarD897Cju7AgQj8UYQYXB
 dsG3iuoJMj0ji/V466lmHZnS0pwmpJV3qBp7znaFI5jLoTYD2+BkBDY/FLQLqQH7
 vkRKOCLCbppKkDDsgd3dS3FFOnJC724iqnSsPegp2lz/8OS2dIs8i82PgKX3zQjJ
 PqkcMOEt3YlTV18/LiGvQhXWHJ/x8oIvcO0KuLcz3adX0B15+qZyJo1Ss3Z0HL/V
 CqcSVaLgDe0fAAMCexUcKxRNtvGrMENxYRE9YXJFxu1do2H4opXmt0qGun0yxSN4
 8/Y74BB80yUak8lM4mHMCy2G2lDmB32f188yPN45Hg6+F71UJChXXKUnyzUhx14=
 =QQX1
 -----END PGP SIGNATURE-----

Merge tag 'v4.8-rc2' into devel

Linux 4.8-rc2
2016-09-13 10:31:40 +02:00
David S. Miller b20b378d49 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
	drivers/net/ethernet/mediatek/mtk_eth_soc.c
	drivers/net/ethernet/qlogic/qed/qed_dcbx.c
	drivers/net/phy/Kconfig

All conflicts were cases of overlapping commits.

Signed-off-by: David S. Miller <davem@davemloft.net>
2016-09-12 15:52:44 -07:00
Daniel Thompson 91ef84428a irqchip/gic-v3: Reset BPR during initialization
Currently, when running on FVP, CPU 0 boots up with its BPR changed from
the reset value. This renders it impossible to (preemptively) prioritize
interrupts on CPU 0.

This is harmless on normal systems since Linux typically does not
support preemptive interrupts. It does however cause problems in
systems with additional changes (such as patches for NMI simulation).

Many thanks to Andrew Thoelke for suggesting the BPR as having the
potential to harm preemption.

Suggested-by: Andrew Thoelke <andrew.thoelke@arm.com>
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2016-09-12 19:46:19 +01:00
Mark Rutland e506236a7b arm64/kvm: use alternative auto-nop
Make use of the new alternative_if and alternative_else_nop_endif and
get rid of our open-coded NOP sleds, making the code simpler to read.

Note that for __kvm_call_hyp the branch to __vhe_hyp_call has been moved
out of the alternative sequence, and in the default case there will be
four additional NOPs executed.

Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: kvmarm@lists.cs.columbia.edu
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-12 10:46:07 +01:00
Mark Rutland 6ba3b554f5 arm64: use alternative auto-nop
Make use of the new alternative_if and alternative_else_nop_endif and
get rid of our homebew NOP sleds, making the code simpler to read.

Note that for cpu_do_switch_mm the ret has been moved out of the
alternative sequence, and in the default case there will be three
additional NOPs executed.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-12 10:46:07 +01:00
Mark Rutland 792d47379f arm64: alternative: add auto-nop infrastructure
In some cases, one side of an alternative sequence is simply a number of
NOPs used to balance the other side. Keeping track of this manually is
tedious, and the presence of large chains of NOPs makes the code more
painful to read than necessary.

To ameliorate matters, this patch adds a new alternative_else_nop_endif,
which automatically balances an alternative sequence with a trivial NOP
sled.

In many cases, we would like a NOP-sled in the default case, and
instructions patched in in the presence of a feature. To enable the NOPs
to be generated automatically for this case, this patch also adds a new
alternative_if, and updates alternative_else and alternative_endif to
work with either alternative_if or alternative_endif.

Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Martin <dave.martin@arm.com>
Cc: James Morse <james.morse@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
[will: use new nops macro to generate nop sequences]
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-12 10:45:34 +01:00
Will Deacon 05492f2fd8 arm64: lse: convert lse alternatives NOP padding to use __nops
The LSE atomics are implemented using alternative code sequences of
different lengths, and explicit NOP padding is used to ensure the
patching works correctly.

This patch converts the bulk of the LSE code over to using the __nops
macro, which makes it slightly clearer as to what is going on and also
consolidates all of the padding at the end of the various sequences.

Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-09 18:12:34 +01:00
Will Deacon f99a250cb6 arm64: barriers: introduce nops and __nops macros for NOP sequences
NOP sequences tend to get used for padding out alternative sections
and uarch-specific pipeline flushes in errata workarounds.

This patch adds macros for generating these sequences as both inline
asm blocks, but also as strings suitable for embedding in other asm
blocks directly.

Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-09 18:12:28 +01:00
Will Deacon 8a71f0c656 arm64: sysreg: replace open-coded mrs_s/msr_s with {read,write}_sysreg_s
Similar to our {read,write}_sysreg accessors for architected, named
system registers, this patch introduces {read,write}_sysreg_s variants
that can take arbitrary sys_reg output and therefore access IMPDEF
registers or registers that unsupported by binutils.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-09 18:12:08 +01:00
Ian Campbell 76aa759168 ARM64: dts: bcm: Use a symlink to R-Pi dtsi files from arch=arm
The ../../../arm... style cross-references added by commit 9d56c22a78
("ARM: bcm2835: Add devicetree for the Raspberry Pi 3.") do not work in the
context of the split device-tree repository[0] (where the directory
structure differs). As with commit 8ee57b8182 ("ARM64: dts: vexpress: Use
a symlink to vexpress-v2m-rs1.dtsi from arch=arm") use symlinks instead.

[0] https://git.kernel.org/cgit/linux/kernel/git/devicetree/devicetree-rebasing.git/

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Lee Jones <lee@kernel.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rpi-kernel@lists.infradead.org
Cc: arm@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2016-09-09 17:47:16 +02:00
Robin Murphy 0e27a7fce6 arm64: Remove shadowed asm-generic headers
We've grown our own versions of bug.h, ftrace.h, pci.h and topology.h,
so generating the generic ones as well is unnecessary and a potential
source of build hiccups. At the very least, having them present has
confused my source-indexing tool, and that simply will not do.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-09 15:05:08 +01:00
Suzuki K Poulose 116c81f427 arm64: Work around systems with mismatched cache line sizes
Systems with differing CPU i-cache/d-cache line sizes can cause
problems with the cache management by software when the execution
is migrated from one to another. Usually, the application reads
the cache size on a CPU and then uses that length to perform cache
operations. However, if it gets migrated to another CPU with a smaller
cache line size, things could go completely wrong. To prevent such
cases, always use the smallest cache line size among the CPUs. The
kernel CPU feature infrastructure already keeps track of the safe
value for all CPUID registers including CTR. This patch works around
the problem by :

For kernel, dynamically patch the kernel to read the cache size
from the system wide copy of CTR_EL0.

For applications, trap read accesses to CTR_EL0 (by clearing the SCTLR.UCT)
and emulate the mrs instruction to return the system wide safe value
of CTR_EL0.

For faster access (i.e, avoiding to lookup the system wide value of CTR_EL0
via read_system_reg), we keep track of the pointer to table entry for
CTR_EL0 in the CPU feature infrastructure.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-09 15:03:29 +01:00
Suzuki K Poulose 9dbd5bb25c arm64: Refactor sysinstr exception handling
Right now we trap some of the user space data cache operations
based on a few Errata (ARM 819472, 826319, 827319 and 824069).
We need to trap userspace access to CTR_EL0, if we detect mismatched
cache line size. Since both these traps share the EC, refactor
the handler a little bit to make it a bit more reader friendly.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-09 15:03:29 +01:00
Suzuki K Poulose 072f0a6338 arm64: Introduce raw_{d,i}cache_line_size
On systems with mismatched i/d cache min line sizes, we need to use
the smallest size possible across all CPUs. This will be done by fetching
the system wide safe value from CPU feature infrastructure.
However the some special users(e.g kexec, hibernate) would need the line
size on the CPU (rather than the system wide), when either the system
wide feature may not be accessible or it is guranteed that the caller
executes with a gurantee of no migration.
Provide another helper which will fetch cache line size on the current CPU.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: James Morse <james.morse@arm.com>
Reviewed-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-09 15:03:29 +01:00
Suzuki K Poulose c831b2ae25 arm64: alternative: Add support for patching adrp instructions
adrp uses PC-relative address offset to a page (of 4K size) of
a symbol. If it appears in an alternative code patched in, we
should adjust the offset to reflect the address where it will
be run from. This patch adds support for fixing the offset
for adrp instructions.

Cc: Will Deacon <will.deacon@arm.com>
Cc: Marc Zyngier <marc.zyngier@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>
2016-09-09 15:03:28 +01:00
Suzuki K Poulose 46084bc253 arm64: insn: Add helpers for adrp offsets
Adds helpers for decoding/encoding the PC relative addresses for adrp.
This will be used for handling dynamic patching of 'adrp' instructions
in alternative code patching.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-09 15:03:28 +01:00
Suzuki K Poulose baa763b565 arm64: alternative: Disallow patching instructions using literals
The alternative code patching doesn't check if the replaced instruction
uses a pc relative literal. This could cause silent corruption in the
instruction stream as the instruction will be executed from a different
address than what it was compiled for. Catch all such cases.

Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Suggested-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-09 15:03:28 +01:00
Suzuki K Poulose c47a1900ad arm64: Rearrange CPU errata workaround checks
Right now we run through the work around checks on a CPU
from __cpuinfo_store_cpu. There are some problems with that:

1) We initialise the system wide CPU feature registers only after the
Boot CPU updates its cpuinfo. Now, if a work around depends on the
variance of a CPU ID feature (e.g, check for Cache Line size mismatch),
we have no way of performing it cleanly for the boot CPU.

2) It is out of place, invoked from __cpuinfo_store_cpu() in cpuinfo.c. It
is not an obvious place for that.

This patch rearranges the CPU specific capability(aka work around) checks.

1) At the moment we use verify_local_cpu_capabilities() to check if a new
CPU has all the system advertised features. Use this for the secondary CPUs
to perform the work around check. For that we rename
  verify_local_cpu_capabilities() => check_local_cpu_capabilities()
which:

   If the system wide capabilities haven't been initialised (i.e, the CPU
   is activated at the boot), update the system wide detected work arounds.

   Otherwise (i.e a CPU hotplugged in later) verify that this CPU conforms to the
   system wide capabilities.

2) Boot CPU updates the work arounds from smp_prepare_boot_cpu() after we have
initialised the system wide CPU feature values.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-09 15:03:28 +01:00
Suzuki K Poulose 89ba26458b arm64: Use consistent naming for errata handling
This is a cosmetic change to rename the functions dealing with
the errata work arounds to be more consistent with their naming.

1) check_local_cpu_errata() => update_cpu_errata_workarounds()
check_local_cpu_errata() actually updates the system's errata work
arounds. So rename it to reflect the same.

2) verify_local_cpu_errata() => verify_local_cpu_errata_workarounds()
Use errata_workarounds instead of _errata.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-09 15:03:28 +01:00
Suzuki K Poulose ee7bc638f1 arm64: Set the safe value for L1 icache policy
Right now we use 0 as the safe value for CTR_EL0:L1Ip, which is
not defined at the moment. The safer value for the L1Ip should be
the weakest of the policies, which happens to be AIVIVT. While at it,
fix the comment about safe_val.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-09 15:03:28 +01:00
Zhen Lei 7ba5f605f3 arm64/numa: remove the limitation that cpu0 must bind to node0
1. Remove the old binding code.
2. Read the nid of cpu0 from dts.
3. Fallback the nid of cpu0 to 0 when numa=off is set in bootargs.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-09 14:59:09 +01:00
Zhen Lei df7ffa34cc arm64/numa: remove some useless code
When the deleted code is executed, only the bit of cpu0 was set on
cpu_possible_mask. So that, only set_cpu_numa_node(0, NUMA_NO_NODE); will
be executed. And map_cpu_to_node(0, 0) will soon be called. So these code
can be safely removed.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-09 14:59:09 +01:00
Zhen Lei 7af3a0a992 arm64/numa: support HAVE_SETUP_PER_CPU_AREA
To make each percpu area allocated from its local numa node. Without this
patch, all percpu areas will be allocated from the node which cpu0 belongs
to.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-09 14:59:09 +01:00
Kefeng Wang f11c7bacd5 arm64: numa: Use pr_fmt()
Use pr_fmt to prefix kernel output, and remove duplicated msg
of NUMA turned off.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-09 14:59:09 +01:00
Zhen Lei 794224ea56 arm64/numa: avoid inconsistent information to be printed
numa_init may return error because of numa configuration error. So "No
NUMA configuration found" is inaccurate. In fact, specific configuration
error information should be immediately printed by the testing branch.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-09 14:59:08 +01:00
Mark Rutland 569de9026c arm64: perf: move to common attr_group fields
By using a common attr_groups array, the common arm_pmu code can set up
common files (e.g. cpumask) for us in subsequent patches.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-09 14:51:51 +01:00
Chunyan Zhang 2b9743441a arm64: use preempt_disable_notrace in _percpu_read/write
When debug preempt or preempt tracer is enabled, preempt_count_add/sub()
can be traced by function and function graph tracing, and
preempt_disable/enable() would call preempt_count_add/sub(), so in Ftrace
subsystem we should use preempt_disable/enable_notrace instead.

In the commit 345ddcc882 ("ftrace: Have set_ftrace_pid use the bitmap
like events do") the function this_cpu_read() was added to
trace_graph_entry(), and if this_cpu_read() calls preempt_disable(), graph
tracer will go into a recursive loop, even if the tracing_on is
disabled.

So this patch change to use preempt_enable/disable_notrace instead in
this_cpu_read().

Since Yonghui Yang helped a lot to find the root cause of this problem,
so also add his SOB.

Signed-off-by: Yonghui Yang <mark.yang@spreadtrum.com>
Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2016-09-09 12:34:47 +01:00
Will Deacon 872c63fbf9 arm64: spinlocks: implement smp_mb__before_spinlock() as smp_mb()
smp_mb__before_spinlock() is intended to upgrade a spin_lock() operation
to a full barrier, such that prior stores are ordered with respect to
loads and stores occuring inside the critical section.

Unfortunately, the core code defines the barrier as smp_wmb(), which
is insufficient to provide the required ordering guarantees when used in
conjunction with our load-acquire-based spinlock implementation.

This patch overrides the arm64 definition of smp_mb__before_spinlock()
to map to a full smp_mb().

Cc: <stable@vger.kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Reported-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2016-09-09 12:33:48 +01:00
Mark Rutland d3ea42aad5 arm64: simplify contextidr_thread_switch
When CONFIG_PID_IN_CONTEXTIDR is not selected, we use an empty stub
definition of contextidr_thread_switch(). As everything we rely upon
exists regardless of CONFIG_PID_IN_CONTEXTIDR, we don't strictly require
an empty stub.

By using IS_ENABLED() rather than ifdeffery, we avoid duplication, and
get compiler coverage on all the code even when CONFIG_PID_IN_CONTEXTIDR
is not selected and the code is optimised away.

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>
2016-09-09 11:43:50 +01:00
Mark Rutland adf7589997 arm64: simplify sysreg manipulation
A while back we added {read,write}_sysreg accessors to handle accesses
to system registers, without the usual boilerplate asm volatile,
temporary variable, etc.

This patch makes use of these across arm64 to make code shorter and
clearer. For sequences with a trailing ISB, the existing isb() macro is
also used so that asm blocks can be removed entirely.

A few uses of inline assembly for msr/mrs are left as-is. Those
manipulating sp_el0 for the current thread_info value have special
clobber requiremends.

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>
2016-09-09 11:43:50 +01:00
Mark Rutland 1f3d8699be arm64/kvm: use {read,write}_sysreg()
A while back we added {read,write}_sysreg accessors to handle accesses
to system registers, without the usual boilerplate asm volatile,
temporary variable, etc.

This patch makes use of these in the arm64 KVM code to make the code
shorter and clearer.

At the same time, a comment style violation next to a system register
access is fixed up in reset_pmcr, and comments describing whether
operations are reads or writes are removed as this is now painfully
obvious.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-09 11:42:27 +01:00
Mark Rutland d0a69d9f38 arm64: dcc: simplify accessors
A while back we added {read,write}_sysreg accessors to handle accesses
to system registers, without the usual boilerplate asm volatile,
temporary variable, etc.

This patch makes use of these in the arm64 DCC accessors to make the
code shorter and clearer.

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>
2016-09-09 11:41:13 +01:00
Mark Rutland cd5f22d796 arm64: arch_timer: simplify accessors
A while back we added {read,write}_sysreg accessors to handle accesses
to system registers, without the usual boilerplate asm volatile,
temporary variable, etc.

This patch makes use of these in the arm64 arch timer accessors to make
the code shorter and clearer.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-09 11:41:13 +01:00
Mark Rutland 7aff4a2dd3 arm64: sysreg: allow write_sysreg to use XZR
Currently write_sysreg has to allocate a temporary register to write
zero to a system register, which is unfortunate given that the MSR
instruction accepts XZR as an operand.

Allow XZR to be used when appropriate by fiddling with the assembly
constraints.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-09 11:40:39 +01:00
Liu Gang e5f51a623a arm64: dts: ls2080a: Add 'dma-coherent' for ls2080a PCI nodes
The 'dma-coherent' indicates that the hardware IP block can ensure
the coherency of the data transferred from/to the IP block. This
can avoid the software cache flush/invalid actions, and improve
the performance significantly.

The PCI IP block of ls2080a has this capability, so adding this
feature to improve the PCI performance.

Signed-off-by: Liu Gang <Gang.Liu@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-09-09 14:04:21 +08:00
Paolo Bonzini 6f90f1d1d2 KVM: s390: features and fixes for 4.9
- lazy enablement of runtime instrumentation
 - up to 255 CPUs for nested guests
 - rework of machine check deliver
 - cleanups/fixes
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJX0VHHAAoJEBF7vIC1phx88QwP/ir7L15bHPLUtdqwQn95yjzK
 wlMTSekOrvbXImEKMh7nizMN76WI2nee1NvRe3pNf6Uc0Ntwiyzr7d2wQwX6L8Fn
 D+28Crx3v/X3wGSLWdCf/17tuOUjVVMLhRHAIX4K+bl88L6NoMN2lsuXSAq7Fp7I
 /CiXTGjHnF2eVL41e6p5oIRJvNaIfX3DlvRgfYc3TVrJum4tXcfCCMGWaXASarIW
 g/q/q7s3iNbaLPrgb5rhQ2XY6puTTrot4whW7hXWsNWEW0r3MuwjOtxoy1VCMBeI
 5PiCSqByYf7c6O5hqu4VClhalB76q43LQLY55/WLnuljJfru7Koiy9zxpnE0zTii
 VnesQZv7emI1HYd4UbZkwo1LdE0o67I1dWucQx2yrqRpRvx6K/0VvvWH/Z4Y8N1Z
 B6DQdvn0tRAnpFxsJLZ51WaEwtZuaXYirXwE6wMDcxhbmCorXvPTUdu4mLPhMkp7
 nLfbA8fyXeU7HwzH90v/dvKY38jU6O0yzFAKHySowlSb6Kzmbuhym5Hgd2N91BUK
 bbE4uW4mOjUpByGNGKcOJ+5typN2hfotriayWwgKKiROYQR19HpFNR4VFiE4Gwgy
 yGxkbDgr11tHZ9flEMJT1c7k6sDDY+Dg2xgc1AxQQ9aZCXeH4Fe70uvgQzrTKjX3
 XRER04mHV5yXpze7lumg
 =99TB
 -----END PGP SIGNATURE-----

Merge tag 'kvm-s390-next-4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD

KVM: s390: features and fixes for 4.9

- lazy enablement of runtime instrumentation
- up to 255 CPUs for nested guests
- rework of machine check deliver
- cleanups/fixes
2016-09-08 15:35:44 +02:00
Marc Zyngier 3272f0d08e arm64: KVM: Inject a vSerror if detecting a bad GICV access at EL2
If, when proxying a GICV access at EL2, we detect that the guest is
doing something silly, report an EL1 SError instead ofgnoring the
access.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2016-09-08 12:53:00 +02:00
Marc Zyngier 395ea79ebe arm64: KVM: Handle async aborts delivered while at EL2
If EL1 generates an asynchronous abort and then traps into EL2
before the abort has been delivered, we may end-up with the
abort firing at the worse possible place: on the host.

In order to avoid this, it is necessary to take the abort at EL2,
by clearing the PSTATE.A bit. In order to survive this abort,
we do it at a point where we're in a known state with respect
to the world switch, and handle the resulting exception,
overloading the exit code in the process.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2016-09-08 12:53:00 +02:00
Marc Zyngier ddb3d07cfe arm64: KVM: Inject a Virtual SError if it was pending
If we have caught an SError whilst exiting, we've tagged the
exit code with the pending information. In that case, let's
re-inject the error into the guest, after having adjusted
the PC if required.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2016-09-08 12:53:00 +02:00
Marc Zyngier 20163403a1 arm64: KVM: Allow an exit code to be tagged with an SError
Similarily to EL1, an asynchronous abort can be triggered whilst
running at EL2. But instead of making that a new error code,
we need to communicate it to the rest of KVM together with
the exit reason. So let's hijack a single bit that allows the
exception code to be tagged with a "pending SError" information.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2016-09-08 12:53:00 +02:00
Marc Zyngier 1b51e5fac6 arm64: KVM: Route asynchronous aborts
As we now have some basic handling to EL1-triggered aborts, we can
actually report them to KVM.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2016-09-08 12:53:00 +02:00
Marc Zyngier 0215a6e6dd arm64: KVM: Add EL1 async abort handler
If we've exited the guest because it has triggered an asynchronous
abort from EL1, a possible course of action is to let it know it
screwed up by giving it a Virtual Abort to chew on.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2016-09-08 12:53:00 +02:00
Marc Zyngier 9aecafc86c arm64: KVM: Add exception code to report EL1 asynchronous aborts
So far, we don't have a code to indicate that we've taken an
asynchronous abort from EL1. Let's add one.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2016-09-08 12:53:00 +02:00
Marc Zyngier 10cf33900f arm64: KVM: Add Virtual Abort injection helper
Now that we're able to context switch the HCR_EL2.VA bit, let's
introduce a helper that injects an Abort into a vcpu.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2016-09-08 12:53:00 +02:00
Marc Zyngier 44636f976f arm64: KVM: Preserve pending vSError in world switch
The HCR_EL2.VSE bit is used to signal an SError to a guest, and has
the peculiar feature of getting cleared when the guest has taken
the abort (this is the only bit that behaves as such in this register).

This means that if we signal such an abort, we must leave it
in the guest context until it disappears from HCR_EL2, and at which
point it must be cleared from the context. This is achieved by
reading back from HCR_EL2 until the guest takes the fault.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2016-09-08 12:53:00 +02:00
Marc Zyngier 7b17145ec7 arm64: KVM: Rename HCR_VA to HCR_VSE
HCR_VA is a leftover from ARMv7, On ARMv8, this is HCR_VSE
(which stands for Virtual System Error), and has better
defined semantics.

Let's rename the constant.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2016-09-08 12:53:00 +02:00
Marc Zyngier fb5ee369cc arm64: KVM: vgic-v2: Add the GICV emulation infrastructure
In order to efficiently perform the GICV access on behalf of the
guest, we need to be able to avoid going back all the way to
the host kernel.

For this, we introduce a new hook in the world switch code,
conveniently placed just after populating the fault info.
At that point, we only have saved/restored the GP registers,
and we can quickly perform all the required checks (data abort,
translation fault, valid faulting syndrome, not an external
abort, not a PTW).

Coming back from the emulation code, we need to skip the emulated
instruction. This involves an additional bit of save/restore in
order to be able to access the guest's PC (and possibly CPSR if
this is a 32bit guest).

At this stage, no emulation code is provided.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2016-09-08 12:53:00 +02:00
Marc Zyngier 427d7cacf9 arm64: KVM: Move the AArch32 conditional execution to common code
It would make some sense to share the conditional execution code
between 32 and 64bit. In order to achieve this, let's move that
code to virt/kvm/arm/aarch32.c. While we're at it, drop a
superfluous BUG_ON() that wasn't that useful.

Following patches will migrate the 32bit port to that code base.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2016-09-08 12:53:00 +02:00
Marc Zyngier 3e51d43516 arm64: KVM: Move kvm_vcpu_get_condition out of emulate.c
In order to make emulate.c more generic, move the arch-specific
manupulation bits out of emulate.c.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2016-09-08 12:53:00 +02:00
Vladimir Murzin cb96408da4 arm64: KVM: VHE: reset PSTATE.PAN on entry to EL2
SCTLR_EL2.SPAN bit controls what happens with the PSTATE.PAN bit on an
exception. However, this bit has no effect on the PSTATE.PAN when
HCR_EL2.E2H or HCR_EL2.TGE is unset. Thus when VHE is used and
exception taken from a guest PSTATE.PAN bit left unchanged and we
continue with a value guest has set.

To address that always reset PSTATE.PAN on entry from EL1.

Fixes: 1f364c8c48 ("arm64: VHE: Add support for running Linux in EL2 mode")

Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Reviewed-by: James Morse <james.morse@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: <stable@vger.kernel.org> # v4.6+
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2016-09-08 12:53:00 +02:00
Christoffer Dall cf0ba18a44 KVM: arm/arm64: Get rid of exported aliases to static functions
When rewriting the assembly code to C code, it was useful to have
exported aliases or static functions so that we could keep the existing
common C code unmodified and at the same time rewrite arm64 from
assembly to C code, and later do the arm part.

Now when both are done, we really don't need this level of indirection
anymore, and it's time to save a few lines and brain cells.

Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2016-09-08 12:53:00 +02:00
Mark Rutland 777c155772 arm64/kvm: remove unused stub functions
Now that 32-bit KVM no longer performs cache maintenance for page table
updates, we no longer need empty stubs for arm64. Remove them.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: kvmarm@lists.cs.columbia.edu
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2016-09-08 12:53:00 +02:00
Shanker Donthineni 68381b2b00 arm64: KVM: Optimize __guest_enter/exit() to save a few instructions
We are doing an unnecessary stack push/pop operation when restoring
the guest registers x0-x18 in __guest_enter(). This patch saves the
two instructions by using x18 as a base register. No need to store
the vcpu context pointer in stack because it is redundant, the same
information is available in tpidr_el2. The function __guest_exit()
calling convention is slightly modified, caller only pushes the regs
x0-x1 to stack instead of regs x0-x3.

Signed-off-by: Shanker Donthineni <shankerd@codeaurora.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2016-09-08 12:53:00 +02:00
Robin Murphy ee5e41b5f2 arm64/io: Allow I/O writes to use {W,X}ZR
When zeroing an I/O location, the current accessors are forced to
allocate a temporary register to store the zero for the write. By
tweaking the assembly constraints, we can allow the compiler to use
the zero register directly in such cases, and save some juggling.
Compiling a representative kernel configuration with GCC 6 shows
that 2.3KB worth of code can be wasted just on that!

  text     data    bss      dec      hex     filename
 13316776 3248256 18176769 34741801 2121e29 vmlinux.o.new
 13319140 3248256 18176769 34744165 2122765 vmlinux.o.old

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-08 11:04:13 +01:00
Takeshi Kihara fa765e5ef4 arm64: dts: r8a7796: Add GPIO device nodes
Add GPIO device nodes to the DT of the r8a7796 SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2016-09-08 09:35:27 +02:00
Ulrich Hecht 6b5f8e7e7f arm64: dts: r8a7796: salvator-x: add serial console pins
Adds pin control for SCIF2.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-09-08 09:35:26 +02:00
Takeshi Kihara 5080947048 arm64: dts: r8a7796: Add pinctrl device node
This patch adds pinctrl device node for R8A7796 SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-09-08 09:35:26 +02:00
Laurent Pinchart 272bde0384 arm64: dts: r8a7795: salvator-x: Configure pins for the DU RGB output
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>
2016-09-08 09:35:25 +02:00
Vladimir Barinov e8c841f5ac arm64: dts: h3ulcb: enable GPIO leds
This supports GPIO leds on H3ULCB board

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-09-08 09:35:25 +02:00
Vladimir Barinov 2627d5179f arm64: dts: h3ulcb: Sound SSI support
This supports SSI sound for H3ULCB board.
SSI DMA mode used. CS2000 used as AUDIO_CLK_B.

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-09-08 09:35:24 +02:00
Vladimir Barinov 5709436319 arm64: dts: h3ulcb: enable SDHI0
This supports SDHI0 on H3ULCB board SD card slot

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-09-08 09:35:18 +02:00
Vladimir Barinov 0e3886a981 arm64: dts: h3ulcb: enable GPIO keys
This supports GPIO keys on H3ULCB board

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-09-08 09:35:17 +02:00
Simon Horman 56de959f53 arm64: dts: r8a7795: remove unnecessary cap-mmc-highspeed property
Remove cap-mmc-highspeed property from SDHI2 and SDHI3.

This property is unnecessary as the driver automatically sets
the highspeed capability. Furthermore its use is inconsistent with SDHI0
and SDHI1 which are also highspeed capable but do not have this property
present.

Found by inspection.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-09-08 09:35:16 +02:00
Vladimir Barinov 15907f1f87 arm64: dts: h3ulcb: enable USB2.0 Host channel 1
This supports USB2.0 Host channel 1 on H3ULCB board

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-09-08 09:35:06 +02:00
Suraj Jitindar Singh 8a7e75d47b KVM: Add provisioning for ulong vm stats and u64 vcpu stats
vms and vcpus have statistics associated with them which can be viewed
within the debugfs. Currently it is assumed within the vcpu_stat_get() and
vm_stat_get() functions that all of these statistics are represented as
u32s, however the next patch adds some u64 vcpu statistics.

Change all vcpu statistics to u64 and modify vcpu_stat_get() accordingly.
Since vcpu statistics are per vcpu, they will only be updated by a single
vcpu at a time so this shouldn't present a problem on 32-bit machines
which can't atomically increment 64-bit numbers. However vm statistics
could potentially be updated by multiple vcpus from that vm at a time.
To avoid the overhead of atomics make all vm statistics ulong such that
they are 64-bit on 64-bit systems where they can be atomically incremented
and are 32-bit on 32-bit systems which may not be able to atomically
increment 64-bit numbers. Modify vm_stat_get() to expect ulongs.

Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Reviewed-by: David Matlack <dmatlack@google.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
2016-09-08 12:25:37 +10:00
Chris Zhong f606193a10 arm64: dts: rockchip: add Type-C phy for RK3399
There are 2 Type-C phy on RK3399, they are almost same, except the
address of register. They support USB3.0 Type-C and DisplayPort1.3
Alt Mode on USB Type-C. Register a phy, supply it to USB3 controller
and DP controller.

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2016-09-07 20:20:08 +02:00
Roger Chen 0714bc7767 arm64: dts: rockchip: enable the gmac for rk3399 evb board
We add the required and optional properties for evb board.
See the [0] to get the detail information.

[0]:
Documentation/devicetree/bindings/net/rockchip-dwmac.txt

Signed-off-by: Roger Chen <roger.chen@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2016-09-07 20:14:59 +02:00
Roger Chen eb3a6a6a9e arm64: dts: rockchip: add the gmac needed node for rk3399
The RK3399 GMAC Ethernet Controller provides a complete Ethernet interface
from processor to a Reduced Media Independent Interface (RMII) and Reduced
Gigabit Media Independent Interface (RGMII) compliant Ethernet PHY.

This patch adds the related needed device information.
e.g.: interrupts, grf, clocks, pinctrl and so on.

The full details are in [0].

[0]:
Documentation/devicetree/bindings/net/rockchip-dwmac.txt

Signed-off-by: Roger Chen <roger.chen@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2016-09-07 20:10:34 +02:00
Catalin Marinas efd9e03fac arm64: Use static keys for CPU features
This patch adds static keys transparently for all the cpu_hwcaps
features by implementing an array of default-false static keys and
enabling them when detected. The cpus_have_cap() check uses the static
keys if the feature being checked is a constant, otherwise the compiler
generates the bitmap test.

Because of the early call to static_branch_enable() via
check_local_cpu_errata() -> update_cpu_capabilities(), the jump labels
are initialised in cpuinfo_store_boot_cpu().

Cc: Will Deacon <will.deacon@arm.com>
Cc: Suzuki K. Poulose <Suzuki.Poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-07 09:41:42 +01:00
Kefeng Wang dae8c235d9 arm64: mm: drop fixup_init() and mm.h
There is only fixup_init() in mm.h , and it is only called
in free_initmem(), so move the codes from fixup_init() into
free_initmem(), then drop fixup_init() and mm.h.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-06 19:09:38 +01:00
Tejun Heo 2536524a91 Merge branch 'master' into for-4.9 2016-09-06 12:35:56 -04:00
Vladimir Barinov 0baa64d8d2 arm64: dts: h3ulcb: enable USB2 PHY of channel 1
This supports USB2 PHY channel #1 on H3ULCB board

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-09-06 12:57:28 +02:00
Vladimir Barinov 4bdb25d0f1 arm64: dts: h3ulcb: enable WDT
This supports watchdog timer for H3ULCB board

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-09-06 12:57:27 +02:00
Vladimir Barinov b00d23f71f arm64: dts: h3ulcb: enable EXTALR clk
This enables EXTALR clock that can be used for the watchdog.

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-09-06 12:57:26 +02:00
Vladimir Barinov eb3f0f199f arm64: dts: h3ulcb: enable I2C2
This supports I2C2 bus on H3ULCB board

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-09-06 12:57:26 +02:00
Vladimir Barinov 144bf6ccb1 arm64: dts: h3ulcb: enable EthernetAVB
This supports Ethernet AVB on H3ULCB board

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-09-06 12:57:25 +02:00