Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2488993ybe; Sat, 14 Sep 2019 16:26:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwfUaSq4GWAsDdcQWPUoCis5CZ9gdy/wdL57IB9eh4q6Ab2xDSXtZcK88fTMo8g/qPj7IbR X-Received: by 2002:a50:884c:: with SMTP id c12mr54314818edc.134.1568503616982; Sat, 14 Sep 2019 16:26:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568503616; cv=none; d=google.com; s=arc-20160816; b=kFC14JVDhfxUxchIz1xxJsWe3FCjfK6Wrgv63o4nUdabhlMcuIBl11cpzAFTaTwNON LJUfN3BXBFWyh+gyir7S/Ytb7Os/+MWz+UCyUinYnSL6wDtiyZD5jvLzyj3oh1uDhQhp dV0W6eb7GV6/ShFkdIGqm5yU0s07EHYA0afzwZ1qCxD7kYi1JJ6gnQz1/9y42XkSXyRg IFZbEp7EUT6BMmhgPu9R4AEIabiGnTpr0+MFvDL3l6X5Rh+zxmlnTvYN8n/9cfpyq0uX SWVJ11qdaoxkVaoBBMoBG/N2DcSw6rCgRWfbsOfNL9j8yfuPzLJlOBXBSsM5kkdT5AKO G1OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=LWujgpcYct92yuUDaXEeUAyD2wFvAtFvepKoZtQnzKI=; b=D/Y+IsF2YlRWyQvNngr5+ep/XOCJF6LoNgtS4Tj2Dqliz0oksRtvDRUOI1BStP0yvc jSZLcvYicqEaZTD2IpEyf7X6Vxb4g2cXiCvzrn7qY+95dTUa+LOn++HzymP/HapTVkWY R0B/CUucIOBVGljxJAV8sY+8c39K48//+sCo2OXVq7m9HxePAOQwha3K3o7Hy1+9eRxV OltmgC4/Fo2FFgPCIsD/UXbS+Ptd7U37hHp/P1O507a1HXHOjQ+HFM3Y622rA7ePXW1D aGpmtsCqO2v/IZTsVyIlO3APVlRMwrrul9TiW6NZHPaTyxw1wPe30EKTWl5SRvGaBaDL W8Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=h6zRP2Ck; 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 z20si13623677edq.250.2019.09.14.16.25.58; Sat, 14 Sep 2019 16:26:56 -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; dkim=pass header.i=@c-s.fr header.s=mail header.b=h6zRP2Ck; 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 S1727714AbfINQvR (ORCPT + 99 others); Sat, 14 Sep 2019 12:51:17 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:17011 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725805AbfINQvR (ORCPT ); Sat, 14 Sep 2019 12:51:17 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 46Vz6T5ggMz9tycq; Sat, 14 Sep 2019 18:51:13 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=h6zRP2Ck; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id XHDQc381JH2O; Sat, 14 Sep 2019 18:51:13 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 46Vz6T4ZRyz9tycp; Sat, 14 Sep 2019 18:51:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1568479873; bh=LWujgpcYct92yuUDaXEeUAyD2wFvAtFvepKoZtQnzKI=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=h6zRP2CkSx1dpu3chBbomnZh98BnpdMH1DKk++Q7zW7HWQxtVHU7WcR+u5U3s/e/w XlaFmz0dW+i+BoTxvHsUGm742A6pFuaZph4mjvWhYifQ6FCMt74XyUa824uaJEvpJM q0/sFYtJt/1a2PMh7xZGxnRjFtCvd4luYASDiVHQ= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 507C58B80B; Sat, 14 Sep 2019 18:51:15 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id BOzyotLb7U4A; Sat, 14 Sep 2019 18:51:15 +0200 (CEST) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 681C88B756; Sat, 14 Sep 2019 18:51:14 +0200 (CEST) Subject: Re: [PATCH 2/2] powerpc/83xx: map IMMR with a BAT. To: Scott Wood , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , galak@kernel.crashing.org Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org References: <331759c1bcba5797d30f8eace74afb16ac5f3c36.1566564560.git.christophe.leroy@c-s.fr> From: Christophe Leroy Message-ID: Date: Sat, 14 Sep 2019 18:51:14 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 14/09/2019 à 16:34, Scott Wood a écrit : > 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... > Euh .. ok. I didn't see it that way, but you are right. Do you think it is not a problem to map 2M even when the quicc engine is not there ? Or should it check device tree instead ? Christophe