ARM fixes for 6.0

Three fixes for ARM:
 - unbreak the RiscPC build
 - fix wrong pg_level in page table dumper
 - make MT_MEMORY_RO really read-only with LPAE
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEuNNh8scc2k/wOAE+9OeQG+StrGQFAmM6+OgACgkQ9OeQG+St
 rGQ1Jw/+NQFrd4frcEiOPLLy9Xz664lRxoylj6rMrbtA3nDvaKVCsuSczHPg+SmG
 dZFjGGlUMxjwaqqngnyHardetJ0orO8ZiY1qPcC7NbYPrq61xQOss1V5Zwns0TUB
 5sSlKplfP7sELMm535vMtbI8I3vWvPMPbZRDeyFp7xSXdAomcKTXjeY/bo26C9cT
 dFwO/rB5O94TUL2RBSegwy2vCNCV+gsUwgatP1WDWsTJarR3oK2TzfW0uXlrFJM7
 Et8N0+beVO8RvPq/SuN+zwaMqeDtRuf0x7hSaBCGznH1yGqm0p1scNIzBHATaVcD
 qY3Xx7NMww/jJdDLmE9gOc2e0BR/oAKu0Fe/MmcV5mOzoa755rpKy6IUvVsV3IFj
 yQWaM0HYVtC7nST28EYcX7hj/z0lYVeObAgLmKOJsu6p3D5yRsy8dn2p4reZkkG2
 Oo5JWZa4vbdfqrXlA5feLj98fDAYlf96yJtNV0gMsc/ZmWo7vb3JOXB6dw8kWBKY
 92X4TREtQpPodKYE19un+P1t0Z+S0IVd8n34aKls9AUN3PKj8cJjisr0ZHtax7Ro
 /SKwJQfOlefeZICDxtHU5lmTtceiBf+iV+wANT0mhGw/9QOHOMzIdFY2dF7ItZge
 kiYX3Olx/SWRyTeYCWkVP21R0d3XrupmeLlZ4aPLKnVMoCooWmQ=
 =OXHm
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm

Pull ARM fixes from Russell King:
 "Three fixes for ARM:

   - unbreak the RiscPC build

   - fix wrong pg_level in page table dumper

   - make MT_MEMORY_RO really read-only with LPAE"

* tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
  ARM: 9247/1: mm: set readonly for MT_MEMORY_RO with ARM_LPAE
  ARM: 9244/1: dump: Fix wrong pg_level in walk_pmd()
  ARM: 9243/1: riscpc: Unbreak the build
This commit is contained in:
Linus Torvalds 2022-10-03 09:56:25 -07:00
commit 038239640e
3 changed files with 7 additions and 1 deletions

View File

@ -23,7 +23,9 @@ unsigned int __machine_arch_type;
#include <linux/types.h>
#include <linux/linkage.h>
#include "misc.h"
#ifdef CONFIG_ARCH_EP93XX
#include "misc-ep93xx.h"
#endif
static void putstr(const char *ptr);

View File

@ -346,7 +346,7 @@ static void walk_pmd(struct pg_state *st, pud_t *pud, unsigned long start)
addr = start + i * PMD_SIZE;
domain = get_domain_name(pmd);
if (pmd_none(*pmd) || pmd_large(*pmd) || !pmd_present(*pmd))
note_page(st, addr, 3, pmd_val(*pmd), domain);
note_page(st, addr, 4, pmd_val(*pmd), domain);
else
walk_pte(st, pmd, addr, domain);

View File

@ -300,7 +300,11 @@ static struct mem_type mem_types[] __ro_after_init = {
.prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
L_PTE_XN | L_PTE_RDONLY,
.prot_l1 = PMD_TYPE_TABLE,
#ifdef CONFIG_ARM_LPAE
.prot_sect = PMD_TYPE_SECT | L_PMD_SECT_RDONLY | PMD_SECT_AP2,
#else
.prot_sect = PMD_TYPE_SECT,
#endif
.domain = DOMAIN_KERNEL,
},
[MT_ROM] = {