microblaze: Remove zalloc_maybe_bootmem()
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 15 Aug 2023 18:36:27 +0000 (20:36 +0200)
committerMichal Simek <michal.simek@amd.com>
Wed, 23 Aug 2023 07:35:22 +0000 (09:35 +0200)
Last user of zalloc_maybe_bootmem() was removed by
commit 4308e3c9e1ea ("microblaze/PCI: Remove unused allocation & free
of PCI host bridge structure")

Remove it.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/bfb1601cac24d7ef8e741c83f9301e4a5a87a0b5.1692124505.git.christophe.leroy@csgroup.eu
Signed-off-by: Michal Simek <michal.simek@amd.com>
arch/microblaze/include/asm/setup.h
arch/microblaze/mm/init.c

index 3657f5e78a3d0e2cb96a8fe2a169dc8126b4c77b..bf2600f75959322287881e3d48e4e088c1cac92a 100644 (file)
@@ -25,7 +25,5 @@ void machine_shutdown(void);
 void machine_halt(void);
 void machine_power_off(void);
 
-extern void *zalloc_maybe_bootmem(size_t size, gfp_t mask);
-
 # endif /* __ASSEMBLY__ */
 #endif /* _ASM_MICROBLAZE_SETUP_H */
index 353fabdfcbc54051cc6f5535e94d9cf6e0b26740..3827dc76edd8236ce40ff6f0664bbf4725a9173f 100644 (file)
@@ -270,22 +270,6 @@ asmlinkage void __init mmu_init(void)
        memblock_dump_all();
 }
 
-void * __ref zalloc_maybe_bootmem(size_t size, gfp_t mask)
-{
-       void *p;
-
-       if (mem_init_done) {
-               p = kzalloc(size, mask);
-       } else {
-               p = memblock_alloc(size, SMP_CACHE_BYTES);
-               if (!p)
-                       panic("%s: Failed to allocate %zu bytes\n",
-                             __func__, size);
-       }
-
-       return p;
-}
-
 static const pgprot_t protection_map[16] = {
        [VM_NONE]                                       = PAGE_NONE,
        [VM_READ]                                       = PAGE_READONLY_X,