From patchwork Wed Dec 22 13:08:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen (ThunderTown)" X-Patchwork-Id: 12697097 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 79D7AC433FE for ; Wed, 22 Dec 2021 13:19:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=W9Aa/5qRg3FFlAYSWdaqV2jSOMwDBeivcbEgYkGTXs4=; b=XwI2wbOJJnkUx9 AfhYxoQlYWDdDczbRQZjrPmjKhJ3sfOxtpsterempZ6FVdIoQ/5Bcsy9tuXmzt4xQ+HyZ2AuRZ+IP /ce8ac7Qq1kNXhTIXZPjGm+aEE3SHvlo9GwIV0DJS52GQAjbeDCC9duOIpTdoQjyfr54QU1U6qZbS 5JFm14SQVfBYiasd/zoQIcF4JeiIWiJ98lDQQ10exQQL1SF5VhZZKljf9B8tfZ6rjQPJucdvJZvnS RqOAJoUF9OUkvWsNS+T+61OdM+nmgjpNI5RXmegYg9cRAuho0N18vAOiuWPrnYpHuvYkwTjI9lBHa UgNtX5m8i9qnmCdR3GjA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n01VQ-00ASMm-9y; Wed, 22 Dec 2021 13:18:08 +0000 Received: from szxga03-in.huawei.com ([45.249.212.189]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n01Pz-00APJV-PV; Wed, 22 Dec 2021 13:12:35 +0000 Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4JJtwK2yMTz8w1g; Wed, 22 Dec 2021 21:10:09 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggpemm500020.china.huawei.com (7.185.36.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 22 Dec 2021 21:12:29 +0800 Received: from thunder-town.china.huawei.com (10.174.178.55) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 22 Dec 2021 21:12:28 +0800 From: Zhen Lei To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , , "H . Peter Anvin" , , Dave Young , Baoquan He , Vivek Goyal , Eric Biederman , , Catalin Marinas , "Will Deacon" , , Rob Herring , Frank Rowand , , Jonathan Corbet , CC: Zhen Lei , Randy Dunlap , Feng Zhou , Kefeng Wang , Chen Zhou , "John Donnelly" Subject: [PATCH v18 11/17] kdump: Make parse_crashkernel_{high|low} static Date: Wed, 22 Dec 2021 21:08:14 +0800 Message-ID: <20211222130820.1754-12-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 In-Reply-To: <20211222130820.1754-1-thunder.leizhen@huawei.com> References: <20211222130820.1754-1-thunder.leizhen@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.174.178.55] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211222_051232_231723_D3EFC78E X-CRM114-Status: GOOD ( 10.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Currently, parse_crashkernel_{high|low} is only referenced by parse_crashkernel_in_order(), and they are in the same file. So make it static, and move it into "#ifdef CONFIG_ARCH_WANT_RESERVE_CRASH_KERNEL". Signed-off-by: Zhen Lei --- include/linux/crash_core.h | 4 ---- kernel/crash_core.c | 19 ++++++++++--------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/include/linux/crash_core.h b/include/linux/crash_core.h index de62a722431e7db..529a0a783190bfe 100644 --- a/include/linux/crash_core.h +++ b/include/linux/crash_core.h @@ -79,9 +79,5 @@ void final_note(Elf_Word *buf); int __init parse_crashkernel(char *cmdline, unsigned long long system_ram, unsigned long long *crash_size, unsigned long long *crash_base); -int parse_crashkernel_high(char *cmdline, unsigned long long system_ram, - unsigned long long *crash_size, unsigned long long *crash_base); -int parse_crashkernel_low(char *cmdline, unsigned long long system_ram, - unsigned long long *crash_size, unsigned long long *crash_base); #endif /* LINUX_CRASH_CORE_H */ diff --git a/kernel/crash_core.c b/kernel/crash_core.c index 496dae2718cf026..a037076b89a9bb2 100644 --- a/kernel/crash_core.c +++ b/kernel/crash_core.c @@ -279,7 +279,15 @@ int __init parse_crashkernel(char *cmdline, return __parse_crashkernel(cmdline, system_ram, crash_size, crash_base, SUFFIX_NULL); } -int __init parse_crashkernel_high(char *cmdline, + +/* + * --------- Crashkernel reservation ------------------------------ + */ + +#ifdef CONFIG_ARCH_WANT_RESERVE_CRASH_KERNEL + +#ifdef CONFIG_64BIT +static int __init parse_crashkernel_high(char *cmdline, unsigned long long system_ram, unsigned long long *crash_size, unsigned long long *crash_base) @@ -287,7 +295,7 @@ int __init parse_crashkernel_high(char *cmdline, return __parse_crashkernel(cmdline, system_ram, crash_size, crash_base, SUFFIX_HIGH); } -int __init parse_crashkernel_low(char *cmdline, +static int __init parse_crashkernel_low(char *cmdline, unsigned long long system_ram, unsigned long long *crash_size, unsigned long long *crash_base) @@ -295,13 +303,6 @@ int __init parse_crashkernel_low(char *cmdline, return __parse_crashkernel(cmdline, system_ram, crash_size, crash_base, SUFFIX_LOW); } -/* - * --------- Crashkernel reservation ------------------------------ - */ - -#ifdef CONFIG_ARCH_WANT_RESERVE_CRASH_KERNEL - -#ifdef CONFIG_64BIT static int __init reserve_crashkernel_low(unsigned long long low_size) { unsigned long long low_base = 0;