linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64:mm: initialize max_mapnr using function set_max_mapnr
@ 2014-09-11 13:37 Ganapatrao Kulkarni
  2014-09-11 13:52 ` Will Deacon
  2014-09-15 17:11 ` Catalin Marinas
  0 siblings, 2 replies; 5+ messages in thread
From: Ganapatrao Kulkarni @ 2014-09-11 13:37 UTC (permalink / raw)
  To: linux-arm-kernel

In some config cases, max_mapnr is not defined and direct reference
results in to compilation error.
This is fixed by using set_max_mapnr() helper.

Signed-off-by: Ganapatrao Kulkarni <ganapatrao.kulkarni@caviumnetworks.com>
---
 arch/arm64/mm/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index 5472c24..271e654 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -256,7 +256,7 @@ static void __init free_unused_memmap(void)
  */
 void __init mem_init(void)
 {
-	max_mapnr   = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map;
+	set_max_mapnr(pfn_to_page(max_pfn) - mem_map);
 
 #ifndef CONFIG_SPARSEMEM_VMEMMAP
 	free_unused_memmap();
-- 
1.8.1.4

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

* [PATCH] arm64:mm: initialize max_mapnr using function set_max_mapnr
  2014-09-11 13:37 [PATCH] arm64:mm: initialize max_mapnr using function set_max_mapnr Ganapatrao Kulkarni
@ 2014-09-11 13:52 ` Will Deacon
  2014-09-15 17:11 ` Catalin Marinas
  1 sibling, 0 replies; 5+ messages in thread
From: Will Deacon @ 2014-09-11 13:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Sep 11, 2014 at 02:37:41PM +0100, Ganapatrao Kulkarni wrote:
> In some config cases, max_mapnr is not defined and direct reference
> results in to compilation error.
> This is fixed by using set_max_mapnr() helper.
> 
> Signed-off-by: Ganapatrao Kulkarni <ganapatrao.kulkarni@caviumnetworks.com>
> ---
>  arch/arm64/mm/init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
> index 5472c24..271e654 100644
> --- a/arch/arm64/mm/init.c
> +++ b/arch/arm64/mm/init.c
> @@ -256,7 +256,7 @@ static void __init free_unused_memmap(void)
>   */
>  void __init mem_init(void)
>  {
> -	max_mapnr   = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map;
> +	set_max_mapnr(pfn_to_page(max_pfn) - mem_map);

  Acked-by: Will Deacon <will.deacon@arm.com>

Catalin, this is one for you (we don't support NUMA yet, so mainline isn't
broken).

Will

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

* [PATCH] arm64:mm: initialize max_mapnr using function set_max_mapnr
  2014-09-11 13:37 [PATCH] arm64:mm: initialize max_mapnr using function set_max_mapnr Ganapatrao Kulkarni
  2014-09-11 13:52 ` Will Deacon
@ 2014-09-15 17:11 ` Catalin Marinas
  2014-09-15 18:37   ` Ganapatrao Kulkarni
  1 sibling, 1 reply; 5+ messages in thread
From: Catalin Marinas @ 2014-09-15 17:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Sep 11, 2014 at 02:37:41PM +0100, Ganapatrao Kulkarni wrote:
> In some config cases, max_mapnr is not defined and direct reference
> results in to compilation error.
> This is fixed by using set_max_mapnr() helper.
> 
> Signed-off-by: Ganapatrao Kulkarni <ganapatrao.kulkarni@caviumnetworks.com>
> ---
>  arch/arm64/mm/init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
> index 5472c24..271e654 100644
> --- a/arch/arm64/mm/init.c
> +++ b/arch/arm64/mm/init.c
> @@ -256,7 +256,7 @@ static void __init free_unused_memmap(void)
>   */
>  void __init mem_init(void)
>  {
> -	max_mapnr   = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map;
> +	set_max_mapnr(pfn_to_page(max_pfn) - mem_map);

These are not equivalent as PHYS_PFN_OFFSET is dropped (which looks like
the correct thing to do but the commit log should reflect this as well).

-- 
Catalin

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

* [PATCH] arm64:mm: initialize max_mapnr using function set_max_mapnr
  2014-09-15 17:11 ` Catalin Marinas
@ 2014-09-15 18:37   ` Ganapatrao Kulkarni
  2014-09-16 17:18     ` Catalin Marinas
  0 siblings, 1 reply; 5+ messages in thread
From: Ganapatrao Kulkarni @ 2014-09-15 18:37 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Catalin,

On Mon, Sep 15, 2014 at 10:41 PM, Catalin Marinas
<catalin.marinas@arm.com> wrote:
> On Thu, Sep 11, 2014 at 02:37:41PM +0100, Ganapatrao Kulkarni wrote:
>> In some config cases, max_mapnr is not defined and direct reference
>> results in to compilation error.
>> This is fixed by using set_max_mapnr() helper.
>>
>> Signed-off-by: Ganapatrao Kulkarni <ganapatrao.kulkarni@caviumnetworks.com>
>> ---
>>  arch/arm64/mm/init.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
>> index 5472c24..271e654 100644
>> --- a/arch/arm64/mm/init.c
>> +++ b/arch/arm64/mm/init.c
>> @@ -256,7 +256,7 @@ static void __init free_unused_memmap(void)
>>   */
>>  void __init mem_init(void)
>>  {
>> -     max_mapnr   = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map;
>> +     set_max_mapnr(pfn_to_page(max_pfn) - mem_map);
>
> These are not equivalent as PHYS_PFN_OFFSET is dropped (which looks like
> the correct thing to do but the commit log should reflect this as well).
is below comment ok for the change? if so i can resend the patch.

Initializing max_mapnr using set_max_mapnr() helper function instead
of direct reference.
Also not adding PHYS_PFN_OFFSET to max_pfn, since it already contains it.

>
> --
> Catalin

thanks
ganapat

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

* [PATCH] arm64:mm: initialize max_mapnr using function set_max_mapnr
  2014-09-15 18:37   ` Ganapatrao Kulkarni
@ 2014-09-16 17:18     ` Catalin Marinas
  0 siblings, 0 replies; 5+ messages in thread
From: Catalin Marinas @ 2014-09-16 17:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Sep 15, 2014 at 07:37:36PM +0100, Ganapatrao Kulkarni wrote:
> On Mon, Sep 15, 2014 at 10:41 PM, Catalin Marinas
> <catalin.marinas@arm.com> wrote:
> > On Thu, Sep 11, 2014 at 02:37:41PM +0100, Ganapatrao Kulkarni wrote:
> >> In some config cases, max_mapnr is not defined and direct reference
> >> results in to compilation error.
> >> This is fixed by using set_max_mapnr() helper.
> >>
> >> Signed-off-by: Ganapatrao Kulkarni <ganapatrao.kulkarni@caviumnetworks.com>
> >> ---
> >>  arch/arm64/mm/init.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
> >> index 5472c24..271e654 100644
> >> --- a/arch/arm64/mm/init.c
> >> +++ b/arch/arm64/mm/init.c
> >> @@ -256,7 +256,7 @@ static void __init free_unused_memmap(void)
> >>   */
> >>  void __init mem_init(void)
> >>  {
> >> -     max_mapnr   = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map;
> >> +     set_max_mapnr(pfn_to_page(max_pfn) - mem_map);
> >
> > These are not equivalent as PHYS_PFN_OFFSET is dropped (which looks like
> > the correct thing to do but the commit log should reflect this as well).
> is below comment ok for the change? if so i can resend the patch.
> 
> Initializing max_mapnr using set_max_mapnr() helper function instead
> of direct reference.
> Also not adding PHYS_PFN_OFFSET to max_pfn, since it already contains it.

Yes.

-- 
Catalin

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

end of thread, other threads:[~2014-09-16 17:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-11 13:37 [PATCH] arm64:mm: initialize max_mapnr using function set_max_mapnr Ganapatrao Kulkarni
2014-09-11 13:52 ` Will Deacon
2014-09-15 17:11 ` Catalin Marinas
2014-09-15 18:37   ` Ganapatrao Kulkarni
2014-09-16 17:18     ` Catalin Marinas

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).