All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@ozlabs.org
Cc: schwab@linux-m68k.org, hughd@google.com,
	aneesh.kumar@linux.vnet.ibm.com, ben@decadent.org.uk
Subject: Re: [PATCH] powerpc/mm: Define MAX_PHYSMEM_BITS for all 64-bit configs
Date: Tue, 09 Apr 2019 13:48:23 +0530	[thread overview]
Message-ID: <87imvnmw1c.fsf@linux.ibm.com> (raw)
In-Reply-To: <20190409060324.16941-1-mpe@ellerman.id.au>

Michael Ellerman <mpe@ellerman.id.au> writes:

> The recent commit 8bc086899816 ("powerpc/mm: Only define
> MAX_PHYSMEM_BITS in SPARSEMEM configurations") removed our definition
> of MAX_PHYSMEM_BITS when SPARSEMEM is disabled.
>
> This inadvertently broke some 64-bit FLATMEM using configs with eg:
>
>   arch/powerpc/include/asm/book3s/64/mmu-hash.h:584:6: error: "MAX_PHYSMEM_BITS" is not defined, evaluates to 0
>    #if (MAX_PHYSMEM_BITS > MAX_EA_BITS_PER_CONTEXT)
>         ^~~~~~~~~~~~~~~~
>
> Fix it by making sure we define MAX_PHYSMEM_BITS for all 64-bit
> configs regardless of SPARSEMEM.


Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>

But I still like the patch I posted which move this to the correct
platform header.

>
> Fixes: 8bc086899816 ("powerpc/mm: Only define MAX_PHYSMEM_BITS in SPARSEMEM configurations")
> Reported-by: Andreas Schwab <schwab@linux-m68k.org>
> Reported-by: Hugh Dickins <hughd@google.com>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
>  arch/powerpc/include/asm/mmu.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h
> index 598cdcdd1355..8ddd4a91bdc1 100644
> --- a/arch/powerpc/include/asm/mmu.h
> +++ b/arch/powerpc/include/asm/mmu.h
> @@ -352,7 +352,7 @@ static inline bool strict_kernel_rwx_enabled(void)
>  #if defined(CONFIG_SPARSEMEM_VMEMMAP) && defined(CONFIG_SPARSEMEM_EXTREME) &&	\
>  	defined (CONFIG_PPC_64K_PAGES)
>  #define MAX_PHYSMEM_BITS        51
> -#elif defined(CONFIG_SPARSEMEM)
> +#elif defined(CONFIG_PPC64)
>  #define MAX_PHYSMEM_BITS        46
>  #endif
>
> -- 
> 2.20.1


  reply	other threads:[~2019-04-09  8:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-09  6:03 [PATCH] powerpc/mm: Define MAX_PHYSMEM_BITS for all 64-bit configs Michael Ellerman
2019-04-09  8:18 ` Aneesh Kumar K.V [this message]
2019-04-10 14:49 ` Michael Ellerman
  -- strict thread matches above, loose matches on Subject: below --
2019-04-09 14:23 [PATCH] " Christian Zigotzky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87imvnmw1c.fsf@linux.ibm.com \
    --to=aneesh.kumar@linux.ibm.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=ben@decadent.org.uk \
    --cc=hughd@google.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.