Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp788363imp; Thu, 21 Feb 2019 11:11:20 -0800 (PST) X-Google-Smtp-Source: AHgI3IaItO8vK7wEGRbdRDgtmLE2BFLSnlnb+uohrWlSLIhp2pj/J1tFIkJyUP6nOklIqvPi8ABW X-Received: by 2002:a62:5c87:: with SMTP id q129mr82697pfb.180.1550776280318; Thu, 21 Feb 2019 11:11:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550776280; cv=none; d=google.com; s=arc-20160816; b=B9Anle7ZhYcushOyyBjjBcuTiPfC80646MwVjwZdr333siSmacodC77+xn5bBcj+QS CBIm/FOY9qFFwvxgqRPK221w0BAYqSW2DeEKk07V4njx4dsI22nfYDs+MemcELtKQoc5 lNU1KfiEQn7Ctoxylw165sSilBoN35UK/UxfWrQKf96MLL4WlE6bNZ3iqVcLuKv4nbVS wwqPXNHis4DaXNSz0tQAgV1BGhVqiWpkm7u8C3PNVHaT8Q0GZ6sLxz9GrI/P4PLekM+9 AYaMZyWdtaH1QyDjE0VtR+fJuyBfEm5cvb5FRzscN9+46LLzYu1btgFyunj+zyNd+lQo RTuw== 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=CNAH0jyz3hZVenhEr/48673ZsQ+AczNeAJq3nve/dKOpypqdZ24zjK97y9RLCNiWUr lhj6xLsfhZqqgrnD6AXnZFT5k1EBmy1SbBIStWtiCpwmw8KyqNmt1qPHNyfyCAN9GEl+ jsb7NAJvSbZvOP/p5L6Nhd6flatHl596tpA98wlDV2VqxmUlfDOcjyJqZXHZHwvtysSp 1qDtWqqaYlb+HMG7e1qEObbhkamIxQshW+ofKx48fEq56AvD1uvMj9fDfP2QCmxpyJrD vVeM7GJjkI5rvUGW/xdP9ieCPBOTJ0Q+FfiFtrMpXzdU08PA9XM6tnEXg/j6uHGWFBE3 QbRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=wPhwplKT; 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 u13si13935069pfa.12.2019.02.21.11.11.05; Thu, 21 Feb 2019 11:11:20 -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=wPhwplKT; 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 S1726191AbfBUTIj (ORCPT + 99 others); Thu, 21 Feb 2019 14:08:39 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:63229 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726074AbfBUTIi (ORCPT ); Thu, 21 Feb 2019 14:08:38 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4453sd5Nlnz9vCN4; Thu, 21 Feb 2019 20:08:37 +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=wPhwplKT; 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 OgTVJShXnBw8; Thu, 21 Feb 2019 20:08:37 +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 4453sd4J8Rz9v3pZ; Thu, 21 Feb 2019 20:08:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1550776117; bh=bCzDoKXfQUOk8+dp/9F7V6/4S9bkDV/4QQa9kOcF0rw=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=wPhwplKTigIW8vZK7e0vMZUiNuVsAi45u0L9G2Gyry2vCs1j6ehB7IuaJIbDSut3D ESiV9mKH3DzW534Pguc+ydd0ueYH2R9ss8dBP8OHctuTu6Ig92MKyNKg2rhJynGqPb D7gtAviY/CZ5+rBUPyMGE1C4BKr0+ehmUixYArQA= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 979D98B86A; Thu, 21 Feb 2019 20:08:37 +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 fXxceCVQN0-i; Thu, 21 Feb 2019 20:08:37 +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 6D30E8B852; Thu, 21 Feb 2019 20:08:37 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 4F8A46EF61; Thu, 21 Feb 2019 19:08:37 +0000 (UTC) Message-Id: In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v5 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 19:08:37 +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