Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1662734ioo; Sun, 22 May 2022 23:30:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylfJ0B8djrfv0rdQ44ykvLgTcv2cIA1nj0jktWs3Lg/4jPG6iTPIZ2N1IIDLQDbdLhMYYc X-Received: by 2002:a17:902:c2c7:b0:159:9f9:85f3 with SMTP id c7-20020a170902c2c700b0015909f985f3mr21301508pla.18.1653287421409; Sun, 22 May 2022 23:30:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653287421; cv=none; d=google.com; s=arc-20160816; b=qGI2/Ft/fautgn5INMKdFC82+cU0uqD9+h76pn3HE6Maz2xvzi73JM9vZrEQvEDSXG 13Uabkev9a99wiEdMzw6yvOJL9AxGY35g6x1tCwjhzBilgjvshDFxDL1bQcTazDsiO5J YOL4J/YCE4z8TpR+6ZRWravI59uT6b2857hQY29i4ox1WWOMHTFVPJKhjUqk1zn4dfwx eGPaYGH0f3l36nNhJEQmhqGrOSN5Qq3DFBa5sd1GJG6P9wgdcmmPcgJroOjBMKti2dxV BgdvxUtLugya9SabJf02XKdJVs1yVJ9zOQcZgjCS0e6AE5jNR6+MWHdjIJA2HF/MnJb0 g/Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=HcFgagevN5jkOkaJy5rMdB6sUf+loftbwcQbeqD3Z+k=; b=YCsKlE6clTOZqvdFmUaRwcInU7AHEqpvvqnsqR+7wgezVEKpuvT4PsSVIPFiCJ6kwX hdktzxYZ/i1n/QtdDDuwIDJ42WmiEsF7fQoP5dvkFXxrZz9oxoGKebFUcPU2Gnl7KdBH dmc+AXk1aQpnVlYfGVoYsJpB4lSt0TroI/7gpKBuozutWBmPIbB7vFZ8nUKmt645KY4F kk8tmjffB8cdImVASjKbgqR8QQCkIjvGNBKzSaJ8ouEP6Ymq+0c10QQ5dW5q86HsjhPv BJLhF4kcEdEnHRPZV4c3uDB8wxBvIOsLnXs54XEOadVXCFN/8ctHKaYYLCGKxeI6oghX PWnw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id om13-20020a17090b3a8d00b001dcd4d33087si13408676pjb.9.2022.05.22.23.30.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 May 2022 23:30:21 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3F85A31344; Sun, 22 May 2022 23:07:38 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345173AbiETDlU (ORCPT + 99 others); Thu, 19 May 2022 23:41:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234673AbiETDlS (ORCPT ); Thu, 19 May 2022 23:41:18 -0400 Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72D89186CC for ; Thu, 19 May 2022 20:41:16 -0700 (PDT) Received: (Authenticated sender: ash@heyquark.com) by mail.gandi.net (Postfix) with ESMTPSA id 71E83200003; Fri, 20 May 2022 03:41:08 +0000 (UTC) Message-ID: Date: Fri, 20 May 2022 13:41:04 +1000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH 11/12] powerpc: wiiu: don't enforce flat memory Content-Language: en-US To: =?UTF-8?Q?Pali_Roh=c3=a1r?= 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 References: <20220302044406.63401-1-ash@heyquark.com> <20220302044406.63401-12-ash@heyquark.com> <20220513224353.n56qg5fhstbaqhfz@pali> From: Ash Logan In-Reply-To: <20220513224353.n56qg5fhstbaqhfz@pali> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, 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 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. >> 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 >>