Skip to content

Commit

Permalink
arm64: mm: use ubfm for dcache_line_size
Browse files Browse the repository at this point in the history
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 <jg1.han@samsung.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
  • Loading branch information
Jingoo Han authored and Catalin Marinas committed Jan 22, 2014
1 parent 883c057 commit bd5f6dc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/arm64/mm/proc-macros.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bd5f6dc

Please sign in to comment.