Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1667511ioo; Sun, 22 May 2022 23:40:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxndIH9e7VX5+iq+WxZIjcN9EbRMYYv2n6I9gDjVYm487otnFnhnCyqyV3U/p3GfWNjyBz X-Received: by 2002:a63:fb50:0:b0:3db:a519:1f84 with SMTP id w16-20020a63fb50000000b003dba5191f84mr18971388pgj.61.1653288052553; Sun, 22 May 2022 23:40:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653288052; cv=none; d=google.com; s=arc-20160816; b=uH0+q42zezoW2bRQ7bnt2unlZlBlPWVtEvriS+wq5bN4tdW7qP/rsf2bzzkVZ6z8Jg g9bxAcxRks4v43N21q7AHdeJd8NUih2nOlKKC5IiEInLCgt1SR6Ry6FmFKfIvd1BlObq N9rGHdm4aAhTnUCdND8LIgqbeBYNYJW3KsCl5hX0rv5o6nImL3KLUYdFiOCqNK3ERyyF na14LNhpmvKaSOLPhnTbb1d8w5zLPlnaRXJKePcOq8GUHTeDUcHa3ANxtZtDJjzh+uLm sZTnDOYYgeBNTHlfCcRnHD4bpRHtY0FrVYbTBWyVjZAQb+aeuX/ZLkw1PILwNkliR8ej upVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=nwQYwlpyvBbjle3H3dtTOv8YpdXZinKZE3k+RoQBbJA=; b=Yve3ZQP9Zt9pJlcD4L+JXo8FbIZ8llwwTrnRHp+oF5KYllrPuyzcWPbyXLSjBTgQlT kdXp2fZMJV3OQa1jeIbQ1AohUUAeXrZKY/zl/4HNvA6F+6IIAx2nu8doomABMRTaPQDg /ILlQZl6ht4fvMq+Re3++XdQaTsKIpUuqhqp/1PubIgde4Dn6xpuzR9QztRqaceytyC8 A3r2P2ONLjhc7ADAQdvnnbGO7jSgVqTVWbEDV9lZ1vmmg8z3MXx2yW/h1WJJCDp/1iBE rBvJRdojBLe9I4PC5Khya4dQFjxvtF6sy9oHm4/xHW3Zui5QLciXOivQ1ntw+XTF+1Rr RimA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PLGFqZcc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id on9-20020a17090b1d0900b001df53d6dbc7si13744000pjb.117.2022.05.22.23.40.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 May 2022 23:40:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PLGFqZcc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E43B9434A9; Sun, 22 May 2022 23:14:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242461AbiETIFH (ORCPT + 99 others); Fri, 20 May 2022 04:05:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346841AbiETIFE (ORCPT ); Fri, 20 May 2022 04:05:04 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A45F015E604 for ; Fri, 20 May 2022 01:05:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1A37FB82A5B for ; Fri, 20 May 2022 08:04:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E373C385A9; Fri, 20 May 2022 08:04:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653033897; bh=2+UsR8SY09lQomSf/1VOLFJ4QEsxG2ZXRneVf/dRIRQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PLGFqZccKSIjEgIWJN2VKqwQzgxTVsmT1Os/COyLLsf72r3km7q6scL8RKqTvMzGH fGGyAXIDxmixCis7kbCQUDTIFR+kkCMEKpDbG44/e4AT9f73rI8rmDq7IZV/NiGMYo fj2GQzGF5i1bTCoYocEVOl3Wu1H4tz94tet7vKNJd8ogrKJWWzKFu3b62ZZaZqMebv 3mWP3KnJvOYxTn02uLcE6bF8pPkk9iTHX4Kbr1IRhEfO6zSuL2V4+3PEzB9wns8iV9 D7I2+rPaUBv+4OIfsw3KtPCyb/q5GcgyQQzGLobuGO4KxLZJm2PW+mqJug7Ax53DtE KLNrk+p+H7yFw== Received: by pali.im (Postfix) id 3491053E; Fri, 20 May 2022 10:04:54 +0200 (CEST) Date: Fri, 20 May 2022 10:04:54 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Ash Logan Cc: paulus@samba.org, mpe@ellerman.id.au, christophe.leroy@csgroup.eu, robh+dt@kernel.org, benh@kernel.crashing.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, j.ne@posteo.net Subject: Re: [PATCH 11/12] powerpc: wiiu: don't enforce flat memory Message-ID: <20220520080454.c3cqodsdbfbkmg56@pali> References: <20220302044406.63401-1-ash@heyquark.com> <20220302044406.63401-12-ash@heyquark.com> <20220513224353.n56qg5fhstbaqhfz@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716 X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 20 May 2022 13:41:04 Ash Logan wrote: > On 14/5/22 08:43, Pali Rohár wrote: > > On Wednesday 02 March 2022 15:44:05 Ash Logan wrote: > >> pgtable_32.c:mapin_ram loops over each valid memory range, which means > >> non-contiguous memory just works. > > > > Hello! Does it mean that non-contiguous memory works for any 32-bit > > powerpc platform, and not only for wiiu? If yes, should not be > > non-contiguous memory support enabled for all 32-bit ppc boards then? > > Hi! Sorry for my delayed response. As best I can tell, it does indeed > Just Work, but I have only been able to test on wiiu which is missing a > lot of features other boards have (like PCI) - so it's possible there's > still an assumption elsewhere in the kernel that I haven't hit. > > As best I can tell, the Wii and Wii U are the only 32-bit powerpc boards > out there where it's even possible to have non-contiguous memory. What is the reason that those two boards are the **only**? Is there some specific requirement from bootloader or hardware to "enable" non-contiguous memory support? I'm interested in enabling non-contiguous memory support for P2020-based board as it has gaps in its 32-bit memory layout and which could be used for RAM mapping when 4GB DDR3 module is plugged in (default is 2GB). > >> Signed-off-by: Ash Logan > >> --- > >> arch/powerpc/mm/init_32.c | 4 ++-- > >> 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c > >> index 3d690be48e84..59a84629d9a0 100644 > >> --- a/arch/powerpc/mm/init_32.c > >> +++ b/arch/powerpc/mm/init_32.c > >> @@ -125,10 +125,10 @@ void __init MMU_init(void) > >> * lowmem_end_addr is initialized below. > >> */ > >> if (memblock.memory.cnt > 1) { > >> -#ifndef CONFIG_WII > >> +#if !defined(CONFIG_WII) && !defined(CONFIG_WIIU) > >> memblock_enforce_memory_limit(memblock.memory.regions[0].size); > >> pr_warn("Only using first contiguous memory region\n"); > >> -#else > >> +#elif defined(CONFIG_WII) > >> wii_memory_fixups(); > >> #endif > >> } > >> -- > >> 2.35.1 > >>