Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1815914imu; Thu, 17 Jan 2019 03:49:05 -0800 (PST) X-Google-Smtp-Source: ALg8bN4LddlBnaZ94OPMLsN5jJI8LNMGH+qdlz7IANFTmviaWZk7mSfy8SMt2K6K5WEs/ekcUIj7 X-Received: by 2002:a17:902:2f03:: with SMTP id s3mr14390941plb.277.1547725745861; Thu, 17 Jan 2019 03:49:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547725745; cv=none; d=google.com; s=arc-20160816; b=Q4EoVcSsFzdoZ5Z/7Z22TAY+JOPkpPeoCJSZ+vw8LPLVBp/u95dwsE/OeTT2fL4a9i n7EdLgV5iY6PXRnF5tR6j/sdteC3ZPXb/ps9Yagcx1m2os5+tLbZngd85MWNTXsegMLp sCz4Tmg+TytXdC8OPKz7m9BFEhF05LrsNk1W641HPqOYEgyO5xiJ7H9g+Cy8L01BXns8 pQqSoe04IbeREq8sP9LSjNyfpJ5C5LaQ1zKQ9oWm8wsp5uOzWfhZJxZ7hsl1CayFKPg/ vXVMlrKaq9shXr4U00TZtcMaZ+oFB0efNArvCu9sem8aBjokB6HS1m0uJb/oZLtxMhXg mAyg== 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:message-id :dkim-signature; bh=bCzDoKXfQUOk8+dp/9F7V6/4S9bkDV/4QQa9kOcF0rw=; b=XLxEeaGMRJ3bV4mS1nOgjdxI5FxtDGQPR0qvMezGYb0nV3e27HGjYj7nndLnK9w6yg 8C2S2s/2LtygWqt5dxhoI5LnvDwkKWFccsuEGB3Uv2qDMq67jMwlwzmZtjPePNoajCKQ s5VGoMd66uhjtQrJYPXd7MgfJMrCG4KfOohbjd7C9qJWi9t2ZtTRLPhSb+GNjHVXfEyz y/+0SnGwccKM+AXFvGb6In6DIua9uqbcemJhZ95K6iE/tRDLR31OC7hbqbPB1OgZDMPQ B5L8PwimOEoiboW6nkir+K9G1vPifyUnBqs67NsPOOurgWYIT1EpKNTAGVTnewOLJZaN EM8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b="sgL9q/z4"; 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 t5si1331506pgc.369.2019.01.17.03.48.50; Thu, 17 Jan 2019 03:49:05 -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="sgL9q/z4"; 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 S1728728AbfAQK77 (ORCPT + 99 others); Thu, 17 Jan 2019 05:59:59 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:1049 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728424AbfAQK76 (ORCPT ); Thu, 17 Jan 2019 05:59:58 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 43gLgs5DSBz9v2C1; Thu, 17 Jan 2019 11:59:53 +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=sgL9q/z4; 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 dY3GDlVabaBu; Thu, 17 Jan 2019 11:59:53 +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 43gLgs41Psz9v2By; Thu, 17 Jan 2019 11:59:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1547722793; bh=bCzDoKXfQUOk8+dp/9F7V6/4S9bkDV/4QQa9kOcF0rw=; h=From:Subject:To:Cc:Date:From; b=sgL9q/z46bGcBiyFkBtl28Nz8YopNnn0jVHHpOnGTKRUeh4VUquSaNDw/qxUzN+iG 3iPhL1pCbRcr/dX5eRF1OK7nxq5CkoBpTanQ5uFJlzDAmLEYOpvDqHDzpfifFIGPvy WK4u/BOY4jtnyQNCigB3FnecHhkSBg4W6paGtMvg= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id B03DA8B858; Thu, 17 Jan 2019 11:59:54 +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 ZYyDY2pIAeGp; Thu, 17 Jan 2019 11:59:54 +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 868008B75B; Thu, 17 Jan 2019 11:59:54 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 302B971884; Thu, 17 Jan 2019 10:59:54 +0000 (UTC) Message-Id: <029eb2f45a8b964ce82118044912a39679fac592.1547680951.git.christophe.leroy@c-s.fr> From: Christophe Leroy Subject: [PATCH v2] powerpc/wii: properly disable use of BATs when requested. To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Thu, 17 Jan 2019 10:59:54 +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