Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp581022img; Fri, 22 Mar 2019 04:29:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrFSN7YzD6Guv9MHPExtIj848MSHGtlSbM7zuZR4efbu9hxkifC98FBJbt8eJYmd5pQ6gv X-Received: by 2002:a63:d706:: with SMTP id d6mr8005878pgg.367.1553254164321; Fri, 22 Mar 2019 04:29:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553254164; cv=none; d=google.com; s=arc-20160816; b=KAhjE3aWaidI5euKKuaICuscpKyoR7wt2eDyJR449H0SCblF4lt1WsHYAG8zLc9fQZ sF014Y88q2VpyGAXbvecAhmHq5MMZnlBmQmAywUiysuv3i1jGVsK6iA1SCrRUQctx+5e M9JFM9eLNbeAdcRugrR3i1LM6M4TLJlx/96PDTTcXU3oYj0XTeZV+FhHuv1LQoqeo6SY 1kLFBMHOAqoNwt6isdwcmXsYkWjtNsWpvV4JcJbhFRp5K7jT7EXKP/oUW46kA0Zy+rKC BgiaVmw8sodGr0a1mn7a3tYki38kd33FuucjvGi3ioQioJTUIVw3XzCvAbrqd1lftf33 3hsg== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=41z+1O7fRjQMadR32PDzEa9uEqe3rAPAhoH6PjMeZLI=; b=j027X0+j+MUnsC5hadlC0VgkX8VYm6UUozPpPRCqXx+5WHc+ktM/vYhtfY/SpcwQ3B ZwLY4vataqn4y//AWIoWVIJAdV9pxKzg4/UVw9sukHtrr019OOsman3nYYv++KLK1FmV QsOFZ1RLRAS1FccaRpsWYycF0x3SIVAF1aMpiYqm5tqFWeHOiyK0XP2wPFzDvYyDKLns CfoPsBbKiCrzMwqhSmyCUU5sJZW1zjQZYLRpq+ewtf4Si8cpfwKrVYYHlQ1NGWB5Z+KP 4+wskHVb7rG/JwoaiAzyzQHTeoIYhsRMuT9oG9ZvjOOC0jv6jkzq7OFKAdRmm9Ej7BOR PkkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tRbvQjbn; 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 d11si6394229pgh.447.2019.03.22.04.29.06; Fri, 22 Mar 2019 04:29:24 -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=@kernel.org header.s=default header.b=tRbvQjbn; 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 S1728854AbfCVL0H (ORCPT + 99 others); Fri, 22 Mar 2019 07:26:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:53788 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729378AbfCVL0E (ORCPT ); Fri, 22 Mar 2019 07:26:04 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AFF21218B0; Fri, 22 Mar 2019 11:26:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553253964; bh=58vDfN6oQo1Jj7dSL6HS2HUUZpUUJlBCo58rLnaR+Y8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tRbvQjbnUSqWeTn0uV8bXNZP0MJFFN3IN8qjU6bvEBV85XnsElOKlikMgVkBoJxOr GE5nXB208eKyBkrVcW5o5aPeOOhGpg/ToyexQ+4f8mDflda5j4KxVECx3lbjiYUCOe snPVMkV2qw4GC3Z1YvsL0BvOCAC6grfKonAW8ESQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Neuschafer , Christophe Leroy , Michael Ellerman Subject: [PATCH 3.18 125/134] powerpc/wii: properly disable use of BATs when requested. Date: Fri, 22 Mar 2019 12:15:38 +0100 Message-Id: <20190322111219.494735102@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190322111210.465931067@linuxfoundation.org> References: <20190322111210.465931067@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christophe Leroy commit 6d183ca8baec983dc4208ca45ece3c36763df912 upstream. '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 Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/platforms/embedded6xx/wii.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/arch/powerpc/platforms/embedded6xx/wii.c +++ b/arch/powerpc/platforms/embedded6xx/wii.c @@ -104,6 +104,10 @@ unsigned long __init wii_mmu_mapin_mem2( /* 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;