Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1514127 > unrolled thread

[PATCHv2 5/6] arm64: Use __pa_symbol for _end

Started byLaura Abbott <labbott@redhat.com>
First post2016-11-02 22:10 +0100
Last post2016-11-03 17:00 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCHv2 5/6] arm64: Use __pa_symbol for _end Laura Abbott <labbott@redhat.com> - 2016-11-02 22:10 +0100
    Re: [PATCHv2 5/6] arm64: Use __pa_symbol for _end Mark Rutland <mark.rutland@arm.com> - 2016-11-03 00:00 +0100
      Re: [PATCHv2 5/6] arm64: Use __pa_symbol for _end Laura Abbott <labbott@redhat.com> - 2016-11-03 01:00 +0100
        Re: [PATCHv2 5/6] arm64: Use __pa_symbol for _end Mark Rutland <mark.rutland@arm.com> - 2016-11-03 17:00 +0100

#1514127 — [PATCHv2 5/6] arm64: Use __pa_symbol for _end

FromLaura Abbott <labbott@redhat.com>
Date2016-11-02 22:10 +0100
Subject[PATCHv2 5/6] arm64: Use __pa_symbol for _end
Message-ID<szaXg-34T-29@gated-at.bofh.it>
__pa_symbol is technically the marco that should be used for kernel
symbols. Switch to this as a pre-requisite for DEBUG_VIRTUAL.

Signed-off-by: Laura Abbott <labbott@redhat.com>
---
 arch/arm64/mm/init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index 212c4d1..3236eb0 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -209,8 +209,8 @@ void __init arm64_memblock_init(void)
 	 * linear mapping. Take care not to clip the kernel which may be
 	 * high in memory.
 	 */
-	memblock_remove(max_t(u64, memstart_addr + linear_region_size, __pa(_end)),
-			ULLONG_MAX);
+	memblock_remove(max_t(u64, memstart_addr + linear_region_size,
+			__pa_symbol(_end)), ULLONG_MAX);
 	if (memstart_addr + linear_region_size < memblock_end_of_DRAM()) {
 		/* ensure that memstart_addr remains sufficiently aligned */
 		memstart_addr = round_up(memblock_end_of_DRAM() - linear_region_size,
-- 
2.10.1

[toc] | [next] | [standalone]


#1514197

FromMark Rutland <mark.rutland@arm.com>
Date2016-11-03 00:00 +0100
Message-ID<szcFH-3Yv-7@gated-at.bofh.it>
In reply to#1514127
On Wed, Nov 02, 2016 at 03:00:53PM -0600, Laura Abbott wrote:
> 
> __pa_symbol is technically the marco that should be used for kernel
> symbols. Switch to this as a pre-requisite for DEBUG_VIRTUAL.

Nit: s/marco/macro/

I see there are some other uses of __pa() that look like they could/should be
__pa_symbol(), e.g. in mark_rodata_ro().

I guess strictly speaking those need to be updated to? Or is there a reason
that we should not?

Thanks,
Mark.

> Signed-off-by: Laura Abbott <labbott@redhat.com>
> ---
>  arch/arm64/mm/init.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
> index 212c4d1..3236eb0 100644
> --- a/arch/arm64/mm/init.c
> +++ b/arch/arm64/mm/init.c
> @@ -209,8 +209,8 @@ void __init arm64_memblock_init(void)
>  	 * linear mapping. Take care not to clip the kernel which may be
>  	 * high in memory.
>  	 */
> -	memblock_remove(max_t(u64, memstart_addr + linear_region_size, __pa(_end)),
> -			ULLONG_MAX);
> +	memblock_remove(max_t(u64, memstart_addr + linear_region_size,
> +			__pa_symbol(_end)), ULLONG_MAX);
>  	if (memstart_addr + linear_region_size < memblock_end_of_DRAM()) {
>  		/* ensure that memstart_addr remains sufficiently aligned */
>  		memstart_addr = round_up(memblock_end_of_DRAM() - linear_region_size,
> -- 
> 2.10.1
> 

[toc] | [prev] | [next] | [standalone]


#1514213

FromLaura Abbott <labbott@redhat.com>
Date2016-11-03 01:00 +0100
Message-ID<szdBL-4xh-9@gated-at.bofh.it>
In reply to#1514197
On 11/02/2016 04:52 PM, Mark Rutland wrote:
> On Wed, Nov 02, 2016 at 03:00:53PM -0600, Laura Abbott wrote:
>>
>> __pa_symbol is technically the marco that should be used for kernel
>> symbols. Switch to this as a pre-requisite for DEBUG_VIRTUAL.
>
> Nit: s/marco/macro/
>
> I see there are some other uses of __pa() that look like they could/should be
> __pa_symbol(), e.g. in mark_rodata_ro().
>
> I guess strictly speaking those need to be updated to? Or is there a reason
> that we should not?
>

If the concept of __pa_symbol is okay then yes I think all uses of __pa
should eventually be converted for consistency and debugging.

> Thanks,
> Mark.
>
>> Signed-off-by: Laura Abbott <labbott@redhat.com>
>> ---
>>  arch/arm64/mm/init.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
>> index 212c4d1..3236eb0 100644
>> --- a/arch/arm64/mm/init.c
>> +++ b/arch/arm64/mm/init.c
>> @@ -209,8 +209,8 @@ void __init arm64_memblock_init(void)
>>  	 * linear mapping. Take care not to clip the kernel which may be
>>  	 * high in memory.
>>  	 */
>> -	memblock_remove(max_t(u64, memstart_addr + linear_region_size, __pa(_end)),
>> -			ULLONG_MAX);
>> +	memblock_remove(max_t(u64, memstart_addr + linear_region_size,
>> +			__pa_symbol(_end)), ULLONG_MAX);
>>  	if (memstart_addr + linear_region_size < memblock_end_of_DRAM()) {
>>  		/* ensure that memstart_addr remains sufficiently aligned */
>>  		memstart_addr = round_up(memblock_end_of_DRAM() - linear_region_size,
>> --
>> 2.10.1
>>

[toc] | [prev] | [next] | [standalone]


#1514638

FromMark Rutland <mark.rutland@arm.com>
Date2016-11-03 17:00 +0100
Message-ID<szsAO-5Mg-19@gated-at.bofh.it>
In reply to#1514213
On Wed, Nov 02, 2016 at 05:56:42PM -0600, Laura Abbott wrote:
> On 11/02/2016 04:52 PM, Mark Rutland wrote:
> >On Wed, Nov 02, 2016 at 03:00:53PM -0600, Laura Abbott wrote:
> >>
> >>__pa_symbol is technically the marco that should be used for kernel
> >>symbols. Switch to this as a pre-requisite for DEBUG_VIRTUAL.
> >
> >Nit: s/marco/macro/
> >
> >I see there are some other uses of __pa() that look like they could/should be
> >__pa_symbol(), e.g. in mark_rodata_ro().
> >
> >I guess strictly speaking those need to be updated to? Or is there a reason
> >that we should not?
> 
> If the concept of __pa_symbol is okay then yes I think all uses of __pa
> should eventually be converted for consistency and debugging.

I have no strong feelings either way about __pa_symbol(); I'm not clear on what
the purpose of __pa_symbol() is specifically, but I'm happy even if it's just
for consistency with other architectures.

However, if we use it I think that we should (attempt to) use it consistently
from the outset. 

Thanks,
Mark.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web