Skip to content

Commit 7d49efe

Browse files
committed
Merge tag 'arm64-stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64
Pull ARM64 fixes from Catalin Marinas: - Page table fixes (PROT_NONE, shareability attribute, TLB invalidation) - Secondary CPUs entry endianness fix - Make NR_CPUS default to 8 * tag 'arm64-stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64: arm64: mm: Fix PMD_SECT_PROT_NONE definition arm64: Fix memory shareability attribute for ioremap_wc/cache arm64: kernel: add code to set cpu boot mode to secondary_entry shim arm64: make default NR_CPUS 8 arm64: ensure completion of TLB invalidatation
2 parents 374b105 + db4ed53 commit 7d49efe

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎arch/arm64/Kconfig‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ config NR_CPUS
159159
range 2 32
160160
depends on SMP
161161
# These have to remain sorted largest to smallest
162-
default "8" if ARCH_XGENE
163-
default "4"
162+
default "8"
164163

165164
config HOTPLUG_CPU
166165
bool "Support for hot-pluggable CPUs"

‎arch/arm64/include/asm/io.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ extern void __iomem *__ioremap(phys_addr_t phys_addr, size_t size, pgprot_t prot
229229
extern void __iounmap(volatile void __iomem *addr);
230230
extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size);
231231

232-
#define PROT_DEFAULT (PTE_TYPE_PAGE | PTE_AF | PTE_DIRTY)
232+
#define PROT_DEFAULT (pgprot_default | PTE_DIRTY)
233233
#define PROT_DEVICE_nGnRE (PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_ATTRINDX(MT_DEVICE_nGnRE))
234234
#define PROT_NORMAL_NC (PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL_NC))
235235
#define PROT_NORMAL (PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL))

‎arch/arm64/include/asm/pgtable-hwdef.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* Section
4444
*/
4545
#define PMD_SECT_VALID (_AT(pmdval_t, 1) << 0)
46-
#define PMD_SECT_PROT_NONE (_AT(pmdval_t, 1) << 2)
46+
#define PMD_SECT_PROT_NONE (_AT(pmdval_t, 1) << 58)
4747
#define PMD_SECT_USER (_AT(pmdval_t, 1) << 6) /* AP[1] */
4848
#define PMD_SECT_RDONLY (_AT(pmdval_t, 1) << 7) /* AP[2] */
4949
#define PMD_SECT_S (_AT(pmdval_t, 3) << 8)

‎arch/arm64/kernel/head.S‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,9 @@ ENDPROC(secondary_holding_pen)
282282
* be used where CPUs are brought online dynamically by the kernel.
283283
*/
284284
ENTRY(secondary_entry)
285-
bl __calc_phys_offset // x2=phys offset
286285
bl el2_setup // Drop to EL1
286+
bl __calc_phys_offset // x24=PHYS_OFFSET, x28=PHYS_OFFSET-PAGE_OFFSET
287+
bl set_cpu_boot_mode_flag
287288
b secondary_startup
288289
ENDPROC(secondary_entry)
289290

‎arch/arm64/mm/proc.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@ ENTRY(__cpu_setup)
111111
bl __flush_dcache_all
112112
mov lr, x28
113113
ic iallu // I+BTB cache invalidate
114+
tlbi vmalle1is // invalidate I + D TLBs
114115
dsb sy
115116

116117
mov x0, #3 << 20
117118
msr cpacr_el1, x0 // Enable FP/ASIMD
118119
msr mdscr_el1, xzr // Reset mdscr_el1
119-
tlbi vmalle1is // invalidate I + D TLBs
120120
/*
121121
* Memory region attributes for LPAE:
122122
*

0 commit comments

Comments
 (0)