diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-07-05 13:12:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-07-05 13:12:52 -0400 |
commit | e1a08b855f56d6528e7f85aae9ca8123f4c3ae04 (patch) | |
tree | c7d8838cb99cbb0864583191e9b45d19b9656f97 /arch | |
parent | 77c4cf17ae867ba93233b3832bda3de7adaae326 (diff) | |
parent | 974c8e450b9327a03453a4a450a2030b1bd42b5f (diff) |
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
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm64/include/asm/pgtable.h | 2 | ||||
-rw-r--r-- | arch/arm64/include/asm/ptrace.h | 4 | ||||
-rw-r--r-- | arch/arm64/kernel/efi-entry.S | 3 | ||||
-rw-r--r-- | arch/arm64/kernel/head.S | 3 | ||||
-rw-r--r-- | arch/arm64/mm/flush.c | 3 |
5 files changed, 9 insertions, 6 deletions
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 579702086488..e0ccceb317d9 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h | |||
@@ -292,7 +292,7 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, | |||
292 | #define pmd_sect(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \ | 292 | #define pmd_sect(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \ |
293 | PMD_TYPE_SECT) | 293 | PMD_TYPE_SECT) |
294 | 294 | ||
295 | #ifdef ARM64_64K_PAGES | 295 | #ifdef CONFIG_ARM64_64K_PAGES |
296 | #define pud_sect(pud) (0) | 296 | #define pud_sect(pud) (0) |
297 | #else | 297 | #else |
298 | #define pud_sect(pud) ((pud_val(pud) & PUD_TYPE_MASK) == \ | 298 | #define pud_sect(pud) ((pud_val(pud) & PUD_TYPE_MASK) == \ |
diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h index a429b5940be2..501000fadb6f 100644 --- a/arch/arm64/include/asm/ptrace.h +++ b/arch/arm64/include/asm/ptrace.h | |||
@@ -21,6 +21,10 @@ | |||
21 | 21 | ||
22 | #include <uapi/asm/ptrace.h> | 22 | #include <uapi/asm/ptrace.h> |
23 | 23 | ||
24 | /* Current Exception Level values, as contained in CurrentEL */ | ||
25 | #define CurrentEL_EL1 (1 << 2) | ||
26 | #define CurrentEL_EL2 (2 << 2) | ||
27 | |||
24 | /* AArch32-specific ptrace requests */ | 28 | /* AArch32-specific ptrace requests */ |
25 | #define COMPAT_PTRACE_GETREGS 12 | 29 | #define COMPAT_PTRACE_GETREGS 12 |
26 | #define COMPAT_PTRACE_SETREGS 13 | 30 | #define COMPAT_PTRACE_SETREGS 13 |
diff --git a/arch/arm64/kernel/efi-entry.S b/arch/arm64/kernel/efi-entry.S index 66716c9b9e5f..619b1dd7bcde 100644 --- a/arch/arm64/kernel/efi-entry.S +++ b/arch/arm64/kernel/efi-entry.S | |||
@@ -78,8 +78,7 @@ ENTRY(efi_stub_entry) | |||
78 | 78 | ||
79 | /* Turn off Dcache and MMU */ | 79 | /* Turn off Dcache and MMU */ |
80 | mrs x0, CurrentEL | 80 | mrs x0, CurrentEL |
81 | cmp x0, #PSR_MODE_EL2t | 81 | cmp x0, #CurrentEL_EL2 |
82 | ccmp x0, #PSR_MODE_EL2h, #0x4, ne | ||
83 | b.ne 1f | 82 | b.ne 1f |
84 | mrs x0, sctlr_el2 | 83 | mrs x0, sctlr_el2 |
85 | bic x0, x0, #1 << 0 // clear SCTLR.M | 84 | bic x0, x0, #1 << 0 // clear SCTLR.M |
diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index a96d3a6a63f6..a2c1195abb7f 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S | |||
@@ -270,8 +270,7 @@ ENDPROC(stext) | |||
270 | */ | 270 | */ |
271 | ENTRY(el2_setup) | 271 | ENTRY(el2_setup) |
272 | mrs x0, CurrentEL | 272 | mrs x0, CurrentEL |
273 | cmp x0, #PSR_MODE_EL2t | 273 | cmp x0, #CurrentEL_EL2 |
274 | ccmp x0, #PSR_MODE_EL2h, #0x4, ne | ||
275 | b.ne 1f | 274 | b.ne 1f |
276 | mrs x0, sctlr_el2 | 275 | mrs x0, sctlr_el2 |
277 | CPU_BE( orr x0, x0, #(1 << 25) ) // Set the EE bit for EL2 | 276 | CPU_BE( orr x0, x0, #(1 << 25) ) // Set the EE bit for EL2 |
diff --git a/arch/arm64/mm/flush.c b/arch/arm64/mm/flush.c index e4193e3adc7f..0d64089d28b5 100644 --- a/arch/arm64/mm/flush.c +++ b/arch/arm64/mm/flush.c | |||
@@ -79,7 +79,8 @@ void __sync_icache_dcache(pte_t pte, unsigned long addr) | |||
79 | return; | 79 | return; |
80 | 80 | ||
81 | if (!test_and_set_bit(PG_dcache_clean, &page->flags)) { | 81 | 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)); | ||
83 | __flush_icache_all(); | 84 | __flush_icache_all(); |
84 | } else if (icache_is_aivivt()) { | 85 | } else if (icache_is_aivivt()) { |
85 | __flush_icache_all(); | 86 | __flush_icache_all(); |