Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp261457pxb; Fri, 15 Jan 2021 12:21:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJymCHqSxrak7NLGX6PkBhwD1eQHrV2nKQ7cHPeVfOXeTJyQ7V3I2A8ffBQslXmH9fLuS1G7 X-Received: by 2002:aa7:c5ce:: with SMTP id h14mr11571101eds.188.1610742088042; Fri, 15 Jan 2021 12:21:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610742088; cv=none; d=google.com; s=arc-20160816; b=QtOJNBGMkv7CmDn8VQdG40hrYzyP8v48qNNDCAtXZlAdxL7sUcpP6TjKTQbAucrNze DrSwb5iu4k8RHkdoWQVsWWSmGJmdvYxBGYKIWhZQVBx8/WmUDmyaEcK/PlCG1MNVhrBu x/+xYoaNRirTREsiMX6pQXCZp5rUkjVVTqhM0clzt466IONC5rjLfzencJlV/JMtlVTj oeT+9xebDXhPIUB0IQYtmyHDTskDmrVOoG9F5pmsJP+mptpEzANh2edURd1pUp84Pvef bfllPR1ic9UHlq7FGFNBrleVhNfdIfvnrreUQoNrvUl/6niM9CB8xemCatVB8SETdZr/ SEJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=/lXuX9PxuZr7jes4v8nsbSed/V3MsPCYQunP39iMdnM=; b=PJW4bb4kPQ761OehQU+rmd1lx0psxRhCgny3jGUbXAl0Gjs3RST/VE7UFUIzBXn5wo 0GxaWgG7s8MFi6e1WDNC7IfNBmzZ7kjKpsU6tAx75pKEUjCNFK7ArNcsV2J+c0Ass8qX IoaH2Vg/GIUijUsDF+b/QfM2U8TU7NlTIuoBLZ8n3ud10Ri3XRFlJjBSIsJ3+xNcHq+/ du1YZKJbuiDiNX/fD8CRHG3eX85qvl5sQcLz+L7OrUb1m3cY9+lVIz4jPcaUdMv752iu dDR3mCMjcvBmptly60q7JdeRUBifJE4QgPh8uWmP2Obhag0ZauLtkqo7FqOm/n6iWnoa Bglg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@konsulko.com header.s=google header.b=FmYu7KPb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m5si5168763edb.242.2021.01.15.12.21.04; Fri, 15 Jan 2021 12:21:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@konsulko.com header.s=google header.b=FmYu7KPb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733221AbhAOUTs (ORCPT + 99 others); Fri, 15 Jan 2021 15:19:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726467AbhAOUTr (ORCPT ); Fri, 15 Jan 2021 15:19:47 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38FDAC061757 for ; Fri, 15 Jan 2021 12:19:07 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id o17so15017928lfg.4 for ; Fri, 15 Jan 2021 12:19:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/lXuX9PxuZr7jes4v8nsbSed/V3MsPCYQunP39iMdnM=; b=FmYu7KPbAA69KmSy9fXY/thRSVm89ZtlB6vNVfgTyH66ccxPJlx4C0kTFfHpJ6X8fZ V79j50FUDHC+a272jMFCbxYGqJPf3LwWChtwxczeyg6q4tRrzEnPdObWUWCEmt5WrU9f YJLTFShJbYZ1MU6KgKGzdLzpdUDRYT05Amnf8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/lXuX9PxuZr7jes4v8nsbSed/V3MsPCYQunP39iMdnM=; b=tk9cW5iL70UsckgrcxO7hBMz5aNzxulM5UxuLdvl1+kp8xui3rKFclTu9p1njWu7Bn AfOa7RiKXkseFYz7DxeaVEDHQuCCCF6VqJcx+wWXf+b6fIeefQigDZ8iClAkC/8EBcvw 5B0BEU2N4BdYGsCGhfqmohyALw2hXPHitag4Ss2vdX/L3rpi6ws9e+4uE9MVM36qrC6Z 8LS9K3crUXvrLsUrnbexnrwPPaWi//Y47uC2HMIcj2xGsKkayjmT9y45Oi7+qnw1o8AD fGNbtb+z5E9DfnvKP2XDFUw57RV0iOx0DRxiX2uyQvyqaoLkUFZBNLfNVdcS/2hIomBK fvEw== X-Gm-Message-State: AOAM530C61TzZcGaOXhWST1esVu7/80iVQbAL8fetw1Xx7yOL9TnV449 0UXaIAg1UgnH15br1YTiENknUKbMLTRjYJEhhuawBw== X-Received: by 2002:a19:4196:: with SMTP id o144mr6741722lfa.342.1610741945649; Fri, 15 Jan 2021 12:19:05 -0800 (PST) MIME-Version: 1.0 References: <20210111212031.2422-1-vitaly.wool@konsulko.com> In-Reply-To: From: Vitaly Wool Date: Fri, 15 Jan 2021 21:18:54 +0100 Message-ID: Subject: Re: [PATCH] RISC-V: simplify BUILTIN_DTB processing To: Anup Patel Cc: linux-riscv , "linux-kernel@vger.kernel.org List" , Palmer Dabbelt , Damien Le Moal , devicetree@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 15, 2021 at 11:43 AM Anup Patel wrote: > > On Fri, Jan 15, 2021 at 3:18 PM Vitaly Wool wrote: > > > > > > > > On Fri, 15 Jan 2021, 10:39 Anup Patel, wrote: > >> > >> On Tue, Jan 12, 2021 at 2:51 AM Vitaly Wool wrote: > >> > > >> > Provide __dtb_start as a parameter to setup_vm() in case > >> > CONFIG_BUILTIN_DTB is true, so we don't have to duplicate > >> > BUILTIN_DTB specific processing in MMU-enabled and MMU-disabled > >> > versions of setup_vm(). > >> > > >> > Signed-off-by: Vitaly Wool > >> > --- > >> > arch/riscv/kernel/head.S | 4 ++++ > >> > arch/riscv/mm/init.c | 4 ---- > >> > 2 files changed, 4 insertions(+), 4 deletions(-) > >> > > >> > diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S > >> > index 16e9941900c4..f5a9bad86e58 100644 > >> > --- a/arch/riscv/kernel/head.S > >> > +++ b/arch/riscv/kernel/head.S > >> > @@ -260,7 +260,11 @@ clear_bss_done: > >> > > >> > /* Initialize page tables and relocate to virtual addresses */ > >> > la sp, init_thread_union + THREAD_SIZE > >> > +#ifdef CONFIG_BUILTIN_DTB > >> > + la a0, __dtb_start > >> > +#else > >> > mv a0, s1 > >> > +#endif /* CONFIG_BUILTIN_DTB */ > >> > call setup_vm > >> > #ifdef CONFIG_MMU > >> > la a0, early_pg_dir > >> > diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c > >> > index 5b17f8d22f91..45faad7c4291 100644 > >> > --- a/arch/riscv/mm/init.c > >> > +++ b/arch/riscv/mm/init.c > >> > @@ -615,11 +615,7 @@ static void __init setup_vm_final(void) > >> > #else > >> > asmlinkage void __init setup_vm(uintptr_t dtb_pa) > >> > { > >> > -#ifdef CONFIG_BUILTIN_DTB > >> > - dtb_early_va = (void *) __dtb_start; > >> > -#else > >> > dtb_early_va = (void *)dtb_pa; > >> > -#endif > >> > dtb_early_pa = dtb_pa; > >> > } > >> > > >> > -- > >> > 2.20.1 > >> > > >> > >> We can avoid the early DTB mapping for MMU-enabled case when > >> BUILTIN_DTB is enabled (same as previous discussion). Otherwise > >> looks good to me. > > > > > > Right, but I had already submitted the patch which takes care of that, and you have reviewed it too IIRC :) > > Ahh, I assumed this patch is based on latest stable Linux-5.11-rcX. > > Either you can create a series with two patches OR you can squash this patch > into your previous patch. Fair enough, I'll come up with a new (aggregate) one. Best regards, Vitaly