OSDN Git Service

arm64: hugetlb: Register hugepages during arch init
authorAllen Pais <allen.pais@oracle.com>
Tue, 23 Oct 2018 01:06:57 +0000 (06:36 +0530)
committerWill Deacon <will.deacon@arm.com>
Thu, 6 Dec 2018 17:01:13 +0000 (17:01 +0000)
commita21b0b78eaf770c6c3814dd59d213cd6aa47eecd
tree52fafa35a4c93a2f49863cb2ccb7c01d60cc1837
parentcc9f8349cb33965120a96c12e05d00676162eb7f
arm64: hugetlb: Register hugepages during arch init

Add hstate for each supported hugepage size using arch initcall.

* no hugepage parameters

  Without hugepage parameters, only a default hugepage size is
  available for dynamic allocation.  It's different, for example, from
  x86_64 and sparc64 where all supported hugepage sizes are available.

* only default_hugepagesz= is specified and set not to HPAGE_SIZE

  In spite of the fact that default_hugepagesz= is set to a valid
  hugepage size, it's treated as unsupported and reverted to
  HPAGE_SIZE.  Such behaviour is also different from x86_64 and
  sparc64.

Acked-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Tom Saeger <tom.saeger@oracle.com>
Signed-off-by: Dmitry Klochkov <dmitry.klochkov@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/mm/hugetlbpage.c