Skip to content

Commit e1a08b8

Browse files
committed
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull ARM64 fixes from Catalin Marinas: - Exception level check at boot time (for completeness, not triggering any bug before) - I/D-cache synchronisation logic for huge pages - Config symbol typo * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: fix el2_setup check of CurrentEL arm64: mm: Make icache synchronisation logic huge page aware arm64: mm: Fix horrendous config typo
2 parents 77c4cf1 + 974c8e4 commit e1a08b8

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

arch/arm64/include/asm/pgtable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
292292
#define pmd_sect(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \
293293
PMD_TYPE_SECT)
294294

295-
#ifdef ARM64_64K_PAGES
295+
#ifdef CONFIG_ARM64_64K_PAGES
296296
#define pud_sect(pud) (0)
297297
#else
298298
#define pud_sect(pud) ((pud_val(pud) & PUD_TYPE_MASK) == \

arch/arm64/include/asm/ptrace.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121

2222
#include <uapi/asm/ptrace.h>
2323

24+
/* Current Exception Level values, as contained in CurrentEL */
25+
#define CurrentEL_EL1 (1 << 2)
26+
#define CurrentEL_EL2 (2 << 2)
27+
2428
/* AArch32-specific ptrace requests */
2529
#define COMPAT_PTRACE_GETREGS 12
2630
#define COMPAT_PTRACE_SETREGS 13

arch/arm64/kernel/efi-entry.S

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ ENTRY(efi_stub_entry)
7878

7979
/* Turn off Dcache and MMU */
8080
mrs x0, CurrentEL
81-
cmp x0, #PSR_MODE_EL2t
82-
ccmp x0, #PSR_MODE_EL2h, #0x4, ne
81+
cmp x0, #CurrentEL_EL2
8382
b.ne 1f
8483
mrs x0, sctlr_el2
8584
bic x0, x0, #1 << 0 // clear SCTLR.M

arch/arm64/kernel/head.S

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,7 @@ ENDPROC(stext)
270270
*/
271271
ENTRY(el2_setup)
272272
mrs x0, CurrentEL
273-
cmp x0, #PSR_MODE_EL2t
274-
ccmp x0, #PSR_MODE_EL2h, #0x4, ne
273+
cmp x0, #CurrentEL_EL2
275274
b.ne 1f
276275
mrs x0, sctlr_el2
277276
CPU_BE( orr x0, x0, #(1 << 25) ) // Set the EE bit for EL2

arch/arm64/mm/flush.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ void __sync_icache_dcache(pte_t pte, unsigned long addr)
7979
return;
8080

8181
if (!test_and_set_bit(PG_dcache_clean, &page->flags)) {
82-
__flush_dcache_area(page_address(page), PAGE_SIZE);
82+
__flush_dcache_area(page_address(page),
83+
PAGE_SIZE << compound_order(page));
8384
__flush_icache_all();
8485
} else if (icache_is_aivivt()) {
8586
__flush_icache_all();

0 commit comments

Comments
 (0)