Skip to content

Commit fabdb27

Browse files
committed
powerpc: Drop zalloc_maybe_bootmem()
The only callers of zalloc_maybe_bootmem() are PCI setup routines. These used to be called early during boot before slab setup, and also during runtime due to hotplug. But commit 5537fcb ("powerpc/pci: Add ppc_md.discover_phbs()") moved the boot-time calls later, after slab setup, meaning there's no longer any need for zalloc_maybe_bootmem(), kzalloc() can be used in all cases. Reviewed-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/[email protected]
1 parent 22b1656 commit fabdb27

File tree

5 files changed

+3
-27
lines changed

5 files changed

+3
-27
lines changed

arch/powerpc/include/asm/setup.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
extern void ppc_printk_progress(char *s, unsigned short hex);
99

1010
extern unsigned long long memory_limit;
11-
extern void *zalloc_maybe_bootmem(size_t size, gfp_t mask);
1211

1312
struct device_node;
1413

arch/powerpc/kernel/pci-common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ struct pci_controller *pcibios_alloc_controller(struct device_node *dev)
125125
{
126126
struct pci_controller *phb;
127127

128-
phb = zalloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL);
128+
phb = kzalloc(sizeof(struct pci_controller), GFP_KERNEL);
129129
if (phb == NULL)
130130
return NULL;
131131

arch/powerpc/lib/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ endif
2727
CFLAGS_code-patching.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
2828
CFLAGS_feature-fixups.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
2929

30-
obj-y += alloc.o code-patching.o feature-fixups.o pmem.o
30+
obj-y += code-patching.o feature-fixups.o pmem.o
3131

3232
obj-$(CONFIG_CODE_PATCHING_SELFTEST) += test-code-patching.o
3333

arch/powerpc/lib/alloc.c

Lines changed: 0 additions & 23 deletions
This file was deleted.

arch/powerpc/sysdev/fsl_pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ static int __init mpc83xx_pcie_setup(struct pci_controller *hose,
767767
u32 cfg_bar;
768768
int ret = -ENOMEM;
769769

770-
pcie = zalloc_maybe_bootmem(sizeof(*pcie), GFP_KERNEL);
770+
pcie = kzalloc(sizeof(*pcie), GFP_KERNEL);
771771
if (!pcie)
772772
return ret;
773773

0 commit comments

Comments
 (0)