All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	paulus@samba.org, mpe@ellerman.id.au
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/mm/hugetlb: Filter out hugepage size not supported by page table layout
Date: Mon, 20 Feb 2017 08:05:54 +1100	[thread overview]
Message-ID: <1487538354.23576.158.camel@kernel.crashing.org> (raw)
In-Reply-To: <1487499527-16166-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>

On Sun, 2017-02-19 at 15:48 +0530, Aneesh Kumar K.V wrote:
> +#ifdef CONFIG_PPC_BOOK3S_64
> +       /*
> +        * We need to make sure that for different page sizes reported by
> +        * firmware we only add hugetlb support for page sizes that can be
> +        * supported by linux page table layout.
> +        * For now we have
> +        * Radix: 2M
> +        * Hash: 16M and 16G
> +        */
> +       if (radix_enabled()) {
> +               if (mmu_psize != MMU_PAGE_2M)
> +                       return -EINVAL;
> +       } else {
> +               if (mmu_psize != MMU_PAGE_16M && mmu_psize != MMU_PAGE_16G)
> +                       return -EINVAL;
> +       }

Hash could support others... Same with radix and PUD level pages.

Why do we need that ? Won't FW provide separate properties for hash and
radix page sizes anyway ?

Ben.

  reply	other threads:[~2017-02-19 21:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-19 10:18 [PATCH] powerpc/mm/hugetlb: Filter out hugepage size not supported by page table layout Aneesh Kumar K.V
2017-02-19 21:05 ` Benjamin Herrenschmidt [this message]
2017-02-20  3:32   ` Aneesh Kumar K.V
2017-02-20  3:35     ` Benjamin Herrenschmidt
2017-02-20  5:36       ` Aneesh Kumar K.V

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=1487538354.23576.158.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.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.