Received: by 10.213.65.68 with SMTP id h4csp684577imn; Sun, 25 Mar 2018 10:19:29 -0700 (PDT) X-Google-Smtp-Source: AG47ELvpvoEIDPAuChtvkWZ1oLpG8ymnzPeQzbmmC3Lq1LYjKR3CIIHAl37gwY7tcHp7EB2hMgGT X-Received: by 10.98.245.7 with SMTP id n7mr13408618pfh.164.1521998368925; Sun, 25 Mar 2018 10:19:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521998368; cv=none; d=google.com; s=arc-20160816; b=zIiY+LQEPbTUFGQ02HqW0KJup7d+sTL17us26dHdxsSKWqqsnle81/nnVdHZhlhL0m YlGFfqwOZCO+W8CIfrYmzahBtnxqv8GTxbqruvIDW/VhI5hFPTahYtOitZAopH6qDCAP K/B5ZscjB9VUE6QqNpZVHE3H0smVyrCkzHcY14G0I4fBDjvet+RwpqNQkxR8IHulVfcZ XJztBgurdAtNzGtsKBvpwAIaq+qvz5I2sqsy0XcDC41IhxkQxmDT7Ls6jImbOhSCfT+1 uQ3tEoJCqRCkZXd716czbzKqFzdzrUhdb1vAIYYixu2awgWqC3r//D3d6pwcF0Xxgg2B Mhzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-disposition:mime-version:user-agent:in-reply-to:references :subject:cc:to:from:message-id:date:arc-authentication-results; bh=WfPbBJHMKU7Ju94gyU2mBoKNOlymoF1XK9BTAhMpzcM=; b=IBstS3xGZuJ9CDm/bi8lUCyunajFNbyQTKelyJqFYd6bscvKVUpBt1K7Ewf7MnRDRH FSwAx+MeNYhDE7qbkmEq6Oe2cEcbu7ewOzgLkVpCJ3B5y5cXePmoq8wrfT3m5aMIKhUH TAwDCdrVK89KP1pNUH/qR4V6Swpivhok3AfmcV5SxpaNguXW3YVb7SEZKPRRRaNcA1PJ EvugCxAJ7WBPzlfy/7ihaKF4zQk/0VxhgO4gq3g6YBSxojgcSNSNUsqYGK5xcQolfMOf ThqnoiZg+U/BV6/0EoXOSUBYpiT5beSM8Ol2AQnIhh+3D5l0BTTKk3v/KKIVDo+BFNyU Bdgg== 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 x12-v6si13465998plw.169.2018.03.25.10.19.11; Sun, 25 Mar 2018 10:19:28 -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 S1753842AbeCYRR4 convert rfc822-to-8bit (ORCPT + 99 others); Sun, 25 Mar 2018 13:17:56 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:52231 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753729AbeCYRRw (ORCPT ); Sun, 25 Mar 2018 13:17:52 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 408P965hNxz9ttKj; Sun, 25 Mar 2018 19:17:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id DC3n19D98ku0; Sun, 25 Mar 2018 19:17:30 +0200 (CEST) Received: from vm-hermes.si.c-s.fr (vm-hermes.si.c-s.fr [192.168.25.253]) by pegase1.c-s.fr (Postfix) with ESMTP id 408P964F6yz9ttBl; Sun, 25 Mar 2018 19:17:30 +0200 (CEST) Received: by vm-hermes.si.c-s.fr (Postfix, from userid 33) id C7A33564; Sun, 25 Mar 2018 19:17:40 +0200 (CEST) Received: from 37.173.209.158 ([37.173.209.158]) by messagerie.si.c-s.fr (Horde Framework) with HTTP; Sun, 25 Mar 2018 19:17:40 +0200 Date: Sun, 25 Mar 2018 19:17:40 +0200 Message-ID: <20180325191740.Horde.Cymi0yr0xcQQV1s42wkNkg2@messagerie.si.c-s.fr> From: LEROY Christophe To: Shea Levy Cc: user-mode-linux-devel@lists.sourceforge.net, linux-sh@vger.kernel.org, linux-riscv@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-parisc@vger.kernel.org, openrisc@lists.librecores.org, nios2-dev@lists.rocketboards.org, linux-m68k@lists.linux-m68k.org, uclinux-h8-devel@lists.sourceforge.jp, linux-c6x-dev@linux-c6x.org, linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org Subject: Re: [PATCH 01/16] initrd: Add generic code path for common initrd unloading logic. References: <20180324174458.26423-1-shea@shealevy.com> <20180324174458.26423-2-shea@shealevy.com> In-Reply-To: <20180324174458.26423-2-shea@shealevy.com> User-Agent: Internet Messaging Program (IMP) H5 (6.2.3) Content-Type: text/plain; charset=UTF-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Shea Levy a écrit : > 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..de5ce873eb5a 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 free_initrd_mem(unsigned long start, unsigned long end) > +{ > + free_reserved_area((void *)start, (void *)end, -1, "initrd"); > +} > +#endif In powerpc this was an __init function. Why not also put the generic one in __init section ? Christophe > + > 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