Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp639628pxx; Wed, 28 Oct 2020 13:07:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBCeaazhc/eiASPSUg2vTfKnMekXKR1dk6gOI7ird+1DVTxKPGE9imdLr4WQ2qpNSJvrEe X-Received: by 2002:aa7:d550:: with SMTP id u16mr589376edr.147.1603915669167; Wed, 28 Oct 2020 13:07:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603915669; cv=none; d=google.com; s=arc-20160816; b=qQHuGegWS3PNtVxLdAh0UnoIGk2qVIav5OtAwm/VhmzxvnVIkQqMMsr6w73TjVqxKn kWWnysQ0wFPTvxMs3Iw1zYjH/ixdtM/Ve3Vt+NPCsYgJRvKs+WAAlb8ZJFcmKqRvin24 xKDehqZlYvHOjoBoJdHjcA78mugSsWYkfkdaEy/zyrqVpjmWsuhkoMhhB6za7TgBasfu hFpDauMFDTB1vJPykRK1b2trSGp16UjIDQMe8T7PdMxETutYO+OONq/8F1qPg7/HsQAA gLFXrrulMkRzdGRfH6f3xi/ooUzBDBCMZp8e237XMC4P40n/2029Q0cOMg44dj5ZOCI7 3ZSw== 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=aiO536AD0kVAcMS1nvBFWPaDHL/6Ip6VypBDRiSKR20=; b=hHicfSEfj6D0EIHJcfMF9IQ22Z2ZZKeGN0VX0qIC+SwB2Z/X9YoSrpo6CC3NTx/1uj G4Ujs6K+fcV5GUUwm9ovgw4385+EGd3z4UHuZ1GkoU8U1UZp87aj5XfiLsF5cfEYTrsY bWtn2hJFwoEYbuDWaDqmZBNEvE45eMhtzSWvDR5l8dzYE+tknOV2kXKkACwZkaqdMbhT EPi5phyxOyrTzm6+TY2cS3yd2+aPvRCyDQa+y54C5OOftQTdSyC8vXtv22odZW7H9b5c PJLTeuZJ+NgAq4kX/wW0zpWOEoqDi7qypQ9gFXwObG0GMgQdzVjlTjTAuTtXygllXfIm PaPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=lsGwBrEq; 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 r21si3290edo.519.2020.10.28.13.07.05; Wed, 28 Oct 2020 13:07:49 -0700 (PDT) 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=@atishpatra.org header.s=google header.b=lsGwBrEq; 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 S1828864AbgJ0Siu (ORCPT + 99 others); Tue, 27 Oct 2020 14:38:50 -0400 Received: from mail-il1-f194.google.com ([209.85.166.194]:43610 "EHLO mail-il1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1825136AbgJ0Sit (ORCPT ); Tue, 27 Oct 2020 14:38:49 -0400 Received: by mail-il1-f194.google.com with SMTP id k1so2416173ilc.10 for ; Tue, 27 Oct 2020 11:38:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atishpatra.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aiO536AD0kVAcMS1nvBFWPaDHL/6Ip6VypBDRiSKR20=; b=lsGwBrEqSVcHL0bMljNjO4ezVKGqSsp9nWInL3C63xb2PfozbnUf06FRu0AMl9ni6X Bi9suCGK1f45eXLCN2ax8a76eSQYpZ+3gat8/oUDfrXl7oO5VehKVW/4R62swqsE2nC7 6wLpJB1VbC61FOGxIN9T9QaT7uFKaaNdhinIM= 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=aiO536AD0kVAcMS1nvBFWPaDHL/6Ip6VypBDRiSKR20=; b=mhs+CBEkIvR0QynkvZz5IS2u9YixbLw1Vp39bndUH2Sr8cIHr07yseKyo8//KsN902 6DooJloWEYm8Gwvj0yGkX4KqMhkR5F99qD5Fib5IUg0/XxmwR0yuvYTVrH1QGdskFfNU XPD9ymynICaj0wxxpk3Y+NfO5dPBPFru2RPdcA9iBPrMaasqzUyeJ3Oeq4tevyrvFVjI kdtBd+2flVPqF5CnoPpArMGL43oinJb1dmS6bljs8UcwWXx1wbxgqkSY406uCo17zn7l ApSqCmSK/tTtlbN6QEVlm6p1AEOow0NXfkfVU9Q0zF5FFbiZAByoa+w/O1uPUom5DiK1 4hsQ== X-Gm-Message-State: AOAM532Qovdoam/GIHwaqqf/8/HbWs48ZdEWx/gTC+NxOl0PKwgFmn3t WdRTzPbpaz6BiUn4APSrogNz6hsTnr8RGqzpRZYN X-Received: by 2002:a92:6410:: with SMTP id y16mr3002898ilb.126.1603823927105; Tue, 27 Oct 2020 11:38:47 -0700 (PDT) MIME-Version: 1.0 References: <20201026230254.911912-1-atish.patra@wdc.com> <20201026230254.911912-3-atish.patra@wdc.com> <20201027100427.GL1154158@kernel.org> In-Reply-To: <20201027100427.GL1154158@kernel.org> From: Atish Patra Date: Tue, 27 Oct 2020 11:38:35 -0700 Message-ID: Subject: Re: [PATCH v2 2/6] RISC-V: Initialize SBI early To: Mike Rapoport Cc: Atish Patra , Albert Ou , Kees Cook , Anup Patel , "linux-kernel@vger.kernel.org List" , linux-riscv , Palmer Dabbelt , Zong Li , Paul Walmsley , Greentime Hu , Andrew Morton , Borislav Petkov , Michel Lespinasse , Ard Biesheuvel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 27, 2020 at 3:04 AM Mike Rapoport wrote: > > On Mon, Oct 26, 2020 at 04:02:50PM -0700, Atish Patra wrote: > > Currently, SBI is initialized towards the end of arch setup. This prevents > > the set memory operations to be invoked earlier as it requires a full tlb > > flush. > > > > Initialize SBI as early as possible. > > > > Signed-off-by: Atish Patra > > --- > > arch/riscv/kernel/setup.c | 7 +++---- > > 1 file changed, 3 insertions(+), 4 deletions(-) > > > > diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c > > index c424cc6dd833..7d6a04ae3929 100644 > > --- a/arch/riscv/kernel/setup.c > > +++ b/arch/riscv/kernel/setup.c > > @@ -89,6 +89,9 @@ void __init setup_arch(char **cmdline_p) > > pr_err("No DTB found in kernel mappings\n"); > > #endif > > > > +#if IS_ENABLED(CONFIG_RISCV_SBI) > > Maybe > if (IS_ENABLED(CONFIG_RISCV_SBI)) > sbi_init() > ok. Will update. > > + sbi_init(); > > +#endif > > #ifdef CONFIG_SWIOTLB > > swiotlb_init(1); > > #endif > > @@ -97,10 +100,6 @@ void __init setup_arch(char **cmdline_p) > > kasan_init(); > > #endif > > > > -#if IS_ENABLED(CONFIG_RISCV_SBI) > > - sbi_init(); > > -#endif > > - > > #ifdef CONFIG_SMP > > setup_smp(); > > #endif > > -- > > 2.25.1 > > > > -- > Sincerely yours, > Mike. > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv -- Regards, Atish