Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp823178imp; Wed, 20 Feb 2019 09:36:25 -0800 (PST) X-Google-Smtp-Source: AHgI3IbRwEo5G6/RpPvmlQETEXDhiZ7TO5zyN4iNESJc+EaYfEaW8O6KGHdRtlDKEJpaZ773M4lK X-Received: by 2002:a63:8b4b:: with SMTP id j72mr30195972pge.100.1550684185675; Wed, 20 Feb 2019 09:36:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550684185; cv=none; d=google.com; s=arc-20160816; b=krYf3UWgVK0kF8WqWNwyKMfv+fD2Wyc9e53ii9g2uo3MDCb3zYxGGle3jt6Pq6t/hM aEN6BKa81mH1domsgMPaI/ztVXJcgOCulXPyeLI2VPt1KT53S0tpeBpyNVf2pFkNMsph KsnWdy2NK54/XDvKZWaTALXC+Kosyr2uCrgttxuMer/ZJhUO5dPBY7xMlGDKPrJzePNw Qoyrfqu8aQ6kjbHywBaY914zUtaPsqYli3GHHgNFaep5d0m6oVujSGXug5ePxr/auvU6 ZMOw0BW62F/t9GQgivK0pRd7DVV0UiUw7AETzvXImVlI/UENNrYbGyynXwma3xO/HPx9 4NXw== 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=Wkp0Gys3VfGom0JM8Bt4gq2/8GkjesSREbmIHL/VXJwJ8G0Xw9yY+miaJDecgxvNnI yqiCzQCFdgdR8r3pYkukZQ+0xsxjzpMa07z9xQEs/ceDyQVVwtan8ETr7beaMGu1TsTc 7wgrk4KEwbfz+OOk3YqUC9JFjc19Ub+velw3OvU3ZTLolMEdfZTEtVXLOS8ak5C1Ho/e WBzW3ngOp26LDPFYcnC1YRb5e1R6kS55GcHBJ8bc+p7PMxY6t+QxQWwgHhLqeKHPsO8M caf9lPi63fvNNMmu9I9dVqdIebGTbVuPCDYeVQm/jCcbJmrTojtNpi5bLBRn9ByPfgP7 Uv3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=vcYEoMqP; 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 v9si17623459pgb.170.2019.02.20.09.36.09; Wed, 20 Feb 2019 09:36:25 -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=vcYEoMqP; 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 S1726183AbfBTR3J (ORCPT + 99 others); Wed, 20 Feb 2019 12:29:09 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:1369 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725806AbfBTR3J (ORCPT ); Wed, 20 Feb 2019 12:29:09 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 444PjG37HYz9v0g2; Wed, 20 Feb 2019 18:29:06 +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=vcYEoMqP; 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 SeNLLnM1A4Ia; Wed, 20 Feb 2019 18:29:06 +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 444PjG20SQz9v0g0; Wed, 20 Feb 2019 18:29:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1550683746; bh=bCzDoKXfQUOk8+dp/9F7V6/4S9bkDV/4QQa9kOcF0rw=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=vcYEoMqPNHHBCOi0B91MJ9xHm49zzuz4M7zn6aMOQFtsRyYSTl4afVD7PgRQAuUvT uhv0dN7BtE8hsKUWf6rCvUFMAJP2tQl//GwBr6f4CjOEp66oOSdKOHc29dUC37bv3h jceoKoCNgPloNi2o9kUM52+XypGZFZjSzhEfxs+M= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id E84588B84F; Wed, 20 Feb 2019 18:29:07 +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 KAWxOzHSh3ob; Wed, 20 Feb 2019 18:29:07 +0100 (CET) Received: from po16846vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.2]) by messagerie.si.c-s.fr (Postfix) with ESMTP id D10E78B84A; Wed, 20 Feb 2019 18:29:07 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id CAE2D6E85E; Wed, 20 Feb 2019 17:29:07 +0000 (UTC) Message-Id: <7db497a20ecbe202304e27fb8478f2a9b0fce020.1550648295.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v3 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: Wed, 20 Feb 2019 17:29:07 +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