Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3999987imj; Tue, 19 Feb 2019 13:21:38 -0800 (PST) X-Google-Smtp-Source: AHgI3IYhEnctXVeTfmF83Qm1QbkOAoTOZBvohKZf/6uQj6/IPlJs8pPpzK1C3tKBcOSBTRLjAljy X-Received: by 2002:a62:2ad1:: with SMTP id q200mr13696485pfq.34.1550611298098; Tue, 19 Feb 2019 13:21:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550611298; cv=none; d=google.com; s=arc-20160816; b=kSfJ5m0t9Hu94fMf5FMql8flo0yOjMWexWMcJsHqJd8h0wMQ+qPCb9DPXuMp+qGx4K xlTM5NL/D7ca095DcMJSwAJn19k76nMcXNJQpIbveeRiu2mgec90qYQmaYlWZaJKNr19 6+gAjL5eFuJk42saQnJNbJwlWO/IzulTjsHOV0fIDkoYTGFVWCm3WlhXAIVxr+9RID92 glhZZwDITAc4rGK9p1GrWmRxSVckp6V1Qd0sAuML3dQ3eoEU/CyRhPR2F5S7NF46TCmC BIBu5sm3fmXhzacFaT7TO8Utf+RSGVOcwVLXlfB7VPiyJqu0Tbe++YangyIXLgH3/W1y FJ3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:date:from:dkim-signature; bh=Jptp2DMnM9R9mZf8xSzHhprhLDojJ3jWWa553UuANw4=; b=oGu6HSNU77OCuw/XSNOUlO2M4twM3WlwmMYGBXFWqfZ0/EXQLqSYoLS+OarmYh4GN+ lUSpOITU0abbPSPoZUMgMdTPVRAWm1izyl/XIj7BcoDJ0Deydv6bRrqxWDz682fyztIa cTGDG68NM9UCsKblXkvBJ17SKE3jOCXP47GxTengc19X9q7jJ/dZ5Ijfn5oMFplnHuFf NqYSBXDcEnOQctXWoTlV4CsPTSg2n84sLf3gEnDQcOOpoyKKKWEj3YGCe7kQTlQCRlwE wFTfZwsUMHlC91wY14AK0ZWoiuJZ3Mx/sk86KwTwT61tbSG9FMRC82/wUG4p8Rbqj6YU x1xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=OXAp+2Um; 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 189si15247506pgb.412.2019.02.19.13.21.22; Tue, 19 Feb 2019 13:21:38 -0800 (PST) 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=@sifive.com header.s=google header.b=OXAp+2Um; 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 S1729585AbfBSVTf (ORCPT + 99 others); Tue, 19 Feb 2019 16:19:35 -0500 Received: from mail-it1-f193.google.com ([209.85.166.193]:53532 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726610AbfBSVTe (ORCPT ); Tue, 19 Feb 2019 16:19:34 -0500 Received: by mail-it1-f193.google.com with SMTP id x131so9737874itc.3 for ; Tue, 19 Feb 2019 13:19:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=Jptp2DMnM9R9mZf8xSzHhprhLDojJ3jWWa553UuANw4=; b=OXAp+2UmKNqR97vYIWT1aCEPHKti+fcrOUK00Ui6v8+eFSX1s1qzPDxnAFHI1lrnMj Sx1g2bvnTySRGMBuK2PooXNboRg871Yp4vQS8W0N02PhQjRGyepYM3/gJxQLwPpvvVfE H+A0GWzgLUOhoW0224vV4++MP3af2Bwq4MFkwlXw5+Hcy1lG+z5o2nlEQKEgeKPN4Tr7 DY93Rm13zAxoEBUFoV6LoSq3pC1ouQwLTHutW3Xo8/nxrDqjGUULOu4+6BB8Cm435WGc vKfvV2CIapnYQ1TyX9szOt29WAYsrIbF9O+SmgIc72ZFe0CV0gplKfaESlHTxaq3Y0Lq 7H4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=Jptp2DMnM9R9mZf8xSzHhprhLDojJ3jWWa553UuANw4=; b=O1ZQL/XgBr1W0LGFEfT+OFwCip6FIZiXKoAveZkgDJQMezVB0go/B3Xjgy5c99SAdm OZsiNMrMB4KpzTMMzkVQ5junzOI7+LQPItpwFhuRAj1CjMy9TLpcWf6TG9NU58sjlhED FIXfSP1xyMNlr5f7Fcf/23pTpuE8Ht2esew908p6PM8mX2M1eAJBluhRSb0EcGwQkYm5 m0aZ3qx1qGTgaX1YFx9BQbXGF6p8uIuqIsutPVChsdKqBsfnMqfChJAwDX9z02MIZFnj IQyht+eoveWLL/nExD5kf80fxn8RDGYGHlDG361xzOgx//y/NwQ+WiJW3VxdRRNmQ3e7 c5Ug== X-Gm-Message-State: AHQUAuZ/gRg1MyiIo/vCr5llrNYIRGmkx03SpB1Arp5NpT9EpvOsuyO3 UjGY9DYNb7u67qLJ7Ukufmhq/w== X-Received: by 2002:a24:118e:: with SMTP id 136mr3158334itf.175.1550611173937; Tue, 19 Feb 2019 13:19:33 -0800 (PST) Received: from localhost (c-73-95-159-87.hsd1.co.comcast.net. [73.95.159.87]) by smtp.gmail.com with ESMTPSA id x23sm7664181ion.38.2019.02.19.13.19.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Feb 2019 13:19:33 -0800 (PST) From: Paul Walmsley X-Google-Original-From: Paul Walmsley Date: Tue, 19 Feb 2019 13:19:32 -0800 (PST) To: Andreas Schwab cc: Paul Walmsley , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, paul@pwsan.com, palmer@sifive.com, aou@eecs.berkeley.edu Subject: Re: [PATCH] arch: riscv: support kernel command line forcing when no DTB passed In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21.9999 (DEB 301 2018-08-15) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 5 Feb 2019, Andreas Schwab wrote: > On Dez 17 2018, Paul Walmsley wrote: > > > diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c > > index 2c290e6aaa6e..e6b962ff39b1 100644 > > --- a/arch/riscv/kernel/setup.c > > +++ b/arch/riscv/kernel/setup.c > > @@ -171,7 +171,14 @@ asmlinkage void __init setup_vm(void) > > > > void __init parse_dtb(unsigned int hartid, void *dtb) > > { > > - early_init_dt_scan(__va(dtb)); > > + if (!early_init_dt_scan(__va(dtb))) > > + return; > > + > > + pr_err("No DTB passed to the kernel\n"); > > Isn't that backwards? early_init_dt_scan returns true if it found a > DTB. Yes, it's backwards. Thanks for the catch. Looks like I sent an older version of the patch. - Paul