Received: by 10.223.185.116 with SMTP id b49csp368675wrg; Tue, 20 Feb 2018 23:07:18 -0800 (PST) X-Google-Smtp-Source: AH8x224S5apURqiBlmGApJDFsLvIi29DwAWRQ6oKkSMRFLiXVg7yThSaSV38i31FpgQ/s3psm3Op X-Received: by 10.101.100.213 with SMTP id t21mr1923440pgv.19.1519196838564; Tue, 20 Feb 2018 23:07:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519196838; cv=none; d=google.com; s=arc-20160816; b=svEHFTs6o6oxS2i3WTAjyyvtU5rpBiN5wc0UwssSqson2invqVbKIGZYiqFYVIxbpB Qsam4NklgJ7q64WXepTHLWO86c1s0Z0fDP2/DT8InSdO2lilCDWMNHUALCaUJf2ld5TD fYEVBjOkYri+1N5PKwdVkkEfZOmpRgtG0AXbDdRlle/3MeWYbwsSxGT5/N6ByNYczeVh TonoL3x9njlcXN07lTufn10O97rHdW8ICt+MJOYoZDYuVGrLpJgsiYINRUoaDnCJWIAr 3VDnitc7fKl6wiPOfQWFjAW3zwom1aeCnNPFJecAcj61Td+4jl0JRrplkKMadQNbPPnH JgnA== 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=yW+/JY72D6yO9WCXwBEX/C61az4Wm11H4n7BbxnE/Z0=; b=QyI4im23lmdO9og1t/UbCcY0DxrwNqvWBikOoGI8sCNBUFPUBix5RqOqWzsmHaggHa a3BAW02Exw+ekH2AqvZvewIus5ZPFmWkuZP2c5ibTS4VOw8jFB6c0CnPiqutc0zjKtzy 0hEmI2CJfC9tUS3KnoCLI4vt+oqcf7kZiQVcG55gsUYiWOK3HMBcrGHLP6q3mBsT/8ji pOT277Fk4jGkHHjSNmMJjP7AuovkqqQbhS695rmskTYn6zpQoOtHh0MbAv8qn88rpENq xnYq63sEJwPMjTJ0IpQgSyhr0SkiMrTEO8gViwuFv3Dv2Ll65MMJLV1wv8X9Qlq/ZMQw aaeA== 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 1si3516491pfr.368.2018.02.20.23.07.03; Tue, 20 Feb 2018 23:07:18 -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 S1751666AbeBUHGX (ORCPT + 99 others); Wed, 21 Feb 2018 02:06:23 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:44220 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751485AbeBUHGQ (ORCPT ); Wed, 21 Feb 2018 02:06:16 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 3zmT6P6krXz9tvTd; Wed, 21 Feb 2018 08:06:05 +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 y8uWEwYYfT2Y; Wed, 21 Feb 2018 08:06:05 +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 3zmT6P6DD5z9tvTH; Wed, 21 Feb 2018 08:06:05 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C6E138B8EB; Wed, 21 Feb 2018 08:06:15 +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 PDXOFy1u3qH1; Wed, 21 Feb 2018 08:06:15 +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 915768B8DB; Wed, 21 Feb 2018 08:06:15 +0100 (CET) Subject: Re: [PATCH 0/6] DISCONTIGMEM support for PPC32 To: =?UTF-8?Q?Jonathan_Neusch=c3=a4fer?= , linuxppc-dev@lists.ozlabs.org Cc: Joel Stanley , linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <20180220161424.5421-1-j.neuschaefer@gmx.net> From: Christophe LEROY Message-ID: <193a407d-e6b8-9e29-af47-3d401b6414a0@c-s.fr> Date: Wed, 21 Feb 2018 08:06:10 +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: <20180220161424.5421-1-j.neuschaefer@gmx.net> 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 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 ? Christophe > > Some parts of this patchset are probably not ideal (I'm thinking of my > implementation of pfn_to_nid here), and will require some discussion/ > changes. > > [1]: https://www.spinics.net/lists/devicetree/msg213956.html > > Jonathan Neuschäfer (6): > powerpc/mm/32: Use pfn_valid to check if pointer is in RAM > powerpc: numa: Fix overshift on PPC32 > powerpc: numa: Use the right #ifdef guards around functions > powerpc: numa: Restrict fake NUMA enulation to CONFIG_NUMA systems > powerpc: Implement DISCONTIGMEM and allow selection on PPC32 > powerpc: wii: Don't rely on reserved memory hack if DISCONTIGMEM is > set > > arch/powerpc/Kconfig | 5 ++++- > arch/powerpc/include/asm/mmzone.h | 21 +++++++++++++++++++++ > arch/powerpc/mm/numa.c | 18 +++++++++++++++--- > arch/powerpc/mm/pgtable_32.c | 2 +- > arch/powerpc/platforms/embedded6xx/wii.c | 10 +++++++--- > 5 files changed, 48 insertions(+), 8 deletions(-) >