From a0d25707b775aa7f3875bf0aed7e092a68d3500a Mon Sep 17 00:00:00 2001 From: Jingoo Han Date: Mon, 20 Jan 2014 05:00:21 +0000 Subject: [PATCH 1/3] arm64: mm: use ubfm for dcache_line_size Use 'ubfm' for the bitfield move instruction; thus, single instruction can be used instead of two instructions, when getting the minimum D-cache line size from CTR_EL0 register. Signed-off-by: Jingoo Han Acked-by: Will Deacon Signed-off-by: Catalin Marinas (cherry picked from commit bd5f6dc304a054ccdc8dab43bef5e41d9a575b61) Signed-off-by: Mark Brown --- arch/arm64/mm/proc-macros.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm64/mm/proc-macros.S b/arch/arm64/mm/proc-macros.S index 8957b822010b..005d29e2977d 100644 --- a/arch/arm64/mm/proc-macros.S +++ b/arch/arm64/mm/proc-macros.S @@ -38,8 +38,7 @@ */ .macro dcache_line_size, reg, tmp mrs \tmp, ctr_el0 // read CTR - lsr \tmp, \tmp, #16 - and \tmp, \tmp, #0xf // cache line size encoding + ubfm \tmp, \tmp, #16, #19 // cache line size encoding mov \reg, #4 // bytes per word lsl \reg, \reg, \tmp // actual cache line size .endm From 2090a8e22be4075b6b827010d5325666bb93ce18 Mon Sep 17 00:00:00 2001 From: Jingoo Han Date: Tue, 21 Jan 2014 01:17:47 +0000 Subject: [PATCH 2/3] arm64: mm: fix the function name in comment of __flush_dcache_area Fix the function name of comment of __flush_dcache_area, because __flush_dcache_area is the correct name. Also, the missing variable 'size' is added to the comment. Signed-off-by: Jingoo Han Signed-off-by: Catalin Marinas (cherry picked from commit 03324e6e6e66ebd171d9b4b90fd6a2655980dc13) Signed-off-by: Mark Brown --- arch/arm64/mm/cache.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/mm/cache.S b/arch/arm64/mm/cache.S index 48a386094fa3..1ea9f26d1b70 100644 --- a/arch/arm64/mm/cache.S +++ b/arch/arm64/mm/cache.S @@ -146,7 +146,7 @@ ENDPROC(flush_icache_range) ENDPROC(__flush_cache_user_range) /* - * __flush_kern_dcache_page(kaddr) + * __flush_dcache_area(kaddr, size) * * Ensure that the data held in the page kaddr is written back to the * page in question. From 0f4a77d8b060c5a95fb823c4d205be845126c544 Mon Sep 17 00:00:00 2001 From: Jingoo Han Date: Mon, 27 Jan 2014 07:19:32 +0000 Subject: [PATCH 3/3] arm64: mm: fix the function name in comment of cpu_do_switch_mm Fix the function name of comment of cpu_do_switch_mm, because cpu_do_switch_mm is the correct name. Signed-off-by: Jingoo Han Signed-off-by: Catalin Marinas (cherry picked from commit 812944e91dbbfeadaeeb4443a5560a7f45648f0b) Signed-off-by: Mark Brown --- arch/arm64/mm/proc.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S index 2fbd93e9be15..9ef7633a8eb9 100644 --- a/arch/arm64/mm/proc.S +++ b/arch/arm64/mm/proc.S @@ -81,7 +81,7 @@ ENTRY(cpu_do_idle) ENDPROC(cpu_do_idle) /* - * cpu_switch_mm(pgd_phys, tsk) + * cpu_do_switch_mm(pgd_phys, tsk) * * Set the translation table base pointer to be pgd_phys. *