From patchwork Fri Oct 6 02:45:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 115018 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp1270306qgn; Thu, 5 Oct 2017 19:46:00 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDz8BgYHPKUtHbn8SMrye7USnLw7IZJEnOKtZ3jYDWxAqd/XB8rlUCOGYXOlccKurt9dn8d X-Received: by 10.159.206.134 with SMTP id bg6mr604338plb.273.1507257959998; Thu, 05 Oct 2017 19:45:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507257959; cv=none; d=google.com; s=arc-20160816; b=nDv7elXMt7QVtixmi61NC6kvkDvLppT3ImGSx2dqY43mG1dq++fdJGMEfO6ufTYqgO +JOVg99PNNAJr81NHoblpN8IPjhZlOZ1QwoQjlPJeGubNxdfr/aS8ElzEPYQm5stYziy PLeQHFKd/Q04mnaGfniKwQC2RlteBdE6MkVDPTPzvaZEsioVR//5Ae4Ih/HH+7Et4CTL lXwV4R0GBiOQt2MpVjkFvBJsMlZ/fHjB9kNi0HbdQNfdpD2mNDVJTaEQW5R+LQ1CLVxG wA6nxmfsh1hyuWbqfw7f3Jkl61oDvKnDa+IB7cPp2u0d5TcPgLBKJXKkzWd5hykwYOYX zUvg== 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:dkim-signature:arc-authentication-results; bh=vQq6HgG2FkLYF9vt5KJBPtbzwngLGnbD/fyWZ6cncgk=; b=bp+8u6Z+Lmd+bM2kCezEpUQip3yGoa2OSQU35PE1PhiWigCIozBLLIXo//X7L3i1h0 lYG4kVpKOL57K5MN+/0YSK7OxildG1zDz75e8k5Wq0C4YX7c+FKhfx4mChjPPwkYPnvM nB4QZRI4St/hipEfD5iMW5/JMsK+Oi2PSdcvfOzrh206nooCEY5JPeMsQCyo9Cx0n8f0 xrE1pyYFQtM0HoTT6R+UuTaLl2omoDkbU+qVY3l9rVnYHqoG7CAz0XyM836cGzL5M8sm +vNLhX8NiVuDQv8E2rCrKt0NAd5wZEP6KLkQtqnrdy5nz1VpFVP2SSZYrbbPax4XfDv8 ncDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pobox.com header.s=sasl header.b=gT8h7kvi; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w128si358323pfw.112.2017.10.05.19.45.59; Thu, 05 Oct 2017 19:45:59 -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; dkim=pass header.i=@pobox.com header.s=sasl header.b=gT8h7kvi; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751841AbdJFCpn (ORCPT + 26 others); Thu, 5 Oct 2017 22:45:43 -0400 Received: from pb-smtp2.pobox.com ([64.147.108.71]:50495 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751470AbdJFCpj (ORCPT ); Thu, 5 Oct 2017 22:45:39 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id E6073A7F7C; Thu, 5 Oct 2017 22:45:38 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id:in-reply-to:references; s=sasl; bh=pul/ bqJBGIDrZnZxuDK2tIvPQU0=; b=gT8h7kviZcWjSbxcGM6c7BdzfNvHu61EUjHE 5ef9A6nWaBW/klv//sNvRJzVGj+zUGmmFQUOCYQ6xeu4p9Ond8VyvpTW1H6gc7zE TFacCrW7uVpp1ahXGPge/+0nvYRUY0E4OK87LRl6SWf+D8mZoVvsFiKRONDCx47j Qk7yuno= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id DDE04A7F7B; Thu, 5 Oct 2017 22:45:38 -0400 (EDT) Received: from yoda.home (unknown [137.175.234.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 6D2FFA7F7A; Thu, 5 Oct 2017 22:45:38 -0400 (EDT) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id 98C792DA05E2; Thu, 5 Oct 2017 22:45:37 -0400 (EDT) From: Nicolas Pitre To: Alexander Viro , Christoph Hellwig Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-embedded@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Brandt Subject: [PATCH v5 2/5] cramfs: make cramfs_physmem usable as root fs Date: Thu, 5 Oct 2017 22:45:28 -0400 Message-Id: <20171006024531.8885-3-nicolas.pitre@linaro.org> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20171006024531.8885-1-nicolas.pitre@linaro.org> References: <20171006024531.8885-1-nicolas.pitre@linaro.org> X-Pobox-Relay-ID: 6F932068-AA40-11E7-AFEE-575F0C78B957-78420484!pb-smtp2.pobox.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Nicolas Pitre Tested-by: Chris Brandt --- init/do_mounts.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.9.5 diff --git a/init/do_mounts.c b/init/do_mounts.c index c2de5104aa..43b5817f60 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -556,6 +556,14 @@ void __init prepare_namespace(void) ssleep(root_delay); } + if (IS_ENABLED(CONFIG_CRAMFS_PHYSMEM) && root_fs_names && + !strcmp(root_fs_names, "cramfs_physmem")) { + int err = do_mount_root("cramfs", "cramfs_physmem", + root_mountflags, root_mount_data); + if (!err) + goto out; + } + /* * wait for the known devices to complete their probing *