[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7] mm/memblock: Add memblock_alloc_or_panic interface
 
- To: Mike Rapoport <rppt@xxxxxxxxxx>, Guo Weikang <guoweikang.kernel@xxxxxxxxx>
 
- From: Xi Ruoyao <xry111@xxxxxxxxxxx>
 
- Date: Mon, 23 Dec 2024 15:15:34 +0800
 
- Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Geert Uytterhoeven	 <geert@xxxxxxxxxxxxxx>, Dennis Zhou <dennis@xxxxxxxxxx>, Tejun Heo <tj@xxxxxxxxxx>,  Christoph Lameter	 <cl@xxxxxxxxx>, Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>, Sam Creasey	 <sammy@xxxxxxxxx>, Huacai Chen <chenhuacai@xxxxxxxxxx>, Will Deacon	 <will@xxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Oreoluwa Babatunde <quic_obabatun@xxxxxxxxxxx>, rafael.j.wysocki@xxxxxxxxx, Palmer Dabbelt <palmer@xxxxxxxxxxxx>,  Hanjun Guo <guohanjun@xxxxxxxxxx>, Easwar Hariharan <eahariha@xxxxxxxxxxxxxxxxxxx>, Johannes Berg	 <johannes.berg@xxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Dave Hansen	 <dave.hansen@xxxxxxxxx>, Christian Brauner <brauner@xxxxxxxxxx>, KP Singh	 <kpsingh@xxxxxxxxxx>, Richard Henderson <richard.henderson@xxxxxxxxxx>, Matt Turner <mattst88@xxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, WANG Xuerui <kernel@xxxxxxxxxx>,  Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Stefan Kristiansson <stefan.kristiansson@xxxxxxxxxxxxx>, Stafford Horne	 <shorne@xxxxxxxxx>, Helge Deller <deller@xxxxxx>, Nicholas Piggin	 <npiggin@xxxxxxxxx>, Christophe Leroy <christophe.leroy@xxxxxxxxxx>, Naveen N Rao <naveen@xxxxxxxxxx>, Madhavan Srinivasan <maddy@xxxxxxxxxxxxx>, Geoff Levand	 <geoff@xxxxxxxxxxxxx>, Paul Walmsley <paul.walmsley@xxxxxxxxxx>, Palmer Dabbelt	 <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>, Andrey Ryabinin	 <ryabinin.a.a@xxxxxxxxx>, Alexander Potapenko <glider@xxxxxxxxxx>, Andrey Konovalov <andreyknvl@xxxxxxxxx>, Dmitry Vyukov <dvyukov@xxxxxxxxxx>, Vincenzo Frascino	 <vincenzo.frascino@xxxxxxx>, Heiko Carstens <hca@xxxxxxxxxxxxx>, Vasily Gorbik	 <gor@xxxxxxxxxxxxx>, Alexander Gordeev <agordeev@xxxxxxxxxxxxx>, Christian Borntraeger <borntraeger@xxxxxxxxxxxxx>, Sven Schnelle <svens@xxxxxxxxxxxxx>, Yoshinori Sato	 <ysato@xxxxxxxxxxxxxxxxxxxx>, Rich Felker <dalias@xxxxxxxx>, John Paul Adrian Glaubitz <glaubitz@xxxxxxxxxxxxxxxxxxx>, Andreas Larsson <andreas@xxxxxxxxxxx>, Richard Weinberger	 <richard@xxxxxx>, Anton Ivanov <anton.ivanov@xxxxxxxxxxxxxxxxxx>, Johannes Berg	 <johannes@xxxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar	 <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen	 <dave.hansen@xxxxxxxxxxxxxxx>, x86@xxxxxxxxxx, linux-alpha@xxxxxxxxxxxxxxx, 	linux-kernel@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, 	loongarch@xxxxxxxxxxxxxxx, linux-m68k@xxxxxxxxxxxxxxxxxxxx, 	linux-mips@xxxxxxxxxxxxxxx, linux-openrisc@xxxxxxxxxxxxxxx, 	linux-parisc@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, 	linux-riscv@xxxxxxxxxxxxxxxxxxx, kasan-dev@xxxxxxxxxxxxxxxx, 	linux-s390@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, 	linux-um@xxxxxxxxxxxxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx, 	xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-omap@xxxxxxxxxxxxxxx, 	linux-clk@xxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, 	linux-pm@xxxxxxxxxxxxxxx
 
- Delivery-date: Mon, 23 Dec 2024 14:39:34 +0000
 
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
 
 
 
On Mon, 2024-12-23 at 09:12 +0200, Mike Rapoport wrote:
> On Sun, Dec 22, 2024 at 07:15:37PM +0800, Guo Weikang wrote:
> > Before SLUB initialization, various subsystems used memblock_alloc to
> > allocate memory. In most cases, when memory allocation fails, an immediate
> > panic is required. To simplify this behavior and reduce repetitive checks,
> > introduce `memblock_alloc_or_panic`. This function ensures that memory
> > allocation failures result in a panic automatically, improving code
> > readability and consistency across subsystems that require this behavior.
> > 
> > Changelog:
> > ----------
> > v1: initial version
> > v2: add __memblock_alloc_or_panic support panic output caller
> > v3: panic output phys_addr_t use printk's %pap
> > v4: make __memblock_alloc_or_panic out-of-line, move to memblock.c
> > v6: Fix CI compile error
> > Links to CI: 
> > https://lore.kernel.org/oe-kbuild-all/202412221000.r1NzXJUO-lkp@xxxxxxxxx/
> > v6: Fix CI compile warinigs
> > Links to CI: 
> > https://lore.kernel.org/oe-kbuild-all/202412221259.JuGNAUCq-lkp@xxxxxxxxx/
> > v7: add chagelog and adjust function declaration alignment format
> > ----------
> > 
> > Signed-off-by: Guo Weikang <guoweikang.kernel@xxxxxxxxx>
> > Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> > Reviewed-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> > Reviewed-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
> > Acked-by: Xi Ruoyao <xry111@xxxxxxxxxxx>
> 
> If people commented on your patch it does not mean you should add
> Reviewed-by or Acked-by tags for them. Wait for explicit tags from the
> reviewers.
And:
 - Acked-by: indicates an agreement by another developer (often a
   maintainer of the relevant code) that the patch is appropriate for
   inclusion into the kernel. 
I'm not a maintainer so I even don't have the right to use Acked-by :).
-- 
Xi Ruoyao <xry111@xxxxxxxxxxx>
School of Aerospace Science and Technology, Xidian University
 
 
    
     |