Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp242892imp; Thu, 21 Feb 2019 00:08:38 -0800 (PST) X-Google-Smtp-Source: AHgI3IYESrRjfIL+CfW/+58hMIRpZYcBW/qWlNPERFUwaM2dybS1P4s7GhaPAXo++0gzxUj+rISQ X-Received: by 2002:a62:41cc:: with SMTP id g73mr38444498pfd.145.1550736518225; Thu, 21 Feb 2019 00:08:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550736518; cv=none; d=google.com; s=arc-20160816; b=dKI/citbEFj624V0TA4eAUkeh8KXxIaMN5sts3S8fZjx/A4GJ2ebCjOHk3ipaSDREz f57XbA1ejLwqQawco+w2jmjKxRfYkVOkCDjq8ivR3FbADDJdoTGZf3lBbKEnzqlus4sz xpRglwbstsKSy+UQ04t7dPQribnf/5gBlPKZOI3O36/JIDI+vao/3N9mwbIi0MQ91vyL oDezIgmnNrBjSrumINqDMH65v47CJngq0+b13nxZpI7VDKhPBlN3HbdN5r7d1kOstcV4 qLnRgqy/ctni9QgHTJnbr0/NQd3XnpjkWVvMWS7UTPc6oFjL2sonPj+HoNEZK66edV7f MrxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id:dkim-signature; bh=bCzDoKXfQUOk8+dp/9F7V6/4S9bkDV/4QQa9kOcF0rw=; b=fweD5BmrYZtEz0XzI5OUqAyYidClbBNUvbRJQdGBXrpODfgpOP5IUWF030IwnYQmnA sGa4nQFj9XljImvJGLG3zA79R0pwHH02M1BAaqs5qGCSj8PyQu2Gw861XIJoU2NaP9JJ 0pSEHnfYoGp2rT6yDBIE2scqUCfwQh+tGL6EBKdh1TgE9BNoCttR3eHSfhDpjyTOPgi7 koBuOdWt0fxI4I4NVyihNDExPys2+WkoVwYf3/yqWAnY/1oWx3PGBciXdus4w+D4Ahw9 aA1zzm0E0UL0zQmKW3Y/0N3RlcLYMWUYAdET5NPmoLwfavqoUBRz61iJqFctAQaDMx9B L2XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b="Vn/Mbfz4"; 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 g5si13680890pgk.402.2019.02.21.00.08.22; Thu, 21 Feb 2019 00:08: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=@c-s.fr header.s=mail header.b="Vn/Mbfz4"; 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 S1727184AbfBUIEv (ORCPT + 99 others); Thu, 21 Feb 2019 03:04:51 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:2041 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725814AbfBUIEu (ORCPT ); Thu, 21 Feb 2019 03:04:50 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 444n7h6pXyz9vJg3; Thu, 21 Feb 2019 09:04:48 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=Vn/Mbfz4; 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 LrQBJa2-067i; Thu, 21 Feb 2019 09:04:48 +0100 (CET) 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 444n7h5pXpz9vJg1; Thu, 21 Feb 2019 09:04:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1550736288; bh=bCzDoKXfQUOk8+dp/9F7V6/4S9bkDV/4QQa9kOcF0rw=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=Vn/Mbfz4H4qZSIBtyqsXGHITSONjB08A2BsH8lkihR+ZikktssHTmgaLWWBZAUUrh 6lNNc6uh3YjUxE3WzocimEUGSdW/fZkBC2S3iymrbkxHYdEMM27EAwhgm4ab1FkhSy R/5LlT0LzFPjI3Y8wofTn2rpng7BQ8QxBKf5Tu/s= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C00BA8B78F; Thu, 21 Feb 2019 09:04:49 +0100 (CET) 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 CI1Dfaf_LSqa; Thu, 21 Feb 2019 09:04:49 +0100 (CET) Received: from po16846vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 91B1F8B75B; Thu, 21 Feb 2019 09:04:49 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 70F776E866; Thu, 21 Feb 2019 08:04:49 +0000 (UTC) Message-Id: <15e1001fdbeb0dcfc4c37519c31fd570dcd5cca4.1550692943.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v4 01/16] powerpc/wii: properly disable use of BATs when requested. To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , j.neuschaefer@gmx.net Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Thu, 21 Feb 2019 08:04:49 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 'nobats' kernel parameter or some options like CONFIG_DEBUG_PAGEALLOC deny the use of BATS for mapping memory. This patch makes sure that the specific wii RAM mapping function takes it into account as well. Fixes: de32400dd26e ("wii: use both mem1 and mem2 as ram") Cc: stable@vger.kernel.org Reviewed-by: Jonathan Neuschafer Signed-off-by: Christophe Leroy --- arch/powerpc/platforms/embedded6xx/wii.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/platforms/embedded6xx/wii.c b/arch/powerpc/platforms/embedded6xx/wii.c index ecf703ee3a76..ac4ee88efc80 100644 --- a/arch/powerpc/platforms/embedded6xx/wii.c +++ b/arch/powerpc/platforms/embedded6xx/wii.c @@ -83,6 +83,10 @@ unsigned long __init wii_mmu_mapin_mem2(unsigned long top) /* MEM2 64MB@0x10000000 */ delta = wii_hole_start + wii_hole_size; size = top - delta; + + if (__map_without_bats) + return delta; + for (bl = 128<<10; bl < max_size; bl <<= 1) { if (bl * 2 > size) break; -- 2.13.3