From patchwork Wed Nov 28 19:36:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brendan Higgins X-Patchwork-Id: 1004806 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mQq9jS2G"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="Rb9/h0zV"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 434rYd5xnyz9s5c for ; Thu, 29 Nov 2018 06:38:45 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version :Message-Id:In-Reply-To:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BYSj71t2qEiyz6wAmJ4/WM/eo5TEdp4bmb/9MAU3APc=; b=mQq9jS2GkorlP1 mo82BUJa/n3lyxIil84WotboC+8NDhwc7rutrh8y3hzxCqbuFvd1jaYqoSKtP1jezgKaPRlBugE/a b7uXB0DmgjPr9ACvSg4Qi0hwZgbWYvPlORbY/X8jvvEpmmSeU1PrKglzxP360GH17wvDGeL7/qSar cvdGGhfij6jwDqouRbz2jPOAuX2sUE+TSmVZuLAmY6qiH8rmZAhMe7BGt8FCNR0/2avXBnT+iCf00 /CHosvuOSViLTNys+y2K02yIWB6kDGoEnK5y2t4rziH8j7/mun+/XEMK9lxmdKXp65s3YAqw4c4t6 t3EQ49SlSCre6ecuD8wg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS5fS-0003sY-Cl; Wed, 28 Nov 2018 19:38:38 +0000 Received: from mail-qt1-x849.google.com ([2607:f8b0:4864:20::849]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS5fP-0003lN-7P for linux-um@lists.infradead.org; Wed, 28 Nov 2018 19:38:36 +0000 Received: by mail-qt1-x849.google.com with SMTP id j5so24617324qtk.11 for ; Wed, 28 Nov 2018 11:38:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=ZXeVKB3z4xYEMo//ei2CNGIhvC0pSeK1m9ZjHQ2diMw=; b=Rb9/h0zVwkkHN++1m58koJGyJMM2Qj3zSthOhQpGBZZ/uJowc3xBQITml1f4/xyZJa B3DhIiwi2xrFoi7Lg1DCPrR7jql0Y5iiGW96UAdIv/l7a72tOaIu/2RUTYsVhdx+iX4R oQTLd2T63dQ5oa12uvSnjG9zKS1z6OdomrilynAIPtjXmcHqnpGxebSh6XpLGu/l3GAs ylLroOjj6q8fZ3fFnQzEjEyoaI8rLhh6rTtvDOqiMTzpL9bPKHMnD6jP9jkDdxo3USg+ v3DuICgLArR4aAaeTCE1kY5NXdiff1auhDnsM8/YzuuEHTJRs7rDohz5swcips2xZ6Ov CFTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=ZXeVKB3z4xYEMo//ei2CNGIhvC0pSeK1m9ZjHQ2diMw=; b=Q3pIEWZKLmhMTaA4FsiUA86j6EaLeAiIPKWojijy6pAznftxW1UkDo8WXLLpqb+Jrj pFdy+nKWqaPJKMZDPYBIzhZaHKjpRg1qxsgO8eHEV/pUEuh3dRTNqDFS0gJD7du98McU xumffCtWe39W6ywAUGU0WUhUrC50QgT0ZI47FUEYT90PKOnUSvls517/pPzGaqVStpVQ cTJpo6Krnt+pn3vNeS67//32XukBGI83GxqHXMN0l1mTpedExym226Y6hTOO6cMMB8IJ AiDn/FMDEplC43XszeKcmLEED4fYngvXmJrGdJlxRiqdE1x7WKZTtFqzOe79Eu78alsY DEog== X-Gm-Message-State: AA+aEWZxwZOqAwd+P1m1+6ZHa4aKBs/bsm3n5GHFCLXOqrmBST0GghwG Muq5so56wYKuPuoCb+rgXzoUDJz85VQ+cES/JXBGaA== X-Google-Smtp-Source: AFSGD/WNRv4uLe4qzapo7byn71/CSO8pn+dusHGBhoYU/dteolVxh/z9q17isRjU/4o3tgV/+62KxUnN0F0B3WRn+xp75A== X-Received: by 2002:a37:4916:: with SMTP id w22mr4361663qka.6.1543433903147; Wed, 28 Nov 2018 11:38:23 -0800 (PST) Date: Wed, 28 Nov 2018 11:36:33 -0800 In-Reply-To: <20181128193636.254378-1-brendanhiggins@google.com> Message-Id: <20181128193636.254378-17-brendanhiggins@google.com> Mime-Version: 1.0 References: <20181128193636.254378-1-brendanhiggins@google.com> X-Mailer: git-send-email 2.20.0.rc0.387.gc7a69e6b6c-goog Subject: [RFC v3 16/19] arch: um: make UML unflatten device tree when testing From: Brendan Higgins To: gregkh@linuxfoundation.org, keescook@google.com, mcgrof@kernel.org, shuah@kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_113835_401320_26137A84 X-CRM114-Status: UNSURE ( 6.11 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.7 (-------) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-7.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:849 listed in] [list.dnswl.org] -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 DKIMWL_WL_MED DKIMwl.org - Whitelisted Medium sender X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: brakmo@fb.com, jdike@addtoit.com, dri-devel@lists.freedesktop.org, linux-kselftest@vger.kernel.org, frowand.list@gmail.com, robh@kernel.org, linux-nvdimm@lists.01.org, richard@nod.at, knut.omang@oracle.com, kieran.bingham@ideasonboard.com, joel@jms.id.au, khilman@baylibre.com, Brendan Higgins , Tim.Bird@sony.com, linux-um@lists.infradead.org, rostedt@goodmis.org, julia.lawall@lip6.fr, dan.j.williams@intel.com, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, daniel@ffwll.ch, mpe@ellerman.id.au, joe@perches.com Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Make UML unflatten any present device trees when running KUnit tests. Signed-off-by: Brendan Higgins --- arch/um/kernel/um_arch.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index a818ccef30ca2..bd58ae3bf4148 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -347,6 +348,9 @@ void __init setup_arch(char **cmdline_p) read_initrd(); paging_init(); +#if IS_ENABLED(CONFIG_OF_UNITTEST) + unflatten_device_tree(); +#endif strlcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); *cmdline_p = command_line; setup_hostinfo(host_info, sizeof host_info);