20862 Commits

Author SHA1 Message Date
Fuad Tabba
722625c6f4 KVM: arm64: Reenable pmu in Protected Mode
Now that the pmu code does not access hyp data, reenable it in
protected mode.

Once fully supported, protected VMs will not have pmu support,
since that could leak information. However, non-protected VMs in
protected mode should have pmu support if available.

Signed-off-by: Fuad Tabba <tabba@google.com>
Reviewed-by: Oliver Upton <oupton@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220510095710.148178-5-tabba@google.com
2022-05-15 11:26:41 +01:00
Fuad Tabba
84d751a019 KVM: arm64: Pass pmu events to hyp via vcpu
Instead of the host accessing hyp data directly, pass the pmu
events of the current cpu to hyp via the vcpu.

This adds 64 bits (in two fields) to the vcpu that need to be
synced before every vcpu run in nvhe and protected modes.
However, it isolates the hypervisor from the host, which allows
us to use pmu in protected mode in a subsequent patch.

No visible side effects in behavior intended.

Signed-off-by: Fuad Tabba <tabba@google.com>
Reviewed-by: Oliver Upton <oupton@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220510095710.148178-4-tabba@google.com
2022-05-15 11:26:41 +01:00
Fuad Tabba
3cb8a091a7 KVM: arm64: Wrapper for getting pmu_events
Eases migrating away from using hyp data and simplifies the code.

No functional change intended.

Reviewed-by: Oliver Upton <oupton@google.com>
Signed-off-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220510095710.148178-2-tabba@google.com
2022-05-15 11:24:17 +01:00
Marc Zyngier
cae889302e KVM: arm64: vgic-v3: List M1 Pro/Max as requiring the SEIS workaround
Unsusprisingly, Apple M1 Pro/Max have the exact same defect as the
original M1 and generate random SErrors in the host when a guest
tickles the GICv3 CPU interface the wrong way.

Add the part numbers for both the CPU types found in these two
new implementations, and add them to the hall of shame. This also
applies to the Ultra version, as it is composed of 2 Max SoCs.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20220514102524.3188730-1-maz@kernel.org
2022-05-15 11:18:50 +01:00
Mark Rutland
5005d1dbbb arm64/sysreg: fix odd line spacing
Between the header and the definitions, there's no line gap, and in a
couple of places a double line gap for no semantic reason, which makes
the output look a little odd.

Fix this so blocks are consistently separated with a single line gap:

* Add a newline after the "Generated file" comment line, so this is
  clearly split from whatever the first definition in the file is.

* At the start of a SysregFields block there's no need for a newline as
  we haven't output any sysreg encoding details prior to this.

* At the end of a Sysreg block there's no need for a newline if we
  have no RES0 or RES1 fields, as there will be a line gap after the
  previous element (e.g. a Fields line).

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

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20220513174118.266966-3-mark.rutland@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-15 10:58:25 +01:00
Mark Rutland
82bf59002e arm64/sysreg: improve comment for regs without fields
Currently for registers without fields we create a comment pointing at
the common definitions, e.g.

| #define REG_TTBR0_EL1                           S3_0_C2_C0_0
| #define SYS_TTBR0_EL1                           sys_reg(3, 0, 2, 0, 0)
| #define SYS_TTBR0_EL1_Op0                       3
| #define SYS_TTBR0_EL1_Op1                       0
| #define SYS_TTBR0_EL1_CRn                       2
| #define SYS_TTBR0_EL1_CRm                       0
| #define SYS_TTBR0_EL1_Op2                       0
|
| /* See TTBRx_EL1 */

It would be slightly nicer if the comment said what we should be looking
for, e.g.

| #define REG_TTBR0_EL1                           S3_0_C2_C0_0
| #define SYS_TTBR0_EL1                           sys_reg(3, 0, 2, 0, 0)
| #define SYS_TTBR0_EL1_Op0                       3
| #define SYS_TTBR0_EL1_Op1                       0
| #define SYS_TTBR0_EL1_CRn                       2
| #define SYS_TTBR0_EL1_CRm                       0
| #define SYS_TTBR0_EL1_Op2                       0
|
| /* For TTBR0_EL1 fields see TTBRx_EL1 */

Update the comment generation accordingly.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20220513174118.266966-2-mark.rutland@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-15 10:58:25 +01:00
Baolin Wang
ae07562909 mm: change huge_ptep_clear_flush() to return the original pte
Patch series "Fix CONT-PTE/PMD size hugetlb issue when unmapping or migrating", v4.

presently, migrating a hugetlb page or unmapping a poisoned hugetlb page,
we'll use ptep_clear_flush() and set_pte_at() to nuke the page table entry
and remap it, and this is incorrect for CONT-PTE or CONT-PMD size hugetlb
page, which will cause potential data consistent issue.  This patch set
will change to use hugetlb related APIs to fix this issue.

Note: Mike pointed out the huge_ptep_get() will only return the one
specific value, and it would not take into account the dirty or young bits
of CONT-PTE/PMDs like the huge_ptep_get_and_clear() [1].  This
inconsistent issue is not introduced by this patch set, and this issue
will be addressed in another thread [2].  Meanwhile the uffd for hugetlb
case [3] pointed out by Gerald also needs another patch to address.

[1] https://lore.kernel.org/linux-mm/85bd80b4-b4fd-0d3f-a2e5-149559f2f387@oracle.com/
[2] https://lore.kernel.org/all/cover.1651998586.git.baolin.wang@linux.alibaba.com/
[3] https://lore.kernel.org/linux-mm/20220503120343.6264e126@thinkpad/


This patch (of 3):

It is incorrect to use ptep_clear_flush() to nuke a hugetlb page table
when unmapping or migrating a hugetlb page, and will change to use
huge_ptep_clear_flush() instead in the following patches.

So this is a preparation patch, which changes the huge_ptep_clear_flush()
to return the original pte to help to nuke a hugetlb page table.

[baolin.wang@linux.alibaba.com: fix build in several more architectures]
  Link: https://lkml.kernel.org/r/0009a4cd-2826-e8be-e671-f050d4f18d5d@linux.alibaba.com
[sfr@canb.auug.org.au: fixup]
  Link: https://lkml.kernel.org/r/20220511181531.7f27a5c1@canb.auug.org.au
Link: https://lkml.kernel.org/r/cover.1652270205.git.baolin.wang@linux.alibaba.com
Link: https://lkml.kernel.org/r/20f77ddab90baa249bd24504c413189b82acde69.1652270205.git.baolin.wang@linux.alibaba.com
Link: https://lkml.kernel.org/r/cover.1652147571.git.baolin.wang@linux.alibaba.com
Link: https://lkml.kernel.org/r/dcf065868cce35bceaf138613ad27f17bb7c0c19.1652147571.git.baolin.wang@linux.alibaba.com
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Mike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Yoshinori Sato <ysato@users.osdn.me>
Cc: Rich Felker <dalias@libc.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-05-13 16:48:55 -07:00
Arnd Bergmann
82706d6fb1 MT8195:
- add evaluation and demo board
 
 MT8192:
 - add new nodes: pwrap, PMIC, scp, USB, efuse, IOMMU, smi, DPI, PCIe,
   SPMI, audio system, MMC and video enconder
 - add evaluation board
 
 MT8183:
 - fix dtschema issues
 - update compatible for the display ambient light processor (disp-aal)
 - fix dtschema warning for the pumpki board
 
 MT8173:
 - add power domains to the video enconder nodes
 - add GCE support to the display mutex node
 
 MT7622:
 - specify number of DMA requests explicitely
 - specify level 2 cache topology
 - add SPI-NAND flash device
 - fix dtschema warnings for the System Companion Processor (SCP)
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCAA1FiEEUdvKHhzqrUYPB/u8L21+TfbCqH4FAmJ+QQQXHG1hdHRoaWFz
 LmJnZ0BnbWFpbC5jb20ACgkQL21+TfbCqH6MUw//d15n/edr21mmD/km512t/JJ+
 u8ke9XGDnULk/bG2bFW+F+9wxsgR3Y6ULcoXIjYyRjOfrysBssFRPnz4hU1pIDEX
 YFQFhoTlV86DFJUw517bwuN59/V8UQB3kIv6FgxoYumec1QJ74x1kAdLYBi1MGGW
 Yi9DFSBMxbK6tFMAYRLut2r62NK25SqH55oPfJnzVcL7dUGN/nL3VW+3vUxrRdul
 SNbQAzIlHMj47IApdnWsllYL+SmYX7O71rrXYnLSGTyKU53iu9jEo6QNy+iytHLY
 qW32Y2bu0rA9pw5MtJjYOTFjLdlXe33h6xuS/3f3EvlKyS6L3MA3iUMBnGiORsKz
 USNdZN4Z1qtNVd7775NKQOpx6m2RAHaQUeXwwOvvf9wU9jgf5YI3cLDoG/0osVQb
 s/LCZDZD3/h36Exy1PTlFaHlqRR4iaIHD1UzTxS1ST2+OosokT3vIanfTA3G4QjN
 /gs0AMD9IrMDZtu79rUmDE26rHF+wmy2QsRDo1VxB0QWGQjFhCn0VsV2K+uFyG9j
 VKgK/n7ouwSN2+LjyLFJV2C55zRy/NQ6kIxvIohuLxWncIuqKEkvU22iLlNECsI3
 VT4xQV8AWLp38pXNSD29oj/FyojjJOJgFgSHDst5tPfaswdckMvodWUVIS8tgiAY
 THdQekFc5B+HwmTSjZE=
 =Ewdg
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ+zQAACgkQmmx57+YA
 GNlrAw/9G/X8jojghV0Uq1NOm+QtmPQ9pusNttjeviImZd2RAf4rqJnCHEwcWAsf
 tXiu2+YVTgUZdwJO73nvswfbQ3sLBGSkw0N+nDNMfqqSNytQSTSokDp8NNr9pi4t
 914shAoz0mMk6I932attImfaWOoWUR9zOGhGJi9M/NnOkBsHHhANr4vldEscxkuc
 ecOFknHp8ZfVuRfDJcR4opbVUvCmeRbnrQWgG2ud9YPsGB4MsRBvnzZDdyFVFz/q
 HlobUjpeW1+uH87lpxyz+NSex3V39falXjSDL51rIG2p7lCVb1wbi+lEDnc8uy28
 DuLN1N+LdMBOyoMb077TCtquWRKEbFOmJ/8SzD78a5BoyV0Hxhp3EGteAuZ2rx/E
 rPAyy+dNAVmwMaIiSYeb/Y5DuE9kjuxb5NpNvIaZEDdkPZfIZiMfKnOziGHQncPp
 p+JbuDW6z+XMcDa7S4vlCmGRF5xqHknSFs9Ivnm/p64Cd5fK/enzc5On/gsB/fKP
 mXVbESme88tev22JG0rHgFVKZB29wOJLv9mMJzpJQGkmqVy32nO7unUc6tq7G6A5
 idP76etCgx3FCttCuq2s6CZCwcVYlHee17JnIMl9Y3gZccAsT3rMtt0TK4R6OuFN
 oP3+8286Kc3TW0/V3zvowzT+h7sqxMFJyXWKyrcRvA2ConoO0y8=
 =kcWT
 -----END PGP SIGNATURE-----

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

MT8195:
- add evaluation and demo board

MT8192:
- add new nodes: pwrap, PMIC, scp, USB, efuse, IOMMU, smi, DPI, PCIe,
  SPMI, audio system, MMC and video enconder
- add evaluation board

MT8183:
- fix dtschema issues
- update compatible for the display ambient light processor (disp-aal)
- fix dtschema warning for the pumpki board

MT8173:
- add power domains to the video enconder nodes
- add GCE support to the display mutex node

MT7622:
- specify number of DMA requests explicitely
- specify level 2 cache topology
- add SPI-NAND flash device
- fix dtschema warnings for the System Companion Processor (SCP)

* tag 'v5.18-next-dts64' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: (37 commits)
  arm64: dts: mt8192: Follow binding order for SCP registers
  arm64: dts: mediatek: add mtk-snfi for mt7622
  arm64: dts: mediatek: mt8195-demo: enable uart1
  arm64: dts: mediatek: mt8195-demo: Remove input-name property
  arm64: dts: mediatek: mt8183-pumpkin: fix bad thermistor node name
  arm64: dts: mt7622: specify the L2 cache topology
  arm64: dts: mt7622: specify the number of DMA requests
  arm64: dts: mediatek: pumpkin: Remove input-name property
  arm64: dts: mediatek: mt8173: Add gce-client-reg handle to disp-mutex
  arm64: dts: mediatek: Add device-tree for MT8195 Demo board
  dt-bindings: arm64: dts: mediatek: Add mt8195-demo board
  arm64: dts: Add mediatek SoC mt8195 and evaluation board
  arm64: dts: mt8192: Add mmc device nodes
  arm64: dts: mt8183: Update disp_aal node compatible
  arm64: dts: mt8192: Add audio-related nodes
  arm64: dts: mt8192: Add spmi node
  dt-bindings: arm: Add compatible for Mediatek MT8192
  arm64: dts: mt6359: add PMIC MT6359 related nodes
  arm64: dts: mediatek: mt8173: Add power domain to encoder nodes
  arm64: dts: mediatek: Get rid of mediatek, larb for MM nodes
  ...

Link: https://lore.kernel.org/r/2cd90ca7-7541-d47a-fec6-b0c64cf74fa3@gmail.com

Like the 32-bit branch, this contains an incompatible binding change
by removing the mediatek,larb properties from the dts files, so these
no longer work with kernels prior to 5.18.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-13 23:26:21 +02:00
Linus Torvalds
364a453ab9 hotfixes for 5.18-rc7
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQTTMBEPP41GrTpTJgfdBJ7gKXxAjgUCYnvwxgAKCRDdBJ7gKXxA
 jhymAQDvHnFT3F5ydvBqApbzrQRUk/+fkkQSrF/xYawknZNgkAEA6Tnh9XqYplJN
 bbmml6HTVvDjprEOCGakY/Kyz7qmdQ0=
 =SMJQ
 -----END PGP SIGNATURE-----

Merge tag 'mm-hotfixes-stable-2022-05-11' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull misc fixes from Andrew Morton:
 "Seven MM fixes, three of which address issues added in the most recent
  merge window, four of which are cc:stable.

  Three non-MM fixes, none very serious"

[ And yes, that's a real pull request from Andrew, not me creating a
  branch from emailed patches. Woo-hoo! ]

* tag 'mm-hotfixes-stable-2022-05-11' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
  MAINTAINERS: add a mailing list for DAMON development
  selftests: vm: Makefile: rename TARGETS to VMTARGETS
  mm/kfence: reset PG_slab and memcg_data before freeing __kfence_pool
  mailmap: add entry for martyna.szapar-mudlaw@intel.com
  arm[64]/memremap: don't abuse pfn_valid() to ensure presence of linear map
  procfs: prevent unprivileged processes accessing fdinfo dir
  mm: mremap: fix sign for EFAULT error return value
  mm/hwpoison: use pr_err() instead of dump_page() in get_any_page()
  mm/huge_memory: do not overkill when splitting huge_zero_page
  Revert "mm/memory-failure.c: skip huge_zero_page in memory_failure()"
2022-05-13 10:22:37 -07:00
Linus Torvalds
91bdba8536 arm64 fixes for -rc7
- TLB invalidation workaround for Qualcomm Kryo-4xx "gold" CPUs
 
 - Fix broken dependency in the vDSO Makefile
 
 - Fix pointer authentication overrides in ISAR2 ID register
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCgAuFiEEPxTL6PPUbjXGY88ct6xw3ITBYzQFAmJ+TzYQHHdpbGxAa2Vy
 bmVsLm9yZwAKCRC3rHDchMFjNCROB/4qyO58UAHs8bomUYfz/G+mZp0uxiJ+0MBL
 5l+3HKMNf9anKjfVChIThhZV/9yVh6aeiib10P+UPqJVJFTs+JjYJqqdq8Qa+6K3
 08zYWNtv2Q260wdo8HpaXvyy7RXQ9j3jQ3pD84xmoKVwVQnmXKjo9RuH7XbgmcS0
 9mrgBRHXDkJ4PIzZxs/pgRuPHjAVx9lVNP+gId1awUFXDuMRwdQQyKpVqvnC4csD
 70GRdC166Gz+GAmAkKAaB+VaCYr6h6WGcjGVz9ajBe5jDdACVb7VKO9nhqTiKdoe
 xpaU6i+p+IuGyXRjMcmIzMQSutKdgG6w09ZZ8/UOD/s75AiHWURQ
 =uJ8F
 -----END PGP SIGNATURE-----

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

Pull arm64 fixes from Will Deacon:

 - TLB invalidation workaround for Qualcomm Kryo-4xx "gold" CPUs

 - Fix broken dependency in the vDSO Makefile

 - Fix pointer authentication overrides in ISAR2 ID register

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: Enable repeat tlbi workaround on KRYO4XX gold CPUs
  arm64: cpufeature: remove duplicate ID_AA64ISAR2_EL1 entry
  arm64: vdso: fix makefile dependency on vdso.so
2022-05-13 10:17:39 -07:00
Arnd Bergmann
5aef4d1ecc mvebu dt64 for 5.19 (part 1)
Update sdhci node names to match schema on all mvebu dt64 dtsi files
 
 Armada 3720:
   uDPU board:
    - correct temperature sensors
    - update partition table
 
   espressobin-ultra board:
    - enable front USB3 port
    - add PHY and switch reset pins
    - fix SPI-NOR config
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQYqXDMF3cvSLY+g9cLBhiOFHI71QUCYn5V1gAKCRALBhiOFHI7
 1TVQAJ94AlT0HrG28feqooyMbkSjACZcPgCgrYZcUD85wr8RuGWMOR04JV1WdFk=
 =sFNY
 -----END PGP SIGNATURE-----

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

mvebu dt64 for 5.19 (part 1)

Update sdhci node names to match schema on all mvebu dt64 dtsi files

Armada 3720:
  uDPU board:
   - correct temperature sensors
   - update partition table

  espressobin-ultra board:
   - enable front USB3 port
   - add PHY and switch reset pins
   - fix SPI-NOR config

* tag 'mvebu-dt64-5.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu:
  arm64: dts: marvell: Update sdhci node names to match schema
  arm64: dts: marvell: espressobin-ultra: enable front USB3 port
  arm64: dts: marvell: espressobin-ultra: add PHY and switch reset pins
  arm64: dts: marvell: espressobin-ultra: fix SPI-NOR config
  arm64: dts: uDPU: correct temperature sensors
  arm64: dts: uDPU: update partition table

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-13 16:31:01 +02:00
Kefeng Wang
42b2547137 arm64/mm: enable ARCH_SUPPORTS_PAGE_TABLE_CHECK
As commit d283d422c6c4 ("x86: mm: add x86_64 support for page table
check") , enable ARCH_SUPPORTS_PAGE_TABLE_CHECK on arm64.

Add additional page table check stubs for page table helpers, these stubs
can be used to check the existing page table entries.

Link: https://lkml.kernel.org/r/20220507110114.4128854-6-tongtiangen@huawei.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Tong Tiangen <tongtiangen@huawei.com>
Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-05-13 07:20:17 -07:00
Matthew Wilcox (Oracle)
da08e9b793 mm/shmem: convert shmem_swapin_page() to shmem_swapin_folio()
shmem_swapin_page() only brings in order-0 pages, which are folios
by definition.

Link: https://lkml.kernel.org/r/20220504182857.4013401-24-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-05-13 07:20:17 -07:00
Peter Collingbourne
d949a8155d mm: make minimum slab alignment a runtime property
When CONFIG_KASAN_HW_TAGS is enabled we currently increase the minimum
slab alignment to 16.  This happens even if MTE is not supported in
hardware or disabled via kasan=off, which creates an unnecessary memory
overhead in those cases.  Eliminate this overhead by making the minimum
slab alignment a runtime property and only aligning to 16 if KASAN is
enabled at runtime.

On a DragonBoard 845c (non-MTE hardware) with a kernel built with
CONFIG_KASAN_HW_TAGS, waiting for quiescence after a full Android boot I
see the following Slab measurements in /proc/meminfo (median of 3
reboots):

Before: 169020 kB
After:  167304 kB

[akpm@linux-foundation.org: make slab alignment type `unsigned int' to avoid casting]
Link: https://linux-review.googlesource.com/id/I752e725179b43b144153f4b6f584ceb646473ead
Link: https://lkml.kernel.org/r/20220427195820.1716975-2-pcc@google.com
Signed-off-by: Peter Collingbourne <pcc@google.com>
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Acked-by: David Rientjes <rientjes@google.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-05-13 07:20:07 -07:00
Peter Collingbourne
534aa1dc97 printk: stop including cache.h from printk.h
An inclusion of cache.h in printk.h was added in 2014 in commit
c28aa1f0a847 ("printk/cache: mark printk_once test variable
__read_mostly") in order to bring in the definition of __read_mostly.  The
usage of __read_mostly was later removed in commit 3ec25826ae33 ("printk:
Tie printk_once / printk_deferred_once into .data.once for reset") which
made the inclusion of cache.h unnecessary, so remove it.

We have a small amount of code that depended on the inclusion of cache.h
from printk.h; fix that code to include the appropriate header.

This fixes a circular inclusion on arm64 (linux/printk.h -> linux/cache.h
-> asm/cache.h -> linux/kasan-enabled.h -> linux/static_key.h ->
linux/jump_label.h -> linux/bug.h -> asm/bug.h -> linux/printk.h) that
would otherwise be introduced by the next patch.

Build tested using {allyesconfig,defconfig} x {arm64,x86_64}.

Link: https://linux-review.googlesource.com/id/I8fd51f72c9ef1f2d6afd3b2cbc875aa4792c1fba
Link: https://lkml.kernel.org/r/20220427195820.1716975-1-pcc@google.com
Signed-off-by: Peter Collingbourne <pcc@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-05-13 07:20:07 -07:00
Arnd Bergmann
e17142e069 - Enable essential PMIC and regulatro drivers for MT8195.
- Enable Arm arch timer for MT7629.
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCAA1FiEEUdvKHhzqrUYPB/u8L21+TfbCqH4FAmJ+DrQXHG1hdHRoaWFz
 LmJnZ0BnbWFpbC5jb20ACgkQL21+TfbCqH61ChAAoJ9zws76jh1d2IFxH/vB9++o
 ZHk7KYrfRpS/RyKlWI98CH/fDMZdG0XEyeClUUp6nZy4Tnq51HXt0saIlQ0Wkmpt
 1owkvnOWHgEmi9dzGgJE2cVJLdDXCoRXyoAOULEphRCZOQWciAEFjNb43bWe5WwC
 SXxKj1MPJqWVE8W2adeDkpCPfuqilfOssn1omIpSDloglMz9cC/MUjp3/jHWIryU
 tFJeLvJh3H3ouD482w5yv+Ef2YJBMWavw6DI3dhPwvfUWdunb4VoGrjAqMVUc4Pz
 0iCxV5xQ5EuMYtWZ/OlIIPzpV4Xl/8hrfKiaDLeRRoEgmXKzc77dPsqFj0zoS//n
 O9Za81o/vJRBAC81JfWuHAUKScAWVOuVe/ug3+pCVlqj+PETRIh1myrCv8HC0c6R
 4545zQ4a10wTa/g3cQo7SO+acp4dHsPnSBSOvUGDZj92c6fBpGFb119xwNavKOdT
 jRERuyuDSFizcf3ANr0VraHMYizrwqdli2kko4aVKMrITboaflpL7iuo1ziyxged
 THoWkYbI4GkB/QPSCndwQ6WNx0YoKGEp/4Ye++lalk8ySQMs5iwfcLdlHI12Lyxr
 mzNQycRpzFWqgl0ez9xbhSPxhDqRtcK0sKiyHJqh2XWsQCXinyM1TyOmwPJjGEhL
 2PaUut0kz12XwkTRgO0=
 =+SOX
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ+SNYACgkQmmx57+YA
 GNlj5g//TE1lRetXd/ZeN7hp4tlPqQPDzuTkMtpizzhrxLtc7nF+5Tpf49czJvVt
 aZOSzilW+7wBk0UMPtF8zCb5ljfR7SwAv+ZGBQjTUD2HDa9V3DphtH2s4XxFHCL3
 COdAA8yXAc7DegmmyNN+Bm1FwZyY3BzrMX6V9Eczm3jmgmw2YiV2cVB2J1GGSX5A
 kTXpBp+gX/ZGkqL/aDhY9s/WkB9GOCoDDh7XqIJ21ptiArSViDstKnQ117ehzfnF
 Jhs7afmvCCDDj2K1VtJWiiUWXDBUFeSszsJNvTz2HCX9v4G8Mg8yR/CBJtHvTH/Z
 tLyurdkwDHIp1jQeNj/IRNUGO9+ZTiPHIU0RIZsiwreTQkGRBmWRvBBUvbOMtRKA
 QNfuIeGS/x0iay+hvx8igSRkp9I0B0XOCck2GY3f1Q9Cq5J+e1rQ/RSHjxDsI08K
 /1dxPzQitnIU8+vgDsDnuLbR/Km5JAzzIwdbk99M88HiOQE5GOCGl/pkL883Utc+
 lfJfjKsNFmD9p64D2QwENarEgwfqsigN9uW5P1ypIR2bA7PQzxkwIf7Ydm4Dz4tf
 cepo8J0jokzthzxq4dbMZL3o/z/ozS9gYE6sFPNIJSmzGCapPSwTmmhsVxFp8MGM
 Gtc23mk3mmCVCl1SNh1+dfWnG15ZhBtudJpFfM8K1V5llC+Jifw=
 =PSnE
 -----END PGP SIGNATURE-----

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

- Enable essential PMIC and regulatro drivers for MT8195.
- Enable Arm arch timer for MT7629.

* tag 'v5.18-next-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux:
  arm: mediatek: select arch timer for mt7629
  arm64: defconfig: enable some mt6360 PMIC drivers
  arm64: defconfig: enable MT6359 regulator driver

Link: https://lore.kernel.org/r/3a6e5606-7b89-2ad8-7b45-21d3a4e9e706@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-13 14:02:30 +02:00
Nícolas F. R. A. Prado
c75104762d arm64: dts: mt8192: Follow binding order for SCP registers
The dt-binding for SCP documents the reg-names order as sram, cfg,
l1tcm. Update the SCP node on the mt8192 devicetree to follow that
order, which gets rid of a dtbs_check warning. This doesn't change any
behavior since the SCP driver accesses the memory regions through the
names anyway.

Fixes: c63556ec6bfe ("arm64: dts: mt8192: Add SCP node")
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20220504214516.2957504-1-nfraprado@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-05-13 13:27:40 +02:00
Chuanhong Guo
5ba090a03a arm64: dts: mediatek: add mtk-snfi for mt7622
This patch adds a device-tree node for the MTK SPI-NAND Flash Interface
for MT7622 device tree.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Link: https://lore.kernel.org/r/20220424032527.673605-6-gch981213@gmail.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-05-13 13:27:40 +02:00
Fabien Parent
7640d4350a arm64: dts: mediatek: mt8195-demo: enable uart1
The UART1 is exposed on a header. Enable the uart1 node to be able to
use it.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Link: https://lore.kernel.org/r/20220426134106.242353-8-fparent@baylibre.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-05-13 13:27:40 +02:00
Fabien Parent
8a87419481 arm64: dts: mediatek: mt8195-demo: Remove input-name property
This property doesn't seem to exist in the documentation nor
in source code, let's remove it from the device-tree.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Link: https://lore.kernel.org/r/20220426134106.242353-7-fparent@baylibre.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-05-13 13:27:40 +02:00
Fabien Parent
41d2d562e8 arm64: dts: mediatek: mt8183-pumpkin: fix bad thermistor node name
Fix the following dtbs_check error by using the correct node name:
/home/fabo/build/linux/mt8183-pumpkin/arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dtb: ntc: $nodename:0: 'ntc' does not match '^thermistor(.*)?$'
	From schema: /home/fabo/devel/baylibre/linux-mainline/Documentation/devicetree/bindings/hwmon/ntc-thermistor.yaml

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20220426164755.435372-1-fparent@baylibre.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-05-13 13:27:40 +02:00
Rui Salvaterra
80dd27b6c6 arm64: dts: mt7622: specify the L2 cache topology
On an MT7622 system, the kernel complains of not being able to detect the cache
hierarchy of CPU 0. Specify the shared L2 cache node in the device tree, in
order to fix this.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Link: https://lore.kernel.org/r/20220428225755.785153-1-rsalvaterra@gmail.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-05-13 13:27:40 +02:00
Rui Salvaterra
7d029cc240 arm64: dts: mt7622: specify the number of DMA requests
The MT7622 device tree never bothered to specify the number of virtual DMA
channels for the HSDMA controller, always falling back to the default value of
3. Make this value explicit, in order to avoid the following dmesg notification:

mtk_hsdma 1b007000.dma-controller: Using 3 as missing dma-requests property

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Link: https://lore.kernel.org/r/20220429084225.298213-1-rsalvaterra@gmail.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-05-13 13:27:40 +02:00
Dang Huynh
c88fd98110 arm64: dts: mediatek: pumpkin: Remove input-name property
This property doesn't seem to exist in the documentation nor
in source code, but for some reason it is defined in a bunch
of device trees.

Signed-off-by: Dang Huynh <danct12@riseup.net>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20220425064850.246228-1-danct12@riseup.net
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-05-13 13:27:39 +02:00
Arnd Bergmann
9dd7a5a896 Visconti device tree updates for 5.19
- Update the clock providers for PCIe host controller
 - Update the clock providers for ethernet device
 - Update the clock providers for SPI
 - Update the clock providers for watchdog timer
 - Update the clock providers for I2C
 - Update the clock providers for UART
 - Add clock controller support for TMPV7708
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEXmKe5SMhlzV7hM9DMiR/u0CtH6YFAmJ5zwgACgkQMiR/u0Ct
 H6ZaBRAAkWogBbx/oRL68ITAdOmn2um3xVrv8BNy1fvkhERflBIpBBpde1yGaYRx
 kEvBuMlkZJBuHJuT9HSbY9NHhO8h1maB+BkXNSIGSs3E0bp3zfOVBRklCJs8VfoT
 jMbYSCtusGCuhDOAOpAhgNqR5x0P9VmDo3gPB1pan35Pm8Xv4X1ORm6PuUJob1My
 s6pfvxgnzC43q0pkkkNQa18ISHbdhRlgsBPUHinJT6Sv3jbN7cU9sm1Gf3ZidJZt
 YkLoW4np+1nx4e2eFbbzjBZgIzwdsnwoL/Ie+YLYoPnyL4vA/dlY6KyUH09uaJVi
 2Y3kmWcl9a8IvWnJ+SrO6rrwngLcg9bWW98ry7nsQJUeARN2fSjJMiIXi/fH5F8o
 ai4yjGXFTgAxS8YCoGLwFjpZduwPReqpfYjQ6qQRbUaMV3UA7YA4FJ3RG5aJF+sZ
 nhYAwsBnO3Cm+YaK+5qTFMBFqSJOLsaoOPt8QoWsXEa8pvx0dzwavToi7HyRaJpu
 YCJD5+AvS/dyOoblw62ClQvdaZjAJwuqkrqcHB8J+G5lUC+od6nFVONcr5N6m94w
 zPnCReEINDh4WPlEv+/aDoxV4+FoL8I3OAlz615WDsJ+/s1HZlut0vFyvF3ZYNHU
 yTNDZ9A7a+Wtpa0Zuf3UTB7GDv8UIVZRxV5kMlOAyaGKdRlobFo=
 =DFRT
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ+JWoACgkQmmx57+YA
 GNk/6A/+O1NuQR5BNukjFOaBCKdI6IfFB0fwbQK9Eodq2+r6GIhaU4CTNiyhd5jJ
 HJU5p6IZB8Ejzx6iV9P9phXDMKDSWeUUUAgdTEbY0P3xRi23UcNyKE01HgM7XhlT
 wJ6DZZo9axLIEfU0dG8yXJBsPnIpuFQLkY60NYocDlCcthRul105A5wi/Zo/7sJR
 1t0EScIaEs9qI2Q90iVneEeqlVCJ09Yri7KqTGzi1M30+p70AD0D27HGTUHY4oSn
 SbEvaLDQwnQhRQFUcBsWizPLTJTErhXJUx+dpJul+kwEDBYe/xdbl+SEG+t53DMi
 Uf6PxbuFvAQgO/TkEwXxfHgyPBuhvXESARhGmxdmaoFwVMygxPFHZZmmAw1q0S/2
 xTAa0sv+Bh9U6Blls6GKsPzploEHfny2tsSwHswgAH5fnjHvgKKARlMeRWXYas8u
 7yhQsFQ1QxTj2X5ZVWRx0BKfE/CTjyufTYKzDR9DsHkWTZaHhvXgOpESwPafl102
 1HyLbCHSvP4YiY2PSSDsmDDF4uO7EncVpu9e0a7914nPpvmlZVyODk2lOGJ8UoFY
 vYXVEiKTDcCpAUb40a6HghDepEOcz85NL1zPfVB/LhwlKHspf4kPu0mWp1wJBG5d
 alOPh1t/40cTfl8KMRvWBUuD4MkXug+RMRC5imxIdH4cvroACK0=
 =c0vE
 -----END PGP SIGNATURE-----

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

Visconti device tree updates for 5.19

- Update the clock providers for PCIe host controller
- Update the clock providers for ethernet device
- Update the clock providers for SPI
- Update the clock providers for watchdog timer
- Update the clock providers for I2C
- Update the clock providers for UART
- Add clock controller support for TMPV7708

* tag 'visconti-arm-dt-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/iwamatsu/linux-visconti:
  arm64: dts: visconti: Update the clock providers for PCIe host controller
  arm64: dts: visconti: Update the clock providers for ethernet device
  arm64: dts: visconti: Update the clock providers for SPI
  arm64: dts: visconti: Update the clock providers for watchdog timer
  arm64: dts: visconti: Update the clock providers for I2C
  arm64: dts: visconti: Update the clock providers for UART
  arm64: dts: visconti: Add clock controller support for TMPV7708

Link: https://lore.kernel.org/r/TYWPR01MB94201E842A2F8E5E9EBF740D92C99@TYWPR01MB9420.jpnprd01.prod.outlook.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-13 11:31:21 +02:00
Arnd Bergmann
835c0d9350 New peripherals supported on rk356x: sfc, usb3, sata and
the video-decoder on rk3328.
 RK3399 received some improvements and nodes for the memory controller.
 Additional peripherals for PineNote, Gru and BananaPi-R2-Pro.
 New boards are the Firefly Station M2, Pine64 SoQuartz SOM and
 Quartz64 model B as well as the Radxa Rock3 model A.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAmJ8RpUQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgQJjB/9PfcoC3u5FzRDuE8w74u0A3UPx+diqHdsR
 QKwqsqngjMNsnCQjwsu8qbbbBevgvELorOVEY+RjuY4uNkxecf9j8lFlItk2UvVf
 2ZZZm/vNP16Gaera5S7GVYiWmisLdbyQ8xw61iJoNbCrsWeLDVxJ2unyG+E7dxa6
 u5bHhsd58PE/BI0Paxf/OIw4oGh2FAbCbMiXNQjwHHu5eGjgy+V6guqkJ6FruhmG
 qlu9DZQz33DGQ7N57ympheqVsih9vm3lA0dfSiOpiyG2CNwZ8k80aW40mEcuJkbA
 yWGUHbMc80Kxi2sWkYDWpagavt6M1bn8pQgCrNrRYWVPhktUvG2c
 =2V+q
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ+JMgACgkQmmx57+YA
 GNnq2g//ek80cpzuUCOr6ox1Im/gIdo+Yf8NqbuI481alwWjfS9Nl1wptr/b3nP3
 A3xrHvNrN2T/OFsyvWkHI7ZItk821E5Y8AtawPVuozr8myZ5msiyZ63cXcKkiVvG
 +f8txwBgbvWVqVXtgOZFQs/BfGr+DLA3VHXewwZAdZp0GKzgmXWF5WKJtb0q8KOn
 yQoTGjiN0bDQR9UuX18bVJgibtH+POuQdkScvPfukiXyIpgdY0hlQHt67VTkWfeY
 jH7OgbcG768hipWXK3IKoLkl1ECL6Sycy/aMiSbqHu0Pp/qA9hJdFKHaQ2+sj4vF
 HjaslQRTFsj0Lp0nJaUeDq37Ds1P/ZfAqo+xXeWNjZzvowBIDLB3vOk6AW0aSVw4
 mmhVDULyEE5IunoXORLjXkhvPtP5SLA4SBbANvrSCtk/pn9DvG+YE+GjjrD8loHC
 eujIFeV+THp3JMpM2nmAQxKo2Xz+3s3eEi70XzDfZBNNBO8n0eRHM4oKukUTWOAl
 kA7jHRCnU0TFp+y4VyfocZUarbJiisj0eeeQkzQFQCSJyX8mFYyY9rd+DrJleged
 ab1AoQhwJrNppb7yy0WegQ8LAJi/zbT8wVklgqpyh7DKR7FAZLjEQWcepOFJ8vPm
 FJUmYjCJSqTnjCxFvHNavudxD+DGl/Rc9eSZr9UDUIzFod85MMQ=
 =XPfy
 -----END PGP SIGNATURE-----

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

New peripherals supported on rk356x: sfc, usb3, sata and
the video-decoder on rk3328.
RK3399 received some improvements and nodes for the memory controller.
Additional peripherals for PineNote, Gru and BananaPi-R2-Pro.
New boards are the Firefly Station M2, Pine64 SoQuartz SOM and
Quartz64 model B as well as the Radxa Rock3 model A.

* tag 'v5.19-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (32 commits)
  arm64: dts: rockchip: enable otg/drd operation of usb_host0_xhci in rk356x
  arm64: dts: rockchip: rename HDMI ref clock to 'ref' on rk3399
  arm64: dts: rockchip: add dts for Firefly Station M2 rk3566
  arm64: dts: rockchip: add SoQuartz CM4IO dts
  arm64: dts: rockchip: add Pine64 Quartz64-B device tree
  dt-bindings: arm: rockchip: Add Firefly Station M2
  dt-bindings: arm: rockchip: Add Pine64 SoQuartz SoM
  dt-bindings: arm: rockchip: Add Pine64 Quartz64 Model B
  arm64: dts: rockchip: enable usb hub on the radxa rock3 model a
  arm64: dts: rockchip: add usb3 support to the radxa rock3 model a
  arm64: dts: rockchip: add rk356x sfc support
  arm64: dts: rockchip: Add USB and TCPC to rk3566-pinenote
  arm64: dts: rockchip: Add accelerometer to rk3566-pinenote
  arm64: dts: rockchip: add an input enable pinconf to rk3399
  arm64: dts: rockchip: Add vdec support for RK3328
  arm64: dts: rockchip: Rename vdec_mmu node for RK3328
  arm64: dts: rockchip: Enable dmc and dfi nodes on gru
  arm64: dts: rockchip: Add dfi and dmc nodes to rk3399
  arm64: dts: rockchip: add clocks property to cru nodes rk3399
  arm64: dts: rockchip: use generic node name for pmucru on rk3399
  ...

Link: https://lore.kernel.org/r/7748558.DvuYhMxLoT@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-13 11:28:40 +02:00
Arnd Bergmann
609a097f5f Fixes for the mass-production version of BananaPi R2-Pro.
The mass market version received some changes compared to
 preproduction versions and especially the io-domain setting
 could affect the lifespan of the board if the wrong dt
 gets booted on it.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAmJ31hAQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgdhxCACbjy2l2gCiwUvarLHJOB9T47yQK2eUMX+h
 i/KnTWc/hQUveLW/UfblrLJCfejjFYxRE9DO7b3xx8c5jQdZkqELVk7ILvv11shc
 /qScIiiFVZQl20C3/fEuYyyWEQWeu1AqtkOc7l71ioYDNQRzcbP0nI6qgri7liSp
 HnOgkGavqYayC8F+nX2wa8YSeN3u5KLDXwKemJSHZKY4aY/btmQFBKO3hj8rPp+e
 2umfBgsL/nT6N9/lbmcgU/eC9GagvhoIDoSHAUZuZ4JDaHIlce+LhRdkaVm2KtXE
 JzLw7Gp0Sxi9KkAVkpqO15u5I7hnfPjaYgQc45dH+jonPAE3Lgyp
 =4Wik
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ9bw0ACgkQmmx57+YA
 GNn/Tg//Rrk1ETpn7AR+UchLqKNhMvzIzq/dFcjVx/ECimUQuLnDKW9l/YRqJi8U
 8FvOfkIgXpCLBdkNr9gQ2Y/juQd/tbsZeGi+Dds7+z4eCuH7EwJJqCZx8hs5QITQ
 Bd9W1ynKH7304lEANjm8ZS4H3ERJ7NSfdgLR1DJp9DCicJGeY/rctWpR5ebLMk0R
 QKXERJO3i23MCU0iF7wne8thkZj5VzPnHQCXLpG0zc0CL5bubOI/8jIK0j61wILG
 FCQ245atgBWf3hw/wWU6LchBBC2u5gyY1D1qfcgL1aL6R94TTZ7vRtq3HkasJAY0
 V9PzgE/lXWJiLgjTp+wfiMpTvostYsUhMfgkjSNfeDn/8sHJqGM90K8iJ3hSwRv2
 lK93MayuZNRFEhKjKfZv7bXuUOrc9DA2IuVcVs9BKKKmuxTbc/nZPzGAIQwkS5/X
 /5Ker4CZ3FuPOauHOLD07d1gJuIA9LYOf/dFVtq8horMwA63NNTzp1jc9W1/QAnH
 D1m/ZfBLjdGkJ6d6jF70TF1FrC7KVzC+XXMndzxoRK8grdug/YbPxhJinVUTAnhD
 b5GD52BStR6k8+yqPwAaaBOG7nFNRWSRgt/bmYxr9ghg40SnsJtfY1iatjlwvs8X
 W9TvU8+UBaNvHlID1pUjFVnvs6cev0VCLnwC4hQ/GpZWgrlRyLY=
 =eNBu
 -----END PGP SIGNATURE-----

Merge tag 'v5.18-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/fixes

Fixes for the mass-production version of BananaPi R2-Pro.
The mass market version received some changes compared to
preproduction versions and especially the io-domain setting
could affect the lifespan of the board if the wrong dt
gets booted on it.

* tag 'v5.18-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  arm64: dts: rockchip: Add gmac1 and change network settings of bpi-r2-pro
  arm64: dts: rockchip: Change io-domains of bpi-r2-pro

Link: https://lore.kernel.org/r/2300256.NG923GbCHz@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-12 22:33:17 +02:00
Shreyas K K
51f559d665 arm64: Enable repeat tlbi workaround on KRYO4XX gold CPUs
Add KRYO4XX gold/big cores to the list of CPUs that need the
repeat TLBI workaround. Apply this to the affected
KRYO4XX cores (rcpe to rfpe).

The variant and revision bits are implementation defined and are
different from the their Cortex CPU counterparts on which they are
based on, i.e., (r0p0 to r3p0) is equivalent to (rcpe to rfpe).

Signed-off-by: Shreyas K K <quic_shrekk@quicinc.com>
Reviewed-by: Sai Prakash Ranjan <quic_saipraka@quicinc.com>
Link: https://lore.kernel.org/r/20220512110134.12179-1-quic_shrekk@quicinc.com
Signed-off-by: Will Deacon <will@kernel.org>
2022-05-12 13:15:38 +01:00
Kristina Martsenko
2de7689c7c arm64: cpufeature: remove duplicate ID_AA64ISAR2_EL1 entry
The ID register table should have one entry per ID register but
currently has two entries for ID_AA64ISAR2_EL1. Only one entry has an
override, and get_arm64_ftr_reg() can end up choosing the other, causing
the override to be ignored. Fix this by removing the duplicate entry.

While here, also make the check in sort_ftr_regs() more strict so that
duplicate entries can't be added in the future.

Fixes: def8c222f054 ("arm64: Add support of PAuth QARMA3 architected algorithm")
Signed-off-by: Kristina Martsenko <kristina.martsenko@arm.com>
Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20220511162030.1403386-1-kristina.martsenko@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2022-05-12 11:21:29 +01:00
Christoph Hellwig
566fb90e05 swiotlb-xen: fix DMA_ATTR_NO_KERNEL_MAPPING on arm
swiotlb-xen uses very different ways to allocate coherent memory on x86
vs arm.  On the former it allocates memory from the page allocator, while
on the later it reuses the dma-direct allocator the handles the
complexities of non-coherent DMA on arm platforms.

Unfortunately the complexities of trying to deal with the two cases in
the swiotlb-xen.c code lead to a bug in the handling of
DMA_ATTR_NO_KERNEL_MAPPING on arm.  With the DMA_ATTR_NO_KERNEL_MAPPING
flag the coherent memory allocator does not actually allocate coherent
memory, but just a DMA handle for some memory that is DMA addressable
by the device, but which does not have to have a kernel mapping.  Thus
dereferencing the return value will lead to kernel crashed and memory
corruption.

Fix this by using the dma-direct allocator directly for arm, which works
perfectly fine because on arm swiotlb-xen is only used when the domain is
1:1 mapped, and then simplifying the remaining code to only cater for the
x86 case with DMA coherent device.

Reported-by: Rahul Singh <Rahul.Singh@arm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Rahul Singh <rahul.singh@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Tested-by: Rahul Singh <rahul.singh@arm.com>
2022-05-11 19:48:32 +02:00
Peter Zijlstra
47319846a9 Linux 5.18-rc5
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmJu9FYeHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGAyEH/16xtJSpLmLwrQzG
 o+4ToQxSQ+/9UHyu0RTEvHg2THm9/8emtIuYyc/5FgdoWctcSa3AaDcveWmuWmkS
 KYcdhfJsaEqjNHS3OPYXN84fmo9Hel7263shu5+IYmP/sN0DfQp6UWTryX1q4B3Q
 4Pdutkuq63Uwd8nBZ5LXQBumaBrmkkuMgWEdT4+6FOo1mPzwdIGBxCuz1UsNNl5k
 chLWxkQfe2eqgWbYJrgCQfrVdORXVtoU2fGilZUNrHRVGkkldXkkz5clJfapyZD3
 odmZCEbrE4GPKgZwCmDERMfD1hzhZDtYKiHfOQ506szH5ykJjPBcOjHed7dA60eB
 J3+wdek=
 =39Ca
 -----END PGP SIGNATURE-----

Merge branch 'v5.18-rc5'

Obtain the new INTEL_FAM6 stuff required.

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
2022-05-11 16:27:06 +02:00
Anshuman Khandual
fb396bb459 arm64/hugetlb: Drop TLB flush from get_clear_flush()
This drops now redundant TLB flush in get_clear_flush() which is no longer
required after recent commit 697a1d44af8b ("tlb: hugetlb: Add more sizes to
tlb_remove_huge_tlb_entry"). It also renames this function i.e dropping off
'_flush' and replacing it with '__contig' as appropriate.

Cc: Will Deacon <will@kernel.org>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Link: https://lore.kernel.org/r/20220510043930.2410985-1-anshuman.khandual@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-11 13:53:19 +01:00
Masahiro Yamada
f774f5bb87 kbuild: factor out the common installation code into scripts/install.sh
Many architectures have similar install.sh scripts.

The first half is really generic; it verifies that the kernel image
and System.map exist, then executes ~/bin/${INSTALLKERNEL} or
/sbin/${INSTALLKERNEL} if available.

The second half is kind of arch-specific; it copies the kernel image
and System.map to the destination, but the code is slightly different.

Factor out the generic part into scripts/install.sh.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <n.schier@avm.de>
2022-05-11 21:45:53 +09:00
Linu Cherian
710c8d6c02 arm64: Declare non global symbols as static
Fix below sparse warnings introduced while adding errata.

arch/arm64/kernel/cpu_errata.c:218:25: sparse: warning: symbol
'cavium_erratum_23154_cpus' was not declared. Should it be static?

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Linu Cherian <lcherian@marvell.com>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20220509043221.16361-1-lcherian@marvell.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-11 13:40:26 +01:00
Michael Riesch
bc405bb3ee arm64: dts: rockchip: enable otg/drd operation of usb_host0_xhci in rk356x
This USB 3.0 controller is capable of OTG/DRD operation. Enable it in the
device tree.

Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net>
Link: https://lore.kernel.org/r/20220425133502.405512-1-michael.riesch@wolfvision.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2022-05-11 06:09:55 +02:00
Joey Gouly
205f3991a2 arm64: vdso: fix makefile dependency on vdso.so
There is currently no dependency for vdso*-wrap.S on vdso*.so, which means that
you can get a build that uses a stale vdso*-wrap.o.

In commit a5b8ca97fbf8, the file that includes the vdso.so was moved and renamed
from arch/arm64/kernel/vdso/vdso.S to arch/arm64/kernel/vdso-wrap.S, when this
happened the Makefile was not updated to force the dependcy on vdso.so.

Fixes: a5b8ca97fbf8 ("arm64: do not descend to vdso directories twice")
Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20220510102721.50811-1-joey.gouly@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2022-05-10 12:08:40 +01:00
Oliver Upton
249838b766 KVM: arm64: pkvm: Don't mask already zeroed FEAT_SVE
FEAT_SVE is already masked by the fixed configuration for
ID_AA64PFR0_EL1; don't try and mask it at runtime.

No functional change intended.

Signed-off-by: Oliver Upton <oupton@google.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220509162559.2387784-3-oupton@google.com
2022-05-10 10:58:43 +01:00
Oliver Upton
4d2e469e16 KVM: arm64: pkvm: Drop unnecessary FP/SIMD trap handler
The pVM-specific FP/SIMD trap handler just calls straight into the
generic trap handler. Avoid the indirection and just call the hyp
handler directly.

Note that the BUILD_BUG_ON() pattern is repeated in
pvm_init_traps_aa64pfr0(), which is likely a better home for it.

No functional change intended.

Signed-off-by: Oliver Upton <oupton@google.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220509162559.2387784-2-oupton@google.com
2022-05-10 10:58:42 +01:00
Nobuhiro Iwamatsu
5d3b6ede2c arm64: dts: visconti: Update the clock providers for PCIe host controller
Remove fixed clock and source common clock for PCIe host controller.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Link: https://lore.kernel.org/r/20220510015229.139818-7-nobuhiro1.iwamatsu@toshiba.co.jp/
2022-05-10 11:18:55 +09:00
Nobuhiro Iwamatsu
c8a93f9131 arm64: dts: visconti: Update the clock providers for ethernet device
Remove fixed clock and source common clock for ethernet device.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Link: https://lore.kernel.org/r/20220510015229.139818-6-nobuhiro1.iwamatsu@toshiba.co.jp/
2022-05-10 11:18:26 +09:00
Nobuhiro Iwamatsu
340657b179 arm64: dts: visconti: Update the clock providers for SPI
Remove fixed clock and source common clock for SPI.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Link: https://lore.kernel.org/r/20220510015229.139818-5-nobuhiro1.iwamatsu@toshiba.co.jp/
2022-05-10 11:18:01 +09:00
Nobuhiro Iwamatsu
27b754902d arm64: dts: visconti: Update the clock providers for watchdog timer
Remove fixed clock and source common clock for watchdog timer.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Link: https://lore.kernel.org/r/20220510015229.139818-4-nobuhiro1.iwamatsu@toshiba.co.jp/
2022-05-10 11:17:28 +09:00
Nobuhiro Iwamatsu
0e7cd4395b arm64: dts: visconti: Update the clock providers for I2C
Replace I2C clock with common clock framework.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Link: https://lore.kernel.org/r/20220510015229.139818-3-nobuhiro1.iwamatsu@toshiba.co.jp/
2022-05-10 11:17:00 +09:00
Nobuhiro Iwamatsu
4374055674 arm64: dts: visconti: Update the clock providers for UART
Remove fixed clock and source common clock for UART.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Link: https://lore.kernel.org/r/20220510015229.139818-2-nobuhiro1.iwamatsu@toshiba.co.jp/
2022-05-10 11:16:07 +09:00
Nobuhiro Iwamatsu
34f7c6e7d4 arm64: dts: visconti: Add clock controller support for TMPV7708
Adds node of clock controller support for Toshiba Visconti TMPV7708.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Link: https://lore.kernel.org/r/20220421080143.2135566-1-nobuhiro1.iwamatsu@toshiba.co.jp/
2022-05-10 11:11:07 +09:00
David Hildenbrand
570ef36350 arm64/pgtable: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE
Let's use one of the type bits: core-mm only supports 5, so there is no
need to consume 6.

Note that we might be able to reuse bit 1, but reusing bit 1 turned out
problematic in the past for PROT_NONE handling; so let's play safe and use
another bit.

Link: https://lkml.kernel.org/r/20220329164329.208407-5-david@redhat.com
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Don Dutile <ddutile@redhat.com>
Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Jann Horn <jannh@google.com>
Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Liang Zhang <zhangliang5@huawei.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Cc: Nadav Amit <namit@vmware.com>
Cc: Oded Gabbay <oded.gabbay@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Pedro Demarchi Gomes <pedrodemargomes@gmail.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Rik van Riel <riel@surriel.com>
Cc: Roman Gushchin <guro@fb.com>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-05-09 18:20:46 -07:00
Mike Rapoport
260364d112 arm[64]/memremap: don't abuse pfn_valid() to ensure presence of linear map
The semantics of pfn_valid() is to check presence of the memory map for a
PFN and not whether a PFN is covered by the linear map.  The memory map
may be present for NOMAP memory regions, but they won't be mapped in the
linear mapping.  Accessing such regions via __va() when they are
memremap()'ed will cause a crash.

On v5.4.y the crash happens on qemu-arm with UEFI [1]:

<1>[    0.084476] 8<--- cut here ---
<1>[    0.084595] Unable to handle kernel paging request at virtual address dfb76000
<1>[    0.084938] pgd = (ptrval)
<1>[    0.085038] [dfb76000] *pgd=5f7fe801, *pte=00000000, *ppte=00000000

...

<4>[    0.093923] [<c0ed6ce8>] (memcpy) from [<c16a06f8>] (dmi_setup+0x60/0x418)
<4>[    0.094204] [<c16a06f8>] (dmi_setup) from [<c16a38d4>] (arm_dmi_init+0x8/0x10)
<4>[    0.094408] [<c16a38d4>] (arm_dmi_init) from [<c0302e9c>] (do_one_initcall+0x50/0x228)
<4>[    0.094619] [<c0302e9c>] (do_one_initcall) from [<c16011e4>] (kernel_init_freeable+0x15c/0x1f8)
<4>[    0.094841] [<c16011e4>] (kernel_init_freeable) from [<c0f028cc>] (kernel_init+0x8/0x10c)
<4>[    0.095057] [<c0f028cc>] (kernel_init) from [<c03010e8>] (ret_from_fork+0x14/0x2c)

On kernels v5.10.y and newer the same crash won't reproduce on ARM because
commit b10d6bca8720 ("arch, drivers: replace for_each_membock() with
for_each_mem_range()") changed the way memory regions are registered in
the resource tree, but that merely covers up the problem.

On ARM64 memory resources registered in yet another way and there the
issue of wrong usage of pfn_valid() to ensure availability of the linear
map is also covered.

Implement arch_memremap_can_ram_remap() on ARM and ARM64 to prevent access
to NOMAP regions via the linear mapping in memremap().

Link: https://lore.kernel.org/all/Yl65zxGgFzF1Okac@sirena.org.uk
Link: https://lkml.kernel.org/r/20220426060107.7618-1-rppt@kernel.org
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Reported-by: "kernelci.org bot" <bot@kernelci.org>
Tested-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Will Deacon <will@kernel.org>
Cc: <stable@vger.kernel.org>	[5.4+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-05-09 17:34:28 -07:00
Arnd Bergmann
977389aabe i.MX arm64 device tree update for 5.19:
- New board support: Engicam i.Core MX8M Plus SoM and EDIMM2.2 Starter
   Kit, Toradex Verdin i.MX8M Plus devices, Data Modul i.MX8M Mini eDM SBC,
   Verdin based MX8Menlo, 8MNANOD3L EVK, i.MX8M Plus Gateworks GW7400.
 - Enable RTS-CTS on UART3 for imx8mm-beacon and imx8mn-beacon boards.
 - Enable HS400-ES support for i.MX8MN and i.MX8MP uSDHC devices by
   updating the compatible.
 - A few updates on imx8mq-librem5 to increase boost regulation
   current, add panel compatible for r4 ("Evergreen") revision and volume
   buttons a wakeup source.
 - Clean up vendor specific 'fsl,uart-has-rtscts' property by using
   standard 'uart-has-rtscts'.
 - Add GPC, GPU, MEDIAMIX, and HSIO power domains for i.MX8M Plus SoC.
 - A series from Marcel Ziswiler to improve imx8mm-verdin support,
   including cosmetic changes and functional improvements like SD1 sleep
   pinctrl and fully validated IOMUX configuration.
 - Add PWM polarity inversion support for i.MX8 SoCs.
 - A couple of changes from Michael Walle to update PMIC output names and
   min/max voltages for imx8mn-evk board.
 - A series from Tim Harvey to improve imx8mm-venice boards, add missing
   uart-has-rtscts property to UARTs, clock-names to pcie_phy, and
   vdd_5p0 ADC channel.
 - Add VPU codec  devices for i.MX8QXP SoC.
 - Other small and random changes.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmJ3N+4UHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM748QgAt12d3nU7Eh3TbnpYO2ofVGv/JzNJ
 jUvyP5DzuxmFh9wvs50QuH7AkHjoBHh52cOxy0jHUJDvOF6o0UlUZjmhDmBK9hSh
 U7gnr+y3im7lZQNaPI5ECZcxPR7cStW3z2YDsdhx4eL6jn2Rh5kCdpOWbKqhaBEJ
 eQQEuY03GU7t+3BjwroTk1njyn6hH21NCskQCL1wR+B76z/0JtmocsNhwUjTmdvt
 +jMuHu2PMStbu8K0Eb45bsdKSk46TwQUeF9NDSDELuzYtA/XdWe7iBZd3NjlbFxY
 8mHBzF8poum3seA8XJA/O00KGhqGhKawIlMlQZCtxi8L0CxgEXABUFYsDA==
 =07f+
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ5i6oACgkQmmx57+YA
 GNnzug/9G1L/D6yJw6TYlgGm0QD9D+BLlZ6tose33I8INCTIxl5MZ/79fW+8+8VI
 ZT83I94K6aLrqTTFiKOlSfhztGLgqRkr14952Nt3wgKSu+9t0cFvSpmJ4z+xathQ
 Gc7nEbNUZ8pOjNypyAK4+JztKMDOsV1NhvyWg0m4LFhQ5TscHFOYKAcx5Cu7YB13
 6wAEhpEJ5wacBLoCKTIiZXx66Mgxm9rBpE78auoFdYCscwmrwiVgPqsYkbhKVDT9
 NWvzMq7qKsMhf7JoIQwxmLhDeROLbjQUARixDQyrBVMIAVQ/E7LzUrnyNutj2P9E
 HFLr8PoF7/7SnezAPdhxw5fNpqliiaoSg7fmitDvmY9VTMh7wAnv5GqScPUlfCw0
 Fg8gTYhvLjtM4jsyPB6iTCjHddNFDNitEOm1FxvFfTpB1rE6oSGcU7m6+11QPsFt
 3JbDcDu39Jl8sQW6ZN+Iy2L3YfyskIxSuh2NCOtcXZLO3nosk6smu76S28JxgQcc
 S7pZK1OxBFRI9/+J0ZebK24fZW7AU6kDcOfH/0lh/ymyCG+NVkV3kEVqFRydDj+W
 IvdI1mEB2csiIFxr2jYjJdf4m8iBYbh/lwIs6bOp+RyY2Kjav5sA6mp3IZGLGIF9
 wFNXxOYXesehVxDkyZgxqoqAGyePgi71hRjNHCMC2YexVItEYlQ=
 =dgZt
 -----END PGP SIGNATURE-----

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

i.MX arm64 device tree update for 5.19:

- New board support: Engicam i.Core MX8M Plus SoM and EDIMM2.2 Starter
  Kit, Toradex Verdin i.MX8M Plus devices, Data Modul i.MX8M Mini eDM SBC,
  Verdin based MX8Menlo, 8MNANOD3L EVK, i.MX8M Plus Gateworks GW7400.
- Enable RTS-CTS on UART3 for imx8mm-beacon and imx8mn-beacon boards.
- Enable HS400-ES support for i.MX8MN and i.MX8MP uSDHC devices by
  updating the compatible.
- A few updates on imx8mq-librem5 to increase boost regulation
  current, add panel compatible for r4 ("Evergreen") revision and volume
  buttons a wakeup source.
- Clean up vendor specific 'fsl,uart-has-rtscts' property by using
  standard 'uart-has-rtscts'.
- Add GPC, GPU, MEDIAMIX, and HSIO power domains for i.MX8M Plus SoC.
- A series from Marcel Ziswiler to improve imx8mm-verdin support,
  including cosmetic changes and functional improvements like SD1 sleep
  pinctrl and fully validated IOMUX configuration.
- Add PWM polarity inversion support for i.MX8 SoCs.
- A couple of changes from Michael Walle to update PMIC output names and
  min/max voltages for imx8mn-evk board.
- A series from Tim Harvey to improve imx8mm-venice boards, add missing
  uart-has-rtscts property to UARTs, clock-names to pcie_phy, and
  vdd_5p0 ADC channel.
- Add VPU codec  devices for i.MX8QXP SoC.
- Other small and random changes.

* tag 'imx-dt64-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (65 commits)
  arm64: dt: imx8mp: support pwm polarity inversion
  arm64: dt: imx8mn: support pwm polarity inversion
  arm64: dt: imx8mm: support pwm polarity inversion
  arm64: dt: imx8mq: support pwm polarity inversion
  arm64: dts: imx8mm-venice-gw7901: remove unnecessary cpu temp override
  arm64: dts: imx8mm-venice-gw7902: add vdd_5p0 ADC channel
  arm64: dts: imx8m*venice: add missing clock-names to pcie_phy
  arm64: dts: imx8mm-venice-gw7902: fix pcie bindings
  arm64: dts: freescale: reduce the interrup-map-mask
  arm64: dts: imx8mn-beacon: Enable RTS-CTS on UART3
  arm64: dts: imx8mm-beacon: Enable RTS-CTS on UART3
  arm64: dts: imx8mm: Use 100 kHz I2C2 on Data Modul i.MX8M Mini eDM SBC
  arm64: dts: imx8mm: Disable USB2 OC on Data Modul i.MX8M Mini eDM SBC
  arm64: dts: imx8mm: Add CPLD on MX8Menlo board
  arm64: dts: imx8mq-kontron-pitx-imx8m: Use the standard 'uart-has-rtscts'
  arm64: dts: imx8mp-verdin: Use the standard 'uart-has-rtscts'
  arm64: dts: imx8mp: Add MEDIA_BLK_CTRL
  arm64: dts: imx8mp: Add MEDIAMIX power domains
  arm64: dts: imx8mp: add HSIO power-domains
  arm64: dts: imx8mp: Add Engicam i.Core MX8M Plus EDIMM2.2 Starter Kit
  ...

Link: https://lore.kernel.org/r/20220508033843.2773685-4-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-09 23:46:18 +02:00
Arnd Bergmann
d4dcdc53c4 Qualcomm ARM64 DT updates for v5.19
This adds MDIO bus description on the IPQ6018 platform.
 
 On MSM8916 the BAM-DMUX WWAN network device is added and the Huawei
 Ascend G7 gains sound card definition and clarified installation
 instructions.
 
 MSM8992 and MSM8994 continues to be worked on, gaining multimedia clock
 controller, on-chip memory, watchdog and various cleanup changes. The
 Xiaomi Mi 4C gains CPU regulators and fixes to the framebuffer
 definition, while Huawei Nexus 6P gains eMMC support.
 
 On MSM8996 the modem and sensor remtoeprocs are added and enabled in the
 Dragonboard 820c and the Xiaomi devices.
 
 On MSM8998 a few newly added clocks related to the sensor subsystem bus
 are marked as protected by default and the OnePlus devices gains NFC.
 
 The SC7180 platform and devices thereon are further polished and
 limozeen moves to using edp-panel for EDID-based detection, over
 statically defined panels.
 
 On SC7280 GPI DMA, WiFi remoteproc and network device, LPASS audio
 clocks, resets for SDCC controllers and a new CRD revision are added. A
 supply glitch on the PCIe power and a current leak for Bluetooth during
 suspend are corrected. The Herobrine board gains eDP support and the IDP
 gains backlight. USB is marked wakeup capable.
 
 On SDM845 the IPA, WLED based backlight and second WiFi channel are
 enabled for Xiaomi Pocophone F1, the firmware name is modified to not
 conflict with other boards.  On RB3 the CAN bus controller is added and
 the WiFi calibration variant is defined to allow adding the board's
 calibration information into linux-firmware.
 
 SM6350 gains I2C busses, UFS and WiFi support, and the numbering of
 uart9 is corrected.
 
 On SM7225 and the Fairphone 4 UFS, WiFi and haptics are enabled.
 
 On SM8150 PCIe, Ethernet and uSD card support is added, and enabled for
 the SA8155p ADP board. The PDC interrupt controller is also added and
 described as wakup interrupt parent for TLMM.
 
 Camera subsystem and control interface are defined for SM8250. On the
 Sony Xperia 1 II the audio amplifiers are enabled.
 
 On SM8350 GPI DMA engines are added and linked to the I2C and SPI
 serial engines. Surface Duo 2 gains battery charger support.
 
 On SM8450 the two PCIe controller/PHYs are enabled, GPI DMA and QUP
 serial engine instances are added. Remoteproc instances are enabled on
 SM8450 HDK.
 
 Last, but not least, a number of DeviceTree validation errors across
 various boards are corrected.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmJ5fREbHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3FTdwP/icvr02w0vfY+Ae2NEI2
 gS836xXJWTXMxj2rW4WPQVGzbhNouMfl3yGVV0LxUrkD7pkcXAtCFul/DYJoZSTT
 ubnh4v/Axl7YVW5JwlL/+k3BEi39rSupa9HfEyLM5jVq39a0G9TqugVm9KmimIfL
 UEMN5pR0ZPLmMrQXzNSSw9uqHuBdr7G+25MMb2yyW8GoxMYE8xcVz0Syz5Xomv6V
 DHxl3jgvx7An7x1MbbbSyEOtkIjMtTSqzrRil7Y4g9Q1YTum74r4q/vKqfW+IMpz
 fNFz/sqpgy/9ixNtCIE3L1l/YakgHod8bm0DRBCVknEziYNhLIfbDqq3IksySitQ
 2ofoolp0Ip7eryHe47HBTzxnDKnfCG8iwaOPgbbtar6Ru32os8C9VbtNRBtZIzMN
 NpEqtlaJC+m4U92TlnCqsfKrWDYGdVWQeXU2/rU5QEFYtIGqP8fKLwEQbF/yls75
 j/57xtDVheoJbn79ELHCon3PumdpB5XhDLQgIji5jDl+D3rMOYxq86M1f2yF0zqF
 34EvwLoy2syY1dlelvECso3Zihszk1RQfEInuwN9RrLyXGXSqUDkODV49pR16URz
 ZRELs9SO99iRS5fjWzA0qoCWKS5hBu2GDnGr3Pv8gHBNGAJKKhTHSJLq+/q7aLTs
 9ApGB1PzsZiBv8LMF37El0L4
 =cBVa
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ5hwoACgkQmmx57+YA
 GNnJlA//R4pNO09VYGzZTOiVbhjsTPBCcuyBkv2OJlqiz/BSfG6R7pNt0sH3jlgG
 /3X8sLS5v/IdT/qXLS0DPAn6A1Qjj37VAFTVd8ZUNCbn7iXdE3Wphd0phLlgcGr5
 bxBV6gvnQydvOsALA+9Fsuug3KSBK3ZdFOAjuD5JaqVU5dHmXYsLizskS3Zrpofs
 jX05qDCguXPGFX5zd4TYMu+sWnLTjyBu0TvHCuZ3sIjERDY49QtPaNdSiNxtQJ3g
 fXDOuMP6GIB+PRSS0ajDAi+vmnzWNszlWhQEbcrtCyqCE9Qqrl4oSOtQbsFPhlUY
 wvqn84QIY9QUGNAebzGWrkBm6e7ehCHB4cm2Ac42uI6aSSC8YfON98EpM8f8e13x
 QWUMm9JfPV/QjAmAhD/hp5/Gc3lNJvawU2Bb/FSvu26HsHDSz+SJOuyMxXOBOV9k
 p6hjDQgo7Suwjkpe72Z3LSQq6zdD7r8MokmxFl8yWgxXr8V02zESOQYYhUjyA+Rj
 uda+2bRpnqIdoh3IObV5Dz9EGM1aEhbqGn1UMJJCtetGpVAF7PhGrKjDffQEzV+P
 OZAOBv0JpMWErks6WNReiN5M+bfm7zArHw3iWAB6grBQUEeF1MD5315m/+hOBxy1
 Aj9pv/fLJcIHatnVcAjYUMkpPhMkkPv9AUFwM+Q65zxmu+0wH2Q=
 =MmN1
 -----END PGP SIGNATURE-----

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

Qualcomm ARM64 DT updates for v5.19

This adds MDIO bus description on the IPQ6018 platform.

On MSM8916 the BAM-DMUX WWAN network device is added and the Huawei
Ascend G7 gains sound card definition and clarified installation
instructions.

MSM8992 and MSM8994 continues to be worked on, gaining multimedia clock
controller, on-chip memory, watchdog and various cleanup changes. The
Xiaomi Mi 4C gains CPU regulators and fixes to the framebuffer
definition, while Huawei Nexus 6P gains eMMC support.

On MSM8996 the modem and sensor remtoeprocs are added and enabled in the
Dragonboard 820c and the Xiaomi devices.

On MSM8998 a few newly added clocks related to the sensor subsystem bus
are marked as protected by default and the OnePlus devices gains NFC.

The SC7180 platform and devices thereon are further polished and
limozeen moves to using edp-panel for EDID-based detection, over
statically defined panels.

On SC7280 GPI DMA, WiFi remoteproc and network device, LPASS audio
clocks, resets for SDCC controllers and a new CRD revision are added. A
supply glitch on the PCIe power and a current leak for Bluetooth during
suspend are corrected. The Herobrine board gains eDP support and the IDP
gains backlight. USB is marked wakeup capable.

On SDM845 the IPA, WLED based backlight and second WiFi channel are
enabled for Xiaomi Pocophone F1, the firmware name is modified to not
conflict with other boards.  On RB3 the CAN bus controller is added and
the WiFi calibration variant is defined to allow adding the board's
calibration information into linux-firmware.

SM6350 gains I2C busses, UFS and WiFi support, and the numbering of
uart9 is corrected.

On SM7225 and the Fairphone 4 UFS, WiFi and haptics are enabled.

On SM8150 PCIe, Ethernet and uSD card support is added, and enabled for
the SA8155p ADP board. The PDC interrupt controller is also added and
described as wakup interrupt parent for TLMM.

Camera subsystem and control interface are defined for SM8250. On the
Sony Xperia 1 II the audio amplifiers are enabled.

On SM8350 GPI DMA engines are added and linked to the I2C and SPI
serial engines. Surface Duo 2 gains battery charger support.

On SM8450 the two PCIe controller/PHYs are enabled, GPI DMA and QUP
serial engine instances are added. Remoteproc instances are enabled on
SM8450 HDK.

Last, but not least, a number of DeviceTree validation errors across
various boards are corrected.

* tag 'qcom-arm64-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (150 commits)
  arm64: dts: qcom: Only include sc7180.dtsi in sc7180-trogdor.dtsi
  arm64: dts: qcom: sc7180-trogdor: Simplify spi0/spi6 labeling
  arm64: dts: qcom: sc7180-trogdor: Simplify trackpad enabling
  arm64: dts: qcom: sc7280: eDP for herobrine boards
  arm64: dts: qcom: sa8155p-adp: Disable multiple Tx and Rx queues for ethernet IP
  arm64: dts: qcom: sm8150: Fix iommu sid value for SDC2 controller
  arm64: dts: qcom: sm8350-duo2: enable battery charger
  arm64: dts: qcom: Enable pm8350c pwm for sc7280-idp2
  arm64: dts: qcom: pm8350c: Add pwm support
  arm64: dts: qcom: sc7280-qcard: Configure CTS pin to bias-bus-hold for bluetooth
  arm64: dts: qcom: sc7280-idp: Configure CTS pin to bias-bus-hold for bluetooth
  arm64: dts: qcom: sc7180: Remove ipa interconnect node
  arm64: dts: qcom: sc7280-idp: Enable GPI DMAs
  arm64: dts: qcom: sc7280: Add GENI I2C/SPI DMA channels
  arm64: dts: qcom: sc7280: Add GPI DMAengines
  arm64: dts: qcom: sm8450: Fix qmp phy node (use phy@ instead of lanes@)
  arm64: dts: qcom: db845c: Add support for MCP2517FD
  arm64: dts: qcom: qrb5165-rb5: Fix can-clock node name
  arm64: dts: qcom: sc7280: Add SAR sensors to herobrine crd
  arm64: dts: qcom: sm8250: camss: Add CCI definitions
  ...

Link: https://lore.kernel.org/r/20220509204451.325675-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-09 23:26:34 +02:00
Arnd Bergmann
e81c07e25e Qualcomm ARM64 DT fixes for v5.18
This disables the two Soundwire controllers as well as rx and tx macros
 by default on the SM8250 platform to avoid crashes on devices where
 these aren't available.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmJ5MRQbHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3FhVAP/jyGQq7xDk4+Td3YI0pR
 NGlpTUciiKlnNFyPITrkqzTl1gzZFX8rKfg/Gd4Z5ZsEiXes9xO9wr82FFeeyHjZ
 3dzkOl9RHP7tpTfYix93O+qbtctEcOoc6A94bzmKtxE4td/K3davJ0b0C3P0haLn
 57T8C1G22bS6Byq75W7+SliORDe+K2xllewesS3DSRfa0maCz0YF/BPccUZnNQm1
 CeLFL5Sojsv2at6aPN1dSf6CTgv/6Ct3A5RxZ/qFKxwPko57MGUZDu9xja7Gcqtj
 DYRQrNxf6rm7u41DaQNnjvTmUCVc8/woTLtwuPY5a5rmneXsocMruqdasbJy1stE
 QTusQqTYRFR5k9KzWvWzPzR/e2NOLL0XRVUWpsJQFTaBd90JFtvY4R5CYxWXAfqL
 8h0/pyl5BaDyVD7i1Eaat6sneqKut4zs9/PuTqg2XzrlSuiQv17ZeWl1rByJdsB9
 Yau0L+tDle6OFRBjm5w+xFZ0k9K98KWJanYuCycZ4Ff/bFc19MuUk/O4ueEvtb9P
 MZZxKV0AA91cd2G376WvIh9ZR89n9ahU7x5KvwpvRe5UP/JDC+vOXqR87t+NJj28
 1q8ySXnzihEs2inTsfnOGN83k4pfrxOnbol4fnDAw1Sf/ubmH++rHhdeswFvPQFP
 ftbaayoIkiaLKFvMmPtGHy8a
 =EwkG
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ5hLkACgkQmmx57+YA
 GNnBKQ/6AoE7QsBqHfacDEzJg6ImM/QkwfYd7ut9ZVhfhzzXNmI71+TEv07Im1L9
 QbKmLLZXg2cH3ic3XCwlnK2yFT+9gB7ZwTV9bMVQYAMovfxZmFr2FNtushZiAijH
 yBJpi+psIFKlM1IKL+JLk4hL47TQhJb3k+u0uQyCtA7DY5qv4Eba3wDlmsARwCXN
 lmuojVacUWMSFoadPZlc0uRtwkw3CKCtGgXJ/90HdfgEotctch0kW+BFCgVtu+EV
 eB7VXFI3k551fKopqVIHiTV2nw/LkoyHh21uLaZP8au7BroJDBVmTzEAK5UHoPON
 H6HQLIHO+hfVpzCop0bLKwjXFQHhXH84IrJlW9VRsTvQnNrEEEXFH9HVpTh677H1
 qpbjOsk5shWZIKZ5Xb74E2dq8TpPxF3gjGVuyEuo/r5BCHk7mNSRQPqsb+yiE8Nj
 cIZrhX8t1Zd8qVrSl/1MMABllIzoKdeTh1sJAalS6Eg08J3G7RFhacce/q28Y41w
 dJtk6bcvbBnoTg4qB4app4ECvGoe7bubMrpQmNR0n0qRJh37IeOEM4OaCzshEqaF
 UKrY8DWz8QbHKz354Vf6sEpcRNumLqAPXX/dQcdHL1XRW++lfvVpN5t/8nRhPRii
 VPEr4HFBzHi7gOsjJqhlKkhAkaO3kxqGRUh7vu7pi7i+nKKfdVM=
 =gn1C
 -----END PGP SIGNATURE-----

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

Qualcomm ARM64 DT fixes for v5.18

This disables the two Soundwire controllers as well as rx and tx macros
by default on the SM8250 platform to avoid crashes on devices where
these aren't available.

* tag 'qcom-arm64-fixes-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  arm64: dts: qcom: sm8250: don't enable rx/tx macro by default

Link: https://lore.kernel.org/r/20220509152310.306179-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-09 23:16:40 +02:00