linux_dsm_epyc7002/arch/powerpc/mm
Mike Kravetz 3823783088 hugetlbfs: remove hugetlb_add_hstate() warning for existing hstate
hugetlb_add_hstate() prints a warning if the hstate already exists.  This
was originally done as part of kernel command line parsing.  If
'hugepagesz=' was specified more than once, the warning

	pr_warn("hugepagesz= specified twice, ignoring\n");

would be printed.

Some architectures want to enable all huge page sizes.  They would call
hugetlb_add_hstate for all supported sizes.  However, this was done after
command line processing and as a result hstates could have already been
created for some sizes.  To make sure no warning were printed, there would
often be code like:

	if (!size_to_hstate(size)
		hugetlb_add_hstate(ilog2(size) - PAGE_SHIFT)

The only time we want to print the warning is as the result of command
line processing.  So, remove the warning from hugetlb_add_hstate and add
it to the single arch independent routine processing "hugepagesz=".  After
this, calls to size_to_hstate() in arch specific code can be removed and
hugetlb_add_hstate can be called without worrying about warning messages.

[mike.kravetz@oracle.com: fix hugetlb initialization]
  Link: http://lkml.kernel.org/r/4c36c6ce-3774-78fa-abc4-b7346bf24348@oracle.com
  Link: http://lkml.kernel.org/r/20200428205614.246260-5-mike.kravetz@oracle.com
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Acked-by: Mina Almasry <almasrymina@google.com>
Acked-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>	[s390]
Acked-by: Will Deacon <will@kernel.org>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Longpeng <longpeng2@huawei.com>
Cc: Nitesh Narayan Lal <nitesh@redhat.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: Qian Cai <cai@lca.pw>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Link: http://lkml.kernel.org/r/20200417185049.275845-4-mike.kravetz@oracle.com
Link: http://lkml.kernel.org/r/20200428205614.246260-4-mike.kravetz@oracle.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-06-03 20:09:46 -07:00
..
book3s32 Revert "powerpc/32s: reorder Linux PTE bits to better match Hash PTE bits." 2020-05-20 22:35:52 +10:00
book3s64 powerpc/mm: thread pgprot_t through create_section_mapping() 2020-04-10 15:36:21 -07:00
kasan powerpc updates for 5.7 2020-04-05 11:12:59 -07:00
nohash powerpc/8xx: Fix STRICT_KERNEL_RWX startup test failure 2020-04-22 20:23:41 +10:00
ptdump powerpc/mm: ptdump: no need to check return value of debugfs_create functions 2020-03-04 22:44:25 +11:00
copro_fault.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 153 2019-05-30 11:26:32 -07:00
dma-noncoherent.c dma-mapping: drop the dev argument to arch_sync_dma_for_* 2019-11-20 20:31:38 +01:00
drmem.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fault.c mm/vma: make vma_is_accessible() available for general use 2020-04-07 10:43:37 -07:00
highmem.c powerpc/highmem: Change BUG_ON() to WARN_ON() 2019-04-20 22:02:11 +10:00
hugetlbpage.c hugetlbfs: remove hugetlb_add_hstate() warning for existing hstate 2020-06-03 20:09:46 -07:00
init_32.c powerpc: move memstart_addr and kernstart_addr to init-common.c 2019-11-13 19:27:28 +11:00
init_64.c Merge branch 'topic/kaslr-book3e32' into next 2019-11-14 19:23:33 +11:00
init-common.c powerpc: introduce kernstart_virt_addr to store the kernel base 2019-11-13 19:27:32 +11:00
ioremap_32.c powerpc/ioremap: warn on early use of ioremap() 2019-11-19 19:38:38 +11:00
ioremap_64.c powerpc: remove __ioremap_at and __iounmap_at 2020-06-02 10:59:10 -07:00
ioremap.c mm/memremap_pages: Introduce memremap_compat_align() 2020-02-20 16:58:55 -08:00
Makefile powerpc/mm: Move ioremap functions out of pgtable_32/64.c 2019-08-27 13:03:35 +10:00
mem.c mm: use free_area_init() instead of free_area_init_nodes() 2020-06-03 20:09:43 -07:00
mmap.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
mmu_context.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mmu_decl.h powerpc/ptdump: don't entirely rebuild kernel when selecting CONFIG_PPC_DEBUG_WX 2020-01-23 21:31:11 +11:00
numa.c powerpc/numa: Remove late request for home node associativity 2020-03-04 22:44:31 +11:00
pgtable_32.c powerpc/32: drop get_pteptr() 2020-02-26 10:34:41 +11:00
pgtable_64.c powerpc/mm: Move ioremap functions out of pgtable_32/64.c 2019-08-27 13:03:35 +10:00
pgtable-frag.c mm: treewide: clarify pgtable_page_{ctor,dtor}() naming 2019-09-26 10:10:44 -07:00
pgtable.c powerpc updates for 5.3 2019-07-13 16:08:36 -07:00
slice.c powerpc/mm: Mark get_slice_psize() & slice_addr_is_low() as notrace 2019-12-23 21:12:51 +11:00