Received: by 10.223.176.46 with SMTP id f43csp4136054wra; Tue, 23 Jan 2018 04:58:51 -0800 (PST) X-Google-Smtp-Source: AH8x225IumYnN4v1tkx3FxIVcu/ZQTxftSlTgHKLMZE0qrJRWqODcN4EwyURJoKroS3oAw6aJAhX X-Received: by 10.99.130.66 with SMTP id w63mr8674787pgd.267.1516712331427; Tue, 23 Jan 2018 04:58:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516712331; cv=none; d=google.com; s=arc-20160816; b=hRdFbCQpVKFTv4XovljIPch5p0wBNoMwvUdm51OmXWvBeT9guw9jelcCCtap+nU9nq 5MsToKdy5Ag5/vhgOHzDrzwseTLOQkcczf5KIcxPqacgZ5reQDMKpQ5CZbFdTYXVcCOD SWvuJO9V9XVrIUlpsctic3fHEXuI4jteavYhgdDQzqsn2gsgz0iMQvFBG9V39twHufvM PgCBNYLqYq9nsXmxGA5oK10+cuu3eaDQeGsJ9MCtfrVMgkv6e1pjMVPblgTFlDhV6dMO 4CpSj1EV/hEFSVpMU3LSkF+2CF2L3Umn+Vskn3ZU6fhYLn79JacHj0+0t+p6e7bgfCKm vKsg== 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 :message-id:date:references:in-reply-to:subject:cc:to:from :arc-authentication-results; bh=IdUgJ3wCeTNIZG7Dc8k4lH/3Uz34/2hXlIbneJImgC8=; b=AmlqHmFPNSezI4/bbUD5uAHyZqfTjEGzgnYxILbE1d2JY9o8FTjSajfnSiI+HbSfdv 31qrgDy0RqBOmrYPEe8QwFTkUCZy2PZ0HtnUcizFgpeWxkzf+/K6cLuLNEKk9iZZBB3M b+tfjUIU2iQI4bejW/GxfHxMtMbac2fNMDr2DLGXTtYMlqDDTZ51sXVkFMMWQBl+fZ9p 6kbZDZ79xlYbbRjwcMvcH3T4i97+E1JC+igcYfl3cpV5w//8YVvS5W8GoGUisRGAmMKC V0Z0rLYQYr62oc96WlvNpFdjoCr22o7ppCyDzhHvLg3HbiqmrPC28Fwq2F4uMnfQrhh2 VsYQ== 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 m197si981685pga.206.2018.01.23.04.58.36; Tue, 23 Jan 2018 04:58:51 -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 S1751659AbeAWM6L convert rfc822-to-8bit (ORCPT + 99 others); Tue, 23 Jan 2018 07:58:11 -0500 Received: from ozlabs.org ([103.22.144.67]:46965 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751474AbeAWM6J (ORCPT ); Tue, 23 Jan 2018 07:58:09 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 3zQpHz28fwz9s9Y; Tue, 23 Jan 2018 23:58:07 +1100 (AEDT) From: Michael Ellerman To: Jonathan =?utf-8?Q?Neusch=C3=A4fer?= , linux-kernel@vger.kernel.org Cc: Tom Lendacky , Brijesh Singh , devicetree@vger.kernel.org, Albert Herranz , Jonathan =?utf-8?Q?Neusch=C3=A4fer?= , linux-gpio@vger.kernel.org, Thomas Gleixner , Borislav Petkov , linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v2 1/6] resource: Extend the PPC32 reserved memory hack In-Reply-To: <20180122050411.32460-2-j.neuschaefer@gmx.net> References: <20180122050411.32460-1-j.neuschaefer@gmx.net> <20180122050411.32460-2-j.neuschaefer@gmx.net> Date: Tue, 23 Jan 2018 23:58:06 +1100 Message-ID: <871sigwx41.fsf@concordia.ellerman.id.au> 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 Jonathan Neuschäfer writes: > On the Nintendo Wii, there are two ranges of physical memory, and MMIO > in between, but Linux on ppc32 doesn't support discontiguous memory. > Therefore a hack was introduced in commit c5df7f775148 ("powerpc: allow > ioremap within reserved memory regions") and commit de32400dd26e ("wii: > use both mem1 and mem2 as ram"): > > - Treat the area from the start of the first memory area (MEM1) to the > end of the second (MEM2) as one big memory area, but mark the part > that doesn't belong to MEM1 or MEM2 as reserved. > - Only on the Wii, allow ioremap to be used on reserved memory. > > This hack, however, doesn't account for the "resource"-based API in > kernel/resource.c, because __request_region performs its own checks. > > Extend the hack to kernel/resource.c, to allow more drivers to allocate > their MMIO regions on the Wii. Hi Jonathan, Sorry but I can't merge a hack like this in generic code. Has anyone looked at adding proper discontig mem support to PPC32? Or can we punch a hole in the resource in the right place? Maybe from add_system_ram_resources() ? cheers