From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 071D718A6DB for ; Fri, 28 Aug 2026 05:57:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787896673; cv=none; b=Nl9FaF9gfAVBwEb/LWm//nOh1Vias/LdmniABGMeSIitlAwhxA8Bdzel9JXMONRac74ZltNUQoTt4eoVnRz5qKRmo0TD1L6UvfndxqptQGoBDoT0U18AndFebJl8nBu2Dyv8KSxj5XnOMMntWd8Ngs887B0ZE9wumohMk6nRtc0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787896673; c=relaxed/simple; bh=JgvFmjlUYlrVu1Rns6x2Tkgnq+VE1flv3knyYeswyMU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Hm+unjM9ImYbRBNScim16z9cr+kWBeV/FXcnNI/K0ZJ4dPVcfa4ZkyHLvXsn7cebZ7BulEcVxdeaFg9y5FYeXYkDNOKVMz3meeY4z4QWp/28ycGfmTGabTuPEMgivBrouexug1pXn6SrxLNTnYBB+EiSuPBu9vG7s4L7fTg89e8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=RGC7QzhE; arc=none smtp.client-ip=148.163.158.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="RGC7QzhE" Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67S23MbU680449; Fri, 28 Aug 2026 05:57:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pp1; bh=/kRYcn 5KBaaxx9SfWmgmLOHBEE085yrBIcMYY/T9Zsc=; b=RGC7QzhECywBOnuVavtCZB Oxl6un0bCqU7IbkbX8n6nIKtyQe65/N51Ne14JTIXhk/Nnxd9Rxy3WayaPHJMmZg xLIlI2gijD67KJr10Jm4cWXA/pq6aq4vNCCh2/Nzdf6aRiYlS2y/gVD/UL+t+XJq Az/2mszsoIzBTOjWBBoy475E4P2O9vnJYoDF+fefgiLiigib14npV5uXYdpmkTTH 5elUpSKqCx00IFlpyelQ3pETR/T1ao3gPhMfW4Of7mJ9bSxJHHmayl5auxZlQFt9 yv1Mg+qMngyPlutWdwAVrF6Y5cVtutZRIFBQmuMuxjRxGmUOtZmEfd82c6T+f50Q == Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4g73dxsxwf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Aug 2026 05:57:42 +0000 (GMT) Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.18.1.7/8.18.1.7) with ESMTP id 67S5uLMi025216; Fri, 28 Aug 2026 05:57:41 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 4g7ragvejf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Aug 2026 05:57:41 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 67S5vdBn42205498 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 Aug 2026 05:57:39 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6E5612004B; Fri, 28 Aug 2026 05:57:39 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2E7A520040; Fri, 28 Aug 2026 05:57:37 +0000 (GMT) Received: from [9.123.14.142] (unknown [9.123.14.142]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Fri, 28 Aug 2026 05:57:36 +0000 (GMT) Message-ID: Date: Fri, 28 Aug 2026 11:27:36 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] kexec_file: remove unused arch_kexec_locate_mem_hole hook To: Baoquan He Cc: linux-kernel@vger.kernel.org, Albert Ou , Andrew Morton , Mike Rapoport , Palmer Dabbelt , Pasha Tatashin , Paul Walmsley , Pratyush Yadav , linux-riscv@lists.infradead.org, kexec@lists.infradead.org References: <20260827144452.508328-1-sourabhjain@linux.ibm.com> Content-Language: en-US From: Sourabh Jain In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-Spam-Info: AW1haW4tMjYwODI4MDA0NSBTYWx0ZWRfXwNpKBmYAQx12 y1r0xMqhBsWqDayxqQLUAPfMLSLo36s4fFb36W9fX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Mig+PC2fHxH LUV2MbTGUUmzwQYOZ/i74AImcIDkvHMzVzP+EuBnRtJvpyOH8Wlfoew9i2SR09m1wXc3pH4yRAK CBAPhyr+LPCVz+oFicw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-28_01,2026-08-27_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 phishscore=0 clxscore=1015 adultscore=0 bulkscore=0 impostorscore=0 priorityscore=1501 lowpriorityscore=0 spamscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608280045 On 28/08/26 07:40, Baoquan He wrote: > On 08/27/26 at 08:14pm, Sourabh Jain wrote: >> No architecture provides an implementation of >> arch_kexec_locate_mem_hole(). Use kexec_locate_mem_hole() directly >> and remove the unused fallback wrapper from the kexec header. > Since below commit, the last user was gone: > commit 6e5250eaa665f ("powerpc/crash: use generic APIs to locate memory hole for kdump") > > Acked-by: Baoquan He Thanks for the Ack, Baoquan. - Sourabh Jain > >> This simplifies the kexec memory allocation path without changing >> its behavior. >> >> Cc: Albert Ou >> Cc: Andrew Morton >> Cc: Baoquan He >> Cc: Mike Rapoport >> Cc: Palmer Dabbelt >> Cc: Pasha Tatashin >> Cc: Paul Walmsley >> Cc: Pratyush Yadav >> Cc: linux-riscv@lists.infradead.org >> Cc: kexec@lists.infradead.org >> Signed-off-by: Sourabh Jain >> --- >> arch/riscv/kernel/kexec_elf.c | 2 +- >> include/linux/kexec.h | 15 --------------- >> kernel/kexec_file.c | 2 +- >> 3 files changed, 2 insertions(+), 17 deletions(-) >> >> diff --git a/arch/riscv/kernel/kexec_elf.c b/arch/riscv/kernel/kexec_elf.c >> index 3e9a32acb8f2..ca5abbad59e5 100644 >> --- a/arch/riscv/kernel/kexec_elf.c >> +++ b/arch/riscv/kernel/kexec_elf.c >> @@ -91,7 +91,7 @@ static int elf_find_pbase(struct kimage *image, unsigned long kernel_len, >> kbuf.memsz = ALIGN(kernel_len, PAGE_SIZE); >> kbuf.cma = NULL; >> kbuf.top_down = false; >> - ret = arch_kexec_locate_mem_hole(&kbuf); >> + ret = kexec_locate_mem_hole(&kbuf); >> if (!ret) { >> *old_pbase = lowest_paddr; >> *new_pbase = kbuf.mem; >> diff --git a/include/linux/kexec.h b/include/linux/kexec.h >> index 0af8ae4fdd08..e5f1cfc11fef 100644 >> --- a/include/linux/kexec.h >> +++ b/include/linux/kexec.h >> @@ -259,21 +259,6 @@ int kexec_kernel_verify_pe_sig(const char *kernel, unsigned long kernel_len); >> extern int kexec_add_buffer(struct kexec_buf *kbuf); >> int kexec_locate_mem_hole(struct kexec_buf *kbuf); >> >> -#ifndef arch_kexec_locate_mem_hole >> -/** >> - * arch_kexec_locate_mem_hole - Find free memory to place the segments. >> - * @kbuf: Parameters for the memory search. >> - * >> - * On success, kbuf->mem will have the start address of the memory region found. >> - * >> - * Return: 0 on success, negative errno on error. >> - */ >> -static inline int arch_kexec_locate_mem_hole(struct kexec_buf *kbuf) >> -{ >> - return kexec_locate_mem_hole(kbuf); >> -} >> -#endif >> - >> #ifndef arch_kexec_apply_relocations_add >> /* >> * arch_kexec_apply_relocations_add - apply relocations of type RELA >> diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c >> index 59fb9d71e9d8..9a981359addd 100644 >> --- a/kernel/kexec_file.c >> +++ b/kernel/kexec_file.c >> @@ -784,7 +784,7 @@ int kexec_add_buffer(struct kexec_buf *kbuf) >> kbuf->cma = NULL; >> >> /* Walk the RAM ranges and allocate a suitable range for the buffer */ >> - ret = arch_kexec_locate_mem_hole(kbuf); >> + ret = kexec_locate_mem_hole(kbuf); >> if (ret) >> return ret; >> >> -- >> 2.55.0 >>