Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2215676/?format=api
{ "id": 2215676, "url": "http://patchwork.ozlabs.org/api/patches/2215676/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260325025904.2811960-6-ruanjinjie@huawei.com/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api", "name": "Linux PPC development", "link_name": "linuxppc-dev", "list_id": "linuxppc-dev.lists.ozlabs.org", "list_email": "linuxppc-dev@lists.ozlabs.org", "web_url": "https://github.com/linuxppc/wiki/wiki", "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git", "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/", "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/", "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}" }, "msgid": "<20260325025904.2811960-6-ruanjinjie@huawei.com>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20260325025904.2811960-6-ruanjinjie@huawei.com/", "date": "2026-03-25T02:59:01", "name": "[v10,5/8] crash: Use crash_exclude_core_ranges() on powerpc", "commit_ref": null, "pull_url": null, "state": "handled-elsewhere", "archived": false, "hash": "8e03482d615fd4d2346f3e575ca494d539b282b7", "submitter": { "id": 84791, "url": "http://patchwork.ozlabs.org/api/people/84791/?format=api", "name": "Jinjie Ruan", "email": "ruanjinjie@huawei.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260325025904.2811960-6-ruanjinjie@huawei.com/mbox/", "series": [ { "id": 497378, "url": "http://patchwork.ozlabs.org/api/series/497378/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=497378", "date": "2026-03-25T02:58:56", "name": "[v10,1/8] riscv: kexec_file: Fix crashk_low_res not exclude bug", "version": 10, "mbox": "http://patchwork.ozlabs.org/series/497378/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2215676/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2215676/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linuxppc-dev+bounces-18754-incoming=patchwork.ozlabs.org@lists.ozlabs.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linuxppc-dev@lists.ozlabs.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=huawei.com header.i=@huawei.com header.a=rsa-sha256\n header.s=dkim header.b=qwMocirh;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev+bounces-18754-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)", "lists.ozlabs.org;\n arc=none smtp.remote-ip=113.46.200.227", "lists.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=huawei.com", "lists.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=huawei.com header.i=@huawei.com header.a=rsa-sha256\n header.s=dkim header.b=qwMocirh;\n\tdkim-atps=neutral", "lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=huawei.com\n (client-ip=113.46.200.227; helo=canpmsgout12.his.huawei.com;\n envelope-from=ruanjinjie@huawei.com; receiver=lists.ozlabs.org)" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org\n [IPv6:2404:9400:21b9:f100::1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fgWn31vwqz1y1G\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 25 Mar 2026 13:58:15 +1100 (AEDT)", "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4fgWmR73Gmz301X;\n\tWed, 25 Mar 2026 13:57:43 +1100 (AEDT)", "from canpmsgout12.his.huawei.com (canpmsgout12.his.huawei.com\n [113.46.200.227])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 4fgWmQ6s1zz300F\n\tfor <linuxppc-dev@lists.ozlabs.org>; Wed, 25 Mar 2026 13:57:42 +1100 (AEDT)", "from mail.maildlp.com (unknown [172.19.163.200])\n\tby canpmsgout12.his.huawei.com (SkyGuard) with ESMTPS id 4fgWf41gzzznTWc;\n\tWed, 25 Mar 2026 10:52:12 +0800 (CST)", "from dggpemf500011.china.huawei.com (unknown [7.185.36.131])\n\tby mail.maildlp.com (Postfix) with ESMTPS id 097D94055B;\n\tWed, 25 Mar 2026 10:57:40 +0800 (CST)", "from huawei.com (10.90.53.73) by dggpemf500011.china.huawei.com\n (7.185.36.131) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 25 Mar\n 2026 10:57:36 +0800" ], "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1774407463;\n\tcv=none;\n b=aY2AKnTTap/7x2jPGwlVKCJ9gtaCGi1423mqPDSV17gpXWhzZ1LWjmglyaoa+wwlrL48+6enblqtB62GRv89IHAtq33loRCyV1ulnS8RqNw4wPyGcFCfBpH4b+wPlz5ZCYRfCAIADn3GM9eG3+X/LwRGG3P2Gz97L0+oIlejUTzTuefwU5x4zqClyADmPNlbZtgAcd0U5CWriyAlcRRr7KxojFTnLSmyt2Xpa+UbSW4Ls4Rbkp1dv7Oe2ZRtFlCLi7LEl8PgNSQjDbPH+BUuTt9rEWrFPn9KHWBHEUjS07nRrkTJmV6ksIQZ4lYPzIMVmB6vkp8pwFvtMLkPs9P4HQ==", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1774407463; c=relaxed/relaxed;\n\tbh=Ebteczkk5kbZsg2+9vzUFg/0NoNIOGUrhFMDnELcrPk=;\n\th=From:To:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=YQNpEUaDL/kgYRT3yzXxM9CwNPWXEaUzKZ2aQ11nRslKuA0B7XMzFV+Rfy8N8rLViRkjf8+uA9m/HhsmYiRkqDePC80/oyIOZGyH8bvfsGaJE9Tt/X89ntaqcIpu/XfQdgCcDKXL15IWxC20mGgeS+v3tdgCoAcDn5RqLNqxqtXP31RapRtTz4rbxCvw4XyC+limGhqQtDmurPcExoLdDPtBl0bZTM5NhCkKB8i8s1GnhdPVhQcRhbTey0wAqnJOM5qGWApYN4xAb4kEH7m15tRGf9eEZ/yqg0jo56BXR2YPFZeqJC8nIxZtbGwSlu2JCSQ3vfdt2D1bjfvlBzvAGg==", "ARC-Authentication-Results": "i=1; lists.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=huawei.com;\n dkim=pass (1024-bit key;\n unprotected) header.d=huawei.com header.i=@huawei.com header.a=rsa-sha256\n header.s=dkim header.b=qwMocirh; dkim-atps=neutral;\n spf=pass (client-ip=113.46.200.227; helo=canpmsgout12.his.huawei.com;\n envelope-from=ruanjinjie@huawei.com;\n receiver=lists.ozlabs.org) smtp.mailfrom=huawei.com", "dkim-signature": "v=1; a=rsa-sha256; d=huawei.com; s=dkim;\n\tc=relaxed/relaxed; q=dns/txt;\n\th=From;\n\tbh=Ebteczkk5kbZsg2+9vzUFg/0NoNIOGUrhFMDnELcrPk=;\n\tb=qwMocirhWPXDEjC//a8+dhZPXdg8YO8ASf/5rn8oQX7mvey7/t+fIPEntFqTl1V+nihOg59jH\n\t1k7TOA9iLOO4RXjqkBJ6C2MInAn+QOuyOjGsiEbVgSGHX8OqtBq5UxbFsgQ5o0vCfX1AeevJDCU\n\t66pZu/lCmC8qNFixGnquk0Y=", "From": "Jinjie Ruan <ruanjinjie@huawei.com>", "To": "<corbet@lwn.net>, <skhan@linuxfoundation.org>, <catalin.marinas@arm.com>,\n\t<will@kernel.org>, <chenhuacai@kernel.org>, <kernel@xen0n.name>,\n\t<maddy@linux.ibm.com>, <mpe@ellerman.id.au>, <npiggin@gmail.com>,\n\t<chleroy@kernel.org>, <pjw@kernel.org>, <palmer@dabbelt.com>,\n\t<aou@eecs.berkeley.edu>, <alex@ghiti.fr>, <tglx@kernel.org>,\n\t<mingo@redhat.com>, <bp@alien8.de>, <dave.hansen@linux.intel.com>,\n\t<hpa@zytor.com>, <robh@kernel.org>, <saravanak@kernel.org>,\n\t<akpm@linux-foundation.org>, <bhe@redhat.com>, <vgoyal@redhat.com>,\n\t<dyoung@redhat.com>, <rdunlap@infradead.org>, <peterz@infradead.org>,\n\t<pawan.kumar.gupta@linux.intel.com>, <feng.tang@linux.alibaba.com>,\n\t<dapeng1.mi@linux.intel.com>, <kees@kernel.org>, <elver@google.com>,\n\t<paulmck@kernel.org>, <lirongqing@baidu.com>, <ruanjinjie@huawei.com>,\n\t<rppt@kernel.org>, <ardb@kernel.org>, <leitao@debian.org>, <osandov@fb.com>,\n\t<cfsworks@gmail.com>, <tangyouling@kylinos.cn>, <sourabhjain@linux.ibm.com>,\n\t<ritesh.list@gmail.com>, <eajames@linux.ibm.com>,\n\t<songshuaishuai@tinylab.org>, <kevin.brodsky@arm.com>,\n\t<samuel.holland@sifive.com>, <vishal.moola@gmail.com>,\n\t<junhui.liu@pigmoral.tech>, <coxu@redhat.com>, <liaoyuanhong@vivo.com>,\n\t<jbohac@suse.cz>, <fuqiang.wang@easystack.cn>, <guoren@kernel.org>,\n\t<chenjiahao16@huawei.com>, <hbathini@linux.ibm.com>, <james.morse@arm.com>,\n\t<takahiro.akashi@linaro.org>, <lizhengyu3@huawei.com>, <x86@kernel.org>,\n\t<linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,\n\t<linux-arm-kernel@lists.infradead.org>, <loongarch@lists.linux.dev>,\n\t<linuxppc-dev@lists.ozlabs.org>, <linux-riscv@lists.infradead.org>,\n\t<devicetree@vger.kernel.org>, <kexec@lists.infradead.org>", "Subject": "[PATCH v10 5/8] crash: Use crash_exclude_core_ranges() on powerpc", "Date": "Wed, 25 Mar 2026 10:59:01 +0800", "Message-ID": "<20260325025904.2811960-6-ruanjinjie@huawei.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20260325025904.2811960-1-ruanjinjie@huawei.com>", "References": "<20260325025904.2811960-1-ruanjinjie@huawei.com>", "X-Mailing-List": "linuxppc-dev@lists.ozlabs.org", "List-Id": "<linuxppc-dev.lists.ozlabs.org>", "List-Help": "<mailto:linuxppc-dev+help@lists.ozlabs.org>", "List-Owner": "<mailto:linuxppc-dev+owner@lists.ozlabs.org>", "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>", "List-Archive": "<https://lore.kernel.org/linuxppc-dev/>,\n <https://lists.ozlabs.org/pipermail/linuxppc-dev/>", "List-Subscribe": "<mailto:linuxppc-dev+subscribe@lists.ozlabs.org>,\n <mailto:linuxppc-dev+subscribe-digest@lists.ozlabs.org>,\n <mailto:linuxppc-dev+subscribe-nomail@lists.ozlabs.org>", "List-Unsubscribe": "<mailto:linuxppc-dev+unsubscribe@lists.ozlabs.org>", "Precedence": "list", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Originating-IP": "[10.90.53.73]", "X-ClientProxiedBy": "kwepems100001.china.huawei.com (7.221.188.238) To\n dggpemf500011.china.huawei.com (7.185.36.131)", "X-Spam-Status": "No, score=-0.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tDKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS\n\tautolearn=disabled version=4.0.1 OzLabs 8", "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org" }, "content": "The crash memory exclude of crashk_res and crashk_cma memory on powerpc\nare almost identical to the generic crash_exclude_core_ranges().\n\nBy introducing the architecture-specific arch_crash_exclude_mem_range()\nfunction with a default implementation of crash_exclude_mem_range(),\nand using crash_exclude_mem_range_guarded as powerpc's separate\nimplementation, the generic crash_exclude_core_ranges() helper function\ncan be reused.\n\nAcked-by: Baoquan He <bhe@redhat.com>\nReviewed-by: Sourabh Jain <sourabhjain@linux.ibm.com>\nAcked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>\nSigned-off-by: Jinjie Ruan <ruanjinjie@huawei.com>\n---\n arch/powerpc/include/asm/kexec_ranges.h | 3 ---\n arch/powerpc/kexec/crash.c | 2 +-\n arch/powerpc/kexec/ranges.c | 16 ++++------------\n include/linux/crash_core.h | 4 ++++\n kernel/crash_core.c | 19 +++++++++++++------\n 5 files changed, 22 insertions(+), 22 deletions(-)", "diff": "diff --git a/arch/powerpc/include/asm/kexec_ranges.h b/arch/powerpc/include/asm/kexec_ranges.h\nindex ad95e3792d10..8489e844b447 100644\n--- a/arch/powerpc/include/asm/kexec_ranges.h\n+++ b/arch/powerpc/include/asm/kexec_ranges.h\n@@ -7,9 +7,6 @@\n void sort_memory_ranges(struct crash_mem *mrngs, bool merge);\n struct crash_mem *realloc_mem_ranges(struct crash_mem **mem_ranges);\n int add_mem_range(struct crash_mem **mem_ranges, u64 base, u64 size);\n-int crash_exclude_mem_range_guarded(struct crash_mem **mem_ranges,\n-\t\t\t\t unsigned long long mstart,\n-\t\t\t\t unsigned long long mend);\n int get_exclude_memory_ranges(struct crash_mem **mem_ranges);\n int get_reserved_memory_ranges(struct crash_mem **mem_ranges);\n int get_crash_memory_ranges(struct crash_mem **mem_ranges);\ndiff --git a/arch/powerpc/kexec/crash.c b/arch/powerpc/kexec/crash.c\nindex 1426d2099bad..52992309e28c 100644\n--- a/arch/powerpc/kexec/crash.c\n+++ b/arch/powerpc/kexec/crash.c\n@@ -451,7 +451,7 @@ static void update_crash_elfcorehdr(struct kimage *image, struct memory_notify *\n \t\tbase_addr = PFN_PHYS(mn->start_pfn);\n \t\tsize = mn->nr_pages * PAGE_SIZE;\n \t\tend = base_addr + size - 1;\n-\t\tret = crash_exclude_mem_range_guarded(&cmem, base_addr, end);\n+\t\tret = arch_crash_exclude_mem_range(&cmem, base_addr, end);\n \t\tif (ret) {\n \t\t\tpr_err(\"Failed to remove hot-unplugged memory from crash memory ranges\\n\");\n \t\t\tgoto out;\ndiff --git a/arch/powerpc/kexec/ranges.c b/arch/powerpc/kexec/ranges.c\nindex 6c58bcc3e130..e5fea23b191b 100644\n--- a/arch/powerpc/kexec/ranges.c\n+++ b/arch/powerpc/kexec/ranges.c\n@@ -553,9 +553,9 @@ int get_usable_memory_ranges(struct crash_mem **mem_ranges)\n #endif /* CONFIG_KEXEC_FILE */\n \n #ifdef CONFIG_CRASH_DUMP\n-int crash_exclude_mem_range_guarded(struct crash_mem **mem_ranges,\n-\t\t\t\t\t unsigned long long mstart,\n-\t\t\t\t\t unsigned long long mend)\n+int arch_crash_exclude_mem_range(struct crash_mem **mem_ranges,\n+\t\t\t\t unsigned long long mstart,\n+\t\t\t\t unsigned long long mend)\n {\n \tstruct crash_mem *tmem = *mem_ranges;\n \n@@ -604,18 +604,10 @@ int get_crash_memory_ranges(struct crash_mem **mem_ranges)\n \t\t\tsort_memory_ranges(*mem_ranges, true);\n \t}\n \n-\t/* Exclude crashkernel region */\n-\tret = crash_exclude_mem_range_guarded(mem_ranges, crashk_res.start, crashk_res.end);\n+\tret = crash_exclude_core_ranges(mem_ranges);\n \tif (ret)\n \t\tgoto out;\n \n-\tfor (i = 0; i < crashk_cma_cnt; ++i) {\n-\t\tret = crash_exclude_mem_range_guarded(mem_ranges, crashk_cma_ranges[i].start,\n-\t\t\t\t\t crashk_cma_ranges[i].end);\n-\t\tif (ret)\n-\t\t\tgoto out;\n-\t}\n-\n \t/*\n \t * FIXME: For now, stay in parity with kexec-tools but if RTAS/OPAL\n \t * regions are exported to save their context at the time of\ndiff --git a/include/linux/crash_core.h b/include/linux/crash_core.h\nindex 033b20204aca..dbec826dc53b 100644\n--- a/include/linux/crash_core.h\n+++ b/include/linux/crash_core.h\n@@ -68,6 +68,7 @@ extern int crash_prepare_elf64_headers(struct crash_mem *mem, int need_kernel_ma\n \t\t\t\t void **addr, unsigned long *sz);\n extern int crash_prepare_headers(int need_kernel_map, void **addr,\n \t\t\t\t unsigned long *sz, unsigned long *nr_mem_ranges);\n+extern int crash_exclude_core_ranges(struct crash_mem **cmem);\n \n struct kimage;\n struct kexec_segment;\n@@ -88,6 +89,9 @@ extern int kimage_crash_copy_vmcoreinfo(struct kimage *image);\n extern unsigned int arch_get_system_nr_ranges(void);\n extern int arch_crash_populate_cmem(struct crash_mem *cmem);\n extern int arch_crash_exclude_ranges(struct crash_mem *cmem);\n+extern int arch_crash_exclude_mem_range(struct crash_mem **mem,\n+\t\t\t\t\tunsigned long long mstart,\n+\t\t\t\t\tunsigned long long mend);\n \n #else /* !CONFIG_CRASH_DUMP*/\n struct pt_regs;\ndiff --git a/kernel/crash_core.c b/kernel/crash_core.c\nindex 96a96e511f5a..300d44ad5471 100644\n--- a/kernel/crash_core.c\n+++ b/kernel/crash_core.c\n@@ -287,24 +287,31 @@ unsigned int __weak arch_get_system_nr_ranges(void) { return 0; }\n int __weak arch_crash_populate_cmem(struct crash_mem *cmem) { return -1; }\n int __weak arch_crash_exclude_ranges(struct crash_mem *cmem) { return 0; }\n \n-static int crash_exclude_core_ranges(struct crash_mem *cmem)\n+int __weak arch_crash_exclude_mem_range(struct crash_mem **mem,\n+\t\t\t\t\tunsigned long long mstart,\n+\t\t\t\t\tunsigned long long mend)\n+{\n+\treturn crash_exclude_mem_range(*mem, mstart, mend);\n+}\n+\n+int crash_exclude_core_ranges(struct crash_mem **cmem)\n {\n \tint ret, i;\n \n \t/* Exclude crashkernel region */\n-\tret = crash_exclude_mem_range(cmem, crashk_res.start, crashk_res.end);\n+\tret = arch_crash_exclude_mem_range(cmem, crashk_res.start, crashk_res.end);\n \tif (ret)\n \t\treturn ret;\n \n \tif (crashk_low_res.end) {\n-\t\tret = crash_exclude_mem_range(cmem, crashk_low_res.start, crashk_low_res.end);\n+\t\tret = arch_crash_exclude_mem_range(cmem, crashk_low_res.start, crashk_low_res.end);\n \t\tif (ret)\n \t\t\treturn ret;\n \t}\n \n \tfor (i = 0; i < crashk_cma_cnt; ++i) {\n-\t\tret = crash_exclude_mem_range(cmem, crashk_cma_ranges[i].start,\n-\t\t\t\t\t crashk_cma_ranges[i].end);\n+\t\tret = arch_crash_exclude_mem_range(cmem, crashk_cma_ranges[i].start,\n+\t\t\t\t\t\t crashk_cma_ranges[i].end);\n \t\tif (ret)\n \t\t\treturn ret;\n \t}\n@@ -331,7 +338,7 @@ int crash_prepare_headers(int need_kernel_map, void **addr, unsigned long *sz,\n \tif (ret)\n \t\tgoto out;\n \n-\tret = crash_exclude_core_ranges(cmem);\n+\tret = crash_exclude_core_ranges(&cmem);\n \tif (ret)\n \t\tgoto out;\n \n", "prefixes": [ "v10", "5/8" ] }