Commit graph

18862 commits

Author SHA1 Message Date
Bjorn Andersson
0d84d64691 arm64: defconfig: Enable Qualcomm prima/pronto drivers
The Qualcomm prima/pronto drivers consists of a remoteproc driver boot
the combined WiFi and Bluetooth firmware on the related co-processor, a
control driver to load calibration and settings firmware, the wcn36xx
WiFi driver and the SMD based Bluetooth driver.

Enable these in the defconfig to provide Bluetooth and WiFi on devices
such as the Qualcomm Dragonboard 410c.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20211008192840.3593362-1-bjorn.andersson@linaro.org
2021-10-21 09:40:28 -05:00
Mark Rutland
bf6e667f47 arm64: vmlinux.lds.S: remove .fixup section
We no longer place anything into a `.fixup` section, so we no longer
need to place those sections into the `.text` section in the main kernel
Image.

Remove the use of `.fixup`.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20211019160219.5202-14-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:45:22 +01:00
Mark Rutland
753b323687 arm64: extable: add load_unaligned_zeropad() handler
For inline assembly, we place exception fixups out-of-line in the
`.fixup` section such that these are out of the way of the fast path.
This has a few drawbacks:

* Since the fixup code is anonymous, backtraces will symbolize fixups as
  offsets from the nearest prior symbol, currently
  `__entry_tramp_text_end`. This is confusing, and painful to debug
  without access to the relevant vmlinux.

* Since the exception handler adjusts the PC to execute the fixup, and
  the fixup uses a direct branch back into the function it fixes,
  backtraces of fixups miss the original function. This is confusing,
  and violates requirements for RELIABLE_STACKTRACE (and therefore
  LIVEPATCH).

* Inline assembly and associated fixups are generated from templates,
  and we have many copies of logically identical fixups which only
  differ in which specific registers are written to and which address is
  branched to at the end of the fixup. This is potentially wasteful of
  I-cache resources, and makes it hard to add additional logic to fixups
  without significant bloat.

* In the case of load_unaligned_zeropad(), the logic in the fixup
  requires a temporary register that we must allocate even in the
  fast-path where it will not be used.

This patch address all four concerns for load_unaligned_zeropad() fixups
by adding a dedicated exception handler which performs the fixup logic
in exception context and subsequent returns back after the faulting
instruction. For the moment, the fixup logic is identical to the old
assembly fixup logic, but in future we could enhance this by taking the
ESR and FAR into account to constrain the faults we try to fix up, or to
specialize fixups for MTE tag check faults.

Other than backtracing, there should be no functional change as a result
of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20211019160219.5202-13-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:45:22 +01:00
Mark Rutland
2e77a62cb3 arm64: extable: add a dedicated uaccess handler
For inline assembly, we place exception fixups out-of-line in the
`.fixup` section such that these are out of the way of the fast path.
This has a few drawbacks:

* Since the fixup code is anonymous, backtraces will symbolize fixups as
  offsets from the nearest prior symbol, currently
  `__entry_tramp_text_end`. This is confusing, and painful to debug
  without access to the relevant vmlinux.

* Since the exception handler adjusts the PC to execute the fixup, and
  the fixup uses a direct branch back into the function it fixes,
  backtraces of fixups miss the original function. This is confusing,
  and violates requirements for RELIABLE_STACKTRACE (and therefore
  LIVEPATCH).

* Inline assembly and associated fixups are generated from templates,
  and we have many copies of logically identical fixups which only
  differ in which specific registers are written to and which address is
  branched to at the end of the fixup. This is potentially wasteful of
  I-cache resources, and makes it hard to add additional logic to fixups
  without significant bloat.

This patch address all three concerns for inline uaccess fixups by
adding a dedicated exception handler which updates registers in
exception context and subsequent returns back into the function which
faulted, removing the need for fixups specialized to each faulting
instruction.

Other than backtracing, there should be no functional change as a result
of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20211019160219.5202-12-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:45:22 +01:00
Mark Rutland
d6e2cc5647 arm64: extable: add type and data fields
Subsequent patches will add specialized handlers for fixups, in addition
to the simple PC fixup and BPF handlers we have today. In preparation,
this patch adds a new `type` field to struct exception_table_entry, and
uses this to distinguish the fixup and BPF cases. A `data` field is also
added so that subsequent patches can associate data specific to each
exception site (e.g. register numbers).

Handlers are named ex_handler_*() for consistency, following the exmaple
of x86. At the same time, get_ex_fixup() is split out into a helper so
that it can be used by other ex_handler_*() functions ins subsequent
patches.

This patch will increase the size of the exception tables, which will be
remedied by subsequent patches removing redundant fixup code. There
should be no functional change as a result of this patch.

Since each entry is now 12 bytes in size, we must reduce the alignment
of each entry from `.align 3` (i.e. 8 bytes) to `.align 2` (i.e. 4
bytes), which is the natrual alignment of the `insn` and `fixup` fields.
The current 8-byte alignment is a holdover from when the `insn` and
`fixup` fields was 8 bytes, and while not harmful has not been necessary
since commit:

  6c94f27ac8 ("arm64: switch to relative exception tables")

Similarly, RO_EXCEPTION_TABLE_ALIGN is dropped to 4 bytes.

Concurrently with this patch, x86's exception table entry format is
being updated (similarly to a 12-byte format, with 32-bytes of absolute
data). Once both have been merged it should be possible to unify the
sorttable logic for the two.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: James Morse <james.morse@arm.com>
Cc: Jean-Philippe Brucker <jean-philippe@linaro.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20211019160219.5202-11-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:45:22 +01:00
Mark Rutland
5d0e790514 arm64: extable: use ex for exception_table_entry
Subsequent patches will extend `struct exception_table_entry` with more
fields, and the distinction between the entry and its `fixup` field will
become more important.

For clarity, let's consistently use `ex` to refer to refer to an entire
entry. In subsequent patches we'll use `fixup` to refer to the fixup
field specifically. This matches the naming convention used today in
arch/arm64/net/bpf_jit_comp.c.

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

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20211019160219.5202-10-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:45:22 +01:00
Mark Rutland
e8c328d7de arm64: extable: make fixup_exception() return bool
The return values of fixup_exception() and arm64_bpf_fixup_exception()
represent a boolean condition rather than an error code, so for clarity
it would be better to return `bool` rather than `int`.

This patch adjusts the code accordingly. While we're modifying the
prototype, we also remove the unnecessary `extern` keyword, so that this
won't look out of place when we make subsequent additions to the header.

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

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: James Morse <james.morse@arm.com>
Cc: Jean-Philippe Brucker <jean-philippe@linaro.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20211019160219.5202-9-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:45:22 +01:00
Mark Rutland
819771cc28 arm64: extable: consolidate definitions
In subsequent patches we'll alter the structure and usage of struct
exception_table_entry. For inline assembly, we create these using the
`_ASM_EXTABLE()` CPP macro defined in <asm/uaccess.h>, and for plain
assembly code we use the `_asm_extable()` GAS macro defined in
<asm/assembler.h>, which are largely identical save for different
escaping and stringification requirements.

This patch moves the common definitions to a new <asm/asm-extable.h>
header, so that it's easier to keep the two in-sync, and to remove the
implication that these are only used for uaccess helpers (as e.g.
load_unaligned_zeropad() is only used on kernel memory, and depends upon
`_ASM_EXTABLE()`.

At the same time, a few minor modifications are made for clarity and in
preparation for subsequent patches:

* The structure creation is factored out into an `__ASM_EXTABLE_RAW()`
  macro. This will make it easier to support different fixup variants in
  subsequent patches without needing to update all users of
  `_ASM_EXTABLE()`, and makes it easier to see tha the CPP and GAS
  variants of the macros are structurally identical.

  For the CPP macro, the stringification of fields is left to the
  wrapper macro, `_ASM_EXTABLE()`, as in subsequent patches it will be
  necessary to stringify fields in wrapper macros to safely concatenate
  strings which cannot be token-pasted together in CPP.

* The fields of the structure are created separately on their own lines.
  This will make it easier to add/remove/modify individual fields
  clearly.

* Additional parentheses are added around the use of macro arguments in
  field definitions to avoid any potential problems with evaluation due
  to operator precedence, and to make errors upon misuse clearer.

* USER() is moved into <asm/asm-uaccess.h>, as it is not required by all
  assembly code, and is already refered to by comments in that file.

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

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20211019160219.5202-8-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:45:22 +01:00
Mark Rutland
286fba6c2a arm64: gpr-num: support W registers
In subsequent patches we'll want to map W registers to their register
numbers. Update gpr-num.h so that we can do this.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20211019160219.5202-7-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:45:22 +01:00
Mark Rutland
8ed1b498ad arm64: factor out GPR numbering helpers
In <asm/sysreg.h> we have macros to convert the names of general purpose
registers (GPRs) into integer constants, which we use to manually build
the encoding for `MRS` and `MSR` instructions where we can't rely on the
assembler to do so for us.

In subsequent patches we'll need to map the same GPR names to integer
constants so that we can use this to build metadata for exception
fixups.

So that the we can use the mappings elsewhere, factor out the
definitions into a new <asm/gpr-num.h> header, renaming the definitions
to align with this "GPR num" naming for clarity.

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

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20211019160219.5202-6-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:45:22 +01:00
Mark Rutland
ae2b2f3384 arm64: kvm: use kvm_exception_table_entry
In subsequent patches we'll alter `struct exception_table_entry`, adding
fields that are not needed for KVM exception fixups.

In preparation for this, migrate KVM to its own `struct
kvm_exception_table_entry`, which is identical to the current format of
`struct exception_table_entry`. Comments are updated accordingly.

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

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Alexandru Elisei <alexandru.elisei@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will@kernel.org>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211019160219.5202-5-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:45:21 +01:00
Mark Rutland
139f9ab73d arm64: lib: __arch_copy_to_user(): fold fixups into body
Like other functions, __arch_copy_to_user() places its exception fixups
in the `.fixup` section without any clear association with
__arch_copy_to_user() itself. If we backtrace the fixup code, it will be
symbolized as an offset from the nearest prior symbol, which happens to
be `__entry_tramp_text_end`. Further, since the PC adjustment for the
fixup is akin to a direct branch rather than a function call,
__arch_copy_to_user() itself will be missing from the backtrace.

This is confusing and hinders debugging. In general this pattern will
also be problematic for CONFIG_LIVEPATCH, since fixups often return to
their associated function, but this isn't accurately captured in the
stacktrace.

To solve these issues for assembly functions, we must move fixups into
the body of the functions themselves, after the usual fast-path returns.
This patch does so for __arch_copy_to_user().

Inline assembly will be dealt with in subsequent patches.

Other than the improved backtracing, there should be no functional
change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20211019160219.5202-4-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:45:21 +01:00
Mark Rutland
4012e0e227 arm64: lib: __arch_copy_from_user(): fold fixups into body
Like other functions, __arch_copy_from_user() places its exception
fixups in the `.fixup` section without any clear association with
__arch_copy_from_user() itself. If we backtrace the fixup code, it will
be symbolized as an offset from the nearest prior symbol, which happens
to be `__entry_tramp_text_end`. Further, since the PC adjustment for the
fixup is akin to a direct branch rather than a function call,
__arch_copy_from_user() itself will be missing from the backtrace.

This is confusing and hinders debugging. In general this pattern will
also be problematic for CONFIG_LIVEPATCH, since fixups often return to
their associated function, but this isn't accurately captured in the
stacktrace.

To solve these issues for assembly functions, we must move fixups into
the body of the functions themselves, after the usual fast-path returns.
This patch does so for __arch_copy_from_user().

Inline assembly will be dealt with in subsequent patches.

Other than the improved backtracing, there should be no functional
change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20211019160219.5202-3-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:45:21 +01:00
Mark Rutland
35d67794b8 arm64: lib: __arch_clear_user(): fold fixups into body
Like other functions, __arch_clear_user() places its exception fixups in
the `.fixup` section without any clear association with
__arch_clear_user() itself. If we backtrace the fixup code, it will be
symbolized as an offset from the nearest prior symbol, which happens to
be `__entry_tramp_text_end`. Further, since the PC adjustment for the
fixup is akin to a direct branch rather than a function call,
__arch_clear_user() itself will be missing from the backtrace.

This is confusing and hinders debugging. In general this pattern will
also be problematic for CONFIG_LIVEPATCH, since fixups often return to
their associated function, but this isn't accurately captured in the
stacktrace.

To solve these issues for assembly functions, we must move fixups into
the body of the functions themselves, after the usual fast-path returns.
This patch does so for __arch_clear_user().

Inline assembly will be dealt with in subsequent patches.

Other than the improved backtracing, there should be no functional
change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20211019160219.5202-2-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:45:21 +01:00
Nick Desaulniers
3e6f8d1fa1 arm64: vdso32: require CROSS_COMPILE_COMPAT for gcc+bfd
Similar to
commit 231ad7f409 ("Makefile: infer --target from ARCH for CC=clang")
There really is no point in setting --target based on
$CROSS_COMPILE_COMPAT for clang when the integrated assembler is being
used, since
commit ef94340583 ("arm64: vdso32: drop -no-integrated-as flag").

Allows COMPAT_VDSO to be selected without setting $CROSS_COMPILE_COMPAT
when using clang and lld together.

Before:
$ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make -j72 LLVM=1 defconfig
$ grep CONFIG_COMPAT_VDSO .config
CONFIG_COMPAT_VDSO=y
$ ARCH=arm64 make -j72 LLVM=1 defconfig
$ grep CONFIG_COMPAT_VDSO .config
$

After:
$ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make -j72 LLVM=1 defconfig
$ grep CONFIG_COMPAT_VDSO .config
CONFIG_COMPAT_VDSO=y
$ ARCH=arm64 make -j72 LLVM=1 defconfig
$ grep CONFIG_COMPAT_VDSO .config
CONFIG_COMPAT_VDSO=y

Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Suggested-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lore.kernel.org/r/20211019223646.1146945-5-ndesaulniers@google.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:31:39 +01:00
Nick Desaulniers
14831fad73 arm64: vdso32: suppress error message for 'make mrproper'
When running the following command without arm-linux-gnueabi-gcc in
one's $PATH, the following warning is observed:

$ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make -j72 LLVM=1 mrproper
make[1]: arm-linux-gnueabi-gcc: No such file or directory

This is because KCONFIG is not run for mrproper, so CONFIG_CC_IS_CLANG
is not set, and we end up eagerly evaluating various variables that try
to invoke CC_COMPAT.

This is a similar problem to what was observed in
commit dc960bfeed ("h8300: suppress error messages for 'make clean'")

Reported-by: Lucas Henneman <henneman@google.com>
Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20211019223646.1146945-4-ndesaulniers@google.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:31:39 +01:00
Nick Desaulniers
a517faa902 arm64: vdso32: drop test for -march=armv8-a
As Arnd points out:
  gcc-4.8 already supported -march=armv8, and we require gcc-5.1 now, so
  both this #if/#else construct and the corresponding
  "cc32-option,-march=armv8-a" check should be obsolete now.

Link: https://lore.kernel.org/lkml/CAK8P3a3UBEJ0Py2ycz=rHfgog8g3mCOeQOwO0Gmp-iz6Uxkapg@mail.gmail.com/
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20211019223646.1146945-3-ndesaulniers@google.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:31:38 +01:00
Nick Desaulniers
1907d3ff5a arm64: vdso32: drop the test for dmb ishld
Binutils added support for this instruction in commit
e797f7e0b2bedc9328d4a9a0ebc63ca7a2dbbebc which shipped in 2.24 (just
missing the 2.23 release) but was cherry-picked into 2.23 in commit
27a50d6755bae906bc73b4ec1a8b448467f0bea1. Thanks to Christian and Simon
for helping me with the patch archaeology.

According to Documentation/process/changes.rst, the minimum supported
version of binutils is 2.23. Since all supported versions of GAS support
this instruction, drop the assembler invocation, preprocessor
flags/guards, and the cross assembler macro that's now unused.

This also avoids a recursive self reference in a follow up cleanup
patch.

Cc: Christian Biesinger <cbiesinger@google.com>
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20211019223646.1146945-2-ndesaulniers@google.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:31:38 +01:00
Mark Brown
5838a15579 arm64/sve: Track vector lengths for tasks in an array
As for SVE we will track a per task SME vector length for tasks. Convert
the existing storage for the vector length into an array and update
fpsimd_flush_task() to initialise this in a function.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20211019172247.3045838-10-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:18:17 +01:00
Mark Brown
ddc806b5c4 arm64/sve: Explicitly load vector length when restoring SVE state
Currently when restoring the SVE state we supply the SVE vector length
as an argument to sve_load_state() and the underlying macros. This becomes
inconvenient with the addition of SME since we may need to restore any
combination of SVE and SME vector lengths, and we already separately
restore the vector length in the KVM code. We don't need to know the vector
length during the actual register load since the SME load instructions can
index into the data array for us.

Refactor the interface so we explicitly set the vector length separately
to restoring the SVE registers in preparation for adding SME support, no
functional change should be involved.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20211019172247.3045838-9-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:18:17 +01:00
Mark Brown
b5bc00ffdd arm64/sve: Put system wide vector length information into structs
With the introduction of SME we will have a second vector length in the
system, enumerated and configured in a very similar fashion to the
existing SVE vector length.  While there are a few differences in how
things are handled this is a relatively small portion of the overall
code so in order to avoid code duplication we factor out

We create two structs, one vl_info for the static hardware properties
and one vl_config for the runtime configuration, with an array
instantiated for each and update all the users to reference these. Some
accessor functions are provided where helpful for readability, and the
write to set the vector length is put into a function since the system
register being updated needs to be chosen at compile time.

This is a mostly mechanical replacement, further work will be required
to actually make things generic, ensuring that we handle those places
where there are differences properly.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20211019172247.3045838-8-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:18:17 +01:00
Mark Brown
0423eedcf4 arm64/sve: Use accessor functions for vector lengths in thread_struct
In a system with SME there are parallel vector length controls for SVE and
SME vectors which function in much the same way so it is desirable to
share the code for handling them as much as possible. In order to prepare
for doing this add a layer of accessor functions for the various VL related
operations on tasks.

Since almost all current interactions are actually via task->thread rather
than directly with the thread_info the accessors use that. Accessors are
provided for both generic and SVE specific usage, the generic accessors
should be used for cases where register state is being manipulated since
the registers are shared between streaming and regular SVE so we know that
when SME support is implemented we will always have to be in the appropriate
mode already and hence can generalise now.

Since we are using task_struct and we don't want to cause widespread
inclusion of sched.h the acessors are all out of line, it is hoped that
none of the uses are in a sufficiently critical path for this to be an
issue. Those that are most likely to present an issue are in the same
translation unit so hopefully the compiler may be able to inline anyway.

This is purely adding the layer of abstraction, additional work will be
needed to support tasks using SME.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20211019172247.3045838-7-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:18:17 +01:00
Mark Brown
059613f546 arm64/sve: Rename find_supported_vector_length()
The function has SVE specific checks in it and it will be more trouble
to add conditional code for SME than it is to simply rename it to be SVE
specific.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20211019172247.3045838-6-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:18:17 +01:00
Mark Brown
9f58486657 arm64/sve: Make access to FFR optional
SME introduces streaming SVE mode in which FFR is not present and the
instructions for accessing it UNDEF. In preparation for handling this
update the low level SVE state access functions to take a flag specifying
if FFR should be handled. When saving the register state we store a zero
for FFR to guard against uninitialized data being read. No behaviour change
should be introduced by this patch.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20211019172247.3045838-5-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:18:17 +01:00
Mark Brown
12cc2352bf arm64/sve: Make sve_state_size() static
There are no users outside fpsimd.c so make sve_state_size() static.
KVM open codes an equivalent.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20211019172247.3045838-4-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:18:17 +01:00
Mark Brown
b53223e0a4 arm64/sve: Remove sve_load_from_fpsimd_state()
Following optimisations of the SVE register handling we no longer load the
SVE state from a saved copy of the FPSIMD registers, we convert directly
in registers or from one saved state to another. Remove the function so we
don't need to update it during further refactoring.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20211019172247.3045838-3-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:18:17 +01:00
Mark Brown
2d481bd3b6 arm64/fp: Reindent fpsimd_save()
Currently all the active code in fpsimd_save() is inside a check for
TIF_FOREIGN_FPSTATE. Reduce the indentation level by changing to return
from the function if TIF_FOREIGN_FPSTATE is set.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20211019172247.3045838-2-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-21 10:18:16 +01:00
Caleb Connolly
89139102d3 arm64: dts: qcom: sdm845-oneplus: enable second wifi channel
Like the c630, the OnePlus 6 is also capable of using both antenna
channels for 2.4 and 5ghz wifi, however unlike the c630 only the first
channel is used for bluetooth.

Signed-off-by: Caleb Connolly <caleb@connolly.tech>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211020163557.291803-1-caleb@connolly.tech
2021-10-20 18:00:05 -05:00
Arnd Bergmann
ddcb48fa7d Visconti defconfig updates for v5.16
- Enable Visconti's PCIe host controller in the ARM64 defconfig
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEXmKe5SMhlzV7hM9DMiR/u0CtH6YFAmFqAg4ACgkQMiR/u0Ct
 H6YmFw/+JbLxVCH+qffJEgZp5gkhENOD/xK4SRhIiLhRrEgrQkl3B0wen5+LU/NJ
 dsNGf/dmqR+d8KNS84u/xUWZXCgdRg+gH/QpiidewVOyBEdBJ8tTU/eZYPXo2dm2
 1deGgzSmKV3GA16QchN0+r5i69v3bbzj8VfWXvDXnLvKKlBUYhsr5H7RV4RqVOJd
 jDEWLGV3BlTk1EJ/5NhLnC7T+KxLE67rQsFIOMEfOV/KnIaoQL5WoH+K0YCl8TjM
 R7STF8upC9VxkyzOGkiK6Gab3Lnh3JswncqW9+TlQXMamu8aZkv+992DkTbSw/n8
 H6dB1gWSAgrPIZGqO0GDHMgE6LIeT3+LS/GRUUczkcSrhjxQ4HeZqjQohiMoH/oS
 pJdiPkVCVh2y1gOyYI9oNYzPBmhrITxqcYyhelrTGqOR7ouok9f0xTngWUgXdhvc
 NvsIqI0z2BHxvO9dsIQ8osYqgPAn8DDlu2fvXmlMhLZ+5f9h48XCk/m3gMj7sF82
 NopgnaZ1cuYtIPAxFlbaiivsCfcQAOdA1pTz0jDA2SREszP6QtZw1auBqTQl+JR0
 5keX+O8UT0FvzCRS44160KKvtqwdI069VC7DMUVi427J7D2JzKiuKW6hhluZyTqj
 B8uXjLR8zHHbbMs0irpvF0T4zNdtEfOT8XO9NBirBp62x8TnSuA=
 =ID9z
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFwig8ACgkQmmx57+YA
 GNlmAA/+MbWd3lbgPRWt2VfWOBD6U7odTFSnUlgzohL5rgIZGR0FL0G0fOFlQGRE
 jsHHck6ejHea26YQVhR9uH83RNaxLdHScLwdKlT/g8GWjc3NudLBICCBjjpW7YfK
 cXGSQ4giiO5OQxE2YrwW8NsQ0RBXW3qCufQOgDX/3OOthtd0qn98YvL6rWPNqPHZ
 3AqlUPwp1zdXedcRJnrCt3u8vW0RsSEW8ebtPHEDtGEOtGYXl9Bl5oaUw6u4L3zn
 cVw+wwEZrLglh5oBPvPRYRtUPX7XEV9DuFhMLwRUdaQUf91zFu5jFtZRNpICT6Vi
 29FFwGdKirAeuvZObzd+ip1hls+/YrpVyJ84xQy81sK6kntquAY80/WGCMYHGUNn
 W/sPpqCvWZZvuwcVl6iSj6wcUzudNjdB1GrAkHVwXchsmN7Fkw+UKIn56tfFM67n
 goSlWfOxebyAa/6K2FBJvmoAmcRSNbQDZ3WSN+cWCDgjh+PDUv5QHtd2fSIjI3pD
 BZBSUvxZvMepBBfJY3jXHqlC2r+45WNZd2qosV12cIkqeSBF4shbu4muT0x1UoxL
 p/zpOlb7G7oB9OsMc1RyB27kvAGVk26x39VE+TdF+Ti8rT0HpHMUDdvnaHLsYA4g
 MB49Fq7KITmEAmDxSKZ5++iMrNVNCEJLCUdWwkCVlQ675mR37VM=
 =OAnU
 -----END PGP SIGNATURE-----

Merge tag 'visconti-arm-defconfig-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/iwamatsu/linux-visconti into arm/defconfigs

Visconti defconfig updates for v5.16

- Enable Visconti's PCIe host controller in the ARM64 defconfig

* tag 'visconti-arm-defconfig-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/iwamatsu/linux-visconti:
  arm64: defconfig: Visconti: Enable PCIe host controller

Link: https://lore.kernel.org/r/YWoIf4xPoQtLhC3x@toshiba.co.jp
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-20 23:28:47 +02:00
Florian Fainelli
9db71e8966 arm64: broadcom: Removed forced select of interrupt controllers
Now that the various second level interrupt controllers have been moved
to IRQCHIP_PLATFORM_DRIVER and they do default to ARCH_BRCMSTB and
ARCH_BCM2835 where relevant, remove their forced selection from the
machine entry to allow an user to build them as modules.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211020184859.2705451-12-f.fainelli@gmail.com
2021-10-20 20:06:34 +01:00
Neil Armstrong
dfd8c90eb2 arm64: meson: remove MESON_IRQ_GPIO selection
Selecting MESON_IRQ_GPIO forces it as built-in, but we may need to build it
as a module, thus remove it here and let the "default ARCH_MESON" build as
built-in by default with the option to switch it to module.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210902134914.176986-3-narmstrong@baylibre.com
2021-10-20 19:38:21 +01:00
Rob Herring
4d97b9290e arm64: Use of_get_cpu_hwid()
Replace the open coded parsing of CPU nodes' 'reg' property with
of_get_cpu_hwid().

This change drops an error message for missing 'reg' property, but that
should not be necessary as the DT tools will ensure 'reg' is present.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Will Deacon <will@kernel.org>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Link: https://lore.kernel.org/r/20211006164332.1981454-5-robh@kernel.org
2021-10-20 13:36:44 -05:00
Linus Torvalds
0afe64bebb Tools:
* kvm_stat: do not show halt_wait_ns since it is not a cumulative statistic
 
 x86:
 * clean ups and fixes for bus lock vmexit and lazy allocation of rmaps
 * two fixes for SEV-ES (one more coming as soon as I get reviews)
 * fix for static_key underflow
 
 ARM:
 * Properly refcount pages used as a concatenated stage-2 PGD
 * Fix missing unlock when detecting the use of MTE+VM_SHARED
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmFtuqYUHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroNGbAf9Ha4mlieY7lDQLk96GydPwlMofi1B
 dteRaWizokT0Xk7HovPr8G1zwwE9DrqO1FuHiZrkckzf7cloaPDvncLag3D3Vakr
 dWIqa7MaavSWBKDpcEIKOEo2SfIBU38xXQSEpegz2f2fhZK0Ud2xUNtGQMNrYatX
 Lz6FXHRvHDmv4+9EjASoGBd0/C/NxMaumYa1VOxMt8JPyn+zho0z5rUDKDF4pg70
 KAgxVZuksy15XFRTgaSaU0BqVn9uCHwZVqRFKBm+ocPXIFjhdMkgrxJ7NSYB1T+N
 VFqcUBTFTjhg9e5eZnQ6GMf9FXpLzK912VhCRd0uU5PGeBwUDJTSnyu5OQ==
 =GZqR
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull kvm fixes from Paolo Bonzini:
 "Tools:
   - kvm_stat: do not show halt_wait_ns since it is not a cumulative statistic

  x86:
   - clean ups and fixes for bus lock vmexit and lazy allocation of rmaps
   - two fixes for SEV-ES (one more coming as soon as I get reviews)
   - fix for static_key underflow

  ARM:
   - Properly refcount pages used as a concatenated stage-2 PGD
   - Fix missing unlock when detecting the use of MTE+VM_SHARED"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: SEV-ES: reduce ghcb_sa_len to 32 bits
  KVM: VMX: Remove redundant handling of bus lock vmexit
  KVM: kvm_stat: do not show halt_wait_ns
  KVM: x86: WARN if APIC HW/SW disable static keys are non-zero on unload
  Revert "KVM: x86: Open code necessary bits of kvm_lapic_set_base() at vCPU RESET"
  KVM: SEV-ES: Set guest_state_protected after VMSA update
  KVM: X86: fix lazy allocation of rmaps
  KVM: SEV-ES: fix length of string I/O
  KVM: arm64: Release mmap_lock when using VM_SHARED with MTE
  KVM: arm64: Report corrupted refcount at EL2
  KVM: arm64: Fix host stage-2 PGD refcount
  KVM: s390: Function documentation fixes
2021-10-20 05:52:10 -10:00
Arnd Bergmann
e23c7487f5 Two patches to fix the GMAC PHY mode on some boards.
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYW0pwAAKCRDj7w1vZxhR
 xcbPAQDtUoZcjLPx7X5Pn28UiqRaNr7bVR/A7lzXvyCRUGrqpgD/UyXP/KlWSXAY
 YXRzrksiJvPh7cLDPqLQCutLFMQKJAY=
 =VLd/
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFwHusACgkQmmx57+YA
 GNm2exAAmvpGmTiUXd359nciMXudXbgVmYa9EqnTcYPKftNqCZmC4tyrogVcyJXI
 La06ucXq7+YAFZwBA6Dz/dNFvLSXyhl7Q18ouDlPPiSk+8VL1yGIaa97xvEiJFqQ
 LQtoxkzbipRLef9zQKWcYSSvAHBpFqeFRnG8b3CEFWz64pQO2AJiqcE4Q8O61kSh
 A6PTSlFq5y9qOX2mvLPukzUGc+ZlvaJ80hgEimonddkPSEOAwifuJW6v5jndVOiU
 xql4cqczwk4DlZsCREPdX8NbvCEYAzh+Iqhovyk53AQaGk3OQIHILVv/Ix2G1bpT
 crbBnm92IMMRVbnRmkfOUFq6bawJFiUTPVh9jdS4nBiIm2VA+f/ES0pR74aint/i
 gpKzx+71G0g2Km8OaF0ZN+sZaitMzKTrF6y5b1VbOdNqFIPXGcp/LUjGJn6Gj5Py
 az5zg4lqdjFdIbLj8Ek2CaAvRDIWQzwH/Ut/Y7btSZvf2MxV+FAyqF+SC7BGFUjb
 DNE1lOoH8OT7+Dw52mnSPa7dbMTVuYpwq1Bm5oOre5rCmOzJJlQfTKEAhR/PgR44
 e/HRprmYXmlk3bGf9RP1puhKWHEbSrBtBThZhmjmY7sCX4A5feGMWnWecoUUfyqR
 sc3TlqR+UhJJwNTT6u2iK1Qier4YpiaiN8XYRwzC6Ca+i7camgs=
 =Eb+K
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-fixes-for-5.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes

Two patches to fix the GMAC PHY mode on some boards.

* tag 'sunxi-fixes-for-5.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  ARM: dts: sun7i: A20-olinuxino-lime2: Fix ethernet phy-mode
  arm64: dts: allwinner: h5: NanoPI Neo 2: Fix ethernet node

Link: https://lore.kernel.org/r/d4c41c71-f1ff-4464-a26f-1bfd4b52fd78.lettre@localhost
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-20 15:51:38 +02:00
Arnd Bergmann
72cd4e3bde i.MX fixes for 5.15, round 4:
- A series from Frieder Schrempf to fix i.MX8MM Kontron N801x board on
   various aspects, voltage settings, GPIO polarity, SPI clock frequency
   and Ethernet PHY type.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmFsuuoUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM525QgAlFAdFWkUddaPS4QNc5ZsCgVkl8ER
 lwWWnFpTFMQuiif8LtQeWTpVOM+O9czkYk0MlOfuDowNa5J3/5lRFlScwNFPWnnt
 uccY9UI2LG1olLSMJTgK6XfHVf/6C13l6Hg1zS+ukBwozTQCrbdMIVG89iC5Gxsp
 NgN9jvmw6Zs8dqYYiDe9thcPplcdreLwySnVmVg48LWQKGEGM1pTA0HMM7L6zGHz
 f1irBfX7U5HE6nJLKtD/4+C+1nPdWxm7ESM1lWiPCnDYOnvSKjY2iuCEugnYfAFC
 yzTTrlckcTpy/oohT0Ni6J/ZLqKEPdfuVg87tSmNd+tU9MYovzLxvweSLA==
 =YjPJ
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFwHnIACgkQmmx57+YA
 GNl4YQ/+Or42vIZvBaECWVAc8cd0RNAOt8isbUYowcXdG9TevFMHK2EfeYKe/HCg
 BDTtIpapy01nYoHxYvEVPEuU52GVNZMqfdcC9hvmQXwJ+0vAlyEpQ5CNvoouRlbu
 3YyckHIOZ58AlJGiF9hV6f4V20bQaIWdE8wEKN0nZNewcq3Y0vjODDP6KoQcflVW
 lHBlt2N5LKf+B0+F7sHO/bEzZUFy2z3Vs0tpNo+zE6DHkhUBVVGZvx232nkhbcPY
 UANLHq/a+3dEQKvm9N2ppK4c5yMYLWrjo4NnEv4TyPW+e3lTEyyZK8ZMY/CPM7dx
 sLgSNILjUvml5fvCAVVYpi6bZlvPerFbfDs2l262/iTL4vhTZghDsquQgMybCzm4
 bwW41nGGOrj+2dJXXvHlN02Y7Se90O2wGRhLnWAfMTNbAZrkjfMhVYNtxSgB1X1W
 o9IcavZQ1MELdJdxU7x8toxJXCAMMhugssWPAfT/vCdfDCPeEGasFqwGijmjhdNT
 /gK37CRDWynXpQk1aYjG48lYTVkM6M3imgnzZG39S9emCUlb8P+RI2dtjLgOm+Xy
 qwPZAr05UnqobinApYWbq5ZJHc4O4Iuux0VRfF/4C6GrLyL43eMJQkhdKo9KGkrA
 Q2+5mIvbLCiZY9KUd9XokOD9AeMSNvsuDzPVa/j/LeSOVeYiBSc=
 =/+Bt
 -----END PGP SIGNATURE-----

Merge tag 'imx-fixes-5.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes

i.MX fixes for 5.15, round 4:

- A series from Frieder Schrempf to fix i.MX8MM Kontron N801x board on
  various aspects, voltage settings, GPIO polarity, SPI clock frequency
  and Ethernet PHY type.

* tag 'imx-fixes-5.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  arm64: dts: imx8mm-kontron: Fix connection type for VSC8531 RGMII PHY
  arm64: dts: imx8mm-kontron: Fix CAN SPI clock frequency
  arm64: dts: imx8mm-kontron: Fix polarity of reg_rst_eth2
  arm64: dts: imx8mm-kontron: Set lower limit of VDD_SNVS to 800 mV
  arm64: dts: imx8mm-kontron: Make sure SOC and DRAM supply voltages are correct

Link: https://lore.kernel.org/r/20211018000958.GC25810@dragon
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-20 15:49:38 +02:00
Arnd Bergmann
40e7a3994c Idle-cooling information for rk3399, rk356x additions (tsadc resets,
i2s, spdif, pwm), rk3368 powerdomains, fixes to make gpio subnodes
 compliant with the new pinctrl yaml binding and addition of the
 chassis-type for the non-sbc devices.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAmFv1n4QHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgaWuB/4zghoZB6CEJqgAx29LCTDK/x0GSRcEEgzD
 2Tkh9IZ/ApK5ZaJ6GRB0455NEqn2VrYjPTobJz3sy/gVxRfJIzp8PU+FMdB00F4m
 PYeEPTNq1KMmhZ1NA7QVKmUdCpWWgoDtbZS1jdp6DyXF51UlKplx+HVq9UqtQcTg
 RQbibYm8jEAM5e5PIJLFxhlBO3Ook1LjQNtOcRlvb/0C81vT1LmWEgFqqCKsueVh
 s3sNF796pRr33OLWDFGoOjn7IhONC/s8EePjcZQ/fnmBPKe8It9E+glkDwAYYSs4
 gx7Tr8bCGqR084BCMREph0K5sftrgIt/7fghWM27Q0BFqJUQhjdj
 =9an1
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFwG3cACgkQmmx57+YA
 GNlR+w//UN7oaUYwiz9wbMkNwa++TkbkHvbHZjVXTyxchC9nff6dkuiVqHqbcE2p
 dozTIblJZC5TNy90/pyNVIn6RcUfK505Uq8DsdGW0kwP2tmNkAMFOYiY5cEqygh/
 zHKp7HwrewdFi/PlsL4zw6F+aLFc2RnNa0fwJ3W8XxFbRHrGjbnxawZ1EbedraV7
 pF3NFbsNj9wW3XHFiD3gMWEjqUT/TBRl6AkKuGDNlJFR+CJkaEzxo1e4ygI4quYx
 qtTrrKbO5VvwbJVFE7XHNCphU16Tqm9AWgOrsJ1HKkBmLGpcaobNQd4n1l0cxjm9
 JrvVYF9CXhRSQMkIG3yR1mveQiUfjR7BjKqiZV6yQGOMUOHbocN74lcjLYHlgLCZ
 UnPDUUnOQHOrwDd2RypiFoydmviJ2UviBSd0SmEZZ461uYHllBxM/Rc/nUWk7OC9
 Cvm2/288+TbfRj/8Jd0I1Z9PW+wDKQsY2KYhxPvhNH1JUyw1+NyfnuAiurdkDlC9
 eyJvZPhchcZ9PvgezXSLRcKQNeYbTrWNNSvQZ5PjMu7/BJbFpMteVYALh1HiS7wE
 WDt2za7lBUINyUgirCapgHPlXrXOjFKDGMQ6Soz+xGsLFgm1jpIVwIo9au3jP6Uw
 JqEQq4oSrh5ljzMT9r8J+jNbB7lG0XgW/wJHRqpWCA6VMZwkEsk=
 =9Cbe
 -----END PGP SIGNATURE-----

Merge tag 'v5.16-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt

Idle-cooling information for rk3399, rk356x additions (tsadc resets,
i2s, spdif, pwm), rk3368 powerdomains, fixes to make gpio subnodes
compliant with the new pinctrl yaml binding and addition of the
chassis-type for the non-sbc devices.

* tag 'v5.16-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  arm64: dts: rockchip: Add idle cooling devices to rk3399
  arm64: dts: rockchip: fix resets in tsadc node for rk356x
  arm64: dts: rockchip: Add analog audio on Quartz64
  arm64: dts: rockchip: Add i2s1 on rk356x
  arm64: dts: rockchip: change gpio nodenames
  arm64: dts: rockchip: add 'chassis-type' property
  arm64: dts: rockchip: add powerdomains to rk3368
  dt-bindings: arm: rockchip: add rk3368 compatible string to pmu.yaml
  arm64: dts: rockchip: enable spdif on Quartz64 A
  arm64: dts: rockchip: add spdif node to rk356x
  arm64: dts: rockchip: add pwm nodes for rk3568

Link: https://lore.kernel.org/r/4536780.s7XYDJ6uuW@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-20 15:36:54 +02:00
Arnd Bergmann
b4ebc083a3 Our usual round of DT patches for the 5.16 merge window, with:
- DT schema fixes
   - I2S support for the R40
   - HDMI support for the pinetab
   - devfreq support for the A64 GPU
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYW0plgAKCRDj7w1vZxhR
 xSEGAQDa/QH/zUCGYSsTFiohTViNSKjkL7gkbWG/COl/ziGsWAD/XXzE8V3v4rfC
 pqHSiEX84R+9fkXqOAxsDiPjN/lZDg8=
 =5dvW
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFwGW4ACgkQmmx57+YA
 GNnJdRAAtRb/shHZN4dCp62Qo1/1FCg1x/c3CesKiUw1YgRnOH5yK92JGos2gikk
 F90BYeJ6l8kpoMIEcikCLph/j76BmMwk2l4tM+U5OdpDkdN6s7Ozx79LVhA2OksP
 TG0R/AYxswuFBvlFK/hql8vhixllDZmhMXQn1lXAxU+2rWMPQ/cD3mHz7lLPOD3o
 ELCdrocL3BUzL3KH74ygY6d6xLUuuV7w45kh8j3P3MfCNEVusP+AXAcWCNa5tyUp
 MVMk+kXLmmZks+gpEJLHRbn2qG3gfrOVC7Wv1+C7lST5KiWbN51qLEvM5oWJAJq/
 aJIbinHz23iWcVAa51pE0O/v3xaWK5sXLsO5H6s1OmDFN29XNrRBfhemDmEjRtdJ
 b3gpxb5LIbGktjMfEGfIZVo5YzCbCj6KpNVjTXilnrDoySuwtIHSq7cywSZSjAHL
 WU5Lg7SiUiF/17/xaREL8PcTFRQMkLCUozPuXRj42fMk8QwAIJd0SpqznEAIzFzd
 +ttPD77D4vh4hBP8P9StCjlbXoMnu81VWSqiVpGg4YGF28pisqAvszxS1kAIYtIs
 12wtZ9tvMwgWnRZ5NfvwbPGyGJHT0sg/x5CoN3LlNhW5RFF7oUohgWmq4tlUQHzm
 5fZb3NbJ2g9SuxNfCf5MSLc1oTCS7FyNxRZlV6DKi3o8Kg1B7TE=
 =1brv
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-dt-for-5.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt

Our usual round of DT patches for the 5.16 merge window, with:
  - DT schema fixes
  - I2S support for the R40
  - HDMI support for the pinetab
  - devfreq support for the A64 GPU

* tag 'sunxi-dt-for-5.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (21 commits)
  dt-bindings: interconnect: sunxi: Add R40 MBUS compatible
  arm64: dts: allwinner: NanoPi R1S H5: Add generic compatible string for I2C EEPROM
  arm64: dts: allwinner: pinetab: Add HDMI support
  arm64: dts: allwinner: a64: Add GPU opp table
  ARM: dts: sun8i: r40: Add I2S nodes
  dt-bindings: sound: sun4i-i2s: add Allwinner R40 I2S compatible
  arm64: dts: allwinner: teres-i: Remove wakekup-source from the PMIC
  arm64: dts: allwinner: teres-i: Add missing reg
  arm64: dts: allwinner: pinetab: Change regulator node name to avoid warning
  arm64: dts: allwinner: a100: Fix thermal zone node name
  arm64: dts: allwinner: h6: Fix de3 parent clocks ordering
  arm64: dts: allwinner: h5: Fix GPU thermal zone node name
  ARM: dts: cubieboard4: Remove the dumb-vga-dac compatible
  ARM: dts: tbs711: Fix touchscreen compatible
  ARM: dts: sunxi: Fix the SPI NOR node names
  ARM: dts: sunxi: Fix OPPs node name
  ARM: dts: sunxi: Fix OPP arrays
  ARM: dts: sunxi: Rename gpio pinctrl names
  ARM: dts: sunxi: Rename power-supply names
  dt-bindings: sunxi: Add Allwinner A80 PRCM Binding
  ...

Link: https://lore.kernel.org/r/5cad5ac6-187d-4d36-9437-5821c6e8242d.lettre@localhost
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-20 15:28:14 +02:00
Arnd Bergmann
8d2214d3a6 i.MX arm64 device tree changes for 5.16:
- New board support: LX2160A based BlueBox3, S32G2 EVB and RDB2 boards.
 - Quite some updates on imx8mq-librem5 board: delay the startup of the
   SDIO, add power sequencing for M.2 cards, add wifi regulator, add
   panel reset GPIO, fix led_r and led_g pinctrl, etc.
 - Fix the SPI chipselect polarity for a couple of i.MX8MM boards.
 - Add GPU nodes for i.MX8MM 2D and 3D core.
 - Add VPU and DISP blk-ctrl devices for i.MX8MM.
 - A series from Michael Walle to LS1028A device trees and add GPU
   support.
 - Random and small updates on various boards.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmFq1WAUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM5d6Qf8C9tNUuEUzyFvdoT3LCXpDDu3S7d+
 h338KpG8wDiPE+NDwdLy6DDRfzkADG6GHb01VXX9d4jNbCnJ4JD91RaMfnaWgB0u
 F8bIE1da4Sf3gGqIQjkAoybZpS2ptELwvOtFfooyjdl/b6x5+9d37jkbCnfYDltM
 a6GITAXlwm+T2B3uLY0efuPvqONhPzp35M2wUy5WdR0h/I/CjeRu8h413gqmMHeR
 vLjT5kXoBUzOhCe9UNKkCw83NCGwY45VPlFcMufoKBcxZyvhh1ejJfde7ixegC/a
 c/kaeJ96xz/Cf/bkoB+IDWzzZtHyXhXjopayANvGroGgPLGmZ+evrmPjyw==
 =jwqD
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFwF1UACgkQmmx57+YA
 GNmB6Q//TOjUVVh2sISf0MyJ5kjgLUghzifqXuC3ssjucxDdr26ig7qOuV5tsmgW
 8SKClAhdxciDTY3o7fdgkygp6jRUc5T8ChRrjuUsGh/6JRbc1z+cUcFJixzdQNFr
 zYFTMoy6mxAvFKNme7+I/4Vliw0WUYnsBwuevkE3svMH1EJDaO9/9hVIKYsffUSs
 4VzhwvEJYex+9IJP9h/BzLzsl0xnHweVN34I+741esBzC4V+1n2HlnfDDCHrDcJk
 deTVwAGG1SDs80ZDP/JgwSN72OmiMy5U8si6BIRvyL1qh5DsDfuK4QFqxhI9aqhJ
 C9WxMmc2jwF28b8AytS/7G/+up4t286D4ZQA+RXU826AujHYjnsQLq9A4bvZIwgG
 24BDj3bYRD2gGvBRKJ/oJlVwjr1I7l3FHhcSIiwfk6Kqa0iLcGwJ15ICq3P7ZS5Y
 ftTW/zn2M7KhzlYU8ogi+ILM7EFkr2GvtamyGP4rIm2fUVM0kQu9p6ky7haD94lR
 Ck9bsQ6tdIW/ubBBJdzGdaGg+GKMqsBYR4fNk2LTDiPZYSyK/rpKhBOLPRBrlLl1
 8VI/aL0UEyNC9pWU1kAQ8VVNPNXwb4CVnaAEcGq9dGNrvUvD19yVC8QUwlE9LsEB
 mkwwfRO6LfSWPq7gdmPrVF213j6U5mlXPIhYcsmMOFqucDDWFfY=
 =8EVG
 -----END PGP SIGNATURE-----

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

i.MX arm64 device tree changes for 5.16:

- New board support: LX2160A based BlueBox3, S32G2 EVB and RDB2 boards.
- Quite some updates on imx8mq-librem5 board: delay the startup of the
  SDIO, add power sequencing for M.2 cards, add wifi regulator, add
  panel reset GPIO, fix led_r and led_g pinctrl, etc.
- Fix the SPI chipselect polarity for a couple of i.MX8MM boards.
- Add GPU nodes for i.MX8MM 2D and 3D core.
- Add VPU and DISP blk-ctrl devices for i.MX8MM.
- A series from Michael Walle to LS1028A device trees and add GPU
  support.
- Random and small updates on various boards.

* tag 'imx-dt64-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (37 commits)
  arm64: dts: imx8mm-kontron: Add support for ultra high speed modes on SD card
  arm64: dts: imx8mm-venice-gw7901.dts: disable pgc_gpumix
  arm64: dts: imx8mq-librem5: set debounce interval of volume buttons to 50ms
  arm64: dts: imx8mq-librem5: Limit the max sdio frequency
  arm64: dts: imx8mq-librem5: add power sequencing for M.2 cards
  arm64: dts: imx8mq-librem5: delay the startup of the SDIO
  arm64: dts: imx8mq-librem5: wire up the wifi regulator
  arm64: dts: imx8mq-librem5: Fix led_r and led_g pinctrl assignments
  arm64: dts: imx8mq-librem5: add reset gpio to mantix panel description
  arm64: dts: imx8mm-kontron: Fix reset delays for ethernet PHY
  arm64: dts: imx8mm: add DISP blk-ctrl
  arm64: dts: imx8mm: add VPU blk-ctrl
  arm64: dts: imx8mm: Add GPU nodes for 2D and 3D core
  arm64: dts: imx8mm: put USB controllers into power-domains
  arm64: dts: imx8mm: add GPC node
  arm64: dts: ls1028a: mark internal links between Felix and ENETC as capable of flow control
  arm64: dts: freescale: Fix 'interrupt-map' parent address cells
  arm64: dts: ls1028a: use phy-mode instead of phy-connection-type
  arm64: dts: ls1028a: move PHY nodes to MDIO controller
  arm64: dts: ls1028a: disable usb controller by default
  ...

Link: https://lore.kernel.org/r/20211016140138.1603-4-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-20 15:19:17 +02:00
Arnd Bergmann
06ddf8fb43 Visconti device tree updates for 5.16
- Add DT support for Toshiba Visconti5 PCIe driver
  - Add 150MHz fixed clock to TMPV7708 SoC
  - Add DT support for VisROBO VRB boardi
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEXmKe5SMhlzV7hM9DMiR/u0CtH6YFAmFp/18ACgkQMiR/u0Ct
 H6YOmg/+Ng0rfRZY4fmOowcbuKBoLf4p2oYzVpL9quiytVfN9JMPYAG6+n3q1cls
 d0uVzJOQKz/dHtKRHsJfDIkW/iyGvrehErzLHRbEZlQSnXbWMi/x0VummvFQ83n1
 bA0foo6atLrjh2zYhPBSN8QDCRxPt9MvGcAxRLhEVTNZVmv0nM8QKVZLwfiTVZYA
 LR87Nu/hEu1/I1wG0BYMUnTLkfWzU4sNX70LzpzLuXQgPLbd2rQVEDB7EGgkLqNI
 jNkbvXRRe4qB0JqMxMPqYwFIvT5MyC3CeNL3CbxW1JlfN4mKQE871bFqkbfKZFXV
 J2YNze+M9zwAhpRaoEayg5UuMlbmyYHLGrGp96oOpkbrJpZTAe0HlWwC/L96u9lR
 mUnQ8Dxi4Ti6vC8jgUsvAvtQB3ypKQ+bxdfLRxU9yyeoiMDk5imVwXbSA5dBctaa
 bdFFuufDR+3hRq0xmbNsNt4UktetqFOmuq69Fhoj3TUJzrm4CWBzQZOh18tvVVIH
 KVq4ZRKqdmFqj3GXQEB355AldZwFRYDK0J8xGoWbXOWLY3fYsLigOduSdRDmkiFp
 DMEK8XZzDOX3wQIDmDuO7GH80hcyspH+Xwtk1rHN24zvmMQHoFqMw3r4XkdDnh3S
 QNPi6Fui5ug83bYI06x6hB7N2NGDlwIt26zseyw+T3gMaTi//2k=
 =kZJg
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFwEqUACgkQmmx57+YA
 GNkS6Q/+Mdvx0q4i35ZJcKt7syucV0KKFTh6gmjPFxDBRfIkGv/YDG1ysKCNHEBl
 RYC9n+zrQF8AALkk2WFV0Z3DyvlhzjnL4We6oKng/9w4DbpGHLiDnL/zrWFCWOCD
 I37iSQU2zwTVvANYRahyvQXTT6WMrUdq2vNVHDQOmc4kl2xBbU6txM9NNTSD8RWn
 v5eFnTQXAjX+kMzje7NYYi4I6jsVSWu/yfVviVXBwpi1frRLj3LkxXex5rea5gaj
 7k/Nfii2m/l9XR6/cpdu5etZLYoxPdEoRXghomXjMn3NU6M5gMqrcGBYphFvUFOj
 WsRddBPK+BfoKXU+xM/BpZsn4O05naNbgxmPPs+kZDg+AjmDyVXTdpugLT865Fwp
 2JDYCt9U/k4smiFsWeKpfAwZt5Y5gPQfjQm9VqLtf4QK9wfTHmrVD96NauTGxYwR
 AS/UEBxwxxH+uLWtVVJ55HvbvoQlhRBvMR1mR+F7pLDx7AlaVH5OmbR5CCZdX/LI
 dtLJynt0lbd3pZ3bHjSJBFlhlmpMK/w8F0bbMPH7203qdZZlWT1OLbwpslUBfkPr
 Nzatus3F7D0r+1l9dVaUgVZMKm6H1k5Tv/25bLth3E0e+iZ6+RCzqVZvixixP2jc
 pc0gswAOmnDXJcdAG3pbAr+M8ox6VnR94tdpGan53N3MzSAgP3s=
 =7FdK
 -----END PGP SIGNATURE-----

Merge tag 'visconti-arm-dt-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/iwamatsu/linux-visconti into arm/dt

Visconti device tree updates for 5.16

 - Add DT support for Toshiba Visconti5 PCIe driver
 - Add 150MHz fixed clock to TMPV7708 SoC
 - Add DT support for VisROBO VRB boardi

* tag 'visconti-arm-dt-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/iwamatsu/linux-visconti:
  arm64: dts: visconti: Add DTS for the VisROBO board
  dt-bindings: arm: toshiba: Add the TMPV7708 VisROBO VRB board
  arm64: dts: visconti: Add 150MHz fixed clock to TMPV7708 SoC
  arm64: dts: visconti: Add PCIe host controller support for TMPV7708 SoC

Link: https://lore.kernel.org/r/YWoH3g7vU1ZEAp+P@toshiba.co.jp
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-20 14:59:17 +02:00
Arnd Bergmann
e844804baa mvebu dt64 for 5.16 (part 1)
Add support for Globalscale MOCHAbin an Armada 7040 based development
 board.
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQYqXDMF3cvSLY+g9cLBhiOFHI71QUCYWmsaQAKCRALBhiOFHI7
 1UmFAJsGy5LRShEEpkTrfz5hirWav/xfkACeNa2V2tkHkHxxH4DLCUvAz/rG31U=
 =Kzc3
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFwEcUACgkQmmx57+YA
 GNl9YQ/9H+/3ugNpttOQnLxvBQz+PxsLwkvxpoNe0+HpaBLaLWgzNY5cIpjx1aB4
 SYjHLRkWvNEWMZfQH7jXIY90g9ucTTeWN80csLSjESo2Wkcz+0FSWb0+gfylx3tO
 MGeEZA3s1g5HKi3wijbLK6aaK7Pih8l6qkVzrl+dcTCGSViXIfKRqb83NeN+UC2Y
 Qwd5+67yj2mbEJBl4UQmEmPq1Bfp+7IBmqrODdb3VXIqRSVoz5mLQXkspBOZ62cw
 srV2KbrolCWsY2BErWF3J/e2QxzfapzVGuIPOJ6o16X62zrWPKdk6hu3rd9pO6A9
 p9OS7JfPaX2/7LMy3Bi3790YR/6bo19+TAx5vGwGhmt1g2xNfycaTHQkxTrYqFZ0
 8M+ylaFGNdSxh1rcdslhpJbWhLglIMF7VC4yRWlscKXWCqX62Qlu6JVXRcB8EAfO
 74k10k3qYfpHm17WhydouH5iosFSTKQ1p1YtxPlL2Zs4Wh+BFw0uaBeG+90GtWBh
 OAVMIoqYRzOslssULuaw/k++oTDwiWVr81LLAOoZxc/KoPws5Lwy+/QNmdr0JSyk
 w/ci/eTH3F0RiSTN/VsWe3L6zDn+QeEsOySPpqoKV+PVJW6qlW/JJVDZyiBzmKIX
 Gy92j7pAqbIN2OuNjSzX5f7xCaax98M15tZWHLXieaPc7M3TALI=
 =k+Xn
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-dt64-5.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/dt

mvebu dt64 for 5.16 (part 1)

Add support for Globalscale MOCHAbin an Armada 7040 based development
board.

* tag 'mvebu-dt64-5.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu:
  arm64: dts: marvell: add Globalscale MOCHAbin

Link: https://lore.kernel.org/r/877deemefy.fsf@BL-laptop
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-20 14:55:33 +02:00
Daniel Lezcano
43f9699b0c arm64: dts: rockchip: Add idle cooling devices to rk3399
The thermal framework accepts now the cpu idle cooling device as an
alternative when the cpufreq cooling device fails.

Add the node in the DT so the cooling devices will be present and the
platforms can extend the thermal zone definition to add them.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20211001161728.1729664-1-daniel.lezcano@linaro.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2021-10-20 10:00:11 +02:00
Arnd Bergmann
f97ee3e963 Renesas ARM DT updates for v5.16 (take two)
- SPI Multi I/O Bus, SDHI, and Ethernet support for the RZ/G2L SoC,
   - SPI Multi I/O Bus, camera, and video-on support for the R-Car V3U
     SoC,
   - SPI FLASH support for the Falcon development board,
   - eMMC, microSD, and Ethernet support for the RZ/G2L SMARC EVK
     development board,
   - 2 GHz High-Performance support for the R-Car H3e-2G, M3e-2G, and
     M3Ne-2G SoCs,
   - Miscellaneous fixes and improvements.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCYWljoAAKCRCKwlD9ZEnx
 cGxHAQDrT+JszN8OkMuwJ55OlOUsI1xXqWpWMmjC40gSn57piAD/QiRYaaSreWk6
 WSPxrweQ4uNSntSHmFdo+lYs0ueryAk=
 =XkNX
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFvQRUACgkQmmx57+YA
 GNnmEg/9H029WrZEgrP9EIBqlPSg/dSvXMLv0aG2ry7A/jiw8Tz48EdpE4lSUk4g
 fn7pBUHlXKQhbiyLbTHJeSobc5UUFEhKNZJ9P6MU5vTTKveaSgLaf+4HyCNbQZRu
 MaHGIYZ0xHvlJKT8MiwJ4eXM+1BV/VOfdfWzos1OYPzgjgQwXc2+TWSmoveIDXrz
 wW7qbexKkSNudvDogZX6MUkw55sO4yWgaLTmW18UahhQWcJkkCVr30cw2+MhMo4Z
 hL/quEdUJJxeD6jAf12WckENcjUI0iR7ZHqtVZanlBlM+BUk8Ap3Wc14mVi5esBa
 NM6Mbh6RaKS3lkWchELC1XlPXBS47CALtSuzOxDIGyU83p7m4Zl08bGcwMTY/vqE
 z9YIVtNbOtt6ZrFP1m0TAVealnDueAuPwcxOf9NpzLe2WL0+IT51F5Ikz9YXsIX6
 KI5wdvVUH6QCJcZo8a+PlAaQvcdoG6bLO77b69QKgqAyFYYsj8aLG9ui+iTig1To
 n6lFLO/XfR/zQihAHQRJ9nq1pxs8IEwdcCnWT8svy9DMPQ8rry1ooNYX6fNM/ESp
 Fo++uNpHqpblv750RwmNjGCSDrV8Xia8KHkNDWplFYL9utTJpi42eJOuH8XPF6aM
 fBAX+4hdl38ngXmgrKb7OxGUX5ZdglmbyxxhX8xm8VjUCOH0sZ0=
 =kSIg
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm-dt-for-v5.16-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt

Renesas ARM DT updates for v5.16 (take two)

  - SPI Multi I/O Bus, SDHI, and Ethernet support for the RZ/G2L SoC,
  - SPI Multi I/O Bus, camera, and video-on support for the R-Car V3U
    SoC,
  - SPI FLASH support for the Falcon development board,
  - eMMC, microSD, and Ethernet support for the RZ/G2L SMARC EVK
    development board,
  - 2 GHz High-Performance support for the R-Car H3e-2G, M3e-2G, and
    M3Ne-2G SoCs,
  - Miscellaneous fixes and improvements.

* tag 'renesas-arm-dt-for-v5.16-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  mailmap: Fix text encoding for Niklas Söderlund
  arm64: dts: renesas: rcar-gen3e: Add Cortex-A57 2 GHz opps
  arm64: dts: renesas: rzg2l-smarc-som: Enable Ethernet
  arm64: dts: renesas: r9a07g044: Add GbEthernet nodes
  arm64: dts: renesas: Add ports node to all adv7482 nodes
  arm64: dts: renesas: r8a779a0: Add and connect all CSI-2, ISP and VIN nodes
  arm64: dts: renesas: rzg2l-smarc: Enable microSD on SMARC platform
  arm64: dts: renesas: rzg2l-smarc-som: Enable eMMC on SMARC platform
  arm64: dts: renesas: r9a07g044: Add SDHI nodes
  arm64: dts: renesas: falcon-cpu: Add SPI flash via RPC
  arm64: dts: renesas: r8a779a0: Add RPC node
  arm64: dts: renesas: r9a07g044: Add SPI Multi I/O Bus controller node

Link: https://lore.kernel.org/r/cover.1634298094.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-20 00:05:09 +02:00
Arnd Bergmann
6fa496fd7d ARM64: DT: HiSilicon ARM64 DT updates for 5.16
- Add SPMI PMIC support for the Hikey970 board
 - Correct the sp805 watchdog compatible string to match the document
 - Correct the operating-points table name to match the dtschema
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCgAzFiEEQeMYD8qOQTc1R/snC8hXbtmJZlwFAmFo5vkVHHh1d2VpNUBo
 aXNpbGljb24uY29tAAoJEAvIV27ZiWZc/48P/00Dx5XKqDIJKBnTJK07e69Mgusr
 VulJF4Dub7tqniEbFQLAjynvAR6mRR/ziasD8B/V7LLMm+RO9/KQ2UNm+08YSXd6
 1JYsoCj20BLsIMnmGMOPaylJoZyKRyKYDHjtegr+MNkKib4aGMGhG/klbyVTjV/Q
 rTi/J87W5WM8WhsBkdVpbI7+xA7lLA0vOWPRANtaej4pjIaUQ6ibtt+AziBRC0zj
 Ckec/TP/JHO6sDwpcWVgdWW4k9ofohuEvpFttialrmBVrIRn3lrQK8V+UIrBNVcA
 fneSWjgexxxRYemw07kAWrVZKVJCvSHosIcp7BzOYYdU+Vd3GRILvvuWEgbBjHCY
 tzve6uVw0UQMZPA6jYMlvA9bPBL3JWuXByWIjtKBH0C2QX3aqTbuoyL9aAVy7C0S
 RMpAWZ15ED8YNef0HykQK2+HE0G4p8WyN1zjmMCshjOsjXPQVEKX2bIZ05cF8KX2
 Q3zY6OdznV1H6PSlfVtRzbVM75B+158Pxw/SdTlIMiGiXjfxdIEYruEM6Ej8kxqU
 +QakyDIWjNSwaB6lt1x+bZe7O3GvMkRNb3HhKoqf9j7e4JhZH8hg3KyDdENgcPzb
 RLNVKN65Wwz0SyJZNlRKlF6IzDjeV6v5aXY7eLUkj75uIRT0vI6MYWJhxo4sx/PA
 kGPjXdKTEAsKUmsK
 =xa9d
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFvO4cACgkQmmx57+YA
 GNlB3xAAsoHs6hQFzZmpeii7DKrchYSBUvoEorG4boHtPiAQ7mZTpAW2tIgO6F0S
 P+CugE0u7TGuApVCAB6TVDj1dxEZJBl5xf0Mug3m/cpc0DukJj28QSbMztfAAl9s
 /1w3AVSHM6heD39a09ePxSaHzRn7Bl+hyTAnDkZBH+OenkihpMgaBdGBOrqkS95V
 1HBB/wdCNF16hB8DyerZPlSpwwLR9zpd7Ncia4DbhIzfW9ppnIK4OdrQbZKDU0E2
 55Fsef33YJc+c1FMY5+MfV0U2jpL4ozvRpIvBEU9KqZStWntriV71TbWH2iooRbg
 +mGaGR+JjxND1UEe7/eNqVgV76qUW8j8+sWNfRwAOwgX/UnZBU2+0KBdvlC7XuhX
 idkBGgjrz4tsMfnSkwjuFs2LE9KerNKCBVIC6EDA2Gx3DROehSK5CBizidQuK6o4
 ap/GALZQHZhFGYHaQjtR5w5y9Ps5XS3LGWnsvftNvhb1ynqOHW1aknlfTQEH39D3
 g/7gclkti0dbwnRuoWE4W9DNol/THnaCoV7zCWerI7PlPWkf/WMWLlggdValpJch
 MBFxFVRsJl2od6AgDw1PzV7XhqxYWsL09RlqlhILAlfCf+QdmxlP/JtxYiCPYaBe
 KIPt1MU1Tdlt/kJ02sBM34N/02zTKJVUDgYTsi4tG3JhVo1pxls=
 =Z1IX
 -----END PGP SIGNATURE-----

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

ARM64: DT: HiSilicon ARM64 DT updates for 5.16

- Add SPMI PMIC support for the Hikey970 board
- Correct the sp805 watchdog compatible string to match the document
- Correct the operating-points table name to match the dtschema

* tag 'hisi-arm64-dt-for-5.16' of git://github.com/hisilicon/linux-hisi:
  arm64: dts: hisilicon: align operating-points table name with dtschema
  arm64: dts: hisilicon: fix arm,sp805 compatible string
  arm64: dts: hisilicon: Add support for Hikey 970 PMIC

Link: https://lore.kernel.org/r/6168EB53.60503@hisilicon.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-19 23:41:27 +02:00
Arnd Bergmann
4f0c2be3d1 This pull request contains Broadcom ARM64-based SoCs Device Tree changes
for 5.16, please pull the following:
 
 - Rafal updates the BCM4908 DTS files to produce fewer warnings by
 fixing the UART clock name, moving the reboot syscon node out of the bus
 node, and finally updating the NAND controller node names.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAmFlvZ4ACgkQh9CWnEQH
 BwQAig/+L8jeVcubM0PaiXUXp7qRPuKr8i7fF6DVwagMUSo2T9XWz0hOPv2qZL82
 d6zp+ZBr2kD092WB0zIGBSt1JYYvl1/CO+D8ksjn8TH+6NOFExzhnUzGlHPw1bsU
 Q6iUjKzFsKVwIe/qRNIieI0w991fJwU0UFcj858V3CB7kA/hki13w8WyPse9Fl6h
 qEgN5FZ/rb8OPUchZGqbrE5rYNnXWw8IpL12QLosOOhChspN/gTKxyyTA3w0YO0T
 mZ0JFQoW5mQVtjkG/G+3LfWCcRfmdiuaw50iJE7MUFZj566bKlEMyYnleQnTG3uS
 j+ukYzB1jL1EUCDU5dlBThHncRo146J+KFZ70f7Cx3o2lp412K9vnpZjoVsUiOOE
 CTpa8MUExiQ3gc4T38CEaue4x8LdAtXBLfwV1U6v02OVzexJOs8nbSoN6L85CsM2
 t4oi7ZVecogirmTkP7TzmDda3bIAWslrLO/BPOOeKirlGYaG5sSy2ohDXBtp2QgC
 MP7K26kcL/68SqeASJt4jl4vx0fByalYhS0ZbhoBtT/tG1wwY9J2krXnrM2koTVa
 XP6RoUPblUuNSgZqauzp1FR6epoVc4ox14j3gYLoEfCemAlHoF2YfhaO6KRZ7K8b
 7KAhW55X6gJBtyF7jpkDd6aAKJwHwD22QYEiPEIFrwRAgJKgcXM=
 =i+W/
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFvOwUACgkQmmx57+YA
 GNnBnRAAi79rUBLoOxdvWrdTT5hJaMAPBSaeu6rPvM7VRPSGwUbFdE+oFhkw383P
 dxYsIw/fLapdWjPBUmknWjqspazB8MdUT0o8kpT1y7lJZ1T//W4ZG6nBAAbaeeI0
 3BciNN+xkF+7ksVWkRX6MJhG3qljN123oUdxZPT+X/W1fvFOs7RoGnRFpAxpVG9t
 qoTCXbLPODU+Ug9p+5HhUIMzWWtqF5xItD53GgTHKv0XLkgMinq/ye/8BH9Bps6J
 b908GCRvZKlgxSM/tX1wygJu+UDAHkjOgoZLtgtZPoVrLHx4QbyBa1Ut2U5RXe3f
 1YGSyaST1AuYtNpkn6Srn9yWH9ZsZ6QunHt4kYBKrjH7JeyLOcvPyCbh2gmyoD5W
 ftdTE49ggN69LVTsoWhnTHNE36zXWEgmu387fCo+ABKudZZfzzDRnk4tK4vmcDXC
 OnOkOXVagD7YMmyhmH2peCgbjMhH7cHUWBgw50SQvQAc4ueMfdogqGZcU21ogsLN
 +oAp0vwHsvS6a2Yv1ivUNRt0YiMB1PqENYR4zUvBAYmG5G9lQc2Szg/H3tK1KOJJ
 MUjT+9Cb/IUr9SUt7+Yj4TufeONQjvt+M3Q76fx/ziwLqjFDMjbVWCR5Th8OFp8R
 I7hVKCeXAgM/ttWMSnq8HRyrvWfjlLlm/FZvoj1o+lHpkzxKr6Q=
 =wvRL
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-5.16/devicetree-arm64' of https://github.com/Broadcom/stblinux into arm/dt

This pull request contains Broadcom ARM64-based SoCs Device Tree changes
for 5.16, please pull the following:

- Rafal updates the BCM4908 DTS files to produce fewer warnings by
fixing the UART clock name, moving the reboot syscon node out of the bus
node, and finally updating the NAND controller node names.

* tag 'arm-soc/for-5.16/devicetree-arm64' of https://github.com/Broadcom/stblinux:
  arm64: dts: broadcom: bcm4908: Fix UART clock name
  arm64: dts: broadcom: bcm4908: Move reboot syscon out of bus
  arm64: dts: broadcom: bcm4908: Fix NAND node name

Link: https://lore.kernel.org/r/20211013174016.831348-2-f.fainelli@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-19 23:39:16 +02:00
Arnd Bergmann
4d3e49a375 This pull request contains Broadcom ARM-based SoCs Device Tree changes
for 5.16, please pull the following:
 
 - Matthew provides a set of updates to the Northstar Plus Device Tree
 files to fix a number of warnings, and prepare the files to support the
 addition of the Cisco Meraki MX64/MX65 wireless controller devices and
 finally adds support for those boards.
 
 - Rafal continues to provide updates to the BCM5301X Device Tree files
 in order to fix warnings with the various node names, MDIO muxes and
 memory nodes. He also adds support for the external switches on the
 BCM53573 SoC and adds Tenda AC9 switch ports.
 
 - Christian provides the description of the Ethernet switch ports for
 the Cisco Meraki MR32 based on the 53016 SoC
 
 - Arinc adds support for the Asus RT-AC88U device based on the BCM4709
 and featuring 8 Ethernet ports over the integrated and the external
 Realtek switch (not supported yet)
 
 - Stefan adds support for the Raspberry Pi Compute Module 4 IO board and
 does a number of preparatory changes to get there to the Device Tree
 files before doing the actual addition
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAmFlvtQACgkQh9CWnEQH
 BwTOUA//bomocJlqdnsIyRRVrpAxDnaNKmFtEAIGb1okHeocweIy1HEXI4ssAmiR
 R+k74MpsgMyi9AP6zcJLAtkQCYw2xn01MjRfpidX42Qumvz8c/ZCKrlTd2YoUvGI
 IuhIjp2Mmb07Gte72tQ95WAP+86p4B7Q9P321hVv00ENXbI3tyO+ABjctLmFicFc
 YqQChdBMVQOBKS8xYxjLu8kJyYbuGIaA/3xhxx8y6PQ/TL8GQVwub79Yngg/XA6t
 1hG1Jw+yRQlX2nM7rdzuALKUR1JBgo14yBrStyboLzgHOOTvLYE4JSq0Q5eRZxvw
 nrNYuxV74Z3J88OluP6qVUcMfj14c88dwueQKlvoZuCuSbIk3r/dbb8sijfud4JU
 GoUx1/+grfn0BK30UyF4p3DFoAIC29YlfDi6VNAfNN7hOpT+yXSo/01J4/twQfG8
 0iruWA2dPVjL+4AMBW32fCx+6s59pLNS/psILgb0+BTeE9kqmmFgiPoiJOlWPztn
 loOjVH6eijfSUReUkExTMl0VU93Rgy3f45aM4HHWnHyy0/BlYaoQ0SjZVc0YMIhw
 lrfEutO/MXAik5Ga+BlG9e8OG7LHhcZmxt3NX1FLUpreLPdgz47aqjzbDxV2WSdg
 y0A6Lo/2tqCbljYOWgiNNw6XAg6z5e5Bb4DFkybsxUwHhVNL7zc=
 =KGAI
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFvOiUACgkQmmx57+YA
 GNmQ/Q/+J2HunngXPMz68OysNCQ8tvT2eWRQo5Ju5KGiabXrF7QNeNPysxAwhvZv
 Wv0Bfg0aONEjfJgonub0ezKDd/GrsBxOaHdA/5VNcCGZyPvXfRRkvCkFggI3oQsO
 wWWX523kcsLyck59kixLOxJdHjplcwV/Hj6qW0+iGNCglVRDL73DoVzF5nqtUgMP
 WXcQl9L5YTjnCmRJwsQylqIZJzGIEhNwr5wYp/RtEVe9vdJ2uQ74PqLcZJZCPD1g
 WpMNgAS0w5ZocIbyRlvN5SmLI8gM7nwwmzp9Eq2q6bzpPKfBBcrSySPNEj3avTCc
 Fpb1GwlRECTlVc90eF1Om6garFkdO6xorxaagqQAebxSOZ5uWH5urzfUVSuKVBDv
 uTWUNXFghukjHVdnv1rblxfRlIzj5cFats/0lQTzjo/ankQMBs53vZ3720TV2uq7
 D5go3cd4V6ebVP0NoINYs+4iO2BaXA32g7SwGier8X6p2xPVKuZ8+18+wytE1RoY
 hobWTwdY5DbsfV1+z1cksNHrgY1NRXVlKEw6gkw5RXMf2GZ7XSO1CpzNEHsp7J4y
 S51bmO7LZqx8wSq+WCQjL0RzQbzSmls28ofyiEAlsGG0wzYdRWeLbdqU7UijgFRc
 r8B0ydAiKS/NH1r3hh+ht+j6TG2vCxm8G1KWYjZXOM3oJyGnbpQ=
 =Ptpv
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-5.16/devicetree' of https://github.com/Broadcom/stblinux into arm/dt

This pull request contains Broadcom ARM-based SoCs Device Tree changes
for 5.16, please pull the following:

- Matthew provides a set of updates to the Northstar Plus Device Tree
files to fix a number of warnings, and prepare the files to support the
addition of the Cisco Meraki MX64/MX65 wireless controller devices and
finally adds support for those boards.

- Rafal continues to provide updates to the BCM5301X Device Tree files
in order to fix warnings with the various node names, MDIO muxes and
memory nodes. He also adds support for the external switches on the
BCM53573 SoC and adds Tenda AC9 switch ports.

- Christian provides the description of the Ethernet switch ports for
the Cisco Meraki MR32 based on the 53016 SoC

- Arinc adds support for the Asus RT-AC88U device based on the BCM4709
and featuring 8 Ethernet ports over the integrated and the external
Realtek switch (not supported yet)

- Stefan adds support for the Raspberry Pi Compute Module 4 IO board and
does a number of preparatory changes to get there to the Device Tree
files before doing the actual addition

* tag 'arm-soc/for-5.16/devicetree' of https://github.com/Broadcom/stblinux: (31 commits)
  arm64: dts: broadcom: Add reference to RPi CM4 IO Board
  ARM: dts: Add Raspberry Pi Compute Module 4 IO Board
  ARM: dts: Add Raspberry Pi Compute Module 4
  dt-bindings: arm: bcm2835: Add Raspberry Pi Compute Module 4
  ARM: dts: bcm283x-rpi: Move Wifi/BT into separate dtsi
  dt-bindings: display: bcm2835: add optional property power-domains
  ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
  ARM: BCM53016: MR32: get mac-address from nvmem
  ARM: BCM53016: Specify switch ports for Meraki MR32
  ARM: dts: BCM53573: Add Tenda AC9 switch ports
  ARM: dts: BCM53573: Describe on-SoC BCM53125 rev 4 switch
  ARM: dts: BCM5301X: Specify switch ports for more devices
  ARM: dts: NSP: Fix MX65 MDIO mux warnings
  ARM: dts: NSP: Fix MX64/MX65 eeprom node name
  ARM: dts: NSP: Fix MDIO mux node names
  ARM: dts: NSP: Fix mpcore, mmc node names
  ARM: dts: NSP: Add bcm958623hr board name to dts
  ARM: dts: BCM5301X: Fix memory nodes names
  ARM: dts: BCM5301X: Fix MDIO mux binding
  ARM: dts: BCM5301X: Fix nodes names
  ...

Link: https://lore.kernel.org/r/20211013174016.831348-1-f.fainelli@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-19 23:35:33 +02:00
Arnd Bergmann
f202bd97c6 Samsung DTS ARM64 changes for v5.16
1. Match Exynos5433 DTS with dtschema.
 2. Add an Exynos Auto v9 SoC and SADK board. The Exynos Auto v9 is a
    design for automotive for In-vehicle Infotainments (IVI) and Advanced
    Driver-Assistance Systems (ADAS).
    This pull request brings very basic support (pinctrl, UART and UFS
    storage) with a development SADK (Samsung Automotive Development Kit)
    board.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmFnB2oQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD19qQD/wLYOTIp032qz78kpR/zzgKG6ZvLwLDLmua
 WOQEsUFvQWQgP7iZ5qIMvjhxAcGYjLstsqv1ed8PpiXFbwacAZqSszFE5jRqkBbK
 cXa2+lh3iSDDvr/Jznzm+17KXN6/6qbkgi3xrRXbk7Ih7D230Ox6ztknP3IYhGU7
 OMuL1nc/gHph+nZbPD9N8Ts7f8D3RtAkYX3uWWVd0JOjaoE2f1Q/18aYEO4NM93n
 eLUi8RiW6LerW2RLaSFqzUadV5RyANp19UdE5rIlgadE9XzX6vf6LCj3xmZVTrV+
 9w97RWsrqWpm3OiMEVL7gFeRgYyV4WcVaYWtmzYok8WOJJN9qGX+oUBaeiBMWula
 sSEVcVeTzAhzjwbArPCn4ZBizX8nb3G0skGaHpobD5afBygw5tf/wo2lRMAXOb9z
 VyVzgP0iL7W9kOUoaTRiInFkdRPcdXuo0skg/pBfaewU5M61D7LfmNEq4zjJsrdY
 AN9g/VTwA7uoT0tkK6YjTjdjFiWnuBzeKGgky39VdhEe1uJempjdBDz+nfbPG2K9
 uh+Cn5ojIZG11mWLpee/+nwfECeyERjzVNNjzoGf4MStjn33p7yMgSmmLbphGn9X
 YlzEKiiAtMXnsYAmKFXskoHsjiEmSyYJQvyYDRJZVYXOCYX0zsAd4cKBbwiJ544m
 lbvDwo5Jjw==
 =MZjz
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFvMUEACgkQmmx57+YA
 GNmZhRAAjJa2S4Ggle+FmKnhubdeAPw8Q1G//Mq4xJbdxNrzDTgg9kNONbIUes+K
 FaQ9ok4Ql5jo4VorI0l8g4I6h+IfMJm3FfWrirm4SbSTkmCJa9g7+DJHyfBqsGCv
 VMrY+FVY1rfRCilT2aRU/1D6hzexHjxRVdR66Zr5Ry6xGWuu7AP4cz2Rv/NMw7FO
 vHZasX+7KAKTGCJ4wYDAUeN67tImt2ykRKC+OCST46tWHyuUkqJEVNHFnHHfgN0/
 hXMAXCWs4gL6CAeBhWEfEs38LgzzEwWodD+lS/uZwjF95q8Ns1ujfWJpaY+XWVvU
 TT+h+02770O/C6uROIOxZbVISM2R6WP6w6+Jyjk5HjPwXO0TfYXN8xgf8Vkqtw/8
 nWuN9qwfku23AMuDftTVlcIy4pPmYhM1O8xd/31voQWFGEEcgTSfP9DRi2ANwkAY
 /yDScK49q1jAylx/HvVbVkKyZA3HXAhqk4sQw9/7zT3KDG0pVVKzGuVU6C8AdzLk
 CyueUL2tWd/4seowWlsSB1knCqVAgFXtMxTjDy5QwSnreXcJwLOIKfAusDGm76ur
 6+YEflIwm6bAckmb/VnLsRdIWizXLl8V/dtDQx9mBjUUlWD64BZemRZZyTkWrGtA
 CCfUrpAoegWe7Um44ZSxjF6M0c5q+E4IUSIfir01hL+m8eBHSR4=
 =Bj2z
 -----END PGP SIGNATURE-----

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

Samsung DTS ARM64 changes for v5.16

1. Match Exynos5433 DTS with dtschema.
2. Add an Exynos Auto v9 SoC and SADK board. The Exynos Auto v9 is a
   design for automotive for In-vehicle Infotainments (IVI) and Advanced
   Driver-Assistance Systems (ADAS).
   This pull request brings very basic support (pinctrl, UART and UFS
   storage) with a development SADK (Samsung Automotive Development Kit)
   board.

* tag 'samsung-dt64-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  arm64: dts: exynos: add minimal support for exynosautov9 sadk board
  arm64: dts: exynos: add initial support for exynosautov9 SoC
  arm64: dts: exynos: add proper comaptible FSYS syscon in Exynos5433
  arm64: dts: exynos: align operating-points table name with dtschema in Exynos5433

Link: https://lore.kernel.org/r/20211013162418.43072-2-krzysztof.kozlowski@canonical.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-19 22:57:37 +02:00
Arnd Bergmann
c7613530d1 Qualcomm ARM64 dts updates for v5.16
MSM8916 gained some DT cleanup fixes. The Dragonboard 410c gains updated
 firmware paths to the device specific firmware for modem and WiFi, to
 allow these to be pushed to linux-next. The Longcheer L8150 gains extcon
 support and the interrupt configuration for the accelerometer and
 magnetometer are corrected.
 
 MSM8998 gained descriptions for the multimedia clock controller and
 iommu, as well as the GPU and its dedicated IOMMU. The QFPROM node is
 updated to access the CRC corrected value space, the white LED (for
 backlight) found in PMI8998 is described and GCC gains references to the
 missing XO and sleep_clk reference clocks.
 On top of this initial support for the Fxtec Pro1 QX1000 is added and
 then the Sony Xperia XZ1, Xperia XZ1 Compact and the Xperia XZ Premium,
 with USB, touchscreen, SDHCI, Bluetooth and vibrator supported.
 
 The Xiaomi Mi 5 and Xiaomi Mi Note 2, based on the MSM8996 platform was
 added, with support for frame buffer, GPU, audio, video encoder/decoder
 and touchscreen.
 
 The USB controller and PHY found in IPA6018 is described to provide USB
 support. IPQ8074 gains a description of the SPMI controller.
 
 The highlight on SC7180 is the introduction of the just released
 "Homestar" device.  CPU power coefficients are corrected based on
 measurements, IMEM is described to ensure that remoteproc relocation
 information is carried to post mortem debug tools and a few smaller
 fixes are introduced.
 
 The SC7280 gains QSPI, low speed (i2c/spi/uart), GPU, thermal zones,
 modem, CPU topology and updated memory map.
 
 On SDM845 the "Limits hardware" is described and increases the
 throttling temperature of the hardware from ~70C to 95C, with up to 30%
 improvement in benchmarks as result.  Relying on hardware throttling and
 thermal pressure, the CPU cooling devices are dropped.
 The power for the second WiFi channel is properly described for the
 Lenovo Yoga C630, to ensure they are both powered.
 
 reboot-modes are defined for the PM660 PMIC, found in SDM630 and SDM660.
 
 Initial support for the Snapdragon 690 (aka SM6350) is introduced, with
 support for clocks, regulators, pinctrl, storage, thermal sensors, USB,
 SMMU and CPUfreq. On top of this support for the Sony Xperia 10 III is
 introduced.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmFmFhUbHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3FJe8P/080MWq7pknxqFT46bSN
 FbrK7Hd/TVly3Lx+aWmhyyAIl2qcsD0oEs8bB61j9bCTD4RWfRNSLNMv4/QNWeni
 LqXaJZJzoCxMq+F9h1NAZcDoZrUb3/yz5EZDh/3kRU4bJ+TNQSmRxRA30Elv7FEr
 TQuqWdSYe1laWS/j687lQ099TaHo7k06pR0JSiRK5QSeGYp/L65xc1ys/D7SthZA
 cK21++sKo26W3r1rmIuSPUWONF+LYiT04dTk8vO+X7RfzW8C7onuqN/cWhe+nb+h
 JMxnvup7h542Wh/6TpgNAGa2ikxXEZHP1NA6WVhcp6CdGRjE+2CYHCzX11IJA09Y
 26GsLu6Vtd7BN/kxdxs99h45PuZlt1WurnTUCUHqlCXqZx9mSRtSZpnJAMdGCiOS
 qmWkAukFTqde48TzvhjdW9OejVPzUGsWthtFYoImM3Sywg7nlRPw6HAZQNAlcVU4
 RwwLV4lDEMxofliXb15hjxpA4hzhyPebQ6JQmrl/e29RKj/TPwpx/C5N1XacJjX4
 2QYq25dzEUaZNK2XiO5BL99jl9zGUdDRDGpPzey2/XaVBF0cgcDNf65jqtBrk/Yp
 +WPcv2Q+EGcgCYJE2JalFyk6YhkLV/Qj7Fo04BKP9OF6p+EKyMq66hM9WXIkjvuK
 QCt16FsrcTip5Whzcuqbt/lT
 =nWS9
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFvLHYACgkQmmx57+YA
 GNnnWQ//XBbJhCfn2m3OG5+vhtuMf3+PqkBph4/UUpHhMn7nM/UDfVvnkFo8NPYS
 wy3QaUsJ1jncdHiVxypjF4w6+c5sAi4jU3Mz48vJwyDt0UA6zg7Odb9h4vzt6PCI
 v7eqdSPe5JHrrxmIcTsyhqV5s/3ozWvnq3gy5kabtdYffMz/IsccNF9LhXaOAiHh
 weCHPR2IGNpiaKSRx92Se+zHLw0Whzmx27k8+t6kg4MkiiZQQxbu2vNx1KVYEhMY
 sOkHdiEqjd8hRCMXXn7KOTnkJYQwCjLWeMcBSo9LDGy0dmxIol/2v378b5vWiYRh
 43zBqL9w7nu+lZkW+Qur8319Squ+WsKz0sDCvMZ2k5IZLnKWGeMuUpU40Bdsf8iD
 yQ/YyCcBehgWJ0X0uXDuL5az31YNUHuzA0qvc9TNhaRBEG7R95ZbSs7QIDnGGeW2
 5FdA4UhpT4p1SvhJ+a2ev3GJtgmuw3+kPwXGY+CIEFbNLSY+mpLaH5sxjrSUxyJg
 wyEPQSuFwFD4FzlXUZ8Ccpn2eVnjJe9zxWv+5Wm2ne0ORM1Zcm6L0wvxAroSl1H3
 WB5ACCoPSQhdpQ7G/Sie5dbzYO9owZ6o3BSgGXGubT/QJuCvFvqtMehKjv/ZjTk9
 vY6Y9U6ULHK514Dku/TMWJuZv0tLhNMXyfEPCu7JPk9797fAWAE=
 =fbG2
 -----END PGP SIGNATURE-----

Merge tag 'qcom-arm64-for-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt

Qualcomm ARM64 dts updates for v5.16

MSM8916 gained some DT cleanup fixes. The Dragonboard 410c gains updated
firmware paths to the device specific firmware for modem and WiFi, to
allow these to be pushed to linux-next. The Longcheer L8150 gains extcon
support and the interrupt configuration for the accelerometer and
magnetometer are corrected.

MSM8998 gained descriptions for the multimedia clock controller and
iommu, as well as the GPU and its dedicated IOMMU. The QFPROM node is
updated to access the CRC corrected value space, the white LED (for
backlight) found in PMI8998 is described and GCC gains references to the
missing XO and sleep_clk reference clocks.
On top of this initial support for the Fxtec Pro1 QX1000 is added and
then the Sony Xperia XZ1, Xperia XZ1 Compact and the Xperia XZ Premium,
with USB, touchscreen, SDHCI, Bluetooth and vibrator supported.

The Xiaomi Mi 5 and Xiaomi Mi Note 2, based on the MSM8996 platform was
added, with support for frame buffer, GPU, audio, video encoder/decoder
and touchscreen.

The USB controller and PHY found in IPA6018 is described to provide USB
support. IPQ8074 gains a description of the SPMI controller.

The highlight on SC7180 is the introduction of the just released
"Homestar" device.  CPU power coefficients are corrected based on
measurements, IMEM is described to ensure that remoteproc relocation
information is carried to post mortem debug tools and a few smaller
fixes are introduced.

The SC7280 gains QSPI, low speed (i2c/spi/uart), GPU, thermal zones,
modem, CPU topology and updated memory map.

On SDM845 the "Limits hardware" is described and increases the
throttling temperature of the hardware from ~70C to 95C, with up to 30%
improvement in benchmarks as result.  Relying on hardware throttling and
thermal pressure, the CPU cooling devices are dropped.
The power for the second WiFi channel is properly described for the
Lenovo Yoga C630, to ensure they are both powered.

reboot-modes are defined for the PM660 PMIC, found in SDM630 and SDM660.

Initial support for the Snapdragon 690 (aka SM6350) is introduced, with
support for clocks, regulators, pinctrl, storage, thermal sensors, USB,
SMMU and CPUfreq. On top of this support for the Sony Xperia 10 III is
introduced.

* tag 'qcom-arm64-for-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (99 commits)
  arm64: dts: qcom: sdm630-nile: Correct regulator label name
  arm64: dts: qcom: sm6125: Improve indentation of multiline properties
  arm64: dts: qcom: msm8916-longcheer-l8150: Use &pm8916_usbin extcon
  arm64: dts: qcom: pm8916: Add pm8941-misc extcon for USB detection
  arm64: dts: qcom: pm8916: Remove wrong reg-names for rtc@6000
  arm64: dts: qcom: sc7280: Update Q6V5 MSS node
  arm64: dts: qcom: sc7280: Add Q6V5 MSS node
  arm64: dts: qcom: sc7280: Add nodes to boot modem
  arm64: dts: qcom: sc7280: Add/Delete/Update reserved memory nodes
  arm64: dts: qcom: sc7280: Update reserved memory map
  arm64: dts: qcom: msm8998-fxtec-pro1: Add tlmm keyboard keys
  arm64: dts: qcom: msm8998-fxtec-pro1: Add Goodix GT9286 touchscreen
  arm64: dts: qcom: msm8998-fxtec-pro1: Add physical keyboard leds
  arm64: dts: qcom: Add support for MSM8998 F(x)tec Pro1 QX1000
  arm64: dts: qcom: msm8916: Fix Secondary MI2S bit clock
  arm64: dts: qcom: msm8916-longcheer-l8150: Add missing sensor interrupts
  arm64: dts: qcom: sc7180: Add IMEM and pil info regions
  arm64: dts: qcom: pm6150l: Add missing include
  arm64: dts: qcom: sm6350: Add device tree for Sony Xperia 10 III
  arm64: dts: qcom: sm6350: Add apps_smmu and assign iommus prop to USB1
  ...

Link: https://lore.kernel.org/r/20211012231155.1036519-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-19 22:37:10 +02:00
Arnd Bergmann
ba232d398a - mt8173: add reset for dsi0 to mmsys
- move dt-bindings reset controller includes to correct folder
 - split PCIe node to use new format for mt2712 and mt7622
 - mt8183: add audio node to chromebook devices
 - mt8192: add clock controller node
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCAA1FiEEUdvKHhzqrUYPB/u8L21+TfbCqH4FAmFj7sMXHG1hdHRoaWFz
 LmJnZ0BnbWFpbC5jb20ACgkQL21+TfbCqH4fRw//bYNU+512ppC+TvlN12anu/8Z
 toognw+j1l1C6DzJThsPymlqfa/l1oYdv9WWvwXJYD8hBnovB4z3f9OJpU8KfYl1
 IRNDNlE4JP710lJ4mmLZESrtaOeemG+RguecPUTNROLwKTc7k/ueeH7Vrm/yNx0L
 SIFMHs02EM4YL54LzQsX4ZgUWwt969mLIArOSCe9oTSF1UZwBHNwQKvN3Pwr3lOz
 X48T+4MpaNqkh5w4XCzcY679da+JC52Oee2iSXaepQutsWCKeODWcBoE2Biz9YiV
 DqejYiPNTtziqyZL6PokNT9VtCjG393A/DGQwC/ekTBV3M172QGLQKSJUwcOdVkd
 KQAVoljRxk4eBOgD2Lk0G68UkeNudjBCnzh/1piHRTHJrYGNlVjuZx0JnXKLNfiW
 S/+LtPpl5OIhOm2eOTzdCNL0BRyNYCXCf9G/z0ctSXR/eQWygVoERV0ICaB4DSmO
 C9VQv2g/4JjfU7iQzXcRRHX7oL8rtsZERLjnotFyFjnP4uWB44qkrKPmNYBRfpo5
 hBmrDTeeSt4bhk5qYR9kqcMvGSa0q9ERH2ibTg0vBCXkkHs/yMYExPRmlydg6o47
 fZTvzv8Vy3ig4yI4dbyTxpGD8R+1yUazkU/cKYByVjKiGakjOc+Y3wsEbQG9d0W2
 dtPc26F5Fnj88HoWy7s=
 =9lk3
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFvLAgACgkQmmx57+YA
 GNmQQxAAv3UZ+FO3xeBtDgdy/WGbmqHIKrlNN9SGoGR0N7zafjv67pzVBr3ZrKoH
 vlFkkxjGrioMFvzgCTyg0v4mPznhSM1/FTGBM/Rs+V2DT0BCeCE82ZgTMJt9pGcH
 lNINC519MCXgzUaeyI3legu+81VcgoI+bH3Lt87Jop2kfCFiob09YbxuvoLFJKeW
 ZfFEiLtNCovDV9o/kKALLuK2LIYfaiwcYWwawD4tnJQ641CRIEGhITtV9oty5X3G
 kwVUx9iWB5Utm1Z80R8E0gSnKuP33eOHp1wwWsT/KdX3lWeMxg0yStoFu+YQ4v2+
 vXry2FgpoHu2Y3hSROcHUxk9kUXM0xRYhibuo1LumoQx+IzO4eLAFzaU95yUZVt2
 mAM5cmTH6acpQ9YKXzQOAzDdXNNX/45lhh5Z/Add8rh2JkGTLcOAYmf3GEbldTQN
 si711Q2DETSDO7Ufm3H22DIJT34J+GcSX+dx1FpZYtJmzh0FkqaIAs+kSp2KpCCl
 tYcqdFp0hQOlZRuBalZJXBhSeDC3XbKjUY7P56UMhvh45XqvdeGUY0lsPk0Breji
 oxGeuLwmYDD9F75vOrKVJcsvL/DUztpK0kvn0Wm8mle/ks6LUIIvRbkbmCSUWImb
 sKN/QEZOQ9m9DOyLVbqOjokiAFJxN2UEiq1EhFS5pfcAeVWoJvw=
 =nSdE
 -----END PGP SIGNATURE-----

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

Biggest change is, that we have now support for a reset controller inside the
mmsys. This goes inhand with changes to the driver, that you will find in the
soc pull request.

Mediatek PCI device tree binding described the root port in a wrong. The IP
actaully implements several root complex with everyone having a single root port.

We need to fix the DT in an incompatible way to describe the HW as it is. This
also fixes a problem that no IRQ bigger then 32 could be handled.

The only public available HW that is affected by this is the BananaPi R64. I'm
not aware that there is a big user base using the upstream kernel. In this
boards PCI is only used for extension cards, so I don't expect any boot problems.

- mt8173: add reset for dsi0 to mmsys
- move dt-bindings reset controller includes to correct folder
- split PCIe node to use new format for mt2712 and mt7622
- mt8183: add audio node to chromebook devices
- mt8192: add clock controller node

* tag 'v5.15-next-dts64' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux:
  arm64: dts: mt8183: Add the mmsys reset bit to reset the dsi0
  arm64: dts: mt8173: Add the mmsys reset bit to reset the dsi0
  dt-bindings: display: mediatek: add dsi reset optional property
  dt-bindings: mediatek: Add #reset-cells to mmsys system controller
  arm64: dts: mediatek: Move reset controller constants into common location
  arm64: dts: mediatek: Split PCIe node for MT2712 and MT7622
  arm64: dts: mt8183: add kukui platform audio node
  arm64: dts: mt8183: add audio node
  arm64: dts: mediatek: Add mt8192 clock controllers

Link: https://lore.kernel.org/r/1a3d63a3-c020-3319-26f6-a2ec338cc42e@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-19 22:34:28 +02:00
Marc Zyngier
fee29f008a arm64: Add HWCAP for self-synchronising virtual counter
Since userspace can make use of the CNTVSS_EL0 instruction, expose
it via a HWCAP.

Suggested-by: Will Deacon <will@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211017124225.3018098-18-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-19 10:56:20 +01:00
Marc Zyngier
ae976f063b arm64: Add handling of CNTVCTSS traps
Since CNTVCTSS obey the same control bits as CNTVCT, add the necessary
decoding to the hook table. Note that there is no known user of
this at the moment.

Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211017124225.3018098-17-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-19 10:56:20 +01:00
Marc Zyngier
9ee840a960 arm64: Add CNT{P,V}CTSS_EL0 alternatives to cnt{p,v}ct_el0
CNTPCTSS_EL0 and CNTVCTSS_EL0 are alternatives to the usual
CNTPCT_EL0 and CNTVCT_EL0 that do not require a previous ISB
to be synchronised (SS stands for Self-Synchronising).

Use the ARM64_HAS_ECV capability to control alternative sequences
that switch to these low(er)-cost primitives. Note that the
counter access in the VDSO is for now left alone until we decide
whether we want to allow this.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211017124225.3018098-16-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-19 10:56:20 +01:00
Marc Zyngier
fdf865988b arm64: Add a capability for FEAT_ECV
Add a new capability to detect the Enhanced Counter Virtualization
feature (FEAT_ECV).

Reviewed-by: Oliver Upton <oupton@google.com>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211017124225.3018098-15-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-19 10:56:20 +01:00
Will Deacon
0e277fb807 Merge branch 'timers/drivers/armv8.6_arch_timer' of https://git.linaro.org/people/daniel.lezcano/linux into for-next/8.6-timers
Pull Arm architected timer driver rework from Marc (via Daniel) so that
we can add the Armv8.6 support on top.

Link: https://lore.kernel.org/r/d0c55386-2f7f-a940-45bb-d80ae5e0f378@linaro.org

* 'timers/drivers/armv8.6_arch_timer' of https://git.linaro.org/people/daniel.lezcano/linux:
  clocksource/drivers/arch_arm_timer: Move workaround synchronisation around
  clocksource/drivers/arm_arch_timer: Fix masking for high freq counters
  clocksource/drivers/arm_arch_timer: Drop unnecessary ISB on CVAL programming
  clocksource/drivers/arm_arch_timer: Remove any trace of the TVAL programming interface
  clocksource/drivers/arm_arch_timer: Work around broken CVAL implementations
  clocksource/drivers/arm_arch_timer: Advertise 56bit timer to the core code
  clocksource/drivers/arm_arch_timer: Move MMIO timer programming over to CVAL
  clocksource/drivers/arm_arch_timer: Fix MMIO base address vs callback ordering issue
  clocksource/drivers/arm_arch_timer: Move drop _tval from erratum function names
  clocksource/drivers/arm_arch_timer: Move system register timer programming over to CVAL
  clocksource/drivers/arm_arch_timer: Extend write side of timer register accessors to u64
  clocksource/drivers/arm_arch_timer: Drop CNT*_TVAL read accessors
  clocksource/arm_arch_timer: Add build-time guards for unhandled register accesses
2021-10-19 10:52:11 +01:00
Krzysztof Kozlowski
4b1a78330d arm64: dts: exynos: add 'chassis-type' property
A new 'chassis-type' root node property has recently been approved for
the device-tree specification.

Add this property for end-user devices (such as laptops,
smartphones and tablets) based on Samsung Exynos ARM64 SoCs.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20211017101228.19478-1-krzysztof.kozlowski@canonical.com
2021-10-19 10:57:32 +02:00
Daniel Lezcano
32cf6d0ae0 Merge branch 'timers/drivers/armv8.6_arch_timer' into timers/drivers/next
The branch is a stable branch shared with ARM maintainers for the
first 13th patches of the series:

It is based on v5.14-rc3.

As stated by the changelog:

" [... ] enabling ARMv8.6 support for timer subsystem, and was prompted by a
discussion with Oliver around the fact that an ARMv8.6 implementation
must have a 1GHz counter, which leads to a number of things to break
in the timer code:

- the counter rollover can come pretty quickly as we only advertise a
  56bit counter,
- the maximum timer delta can be remarkably small, as we use the
  countdown interface which is limited to 32bit...

Thankfully, there is a way out: we can compute the minimal width of
the counter based on the guarantees that the architecture gives us,
and we can use the 64bit comparator interface instead of the countdown
to program the timer.

Finally, we start making use of the ARMv8.6 ECV features by switching
accesses to the counters to a self-synchronising register, removing
the need for an ISB. Hopefully, implementations will *not* just stick
an invisible ISB there...

A side effect of the switch to CVAL is that XGene-1 breaks. I have
added a workaround to keep it alive.

I have added Oliver's original patch[0] to the series and tweaked a
couple of things. Blame me if I broke anything.

The whole things has been tested on Juno (sysreg + MMIO timers),
XGene-1 (broken sysreg timers), FVP (FEAT_ECV, CNT*CTSS_EL0).
"

Link: https://lore.kernel.org/r/20211017124225.3018098-1-maz@kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2021-10-19 10:07:28 +02:00
Johan Jonker
5c9e66c6b7 arm64: dts: rockchip: fix resets in tsadc node for rk356x
In the rockchip_thermal.c driver we now get the resets with
a devm_reset_control_array_get() function, so remove
the reset-names property as it is no longer needed.
Although no longer required in rockchip-thermal.yaml
sort tsadc-apb as first item.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20210930110517.14323-4-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2021-10-18 20:19:19 +02:00
Paolo Bonzini
a25c78d04c Merge commit 'kvm-pagedata-alloc-fixes' into HEAD 2021-10-18 14:13:37 -04:00
Marc Zyngier
be08c3cf3c Merge branch kvm-arm64/pkvm/fixed-features into kvmarm-master/next
* kvm-arm64/pkvm/fixed-features: (22 commits)
  : .
  : Add the pKVM fixed feature that allows a bunch of exceptions
  : to either be forbidden or be easily handled at EL2.
  : .
  KVM: arm64: pkvm: Give priority to standard traps over pvm handling
  KVM: arm64: pkvm: Pass vpcu instead of kvm to kvm_get_exit_handler_array()
  KVM: arm64: pkvm: Move kvm_handle_pvm_restricted around
  KVM: arm64: pkvm: Consolidate include files
  KVM: arm64: pkvm: Preserve pending SError on exit from AArch32
  KVM: arm64: pkvm: Handle GICv3 traps as required
  KVM: arm64: pkvm: Drop sysregs that should never be routed to the host
  KVM: arm64: pkvm: Drop AArch32-specific registers
  KVM: arm64: pkvm: Make the ERR/ERX*_EL1 registers RAZ/WI
  KVM: arm64: pkvm: Use a single function to expose all id-regs
  KVM: arm64: Fix early exit ptrauth handling
  KVM: arm64: Handle protected guests at 32 bits
  KVM: arm64: Trap access to pVM restricted features
  KVM: arm64: Move sanitized copies of CPU features
  KVM: arm64: Initialize trap registers for protected VMs
  KVM: arm64: Add handlers for protected VM System Registers
  KVM: arm64: Simplify masking out MTE in feature id reg
  KVM: arm64: Add missing field descriptor for MDCR_EL2
  KVM: arm64: Pass struct kvm to per-EC handlers
  KVM: arm64: Move early handlers to per-EC handlers
  ...

Signed-off-by: Marc Zyngier <maz@kernel.org>
2021-10-18 17:20:50 +01:00
Marc Zyngier
0730559011 KVM: arm64: pkvm: Give priority to standard traps over pvm handling
Checking for pvm handling first means that we cannot handle ptrauth
traps or apply any of the workarounds (GICv3 or TX2 #219).

Flip the order around.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/r/20211013120346.2926621-12-maz@kernel.org
2021-10-18 16:57:09 +01:00
Marc Zyngier
0c7639cc83 KVM: arm64: pkvm: Pass vpcu instead of kvm to kvm_get_exit_handler_array()
Passing a VM pointer around is odd, and results in extra work on
VHE. Follow the rest of the design that uses the vcpu instead, and
let the nVHE code look into the struct kvm as required.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/r/20211013120346.2926621-11-maz@kernel.org
2021-10-18 16:57:09 +01:00
Marc Zyngier
746bdeadc5 KVM: arm64: pkvm: Move kvm_handle_pvm_restricted around
Place kvm_handle_pvm_restricted() next to its little friends such
as kvm_handle_pvm_sysreg().

This allows to make inject_undef64() static.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/r/20211013120346.2926621-10-maz@kernel.org
2021-10-18 16:57:09 +01:00
Marc Zyngier
3061725d16 KVM: arm64: pkvm: Consolidate include files
kvm_fixed_config.h is pkvm specific, and would be better placed
near its users. At the same time, include/nvhe/sys_regs.h is now
almost empty.

Merge the two into arch/arm64/kvm/hyp/include/nvhe/fixed_config.h.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/r/20211013120346.2926621-9-maz@kernel.org
2021-10-18 16:57:09 +01:00
Marc Zyngier
271b728605 KVM: arm64: pkvm: Preserve pending SError on exit from AArch32
Don't drop a potential SError when a guest gets caught red-handed
running AArch32 code.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/r/20211013120346.2926621-8-maz@kernel.org
2021-10-18 16:57:09 +01:00
Marc Zyngier
cbca197384 KVM: arm64: pkvm: Handle GICv3 traps as required
Forward accesses to the ICV_*SGI*_EL1 registers to EL1, and
emulate ICV_SRE_EL1 by returning a fixed value.

This should be enough to support GICv3 in a protected guest.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/r/20211013120346.2926621-7-maz@kernel.org
2021-10-18 16:57:09 +01:00
Marc Zyngier
f3d5ccabab KVM: arm64: pkvm: Drop sysregs that should never be routed to the host
A bunch of system registers (most of them MM related) should never
trap to the host under any circumstance. Keep them close to our chest.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/r/20211013120346.2926621-6-maz@kernel.org
2021-10-18 16:57:08 +01:00
Marc Zyngier
3c90cb15e2 KVM: arm64: pkvm: Drop AArch32-specific registers
All the SYS_*32_EL2 registers are AArch32-specific. Since we forbid
AArch32, there is no need to handle those in any way.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/r/20211013120346.2926621-5-maz@kernel.org
2021-10-18 16:57:08 +01:00
Marc Zyngier
8ffb418883 KVM: arm64: pkvm: Make the ERR/ERX*_EL1 registers RAZ/WI
The ERR*/ERX* registers should be handled as RAZ/WI, and there
should be no need to involve EL1 for that.

Add a helper that handles such registers, and repaint the sysreg
table to declare these registers as RAZ/WI.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/r/20211013120346.2926621-4-maz@kernel.org
2021-10-18 16:57:08 +01:00
Marc Zyngier
ce75916749 KVM: arm64: pkvm: Use a single function to expose all id-regs
Rather than exposing a whole set of helper functions to retrieve
individual ID registers, use the existing decoding tree and expose
a single helper instead.

This allow a number of functions to be made static, and we now
have a single entry point to maintain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/r/20211013120346.2926621-3-maz@kernel.org
2021-10-18 16:57:08 +01:00
Marc Zyngier
8a049862c3 KVM: arm64: Fix early exit ptrauth handling
The previous rework of the early exit code to provide an EC-based
decoding tree missed the fact that we have two trap paths for
ptrauth: the instructions (EC_PAC) and the sysregs (EC_SYS64).

Rework the handlers to call the ptrauth handling code on both
paths.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/r/20211013120346.2926621-2-maz@kernel.org
2021-10-18 16:57:08 +01:00
Marc Zyngier
db26f8f2da clocksource/drivers/arch_arm_timer: Move workaround synchronisation around
We currently handle synchronisation when workarounds are enabled
by having an ISB in the __arch_counter_get_cnt?ct_stable() helpers.

While this works, this prevents us from relaxing this synchronisation.

Instead, move it closer to the point where the synchronisation is
actually needed. Further patches will subsequently relax this.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211017124225.3018098-14-maz@kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2021-10-18 09:20:57 +02:00
Linus Torvalds
cf52ad5ff1 Driver core fixes for 5.15-rc6
Here are some small driver core fixes for 5.15-rc6, all of which have
 been in linux-next for a while with no reported issues.
 
 They include:
 	- kernfs negative dentry bugfix
 	- simple pm bus fixes to resolve reported issues
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCYWvzFg8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ymfLQCfSCP698AAvoCgG0fOfLakFkw80h0AoKIVm3lk
 t0GUdnplU18CjnO5M1Zj
 =+dh9
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-5.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fixes from Greg KH:
 "Here are some small driver core fixes for 5.15-rc6, all of which have
  been in linux-next for a while with no reported issues.

  They include:

   - kernfs negative dentry bugfix

   - simple pm bus fixes to resolve reported issues"

* tag 'driver-core-5.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  drivers: bus: Delete CONFIG_SIMPLE_PM_BUS
  drivers: bus: simple-pm-bus: Add support for probing simple bus only devices
  driver core: Reject pointless SYNC_STATE_ONLY device links
  kernfs: don't create a negative dentry if inactive node exists
2021-10-17 17:17:28 -10:00
Dmitry Baryshkov
8f48ceef5d arm64: dts: qcom: pm8994: add interrupt controller properties
Now that the pmic-mpp is a proper hierarchical IRQ chip, add interrupt
controller properties ('interrupt-controller' and '#interrupt-cells').
The interrupts property is no longer needed so remove it.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211008012524.481877-26-dmitry.baryshkov@linaro.org
2021-10-17 19:10:22 -05:00
Dmitry Baryshkov
3386f01427 arm64: dts: qcom: pm8916: add interrupt controller properties
Now that the pmic-mpp is a proper hierarchical IRQ chip, add interrupt
controller properties ('interrupt-controller' and '#interrupt-cells').
The interrupts property is no longer needed so remove it.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211008012524.481877-25-dmitry.baryshkov@linaro.org
2021-10-17 19:10:22 -05:00
Dmitry Baryshkov
a4344427ea arm64: dts: qcom: apq8016-sbc: fix mpps state names
The majority of device tree nodes for mpps use xxxx-state as pinctrl
nodes. Change names of mpps pinctrl nodes for the apq8016-sbc board to
follow that pattern.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211008012524.481877-13-dmitry.baryshkov@linaro.org
2021-10-17 19:10:22 -05:00
Dmitry Baryshkov
58d92e6e73 arm64: dts: qcom: pm8994: fix mpps device tree node
Add missing "qcom,spmi-mpp" to the compatible list as required by the
node description. Also add gpio-ranges property to mpps device tree
node, adding the mapping between pinctrl and GPIO pins.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211008012524.481877-12-dmitry.baryshkov@linaro.org
2021-10-17 19:10:22 -05:00
Dmitry Baryshkov
de0c7e1283 arm64: dts: qcom: pm8916: fix mpps device tree node
Add missing "qcom,spmi-mpp" to the compatible list as required by the
node description. Also add gpio-ranges property to mpps device tree
node, adding the mapping between pinctrl and GPIO pins.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211008012524.481877-11-dmitry.baryshkov@linaro.org
2021-10-17 19:10:22 -05:00
Marc Zyngier
ec8f7f3342 clocksource/drivers/arm_arch_timer: Drop unnecessary ISB on CVAL programming
Switching from TVAL to CVAL has a small drawback: we need an ISB
before reading the counter. We cannot get rid of it, but we can
instead remove the one that comes just after writing to CVAL.

This reduces the number of ISBs from 3 to 2 when programming
the timer.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211017124225.3018098-12-maz@kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2021-10-17 21:47:44 +02:00
Marc Zyngier
a38b71b083 clocksource/drivers/arm_arch_timer: Move system register timer programming over to CVAL
In order to cope better with high frequency counters, move the
programming of the timers from the countdown timer (TVAL) over
to the comparator (CVAL).

The programming model is slightly different, as we now need to
read the current counter value to have an absolute deadline
instead of a relative one.

There is a small overhead to this change, which we will address
in the following patches.

Reviewed-by: Oliver Upton <oupton@google.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211017124225.3018098-5-maz@kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2021-10-17 21:47:05 +02:00
Marc Zyngier
1e8d929231 clocksource/drivers/arm_arch_timer: Extend write side of timer register accessors to u64
The various accessors for the timer sysreg and MMIO registers are
currently hardwired to 32bit. However, we are about to introduce
the use of the CVAL registers, which require a 64bit access.

Upgrade the write side of the accessors to take a 64bit value
(the read side is left untouched as we don't plan to ever read
back any of these registers).

No functional change expected.

Reviewed-by: Oliver Upton <oupton@google.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211017124225.3018098-4-maz@kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2021-10-17 21:46:59 +02:00
Marc Zyngier
d72689988d clocksource/drivers/arm_arch_timer: Drop CNT*_TVAL read accessors
The arch timer driver never reads the various TVAL registers, only
writes to them. It is thus pointless to provide accessors
for them and to implement errata workarounds.

Drop these read-side accessors, and add a couple of BUG() statements
for the time being. These statements will be removed further down
the line.

Reviewed-by: Oliver Upton <oupton@google.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211017124225.3018098-3-maz@kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2021-10-17 21:46:50 +02:00
Marc Zyngier
4775bc63f8 clocksource/arm_arch_timer: Add build-time guards for unhandled register accesses
As we are about to change the registers that are used by the driver,
start by adding build-time checks to ensure that we always handle
all registers and access modes.

Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211017124225.3018098-2-maz@kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2021-10-17 21:45:48 +02:00
Will McVicker
d96890fca9 rtc: s3c: remove HAVE_S3C_RTC in favor of direct dependencies
The config HAVE_S3C_RTC is not really needed since we can simply just
add the dependencies directly to RTC_DRV_S3C. Also, one less config to
keep track of!

Signed-off-by: Will McVicker <willmcvicker@google.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20211013212256.3425889-1-willmcvicker@google.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
2021-10-17 19:15:12 +02:00
Nicolas Frattaroli
1938b585ed arm64: dts: rockchip: Add analog audio on Quartz64
On the Quartz64 Model A, the I2S1 TDM controller is connected
to the rk817 codec in I2S mode. Enabling it and adding the
necessary simple-sound-card and codec nodes allows for analog
audio output on the PINE64 Quartz64 Model A SBC.

Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Link: https://lore.kernel.org/r/20211016105354.116513-5-frattaroli.nicolas@gmail.com
[some property sorting]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2021-10-17 14:35:05 +02:00
Nicolas Frattaroli
ef5c913570 arm64: dts: rockchip: Add i2s1 on rk356x
This adds the necessary device tree node on rk3566 and rk3568
to enable the I2S1 TDM audio controller.

I2S0 has not been added, as it is connected to HDMI and there is
no way to test that it's working without a functioning video
clock (read: VOP2 driver).

Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Link: https://lore.kernel.org/r/20211016105354.116513-4-frattaroli.nicolas@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2021-10-17 14:29:53 +02:00
Marc Zyngier
5f8b2591de Merge branch kvm-arm64/memory-accounting into kvmarm-master/next
* kvm-arm64/memory-accounting:
  : .
  : Sprinkle a bunch of GFP_KERNEL_ACCOUNT all over the code base
  : to better track memory allocation made on behalf of a VM.
  : .
  KVM: arm64: Add memcg accounting to KVM allocations
  KVM: arm64: vgic: Add memcg accounting to vgic allocations

Signed-off-by: Marc Zyngier <maz@kernel.org>
2021-10-17 11:29:36 +01:00
Jia He
115bae923a KVM: arm64: Add memcg accounting to KVM allocations
Inspired by commit 254272ce65 ("kvm: x86: Add memcg accounting to KVM
allocations"), it would be better to make arm64 KVM consistent with
common kvm codes.

The memory allocations of VM scope should be charged into VM process
cgroup, hence change GFP_KERNEL to GFP_KERNEL_ACCOUNT.

There remain a few cases since these allocations are global, not in VM
scope.

Signed-off-by: Jia He <justin.he@arm.com>
Reviewed-by: Oliver Upton <oupton@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210907123112.10232-3-justin.he@arm.com
2021-10-17 11:25:55 +01:00
Jia He
3ef231670b KVM: arm64: vgic: Add memcg accounting to vgic allocations
Inspired by commit 254272ce65 ("kvm: x86: Add memcg accounting to KVM
allocations"), it would be better to make arm64 vgic consistent with
common kvm codes.

The memory allocations of VM scope should be charged into VM process
cgroup, hence change GFP_KERNEL to GFP_KERNEL_ACCOUNT.

There remain a few cases since these allocations are global, not in VM
scope.

Signed-off-by: Jia He <justin.he@arm.com>
Reviewed-by: Oliver Upton <oupton@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210907123112.10232-2-justin.he@arm.com
2021-10-17 11:25:55 +01:00
Marc Zyngier
20a3043075 Merge branch kvm-arm64/vgic-fixes-5.16 into kvmarm-master/next
* kvm-arm64/vgic-fixes-5.16:
  : .
  : Multiple updates to the GICv3 emulation in order to better support
  : the dreadful Apple M1 that only implements half of it, and in a
  : broken way...
  : .
  KVM: arm64: vgic-v3: Align emulated cpuif LPI state machine with the pseudocode
  KVM: arm64: vgic-v3: Don't advertise ICC_CTLR_EL1.SEIS
  KVM: arm64: vgic-v3: Reduce common group trapping to ICV_DIR_EL1 when possible
  KVM: arm64: vgic-v3: Work around GICv3 locally generated SErrors
  KVM: arm64: Force ID_AA64PFR0_EL1.GIC=1 when exposing a virtual GICv3

Signed-off-by: Marc Zyngier <maz@kernel.org>
2021-10-17 11:10:14 +01:00
Marc Zyngier
9d449c71bd KVM: arm64: vgic-v3: Align emulated cpuif LPI state machine with the pseudocode
Having realised that a virtual LPI does transition through an active
state that does not exist on bare metal, align the CPU interface
emulation with the behaviour specified in the architecture pseudocode.

The LPIs now transition to active on IAR read, and to inactive on
EOI write. Special care is taken not to increment the EOIcount for
an LPI that isn't present in the LRs.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211010150910.2911495-6-maz@kernel.org
2021-10-17 11:06:36 +01:00
Marc Zyngier
f87ab68272 KVM: arm64: vgic-v3: Don't advertise ICC_CTLR_EL1.SEIS
Since we are trapping all sysreg accesses when ICH_VTR_EL2.SEIS
is set, and that we never deliver an SError when emulating
any of the GICv3 sysregs, don't advertise ICC_CTLR_EL1.SEIS.

Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211010150910.2911495-5-maz@kernel.org
2021-10-17 11:06:36 +01:00
Marc Zyngier
0924729b21 KVM: arm64: vgic-v3: Reduce common group trapping to ICV_DIR_EL1 when possible
On systems that advertise ICH_VTR_EL2.SEIS, we trap all GICv3 sysreg
accesses from the guest. From a performance perspective, this is OK
as long as the guest doesn't hammer the GICv3 CPU interface.

In most cases, this is fine, unless the guest actively uses
priorities and switches PMR_EL1 very often. Which is exactly what
happens when a Linux guest runs with irqchip.gicv3_pseudo_nmi=1.
In these condition, the performance plumets as we hit PMR each time
we mask/unmask interrupts. Not good.

There is however an opportunity for improvement. Careful reading
of the architecture specification indicates that the only GICv3
sysreg belonging to the common group (which contains the SGI
registers, PMR, DIR, CTLR and RPR) that is allowed to generate
a SError is DIR. Everything else is safe.

It is thus possible to substitute the trapping of all the common
group with just that of DIR if it supported by the implementation.
Yes, that's yet another optional bit of the architecture.
So let's just do that, as it leads to some impressive result on
the M1:

Without this change:
	bash-5.1# /host/home/maz/hackbench 100 process 1000
	Running with 100*40 (== 4000) tasks.
	Time: 56.596

With this change:
	bash-5.1# /host/home/maz/hackbench 100 process 1000
	Running with 100*40 (== 4000) tasks.
	Time: 8.649

which is a pretty convincing result.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Link: https://lore.kernel.org/r/20211010150910.2911495-4-maz@kernel.org
2021-10-17 11:06:36 +01:00
Marc Zyngier
df652bcf11 KVM: arm64: vgic-v3: Work around GICv3 locally generated SErrors
The infamous M1 has a feature nobody else ever implemented,
in the form of the "GIC locally generated SError interrupts",
also known as SEIS for short.

These SErrors are generated when a guest does something that violates
the GIC state machine. It would have been simpler to just *ignore*
the damned thing, but that's not what this HW does. Oh well.

This part of of the architecture is also amazingly under-specified.
There is a whole 10 lines that describe the feature in a spec that
is 930 pages long, and some of these lines are factually wrong.
Oh, and it is deprecated, so the insentive to clarify it is low.

Now, the spec says that this should be a *virtual* SError when
HCR_EL2.AMO is set. As it turns out, that's not always the case
on this CPU, and the SError sometimes fires on the host as a
physical SError. Goodbye, cruel world. This clearly is a HW bug,
and it means that a guest can easily take the host down, on demand.

Thankfully, we have seen systems that were just as broken in the
past, and we have the perfect vaccine for it.

Apple M1, please meet the Cavium ThunderX workaround. All your
GIC accesses will be trapped, sanitised, and emulated. Only the
signalling aspect of the HW will be used. It won't be super speedy,
but it will at least be safe. You're most welcome.

Given that this has only ever been seen on this single implementation,
that the spec is unclear at best and that we cannot trust it to ever
be implemented correctly, gate the workaround solely on ICH_VTR_EL2.SEIS
being set.

Tested-by: Joey Gouly <joey.gouly@arm.com>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211010150910.2911495-3-maz@kernel.org
2021-10-17 11:06:36 +01:00
Marc Zyngier
562e530fd7 KVM: arm64: Force ID_AA64PFR0_EL1.GIC=1 when exposing a virtual GICv3
Until now, we always let ID_AA64PFR0_EL1.GIC reflect the value
visible on the host, even if we were running a GICv2-enabled VM
on a GICv3+compat host.

That's fine, but we also now have the case of a host that does not
expose ID_AA64PFR0_EL1.GIC==1 despite having a vGIC. Yes, this is
confusing. Thank you M1.

Let's go back to first principles and expose ID_AA64PFR0_EL1.GIC=1
when a GICv3 is exposed to the guest. This also hides a GICv4.1
CPU interface from the guest which has no business knowing about
the v4.1 extension.

Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211010150910.2911495-2-maz@kernel.org
2021-10-17 11:06:36 +01:00
Johan Jonker
ec3028e7c8 arm64: dts: rockchip: change gpio nodenames
Currently all gpio nodenames are sort of identical to there label.
Nodenames should be of a generic type, so change them all.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20211007144019.7461-3-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2021-10-17 09:50:36 +02:00
Maulik Shah
551ed64388 arm64: defconfig: Enable Sleep stats driver
Enable Sleep stats driver. The driver gives statistics for various
low power modes on Qualcomm Technologies, Inc. (QTI) SoCs.

Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/1634107104-22197-4-git-send-email-mkshah@codeaurora.org
2021-10-16 18:24:28 -05:00
Maulik Shah
290bc68465 arm64: dts: qcom: Enable RPM Sleep stats
Add device node for Sleep stats driver which provides various
low power mode stats on msm8996, msm8998, qcs404, sdm630 and
sm6125.

Cc: devicetree@vger.kernel.org
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/1634107104-22197-6-git-send-email-mkshah@codeaurora.org
2021-10-16 18:23:54 -05:00
Maulik Shah
47cb6a0684 arm64: dts: qcom: Enable RPMh Sleep stats
Add device node for Sleep stats driver which provides various
low power mode stats on sc7180, sc7280, sm8150, sm8250 and sm8350.

Also update the reg size of aoss_qmp device to 0x400.

Cc: devicetree@vger.kernel.org
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/1634107104-22197-5-git-send-email-mkshah@codeaurora.org
2021-10-16 18:23:54 -05:00
Philip Chen
0faf297c42 arm64: dts: sc7180: Support Parade ps8640 edp bridge
Add a dts fragment file to support the sc7180 boards with the second
source edp bridge, Parade ps8640.

Signed-off-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211008113839.v3.2.I187502fa747bc01a1c624ccf20d985fdffe9c320@changeid
2021-10-16 18:22:02 -05:00
Philip Chen
4537977a50 arm64: dts: sc7180: Factor out ti-sn65dsi86 support
Factor out ti-sn65dsi86 edp bridge as a separate dts fragment.
This helps us introduce the second source edp bridge later.

Signed-off-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211008113839.v3.1.Ibada67e75d2982157e64164f1d11715d46cdc42c@changeid
2021-10-16 18:22:02 -05:00
Arnaud Ferraris
eaa744b1c1 arm64: dts: qcom: add 'chassis-type' property
A new 'chassis-type' root node property has recently been approved for
the device-tree specification, in order to provide a simple way for
userspace to detect the device form factor and adjust their behavior
accordingly.

This patch fills in this property for end-user devices (such as laptops,
smartphones and tablets) based on Qualcomm ARM64 processors.

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
Reviewed-by: Stephan Gerhold <stephan@gerhold.net> # msm8916
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211016102025.23346-4-arnaud.ferraris@collabora.com
2021-10-16 16:55:21 -05:00
Arnaud Ferraris
263b39bce2 arm64: dts: rockchip: add 'chassis-type' property
A new 'chassis-type' root node property has recently been approved for
the device-tree specification, in order to provide a simple way for
userspace to detect the device form factor and adjust their behavior
accordingly.

This patch fills in this property for end-user devices (such as laptops,
smartphones and tablets) based on Rockchip ARM64 processors.

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
Link: https://lore.kernel.org/r/20211016102025.23346-5-arnaud.ferraris@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2021-10-16 21:26:48 +02:00
Heiko Stuebner
b394e70cdc arm64: dts: rockchip: add powerdomains to rk3368
Add the core io-domain node for rk3368.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20210925090405.2601792-3-heiko@sntech.de
2021-10-16 20:44:41 +02:00
Nicolas Frattaroli
7ab91acd36 arm64: dts: rockchip: enable spdif on Quartz64 A
Add the necessary nodes to enable the spdif output on the
RK3566-Quartz-A board.

Co-developed-by: Peter Geis <pgwipeout@gmail.com>
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Link: https://lore.kernel.org/r/20211015111303.1365328-2-frattaroli.nicolas@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2021-10-16 20:42:50 +02:00
Peter Geis
a65e6523e6 arm64: dts: rockchip: add spdif node to rk356x
This adds the spdif node to the rk356x device tree.

Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Link: https://lore.kernel.org/r/20211015111303.1365328-1-frattaroli.nicolas@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2021-10-16 20:42:26 +02:00
Frieder Schrempf
0b28c41e3c arm64: dts: imx8mm-kontron: Fix connection type for VSC8531 RGMII PHY
Previously we falsely relied on the PHY driver to unconditionally
enable the internal RX delay. Since the following fix for the PHY
driver this is not the case anymore:

commit 7b005a1742 ("net: phy: mscc: configure both RX and TX internal
delays for RGMII")

In order to enable the delay we need to set the connection type to
"rgmii-rxid". Without the RX delay the ethernet is not functional at
all.

Fixes: 8668d8b2e6 ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")
Cc: stable@vger.kernel.org
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-16 15:30:00 +08:00
Frieder Schrempf
ca6f9d85d5 arm64: dts: imx8mm-kontron: Fix CAN SPI clock frequency
The MCP2515 can be used with an SPI clock of up to 10 MHz. Set the
limit accordingly to prevent any performance issues caused by the
really low clock speed of 100 kHz.

This removes the arbitrarily low limit on the SPI frequency, that was
caused by a typo in the original dts.

Without this change, receiving CAN messages on the board beyond a
certain bitrate will cause overrun errors (see 'ip -det -stat link show
can0').

With this fix, receiving messages on the bus works without any overrun
errors for bitrates up to 1 MBit.

Fixes: 8668d8b2e6 ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")
Cc: stable@vger.kernel.org
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-16 15:29:57 +08:00
Frieder Schrempf
6562d6e350 arm64: dts: imx8mm-kontron: Fix polarity of reg_rst_eth2
The regulator reg_rst_eth2 should keep the reset signal of the USB ethernet
adapter deasserted anytime. Fix the polarity and mark it as always-on.

Anyway, using the regulator is only a workaround for the missing support of
specifying a reset GPIO for USB devices in a generic way. As we don't
have a solution for this at the moment, at least fix the current
workaround.

Fixes: 8668d8b2e6 ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")
Cc: stable@vger.kernel.org
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-16 15:29:54 +08:00
Frieder Schrempf
256a24eba7 arm64: dts: imx8mm-kontron: Set lower limit of VDD_SNVS to 800 mV
According to the datasheet the typical value for VDD_SNVS should be
800 mV, so let's make sure that this is within the range of the
regulator.

Fixes: 8668d8b2e6 ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")
Cc: stable@vger.kernel.org
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-16 15:29:51 +08:00
Frieder Schrempf
82a4f329b1 arm64: dts: imx8mm-kontron: Make sure SOC and DRAM supply voltages are correct
It looks like the voltages for the SOC and DRAM supply weren't properly
validated before. The datasheet and uboot-imx code tells us that VDD_SOC
should be 800 mV in suspend and 850 mV in run mode. VDD_DRAM should be
950 mV for DDR clock frequencies of up to 1.5 GHz.

Let's fix these values to make sure the voltages are within the required
range.

Fixes: 8668d8b2e6 ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")
Cc: stable@vger.kernel.org
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-16 15:29:34 +08:00
Frieder Schrempf
ec1e91d400 arm64: dts: imx8mm-kontron: Add support for ultra high speed modes on SD card
In order to use ultra high speed modes (UHS) on the SD card slot, we
add matching pinctrls and fix the voltage switching for LDO5 of the
PMIC, by providing the SD_VSEL pin as GPIO to the PMIC driver.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-16 15:28:27 +08:00
Nobuhiro Iwamatsu
9606ebc100 arm64: defconfig: Visconti: Enable PCIe host controller
Enable Visconti's PCIe host controller in the ARM64 defconfig.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Link: https://lore.kernel.org/r/20210907042340.1525711-1-nobuhiro1.iwamatsu@toshiba.co.jp
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
2021-10-16 07:34:01 +09:00
Yuji Ishikawa
518d432fd5 arm64: dts: visconti: Add DTS for the VisROBO board
This board consists of two boards:
the SoM board (VRC SoM) with the SoC on board, and the board for I/O (VRB).

The functions of each board supported by this update are as follows:
  - VRC SoM
    - WDT
    - GPIO
    - SDCard (SPI-MMC mode)
    - I2C x1
  - VRB board
    - VRC SoM
    - UART x2
    - Ethernet phy

Signed-off-by: Yuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>
Link: https://lore.kernel.org/r/20211014092703.15251-4-yuji2.ishikawa@toshiba.co.jp
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
2021-10-16 07:09:42 +09:00
Yuji Ishikawa
c53fd4102c arm64: dts: visconti: Add 150MHz fixed clock to TMPV7708 SoC
This clock source is referred by baudrate generators of
SPI and I2C devices.

Signed-off-by: Yuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>
Link: https://lore.kernel.org/r/20211014092703.15251-2-yuji2.ishikawa@toshiba.co.jp
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
2021-10-16 07:09:41 +09:00
Nobuhiro Iwamatsu
6beeaf48db arm64: dts: visconti: Add PCIe host controller support for TMPV7708 SoC
Add PCIe node and fixed clock for PCIe in TMPV7708's dtsi,
and tmpv7708-rm-mbrc boards's dts.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Link: https://lore.kernel.org/r/20210907042500.1525771-1-nobuhiro1.iwamatsu@toshiba.co.jp
2021-10-16 07:09:41 +09:00
Barry Song
778c558f49 sched: Add cluster scheduler level in core and related Kconfig for ARM64
This patch adds scheduler level for clusters and automatically enables
the load balance among clusters. It will directly benefit a lot of
workload which loves more resources such as memory bandwidth, caches.

Testing has widely been done in two different hardware configurations of
Kunpeng920:

 24 cores in one NUMA(6 clusters in each NUMA node);
 32 cores in one NUMA(8 clusters in each NUMA node)

Workload is running on either one NUMA node or four NUMA nodes, thus,
this can estimate the effect of cluster spreading w/ and w/o NUMA load
balance.

* Stream benchmark:

4threads stream (on 1NUMA * 24cores = 24cores)
                stream                 stream
                w/o patch              w/ patch
MB/sec copy     29929.64 (   0.00%)    32932.68 (  10.03%)
MB/sec scale    29861.10 (   0.00%)    32710.58 (   9.54%)
MB/sec add      27034.42 (   0.00%)    32400.68 (  19.85%)
MB/sec triad    27225.26 (   0.00%)    31965.36 (  17.41%)

6threads stream (on 1NUMA * 24cores = 24cores)
                stream                 stream
                w/o patch              w/ patch
MB/sec copy     40330.24 (   0.00%)    42377.68 (   5.08%)
MB/sec scale    40196.42 (   0.00%)    42197.90 (   4.98%)
MB/sec add      37427.00 (   0.00%)    41960.78 (  12.11%)
MB/sec triad    37841.36 (   0.00%)    42513.64 (  12.35%)

12threads stream (on 1NUMA * 24cores = 24cores)
                stream                 stream
                w/o patch              w/ patch
MB/sec copy     52639.82 (   0.00%)    53818.04 (   2.24%)
MB/sec scale    52350.30 (   0.00%)    53253.38 (   1.73%)
MB/sec add      53607.68 (   0.00%)    55198.82 (   2.97%)
MB/sec triad    54776.66 (   0.00%)    56360.40 (   2.89%)

Thus, it could help memory-bound workload especially under medium load.
Similar improvement is also seen in lkp-pbzip2:

* lkp-pbzip2 benchmark

2-96 threads (on 4NUMA * 24cores = 96cores)
                  lkp-pbzip2              lkp-pbzip2
                  w/o patch               w/ patch
Hmean     tput-2   11062841.57 (   0.00%)  11341817.51 *   2.52%*
Hmean     tput-5   26815503.70 (   0.00%)  27412872.65 *   2.23%*
Hmean     tput-8   41873782.21 (   0.00%)  43326212.92 *   3.47%*
Hmean     tput-12  61875980.48 (   0.00%)  64578337.51 *   4.37%*
Hmean     tput-21 105814963.07 (   0.00%) 111381851.01 *   5.26%*
Hmean     tput-30 150349470.98 (   0.00%) 156507070.73 *   4.10%*
Hmean     tput-48 237195937.69 (   0.00%) 242353597.17 *   2.17%*
Hmean     tput-79 360252509.37 (   0.00%) 362635169.23 *   0.66%*
Hmean     tput-96 394571737.90 (   0.00%) 400952978.48 *   1.62%*

2-24 threads (on 1NUMA * 24cores = 24cores)
                 lkp-pbzip2               lkp-pbzip2
                 w/o patch                w/ patch
Hmean     tput-2   11071705.49 (   0.00%)  11296869.10 *   2.03%*
Hmean     tput-4   20782165.19 (   0.00%)  21949232.15 *   5.62%*
Hmean     tput-6   30489565.14 (   0.00%)  33023026.96 *   8.31%*
Hmean     tput-8   40376495.80 (   0.00%)  42779286.27 *   5.95%*
Hmean     tput-12  61264033.85 (   0.00%)  62995632.78 *   2.83%*
Hmean     tput-18  86697139.39 (   0.00%)  86461545.74 (  -0.27%)
Hmean     tput-24 104854637.04 (   0.00%) 104522649.46 *  -0.32%*

In the case of 6 threads and 8 threads, we see the greatest performance
improvement.

Similar improvement can be seen on lkp-pixz though the improvement is
smaller:

* lkp-pixz benchmark

2-24 threads lkp-pixz (on 1NUMA * 24cores = 24cores)
                  lkp-pixz               lkp-pixz
                  w/o patch              w/ patch
Hmean     tput-2   6486981.16 (   0.00%)  6561515.98 *   1.15%*
Hmean     tput-4  11645766.38 (   0.00%) 11614628.43 (  -0.27%)
Hmean     tput-6  15429943.96 (   0.00%) 15957350.76 *   3.42%*
Hmean     tput-8  19974087.63 (   0.00%) 20413746.98 *   2.20%*
Hmean     tput-12 28172068.18 (   0.00%) 28751997.06 *   2.06%*
Hmean     tput-18 39413409.54 (   0.00%) 39896830.55 *   1.23%*
Hmean     tput-24 49101815.85 (   0.00%) 49418141.47 *   0.64%*

* SPECrate benchmark

4,8,16 copies mcf_r(on 1NUMA * 32cores = 32cores)
		Base     	 	Base
		Run Time   	 	Rate
		-------  	 	---------
4 Copies	w/o 580 (w/ 570)       	w/o 11.1 (w/ 11.3)
8 Copies	w/o 647 (w/ 605)       	w/o 20.0 (w/ 21.4, +7%)
16 Copies	w/o 844 (w/ 844)       	w/o 30.6 (w/ 30.6)

32 Copies(on 4NUMA * 32 cores = 128cores)
[w/o patch]
                 Base     Base        Base
Benchmarks       Copies  Run Time     Rate
--------------- -------  ---------  ---------
500.perlbench_r      32        584       87.2  *
502.gcc_r            32        503       90.2  *
505.mcf_r            32        745       69.4  *
520.omnetpp_r        32       1031       40.7  *
523.xalancbmk_r      32        597       56.6  *
525.x264_r            1         --            CE
531.deepsjeng_r      32        336      109    *
541.leela_r          32        556       95.4  *
548.exchange2_r      32        513      163    *
557.xz_r             32        530       65.2  *
 Est. SPECrate2017_int_base              80.3

[w/ patch]
                  Base     Base        Base
Benchmarks       Copies  Run Time     Rate
--------------- -------  ---------  ---------
500.perlbench_r      32        580      87.8 (+0.688%)  *
502.gcc_r            32        477      95.1 (+5.432%)  *
505.mcf_r            32        644      80.3 (+13.574%) *
520.omnetpp_r        32        942      44.6 (+9.58%)   *
523.xalancbmk_r      32        560      60.4 (+6.714%%) *
525.x264_r            1         --           CE
531.deepsjeng_r      32        337      109  (+0.000%) *
541.leela_r          32        554      95.6 (+0.210%) *
548.exchange2_r      32        515      163  (+0.000%) *
557.xz_r             32        524      66.0 (+1.227%) *
 Est. SPECrate2017_int_base              83.7 (+4.062%)

On the other hand, it is slightly helpful to CPU-bound tasks like
kernbench:

* 24-96 threads kernbench (on 4NUMA * 24cores = 96cores)
                     kernbench              kernbench
                     w/o cluster            w/ cluster
Min       user-24    12054.67 (   0.00%)    12024.19 (   0.25%)
Min       syst-24     1751.51 (   0.00%)     1731.68 (   1.13%)
Min       elsp-24      600.46 (   0.00%)      598.64 (   0.30%)
Min       user-48    12361.93 (   0.00%)    12315.32 (   0.38%)
Min       syst-48     1917.66 (   0.00%)     1892.73 (   1.30%)
Min       elsp-48      333.96 (   0.00%)      332.57 (   0.42%)
Min       user-96    12922.40 (   0.00%)    12921.17 (   0.01%)
Min       syst-96     2143.94 (   0.00%)     2110.39 (   1.56%)
Min       elsp-96      211.22 (   0.00%)      210.47 (   0.36%)
Amean     user-24    12063.99 (   0.00%)    12030.78 *   0.28%*
Amean     syst-24     1755.20 (   0.00%)     1735.53 *   1.12%*
Amean     elsp-24      601.60 (   0.00%)      600.19 (   0.23%)
Amean     user-48    12362.62 (   0.00%)    12315.56 *   0.38%*
Amean     syst-48     1921.59 (   0.00%)     1894.95 *   1.39%*
Amean     elsp-48      334.10 (   0.00%)      332.82 *   0.38%*
Amean     user-96    12925.27 (   0.00%)    12922.63 (   0.02%)
Amean     syst-96     2146.66 (   0.00%)     2122.20 *   1.14%*
Amean     elsp-96      211.96 (   0.00%)      211.79 (   0.08%)

Note this patch isn't an universal win, it might hurt those workload
which can benefit from packing. Though tasks which want to take
advantages of lower communication latency of one cluster won't
necessarily been packed in one cluster while kernel is not aware of
clusters, they have some chance to be randomly packed. But this
patch will make them more likely spread.

Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
Tested-by: Yicong Yang <yangyicong@hisilicon.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
2021-10-15 11:25:16 +02:00
Jonathan Cameron
c5e22feffd topology: Represent clusters of CPUs within a die
Both ACPI and DT provide the ability to describe additional layers of
topology between that of individual cores and higher level constructs
such as the level at which the last level cache is shared.
In ACPI this can be represented in PPTT as a Processor Hierarchy
Node Structure [1] that is the parent of the CPU cores and in turn
has a parent Processor Hierarchy Nodes Structure representing
a higher level of topology.

For example Kunpeng 920 has 6 or 8 clusters in each NUMA node, and each
cluster has 4 cpus. All clusters share L3 cache data, but each cluster
has local L3 tag. On the other hand, each clusters will share some
internal system bus.

+-----------------------------------+                          +---------+
|  +------+    +------+             +--------------------------+         |
|  | CPU0 |    | cpu1 |             |    +-----------+         |         |
|  +------+    +------+             |    |           |         |         |
|                                   +----+    L3     |         |         |
|  +------+    +------+   cluster   |    |    tag    |         |         |
|  | CPU2 |    | CPU3 |             |    |           |         |         |
|  +------+    +------+             |    +-----------+         |         |
|                                   |                          |         |
+-----------------------------------+                          |         |
+-----------------------------------+                          |         |
|  +------+    +------+             +--------------------------+         |
|  |      |    |      |             |    +-----------+         |         |
|  +------+    +------+             |    |           |         |         |
|                                   |    |    L3     |         |         |
|  +------+    +------+             +----+    tag    |         |         |
|  |      |    |      |             |    |           |         |         |
|  +------+    +------+             |    +-----------+         |         |
|                                   |                          |         |
+-----------------------------------+                          |   L3    |
                                                               |   data  |
+-----------------------------------+                          |         |
|  +------+    +------+             |    +-----------+         |         |
|  |      |    |      |             |    |           |         |         |
|  +------+    +------+             +----+    L3     |         |         |
|                                   |    |    tag    |         |         |
|  +------+    +------+             |    |           |         |         |
|  |      |    |      |             |    +-----------+         |         |
|  +------+    +------+             +--------------------------+         |
+-----------------------------------|                          |         |
+-----------------------------------|                          |         |
|  +------+    +------+             +--------------------------+         |
|  |      |    |      |             |    +-----------+         |         |
|  +------+    +------+             |    |           |         |         |
|                                   +----+    L3     |         |         |
|  +------+    +------+             |    |    tag    |         |         |
|  |      |    |      |             |    |           |         |         |
|  +------+    +------+             |    +-----------+         |         |
|                                   |                          |         |
+-----------------------------------+                          |         |
+-----------------------------------+                          |         |
|  +------+    +------+             +--------------------------+         |
|  |      |    |      |             |   +-----------+          |         |
|  +------+    +------+             |   |           |          |         |
|                                   |   |    L3     |          |         |
|  +------+    +------+             +---+    tag    |          |         |
|  |      |    |      |             |   |           |          |         |
|  +------+    +------+             |   +-----------+          |         |
|                                   |                          |         |
+-----------------------------------+                          |         |
+-----------------------------------+                          |         |
|  +------+    +------+             +--------------------------+         |
|  |      |    |      |             |  +-----------+           |         |
|  +------+    +------+             |  |           |           |         |
|                                   |  |    L3     |           |         |
|  +------+    +------+             +--+    tag    |           |         |
|  |      |    |      |             |  |           |           |         |
|  +------+    +------+             |  +-----------+           |         |
|                                   |                          +---------+
+-----------------------------------+

That means spreading tasks among clusters will bring more bandwidth
while packing tasks within one cluster will lead to smaller cache
synchronization latency. So both kernel and userspace will have
a chance to leverage this topology to deploy tasks accordingly to
achieve either smaller cache latency within one cluster or an even
distribution of load among clusters for higher throughput.

This patch exposes cluster topology to both kernel and userspace.
Libraried like hwloc will know cluster by cluster_cpus and related
sysfs attributes. PoC of HWLOC support at [2].

Note this patch only handle the ACPI case.

Special consideration is needed for SMT processors, where it is
necessary to move 2 levels up the hierarchy from the leaf nodes
(thus skipping the processor core level).

Note that arm64 / ACPI does not provide any means of identifying
a die level in the topology but that may be unrelate to the cluster
level.

[1] ACPI Specification 6.3 - section 5.2.29.1 processor hierarchy node
    structure (Type 0)
[2] https://github.com/hisilicon/hwloc/tree/linux-cluster

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210924085104.44806-2-21cnbao@gmail.com
2021-10-15 11:25:15 +02:00
Kees Cook
42a20f86dc sched: Add wrapper for get_wchan() to keep task blocked
Having a stable wchan means the process must be blocked and for it to
stay that way while performing stack unwinding.

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> [arm]
Tested-by: Mark Rutland <mark.rutland@arm.com> [arm64]
Link: https://lkml.kernel.org/r/20211008111626.332092234@infradead.org
2021-10-15 11:25:14 +02:00
Paolo Bonzini
e2b6d941ec KVM/arm64 fixes for 5.15, take #2
- Properly refcount pages used as a concatenated stage-2 PGD
 - Fix missing unlock when detecting the use of MTE+VM_SHARED
 -----BEGIN PGP SIGNATURE-----
 
 iQJDBAABCgAtFiEEn9UcU+C1Yxj9lZw9I9DQutE9ekMFAmFpPQwPHG1hekBrZXJu
 ZWwub3JnAAoJECPQ0LrRPXpDasoP/iNiTIEw7zrHs37Vx4dtTjz15RNF9gmFd2iR
 EXCg76V+2VN8/87bIcYdKeHkjXtERJ2tTCOJq9X/dn8MixvyShhCxJnk5chc1eZE
 2W4GY0gkuKO6E5rDAe10kl+zeFKVAd77zAeUezZYGGfRlm1Ly8sXrwzfR7ZXtvDH
 1DL89adycUJlh28lwcX73ScXWpiAsFXdWFjsVpHJngDZ1z3aYUqtPJmESH+mwtuK
 J85tTq4PZCsnubmUpuCYopgBJnogjh4KTulVOyenykvQyXZ+EVBjTA4Xh8iCyi77
 LMxqazvVkFnL3tBw2H7OCWPhQ/xfmWclpKcngDvnfPMIW6b3Tl5dCIY6uNWoLMnV
 8COh4ggahhqgsswHVCiFPBkJ/J3G+L8vLz2PHXtHJw6yOzPTEPD5yXH8oXoJhQ+Y
 U2aT83bWdc5sK9ZvhRHSpVXFZ6bWSUnMztP9szz1DM4QzyT6RHgXJE7TxWXFHhPR
 Hs0VGX13hz1f/AYN/+BDxicCtH9r/SbG6hlTPrt9+IFUAiz9EZ5Xy28fT1+c93Cf
 ArylAulF+HQyZMMe4RV2quAEXx5q5ag8pMsm/KQrh9fn0srrO4AnaoBGtuIjKJu3
 ccBd/1vbIAU9AxLw82LHW558gAzdq3LskPApgjkTA19oj7ffdMEqqs/cIDkN7nDx
 QEDaVxFv
 =eQRY
 -----END PGP SIGNATURE-----

Merge tag 'kvmarm-fixes-5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD

KVM/arm64 fixes for 5.15, take #2

- Properly refcount pages used as a concatenated stage-2 PGD
- Fix missing unlock when detecting the use of MTE+VM_SHARED
2021-10-15 04:47:55 -04:00
Tim Harvey
7973009235 arm64: dts: imx8mm-venice-gw7901.dts: disable pgc_gpumix
Since commit b21269b12e48 ("arm64: dts: imx8mm: add GPC node") the
GW7901 will hang during kernel init because it does not power the unused
GPU voltage rails on the IMX8MM. Disable pgc_gpumix to work around this.

We also disable the GPU devices that depend on the gpumix power domain
and pgc_gpu to avoid them staying in a probe deferred state forever.

Additionally as the MIPI voltage rail is also not connected on this
board we disable pgc_mipi and disp_blk_ctrl.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-15 10:42:53 +08:00
Sebastian Krzyszkowiak
fea0fd097c arm64: dts: imx8mq-librem5: set debounce interval of volume buttons to 50ms
The default of 5ms is too low.

Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-15 09:45:48 +08:00
Angus Ainslie
09d255f0be arm64: dts: imx8mq-librem5: Limit the max sdio frequency
This is needed for the 1LV Cyress WiFi module to probe correctly.
It also helps improve GNSS sensitivity.

Signed-off-by: Angus Ainslie <angus@akkea.ca>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-15 09:44:53 +08:00
Angus Ainslie
2344af0d5b arm64: dts: imx8mq-librem5: add power sequencing for M.2 cards
Some wifi cards need reset asserted until after the power supplies
have been enabled.

So wire up the W_DISABLE signal for the SDIO port (WIFI_REG_ON net) and
the BT_REG_ON net to use it for power sequencing.

Signed-off-by: Angus Ainslie <angus@akkea.ca>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-15 09:44:50 +08:00
Angus Ainslie
c3817595d6 arm64: dts: imx8mq-librem5: delay the startup of the SDIO
The redpine wifi card takes some time to wake up. Wait for it.

Signed-off-by: Angus Ainslie <angus@akkea.ca>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-15 09:44:47 +08:00
Guido Günther
924025e5ee arm64: dts: imx8mq-librem5: wire up the wifi regulator
Connect the wifi power regulator to the corresponding GPIO.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-15 09:44:45 +08:00
Sebastian Krzyszkowiak
1f8359d4a2 arm64: dts: imx8mq-librem5: Fix led_r and led_g pinctrl assignments
Fix wrong pinctrl assignments.

Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
Suggested-by: Eric Kuzmenko <eric.kuzmenko@puri.sm>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-15 09:44:42 +08:00
Martin Kepplinger
ca4fd34e86 arm64: dts: imx8mq-librem5: add reset gpio to mantix panel description
Add the missing description for the reset gpio to the panels DT
description.

Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-10-15 09:44:30 +08:00
Dmitry Baryshkov
266e5cf39a arm64: dts: qcom: sm8250: remove mmcx regulator
Switch dispcc and videocc into using MMCX domain directly. Drop the now
unused mmcx regulator.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20210829154757.784699-7-dmitry.baryshkov@linaro.org
2021-10-14 20:07:48 -05:00
Rajesh Patil
dfe28877db arm64: dts: qcom: sc7180: Add qspi compatible
Add "qcom,sc7180-qspi" compatible in qspi node

Signed-off-by: Rajesh Patil <rajpat@codeaurora.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/1632997450-32293-3-git-send-email-rajpat@codeaurora.org
2021-10-14 20:00:13 -05:00
Bjorn Andersson
622adb84b3 arm64: dts: qcom: sdm845: Drop standalone smem node
Now that the SMEM binding and driver allows the SMEM node to be
described in the reserved-memory region directly, move the compatible
and hwlock properties to the reserved-memory node and drop the
standadlone node.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Link: https://lore.kernel.org/r/20210930182111.57353-5-bjorn.andersson@linaro.org
2021-10-14 19:58:13 -05:00
Stephan Gerhold
9095d05485 arm64: dts: qcom: msm8916: Drop underscore in node name
Using underscores in device tree nodes is not very common.
Additionally, the _region suffix in "smem_region@..." is not really
useful since it's obvious that it describes a reserved memory region.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20210921152120.6710-2-stephan@gerhold.net
2021-10-14 19:55:51 -05:00
Stephan Gerhold
2533786f46 arm64: dts: qcom: apq8016-sbc: Clarify firmware-names
Commit 0f6b380d58 ("arm64: dts: qcom: apq8016-sbc: Update modem and WiFi
firmware path") added "firmware-name"s to the APQ8016 SBC (DB410c) device
tree to separate the (test key)-signed firmware from other devices.

However, the added names are a bit confusing. The "modem" firmware used by
DB410c is actually a simplified version for APQ8016 that lacks most of the
modem functionality (phone calls, SMS etc) that is available on MSM8916.
Placing it in "qcom/msm8916/modem.mbn" suggests that it supports all
functionality for MSM and not just the reduced functionality for APQ.

Request the firmware from "qcom/apq8016/modem.mbn" instead to clarify this.
Do the same for "wcnss.mbn" for consistency (although the WCNSS firmware
works just fine on MSM8916).

Finally, add a "_sbc" suffix to the WCNSS_qcom_wlan_nv.bin firmware file.
It seems like the nv.bin firmware is somewhat board specific and can
therefore vary a bit from device to device. This makes it more clear
which board it is intended to be used for.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20210922195853.95574-1-stephan@gerhold.net
2021-10-14 19:54:58 -05:00
Sai Prakash Ranjan
88800cb254 arm64: defconfig: Enable QTI SC7280 pinctrl, gcc and interconnect
Enable the QTI SC7280 pinctrl, gcc and interconnect drivers required
for kernel to boot to console.

Signed-off-by: Sai Prakash Ranjan <quic_saipraka@quicinc.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211007052812.3717-1-quic_saipraka@quicinc.com
2021-10-14 19:50:13 -05:00
Bjorn Andersson
5c1c3e2a76 arm64: defconfig: Disable firmware sysfs fallback
Part of the enablement of SDMA on the IMX platforms, '7f4e4afa140c
("arm64: defconfig: Enable SDMA on i.mx8mq/8mm")' also enabled
CONFIG_FW_LOADER_USER_HELPER_FALLBACK, to allow "firmware loaded by
udev".

Unfortunately having the fallback enabled does, due to the 60 second
timeout, essentially requiring userspace to provide a firmware loader.
But systemd dropped the support for this interface back in 2014 and
because arm64 is the only architecture that has this enabled, there
doesn't seem to be any standard solution available.

Examples of this problem can be found in e.g. the ath10k driver, which
with a standard distro can take about 10 minutes before wlan0 appears.

The alternative to this patch would be to change these drivers to use
firmware_request_direct(), to avoid the sysfs fallback. But that would
prevent other systems, such as Android, to rely on a userspace firmware
loader to pick the firmware from a non-standard place, with just a
custom defconfig.

This patch therefor attempts to align the arm64 defconfig will all other
architectures in the upstream kernel.

Cc: Robin Gong <yibin.gong@nxp.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20210930215300.60290-1-bjorn.andersson@linaro.org
2021-10-14 19:49:09 -05:00
Geert Uytterhoeven
12ee311887 arm64: dts: renesas: rcar-gen3e: Add Cortex-A57 2 GHz opps
Add operating points for running the Cortex-A57 CPU cores on R-Car
H3e-2G, M3e-2G, and M3Ne-2G at 2 GHz.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/08a0f27f50b8ad4a78c05186190bebcfb364fe8f.1634200489.git.geert+renesas@glider.be
2021-10-14 10:46:46 +02:00
Biju Das
361b0dcbd7 arm64: dts: renesas: rzg2l-smarc-som: Enable Ethernet
Enable Ethernet{0,1} interfaces on RZ/G2L SMARC EVK.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20211013075647.32231-3-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2021-10-14 10:46:46 +02:00
Biju Das
38ad23e15a arm64: dts: renesas: r9a07g044: Add GbEthernet nodes
Add Gigabit Ethernet{0,1} nodes to SoC DTSI.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20211013075647.32231-2-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2021-10-14 10:46:46 +02:00
Niklas Söderlund
c534e655d5 arm64: dts: renesas: Add ports node to all adv7482 nodes
The different port@ entries of the adv7482 nodes shall be encapsulated
in a ports node, add one.  This change does not change how the driver
parses the DT and no driver change is needed.

The change however makes it possible to validate the source files with a
correct json-schema.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://lore.kernel.org/r/20211012183431.718691-1-niklas.soderlund+renesas@ragnatech.se
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2021-10-14 10:46:46 +02:00
Niklas Söderlund
5fea5b5571 arm64: dts: renesas: r8a779a0: Add and connect all CSI-2, ISP and VIN nodes
The V3U have 32 VIN, 4 CSI-2 and 4 ISP nodes that interact with each
other for video capture. Add all nodes and record how they are
interconnected.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://lore.kernel.org/r/20211012100038.375289-1-niklas.soderlund+renesas@ragnatech.se
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2021-10-14 10:46:46 +02:00
Chukun Pan
d4949bf9cc
arm64: dts: allwinner: NanoPi R1S H5: Add generic compatible string for I2C EEPROM
The 'microchip,24c02' compatible does not match the at24 driver, so
add this generic fallback to the device node compatible string to
make the device to match the driver using the OF device ID table.

Also set this eeprom to read-only mode because it stores the mac
address of the onboard usb network card.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20211010135017.6855-2-amadeus@jmu.edu.cn
2021-10-14 09:17:42 +02:00
Robert Marko
7379291912 arm64: dts: marvell: add Globalscale MOCHAbin
Globalscale MOCHAbin is a Armada 7040 based development board.

Specifications:
* Armada 7040 Quad core ARMv8 Cortex A-72 @ 1.4GHz
* 2 / 4 / 8 GB of DDR4 DRAM
* 16 GB eMMC
* 4MB SPI-NOR (Bootloader)
* 1x M.2-2280 B-key socket (for SSD expansion, SATA3 only)
* 1x M.2-2250 B-key socket (for modems, USB2.0 and I2C only)
* 1x Mini-PCIe 3.0 (x1, USB2.0 and I2C)
* 1x SATA 7+15 socket (SATA3)
* 1x 16-pin (2×8) MikroBus Connector
* 1x SIM card slot (Connected to the mini-PCIe and both M.2 slots)
* 2x USB3.0 Type-A ports via SMSC USB5434B hub
* Cortex 2x5 JTAG
* microUSB port for UART (PL2303GL/PL2303SA onboard)
* 1x 10G SFP+
* 1x 1G SFP (Connected to 88E1512 PHY)
* 1x 1G RJ45 with PoE PD (Connected to 88E1512 PHY)
* 4x 1G RJ45 ports via Topaz 88E6141 switch
* RTC with battery holder (SoC provided, requires CR2032 battery)
* 1x 12V DC IN
* 1x Power switch
* 1x 12V fan header (3-pin, power only)
* 1x mini-PCIe LED header (2x0.1" pins)
* 1x M.2-2280 LED header (2x0.1" pins)
* 6x Bootstrap jumpers
* 1x Power LED (Green)
* 3x Tri-color RGB LEDs (Controllable)
* 1x Microchip ATECC608B secure element

Note that 1G SFP and 1G WAN cannot be used at the same time as they are in
parallel connected to the same PHY.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2021-10-13 16:45:59 +02:00
Linus Torvalds
f4d0cc426f arm64 fixes:
- Fix CMA gigantic page order for 16K/64K page sizes.
 
 - Fix section mismatch error in drivers/acpi/arm64/gtdt.c.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE5RElWfyWxS+3PLO2a9axLQDIXvEFAmFlvOMACgkQa9axLQDI
 XvGPgA//Ur1ncAUo8xUlwCY+/BWr9YSOGh5JBf1Ac2nG/Qec2FwxEwv7uyM80nw1
 tQ2XmzTL6j4u9r4ZoaHyDI+YQ+fY++OqE+OMj4Ym86GRsG8cZD9rfFRlVipC2Fuy
 09er43QfPt5sLwrzvb9nlyYeyNCIGEyeYvJLW1uftyBXqx5ODOoTRo4ZLEVRYiSe
 B5hGFysG5oI6euG/z3xP6NLoOA51gIVtw8DvCrVHyrwxrpKJbH8LLVESihR/e/Vv
 SWEJtJ0Z/IZRyZbPX/BFLj+CQKbJPsc5T73tOsSZHm78XYlfwyCX/iGDvNBrTRqm
 eRKEzpZ8Nvi0tCt06IS6TV85GNszgKQW3SJgh1d+UkWdJ16EirkVI5Xf6NWMbRYn
 xxWAsXaWdfynZ1oB6o+QBqkNLr6rwfNfZrgF/1c8mtp0qN+aKwyUAfQB8ornBJkH
 ErTqC4u9AOmo2S+wgLqAJb3/XMXGGGYSVhyaZzqFr5hhksFL969X8WAzkvYSPisv
 CE+GYqRTuWtvLknUklSi1oDKcMf6WDIxvfq09CU+ydk3MskaZR3Eh3SNuX9joGDD
 vY/FVVofaFGkIKayeB7dCQjPnfhxwkWSK1sv0LpOk3OByBcHdpZTYeuwdvC0n9QJ
 o2+mfvShfl2maTCf+2dr1ZqbpI5sG49cywffBQrgQfpzSAkPT5A=
 =L70N
 -----END PGP SIGNATURE-----

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

Pull arm64 fixes from Catalin Marinas:

 - Fix CMA gigantic page order for 16K/64K page sizes

 - Fix section mismatch error in drivers/acpi/arm64/gtdt.c

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  acpi/arm64: fix next_platform_timer() section mismatch error
  arm64/hugetlb: fix CMA gigantic page order for non-4K PAGE_SIZE
2021-10-12 11:16:38 -07:00
Marc Zyngier
2a6bf5139e Merge branch kvm-arm64/misc-5.16 into kvmarm-master/next
* kvm-arm64/misc-5.16:
  : .
  : - Allow KVM to be disabled from the command-line
  : - Clean up CONFIG_KVM vs CONFIG_HAVE_KVM
  : - Fix endianess evaluation on MMIO access from EL0
  : .
  KVM: arm64: Fix reporting of endianess when the access originates at EL0

Signed-off-by: Marc Zyngier <maz@kernel.org>
2021-10-12 15:49:14 +01:00
Marc Zyngier
69adec18e9 KVM: arm64: Fix reporting of endianess when the access originates at EL0
We currently check SCTLR_EL1.EE when computing the address of
a faulting guest access. However, the fault could have occured at
EL0, in which case the right bit to check would be SCTLR_EL1.E0E.

This is pretty unlikely to cause any issue in practice: You'd have
to have a guest with a LE EL1 and a BE EL0 (or the other way around),
and have mapped a device into the EL0 page tables.

Good luck with that!

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Link: https://lore.kernel.org/r/20211012112312.1247467-1-maz@kernel.org
2021-10-12 15:47:25 +01:00
Arnd Bergmann
96c7f32d17 Devicetree changes for TI K3 platforms for v5.16 merge window:
* New Platforms:
   - AM654: Siemens IOT2050 PG2 boards
   - J721E: Low cost SK board
 * New features:
   - mmc aliases introduced
   - AM64 ICSSG nodes, mcu pinctrl added
 * Fixes:
   - Schema fixups for pcie, thermal zones
   - Fixup to include board specific property for J721e-evm and j7200-evm
   - Misc fixups including cleaning up order in Makefile
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+KKGk1TrgjIXoxo03bWEnRc2JJ0FAmFldHYACgkQ3bWEnRc2
 JJ1Ecw//Qwdmws9fgghodAov7lHNl+vKk8rM8jIavZbVvHMdk/s7kD8vjRse8LtT
 9bhmf59XF/JfQwah01GKz2J4bCSgMw0WEzk5fcWJU/wzocoEdw3t0DeLS1UJFvaX
 0z3bKnO9PBfTMqjjLpWymFMRG4w1upuIp3EpvN8jRq+r8f6reEOuFGceZJt5dgT8
 KjoK8lk+dvVqn/UkB17gSPT8sZ6FPR+un7VVN9aqL0Fh/8F2xpNaYza8JLKtqdAg
 GPC0PL+fEfY7jtoPWvo0Pv0SdmSuBHeHLo+Tt9e8KD2ngb6We9MhU2W5BX0vSUvO
 SNhf5hxF0erXGv8/3h/hEFAApM/RjVPHltLZ5GarIbyQXJNNNzj5Ahy8TzxjTfVE
 /8rzCpWEf9FP1g/8B7l6U8bGrLEGpBOrXG2cZlKQDnhfJXPojVkLFh+dwXbkhyt7
 BuKUZ/xTimOKP+1AyJrSm4svwk41mI+gZZ2jl/dbOcpD9uWIAE1s8pCsMlfrTlwV
 DM0Cs4uH3dyR0iytUX0T8X3R0x6wUsouSY3IWVGYrvxqmptwPnCelyq1711sIKE0
 btqyVZHjxJYMiiRSb0RX1fVNQFW56LeIIXJU20boZe9HV4gu4DlczEjQvD6gRiyk
 QRBPv1EaJF/rHHTaKA+Ys1Fs0vuUrlMS3p27xXjp1hzpwBK3eDo=
 =6QM1
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFlhM0ACgkQmmx57+YA
 GNlPIw//azQ029ryXE/J9xsAGAUdMvvaZOjiLzKP7hB8CWx9txIgqbuUc3ywTm8k
 1D9QVEsXJUUHyOyENacffAjudIl5GLSA3hlzP1owirvJm7zcuTcOSQ/1GFnyBCXV
 T0iLG4CBV9G1sd9EerUO96XoXgO7S5ijx9v8fGrlagIMXebR6CXbdil1+yjJk8wM
 EgELxIGNCIDCiedbBurv/TMgFhIh7mr01ykaVlkQ1PLY9oLLI65p+iuAhVDPMoL0
 h8kg0MNf1QNc0iPaZG6UezWnZjfxeQ4+jtOya4j3pB4eRLeZjoFnsJT47KcqCCTL
 vMCTwMMiJwyWoFUN9ufjvY/7vu2atpFgC8AoNBrJAlK6CqxM/LTM7vGIED50Oahb
 +Pb8Le+t25ZQoFOq9EK8FnNQszcuyhI+pwp5khSShmarRy+97swfKuIoXOPm4gO0
 +C0UxWfULVFQN1FUJrX/SfE2/hYNuHXK1nsilzII7h9NLZio580mwA05Ge2UbjP7
 UJTxlff0fBLXjTddBPPf8OjN7L9QFgweblkWfahRV+qFItL9iwYtnsD1lxZnJgHE
 vRYDtaeWH12vp7QRIjUvtD1O2ZSqwD2tC/MHC1rlWq/tGf5+ghdzGnGOaELocvAu
 iO4bJ0KOgJkDKkhroFtcXXYO0XAVki5fQWlQF2G4371I4t/xDh8=
 =M+lK
 -----END PGP SIGNATURE-----

Merge tag 'ti-k3-dt-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux into arm/dt

Devicetree changes for TI K3 platforms for v5.16 merge window:

* New Platforms:
  - AM654: Siemens IOT2050 PG2 boards
  - J721E: Low cost SK board
* New features:
  - mmc aliases introduced
  - AM64 ICSSG nodes, mcu pinctrl added
* Fixes:
  - Schema fixups for pcie, thermal zones
  - Fixup to include board specific property for J721e-evm and j7200-evm
  - Misc fixups including cleaning up order in Makefile

* tag 'ti-k3-dt-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux: (24 commits)
  arm64: dts: ti: k3-j721e-sk: Add DDR carveout memory nodes
  arm64: dts: ti: k3-j721e-sk: Add IPC sub-mailbox nodes
  arm64: dts: ti: Add support for J721E SK
  dt-bindings: arm: ti: Add compatible for J721E SK
  arm64: dts: ti: iot2050: Add support for product generation 2 boards
  arm64: dts: ti: iot2050: Prepare for adding 2nd-generation boards
  dt-bindings: arm: ti: Add bindings for Siemens IOT2050 PG2 boards
  arm64: dts: ti: iot2050: Add/enabled mailboxes and carve-outs for R5F cores
  arm64: dts: ti: iot2050: Disable SR2.0-only PRUs
  arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices
  arm64: dts: ti: k3-j7200-common-proc-board: Add j7200-evm compatible
  arm64: dts: ti: k3-j721e-common-proc-board: Add j721e-evm compatible
  dt-bindings: arm: ti: Add missing compatibles for j721e/j7200 evms
  arm64: dts: ti: Makefile: Collate AM64 platforms together
  arm64: dts: ti: k3-am64-main: Add ICSSG nodes
  arm64: dts: ti: k3-am65: Relocate thermal-zones to SoC specific location
  arm64: dts: ti: ti-k3*: Introduce aliases for mmc nodes
  arm64: dts: ti: k3-am65-main: Cleanup "ranges" property in "pcie" DT node
  arm64: dts: ti: j7200-main: Add *max-virtual-functions* for pcie-ep DT node
  arm64: dts: ti: j7200-main: Fix "bus-range" upto 256 bus number for PCIe
  ...

Link: https://lore.kernel.org/r/20211012120817.beqhp4tygnf3xyi5@wireless
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-12 14:51:25 +02:00
Chanho Park
2b663ae715 arm64: dts: exynos: add minimal support for exynosautov9 sadk board
SADK(Samsung Automotive Development Kit) is the development kit to
evaluate Exynos Auto v9 SoC. It has 16GB LPDDR4 DRAM and two
256GB Samsung UFS. This patch enables only serial console and ufs0
device.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Link: https://lore.kernel.org/r/20211012002314.38965-4-chanho61.park@samsung.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
2021-10-12 14:20:57 +02:00
Chanho Park
31bbac5263 arm64: dts: exynos: add initial support for exynosautov9 SoC
Add minimal support for ExynosAuto v9 SoC[1].

- Enumarate all pinctrl nodes
- UART with exynos850 compatible
- UFS0 HCI + Phy

Like exynos850, this also uses fixed-rate clock nodes until clock driver
has been supported. The clock nodes are initialized on bootloader stage
thus we don't need to control them so far.

[1]: https://www.samsung.com/semiconductor/minisite/exynos/products/automotiveprocessor/exynos-auto-v9/

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Link: https://lore.kernel.org/r/20211012002314.38965-3-chanho61.park@samsung.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
2021-10-12 14:20:44 +02:00
Sumit Garg
de56379f21 arm64: ftrace: use function_nocfi for _mcount as well
Commit 800618f955 ("arm64: ftrace: use function_nocfi for ftrace_call")
only fixed address of ftrace_call but address of _mcount needs to be
fixed as well. Use function_nocfi() to get the actual address of _mcount
function as with CONFIG_CFI_CLANG, the compiler replaces function pointers
with jump table addresses which breaks dynamic ftrace as the address of
_mcount is replaced with the address of _mcount.cfi_jt.

With mainline, this won't be a problem since by default
CONFIG_DYNAMIC_FTRACE_WITH_REGS=y with Clang >= 10 as it supports
-fpatchable-function-entry and CFI requires Clang 12 but for consistency
we should add function_nocfi() for _mcount as well.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Link: https://lore.kernel.org/r/20211011125059.3378646-1-sumit.garg@linaro.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-12 09:24:49 +01:00
Anders Roxell
1dfde0892b arm64: asm: setup.h: export common variables
When building the kernel with sparse enabled 'C=1' the following
warnings can be seen:

arch/arm64/kernel/setup.c:58:13: warning: symbol '__fdt_pointer' was not declared. Should it be static?
arch/arm64/kernel/setup.c:84:25: warning: symbol 'boot_args' was not declared. Should it be static?

Rework so the variables are exported, since these two variable are
created and used in setup.c, also used in head.S.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Link: https://lore.kernel.org/r/20211007195601.677474-1-anders.roxell@linaro.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-10-12 09:22:33 +01:00
Arnd Bergmann
543659b312 arm64: tegra: Default configuration changes for v5.16-rc1
This enables drivers for the various audio processors found on Tegra210
 and later.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmFgoxMTHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zoXviD/wLoYBKWPFa0GWo037+xMN3xqyOCgN5
 CbHGvTC24Gln/RoN3A72TVezV6E27+sy9kz0J0jE9yQ0AKxjNKYQM5VXSWwgGSCW
 JhVZ2x65OlQjEGsRuNa+C10QFWC8sUigKOUT+fP6LiKZ4oHefouHecttJmLViSoj
 h/9OhrOhI6kqmj3DFUUz5zqNGwyooFvSyvC87gCJO9YEnFgV1i51SWxfuczdTokI
 v49EqjU2vvyADtqZb1JVIrAIG0qlqjMDhb20JHklvIP3dQja+OjRSfsoQyeZ3dTU
 CqKQCfA0/eaDtIsi6PwEFLRxqmZ8AnMFd3CMTixJa5ba2iERRWqUqTJSrgBBZMtr
 Ly18iBZXiSQCBfHC8xbH7Y3MV95pOwO+NVzqGLK6REtWtz0RjfgnDRxml4J9Uh+M
 Fzt0glGTrDkdQKoR5ijPv7P0w5nkiuXwlAS+bpwQtqVTo5UpQjABjoOZ+PTimtWb
 QF7nxoYkFuEqB6PGLFamkNsd+Etfv812UqENjMCf9I+BaRrstlEfDBj9vdNuWBT4
 zoEVu4DtQXSqoUXDPf03XAFROf5imm/0xzrFzkOc0q+twIY7aW6lxa6DFqTXkgTA
 f9lEbQlbyrXGByGfGLNFphi4F/dqFAZKFSQj8RH6sECAhZ8QP7h5th18IahhXtiY
 13sQVGfDRkXq9Q==
 =v2qB
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFktucACgkQmmx57+YA
 GNkX1g/+PU7nLo9DRbhJUh38Pm7PGmlAZJKzIL9+igaedvLaxkBsZQ1MQTdSTlti
 pcE1lkFZZbGphZ8gyWiWQsQjzG2gmuX7TTBNPncG4nuv93J3+bGY0H85d6JeTZ29
 XK/ncvdNLtegbYDkYtpuitZCT6wH8uWc2CMjuqScSMjXCGY+oN2ObIWl2t/0kcby
 WDhL9q18nebB38XSQxrOgL7nKIJj8zgypujZuapdgI658ZJQIv59nhpBon8X6yZK
 fbEycltVzgD8ZRIDB4pDuzRVb7A9nPwosAIzIFcDp6F0HYyMNFA/ikXlSLwnXVND
 cwq7p5XPjvjfWvphYhG8aVTcFL5Tz6v+4pNm6CCE3kOGGB6PXvWz88GJjAvSWdCu
 OA0d0xxnXBaEqIljLF/7lw8VRNd/kJpXki01YFa3aFoDWLrvmXODNm6XjdHtokXq
 O6Z74CYSbHH2Ny1zaJNJkl1qIVRck9/2hu1Pp3rQSXl3IVfwjskGZm3NdRw1vCtz
 BdJvj/4gpkT8oCqCaFWbGMabIRhU0Rudvlr2P7/YfmRlO6vf4xspnNhpi9FW0csV
 5ZIpGn3Yiil/1ahtX/F2PU97kTja6eR3bo+ATUF+mw3BgOr0cWdfjIpDpl4EWm/e
 OYYDrRcLcxUK08r8kBkhCebo7jV7a7uJY2Sis76Cq1K3gSE/WE4=
 =7sxf
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-5.16-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/defconfigs

arm64: tegra: Default configuration changes for v5.16-rc1

This enables drivers for the various audio processors found on Tegra210
and later.

* tag 'tegra-for-5.16-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  arm64: defconfig: Enable few Tegra210 based AHUB drivers

Link: https://lore.kernel.org/r/20211008201132.1678814-8-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-12 00:12:55 +02:00
Arnd Bergmann
2a9c7b9062
Revert "arm64: dts: Add support for Unisoc's UMS512"
The patch uses the "dt-bindings/clock/sprd,ums512-clk.h header, which
is not merged yet. This caused a build regression, and it means the
patch was not ready to get merged anyway.

This reverts commit 23410de579.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-11 23:02:34 +02:00
Arnd Bergmann
d1edc9865c arm64: tegra: Device tree changes for v5.16-rc1
This enables additional interrupts on the Tegra194 GPIO controller for
 better load balancing and/or virtualization, adds audio support on
 Jetson TX2 NX, enables the NVDEC video decoder on Tegra186 and later and
 enables more audio processors that are found on Tegra210 and later.
 
 Various cleanups across the board top things off.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmFgotUTHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zoaYVD/9XwbRdNCseQB/fj36HQPtyCPC8ZISd
 2RHu+Jx+XN0L4aChGaM4iBi1/RxrAcFHbQb4HI8IsI0IoMgHcfNSUd+rlfUNDzEX
 Wy1O3CoJa4Z8FO6i3PsRAEOCPZgudglhU5PNmnV32OoXSNSv9EzvWXI+EaZwb8fd
 VHF9yuXa1CXJqz5OuVoCIK/8IopbVf4w5qlgr+SJRok+j3xVTx68eMracvoTx71R
 I6kWGLk0vRfySUO8FQwi69RMqvzVH/doDiu9FZcB89OWPBCokgxQY0THLm1/A7c7
 VstmsQUodwflz47drrAQoel6RsqHmpAqbn+SfxpdKwCEQBcbXTSjCqJ5zfqIBaRC
 qJUb0oNB9mS2TbTZ4CQz579BcXy4FE+JW0nANO1tqkUqRa1JcJDN8P6CMJE04Dka
 fCG+IWs1IRBPeLEvbgg6fpJ581pVGr+sqKiGr9FnYHwKPLXNfyX6jCvtvWsXfmAo
 9u36b8kcdrAvGuEZTiumboIP81sGYYEzP4GjnOB7JjLbtUpGTllDDTuTJdSozScJ
 dlEzoLNuNJDqk3Lq0GqIdy0BTyJVy+9xudD8RpP+T3vvS3PvWp4GAQoH0k3pdbtV
 fLpgl8UM7uoPHKoFy80aqS0RTDoq8/818qnKLpAeurPsivu2pbLRTB29/10x8TYr
 1domUAtN/S44Bg==
 =rNmg
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFkmi4ACgkQmmx57+YA
 GNmp6Q/9Hq2UTbGAcwfdtCyS8zazz3uyPoI6EToqyAA+FFllW6uIZrP1fo7UCjL3
 U95L9n4iyGGTf8Xm4isVxZoJlIPqf61eXb6kqVhMz9BpuEEcpvQ/SZgGVnIU7hmU
 rZeiQC5l2tK3o4EUrgRkLBJzY6jlcjEowRMxrjn6n7WUmdw1y1KwGe/BLC+6xrR3
 /q2VZzcVtMWUR7jucwOSdUtdyTKOADRuqHe7R7zjIkmkffOa/dimyJwBjT0YXFZo
 nl9W6TdLcDmu9gTTU7YAL1kvSG5kTri53jsRymBd6Tu9ZAqtaUGqqJ+b6VEf58KV
 S2Q8vu6OoGZonGCEtWO5OuR08fWdK09xJKrII/7gV4GVSPKZN0zrcb/ZOmOxhgvu
 UuO9UqGF45rhvgSIjyxXEAT/AKg1nIWL0x32Qex7n1sCl1M/uWLhhmWjp0aop0dK
 z+Gkso2Vqsj0/MGTNQHiDmCwsR9oNgxpB1DuD7ulsofQDqKcI3VcMth+WOiUPrs0
 cpr2gUpu/ZXT+yVDg2hgxiWuh+OoUa0IOC2l9iEPAehQDO/CmWuxOK+JoRH9NZFa
 Cyq86xsi+x1ocGqehu3Gn5k61iSzG+S9fjjBb1DEIlM+M8Xvejex59gX7hr48gDL
 WpT84s2iElQ6chDWDMgnZ3s3G1BKV6JsdcW2e6xYGuZG2Jwa1W4=
 =dOYU
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-5.16-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt

arm64: tegra: Device tree changes for v5.16-rc1

This enables additional interrupts on the Tegra194 GPIO controller for
better load balancing and/or virtualization, adds audio support on
Jetson TX2 NX, enables the NVDEC video decoder on Tegra186 and later and
enables more audio processors that are found on Tegra210 and later.

Various cleanups across the board top things off.

* tag 'tegra-for-5.16-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  arm64: tegra: Fix pcie-ep DT nodes
  arm64: tegra: Remove useless usb-ehci compatible string
  arm64: tegra: Extend APE audio support on Jetson platforms
  arm64: tegra: Add few AHUB devices for Tegra210 and later
  arm64: tegra: Remove unused backlight-boot-off property
  arm64: tegra: Add NVDEC to Tegra186/194 device trees
  arm64: tegra: Add new USB PHY properties on Tegra132
  arm64: tegra: Update HDA card name on Jetson TX2 NX
  arm64: tegra: Audio graph sound card for Jetson TX2 NX
  arm64: tegra: Add additional GPIO interrupt entries on Tegra194

Link: https://lore.kernel.org/r/20211008201132.1678814-7-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-11 22:10:22 +02:00
Chunyan Zhang
23410de579
arm64: dts: Add support for Unisoc's UMS512
Add basic DT to support Unisoc's UMS512, with this patch,
the board ums512-1h10 can run into console.

Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Link: https://lore.kernel.org/r/20211008034533.343167-3-zhang.lyra@gmail.com'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-11 21:53:55 +02:00
Mike Kravetz
2e5809a4dd arm64/hugetlb: fix CMA gigantic page order for non-4K PAGE_SIZE
For non-4K PAGE_SIZE configs, the largest gigantic huge page size is
CONT_PMD_SHIFT order. On arm64 with 64K PAGE_SIZE, the gigantic page is
16G. Therefore, one should be able to specify 'hugetlb_cma=16G' on the
kernel command line so that one gigantic page can be allocated from CMA.
However, when adding such an option the following message is produced:

hugetlb_cma: cma area should be at least 8796093022208 MiB

This is because the calculation for non-4K gigantic page order is
incorrect in the arm64 specific routine arm64_hugetlb_cma_reserve().

Fixes: abb7962adc ("arm64/hugetlb: Reserve CMA areas for gigantic pages on 16K and 64K configs")
Cc: <stable@vger.kernel.org> # 5.9.x
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Link: https://lore.kernel.org/r/20211005202529.213812-1-mike.kravetz@oracle.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2021-10-11 18:45:19 +01:00
Arnd Bergmann
1649069312 Amlogic ARM64 DT changes for v5.16:
- New Boards (with bindings):
   - Radxa Zero
   - Jethub D1 & H1 home automation controllers
 - Misc Changes:
   - add Ethernet PHY reset line for ODROID-C4/HC4
   - add audio playback nodes to rbox-pro
   - Fix the pwm regulator supply properties
   - meson-g12b-odroid-n2: add missing 5v regulator gpio
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmFewM0ACgkQd9zb2sjI
 SdEqAQ//Rekq0ugm358sg434utmQ+2Ney7Qjuu9q/qmm3mZCtX7im7ejyp/5niTg
 aGcvtDn1U1iR+7uPsp/5u1SV7zE+DT7XwcALMxHLrDqa9PNkLEqgn4PMKdrw7JYb
 O0hWcGG0P9nI9o7XZDS+zR6DU6CTrutmlK7ZpuoY0cZDdJg9ZvF2zjx1aTbw52+N
 iB0wutDJpqhKU4nSMnndnmlSVXsHRvrZcWRROrBcbD8IiNDlPW7e2LU0tbPizHhq
 +lfZqNNIxv/0v+Cgfg1YSJeV2fvIju/BNGWsU2zUELf+mndrZyF89+HUu/Kbf9AO
 u+FitXp2OVF/W2I7kgdRtxXvwDWRhWdVHQT8nWDNrNmO4d0paT7TzaXU046HRDkk
 ypTZZXDsmOe3cQ0xXz3ggW+VaCjulRChLI/oW5+56HMPuqtR1Nl0o3xkTwddWejs
 Ol8Gor6upv6F3dP89uzERLo0OeJ4n0v8Dh8du8dPqu8kUrJC5OCXLR8TiIylKmtS
 RUlP7oCOR7/u7e18vdSoTDyuCX+laCzuCkgBUuRUndW0uJCLDgEaYw8fRru8VwGS
 brU/DMIbXRStOviIhxQjYR4uwXQAAZompZCQnSKCwMH/hMm9YyAUcTtMMRs0hv+3
 MPrx4NT69M9Q8TQthkEduR7hRINCD1iUaL/M4gjWxO1XYJOKyoU=
 =2tyw
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFkVEsACgkQmmx57+YA
 GNkZjhAAuQGq6bnQjP3l7lsalzvk3MMDKYb+2ot810sBtStbxPabhu9m0GawOYsd
 NSzdCSFpBYFNyy1PqzDWDvl1Vf84Yhs2BZRqIFHxP8vM3udE26MpS9nXuByWvCfA
 8Ljl6+3qaMpBwfD0wlsIQj0z1Bdzcc4ASn7yE4gbNpU9BvcVnDEcuqxN1rvdibuQ
 OCKCSXqAZ8jCiikMrV2cfaFjK3fFq8rdDJg7tkYGN1+wGcokR5CKV08EsoNBOOhf
 6Jv2C+7LD/B7NFMXBWCEe/HSr2Qllu3+Yn5F+MUShxuqq5USCaV9DlwYmnkPpmk/
 RmuyIxVowYeBZ9wEgr0TJURu3/Vr7E+WkbKhFr11KKfXxhbVxtpZ5H/PvHtIAZ8b
 yEbOWzHtR6HEOoM9Ydd5ffSQB/uf5Ce/zV5tlB1USJDXsRe2ScEAE9fnOXVUntDy
 Mcq4io8ZlKpAF3dXQGVpZV4g23HzoRI+GBvrhu7n6RphQGxblssQLjg+0mSm0F5x
 Quc7iwDZJnBbDcdayHUSU8vYJsvxrl8PV6h1nmCfN4GyXh4U6g4hOV/tmFYa1BWE
 m+ugP+RA9jqyj8yFFtcrYFRimqyhBy8thKWWmYe7+xUd+H9ACRLnIvdsd9I4xl5T
 SqzIsfku5qGJwNuHoc3t2QW2bAwiH4VUqVf0FQ4UOG56pBse6P8=
 =wQxa
 -----END PGP SIGNATURE-----

Merge tag 'amlogic-arm64-dt-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/dt

Amlogic ARM64 DT changes for v5.16:
- New Boards (with bindings):
  - Radxa Zero
  - Jethub D1 & H1 home automation controllers
- Misc Changes:
  - add Ethernet PHY reset line for ODROID-C4/HC4
  - add audio playback nodes to rbox-pro
  - Fix the pwm regulator supply properties
  - meson-g12b-odroid-n2: add missing 5v regulator gpio

* tag 'amlogic-arm64-dt-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux:
  arm64: dts: meson-g12b-odroid-n2: add 5v regulator gpio
  arm64: dts: meson-sm1: Fix the pwm regulator supply properties
  arm64: dts: meson-g12b: Fix the pwm regulator supply properties
  arm64: dts: meson-g12a: Fix the pwm regulator supply properties
  arm64: dts: meson: add audio playback to rbox-pro
  arm64: dts: meson-axg: add support for JetHub D1
  arm64: dts: meson-gxl: add support for JetHub H1
  dt-bindings: vendor-prefixes: add jethome prefix
  dt-bindings: arm: amlogic: add bindings for Jethub D1/H1
  arm64: dts: amlogic: add support for Radxa Zero
  dt-bindings: arm: amlogic: add support for Radxa Zero
  arm64: dts: meson: sm1: add Ethernet PHY reset line for ODROID-C4/HC4

Link: https://lore.kernel.org/r/cc0a3af0-b1b1-dbe1-f553-cf58a1c63d0b@baylibre.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-11 17:12:11 +02:00
Arnd Bergmann
687d67639b arm64: dts: ZynqMP DT changes for v5.16-v2
- Add support for Kria SOM board
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQbPNTMvXmYlBPRwx7KSWXLKUoMIQUCYV6e2AAKCRDKSWXLKUoM
 IS/BAKCZ7K9fo7UhgytlPzxnY99nm3wu9QCeK/0bs3dHFgOv3ICARrQMwrzZzuA=
 =jrSM
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFkU9cACgkQmmx57+YA
 GNnVTRAAvViib69MVXtwdWr6e984+UaQtkIw4aiEJoVchU8P7FalAvOqfjNP9Buo
 Mp1SMleTBQAigF4oWE/IuukOVlI5x6sbN6qrpzb/sKQ3NBn4l/MT71UaP8mrs9of
 CnUzRWGJxlu7oaQX65ZCAc01jdFhyai9/o6gipP17LWHZUaGZVI6P43/17JW/EP0
 QWuOyb0swgPLhUTbtSpZQdR5G5Y+b98nfOAhwYSxngSI4/xYzR2md8blt1hwVol8
 3d2laoz2PtfR/LYuWFmgr95KdUza/H9EL00WRo0hrhdGItG3C7/jZ/FlqAOzME7o
 P+AS1YSCqIR37IJTqEckjHO8iAkeEIJGVyRDhRXlu/HJ93f2DWpMAFszv3Bphdh/
 JD5qvs7tfC8oZTCI/RU7ovbcg0U9iMlAu16UfnV8Tcp37kuGOa8564nLh9YbaJxG
 YXPLhSkkxg9axTJX7AHcVK9W5oRszneHA0o/kDHdvqGcZQR6Sl8a6yCaS8beeTcS
 UbCJYry1eIthkpB3GzwFiriUVsfRHfX1qmvTcuvaNQ2viZNqVB52Ela+v2JLCpbE
 lbFE0eTim3kPdcQta8qFT0iJklezLFDL/cXYMl+ApongbUB2khXPn7a6/ugn3tCE
 tU5FtuXUHdZnYKiYaW0ucxZEkVVQRsSbiyn2QpJdPRzd8sGzj5U=
 =JffT
 -----END PGP SIGNATURE-----

Merge tag 'zynqmp-dt-for-v5.16-v2' of https://github.com/Xilinx/linux-xlnx into arm/dt

arm64: dts: ZynqMP DT changes for v5.16-v2

- Add support for Kria SOM board

* tag 'zynqmp-dt-for-v5.16-v2' of https://github.com/Xilinx/linux-xlnx:
  arm64: zynqmp: Add support for Xilinx Kria SOM board

Link: https://lore.kernel.org/r/9815867c-ffbb-fc9d-64b9-badee5e2862b@xilinx.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-11 17:10:15 +02:00
Fuad Tabba
5f39efc420 KVM: arm64: Handle protected guests at 32 bits
Protected KVM does not support protected AArch32 guests. However,
it is possible for the guest to force run AArch32, potentially
causing problems. Add an extra check so that if the hypervisor
catches the guest doing that, it can prevent the guest from
running again by resetting vcpu->arch.target and returning
ARM_EXCEPTION_IL.

If this were to happen, The VMM can try and fix it by re-
initializing the vcpu with KVM_ARM_VCPU_INIT, however, this is
likely not possible for protected VMs.

Adapted from commit 22f553842b ("KVM: arm64: Handle Asymmetric
AArch32 systems")

Signed-off-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211010145636.1950948-12-tabba@google.com
2021-10-11 14:57:30 +01:00
Fuad Tabba
1423afcb41 KVM: arm64: Trap access to pVM restricted features
Trap accesses to restricted features for VMs running in protected
mode.

Access to feature registers are emulated, and only supported
features are exposed to protected VMs.

Accesses to restricted registers as well as restricted
instructions are trapped, and an undefined exception is injected
into the protected guests, i.e., with EC = 0x0 (unknown reason).
This EC is the one used, according to the Arm Architecture
Reference Manual, for unallocated or undefined system registers
or instructions.

Only affects the functionality of protected VMs. Otherwise,
should not affect non-protected VMs when KVM is running in
protected mode.

Signed-off-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211010145636.1950948-11-tabba@google.com
2021-10-11 14:57:30 +01:00
Fuad Tabba
72e1be120e KVM: arm64: Move sanitized copies of CPU features
Move the sanitized copies of the CPU feature registers to the
recently created sys_regs.c. This consolidates all copies in a
more relevant file.

No functional change intended.

Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211010145636.1950948-10-tabba@google.com
2021-10-11 14:57:30 +01:00
Fuad Tabba
2a0c343386 KVM: arm64: Initialize trap registers for protected VMs
Protected VMs have more restricted features that need to be
trapped. Moreover, the host should not be trusted to set the
appropriate trapping registers and their values.

Initialize the trapping registers, i.e., hcr_el2, mdcr_el2, and
cptr_el2 at EL2 for protected guests, based on the values of the
guest's feature id registers.

No functional change intended as trap handlers introduced in the
previous patch are still not hooked in to the guest exit
handlers.

Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211010145636.1950948-9-tabba@google.com
2021-10-11 14:57:29 +01:00
Fuad Tabba
6c30bfb18d KVM: arm64: Add handlers for protected VM System Registers
Add system register handlers for protected VMs. These cover Sys64
registers (including feature id registers), and debug.

No functional change intended as these are not hooked in yet to
the guest exit handlers introduced earlier. So when trapping is
triggered, the exit handlers let the host handle it, as before.

Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211010145636.1950948-8-tabba@google.com
2021-10-11 14:57:29 +01:00
Fuad Tabba
16dd1fbb12 KVM: arm64: Simplify masking out MTE in feature id reg
Simplify code for hiding MTE support in feature id register when
MTE is not enabled/supported by KVM.

No functional change intended.

Signed-off-by: Fuad Tabba <tabba@google.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211010145636.1950948-7-tabba@google.com
2021-10-11 14:57:29 +01:00
Fuad Tabba
5386839077 KVM: arm64: Add missing field descriptor for MDCR_EL2
It's not currently used. Added for completeness.

No functional change intended.

Suggested-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211010145636.1950948-6-tabba@google.com
2021-10-11 14:57:28 +01:00
Fuad Tabba
3b1a690eda KVM: arm64: Pass struct kvm to per-EC handlers
We need struct kvm to check for protected VMs to be able to pick
the right handlers for them in subsequent patches.

Signed-off-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211010145636.1950948-5-tabba@google.com
2021-10-11 14:57:28 +01:00
Marc Zyngier
8fb2046180 KVM: arm64: Move early handlers to per-EC handlers
Simplify the early exception handling by slicing the gigantic decoding
tree into a more manageable set of functions, similar to what we have
in handle_exit.c.

This will also make the structure reusable for pKVM's own early exit
handling.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/r/20211010145636.1950948-4-tabba@google.com
2021-10-11 14:57:28 +01:00
Marc Zyngier
cc1e6fdfa9 KVM: arm64: Don't include switch.h into nvhe/kvm-main.c
hyp-main.c includes switch.h while it only requires adjust-pc.h.
Fix it to remove an unnecessary dependency.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/r/20211010145636.1950948-3-tabba@google.com
2021-10-11 14:57:27 +01:00
Marc Zyngier
7dd9b5a157 KVM: arm64: Move __get_fault_info() and co into their own include file
In order to avoid including the whole of the switching helpers
in unrelated files, move the __get_fault_info() and related helpers
into their own include file.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/r/20211010145636.1950948-2-tabba@google.com
2021-10-11 14:57:27 +01:00
Marc Zyngier
1eb07f4b68 Merge branch kvm-arm64/raz-sysregs into kvmarm-master/next
* kvm-arm64/raz-sysregs:
  : .
  : Simplify the handling of RAZ register, removing pointless indirections.
  : .
  KVM: arm64: Replace get_raz_id_reg() with get_raz_reg()
  KVM: arm64: Use get_raz_reg() for userspace reads of PMSWINC_EL0
  KVM: arm64: Return early from read_id_reg() if register is RAZ

Signed-off-by: Marc Zyngier <maz@kernel.org>
2021-10-11 14:15:53 +01:00
Alexandru Elisei
ebf6aa8c04 KVM: arm64: Replace get_raz_id_reg() with get_raz_reg()
Reading a RAZ ID register isn't different from reading any other RAZ
register, so get rid of get_raz_id_reg() and replace it with get_raz_reg(),
which does the same thing, but does it without going through two layers of
indirection.

No functional change.

Suggested-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211011105840.155815-4-alexandru.elisei@arm.com
2021-10-11 14:13:59 +01:00
Alexandru Elisei
5a43097623 KVM: arm64: Use get_raz_reg() for userspace reads of PMSWINC_EL0
PMSWINC_EL0 is a write-only register and was initially part of the VCPU
register state, but was later removed in commit 7a3ba3095a ("KVM:
arm64: Remove PMSWINC_EL0 shadow register"). To prevent regressions, the
register was kept accessible from userspace as Read-As-Zero (RAZ).

The read function that is used to handle userspace reads of this
register is get_raz_id_reg(), which, while technically correct, as it
returns 0, it is not semantically correct, as PMSWINC_EL0 is not an ID
register as the function name suggests.

Add a new function, get_raz_reg(), to use it as the accessor for
PMSWINC_EL0, as to not conflate get_raz_id_reg() to handle other types
of registers.

No functional change intended.

Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211011105840.155815-3-alexandru.elisei@arm.com
2021-10-11 14:13:59 +01:00
Alexandru Elisei
00d5101b25 KVM: arm64: Return early from read_id_reg() if register is RAZ
If read_id_reg() is called for an ID register which is Read-As-Zero (RAZ),
it initializes the return value to zero, then goes through a list of
registers which require special handling before returning the final value.

By not returning as soon as it checks that the register should be RAZ, the
function creates the opportunity for bugs, if, for example, a patch changes
a register to RAZ (like has happened with PMSWINC_EL0 in commit
11663111cd), but doesn't remove the special handling from read_id_reg();
or if a register is RAZ in certain situations, but readable in others.

Return early to make it impossible for a RAZ register to be anything other
than zero.

Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211011105840.155815-2-alexandru.elisei@arm.com
2021-10-11 14:13:58 +01:00
Marc Zyngier
a049cf7e63 Merge branch kvm-arm64/misc-5.16 into kvmarm-master/next
* kvm-arm64/misc-5.16:
  : .
  : - Allow KVM to be disabled from the command-line
  : - Clean up CONFIG_KVM vs CONFIG_HAVE_KVM
  : .
  KVM: arm64: Depend on HAVE_KVM instead of OF
  KVM: arm64: Unconditionally include generic KVM's Kconfig
  KVM: arm64: Allow KVM to be disabled from the command line

Signed-off-by: Marc Zyngier <maz@kernel.org>
2021-10-11 10:14:38 +01:00
Sean Christopherson
e26bb75aa2 KVM: arm64: Depend on HAVE_KVM instead of OF
Select HAVE_KVM at all times on arm64, as the OF requirement is
always there (even in the case of an ACPI system, we still depend
on some of the OF infrastructure), and won't fo away.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Acked-by: Will Deacon <will@kernel.org>
[maz: Drop the "HAVE_KVM if OF" dependency, as OF is always there on arm64,
 new commit message]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210921222231.518092-3-seanjc@google.com
2021-10-11 10:08:50 +01:00
Sean Christopherson
c8f1e96734 KVM: arm64: Unconditionally include generic KVM's Kconfig
Unconditionally "source" the generic KVM Kconfig instead of wrapping it
with KVM=y.  A future patch will select HAVE_KVM so that referencing
HAVE_KVM in common kernel code doesn't break, and because KVM=y and
HAVE_KVM=n is weird.  Source the generic KVM Kconfig unconditionally so
that HAVE_KVM and KVM don't end up with a circular dependency.

Note, all but one of generic KVM's "configs" are of the HAVE_XYZ nature,
and the one outlier correctly takes a dependency on CONFIG_KVM, i.e. the
generic Kconfig is intended to be included unconditionally.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
[maz: made NVHE_EL2_DEBUG depend on KVM]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210921222231.518092-2-seanjc@google.com
2021-10-11 10:04:59 +01:00
Biju Das
34cdc0edfe arm64: dts: renesas: rzg2l-smarc: Enable microSD on SMARC platform
This patch enables microSD card slot connected to SDHI1 on RZ/G2L SMARC
platform.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20211010142520.21976-3-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2021-10-11 10:55:48 +02:00
Biju Das
a60a311cb8 arm64: dts: renesas: rzg2l-smarc-som: Enable eMMC on SMARC platform
RZ/G2L SoM has both 64 GB eMMC and microSD connected to SDHI0.

Both these interfaces are mutually exclusive and the SD0 device
selection is based on the XOR between GPIO_SD0_DEV_SEL and SW1[2]
switch position.

This patch sets GPIO_SD0_DEV_SEL to high in DT. Use the below switch
setting logic for device selection between eMMC and microSD slot
connected to SDHI0.

Set SW1[2] to position 2/OFF for selecting eMMC
Set SW1[2] to position 3/ON for selecting microSD

This patch enables eMMC on RZ/G2L SMARC platform by default.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20211010142520.21976-2-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2021-10-11 10:55:48 +02:00
Marc Zyngier
b6a68b97af KVM: arm64: Allow KVM to be disabled from the command line
Although KVM can be compiled out of the kernel, it cannot be disabled
at runtime. Allow this possibility by introducing a new mode that
will prevent KVM from initialising.

This is useful in the (limited) circumstances where you don't want
KVM to be available (what is wrong with you?), or when you want
to install another hypervisor instead (good luck with that).

Reviewed-by: David Brazdil <dbrazdil@google.com>
Acked-by: Will Deacon <will@kernel.org>
Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Andrew Scull <ascull@google.com>
Link: https://lore.kernel.org/r/20211001170553.3062988-1-maz@kernel.org
2021-10-11 09:48:47 +01:00
Marc Zyngier
15f9017c28 Merge branch kvm-arm64/vgic-ipa-checks into kvmarm-master/next
* kvm-arm64/vgic-ipa-checks:
  : .
  : Add extra checks to prevent ther various GIC regions to land
  : outside of the IPA space (and tests to verify that it works).
  : .
  KVM: arm64: selftests: Add init ITS device test
  KVM: arm64: selftests: Add test for legacy GICv3 REDIST base partially above IPA range
  KVM: arm64: selftests: Add tests for GIC redist/cpuif partially above IPA range
  KVM: arm64: selftests: Add some tests for GICv2 in vgic_init
  KVM: arm64: selftests: Make vgic_init/vm_gic_create version agnostic
  KVM: arm64: selftests: Make vgic_init gic version agnostic
  KVM: arm64: vgic: Drop vgic_check_ioaddr()
  KVM: arm64: vgic-v3: Check ITS region is not above the VM IPA size
  KVM: arm64: vgic-v2: Check cpu interface region is not above the VM IPA size
  KVM: arm64: vgic-v3: Check redist region is not above the VM IPA size
  kvm: arm64: vgic: Introduce vgic_check_iorange

Signed-off-by: Marc Zyngier <maz@kernel.org>
2021-10-11 09:43:06 +01:00
Ricardo Koller
96e9038969 KVM: arm64: vgic: Drop vgic_check_ioaddr()
There are no more users of vgic_check_ioaddr(). Move its checks to
vgic_check_iorange() and then remove it.

Signed-off-by: Ricardo Koller <ricarkol@google.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211005011921.437353-6-ricarkol@google.com
2021-10-11 09:31:42 +01:00
Ricardo Koller
2ec02f6c64 KVM: arm64: vgic-v3: Check ITS region is not above the VM IPA size
Verify that the ITS region does not extend beyond the VM-specified IPA
range (phys_size).

  base + size > phys_size AND base < phys_size

Add the missing check into vgic_its_set_attr() which is called when
setting the region.

Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Ricardo Koller <ricarkol@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211005011921.437353-5-ricarkol@google.com
2021-10-11 09:31:42 +01:00
Ricardo Koller
c56a87da0a KVM: arm64: vgic-v2: Check cpu interface region is not above the VM IPA size
Verify that the GICv2 CPU interface does not extend beyond the
VM-specified IPA range (phys_size).

  base + size > phys_size AND base < phys_size

Add the missing check into kvm_vgic_addr() which is called when setting
the region. This patch also enables some superfluous checks for the
distributor (vgic_check_ioaddr was enough as alignment == size for the
distributors).

Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Ricardo Koller <ricarkol@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211005011921.437353-4-ricarkol@google.com
2021-10-11 09:31:41 +01:00
Ricardo Koller
4612d98f58 KVM: arm64: vgic-v3: Check redist region is not above the VM IPA size
Verify that the redistributor regions do not extend beyond the
VM-specified IPA range (phys_size). This can happen when using
KVM_VGIC_V3_ADDR_TYPE_REDIST or KVM_VGIC_V3_ADDR_TYPE_REDIST_REGIONS
with:

  base + size > phys_size AND base < phys_size

Add the missing check into vgic_v3_alloc_redist_region() which is called
when setting the regions, and into vgic_v3_check_base() which is called
when attempting the first vcpu-run. The vcpu-run check does not apply to
KVM_VGIC_V3_ADDR_TYPE_REDIST_REGIONS because the regions size is known
before the first vcpu-run. Note that using the REDIST_REGIONS API
results in a different check, which already exists, at first vcpu run:
that the number of redist regions is enough for all vcpus.

Finally, this patch also enables some extra tests in
vgic_v3_alloc_redist_region() by calculating "size" early for the legacy
redist api: like checking that the REDIST region can fit all the already
created vcpus.

Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Ricardo Koller <ricarkol@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211005011921.437353-3-ricarkol@google.com
2021-10-11 09:31:41 +01:00
Ricardo Koller
f25c5e4daf kvm: arm64: vgic: Introduce vgic_check_iorange
Add the new vgic_check_iorange helper that checks that an iorange is
sane: the start address and size have valid alignments, the range is
within the addressable PA range, start+size doesn't overflow, and the
start wasn't already defined.

No functional change.

Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Ricardo Koller <ricarkol@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211005011921.437353-2-ricarkol@google.com
2021-10-11 09:31:41 +01:00
Will Deacon
057bed206f KVM: arm64: Disable privileged hypercalls after pKVM finalisation
After pKVM has been 'finalised' using the __pkvm_prot_finalize hypercall,
the calling CPU will have a Stage-2 translation enabled to prevent access
to memory pages owned by EL2.

Although this forms a significant part of the process to deprivilege the
host kernel, we also need to ensure that the hypercall interface is
reduced so that the EL2 code cannot, for example, be re-initialised using
a new set of vectors.

Re-order the hypercalls so that only a suffix remains available after
finalisation of pKVM.

Cc: Marc Zyngier <maz@kernel.org>
Cc: Quentin Perret <qperret@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211008135839.1193-7-will@kernel.org
2021-10-11 09:07:29 +01:00
Will Deacon
07036cffe1 KVM: arm64: Prevent re-finalisation of pKVM for a given CPU
__pkvm_prot_finalize() completes the deprivilege of the host when pKVM
is in use by installing a stage-2 translation table for the calling CPU.

Issuing the hypercall multiple times for a given CPU makes little sense,
but in such a case just return early with -EPERM rather than go through
the whole page-table dance again.

Cc: Marc Zyngier <maz@kernel.org>
Cc: Quentin Perret <qperret@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211008135839.1193-6-will@kernel.org
2021-10-11 09:07:29 +01:00
Will Deacon
2f2e1a5069 KVM: arm64: Propagate errors from __pkvm_prot_finalize hypercall
If the __pkvm_prot_finalize hypercall returns an error, we WARN but fail
to propagate the failure code back to kvm_arch_init().

Pass a pointer to a zero-initialised return variable so that failure
to finalise the pKVM protections on a host CPU can be reported back to
KVM.

Cc: Marc Zyngier <maz@kernel.org>
Cc: Quentin Perret <qperret@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211008135839.1193-5-will@kernel.org
2021-10-11 09:07:29 +01:00
Will Deacon
8579a185ba KVM: arm64: Reject stub hypercalls after pKVM has been initialised
The stub hypercalls provide mechanisms to reset and replace the EL2 code,
so uninstall them once pKVM has been initialised in order to ensure the
integrity of the hypervisor code.

To ensure pKVM initialisation remains functional, split cpu_hyp_reinit()
into two helper functions to separate usage of the stub from usage of
pkvm hypercalls either side of __pkvm_init on the boot CPU.

Cc: Marc Zyngier <maz@kernel.org>
Cc: Quentin Perret <qperret@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211008135839.1193-4-will@kernel.org
2021-10-11 09:07:28 +01:00
Will Deacon
8f4566f18d arm64: Prevent kexec and hibernation if is_protected_kvm_enabled()
When pKVM is enabled, the hypervisor code at EL2 and its data structures
are inaccessible to the host kernel and cannot be torn down or replaced
as this would defeat the integrity properies which pKVM aims to provide.
Furthermore, the ABI between the host and EL2 is flexible and private to
whatever the current implementation of KVM requires and so booting a new
kernel with an old EL2 component is very likely to end in disaster.

In preparation for uninstalling the hyp stub calls which are relied upon
to reset EL2, disable kexec and hibernation in the host when protected
KVM is enabled.

Cc: Marc Zyngier <maz@kernel.org>
Cc: Quentin Perret <qperret@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211008135839.1193-3-will@kernel.org
2021-10-11 09:07:28 +01:00
Marc Zyngier
a78738ed1d KVM: arm64: Turn __KVM_HOST_SMCCC_FUNC_* into an enum (mostly)
__KVM_HOST_SMCCC_FUNC_* is a royal pain, as there is a fair amount
of churn around these #defines, and we avoid making it an enum
only for the sake of the early init, low level code that requires
__KVM_HOST_SMCCC_FUNC___kvm_hyp_init to be usable from assembly.

Let's be brave and turn everything but this symbol into an enum,
using a bit of arithmetic to avoid any overlap.

Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/877depq9gw.wl-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20211008135839.1193-2-will@kernel.org
2021-10-11 09:07:28 +01:00
Weizhao Ouyang
6644c654ea ftrace: Cleanup ftrace_dyn_arch_init()
Most of ARCHs use empty ftrace_dyn_arch_init(), introduce a weak common
ftrace_dyn_arch_init() to cleanup them.

Link: https://lkml.kernel.org/r/20210909090216.1955240-1-o451686892@gmail.com

Acked-by: Heiko Carstens <hca@linux.ibm.com> (s390)
Acked-by: Helge Deller <deller@gmx.de> (parisc)
Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2021-10-08 19:41:39 -04:00
Linus Torvalds
0dcf60d001 asm-generic: build fixes for v5.15
There is one build fix for Arm platforms that ended up impacting most
 architectures because of the way the drivers/firmware Kconfig file is
 wired up:
 
 The CONFIG_QCOM_SCM dependency have caused a number of randconfig
 regressions over time, and some still remain in v5.15-rc4. The
 fix we agreed on in the end is to make this symbol selected by any
 driver using it, and then building it even for non-Arm platforms with
 CONFIG_COMPILE_TEST.
 
 To make this work on all architectures, the drivers/firmware/Kconfig
 file needs to be included for all architectures to make the symbol
 itself visible.
 
 In a separate discussion, we found that a sound driver patch that is
 pending for v5.16 needs the same change to include this Kconfig file,
 so the easiest solution seems to have my Kconfig rework included in v5.15.
 
 There is a small merge conflict against an earlier partial fix for the
 QCOM_SCM dependency problems.
 
 Finally, the branch also includes a small unrelated build fix for NOMMU
 architectures.
 
 Link: https://lore.kernel.org/all/20210928153508.101208f8@canb.auug.org.au/
 Link: https://lore.kernel.org/all/20210928075216.4193128-1-arnd@kernel.org/
 Link: https://lore.kernel.org/all/20211007151010.333516-1-arnd@kernel.org/
 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFgVp8ACgkQmmx57+YA
 GNlQoA/+O0ljtTy5D0MjRGmFDs11M5AtKNrfys82lm2GeEnc4lnxn722jLk8kR6s
 y6DSOWFs7w1bqhKExQNehZYtJO3sgW/9qiLMV9qfOx1Nc6WwhDPcYM9bMyGlpTmL
 M456nh8NopixV7slanNtfz1e0kbMKoK+4Ub7M5OHepK6x9FKQXQYQpeoBxaXHmWZ
 9eaRiL/CsRHO/cSkvpq1GtL7IVrudvij3FDHzxoDGFFjkCUm9LiN/8yrnVxHA9G7
 3EPyJazI559SsnxXJR32udGPJWZV1HZ7D5gbxDvzr5rZ9EX0JpyPGJsuXUR1wqlS
 UB2Y7AUTSxkwDiZ8UhPoXn6i67WAirzEsP2WmdS4v6NEbxlNloLGTIeGwcwkCRMU
 DBvMtDW8kKusgVu/OkEUgoC6MTRt+Mg+gZcQI/C4sp0MqZGaMY6c7abnYjqwEzBV
 ARS7bUYyME2GL6wNDPFB8esuD9jjdFXy96bGHATmzMxT3012K3X7ufFOzJZ+GOF9
 pan00fgoC17oiI+Xu/sZEHns6KvMTSE11Aw3uk+yhHxYtZbzWi2B5Nk+4tBdsOxF
 PAZdZ5qsyuEcBw+PyfbyZIHWOrlbvZkrmjiIsMJo63cIXuOtgraCjvRRAwe/ZwoU
 PXgPcUmrlAs06WjKhuQAZWt6bww7cEP2XyOYlDqwZ4Vj0dqav6g=
 =187C
 -----END PGP SIGNATURE-----

Merge tag 'asm-generic-fixes-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic

Pull asm-generic fixes from Arnd Bergmann:
 "There is one build fix for Arm platforms that ended up impacting most
  architectures because of the way the drivers/firmware Kconfig file is
  wired up:

  The CONFIG_QCOM_SCM dependency have caused a number of randconfig
  regressions over time, and some still remain in v5.15-rc4. The fix we
  agreed on in the end is to make this symbol selected by any driver
  using it, and then building it even for non-Arm platforms with
  CONFIG_COMPILE_TEST.

  To make this work on all architectures, the drivers/firmware/Kconfig
  file needs to be included for all architectures to make the symbol
  itself visible.

  In a separate discussion, we found that a sound driver patch that is
  pending for v5.16 needs the same change to include this Kconfig file,
  so the easiest solution seems to have my Kconfig rework included in
  v5.15.

  Finally, the branch also includes a small unrelated build fix for
  NOMMU architectures"

Link: https://lore.kernel.org/all/20210928153508.101208f8@canb.auug.org.au/
Link: https://lore.kernel.org/all/20210928075216.4193128-1-arnd@kernel.org/
Link: https://lore.kernel.org/all/20211007151010.333516-1-arnd@kernel.org/

* tag 'asm-generic-fixes-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
  asm-generic/io.h: give stub iounmap() on !MMU same prototype as elsewhere
  qcom_scm: hide Kconfig symbol
  firmware: include drivers/firmware/Kconfig unconditionally
2021-10-08 11:57:54 -07:00
Biju Das
a83ad872f4 arm64: dts: renesas: r9a07g044: Add SDHI nodes
Add SDHI{0, 1} nodes to RZ/G2L SoC DTSI.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20211007155451.10654-2-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2021-10-08 15:17:56 +02:00
Wolfram Sang
f28daeedd7 arm64: dts: renesas: falcon-cpu: Add SPI flash via RPC
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20211006085836.42155-5-wsa+renesas@sang-engineering.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2021-10-08 15:16:02 +02:00
Duc Nguyen
5de968a25a arm64: dts: renesas: r8a779a0: Add RPC node
Add device node for RPC on R8A779A0 SoC.

Signed-off-by: Duc Nguyen <duc.nguyen.ub@renesas.com>
[wsa: rebased]
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20211006085836.42155-4-wsa+renesas@sang-engineering.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2021-10-08 15:16:02 +02:00
Lad Prabhakar
9223cb663e arm64: dts: renesas: r9a07g044: Add SPI Multi I/O Bus controller node
Add SPI Multi I/O Bus controller node to R9A07G044 (RZ/G2L) SoC DTSI.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20210928155852.32569-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2021-10-08 15:15:13 +02:00
Enric Balletbo i Serra
4bdb00edbd arm64: dts: mt8183: Add the mmsys reset bit to reset the dsi0
Reset the DSI hardware is needed to prevent different settings between
the bootloader and the kernel.

While here, also remove the undocumented and also not used
'mediatek,syscon-dsi' property.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210930103105.v4.5.I933f1532d7a1b2910843a9644c86a7d94a4b44e1@changeid
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2021-10-08 15:11:14 +02:00
Enric Balletbo i Serra
7fdb1bc3d9 arm64: dts: mt8173: Add the mmsys reset bit to reset the dsi0
Reset the DSI hardware is needed to prevent different settings between
the bootloader and the kernel.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210930103105.v4.4.I7bd7d9a8da5e2894711b700a1127e6902a2b2f1d@changeid
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2021-10-08 15:11:13 +02:00
Enric Balletbo i Serra
f07c776f6d arm64: dts: mediatek: Move reset controller constants into common location
The DT binding includes for reset controllers are located in
include/dt-bindings/reset/. Move the Mediatek reset constants in there.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://lore.kernel.org/r/20210930103105.v4.1.I514d9aafff3a062f751b37d3fea7402f67595b86@changeid
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2021-10-08 15:11:13 +02:00
Linus Torvalds
3e899c7209 ARM: SoC fixes for v5.15
This is a larger than normal update for Arm SoC specific code, most
 of it in device trees, but also drivers and the omap and at91/sama7
 platforms:
 
  - There are four new entries to the MAINTAINERS file: Sven Peter and
    Alyssa Rosenzweig for Apple M1, Romain Perier for Mstar/sigmastar,
    and Vignesh Raghavendra for TI K3
 
  - Build fixes to address randconfig warnings in sharpsl, dove, omap1,
    and qcom platforms as well as the  scmi and op-tee subsystems
 
  - Regression fixes for missing CONFIG_FB and other options for several
    defconfigs
 
  - Several bug fixes for the newly added Microchip SAMA7 platform,
    mostly regarding power management
 
  - Missing SMP barriers to protect accesses to SCMI virtio device
 
  - Regression fixes for TI OMAP, including a boot-time hang on am335x.
 
  - Lots of bug fixes for NXP i.MX, mostly addressing incorrect settings
    in devicetree files, and one revert for broken suspend.
 
  - Fixes for ARM Juno/Vexpress devicetree files, addressing a couple
    of schema warnings.
 
  - Regression fixes for qualcomm SoC specific drivers and devicetree
    files, reverting an mdt_loader change and at least pastially
    reverting some of the 5.15 DTS changes, plus some minor bugfixes
 
 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFfXRgACgkQmmx57+YA
 GNk2ig//eDxbnQPFbltxAHboSaS7S6S/s3MTLC7vqwlv7n4ypINgKEGTD+kOpQ37
 zPhR+30+qHTPFI2LRFyN+iTaz/D+MP1/pRGKieXlSfQew4FvLW+aQvkhs/LLA6Qr
 jB5GJEqVKbzsfM3+GkxJ3uI44BUOUji7lCJWHDrToa40chz+I1nuORybeLgBtV/7
 D7f047FtB4cgScoZ6ZhLWysjcvIEi2+9PfMbmGPF3bZrjRLESniXqJ4pT6kiv7OF
 +rq+Bg4pkDqL6qUjMwAhIorH1dNXHi5qwr8ET23/mpefxJJQzbEO725j6ANOKHR1
 2neA+Eaghu7jfUdNQe4c8oY4lHnfsWIJInji4Sv0Yc8xivvQF+Mrzc1lzgA8o9VQ
 Tb9+bcE+xjkalwXVdVTp2FfyGh8E/cA87uv1qdprghEHjR07evs/AJZag3CjRqik
 c3FIODyQtG/RlVQxZR6PFOKxO1dQ0Qwqg5FSBTlfdT/rEG5no8KhWJYwLhXCsKGL
 O70LTspSLiaT1Gc93EeC6dWYVrLAkfnStwTF233Sq/apE5ouCEHqF4OSJvh2yaEO
 gVw50MC4BC5mJpzUQZEgZj3cntp4WGqbERYhL0bXyqPp9dGfCrPNaThN8x/CMqrG
 2z/KDKmuY3lhilEnO+s+fZI81Yl+VQsl+v1jh1En6yBqeRFU0Iw=
 =Mrh2
 -----END PGP SIGNATURE-----

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

Pull ARM SoC fixes from Arnd Bergmann:
 "This is a larger than normal update for Arm SoC specific code, most of
  it in device trees, but also drivers and the omap and at91/sama7
  platforms:

   - There are four new entries to the MAINTAINERS file: Sven Peter and
     Alyssa Rosenzweig for Apple M1, Romain Perier for Mstar/sigmastar,
     and Vignesh Raghavendra for TI K3

   - Build fixes to address randconfig warnings in sharpsl, dove, omap1,
     and qcom platforms as well as the scmi and op-tee subsystems

   - Regression fixes for missing CONFIG_FB and other options for
     several defconfigs

   - Several bug fixes for the newly added Microchip SAMA7 platform,
     mostly regarding power management

   - Missing SMP barriers to protect accesses to SCMI virtio device

   - Regression fixes for TI OMAP, including a boot-time hang on am335x.

   - Lots of bug fixes for NXP i.MX, mostly addressing incorrect
     settings in devicetree files, and one revert for broken suspend.

   - Fixes for ARM Juno/Vexpress devicetree files, addressing a couple
     of schema warnings.

   - Regression fixes for qualcomm SoC specific drivers and devicetree
     files, reverting an mdt_loader change and at least pastially
     reverting some of the 5.15 DTS changes, plus some minor bugfixes"

* tag 'armsoc-fixes-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (64 commits)
  MAINTAINERS: Add Sven Peter as ARM/APPLE MACHINE maintainer
  MAINTAINERS: Add Alyssa Rosenzweig as M1 reviewer
  firmware: arm_scmi: Add proper barriers to scmi virtio device
  firmware: arm_scmi: Simplify spinlocks in virtio transport
  ARM: dts: omap3430-sdp: Fix NAND device node
  bus: ti-sysc: Use CLKDM_NOAUTO for dra7 dcan1 for errata i893
  ARM: sharpsl_param: work around -Wstringop-overread warning
  ARM: defconfig: gemini: Restore framebuffer
  ARM: dove: mark 'putc' as inline
  ARM: omap1: move omap15xx local bus handling to usb.c
  MAINTAINERS: Add Vignesh to TI K3 platform maintainership
  arm64: dts: imx8m*-venice-gw7902: fix M2_RST# gpio
  ARM: imx6: disable the GIC CPU interface before calling stby-poweroff sequence
  arm64: dts: ls1028a: fix eSDHC2 node
  arm64: dts: imx8mm-kontron-n801x-som: do not allow to switch off buck2
  ARM: dts: at91: sama7g5ek: to not touch slew-rate for SDMMC pins
  ARM: dts: at91: sama7g5ek: use proper slew-rate settings for GMACs
  ARM: at91: pm: preload base address of controllers in tlb
  ARM: at91: pm: group constants and addresses loading
  ARM: dts: at91: sama7g5ek: add suspend voltage for ddr3l rail
  ...
2021-10-07 14:01:29 -07:00
Mauro Carvalho Chehab
b9e2404c8b arm64: tegra: Fix pcie-ep DT nodes
As defined by Documentation/devicetree/bindings/pci/pci-ep.yaml,
PCIe endpoints match this pattern:

	properties:
	  $nodename:
	    pattern: "^pcie-ep@"

Change the existing ones in order to avoid those warnings:

	arch/arm64/boot/dts/nvidia/tegra194-p3509-0000+p3668-0001.dt.yaml: pcie_ep@14160000: $nodename:0: 'pcie_ep@14160000' does not match '^pcie-ep@'
		From schema: Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml
	arch/arm64/boot/dts/nvidia/tegra194-p3509-0000+p3668-0001.dt.yaml: pcie_ep@14180000: $nodename:0: 'pcie_ep@14180000' does not match '^pcie-ep@'
		From schema: Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml
	arch/arm64/boot/dts/nvidia/tegra194-p3509-0000+p3668-0001.dt.yaml: pcie_ep@141a0000: $nodename:0: 'pcie_ep@141a0000' does not match '^pcie-ep@'
		From schema: Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml
	arch/arm64/boot/dts/nvidia/tegra194-p3509-0000+p3668-0000.dt.yaml: pcie_ep@14160000: $nodename:0: 'pcie_ep@14160000' does not match '^pcie-ep@'
		From schema: Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml
	arch/arm64/boot/dts/nvidia/tegra194-p3509-0000+p3668-0000.dt.yaml: pcie_ep@14180000: $nodename:0: 'pcie_ep@14180000' does not match '^pcie-ep@'
		From schema: Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml
	arch/arm64/boot/dts/nvidia/tegra194-p3509-0000+p3668-0000.dt.yaml: pcie_ep@141a0000: $nodename:0: 'pcie_ep@141a0000' does not match '^pcie-ep@'
		From schema: Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml
	arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dt.yaml: pcie_ep@14160000: $nodename:0: 'pcie_ep@14160000' does not match '^pcie-ep@'
		From schema: Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml
	arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dt.yaml: pcie_ep@14180000: $nodename:0: 'pcie_ep@14180000' does not match '^pcie-ep@'
		From schema: Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml
	arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dt.yaml: pcie_ep@141a0000: $nodename:0: 'pcie_ep@141a0000' does not match '^pcie-ep@'
		From schema: Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2021-10-07 21:23:37 +02:00
Thierry Reding
056474013c arm64: tegra: Remove useless usb-ehci compatible string
There's no such thing as a generic USB EHCI controller. The EHCI
controllers found on Tegra SoCs are instantiations that need Tegra-
specific glue to work properly, so drop the generic compatible string
and keep only the Tegra-specific ones.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2021-10-07 21:00:09 +02:00