Received: by 10.223.185.116 with SMTP id b49csp798799wrg; Wed, 21 Feb 2018 07:07:02 -0800 (PST) X-Google-Smtp-Source: AH8x227xlnCddAdSbaE6WnPxdlNjXtDjXNXwmK+O+GlI2uu0hFhU4u0uBQar9KSJ6arj4jEEQVAY X-Received: by 10.99.168.75 with SMTP id i11mr2946527pgp.420.1519225622066; Wed, 21 Feb 2018 07:07:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519225622; cv=none; d=google.com; s=arc-20160816; b=vT5fcS3ijLghihiqG8ZWDi2Zfe6RKRqzX7NW5OROELJSE0GRNd7BWdt+dWziWzgZsi LjpNQNwnPyr50YeeXxV1rU3lpyd0I4R9ffLuD2T8MIS1AU/2JpLxFo/VAR+zUGjbEgFo kM+bhgDj4ksHs5a0ADuwHMm4CW8/68m529JH8QmqoiEwPF9INgJOAcC5bgiSxiS3wXPP OoyT4YKqI9xp0DeHo+4UCDcBEiSI/iRI/ZTK1cH5vS29f7KSvXc7asiXdZPwka/DtrYd VAA2jb/Nth3Stj7Mnq/jsC0g19armbtiWzHRCS3Yil1JRYNhgZvN7niF0Wx3/Y9gM8SN c+ag== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=hnwnZc8Z+fEaIzAS88tL3cErAzVj4hpDGluabYiCkXw=; b=pbW85MJX3K9J40NvD48IPkJwbf8XUb/WIfkgIyPb4vgSjPqA0EQkKvZ6kM/LapCfD2 +sejgW6lHHBSU3jvXSXQR+9cBTrx64Wq3z545bjz4BN3sYgi/efUNjuv3C1ldx8bs0qW ZBI41u1Oizjct+54yYkNoNgmRaqA7ofxFc9IoR+JrTMoJZmxt8j8Mi7LzN3toQVIY66v l1u+BtFQhIx1h4xoZppbJc05hjCz1N2LeMSKpUi/TQ3sh1SzVxsA9CWD2TyYXkssRQhd f2lUkTHVHIL1k0S0aVu2itahqARxz9JBRc55J2KsWjXnT+cT9pnJHQ2Fls8FC46IZQrG CPhg== ARC-Authentication-Results: i=1; mx.google.com; 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 c14si4094610pfn.313.2018.02.21.07.06.47; Wed, 21 Feb 2018 07:07:02 -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; 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 S965704AbeBUPC3 (ORCPT + 99 others); Wed, 21 Feb 2018 10:02:29 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:58009 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934232AbeBUPC1 (ORCPT ); Wed, 21 Feb 2018 10:02:27 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 3zmggq0rJ9z9ttC3; Wed, 21 Feb 2018 16:02:15 +0100 (CET) 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 QtOJRicDz_CW; Wed, 21 Feb 2018 16:02:15 +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 3zmggq0CXyz9ttBR; Wed, 21 Feb 2018 16:02:15 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 85DF58B912; Wed, 21 Feb 2018 16:02:25 +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 EYICxtSaAH2s; Wed, 21 Feb 2018 16:02:25 +0100 (CET) Received: from PO15451 (po15451.idsi0.si.c-s.fr [172.25.231.5]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 590FA8B910; Wed, 21 Feb 2018 16:02:25 +0100 (CET) Subject: Re: [PATCH 0/6] DISCONTIGMEM support for PPC32 To: =?UTF-8?Q?Jonathan_Neusch=c3=a4fer?= Cc: linuxppc-dev@lists.ozlabs.org, Joel Stanley , linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <20180220161424.5421-1-j.neuschaefer@gmx.net> <193a407d-e6b8-9e29-af47-3d401b6414a0@c-s.fr> <20180221144240.pfu2run3pixt3pzo@latitude> From: Christophe LEROY Message-ID: Date: Wed, 21 Feb 2018 16:02:25 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180221144240.pfu2run3pixt3pzo@latitude> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 21/02/2018 à 15:42, Jonathan Neuschäfer a écrit : > Hi, > > On Wed, Feb 21, 2018 at 08:06:10AM +0100, Christophe LEROY wrote: >> >> >> Le 20/02/2018 à 17:14, Jonathan Neuschäfer a écrit : >>> This patchset adds support for DISCONTIGMEM on 32-bit PowerPC. This is >>> required to properly support the Nintendo Wii's memory layout, in which >>> there are two blocks of RAM and MMIO in the middle. >>> >>> Previously, this memory layout was handled by code that joins the two >>> RAM blocks into one, reserves the MMIO hole, and permits allocations of >>> reserved memory in ioremap. This hack didn't work with resource-based >>> allocation (as used for example in the GPIO driver for Wii[1]), however. >>> >>> After this patchset, users of the Wii can either select CONFIG_FLATMEM >>> to get the old behaviour, or CONFIG_DISCONTIGMEM to get the new >>> behaviour. >> >> My question might me stupid, as I don't know PCC64 in deep, but when looking >> at page_is_ram() in arch/powerpc/mm/mem.c, I have the feeling the PPC64 >> implements ram by blocks. Isn't it what you are trying to achieve ? Wouldn't >> it be feasible to map to what's done in PPC64 for PPC32 ? > > Using page_is_ram in __ioremap_caller and the same memblock-based > approach that's used on PPC64 on PPC32 *should* work, but I think due to > the following line in initmem_init, it won't: > > memblock_set_node(0, (phys_addr_t)ULLONG_MAX, &memblock.memory, 0); Can't we just fix that ? Christophe > > > Thanks, > Jonathan Neuschäfer >