linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: replace magic number with PAGE_SHIFT macro in fixup_pv code
@ 2014-11-28  6:10 Masahiro Yamada
  2014-11-28  7:17 ` Nicolas Pitre
  0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2014-11-28  6:10 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Masahiro Yamada, Russell King, Nicolas Pitre, Sekhar Nori,
	Rob Herring, Thomas Petazzoni, Victor Kamensky,
	Christopher Covington, linux-kernel

This line converts PHYS_OFFSET into PHYS_PFN_OFFSET.
It is better to use PAGE_SHIFT rather than the magic number 12.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 arch/arm/kernel/head.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 664eee8..ecb7be8 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -586,7 +586,7 @@ __fixup_pv_table:
 	add	r5, r5, r3	@ adjust table end address
 	add	r6, r6, r3	@ adjust __pv_phys_pfn_offset address
 	add	r7, r7, r3	@ adjust __pv_offset address
-	mov	r0, r8, lsr #12	@ convert to PFN
+	mov	r0, r8, lsr #PAGE_SHIFT	@ convert to PFN
 	str	r0, [r6]	@ save computed PHYS_OFFSET to __pv_phys_pfn_offset
 	strcc	ip, [r7, #HIGH_OFFSET]	@ save to __pv_offset high bits
 	mov	r6, r3, lsr #24	@ constant for add/sub instructions
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM: replace magic number with PAGE_SHIFT macro in fixup_pv code
  2014-11-28  6:10 [PATCH] ARM: replace magic number with PAGE_SHIFT macro in fixup_pv code Masahiro Yamada
@ 2014-11-28  7:17 ` Nicolas Pitre
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Pitre @ 2014-11-28  7:17 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-arm-kernel, Russell King, Sekhar Nori, Rob Herring,
	Thomas Petazzoni, Victor Kamensky, Christopher Covington,
	linux-kernel

On Fri, 28 Nov 2014, Masahiro Yamada wrote:

> This line converts PHYS_OFFSET into PHYS_PFN_OFFSET.
> It is better to use PAGE_SHIFT rather than the magic number 12.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

Acked-by: Nicolas Pitre <nico@linaro.org>


> ---
> 
>  arch/arm/kernel/head.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
> index 664eee8..ecb7be8 100644
> --- a/arch/arm/kernel/head.S
> +++ b/arch/arm/kernel/head.S
> @@ -586,7 +586,7 @@ __fixup_pv_table:
>  	add	r5, r5, r3	@ adjust table end address
>  	add	r6, r6, r3	@ adjust __pv_phys_pfn_offset address
>  	add	r7, r7, r3	@ adjust __pv_offset address
> -	mov	r0, r8, lsr #12	@ convert to PFN
> +	mov	r0, r8, lsr #PAGE_SHIFT	@ convert to PFN
>  	str	r0, [r6]	@ save computed PHYS_OFFSET to __pv_phys_pfn_offset
>  	strcc	ip, [r7, #HIGH_OFFSET]	@ save to __pv_offset high bits
>  	mov	r6, r3, lsr #24	@ constant for add/sub instructions
> -- 
> 1.9.1
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-28  7:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-28  6:10 [PATCH] ARM: replace magic number with PAGE_SHIFT macro in fixup_pv code Masahiro Yamada
2014-11-28  7:17 ` Nicolas Pitre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).