Received: by 10.213.65.68 with SMTP id h4csp843898imn; Sun, 25 Mar 2018 15:27:18 -0700 (PDT) X-Google-Smtp-Source: AG47ELsgD6lZ0SYtZso7ZLv875PGAIb1eJuIkZ3mPJGez6F6JhT71Ty0zQK/b0z4Mr1AzhB7DiKn X-Received: by 2002:a17:902:770f:: with SMTP id n15-v6mr23149502pll.92.1522016838072; Sun, 25 Mar 2018 15:27:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522016838; cv=none; d=google.com; s=arc-20160816; b=R1Y8xmlGL8f1AOFvV4MMN5RnK2hpNmniH6+RI8cPglWNUi5V16B8xrAM2ZyYgfencO QbV8581yU08PMHhq9FeiBjS+nZPo7smY+6TXjFYCl1wyHTooszQZyDOwjiThgkCK13PX TAOFnNIHvEHe/E1Fv/1t2e6j6FvXGeK8/fidCZb3qJ9pLwiTMSM/cLQnYk7I/qFbQH65 hrcwg/8Wbhvq9n+7U0FyM/GfMVVFW/KVFnWCudOTnJBBRb8KRj7+Fb5SqBmvV0xBYAQQ FCCPpj77AbDr98jM4unDOGwM9Xb9M07O/OizBeM/xnqVx9/bqwJ9qAtjaDpawq/dZw9J G6Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=w80FkPvgxojXJhtUD6RIk80r3d9LqlonZMDCwpaKSLQ=; b=WTQxtdt8PkSIKK+6aNwdU3U6fI2NjekTFojIiWoARbTNdFkgrYCEUg3kJOjurB7xBm NPhj7EIAKVj8J0+d8DyGspn4YJ3I9Vr0PydDn9cNyoU8+jlfQeGHggTzpJUjlJTVIqNc cfYOT42yDttC0+9CeUVcs5ne0YAxjDebCBwKSn9dKOmyFQjKvSLlm21ZUWHt6XV4HhTp e3FQuiwaHHN+YPN/A9c1uRcnOrwpWyM9hIHW7BGKqLj/85O6muYMEtfQn5qfqxjODN+Q GiAzTljrImvbWG0R/52fQQIPgGv1B0YMZ87CLqHWNGhBOsoi6iakVTe3/7D1Mv/PnqYT 0DOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c23-v6si13595705pli.143.2018.03.25.15.27.04; Sun, 25 Mar 2018 15:27:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752627AbeCYWZu (ORCPT + 99 others); Sun, 25 Mar 2018 18:25:50 -0400 Received: from smtprelay0249.hostedemail.com ([216.40.44.249]:34402 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752084AbeCYWTE (ORCPT ); Sun, 25 Mar 2018 18:19:04 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id D85C0100E86C3; Sun, 25 Mar 2018 22:19:03 +0000 (UTC) X-Session-Marker: 7368656140736865616C6576792E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,,:::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:800:960:966:973:988:989:1260:1345:1359:1437:1534:1541:1711:1730:1747:1777:1792:1978:1981:2194:2196:2199:2200:2393:2559:2562:3138:3139:3140:3141:3142:3352:3876:3877:4321:4385:4605:5007:6114:6261:6642:6737:10004:10848:11026:11473:11658:11914:12043:12048:12296:12438:12533:12555:12895:12986:13069:13255:13311:13357:14096:14181:14384:14394:14721:21080:21451:21627:30012:30054,0,RBL:71.235.10.46:@shealevy.com:.lbl8.mailshell.net-62.4.0.191 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ff,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:21,LUA_SUMMARY:none X-HE-Tag: walk92_31e9e257fef21 X-Filterd-Recvd-Size: 2167 Received: from localhost (c-71-235-10-46.hsd1.nh.comcast.net [71.235.10.46]) (Authenticated sender: shea@shealevy.com) by omf08.hostedemail.com (Postfix) with ESMTPA; Sun, 25 Mar 2018 22:19:02 +0000 (UTC) From: Shea Levy To: linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-c6x-dev@linux-c6x.org, uclinux-h8-devel@lists.sourceforge.jp, linux-m68k@lists.linux-m68k.org, nios2-dev@lists.rocketboards.org, openrisc@lists.librecores.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, user-mode-linux-devel@lists.sourceforge.net Cc: Shea Levy Subject: [PATCH v2 01/16] initrd: Add generic code path for common initrd unloading logic. Date: Sun, 25 Mar 2018 18:18:38 -0400 Message-Id: <20180325221853.10839-2-shea@shealevy.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180325221853.10839-1-shea@shealevy.com> References: <20180324174458.26423-1-shea@shealevy.com> <20180325221853.10839-1-shea@shealevy.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Shea Levy --- init/initramfs.c | 7 +++++++ usr/Kconfig | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/init/initramfs.c b/init/initramfs.c index 7e99a0038942..5f2e3dba4822 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -526,6 +526,13 @@ extern unsigned long __initramfs_size; #include #include +#ifdef CONFIG_INITRAMFS_GENERIC_UNLOAD +void __init free_initrd_mem(unsigned long start, unsigned long end) +{ + free_reserved_area((void *)start, (void *)end, -1, "initrd"); +} +#endif + static void __init free_initrd(void) { #ifdef CONFIG_KEXEC_CORE diff --git a/usr/Kconfig b/usr/Kconfig index 43658b8a975e..fd79d4d6fa26 100644 --- a/usr/Kconfig +++ b/usr/Kconfig @@ -233,3 +233,7 @@ config INITRAMFS_COMPRESSION default ".lzma" if RD_LZMA default ".bz2" if RD_BZIP2 default "" + +# Arches can select this for a generic initrd unloading codepath +config INITRAMFS_GENERIC_UNLOAD + bool -- 2.16.2