Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2394598ybe; Sat, 14 Sep 2019 14:08:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqxmwA0WA17GSWgNszfX4zRBKygmZD7HaHdRLgnvlYeHNrkTsfw0jKkWom3CPE7ArOXc084o X-Received: by 2002:a05:6402:1e2:: with SMTP id i2mr55631587edy.56.1568495307388; Sat, 14 Sep 2019 14:08:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568495307; cv=none; d=google.com; s=arc-20160816; b=KoKScQHVA7NRCDqkvTVes3ccv5UxkSGaRTgpeeLg7tnEzvALNJNqsRzpV/UiwMe1Un i2Tor/1GgonLL9SYySnMyXY6fRGka3rnbiPllo6GktRxdDfc/9nFD/zTQOeu+rKpVp6U QQeTix9YsSO7zlZXdhAlAr0LHhfNoKOFjqEgkmd9CZmh322OY17XIzpI6iWpAOcx/hTI Q4DG7SQIk10pzS5sP/7PPMV4jM3qavTiuG0ECNrlJwRTHLjmjui0n4klhj6q51MBVsaL 4YeKcl3Gtnvem19XoPiHjnIqD+EdCVLZyZidJCnqpxwVjIrtnUITakMZ+hiKLBpdMJ3C eIRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:organization:references:in-reply-to:date:cc:to:from :message-id; bh=TTXhglu3ks+YPqwKZX9Wly7zZLzXoU6p/75v5O+SpY8=; b=EH9R5BIiDi70t3xT27qL1ipWLif8h+buGVc4ZLeovpiwa1exk2rq4eaIcbTKae7b6d pzbrmweihjLQczkrXDvaGxdkJfTW9QTPHqOjP5Aj7GvgC85zjtWmFTaIQD6hvTll9zB9 7A7WYIyhd8Xsj7f+DkK2hlOS+6YSVPxYwogmLbWjPu/09LFbpAD3SE7WxZVVR9kb2gGJ eTSTbjI8MujEgN2gc4QzAXbt49R+B88o2bCM2v/Eo75XGMsM+BGjqQvYjZHfpR0Yr+PX 6RCTGePpGFEDDE0fbZCl0qCkQmp4pFMXrrL5rKO7woiM+hFUB0znDiDjDBgzkqXK8vDj e/qw== ARC-Authentication-Results: i=1; mx.google.com; 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 d3si16476942eja.30.2019.09.14.14.08.03; Sat, 14 Sep 2019 14:08:27 -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; 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 S2389471AbfINOhB (ORCPT + 99 others); Sat, 14 Sep 2019 10:37:01 -0400 Received: from baldur.buserror.net ([165.227.176.147]:58980 "EHLO baldur.buserror.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388491AbfINOhB (ORCPT ); Sat, 14 Sep 2019 10:37:01 -0400 Received: from [2601:449:8480:af0:12bf:48ff:fe84:c9a0] by baldur.buserror.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i998P-0001sT-6n; Sat, 14 Sep 2019 09:34:45 -0500 Message-ID: From: Scott Wood To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , galak@kernel.crashing.org Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Sat, 14 Sep 2019 09:34:44 -0500 In-Reply-To: <331759c1bcba5797d30f8eace74afb16ac5f3c36.1566564560.git.christophe.leroy@c-s.fr> References: <331759c1bcba5797d30f8eace74afb16ac5f3c36.1566564560.git.christophe.leroy@c-s.fr> Organization: Red Hat Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2601:449:8480:af0:12bf:48ff:fe84:c9a0 X-SA-Exim-Rcpt-To: christophe.leroy@c-s.fr, benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, galak@kernel.crashing.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org X-SA-Exim-Mail-From: oss@buserror.net X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on baldur.localdomain X-Spam-Level: X-Spam-Status: No, score=-16.0 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -15 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Subject: Re: [PATCH 2/2] powerpc/83xx: map IMMR with a BAT. X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on baldur.buserror.net) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2019-08-23 at 12:50 +0000, Christophe Leroy wrote: > On mpc83xx with a QE, IMMR is 2Mbytes. > On mpc83xx without a QE, IMMR is 1Mbytes. > Each driver will map a part of it to access the registers it needs. > Some driver will map the same part of IMMR as other drivers. > > In order to reduce TLB misses, map the full IMMR with a BAT. > > Signed-off-by: Christophe Leroy > --- > arch/powerpc/platforms/83xx/misc.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/arch/powerpc/platforms/83xx/misc.c > b/arch/powerpc/platforms/83xx/misc.c > index f46d7bf3b140..1e395b01c535 100644 > --- a/arch/powerpc/platforms/83xx/misc.c > +++ b/arch/powerpc/platforms/83xx/misc.c > @@ -18,6 +18,8 @@ > #include > #include > > +#include > + > #include "mpc83xx.h" > > static __be32 __iomem *restart_reg_base; > @@ -145,6 +147,14 @@ void __init mpc83xx_setup_arch(void) > if (ppc_md.progress) > ppc_md.progress("mpc83xx_setup_arch()", 0); > > + if (!__map_without_bats) { > + int immrsize = IS_ENABLED(CONFIG_QUICC_ENGINE) ? SZ_2M : > SZ_1M; Any reason not to unconditionally make it 2M? After all, the kernel being built with CONFIG_QUICC_ENGINE doesn't mean that the hardware you're running on has it... -Scott